org.eclipse.emf.ecore.edit_2.7.1.v20120130-0943

16:43:31.599 INFO  jd.cli.Main - Decompiling org.eclipse.emf.ecore.edit_2.7.1.v20120130-0943.jar
package org.eclipse.emf.ecore.provider;

import org.eclipse.emf.common.notify.AdapterFactory;
import org.eclipse.emf.common.util.ResourceLocator;
import org.eclipse.emf.ecore.EStructuralFeature;
import org.eclipse.emf.edit.provider.ItemPropertyDescriptor;

class EAnnotationItemProvider$1
  extends ItemPropertyDescriptor
{
  EAnnotationItemProvider$1(EAnnotationItemProvider paramEAnnotationItemProvider, AdapterFactory $anonymous0, ResourceLocator $anonymous1, String $anonymous2, String $anonymous3, EStructuralFeature $anonymous4, boolean $anonymous5, Object $anonymous6, String $anonymous7, String[] $anonymous8)
  {
    super($anonymous0, $anonymous1, $anonymous2, $anonymous3, $anonymous4, $anonymous5, $anonymous6, $anonymous7, $anonymous8);
  }
  
  public void setPropertyValue(Object object, Object value)
  {
    super.setPropertyValue(object, this$0.stripToNull((String)value));
  }
}

