Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
Copyright (c) 2002-2006 IBM Corporation and others. All rights reserved. This program and the accompanying materials are made available under the terms of the Eclipse Public License v1.0 which accompanies this distribution, and is available at http://www.eclipse.org/legal/epl-v10.html Contributors: IBM - Initial API and implementation
 
 package org.eclipse.emf.java.impl;
 
 
 
An implementation of the model object 'JModel JNode'.

The following features are implemented:

  • Name
  • JNode

Generated:
 
 public abstract class JModelElementImpl extends EObjectImpl implements JModelElement
 {
  
The default value of the 'Name' attribute.

See also:
getName()
Generated:
Ordered:
 
   protected static final String NAME_EDEFAULT = null;

  
The cached value of the 'Name' attribute.

See also:
getName()
Generated:
Ordered:
 
   protected String name = ;
 
   protected boolean isReconciling;

  
The default value of the 'JNode' attribute.

See also:
getJNode()
Generated:
Ordered:
 
   protected static final Object JNODE_EDEFAULT = null;

  
The cached value of the 'JNode' attribute.

See also:
getJNode()
Generated:
Ordered:
 
   protected Object jNode = ;

  

Generated:
 
   protected JModelElementImpl()
   {
     super();
   }

  

Generated:
 
   @Override
   protected EClass eStaticClass()
  {
  }

  

Generated:
  public String getName()
  {
    return ;
  }

  

Generated:
  public void setName(String newName)
  {
    String oldName = ;
     = newName;
    if (eNotificationRequired())
  }

  

Generated:
  public Object getJNode()
  {
    return ;
  }

  

Generated:
  public void setJNodeGen(Object newJNode)
  {
    Object oldJNode = ;
     = newJNode;
    if (eNotificationRequired())
  }

  
EATM
  public void setJNode(Object newJNode)
  {
    if (newJNode == null)
    {
       = true;
      setJNodeGen(null);
      for (Object object : eContents())
      {
        JModelElement content = (JModelElement)object;
        content.setJNode(null);
      }
       = false;
    }
    else
    {
      setJNodeGen(newJNode);
    }
  }

  

Generated:
  public Object eGet(int featureIDboolean resolveboolean coreType)
  {
    switch (featureID)
    {
        return getName();
        return getJNode();
    }
    return super.eGet(featureIDresolvecoreType);
  }

  

Generated:
  public void eSet(int featureIDObject newValue)
  {
    switch (featureID)
    {
        setName((String)newValue);
        return;
        setJNode(newValue);
        return;
    }
    super.eSet(featureIDnewValue);
  }

  

Generated:
  public void eUnset(int featureID)
  {
    switch (featureID)
    {
        setName();
        return;
        setJNode();
        return;
    }
    super.eUnset(featureID);
  }

  

Generated:
  public boolean eIsSet(int featureID)
  {
    switch (featureID)
    {
        return  == null ?  != null : !.equals();
        return  == null ?  != null : !.equals();
    }
    return super.eIsSet(featureID);
  }

  

Generated:
  public String toString()
  {
    if (eIsProxy()) return super.toString();
    StringBuffer result = new StringBuffer(super.toString());
    result.append(" (name: ");
    result.append();
    result.append(", jNode: ");
    result.append();
    result.append(')');
    return result.toString();
  }

  
EATM
  public boolean eNotificationRequired()
  {
    return true;
  }
  public void eNotify(Notification notification)
  {
    int eventType = notification.getEventType();
    Object feature = notification.getFeature();
    if (eClass().getEAllReferences().contains(feature))
    {
      EReference eReference = (EReference)feature;
      if (eReference.isContainment() && !eReference.isTransient())
      {
        Object oldValue = notification.getOldValue();
        Object newValue = notification.getNewValue();
        switch (eventType)
        {
          case .:
          {
            adoptContent(eReference, (JModelElement)newValue);
            break;
          }
          case .:
          {
            for (Object object : (Collection<?>)newValue)
            {
              JModelElement jModelElement = (JModelElement)object;
              adoptContent(eReferencejModelElement);
            }
            break;
          }
          case .:
          {
            if (oldValue != null)
            {
              orphanContent(eReference, (JModelElement)oldValue);
            }
            break;
          }
          case .:
          {
            for (Object object : (Collection<?>)oldValue)
            {
              JModelElement jModelElement = (JModelElement)object;
              orphanContent(eReferencejModelElement);
            }
            break;
          }
          case .:
          {
            moveContent(eReference, (JModelElement)newValue);
            break;
          }
          case .:
          case .:
          {
            if (oldValue != null)
            {
              orphanContent(eReference, (JModelElement)oldValue);
            }
            if (newValue != null)
            {
              adoptContent(eReference, (JModelElement)newValue);
            }
            break;
          }
        }
      }
      else
      {
        switch (eventType)
        {
          case .:
          case .:
          case .:
          case .:
          case .:
          case .:
          case .:
          {
            changeReference(notification);
            break;
          }
        }
      }
    }
    else if (eClass().getEAllAttributes().contains(feature))
    {
      switch (eventType)
      {
        case .:
        case .:
        case .:
        case .:
        case .:
        case .:
        case .:
        {
          changeAttribute(notification);
          break;
        }
      }
    }
    super.eNotify(notification);
  }
  protected void resolveIdentifiers()
  {
    // Ignore
  }
  protected void changeAttribute(Notification notification)
  {
    // Ignore
  }
  protected void changeReference(Notification notification)
  {
    // Ignore
  }
  protected void adoptContent(EReference eReferenceJModelElement jModelElement)
  {
    // Ignore
  }
  protected void orphanContent(EReference eReferenceJModelElement jModelElement)
  {
    // Ignore
  }
  public void moveContent(EReference eReferenceJModelElement jModelElement)
  {
    // Ignore
  }
  {
    if (eContainer() instanceof JModelElement)
    {
      String containerQualifiedName = ((JModelElement)).getQualifiedName();
      if (containerQualifiedName.length() > 0)
      {
        return containerQualifiedName + "." + getName();
      }
    }
    return getName();
  }
//JModelElementImpl
New to GrepCode? Check out our FAQ X