/** * Find the image (SWT) in registry Store image in registry if it is not found * * @param umlImage to retrieve as SWT Image in registry * @return the stored SWT image */ public static Image getImageInRegistry( org.eclipse.uml2.uml.Image umlImage, VisibilityKind visibility) { // Retrieve registry ImageRegistry papyrusRegistry = getDefault().getImageRegistry(); // Get image id for registry String image_id = ImageUtil.getImageId(umlImage); if (visibility != null) { image_id = image_id + "_" + visibility.getLiteral(); } // Get SWT image for shape in the registry Image image = papyrusRegistry.get(image_id); // If image was not found in registry, // try to find an image and to update registry if (image == null) { try { // Try to retrieve image from UML Image content property image = ImageUtil.getContent(umlImage); } catch (Exception e) { // Activator.log.error(e); } // If no image was found in Content // Try to retrieve image from UML Image location property if (image == null) { image = ImageUtil.getImageFromLocation(umlImage); } // Add visibility decorator if (visibility != null) { getDefault(); ImageDescriptor visDesc = Activator.getImageDescriptor( UML_VIS_ICONS_16x16 + "VisibilityKind_" + visibility.getLiteral() + ".gif"); // Overlay custom image over base image OverlayVisibilityIcon overlayIcon = new OverlayVisibilityIcon(image, visDesc); image = overlayIcon.getImage(); } if (image != null) { // Store image in registry ImageData imdata = image.getImageData(); papyrusRegistry.put(image_id, ImageDescriptor.createFromImageData(imdata)); image = papyrusRegistry.get(image_id); } } return image; }
public void DealNamedElement(org.eclipse.uml2.uml.NamedElement ne1, RefOntoUML.NamedElement ne2) { System.out.println(ne1.getName()); // name ne2.setName(ne1.getName()); // visibility org.eclipse.uml2.uml.VisibilityKind vk1 = ne1.getVisibility(); if (vk1.getValue() == org.eclipse.uml2.uml.VisibilityKind.PUBLIC) { ne2.setVisibility(RefOntoUML.VisibilityKind.PUBLIC); } else if (vk1.getValue() == org.eclipse.uml2.uml.VisibilityKind.PRIVATE) { ne2.setVisibility(RefOntoUML.VisibilityKind.PRIVATE); } else if (vk1.getValue() == org.eclipse.uml2.uml.VisibilityKind.PROTECTED) { ne2.setVisibility(RefOntoUML.VisibilityKind.PROTECTED); } else if (vk1.getValue() == org.eclipse.uml2.uml.VisibilityKind.PACKAGE) { ne2.setVisibility(RefOntoUML.VisibilityKind.PACKAGE); } }
/** * * <!-- begin-user-doc --> * <!-- end-user-doc --> * * @generated */ public void setVisibility(VisibilityKind newVisibility) { VisibilityKind oldVisibility = VISIBILITY_EFLAG_VALUES[(eFlags & VISIBILITY_EFLAG) >>> VISIBILITY_EFLAG_OFFSET]; if (newVisibility == null) newVisibility = VISIBILITY_EDEFAULT; eFlags = eFlags & ~VISIBILITY_EFLAG | newVisibility.ordinal() << VISIBILITY_EFLAG_OFFSET; if (eNotificationRequired()) eNotify( new ENotificationImpl( this, Notification.SET, UMLPackage.PACKAGE_IMPORT__VISIBILITY, oldVisibility, newVisibility)); }
/** * * <!-- begin-user-doc --> * An implementation of the model object '<em><b>Package Import</b></em>'. * <!-- end-user-doc --> * * <p>The following features are implemented: * * <ul> * <li>{@link org.eclipse.uml2.uml.internal.impl.PackageImportImpl#getTargets <em>Target</em>} * <li>{@link org.eclipse.uml2.uml.internal.impl.PackageImportImpl#getSources <em>Source</em>} * <li>{@link org.eclipse.uml2.uml.internal.impl.PackageImportImpl#getOwner <em>Owner</em>} * <li>{@link org.eclipse.uml2.uml.internal.impl.PackageImportImpl#getImportedPackage <em>Imported * Package</em>} * <li>{@link org.eclipse.uml2.uml.internal.impl.PackageImportImpl#getImportingNamespace * <em>Importing Namespace</em>} * <li>{@link org.eclipse.uml2.uml.internal.impl.PackageImportImpl#getVisibility * <em>Visibility</em>} * </ul> * * @generated */ public class PackageImportImpl extends DirectedRelationshipImpl implements PackageImport { /** * The cached value of the '{@link #getImportedPackage() <em>Imported Package</em>}' reference. * <!-- begin-user-doc --> * <!-- end-user-doc --> * * @see #getImportedPackage() * @generated * @ordered */ protected org.eclipse.uml2.uml.Package importedPackage; /** * The default value of the '{@link #getVisibility() <em>Visibility</em>}' attribute. * <!-- begin-user-doc --> * <!-- end-user-doc --> * * @see #getVisibility() * @generated * @ordered */ protected static final VisibilityKind VISIBILITY_EDEFAULT = VisibilityKind.PUBLIC_LITERAL; /** * The offset of the flags representing the value of the '{@link #getVisibility() * <em>Visibility</em>}' attribute. * <!-- begin-user-doc --> * <!-- end-user-doc --> * * @generated * @ordered */ protected static final int VISIBILITY_EFLAG_OFFSET = 8; /** * The flags representing the default value of the '{@link #getVisibility() <em>Visibility</em>}' * attribute. * <!-- begin-user-doc --> * <!-- end-user-doc --> * * @generated * @ordered */ protected static final int VISIBILITY_EFLAG_DEFAULT = VISIBILITY_EDEFAULT.ordinal() << VISIBILITY_EFLAG_OFFSET; /** * The array of enumeration values for '{@link VisibilityKind Visibility Kind}' * <!-- begin-user-doc --> * <!-- end-user-doc --> * * @generated * @ordered */ private static final VisibilityKind[] VISIBILITY_EFLAG_VALUES = VisibilityKind.values(); /** * The flags representing the value of the '{@link #getVisibility() <em>Visibility</em>}' * attribute. * <!-- begin-user-doc --> * <!-- end-user-doc --> * * @see #getVisibility() * @generated * @ordered */ protected static final int VISIBILITY_EFLAG = 0x3 << VISIBILITY_EFLAG_OFFSET; /** * * <!-- begin-user-doc --> * <!-- end-user-doc --> * * @generated */ protected PackageImportImpl() { super(); } /** * * <!-- begin-user-doc --> * <!-- end-user-doc --> * * @generated */ @Override protected EClass eStaticClass() { return UMLPackage.Literals.PACKAGE_IMPORT; } /** * * <!-- begin-user-doc --> * <!-- end-user-doc --> * * @generated */ @Override public EList<Element> getTargets() { CacheAdapter cache = getCacheAdapter(); if (cache != null) { Resource eResource = eResource(); @SuppressWarnings("unchecked") EList<Element> targets = (EList<Element>) cache.get(eResource, this, UMLPackage.Literals.DIRECTED_RELATIONSHIP__TARGET); if (targets == null) { cache.put( eResource, this, UMLPackage.Literals.DIRECTED_RELATIONSHIP__TARGET, targets = new DerivedUnionEObjectEList<Element>( Element.class, this, UMLPackage.PACKAGE_IMPORT__TARGET, TARGET_ESUBSETS)); } return targets; } return new DerivedUnionEObjectEList<Element>( Element.class, this, UMLPackage.PACKAGE_IMPORT__TARGET, TARGET_ESUBSETS); } /** * * <!-- begin-user-doc --> * <!-- end-user-doc --> * * @generated */ @Override public EList<Element> getSources() { CacheAdapter cache = getCacheAdapter(); if (cache != null) { Resource eResource = eResource(); @SuppressWarnings("unchecked") EList<Element> sources = (EList<Element>) cache.get(eResource, this, UMLPackage.Literals.DIRECTED_RELATIONSHIP__SOURCE); if (sources == null) { cache.put( eResource, this, UMLPackage.Literals.DIRECTED_RELATIONSHIP__SOURCE, sources = new DerivedUnionEObjectEList<Element>( Element.class, this, UMLPackage.PACKAGE_IMPORT__SOURCE, SOURCE_ESUBSETS)); } return sources; } return new DerivedUnionEObjectEList<Element>( Element.class, this, UMLPackage.PACKAGE_IMPORT__SOURCE, SOURCE_ESUBSETS); } /** * * <!-- begin-user-doc --> * <!-- end-user-doc --> * * @generated */ public VisibilityKind getVisibility() { return VISIBILITY_EFLAG_VALUES[(eFlags & VISIBILITY_EFLAG) >>> VISIBILITY_EFLAG_OFFSET]; } /** * * <!-- begin-user-doc --> * <!-- end-user-doc --> * * @generated */ public void setVisibility(VisibilityKind newVisibility) { VisibilityKind oldVisibility = VISIBILITY_EFLAG_VALUES[(eFlags & VISIBILITY_EFLAG) >>> VISIBILITY_EFLAG_OFFSET]; if (newVisibility == null) newVisibility = VISIBILITY_EDEFAULT; eFlags = eFlags & ~VISIBILITY_EFLAG | newVisibility.ordinal() << VISIBILITY_EFLAG_OFFSET; if (eNotificationRequired()) eNotify( new ENotificationImpl( this, Notification.SET, UMLPackage.PACKAGE_IMPORT__VISIBILITY, oldVisibility, newVisibility)); } /** * * <!-- begin-user-doc --> * <!-- end-user-doc --> * * @generated */ public org.eclipse.uml2.uml.Package getImportedPackage() { if (importedPackage != null && importedPackage.eIsProxy()) { InternalEObject oldImportedPackage = (InternalEObject) importedPackage; importedPackage = (org.eclipse.uml2.uml.Package) eResolveProxy(oldImportedPackage); if (importedPackage != oldImportedPackage) { if (eNotificationRequired()) eNotify( new ENotificationImpl( this, Notification.RESOLVE, UMLPackage.PACKAGE_IMPORT__IMPORTED_PACKAGE, oldImportedPackage, importedPackage)); } } return importedPackage; } /** * * <!-- begin-user-doc --> * <!-- end-user-doc --> * * @generated */ public org.eclipse.uml2.uml.Package basicGetImportedPackage() { return importedPackage; } /** * * <!-- begin-user-doc --> * <!-- end-user-doc --> * * @generated */ public void setImportedPackage(org.eclipse.uml2.uml.Package newImportedPackage) { org.eclipse.uml2.uml.Package oldImportedPackage = importedPackage; importedPackage = newImportedPackage; if (eNotificationRequired()) eNotify( new ENotificationImpl( this, Notification.SET, UMLPackage.PACKAGE_IMPORT__IMPORTED_PACKAGE, oldImportedPackage, importedPackage)); } /** * * <!-- begin-user-doc --> * <!-- end-user-doc --> * * @generated */ public Namespace getImportingNamespace() { if (eContainerFeatureID() != UMLPackage.PACKAGE_IMPORT__IMPORTING_NAMESPACE) return null; return (Namespace) eContainer(); } /** * * <!-- begin-user-doc --> * <!-- end-user-doc --> * * @generated */ public Namespace basicGetImportingNamespace() { if (eContainerFeatureID() != UMLPackage.PACKAGE_IMPORT__IMPORTING_NAMESPACE) return null; return (Namespace) eInternalContainer(); } /** * * <!-- begin-user-doc --> * <!-- end-user-doc --> * * @generated */ public NotificationChain basicSetImportingNamespace( Namespace newImportingNamespace, NotificationChain msgs) { msgs = eBasicSetContainer( (InternalEObject) newImportingNamespace, UMLPackage.PACKAGE_IMPORT__IMPORTING_NAMESPACE, msgs); return msgs; } /** * * <!-- begin-user-doc --> * <!-- end-user-doc --> * * @generated */ public void setImportingNamespace(Namespace newImportingNamespace) { if (newImportingNamespace != eInternalContainer() || (eContainerFeatureID() != UMLPackage.PACKAGE_IMPORT__IMPORTING_NAMESPACE && newImportingNamespace != null)) { if (EcoreUtil.isAncestor(this, newImportingNamespace)) throw new IllegalArgumentException( "Recursive containment not allowed for " + toString()); // $NON-NLS-1$ NotificationChain msgs = null; if (eInternalContainer() != null) msgs = eBasicRemoveFromContainer(msgs); if (newImportingNamespace != null) msgs = ((InternalEObject) newImportingNamespace) .eInverseAdd(this, UMLPackage.NAMESPACE__PACKAGE_IMPORT, Namespace.class, msgs); msgs = basicSetImportingNamespace(newImportingNamespace, msgs); if (msgs != null) msgs.dispatch(); } else if (eNotificationRequired()) eNotify( new ENotificationImpl( this, Notification.SET, UMLPackage.PACKAGE_IMPORT__IMPORTING_NAMESPACE, newImportingNamespace, newImportingNamespace)); } /** * * <!-- begin-user-doc --> * <!-- end-user-doc --> * * @generated */ public boolean validatePublicOrPrivate(DiagnosticChain diagnostics, Map<Object, Object> context) { return PackageImportOperations.validatePublicOrPrivate(this, diagnostics, context); } /** * * <!-- begin-user-doc --> * <!-- end-user-doc --> * * @generated */ @SuppressWarnings("unchecked") @Override public NotificationChain eInverseAdd( InternalEObject otherEnd, int featureID, NotificationChain msgs) { switch (featureID) { case UMLPackage.PACKAGE_IMPORT__EANNOTATIONS: return ((InternalEList<InternalEObject>) (InternalEList<?>) getEAnnotations()) .basicAdd(otherEnd, msgs); case UMLPackage.PACKAGE_IMPORT__IMPORTING_NAMESPACE: if (eInternalContainer() != null) msgs = eBasicRemoveFromContainer(msgs); return basicSetImportingNamespace((Namespace) otherEnd, msgs); } return eDynamicInverseAdd(otherEnd, featureID, msgs); } /** * * <!-- begin-user-doc --> * <!-- end-user-doc --> * * @generated */ @Override public NotificationChain eInverseRemove( InternalEObject otherEnd, int featureID, NotificationChain msgs) { switch (featureID) { case UMLPackage.PACKAGE_IMPORT__EANNOTATIONS: return ((InternalEList<?>) getEAnnotations()).basicRemove(otherEnd, msgs); case UMLPackage.PACKAGE_IMPORT__OWNED_COMMENT: return ((InternalEList<?>) getOwnedComments()).basicRemove(otherEnd, msgs); case UMLPackage.PACKAGE_IMPORT__IMPORTING_NAMESPACE: return basicSetImportingNamespace(null, msgs); } return eDynamicInverseRemove(otherEnd, featureID, msgs); } /** * * <!-- begin-user-doc --> * <!-- end-user-doc --> * * @generated */ @Override public NotificationChain eBasicRemoveFromContainerFeature(NotificationChain msgs) { switch (eContainerFeatureID()) { case UMLPackage.PACKAGE_IMPORT__IMPORTING_NAMESPACE: return eInternalContainer() .eInverseRemove(this, UMLPackage.NAMESPACE__PACKAGE_IMPORT, Namespace.class, msgs); } return eDynamicBasicRemoveFromContainer(msgs); } /** * * <!-- begin-user-doc --> * <!-- end-user-doc --> * * @generated */ @Override public Object eGet(int featureID, boolean resolve, boolean coreType) { switch (featureID) { case UMLPackage.PACKAGE_IMPORT__EANNOTATIONS: return getEAnnotations(); case UMLPackage.PACKAGE_IMPORT__OWNED_COMMENT: return getOwnedComments(); case UMLPackage.PACKAGE_IMPORT__OWNED_ELEMENT: return getOwnedElements(); case UMLPackage.PACKAGE_IMPORT__OWNER: if (resolve) return getOwner(); return basicGetOwner(); case UMLPackage.PACKAGE_IMPORT__RELATED_ELEMENT: return getRelatedElements(); case UMLPackage.PACKAGE_IMPORT__SOURCE: return getSources(); case UMLPackage.PACKAGE_IMPORT__TARGET: return getTargets(); case UMLPackage.PACKAGE_IMPORT__IMPORTED_PACKAGE: if (resolve) return getImportedPackage(); return basicGetImportedPackage(); case UMLPackage.PACKAGE_IMPORT__IMPORTING_NAMESPACE: if (resolve) return getImportingNamespace(); return basicGetImportingNamespace(); case UMLPackage.PACKAGE_IMPORT__VISIBILITY: return getVisibility(); } return eDynamicGet(featureID, resolve, coreType); } /** * * <!-- begin-user-doc --> * <!-- end-user-doc --> * * @generated */ @SuppressWarnings("unchecked") @Override public void eSet(int featureID, Object newValue) { switch (featureID) { case UMLPackage.PACKAGE_IMPORT__EANNOTATIONS: getEAnnotations().clear(); getEAnnotations().addAll((Collection<? extends EAnnotation>) newValue); return; case UMLPackage.PACKAGE_IMPORT__OWNED_COMMENT: getOwnedComments().clear(); getOwnedComments().addAll((Collection<? extends Comment>) newValue); return; case UMLPackage.PACKAGE_IMPORT__IMPORTED_PACKAGE: setImportedPackage((org.eclipse.uml2.uml.Package) newValue); return; case UMLPackage.PACKAGE_IMPORT__IMPORTING_NAMESPACE: setImportingNamespace((Namespace) newValue); return; case UMLPackage.PACKAGE_IMPORT__VISIBILITY: setVisibility((VisibilityKind) newValue); return; } eDynamicSet(featureID, newValue); } /** * * <!-- begin-user-doc --> * <!-- end-user-doc --> * * @generated */ @Override public void eUnset(int featureID) { switch (featureID) { case UMLPackage.PACKAGE_IMPORT__EANNOTATIONS: getEAnnotations().clear(); return; case UMLPackage.PACKAGE_IMPORT__OWNED_COMMENT: getOwnedComments().clear(); return; case UMLPackage.PACKAGE_IMPORT__IMPORTED_PACKAGE: setImportedPackage((org.eclipse.uml2.uml.Package) null); return; case UMLPackage.PACKAGE_IMPORT__IMPORTING_NAMESPACE: setImportingNamespace((Namespace) null); return; case UMLPackage.PACKAGE_IMPORT__VISIBILITY: setVisibility(VISIBILITY_EDEFAULT); return; } eDynamicUnset(featureID); } /** * * <!-- begin-user-doc --> * <!-- end-user-doc --> * * @generated */ @Override public boolean eIsSet(int featureID) { switch (featureID) { case UMLPackage.PACKAGE_IMPORT__EANNOTATIONS: return eAnnotations != null && !eAnnotations.isEmpty(); case UMLPackage.PACKAGE_IMPORT__OWNED_COMMENT: return ownedComments != null && !ownedComments.isEmpty(); case UMLPackage.PACKAGE_IMPORT__OWNED_ELEMENT: return isSetOwnedElements(); case UMLPackage.PACKAGE_IMPORT__OWNER: return isSetOwner(); case UMLPackage.PACKAGE_IMPORT__RELATED_ELEMENT: return isSetRelatedElements(); case UMLPackage.PACKAGE_IMPORT__SOURCE: return isSetSources(); case UMLPackage.PACKAGE_IMPORT__TARGET: return isSetTargets(); case UMLPackage.PACKAGE_IMPORT__IMPORTED_PACKAGE: return importedPackage != null; case UMLPackage.PACKAGE_IMPORT__IMPORTING_NAMESPACE: return basicGetImportingNamespace() != null; case UMLPackage.PACKAGE_IMPORT__VISIBILITY: return (eFlags & VISIBILITY_EFLAG) != VISIBILITY_EFLAG_DEFAULT; } return eDynamicIsSet(featureID); } /** * * <!-- begin-user-doc --> * <!-- end-user-doc --> * * @generated */ @Override @SuppressWarnings("unchecked") public Object eInvoke(int operationID, EList<?> arguments) throws InvocationTargetException { switch (operationID) { case UMLPackage.PACKAGE_IMPORT___GET_EANNOTATION__STRING: return getEAnnotation((String) arguments.get(0)); case UMLPackage.PACKAGE_IMPORT___VALIDATE_HAS_OWNER__DIAGNOSTICCHAIN_MAP: return validateHasOwner( (DiagnosticChain) arguments.get(0), (Map<Object, Object>) arguments.get(1)); case UMLPackage.PACKAGE_IMPORT___VALIDATE_NOT_OWN_SELF__DIAGNOSTICCHAIN_MAP: return validateNotOwnSelf( (DiagnosticChain) arguments.get(0), (Map<Object, Object>) arguments.get(1)); case UMLPackage.PACKAGE_IMPORT___ADD_KEYWORD__STRING: return addKeyword((String) arguments.get(0)); case UMLPackage.PACKAGE_IMPORT___APPLY_STEREOTYPE__STEREOTYPE: return applyStereotype((Stereotype) arguments.get(0)); case UMLPackage.PACKAGE_IMPORT___CREATE_EANNOTATION__STRING: return createEAnnotation((String) arguments.get(0)); case UMLPackage.PACKAGE_IMPORT___DESTROY: destroy(); return null; case UMLPackage.PACKAGE_IMPORT___GET_KEYWORDS: return getKeywords(); case UMLPackage.PACKAGE_IMPORT___GET_APPLICABLE_STEREOTYPE__STRING: return getApplicableStereotype((String) arguments.get(0)); case UMLPackage.PACKAGE_IMPORT___GET_APPLICABLE_STEREOTYPES: return getApplicableStereotypes(); case UMLPackage.PACKAGE_IMPORT___GET_APPLIED_STEREOTYPE__STRING: return getAppliedStereotype((String) arguments.get(0)); case UMLPackage.PACKAGE_IMPORT___GET_APPLIED_STEREOTYPES: return getAppliedStereotypes(); case UMLPackage.PACKAGE_IMPORT___GET_APPLIED_SUBSTEREOTYPE__STEREOTYPE_STRING: return getAppliedSubstereotype((Stereotype) arguments.get(0), (String) arguments.get(1)); case UMLPackage.PACKAGE_IMPORT___GET_APPLIED_SUBSTEREOTYPES__STEREOTYPE: return getAppliedSubstereotypes((Stereotype) arguments.get(0)); case UMLPackage.PACKAGE_IMPORT___GET_MODEL: return getModel(); case UMLPackage.PACKAGE_IMPORT___GET_NEAREST_PACKAGE: return getNearestPackage(); case UMLPackage.PACKAGE_IMPORT___GET_RELATIONSHIPS: return getRelationships(); case UMLPackage.PACKAGE_IMPORT___GET_RELATIONSHIPS__ECLASS: return getRelationships((EClass) arguments.get(0)); case UMLPackage.PACKAGE_IMPORT___GET_REQUIRED_STEREOTYPE__STRING: return getRequiredStereotype((String) arguments.get(0)); case UMLPackage.PACKAGE_IMPORT___GET_REQUIRED_STEREOTYPES: return getRequiredStereotypes(); case UMLPackage.PACKAGE_IMPORT___GET_SOURCE_DIRECTED_RELATIONSHIPS: return getSourceDirectedRelationships(); case UMLPackage.PACKAGE_IMPORT___GET_SOURCE_DIRECTED_RELATIONSHIPS__ECLASS: return getSourceDirectedRelationships((EClass) arguments.get(0)); case UMLPackage.PACKAGE_IMPORT___GET_STEREOTYPE_APPLICATION__STEREOTYPE: return getStereotypeApplication((Stereotype) arguments.get(0)); case UMLPackage.PACKAGE_IMPORT___GET_STEREOTYPE_APPLICATIONS: return getStereotypeApplications(); case UMLPackage.PACKAGE_IMPORT___GET_TARGET_DIRECTED_RELATIONSHIPS: return getTargetDirectedRelationships(); case UMLPackage.PACKAGE_IMPORT___GET_TARGET_DIRECTED_RELATIONSHIPS__ECLASS: return getTargetDirectedRelationships((EClass) arguments.get(0)); case UMLPackage.PACKAGE_IMPORT___GET_VALUE__STEREOTYPE_STRING: return getValue((Stereotype) arguments.get(0), (String) arguments.get(1)); case UMLPackage.PACKAGE_IMPORT___HAS_KEYWORD__STRING: return hasKeyword((String) arguments.get(0)); case UMLPackage.PACKAGE_IMPORT___HAS_VALUE__STEREOTYPE_STRING: return hasValue((Stereotype) arguments.get(0), (String) arguments.get(1)); case UMLPackage.PACKAGE_IMPORT___IS_STEREOTYPE_APPLICABLE__STEREOTYPE: return isStereotypeApplicable((Stereotype) arguments.get(0)); case UMLPackage.PACKAGE_IMPORT___IS_STEREOTYPE_APPLIED__STEREOTYPE: return isStereotypeApplied((Stereotype) arguments.get(0)); case UMLPackage.PACKAGE_IMPORT___IS_STEREOTYPE_REQUIRED__STEREOTYPE: return isStereotypeRequired((Stereotype) arguments.get(0)); case UMLPackage.PACKAGE_IMPORT___REMOVE_KEYWORD__STRING: return removeKeyword((String) arguments.get(0)); case UMLPackage.PACKAGE_IMPORT___SET_VALUE__STEREOTYPE_STRING_OBJECT: setValue((Stereotype) arguments.get(0), (String) arguments.get(1), arguments.get(2)); return null; case UMLPackage.PACKAGE_IMPORT___UNAPPLY_STEREOTYPE__STEREOTYPE: return unapplyStereotype((Stereotype) arguments.get(0)); case UMLPackage.PACKAGE_IMPORT___ALL_OWNED_ELEMENTS: return allOwnedElements(); case UMLPackage.PACKAGE_IMPORT___MUST_BE_OWNED: return mustBeOwned(); case UMLPackage.PACKAGE_IMPORT___VALIDATE_PUBLIC_OR_PRIVATE__DIAGNOSTICCHAIN_MAP: return validatePublicOrPrivate( (DiagnosticChain) arguments.get(0), (Map<Object, Object>) arguments.get(1)); } return eDynamicInvoke(operationID, arguments); } /** * * <!-- begin-user-doc --> * <!-- end-user-doc --> * * @generated */ @Override public String toString() { if (eIsProxy()) return super.toString(); StringBuffer result = new StringBuffer(super.toString()); result.append(" (visibility: "); // $NON-NLS-1$ result.append(VISIBILITY_EFLAG_VALUES[(eFlags & VISIBILITY_EFLAG) >>> VISIBILITY_EFLAG_OFFSET]); result.append(')'); return result.toString(); } /** * The array of subset feature identifiers for the '{@link #getTargets() <em>Target</em>}' * reference list. * <!-- begin-user-doc --> * <!-- end-user-doc --> * * @see #getTargets() * @generated * @ordered */ protected static final int[] TARGET_ESUBSETS = new int[] {UMLPackage.PACKAGE_IMPORT__IMPORTED_PACKAGE}; /** * * <!-- begin-user-doc --> * <!-- end-user-doc --> * * @generated */ @Override public boolean isSetTargets() { return super.isSetTargets() || eIsSet(UMLPackage.PACKAGE_IMPORT__IMPORTED_PACKAGE); } /** * The array of subset feature identifiers for the '{@link #getSources() <em>Source</em>}' * reference list. * <!-- begin-user-doc --> * <!-- end-user-doc --> * * @see #getSources() * @generated * @ordered */ protected static final int[] SOURCE_ESUBSETS = new int[] {UMLPackage.PACKAGE_IMPORT__IMPORTING_NAMESPACE}; /** * * <!-- begin-user-doc --> * <!-- end-user-doc --> * * @generated */ @Override public Element getOwner() { Element owner = basicGetOwner(); return owner != null && owner.eIsProxy() ? (Element) eResolveProxy((InternalEObject) owner) : owner; } /** * * <!-- begin-user-doc --> * <!-- end-user-doc --> * * @generated */ @Override public boolean isSetSources() { return super.isSetSources() || eIsSet(UMLPackage.PACKAGE_IMPORT__IMPORTING_NAMESPACE); } /** * * <!-- begin-user-doc --> * <!-- end-user-doc --> * * @generated */ @Override public Element basicGetOwner() { Namespace importingNamespace = basicGetImportingNamespace(); if (importingNamespace != null) { return importingNamespace; } return super.basicGetOwner(); } /** * * <!-- begin-user-doc --> * <!-- end-user-doc --> * * @generated */ @Override public boolean isSetOwner() { return super.isSetOwner() || eIsSet(UMLPackage.PACKAGE_IMPORT__IMPORTING_NAMESPACE); } } // PackageImportImpl