/* Location:
 * Qualified Name:     org.eclipse.emf.ecore.provider.EAnnotationItemProvider.1
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.emf.ecore.provider;

import java.util.Collection;
import java.util.List;
import org.eclipse.emf.common.notify.AdapterFactory;
import org.eclipse.emf.common.notify.Notification;
import org.eclipse.emf.common.util.ResourceLocator;
import org.eclipse.emf.ecore.EAnnotation;
import org.eclipse.emf.ecore.EStructuralFeature;
import org.eclipse.emf.ecore.EcoreFactory;
import org.eclipse.emf.ecore.EcorePackage.Literals;
import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
import org.eclipse.emf.edit.provider.IItemLabelProvider;
import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
import org.eclipse.emf.edit.provider.IItemPropertySource;
import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
import org.eclipse.emf.edit.provider.ItemPropertyDescriptor;
import org.eclipse.emf.edit.provider.ViewerNotification;

public class EAnnotationItemProvider
  extends EModelElementItemProvider
  implements IEditingDomainItemProvider, IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource
{
  public EAnnotationItemProvider(AdapterFactory adapterFactory)
  {
    super(adapterFactory);
  }
  
  public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object)
  {
    if (itemPropertyDescriptors == null)
    {
      super.getPropertyDescriptors(object);
      
      addSourcePropertyDescriptor(object);
      addReferencesPropertyDescriptor(object);
    }
    return itemPropertyDescriptors;
  }
  
  protected void addSourcePropertyDescriptor(Object object)
  {
    itemPropertyDescriptors.add(
      new ItemPropertyDescriptor(
      ((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), 
      getResourceLocator(), 
      getString("_UI_EAnnotation_source_feature"), 
      getString("_UI_EAnnotation_source_description"), 
      EcorePackage.Literals.EANNOTATION__SOURCE, 
      true, 
      ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, 
      null, 
      null)
      {
        public void setPropertyValue(Object object, Object value)
        {
          super.setPropertyValue(object, stripToNull((String)value));
        }
      });
  }
  
  protected void addReferencesPropertyDescriptor(Object object)
  {
    itemPropertyDescriptors.add(
      createItemPropertyDescriptor(
      ((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), 
      getResourceLocator(), 
      getString("_UI_EAnnotation_references_feature"), 
      getString("_UI_EAnnotation_references_description"), 
      EcorePackage.Literals.EANNOTATION__REFERENCES, 
      true, 
      false, 
      true, 
      null, 
      null, 
      null));
  }
  
  public Collection<? extends EStructuralFeature> getChildrenFeatures(Object object)
  {
    if (childrenFeatures == null)
    {
      super.getChildrenFeatures(object);
      childrenFeatures.add(EcorePackage.Literals.EANNOTATION__DETAILS);
      childrenFeatures.add(EcorePackage.Literals.EANNOTATION__CONTENTS);
    }
    return childrenFeatures;
  }
  
  protected EStructuralFeature getChildFeature(Object object, Object child)
  {
    return super.getChildFeature(object, child);
  }
  
  public Object getImage(Object object)
  {
    return overlayImage(object, getResourceLocator().getImage("full/obj16/EAnnotation"));
  }
  
  public String getText(Object object)
  {
    EAnnotation eAnnotation = (EAnnotation)object;
    StringBuffer result = new StringBuffer();
    if (eAnnotation.getSource() != null)
    {
      int index = (getParent(eAnnotation) instanceof EAnnotation) ? -1 : eAnnotation.getSource().lastIndexOf("/");
      if (index == -1) {
        result.append(eAnnotation.getSource());
      } else {
        result.append(eAnnotation.getSource().substring(index + 1));
      }
    }
    return result.toString();
  }
  
  public void notifyChanged(Notification notification)
  {
    updateChildren(notification);
    switch (notification.getFeatureID(EAnnotation.class))
    {
    case 1: 
      fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
      return;
    case 2: 
    case 4: 
      fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false));
      return;
    }
    super.notifyChanged(notification);
  }
  
  protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object)
  {
    newChildDescriptors.add(
      createChildParameter(
      EcorePackage.Literals.EANNOTATION__DETAILS, 
      EcoreFactory.eINSTANCE.create(EcorePackage.Literals.ESTRING_TO_STRING_MAP_ENTRY)));
  }
}

/* Location:
 * Qualified Name:     org.eclipse.emf.ecore.provider.EAnnotationItemProvider
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.emf.ecore.provider;

import java.util.Collection;
import java.util.List;
import org.eclipse.emf.common.notify.AdapterFactory;
import org.eclipse.emf.common.notify.Notification;
import org.eclipse.emf.common.util.ResourceLocator;
import org.eclipse.emf.ecore.EAttribute;
import org.eclipse.emf.ecore.EcorePackage.Literals;
import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
import org.eclipse.emf.edit.provider.IItemLabelProvider;
import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
import org.eclipse.emf.edit.provider.IItemPropertySource;
import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
import org.eclipse.emf.edit.provider.ItemPropertyDescriptor;
import org.eclipse.emf.edit.provider.ViewerNotification;

public class EAttributeItemProvider
  extends EStructuralFeatureItemProvider
  implements IEditingDomainItemProvider, IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource
{
  public EAttributeItemProvider(AdapterFactory adapterFactory)
  {
    super(adapterFactory);
  }
  
  public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object)
  {
    if (itemPropertyDescriptors == null)
    {
      super.getPropertyDescriptors(object);
      
      addIDPropertyDescriptor(object);
      addEAttributeTypePropertyDescriptor(object);
    }
    return itemPropertyDescriptors;
  }
  
  protected void addIDPropertyDescriptor(Object object)
  {
    itemPropertyDescriptors.add(
      createItemPropertyDescriptor(
      ((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), 
      getResourceLocator(), 
      getString("_UI_EAttribute_iD_feature"), 
      getString("_UI_EAttribute_iD_description"), 
      EcorePackage.Literals.EATTRIBUTE__ID, 
      true, 
      false, 
      false, 
      ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE, 
      null, 
      null));
  }
  
  protected void addEAttributeTypePropertyDescriptor(Object object)
  {
    itemPropertyDescriptors.add(
      createItemPropertyDescriptor(
      ((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), 
      getResourceLocator(), 
      getString("_UI_EAttribute_eAttributeType_feature"), 
      getString("_UI_EAttribute_eAttributeType_description"), 
      EcorePackage.Literals.EATTRIBUTE__EATTRIBUTE_TYPE, 
      false, 
      false, 
      false, 
      null, 
      null, 
      null));
  }
  
  public Object getImage(Object object)
  {
    return overlayImage(object, getComposedImage(object, getResourceLocator().getImage("full/obj16/EAttribute")));
  }
  
  public String getText(Object object)
  {
    EAttribute eAttribute = (EAttribute)object;
    StringBuffer result = new StringBuffer();
    result.append(eAttribute.getName());
    if (eAttribute.getEGenericType() != null)
    {
      result.append(" : ");
      result.append(EGenericTypeItemProvider.getText(eAttribute.getEGenericType()));
    }
    return result.toString();
  }
  
  public void notifyChanged(Notification notification)
  {
    updateChildren(notification);
    switch (notification.getFeatureID(EAttribute.class))
    {
    case 18: 
    case 19: 
      fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
      return;
    }
    super.notifyChanged(notification);
  }
  
  protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object)
  {
    super.collectNewChildDescriptors(newChildDescriptors, object);
  }
}

/* Location:
 * Qualified Name:     org.eclipse.emf.ecore.provider.EAttributeItemProvider
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.emf.ecore.provider;

import java.util.ArrayList;
import java.util.Collection;
import java.util.Iterator;
import java.util.List;
import org.eclipse.emf.common.command.CommandStack;
import org.eclipse.emf.common.notify.AdapterFactory;
import org.eclipse.emf.common.util.EList;
import org.eclipse.emf.common.util.ResourceLocator;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.EGenericType;
import org.eclipse.emf.ecore.EPackage.Registry;
import org.eclipse.emf.ecore.EStructuralFeature;
import org.eclipse.emf.ecore.EcoreFactory;
import org.eclipse.emf.ecore.EcorePackage;
import org.eclipse.emf.ecore.EcorePackage.Literals;
import org.eclipse.emf.ecore.resource.Resource;
import org.eclipse.emf.ecore.resource.ResourceSet;
import org.eclipse.emf.edit.command.SetCommand;
import org.eclipse.emf.edit.domain.EditingDomain;

class EClassItemProvider$1
  extends EModelElementItemProvider.ItemPropertyDescriptorWithUniqueChoiceOfValueLabels
{
  EClassItemProvider$1(EClassItemProvider paramEClassItemProvider, AdapterFactory $anonymous0, ResourceLocator $anonymous1, String $anonymous2, String $anonymous3, EStructuralFeature $anonymous4, boolean $anonymous5, boolean $anonymous6, boolean $anonymous7, Object $anonymous8, String $anonymous9, String[] $anonymous10)
  {
    super($anonymous0, $anonymous1, $anonymous2, $anonymous3, $anonymous4, $anonymous5, $anonymous6, $anonymous7, $anonymous8, $anonymous9, $anonymous10);
  }
  
  public Collection<?> getChoiceOfValues(Object object)
  {
    EClass eClass = (EClass)object;
    
    Collection<?> result = super.getChoiceOfValues(object);
    if ((eClass.eResource() == null) || 
      (eClass.eResource().getResourceSet() == null) || 
      (!eClass.eResource().getResourceSet().getPackageRegistry().containsKey("http://www.eclipse.org/emf/2002/Ecore"))) {
      result.removeAll(EcorePackage.eINSTANCE.getEClassifiers());
    }
    for (Iterator<?> i = result.iterator(); i.hasNext();)
    {
      EClass otherEClass = (EClass)i.next();
      if ((otherEClass == eClass) || (otherEClass.getEAllSuperTypes().contains(eClass))) {
        i.remove();
      }
    }
    uniqueNameMap = computeUniqueLabels(object, result);
    
    return result;
  }
  
  public void setPropertyValue(Object object, Object value)
  {
    EditingDomain editingDomain = getEditingDomain(object);
    if (editingDomain == null)
    {
      super.setPropertyValue(object, value);
    }
    else
    {
      EClass eClass = (EClass)object;
      List<EGenericType> eGenericTypes = new ArrayList();
      
      List<EClass> list = (List)value;
      for (EClass eSuperType : list)
      {
        for (EGenericType eGenericSuperType : eClass.getEGenericSuperTypes()) {
          if (eGenericSuperType.getEClassifier() == eSuperType)
          {
            eGenericTypes.add(eGenericSuperType);
            break;
          }
        }
        EGenericType eGenericType = EcoreFactory.eINSTANCE.createEGenericType();
        eGenericType.setEClassifier(eSuperType);
        int i = 0;
        for (int size = eSuperType.getETypeParameters().size(); i < size; i++) {
          eGenericType.getETypeArguments().add(EcoreFactory.eINSTANCE.createEGenericType());
        }
        eGenericTypes.add(eGenericType);
      }
      editingDomain.getCommandStack().execute(
        SetCommand.create(editingDomain, object, EcorePackage.Literals.ECLASS__EGENERIC_SUPER_TYPES, eGenericTypes));
    }
  }
}

/* Location:
 * Qualified Name:     org.eclipse.emf.ecore.provider.EClassItemProvider.1
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.emf.ecore.provider;

import java.util.ArrayList;
import java.util.Collection;
import java.util.Iterator;
import java.util.List;
import org.eclipse.emf.common.command.CommandStack;
import org.eclipse.emf.common.notify.AdapterFactory;
import org.eclipse.emf.common.notify.Notification;
import org.eclipse.emf.common.util.EList;
import org.eclipse.emf.common.util.ResourceLocator;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.EGenericType;
import org.eclipse.emf.ecore.EPackage.Registry;
import org.eclipse.emf.ecore.EStructuralFeature;
import org.eclipse.emf.ecore.ETypeParameter;
import org.eclipse.emf.ecore.EcoreFactory;
import org.eclipse.emf.ecore.EcorePackage;
import org.eclipse.emf.ecore.EcorePackage.Literals;
import org.eclipse.emf.ecore.resource.Resource;
import org.eclipse.emf.ecore.resource.ResourceSet;
import org.eclipse.emf.edit.command.SetCommand;
import org.eclipse.emf.edit.domain.EditingDomain;
import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
import org.eclipse.emf.edit.provider.IItemLabelProvider;
import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
import org.eclipse.emf.edit.provider.IItemPropertySource;
import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
import org.eclipse.emf.edit.provider.ItemPropertyDescriptor;
import org.eclipse.emf.edit.provider.ViewerNotification;

public class EClassItemProvider
  extends EClassifierItemProvider
  implements IEditingDomainItemProvider, IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource
{
  public EClassItemProvider(AdapterFactory adapterFactory)
  {
    super(adapterFactory);
  }
  
  public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object)
  {
    if (itemPropertyDescriptors == null)
    {
      super.getPropertyDescriptors(object);
      
      addAbstractPropertyDescriptor(object);
      addInterfacePropertyDescriptor(object);
      addESuperTypesPropertyDescriptor(object);
    }
    return itemPropertyDescriptors;
  }
  
  protected void addAbstractPropertyDescriptor(Object object)
  {
    itemPropertyDescriptors.add(
      createItemPropertyDescriptor(
      ((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), 
      getResourceLocator(), 
      getString("_UI_EClass_abstract_feature"), 
      getString("_UI_EClass_abstract_description"), 
      EcorePackage.Literals.ECLASS__ABSTRACT, 
      true, 
      false, 
      false, 
      ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE, 
      null, 
      null));
  }
  
  protected void addInterfacePropertyDescriptor(Object object)
  {
    itemPropertyDescriptors.add(
      createItemPropertyDescriptor(
      ((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), 
      getResourceLocator(), 
      getString("_UI_EClass_interface_feature"), 
      getString("_UI_EClass_interface_description"), 
      EcorePackage.Literals.ECLASS__INTERFACE, 
      true, 
      false, 
      false, 
      ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE, 
      null, 
      null));
  }
  
  protected void addESuperTypesPropertyDescriptor(Object object)
  {
    itemPropertyDescriptors.add(
      new EModelElementItemProvider.ItemPropertyDescriptorWithUniqueChoiceOfValueLabels(
      ((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), 
      getResourceLocator(), 
      getString("_UI_EClass_eSuperTypes_feature"), 
      getString("_UI_EClass_eSuperTypes_description"), 
      EcorePackage.Literals.ECLASS__ESUPER_TYPES, 
      true, 
      false, 
      true, 
      null, 
      null, 
      null)
      {
        public Collection<?> getChoiceOfValues(Object object)
        {
          EClass eClass = (EClass)object;
          
          Collection<?> result = super.getChoiceOfValues(object);
          if ((eClass.eResource() == null) || 
            (eClass.eResource().getResourceSet() == null) || 
            (!eClass.eResource().getResourceSet().getPackageRegistry().containsKey("http://www.eclipse.org/emf/2002/Ecore"))) {
            result.removeAll(EcorePackage.eINSTANCE.getEClassifiers());
          }
          for (Iterator<?> i = result.iterator(); i.hasNext();)
          {
            EClass otherEClass = (EClass)i.next();
            if ((otherEClass == eClass) || (otherEClass.getEAllSuperTypes().contains(eClass))) {
              i.remove();
            }
          }
          uniqueNameMap = computeUniqueLabels(object, result);
          
          return result;
        }
        
        public void setPropertyValue(Object object, Object value)
        {
          EditingDomain editingDomain = getEditingDomain(object);
          if (editingDomain == null)
          {
            super.setPropertyValue(object, value);
          }
          else
          {
            EClass eClass = (EClass)object;
            List<EGenericType> eGenericTypes = new ArrayList();
            
            List<EClass> list = (List)value;
            for (EClass eSuperType : list)
            {
              for (EGenericType eGenericSuperType : eClass.getEGenericSuperTypes()) {
                if (eGenericSuperType.getEClassifier() == eSuperType)
                {
                  eGenericTypes.add(eGenericSuperType);
                  break;
                }
              }
              EGenericType eGenericType = EcoreFactory.eINSTANCE.createEGenericType();
              eGenericType.setEClassifier(eSuperType);
              int i = 0;
              for (int size = eSuperType.getETypeParameters().size(); i < size; i++) {
                eGenericType.getETypeArguments().add(EcoreFactory.eINSTANCE.createEGenericType());
              }
              eGenericTypes.add(eGenericType);
            }
            editingDomain.getCommandStack().execute(
              SetCommand.create(editingDomain, object, EcorePackage.Literals.ECLASS__EGENERIC_SUPER_TYPES, eGenericTypes));
          }
        }
      });
  }
  
  public Collection<? extends EStructuralFeature> getChildrenFeatures(Object object)
  {
    if (childrenFeatures == null)
    {
      super.getChildrenFeatures(object);
      childrenFeatures.add(EcorePackage.Literals.ECLASS__EOPERATIONS);
      childrenFeatures.add(EcorePackage.Literals.ECLASS__ESTRUCTURAL_FEATURES);
      childrenFeatures.add(2, EcorePackage.Literals.ECLASS__EGENERIC_SUPER_TYPES);
    }
    return childrenFeatures;
  }
  
  protected EStructuralFeature getChildFeature(Object object, Object child)
  {
    return super.getChildFeature(object, child);
  }
  
  public String getCreateChildText(Object owner, Object feature, Object child, Collection<?> selection)
  {
    return 
      feature == EcorePackage.Literals.ECLASS__EGENERIC_SUPER_TYPES ? 
      getString("_UI_EGenericSuperType_label") : 
      super.getCreateChildText(owner, feature, child, selection);
  }
  
  public Object getImage(Object object)
  {
    return overlayImage(object, getResourceLocator().getImage("full/obj16/EClass"));
  }
  
  public String getText(Object object)
  {
    EClass eClass = (EClass)object;
    StringBuffer result = new StringBuffer();
    if (eClass.getName() != null) {
      result.append(eClass.getName());
    }
    if (!eClass.getETypeParameters().isEmpty())
    {
      result.append("<");
      for (Iterator<ETypeParameter> i = eClass.getETypeParameters().iterator(); i.hasNext();)
      {
        ETypeParameter eTypeParameter = (ETypeParameter)i.next();
        result.append(ETypeParameterItemProvider.getText(eTypeParameter));
        if (i.hasNext()) {
          result.append(", ");
        }
      }
      result.append(">");
    }
    if (!eClass.getEGenericSuperTypes().isEmpty())
    {
      result.append(" -> ");
      for (Iterator<EGenericType> i = eClass.getEGenericSuperTypes().iterator(); i.hasNext();)
      {
        EGenericType eGenericSuperType = (EGenericType)i.next();
        result.append(EGenericTypeItemProvider.getText(eGenericSuperType));
        if (i.hasNext()) {
          result.append(", ");
        }
      }
    }
    if (eClass.getInstanceTypeName() != null)
    {
      result.append(" [");
      result.append(eClass.getInstanceTypeName());
      result.append("]");
    }
    return result.toString();
  }
  
  public void notifyChanged(Notification notification)
  {
    updateChildren(notification);
    switch (notification.getFeatureID(EClass.class))
    {
    case 8: 
    case 9: 
    case 10: 
    case 14: 
    case 15: 
      fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
      return;
    case 11: 
    case 21: 
    case 22: 
      fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false));
      return;
    }
    super.notifyChanged(notification);
  }
  
  protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object)
  {
    super.collectNewChildDescriptors(newChildDescriptors, object);
    
    newChildDescriptors.add(
      createChildParameter(
      EcorePackage.Literals.ECLASS__EOPERATIONS, 
      EcoreFactory.eINSTANCE.createEOperation()));
    
    newChildDescriptors.add(
      createChildParameter(
      EcorePackage.Literals.ECLASS__ESTRUCTURAL_FEATURES, 
      EcoreFactory.eINSTANCE.createEAttribute()));
    
    newChildDescriptors.add(
      createChildParameter(
      EcorePackage.Literals.ECLASS__ESTRUCTURAL_FEATURES, 
      EcoreFactory.eINSTANCE.createEReference()));
    
    newChildDescriptors.add(
      createChildParameter(
      EcorePackage.Literals.ECLASS__EGENERIC_SUPER_TYPES, 
      EcoreFactory.eINSTANCE.createEGenericType()));
  }
}

/* Location:
 * Qualified Name:     org.eclipse.emf.ecore.provider.EClassItemProvider
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.emf.ecore.provider;

import org.eclipse.emf.common.command.CommandStack;
import org.eclipse.emf.common.notify.AdapterFactory;
import org.eclipse.emf.common.util.ResourceLocator;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.EStructuralFeature;
import org.eclipse.emf.ecore.EcorePackage.Literals;
import org.eclipse.emf.edit.command.SetCommand;
import org.eclipse.emf.edit.domain.EditingDomain;
import org.eclipse.emf.edit.provider.ItemPropertyDescriptor;

class EClassifierItemProvider$1
  extends ItemPropertyDescriptor
{
  EClassifierItemProvider$1(EClassifierItemProvider paramEClassifierItemProvider, AdapterFactory $anonymous0, ResourceLocator $anonymous1, String $anonymous2, String $anonymous3, EStructuralFeature $anonymous4, boolean $anonymous5, Object $anonymous6, String $anonymous7, String[] $anonymous8)
  {
    super($anonymous0, $anonymous1, $anonymous2, $anonymous3, $anonymous4, $anonymous5, $anonymous6, $anonymous7, $anonymous8);
  }
  
  public void setPropertyValue(Object object, Object value)
  {
    EObject eObject = (EObject)object;
    EditingDomain editingDomain = getEditingDomain(object);
    value = this$0.normalizeInstanceTypeName(this$0.stripToNull((String)value));
    if (editingDomain == null) {
      eObject.eSet(EcorePackage.Literals.ECLASSIFIER__INSTANCE_CLASS_NAME, value);
    } else {
      editingDomain.getCommandStack().execute(
        SetCommand.create(editingDomain, getCommandOwner(eObject), EcorePackage.Literals.ECLASSIFIER__INSTANCE_TYPE_NAME, value));
    }
  }
}

/* Location:
 * Qualified Name:     org.eclipse.emf.ecore.provider.EClassifierItemProvider.1
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.emf.ecore.provider;

import org.eclipse.emf.common.notify.AdapterFactory;
import org.eclipse.emf.common.util.ResourceLocator;
import org.eclipse.emf.ecore.EStructuralFeature;
import org.eclipse.emf.edit.provider.ItemPropertyDescriptor;

class EClassifierItemProvider$2
  extends ItemPropertyDescriptor
{
  EClassifierItemProvider$2(EClassifierItemProvider paramEClassifierItemProvider, AdapterFactory $anonymous0, ResourceLocator $anonymous1, String $anonymous2, String $anonymous3, EStructuralFeature $anonymous4, boolean $anonymous5, boolean $anonymous6, boolean $anonymous7, Object $anonymous8, String $anonymous9, String[] $anonymous10)
  {
    super($anonymous0, $anonymous1, $anonymous2, $anonymous3, $anonymous4, $anonymous5, $anonymous6, $anonymous7, $anonymous8, $anonymous9, $anonymous10);
  }
  
  public void setPropertyValue(Object object, Object value)
  {
    super.setPropertyValue(object, this$0.normalizeInstanceTypeName(this$0.stripToNull((String)value)));
  }
}

/* Location:
 * Qualified Name:     org.eclipse.emf.ecore.provider.EClassifierItemProvider.2
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.emf.ecore.provider;

import java.util.Collection;
import java.util.List;
import org.eclipse.emf.common.command.CommandStack;
import org.eclipse.emf.common.notify.AdapterFactory;
import org.eclipse.emf.common.notify.Notification;
import org.eclipse.emf.common.util.Diagnostic;
import org.eclipse.emf.common.util.ResourceLocator;
import org.eclipse.emf.ecore.EClassifier;
import org.eclipse.emf.ecore.EEnum;
import org.eclipse.emf.ecore.EGenericType;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.EStructuralFeature;
import org.eclipse.emf.ecore.EcoreFactory;
import org.eclipse.emf.ecore.EcorePackage.Literals;
import org.eclipse.emf.ecore.util.EcoreUtil;
import org.eclipse.emf.ecore.util.EcoreValidator.EGenericTypeBuilder;
import org.eclipse.emf.edit.command.SetCommand;
import org.eclipse.emf.edit.domain.EditingDomain;
import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
import org.eclipse.emf.edit.provider.IItemLabelProvider;
import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
import org.eclipse.emf.edit.provider.IItemPropertySource;
import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
import org.eclipse.emf.edit.provider.ItemPropertyDescriptor;
import org.eclipse.emf.edit.provider.ViewerNotification;

public class EClassifierItemProvider
  extends ENamedElementItemProvider
  implements IEditingDomainItemProvider, IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource
{
  public EClassifierItemProvider(AdapterFactory adapterFactory)
  {
    super(adapterFactory);
  }
  
  public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object)
  {
    if (itemPropertyDescriptors == null)
    {
      super.getPropertyDescriptors(object);
      
      addInstanceClassNamePropertyDescriptor(object);
      addDefaultValuePropertyDescriptor(object);
      addInstanceTypeNamePropertyDescriptor(object);
    }
    return itemPropertyDescriptors;
  }
  
  protected void addInstanceClassNamePropertyDescriptor(Object object)
  {
    itemPropertyDescriptors.add(
      new ItemPropertyDescriptor(
      ((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), 
      getResourceLocator(), 
      getString("_UI_EClassifier_instanceClassName_feature"), 
      getString("_UI_EClassifier_instanceClassName_description"), 
      EcorePackage.Literals.ECLASSIFIER__INSTANCE_CLASS_NAME, 
      true, 
      ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, 
      null, 
      
      new String[] {
      "org.eclipse.ui.views.properties.expert" })
      {
        public void setPropertyValue(Object object, Object value)
        {
          EObject eObject = (EObject)object;
          EditingDomain editingDomain = getEditingDomain(object);
          value = normalizeInstanceTypeName(stripToNull((String)value));
          if (editingDomain == null) {
            eObject.eSet(EcorePackage.Literals.ECLASSIFIER__INSTANCE_CLASS_NAME, value);
          } else {
            editingDomain.getCommandStack().execute(
              SetCommand.create(editingDomain, getCommandOwner(eObject), EcorePackage.Literals.ECLASSIFIER__INSTANCE_TYPE_NAME, value));
          }
        }
      });
  }
  
  protected String normalizeInstanceTypeName(String value)
  {
    if (value != null)
    {
      Diagnostic diagnostic = EcoreValidator.EGenericTypeBuilder.INSTANCE.parseInstanceTypeName(value);
      if (diagnostic.getSeverity() == 0) {
        value = EcoreUtil.toJavaInstanceTypeName((EGenericType)diagnostic.getData().get(0));
      }
    }
    return value;
  }
  
  protected void addDefaultValuePropertyDescriptor(Object object)
  {
    itemPropertyDescriptors.add(
      createItemPropertyDescriptor(
      ((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), 
      getResourceLocator(), 
      getString("_UI_EClassifier_defaultValue_feature"), 
      getString("_UI_EClassifier_defaultValue_description"), 
      EcorePackage.Literals.ECLASSIFIER__DEFAULT_VALUE, 
      false, 
      false, 
      false, 
      ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, 
      null, 
      null));
  }
  
  protected void addInstanceTypeNamePropertyDescriptor(Object object)
  {
    itemPropertyDescriptors.add(
      new ItemPropertyDescriptor(
      ((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), 
      getResourceLocator(), 
      getString("_UI_EClassifier_instanceTypeName_feature"), 
      getString("_UI_EClassifier_instanceTypeName_description"), 
      EcorePackage.Literals.ECLASSIFIER__INSTANCE_TYPE_NAME, 
      true, 
      false, 
      false, 
      ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, 
      null, 
      null)
      {
        public void setPropertyValue(Object object, Object value)
        {
          super.setPropertyValue(object, normalizeInstanceTypeName(stripToNull((String)value)));
        }
      });
  }
  
  public Collection<? extends EStructuralFeature> getChildrenFeatures(Object object)
  {
    if (childrenFeatures == null)
    {
      super.getChildrenFeatures(object);
      childrenFeatures.add(EcorePackage.Literals.ECLASSIFIER__ETYPE_PARAMETERS);
    }
    return childrenFeatures;
  }
  
  protected EStructuralFeature getChildFeature(Object object, Object child)
  {
    return super.getChildFeature(object, child);
  }
  
  public String getText(Object object)
  {
    String label = ((EClassifier)object).getName();
    return 
    
      getString("_UI_EClassifier_type") + " " + label;
  }
  
  public void notifyChanged(Notification notification)
  {
    updateChildren(notification);
    switch (notification.getFeatureID(EClassifier.class))
    {
    case 2: 
    case 4: 
    case 5: 
      fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
      return;
    case 7: 
      fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false));
      return;
    }
    super.notifyChanged(notification);
  }
  
  protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object)
  {
    super.collectNewChildDescriptors(newChildDescriptors, object);
    
    EClassifier eClassifier = (EClassifier)object;
    if ((!(object instanceof EEnum)) && 
      (eClassifier.getInstanceClassName() == eClassifier.getInstanceTypeName()) && 
      (!"org.eclipse.emf.common.util.Enumerator".equals(eClassifier.getInstanceClassName()))) {
      newChildDescriptors.add(
        createChildParameter(
        EcorePackage.Literals.ECLASSIFIER__ETYPE_PARAMETERS, 
        EcoreFactory.eINSTANCE.createETypeParameter()));
    }
  }
}

/* Location:
 * Qualified Name:     org.eclipse.emf.ecore.provider.EClassifierItemProvider
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.emf.ecore.provider;

import java.util.Collection;
import java.util.Iterator;
import java.util.List;
import org.eclipse.emf.common.notify.AdapterFactory;
import org.eclipse.emf.common.notify.Notification;
import org.eclipse.emf.common.util.EList;
import org.eclipse.emf.common.util.ResourceLocator;
import org.eclipse.emf.ecore.EDataType;
import org.eclipse.emf.ecore.ETypeParameter;
import org.eclipse.emf.ecore.EcorePackage.Literals;
import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
import org.eclipse.emf.edit.provider.IItemLabelProvider;
import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
import org.eclipse.emf.edit.provider.IItemPropertySource;
import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
import org.eclipse.emf.edit.provider.ItemPropertyDescriptor;
import org.eclipse.emf.edit.provider.ViewerNotification;

public class EDataTypeItemProvider
  extends EClassifierItemProvider
  implements IEditingDomainItemProvider, IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource
{
  public EDataTypeItemProvider(AdapterFactory adapterFactory)
  {
    super(adapterFactory);
  }
  
  public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object)
  {
    if (itemPropertyDescriptors == null)
    {
      super.getPropertyDescriptors(object);
      
      addSerializablePropertyDescriptor(object);
    }
    return itemPropertyDescriptors;
  }
  
  protected void addSerializablePropertyDescriptor(Object object)
  {
    itemPropertyDescriptors.add(
      createItemPropertyDescriptor(
      ((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), 
      getResourceLocator(), 
      getString("_UI_EDataType_serializable_feature"), 
      getString("_UI_EDataType_serializable_description"), 
      EcorePackage.Literals.EDATA_TYPE__SERIALIZABLE, 
      true, 
      false, 
      false, 
      ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE, 
      null, 
      null));
  }
  
  public Object getImage(Object object)
  {
    return overlayImage(object, getResourceLocator().getImage("full/obj16/EDataType"));
  }
  
  public String getText(Object object)
  {
    EDataType eDataType = (EDataType)object;
    StringBuffer result = new StringBuffer();
    result.append(eDataType.getName());
    if (!eDataType.getETypeParameters().isEmpty())
    {
      result.append("<");
      for (Iterator<ETypeParameter> i = eDataType.getETypeParameters().iterator(); i.hasNext();)
      {
        ETypeParameter eTypeParameter = (ETypeParameter)i.next();
        result.append(ETypeParameterItemProvider.getText(eTypeParameter));
        if (i.hasNext()) {
          result.append(", ");
        }
      }
      result.append(">");
    }
    result.append(" [");
    result.append(eDataType.getInstanceTypeName());
    result.append("]");
    return result.toString();
  }
  
  public void notifyChanged(Notification notification)
  {
    updateChildren(notification);
    switch (notification.getFeatureID(EDataType.class))
    {
    case 8: 
      fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
      return;
    }
    super.notifyChanged(notification);
  }
  
  protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object)
  {
    super.collectNewChildDescriptors(newChildDescriptors, object);
  }
}

/* Location:
 * Qualified Name:     org.eclipse.emf.ecore.provider.EDataTypeItemProvider
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.emf.ecore.provider;

import java.util.Collection;
import java.util.List;
import org.eclipse.emf.common.notify.AdapterFactory;
import org.eclipse.emf.common.notify.Notification;
import org.eclipse.emf.common.util.ResourceLocator;
import org.eclipse.emf.ecore.EEnum;
import org.eclipse.emf.ecore.EStructuralFeature;
import org.eclipse.emf.ecore.EcoreFactory;
import org.eclipse.emf.ecore.EcorePackage.Literals;
import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
import org.eclipse.emf.edit.provider.IItemLabelProvider;
import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
import org.eclipse.emf.edit.provider.IItemPropertySource;
import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
import org.eclipse.emf.edit.provider.ViewerNotification;

public class EEnumItemProvider
  extends EDataTypeItemProvider
  implements IEditingDomainItemProvider, IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource
{
  public EEnumItemProvider(AdapterFactory adapterFactory)
  {
    super(adapterFactory);
  }
  
  public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object)
  {
    if (itemPropertyDescriptors == null) {
      super.getPropertyDescriptors(object);
    }
    return itemPropertyDescriptors;
  }
  
  public Collection<? extends EStructuralFeature> getChildrenFeatures(Object object)
  {
    if (childrenFeatures == null)
    {
      super.getChildrenFeatures(object);
      childrenFeatures.add(EcorePackage.Literals.EENUM__ELITERALS);
    }
    return childrenFeatures;
  }
  
  protected EStructuralFeature getChildFeature(Object object, Object child)
  {
    return super.getChildFeature(object, child);
  }
  
  public Object getImage(Object object)
  {
    return overlayImage(object, getResourceLocator().getImage("full/obj16/EEnum"));
  }
  
  public String getText(Object object)
  {
    EEnum eEnum = (EEnum)object;
    StringBuffer result = new StringBuffer();
    result.append(eEnum.getName());
    return result.toString();
  }
  
  public void notifyChanged(Notification notification)
  {
    updateChildren(notification);
    switch (notification.getFeatureID(EEnum.class))
    {
    case 9: 
      fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false));
      return;
    }
    super.notifyChanged(notification);
  }
  
  protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object)
  {
    super.collectNewChildDescriptors(newChildDescriptors, object);
    
    newChildDescriptors.add(
      createChildParameter(
      EcorePackage.Literals.EENUM__ELITERALS, 
      EcoreFactory.eINSTANCE.createEEnumLiteral()));
  }
}

/* Location:
 * Qualified Name:     org.eclipse.emf.ecore.provider.EEnumItemProvider
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.emf.ecore.provider;

import java.util.Collection;
import java.util.List;
import org.eclipse.emf.common.notify.AdapterFactory;
i
1 2 3 4 5

Further reading...

For more information on Java 1.5 Tiger, you may find Java 1.5 Tiger, A developer's Notebook by D. Flanagan and B. McLaughlin from O'Reilly of interest.

New!JAR listings


Copyright 2006-2017. Infinite Loop Ltd