diff options
author | Vincent Lorenzo | 2018-11-27 12:56:08 +0000 |
---|---|---|
committer | Vincent Lorenzo | 2018-11-27 13:00:50 +0000 |
commit | 33dcbab8a204a52646ac4a2d283585abf5bc3e05 (patch) | |
tree | 998f77592838ee86078bcbdde1672593100922de /plugins | |
parent | f754ddf563f42ad17171aff4639d3fafde9d4056 (diff) | |
download | org.eclipse.papyrus-33dcbab8a204a52646ac4a2d283585abf5bc3e05.tar.gz org.eclipse.papyrus-33dcbab8a204a52646ac4a2d283585abf5bc3e05.tar.xz org.eclipse.papyrus-33dcbab8a204a52646ac4a2d283585abf5bc3e05.zip |
Bug 541594: [UML] [Decorator Model] Remove the generation of the cache adapter method in the ProfileExternalization framework
Change-Id: I817f00be3123eaf745d37cfa8bc94508f059e411
Signed-off-by: Vincent Lorenzo <vincent.lorenzo@cea.fr>
Diffstat (limited to 'plugins')
17 files changed, 242 insertions, 306 deletions
diff --git a/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel/.settings/.api_filters b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel/.settings/.api_filters new file mode 100755 index 00000000000..96f733972d6 --- /dev/null +++ b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel/.settings/.api_filters @@ -0,0 +1,19 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<component id="org.eclipse.papyrus.uml.decoratormodel" version="2"> + <resource path="META-INF/MANIFEST.MF"> + <filter comment="changes in generated code" id="926941240"> + <message_arguments> + <message_argument value="2.2.0"/> + <message_argument value="2.1.0"/> + </message_arguments> + </filter> + </resource> + <resource path="src-gen/org/eclipse/papyrus/uml/decoratormodel/profileExternalization/impl/ApplyProfilesImpl.java" type="org.eclipse.papyrus.uml.decoratormodel.profileExternalization.impl.ApplyProfilesImpl"> + <filter comment="Generated code" id="338792546"> + <message_arguments> + <message_argument value="org.eclipse.papyrus.uml.decoratormodel.profileExternalization.impl.ApplyProfilesImpl"/> + <message_argument value="getCacheAdapter()"/> + </message_arguments> + </filter> + </resource> +</component> diff --git a/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel/META-INF/MANIFEST.MF b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel/META-INF/MANIFEST.MF index 07978365485..42af6e8547c 100644..100755 --- a/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel/META-INF/MANIFEST.MF +++ b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel/META-INF/MANIFEST.MF @@ -26,7 +26,7 @@ Export-Package: org.eclipse.papyrus.uml.decoratormodel, Bundle-Vendor: %providerName Bundle-ActivationPolicy: lazy;exclude:=org.eclipse.papyrus.uml.decoratormodel.internal.expressions Bundle-ClassPath: . -Bundle-Version: 2.1.0.qualifier +Bundle-Version: 2.2.0.qualifier Bundle-Localization: plugin Bundle-Name: %pluginName Bundle-Activator: org.eclipse.papyrus.uml.decoratormodel.Activator diff --git a/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel/model/ProfileExternalization.profile.genmodel b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel/model/ProfileExternalization.profile.genmodel index 50ed8058974..69b6f8fee71 100644 --- a/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel/model/ProfileExternalization.profile.genmodel +++ b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel/model/ProfileExternalization.profile.genmodel @@ -5,10 +5,9 @@ modelDirectory="/org.eclipse.papyrus.uml.decoratormodel/src-gen" modelPluginID="org.eclipse.papyrus.uml.decoratormodel" modelName="ProfileExternalization" nonNLSMarkers="true" rootExtendsClass="org.eclipse.emf.ecore.impl.MinimalEObjectImpl$Container" codeFormatting="true" commentFormatting="true" importerID="org.eclipse.uml2.uml.ecore.importer" - complianceLevel="6.0" copyrightFields="false" usedGenPackages="../../org.eclipse.emf.ecore/model/Ecore.genmodel#//ecore ../../org.eclipse.uml2.types/model/Types.genmodel#//types ../../org.eclipse.uml2.uml/model/UML.genmodel#//uml" - operationReflection="true" importOrganizing="true" - cleanup="true" factoryMethods="true" pluralizedGetters="true" cacheAdapterSupport="true" - safeStrings="true" invariantPrefix="validate"> + complianceLevel="8.0" copyrightFields="false" usedGenPackages="../../org.eclipse.emf.ecore/model/Ecore.genmodel#//ecore ../../org.eclipse.uml2.types/model/Types.genmodel#//types ../../org.eclipse.uml2.uml/model/UML.genmodel#//uml" + operationReflection="true" importOrganizing="true" cleanup="true" factoryMethods="true" + pluralizedGetters="true" safeStrings="true" invariantPrefix="validate"> <genAnnotations source="http://www.eclipse.org/emf/2002/GenModel/importer/org.eclipse.uml2.uml.ecore.importer"> <details key="ECORE_TAGGED_VALUES" value="PROCESS"/> <details key="UNION_PROPERTIES" value="PROCESS"/> diff --git a/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel/plugin.properties b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel/plugin.properties index c50664021ad..58a47870b44 100644 --- a/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel/plugin.properties +++ b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel/plugin.properties @@ -15,4 +15,4 @@ providerName = Eclipse Modeling Project content-type.name = Papyrus Profile Application -pluginDescription=Core APIs for management of profile and stereotype applications in external resources
\ No newline at end of file +pluginDescription=Core APIs for management of profile and stereotype applications in external resources diff --git a/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel/pom.xml b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel/pom.xml index c7125ea22cb..efd719fef44 100644 --- a/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel/pom.xml +++ b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel/pom.xml @@ -1,12 +1,14 @@ <?xml version="1.0" encoding="UTF-8"?> -<project> +<project xmlns="http://maven.apache.org/POM/4.0.0" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <parent> - <groupId>org.eclipse.papyrus</groupId> - <artifactId>org.eclipse.papyrus.uml-decorator</artifactId> - <version>0.0.1-SNAPSHOT</version> + <groupId>org.eclipse.papyrus</groupId> + <artifactId>org.eclipse.papyrus.uml-decorator</artifactId> + <version>0.0.1-SNAPSHOT</version> </parent> <artifactId>org.eclipse.papyrus.uml.decoratormodel</artifactId> - <version>2.1.0-SNAPSHOT</version> + <version>2.2.0-SNAPSHOT</version> <packaging>eclipse-plugin</packaging> </project>
\ No newline at end of file diff --git a/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel/src-gen/org/eclipse/papyrus/uml/decoratormodel/profileExternalization/ApplyProfiles.java b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel/src-gen/org/eclipse/papyrus/uml/decoratormodel/profileExternalization/ApplyProfiles.java index 5a13b401c8b..3a4c6862009 100644..100755 --- a/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel/src-gen/org/eclipse/papyrus/uml/decoratormodel/profileExternalization/ApplyProfiles.java +++ b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel/src-gen/org/eclipse/papyrus/uml/decoratormodel/profileExternalization/ApplyProfiles.java @@ -32,18 +32,17 @@ import org.eclipse.uml2.uml.Profile; * * <p> * The following features are supported: + * </p> * <ul> * <li>{@link org.eclipse.papyrus.uml.decoratormodel.profileExternalization.ApplyProfiles#getBase_Dependency <em>Base Dependency</em>}</li> * </ul> - * </p> * * @see org.eclipse.papyrus.uml.decoratormodel.profileExternalization.ProfileExternalizationPackage#getApplyProfiles() * @model annotation="http://www.eclipse.org/emf/2002/Ecore constraints='suppliers_are_packages clients_are_packages'" - * annotation="http://www.eclipse.org/emf/2002/Ecore/OCL suppliers_are_packages='base_Dependency.supplier->forAll(oclIsKindOf(uml::Package))' clients_are_packages='base_Dependency.client->forAll(oclIsKindOf(uml::Package))'" + * annotation="http://www.eclipse.org/emf/2002/Ecore/OCL suppliers_are_packages='base_Dependency.supplier->forAll(oclIsKindOf(uml::Package))' clients_are_packages='base_Dependency.client->forAll(oclIsKindOf(uml::Package))'" * @generated */ -public interface ApplyProfiles extends EObject -{ +public interface ApplyProfiles extends EObject { /** * Returns the value of the '<em><b>Base Dependency</b></em>' reference. * <!-- begin-user-doc --> diff --git a/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel/src-gen/org/eclipse/papyrus/uml/decoratormodel/profileExternalization/ProfileExternalizationFactory.java b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel/src-gen/org/eclipse/papyrus/uml/decoratormodel/profileExternalization/ProfileExternalizationFactory.java index b2423b9d332..14c2163602c 100644..100755 --- a/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel/src-gen/org/eclipse/papyrus/uml/decoratormodel/profileExternalization/ProfileExternalizationFactory.java +++ b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel/src-gen/org/eclipse/papyrus/uml/decoratormodel/profileExternalization/ProfileExternalizationFactory.java @@ -24,8 +24,7 @@ import org.eclipse.emf.ecore.EFactory; * @see org.eclipse.papyrus.uml.decoratormodel.profileExternalization.ProfileExternalizationPackage * @generated */ -public interface ProfileExternalizationFactory extends EFactory -{ +public interface ProfileExternalizationFactory extends EFactory { /** * The singleton instance of the factory. * <!-- begin-user-doc --> diff --git a/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel/src-gen/org/eclipse/papyrus/uml/decoratormodel/profileExternalization/ProfileExternalizationPackage.java b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel/src-gen/org/eclipse/papyrus/uml/decoratormodel/profileExternalization/ProfileExternalizationPackage.java index d890419753a..01a978623a3 100644..100755 --- a/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel/src-gen/org/eclipse/papyrus/uml/decoratormodel/profileExternalization/ProfileExternalizationPackage.java +++ b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel/src-gen/org/eclipse/papyrus/uml/decoratormodel/profileExternalization/ProfileExternalizationPackage.java @@ -37,8 +37,7 @@ import org.eclipse.emf.ecore.EReference; * annotation="http://www.eclipse.org/uml2/2.0.0/UML originalName='ProfileExternalization'" * @generated */ -public interface ProfileExternalizationPackage extends EPackage -{ +public interface ProfileExternalizationPackage extends EPackage { /** * The package name. * <!-- begin-user-doc --> @@ -206,8 +205,7 @@ public interface ProfileExternalizationPackage extends EPackage * * @generated */ - interface Literals - { + interface Literals { /** * The meta object literal for the '{@link org.eclipse.papyrus.uml.decoratormodel.profileExternalization.impl.ApplyProfilesImpl <em>Apply Profiles</em>}' class. * <!-- begin-user-doc --> diff --git a/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel/src-gen/org/eclipse/papyrus/uml/decoratormodel/profileExternalization/impl/ApplyProfilesImpl.java b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel/src-gen/org/eclipse/papyrus/uml/decoratormodel/profileExternalization/impl/ApplyProfilesImpl.java index 5a78189e94a..aeba7b0e6a0 100644..100755 --- a/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel/src-gen/org/eclipse/papyrus/uml/decoratormodel/profileExternalization/impl/ApplyProfilesImpl.java +++ b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel/src-gen/org/eclipse/papyrus/uml/decoratormodel/profileExternalization/impl/ApplyProfilesImpl.java @@ -26,7 +26,6 @@ import org.eclipse.emf.ecore.util.EcoreUtil; import org.eclipse.papyrus.uml.decoratormodel.profileExternalization.ApplyProfiles; import org.eclipse.papyrus.uml.decoratormodel.profileExternalization.ProfileExternalizationPackage; import org.eclipse.papyrus.uml.decoratormodel.profileExternalization.internal.operations.ApplyProfilesOperations; -import org.eclipse.uml2.common.util.CacheAdapter; import org.eclipse.uml2.uml.Dependency; import org.eclipse.uml2.uml.Profile; @@ -36,15 +35,14 @@ import org.eclipse.uml2.uml.Profile; * <!-- end-user-doc --> * <p> * The following features are implemented: + * </p> * <ul> * <li>{@link org.eclipse.papyrus.uml.decoratormodel.profileExternalization.impl.ApplyProfilesImpl#getBase_Dependency <em>Base Dependency</em>}</li> * </ul> - * </p> * * @generated */ -public class ApplyProfilesImpl extends MinimalEObjectImpl.Container implements ApplyProfiles -{ +public class ApplyProfilesImpl extends MinimalEObjectImpl.Container implements ApplyProfiles { /** * The cached value of the '{@link #getBase_Dependency() <em>Base Dependency</em>}' reference. * <!-- begin-user-doc --> @@ -62,8 +60,7 @@ public class ApplyProfilesImpl extends MinimalEObjectImpl.Container implements A * * @generated */ - protected ApplyProfilesImpl() - { + protected ApplyProfilesImpl() { super(); } @@ -74,8 +71,7 @@ public class ApplyProfilesImpl extends MinimalEObjectImpl.Container implements A * @generated */ @Override - protected EClass eStaticClass() - { + protected EClass eStaticClass() { return ProfileExternalizationPackage.Literals.APPLY_PROFILES; } @@ -86,14 +82,11 @@ public class ApplyProfilesImpl extends MinimalEObjectImpl.Container implements A * @generated */ @Override - public Dependency getBase_Dependency() - { - if (base_Dependency != null && base_Dependency.eIsProxy()) - { + public Dependency getBase_Dependency() { + if (base_Dependency != null && base_Dependency.eIsProxy()) { InternalEObject oldBase_Dependency = (InternalEObject) base_Dependency; base_Dependency = (Dependency) eResolveProxy(oldBase_Dependency); - if (base_Dependency != oldBase_Dependency) - { + if (base_Dependency != oldBase_Dependency) { if (eNotificationRequired()) { eNotify(new ENotificationImpl(this, Notification.RESOLVE, ProfileExternalizationPackage.APPLY_PROFILES__BASE_DEPENDENCY, oldBase_Dependency, base_Dependency)); } @@ -108,8 +101,7 @@ public class ApplyProfilesImpl extends MinimalEObjectImpl.Container implements A * * @generated */ - public Dependency basicGetBase_Dependency() - { + public Dependency basicGetBase_Dependency() { return base_Dependency; } @@ -120,8 +112,7 @@ public class ApplyProfilesImpl extends MinimalEObjectImpl.Container implements A * @generated */ @Override - public void setBase_Dependency(Dependency newBase_Dependency) - { + public void setBase_Dependency(Dependency newBase_Dependency) { Dependency oldBase_Dependency = base_Dependency; base_Dependency = newBase_Dependency; if (eNotificationRequired()) { @@ -136,8 +127,7 @@ public class ApplyProfilesImpl extends MinimalEObjectImpl.Container implements A * @generated */ @Override - public EList<Profile> getAppliedProfiles() - { + public EList<Profile> getAppliedProfiles() { return ApplyProfilesOperations.getAppliedProfiles(this); } @@ -148,8 +138,7 @@ public class ApplyProfilesImpl extends MinimalEObjectImpl.Container implements A * @generated */ @Override - public EList<org.eclipse.uml2.uml.Package> getExternalizedAppliedProfilePackages() - { + public EList<org.eclipse.uml2.uml.Package> getExternalizedAppliedProfilePackages() { return ApplyProfilesOperations.getExternalizedAppliedProfilePackages(this); } @@ -160,10 +149,8 @@ public class ApplyProfilesImpl extends MinimalEObjectImpl.Container implements A * @generated */ @Override - public Object eGet(int featureID, boolean resolve, boolean coreType) - { - switch (featureID) - { + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { case ProfileExternalizationPackage.APPLY_PROFILES__BASE_DEPENDENCY: if (resolve) { return getBase_Dependency(); @@ -180,10 +167,8 @@ public class ApplyProfilesImpl extends MinimalEObjectImpl.Container implements A * @generated */ @Override - public void eSet(int featureID, Object newValue) - { - switch (featureID) - { + public void eSet(int featureID, Object newValue) { + switch (featureID) { case ProfileExternalizationPackage.APPLY_PROFILES__BASE_DEPENDENCY: setBase_Dependency((Dependency) newValue); return; @@ -198,10 +183,8 @@ public class ApplyProfilesImpl extends MinimalEObjectImpl.Container implements A * @generated */ @Override - public void eUnset(int featureID) - { - switch (featureID) - { + public void eUnset(int featureID) { + switch (featureID) { case ProfileExternalizationPackage.APPLY_PROFILES__BASE_DEPENDENCY: setBase_Dependency((Dependency) null); return; @@ -216,10 +199,8 @@ public class ApplyProfilesImpl extends MinimalEObjectImpl.Container implements A * @generated */ @Override - public boolean eIsSet(int featureID) - { - switch (featureID) - { + public boolean eIsSet(int featureID) { + switch (featureID) { case ProfileExternalizationPackage.APPLY_PROFILES__BASE_DEPENDENCY: return base_Dependency != null; } @@ -233,10 +214,8 @@ public class ApplyProfilesImpl extends MinimalEObjectImpl.Container implements A * @generated */ @Override - public Object eInvoke(int operationID, EList<?> arguments) throws InvocationTargetException - { - switch (operationID) - { + public Object eInvoke(int operationID, EList<?> arguments) throws InvocationTargetException { + switch (operationID) { case ProfileExternalizationPackage.APPLY_PROFILES___GET_APPLIED_PROFILES: return getAppliedProfiles(); case ProfileExternalizationPackage.APPLY_PROFILES___GET_EXTERNALIZED_APPLIED_PROFILE_PACKAGES: @@ -255,22 +234,8 @@ public class ApplyProfilesImpl extends MinimalEObjectImpl.Container implements A * @return The new instance. * @generated */ - protected EObject create(EClass eClass) - { + protected EObject create(EClass eClass) { return EcoreUtil.create(eClass); } - /** - * Retrieves the cache adapter for this '<em><b>Apply Profiles</b></em>'. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * - * @return The cache adapter for this '<em><b>Apply Profiles</b></em>'. - * @generated - */ - protected CacheAdapter getCacheAdapter() - { - return CacheAdapter.getCacheAdapter(this); - } - } // ApplyProfilesImpl diff --git a/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel/src-gen/org/eclipse/papyrus/uml/decoratormodel/profileExternalization/impl/ProfileExternalizationFactoryImpl.java b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel/src-gen/org/eclipse/papyrus/uml/decoratormodel/profileExternalization/impl/ProfileExternalizationFactoryImpl.java index 655fc3a7e28..26b5c7a4183 100644..100755 --- a/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel/src-gen/org/eclipse/papyrus/uml/decoratormodel/profileExternalization/impl/ProfileExternalizationFactoryImpl.java +++ b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel/src-gen/org/eclipse/papyrus/uml/decoratormodel/profileExternalization/impl/ProfileExternalizationFactoryImpl.java @@ -27,8 +27,7 @@ import org.eclipse.papyrus.uml.decoratormodel.profileExternalization.*; * * @generated */ -public class ProfileExternalizationFactoryImpl extends EFactoryImpl implements ProfileExternalizationFactory -{ +public class ProfileExternalizationFactoryImpl extends EFactoryImpl implements ProfileExternalizationFactory { /** * Creates the default factory implementation. * <!-- begin-user-doc --> @@ -36,17 +35,13 @@ public class ProfileExternalizationFactoryImpl extends EFactoryImpl implements P * * @generated */ - public static ProfileExternalizationFactory init() - { - try - { + public static ProfileExternalizationFactory init() { + try { ProfileExternalizationFactory theProfileExternalizationFactory = (ProfileExternalizationFactory) EPackage.Registry.INSTANCE.getEFactory(ProfileExternalizationPackage.eNS_URI); - if (theProfileExternalizationFactory != null) - { + if (theProfileExternalizationFactory != null) { return theProfileExternalizationFactory; } - } catch (Exception exception) - { + } catch (Exception exception) { EcorePlugin.INSTANCE.log(exception); } return new ProfileExternalizationFactoryImpl(); @@ -59,8 +54,7 @@ public class ProfileExternalizationFactoryImpl extends EFactoryImpl implements P * * @generated */ - public ProfileExternalizationFactoryImpl() - { + public ProfileExternalizationFactoryImpl() { super(); } @@ -71,10 +65,8 @@ public class ProfileExternalizationFactoryImpl extends EFactoryImpl implements P * @generated */ @Override - public EObject create(EClass eClass) - { - switch (eClass.getClassifierID()) - { + public EObject create(EClass eClass) { + switch (eClass.getClassifierID()) { case ProfileExternalizationPackage.APPLY_PROFILES: return createApplyProfiles(); default: @@ -89,8 +81,7 @@ public class ProfileExternalizationFactoryImpl extends EFactoryImpl implements P * @generated */ @Override - public ApplyProfiles createApplyProfiles() - { + public ApplyProfiles createApplyProfiles() { ApplyProfilesImpl applyProfiles = new ApplyProfilesImpl(); return applyProfiles; } @@ -102,8 +93,7 @@ public class ProfileExternalizationFactoryImpl extends EFactoryImpl implements P * @generated */ @Override - public ProfileExternalizationPackage getProfileExternalizationPackage() - { + public ProfileExternalizationPackage getProfileExternalizationPackage() { return (ProfileExternalizationPackage) getEPackage(); } @@ -115,8 +105,7 @@ public class ProfileExternalizationFactoryImpl extends EFactoryImpl implements P * @generated */ @Deprecated - public static ProfileExternalizationPackage getPackage() - { + public static ProfileExternalizationPackage getPackage() { return ProfileExternalizationPackage.eINSTANCE; } diff --git a/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel/src-gen/org/eclipse/papyrus/uml/decoratormodel/profileExternalization/impl/ProfileExternalizationPackageImpl.java b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel/src-gen/org/eclipse/papyrus/uml/decoratormodel/profileExternalization/impl/ProfileExternalizationPackageImpl.java index b1002525c3e..317470e5fb0 100644..100755 --- a/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel/src-gen/org/eclipse/papyrus/uml/decoratormodel/profileExternalization/impl/ProfileExternalizationPackageImpl.java +++ b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel/src-gen/org/eclipse/papyrus/uml/decoratormodel/profileExternalization/impl/ProfileExternalizationPackageImpl.java @@ -18,11 +18,13 @@ import org.eclipse.emf.ecore.EOperation; import org.eclipse.emf.ecore.EPackage; import org.eclipse.emf.ecore.EReference; import org.eclipse.emf.ecore.EValidator; +import org.eclipse.emf.ecore.EcorePackage; import org.eclipse.emf.ecore.impl.EPackageImpl; import org.eclipse.papyrus.uml.decoratormodel.profileExternalization.ApplyProfiles; import org.eclipse.papyrus.uml.decoratormodel.profileExternalization.ProfileExternalizationFactory; import org.eclipse.papyrus.uml.decoratormodel.profileExternalization.ProfileExternalizationPackage; import org.eclipse.papyrus.uml.decoratormodel.profileExternalization.util.ProfileExternalizationValidator; +import org.eclipse.uml2.types.TypesPackage; import org.eclipse.uml2.uml.UMLPackage; /** @@ -32,8 +34,7 @@ import org.eclipse.uml2.uml.UMLPackage; * * @generated */ -public class ProfileExternalizationPackageImpl extends EPackageImpl implements ProfileExternalizationPackage -{ +public class ProfileExternalizationPackageImpl extends EPackageImpl implements ProfileExternalizationPackage { /** * <!-- begin-user-doc --> * <!-- end-user-doc --> @@ -43,18 +44,22 @@ public class ProfileExternalizationPackageImpl extends EPackageImpl implements P private EClass applyProfilesEClass = null; /** - * Creates an instance of the model <b>Package</b>, registered with {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the package + * Creates an instance of the model <b>Package</b>, registered with + * {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the package * package URI value. * <p> - * Note: the correct way to create the package is via the static factory method {@link #init init()}, which also performs initialization of the package, or returns the registered package, if one already exists. <!-- begin-user-doc --> <!-- end-user-doc --> + * Note: the correct way to create the package is via the static + * factory method {@link #init init()}, which also performs + * initialization of the package, or returns the registered package, + * if one already exists. + * <!-- begin-user-doc --> <!-- end-user-doc --> * * @see org.eclipse.emf.ecore.EPackage.Registry * @see org.eclipse.papyrus.uml.decoratormodel.profileExternalization.ProfileExternalizationPackage#eNS_URI * @see #init() * @generated */ - private ProfileExternalizationPackageImpl() - { + private ProfileExternalizationPackageImpl() { super(eNS_URI, ProfileExternalizationFactory.eINSTANCE); } @@ -70,7 +75,9 @@ public class ProfileExternalizationPackageImpl extends EPackageImpl implements P * Creates, registers, and initializes the <b>Package</b> for this model, and for any others upon which it depends. * * <p> - * This method is used to initialize {@link ProfileExternalizationPackage#eINSTANCE} when that field is accessed. Clients should not invoke it directly. Instead, they should simply access that field to obtain the package. <!-- begin-user-doc --> <!-- + * This method is used to initialize {@link ProfileExternalizationPackage#eINSTANCE} when that field is accessed. + * Clients should not invoke it directly. Instead, they should simply access that field to obtain the package. + * <!-- begin-user-doc --> <!-- * end-user-doc --> * * @see #eNS_URI @@ -78,19 +85,21 @@ public class ProfileExternalizationPackageImpl extends EPackageImpl implements P * @see #initializePackageContents() * @generated */ - public static ProfileExternalizationPackage init() - { + public static ProfileExternalizationPackage init() { if (isInited) { return (ProfileExternalizationPackage) EPackage.Registry.INSTANCE.getEPackage(ProfileExternalizationPackage.eNS_URI); } // Obtain or create and register package - ProfileExternalizationPackageImpl theProfileExternalizationPackage = (ProfileExternalizationPackageImpl) (EPackage.Registry.INSTANCE.get(eNS_URI) instanceof ProfileExternalizationPackageImpl ? EPackage.Registry.INSTANCE.get(eNS_URI) - : new ProfileExternalizationPackageImpl()); + Object registeredProfileExternalizationPackage = EPackage.Registry.INSTANCE.get(eNS_URI); + ProfileExternalizationPackageImpl theProfileExternalizationPackage = registeredProfileExternalizationPackage instanceof ProfileExternalizationPackageImpl ? (ProfileExternalizationPackageImpl) registeredProfileExternalizationPackage + : new ProfileExternalizationPackageImpl(); isInited = true; // Initialize simple dependencies + EcorePackage.eINSTANCE.eClass(); + TypesPackage.eINSTANCE.eClass(); UMLPackage.eINSTANCE.eClass(); // Create package meta-data objects @@ -100,21 +109,17 @@ public class ProfileExternalizationPackageImpl extends EPackageImpl implements P theProfileExternalizationPackage.initializePackageContents(); // Register package validator - EValidator.Registry.INSTANCE.put - (theProfileExternalizationPackage, - new EValidator.Descriptor() - { - @Override - public EValidator getEValidator() - { - return ProfileExternalizationValidator.INSTANCE; - } - }); + EValidator.Registry.INSTANCE.put(theProfileExternalizationPackage, + new EValidator.Descriptor() { + @Override + public EValidator getEValidator() { + return ProfileExternalizationValidator.INSTANCE; + } + }); // Mark meta-data to indicate it can't be changed theProfileExternalizationPackage.freeze(); - // Update the registry and return the package EPackage.Registry.INSTANCE.put(ProfileExternalizationPackage.eNS_URI, theProfileExternalizationPackage); return theProfileExternalizationPackage; @@ -127,8 +132,7 @@ public class ProfileExternalizationPackageImpl extends EPackageImpl implements P * @generated */ @Override - public EClass getApplyProfiles() - { + public EClass getApplyProfiles() { return applyProfilesEClass; } @@ -139,8 +143,7 @@ public class ProfileExternalizationPackageImpl extends EPackageImpl implements P * @generated */ @Override - public EReference getApplyProfiles_Base_Dependency() - { + public EReference getApplyProfiles_Base_Dependency() { return (EReference) applyProfilesEClass.getEStructuralFeatures().get(0); } @@ -151,8 +154,7 @@ public class ProfileExternalizationPackageImpl extends EPackageImpl implements P * @generated */ @Override - public EOperation getApplyProfiles__GetAppliedProfiles() - { + public EOperation getApplyProfiles__GetAppliedProfiles() { return applyProfilesEClass.getEOperations().get(0); } @@ -163,8 +165,7 @@ public class ProfileExternalizationPackageImpl extends EPackageImpl implements P * @generated */ @Override - public EOperation getApplyProfiles__GetExternalizedAppliedProfilePackages() - { + public EOperation getApplyProfiles__GetExternalizedAppliedProfilePackages() { return applyProfilesEClass.getEOperations().get(1); } @@ -175,8 +176,7 @@ public class ProfileExternalizationPackageImpl extends EPackageImpl implements P * @generated */ @Override - public ProfileExternalizationFactory getProfileExternalizationFactory() - { + public ProfileExternalizationFactory getProfileExternalizationFactory() { return (ProfileExternalizationFactory) getEFactoryInstance(); } @@ -196,8 +196,7 @@ public class ProfileExternalizationPackageImpl extends EPackageImpl implements P * * @generated */ - public void createPackageContents() - { + public void createPackageContents() { if (isCreated) { return; } @@ -226,8 +225,7 @@ public class ProfileExternalizationPackageImpl extends EPackageImpl implements P * * @generated */ - public void initializePackageContents() - { + public void initializePackageContents() { if (isInitialized) { return; } @@ -249,8 +247,8 @@ public class ProfileExternalizationPackageImpl extends EPackageImpl implements P // Initialize classes, features, and operations; add parameters initEClass(applyProfilesEClass, ApplyProfiles.class, "ApplyProfiles", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$ - initEReference(getApplyProfiles_Base_Dependency(), theUMLPackage.getDependency(), null, - "base_Dependency", null, 1, 1, ApplyProfiles.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED); //$NON-NLS-1$ + initEReference(getApplyProfiles_Base_Dependency(), theUMLPackage.getDependency(), null, "base_Dependency", null, 1, 1, ApplyProfiles.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, //$NON-NLS-1$ + !IS_DERIVED, !IS_ORDERED); initEOperation(getApplyProfiles__GetAppliedProfiles(), theUMLPackage.getProfile(), "getAppliedProfiles", 0, -1, IS_UNIQUE, !IS_ORDERED); //$NON-NLS-1$ @@ -277,18 +275,17 @@ public class ProfileExternalizationPackageImpl extends EPackageImpl implements P * * @generated */ - protected void createEcoreAnnotations() - { + protected void createEcoreAnnotations() { String source = "http://www.eclipse.org/emf/2002/Ecore"; //$NON-NLS-1$ addAnnotation(this, source, - new String[] - { "validationDelegates", "http://www.eclipse.org/emf/2002/Ecore/OCL" //$NON-NLS-1$ //$NON-NLS-2$ + new String[] { + "validationDelegates", "http://www.eclipse.org/emf/2002/Ecore/OCL" //$NON-NLS-1$ //$NON-NLS-2$ }); addAnnotation(applyProfilesEClass, source, - new String[] - { "constraints", "suppliers_are_packages clients_are_packages" //$NON-NLS-1$ //$NON-NLS-2$ + new String[] { + "constraints", "suppliers_are_packages clients_are_packages" //$NON-NLS-1$ //$NON-NLS-2$ }); } @@ -299,13 +296,12 @@ public class ProfileExternalizationPackageImpl extends EPackageImpl implements P * * @generated */ - protected void createUMLAnnotations() - { + protected void createUMLAnnotations() { String source = "http://www.eclipse.org/uml2/2.0.0/UML"; //$NON-NLS-1$ addAnnotation(this, source, - new String[] - { "originalName", "ProfileExternalization" //$NON-NLS-1$ //$NON-NLS-2$ + new String[] { + "originalName", "ProfileExternalization" //$NON-NLS-1$ //$NON-NLS-2$ }); } @@ -316,13 +312,12 @@ public class ProfileExternalizationPackageImpl extends EPackageImpl implements P * * @generated */ - protected void createOCLAnnotations() - { + protected void createOCLAnnotations() { String source = "http://www.eclipse.org/emf/2002/Ecore/OCL"; //$NON-NLS-1$ addAnnotation(applyProfilesEClass, source, - new String[] - { "suppliers_are_packages", "base_Dependency.supplier->forAll(oclIsKindOf(uml::Package))", //$NON-NLS-1$ //$NON-NLS-2$ + new String[] { + "suppliers_are_packages", "base_Dependency.supplier->forAll(oclIsKindOf(uml::Package))", //$NON-NLS-1$ //$NON-NLS-2$ "clients_are_packages", "base_Dependency.client->forAll(oclIsKindOf(uml::Package))" //$NON-NLS-1$ //$NON-NLS-2$ }); } @@ -334,13 +329,12 @@ public class ProfileExternalizationPackageImpl extends EPackageImpl implements P * * @generated */ - protected void createEmofAnnotations() - { + protected void createEmofAnnotations() { String source = "http://schema.omg.org/spec/MOF/2.0/emof.xml#Property.oppositeRoleName"; //$NON-NLS-1$ addAnnotation(getApplyProfiles_Base_Dependency(), source, - new String[] - { "body", "extension_ApplyProfiles" //$NON-NLS-1$ //$NON-NLS-2$ + new String[] { + "body", "extension_ApplyProfiles" //$NON-NLS-1$ //$NON-NLS-2$ }); } diff --git a/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel/src-gen/org/eclipse/papyrus/uml/decoratormodel/profileExternalization/internal/operations/ApplyProfilesOperations.java b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel/src-gen/org/eclipse/papyrus/uml/decoratormodel/profileExternalization/internal/operations/ApplyProfilesOperations.java index e4a6ac29a1f..d1cd67603ef 100644..100755 --- a/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel/src-gen/org/eclipse/papyrus/uml/decoratormodel/profileExternalization/internal/operations/ApplyProfilesOperations.java +++ b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel/src-gen/org/eclipse/papyrus/uml/decoratormodel/profileExternalization/internal/operations/ApplyProfilesOperations.java @@ -30,16 +30,15 @@ import org.eclipse.uml2.uml.Profile; * * <p> * The following operations are supported: + * </p> * <ul> * <li>{@link org.eclipse.papyrus.uml.decoratormodel.profileExternalization.ApplyProfiles#getAppliedProfiles() <em>Get Applied Profiles</em>}</li> * <li>{@link org.eclipse.papyrus.uml.decoratormodel.profileExternalization.ApplyProfiles#getExternalizedAppliedProfilePackages() <em>Get Externalized Applied Profile Packages</em>}</li> * </ul> - * </p> * * @generated */ -public class ApplyProfilesOperations -{ +public class ApplyProfilesOperations { /** * <!-- begin-user-doc --> * <!-- end-user-doc --> @@ -57,13 +56,13 @@ public class ApplyProfilesOperations * @generated NOT */ public static EList<Profile> getAppliedProfiles(ApplyProfiles applyProfiles) { - Set<Profile> result = new HashSet<Profile>(); + Set<Profile> result = new HashSet<>(); for (org.eclipse.uml2.uml.Package package_ : applyProfiles.getExternalizedAppliedProfilePackages()) { result.addAll(package_.getAppliedProfiles()); } - return new BasicEList.UnmodifiableEList<Profile>(result.size(), result.toArray()); + return new BasicEList.UnmodifiableEList<>(result.size(), result.toArray()); } /** @@ -73,7 +72,7 @@ public class ApplyProfilesOperations * @generated NOT */ public static EList<org.eclipse.uml2.uml.Package> getExternalizedAppliedProfilePackages(ApplyProfiles applyProfiles) { - Set<org.eclipse.uml2.uml.Package> result = new HashSet<org.eclipse.uml2.uml.Package>(); + Set<org.eclipse.uml2.uml.Package> result = new HashSet<>(); Dependency base = applyProfiles.getBase_Dependency(); if (base != null) { @@ -84,7 +83,7 @@ public class ApplyProfilesOperations } } - return new BasicEList.UnmodifiableEList<org.eclipse.uml2.uml.Package>(result.size(), result.toArray()); + return new BasicEList.UnmodifiableEList<>(result.size(), result.toArray()); } } // ApplyProfilesOperations
\ No newline at end of file diff --git a/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel/src-gen/org/eclipse/papyrus/uml/decoratormodel/profileExternalization/util/ProfileExternalizationAdapterFactory.java b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel/src-gen/org/eclipse/papyrus/uml/decoratormodel/profileExternalization/util/ProfileExternalizationAdapterFactory.java index cee16dc8272..edb84485629 100644..100755 --- a/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel/src-gen/org/eclipse/papyrus/uml/decoratormodel/profileExternalization/util/ProfileExternalizationAdapterFactory.java +++ b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel/src-gen/org/eclipse/papyrus/uml/decoratormodel/profileExternalization/util/ProfileExternalizationAdapterFactory.java @@ -28,8 +28,7 @@ import org.eclipse.papyrus.uml.decoratormodel.profileExternalization.*; * @see org.eclipse.papyrus.uml.decoratormodel.profileExternalization.ProfileExternalizationPackage * @generated */ -public class ProfileExternalizationAdapterFactory extends AdapterFactoryImpl -{ +public class ProfileExternalizationAdapterFactory extends AdapterFactoryImpl { /** * The cached model package. * <!-- begin-user-doc --> @@ -46,10 +45,8 @@ public class ProfileExternalizationAdapterFactory extends AdapterFactoryImpl * * @generated */ - public ProfileExternalizationAdapterFactory() - { - if (modelPackage == null) - { + public ProfileExternalizationAdapterFactory() { + if (modelPackage == null) { modelPackage = ProfileExternalizationPackage.eINSTANCE; } } @@ -64,14 +61,11 @@ public class ProfileExternalizationAdapterFactory extends AdapterFactoryImpl * @generated */ @Override - public boolean isFactoryForType(Object object) - { - if (object == modelPackage) - { + public boolean isFactoryForType(Object object) { + if (object == modelPackage) { return true; } - if (object instanceof EObject) - { + if (object instanceof EObject) { return ((EObject) object).eClass().getEPackage() == modelPackage; } return false; @@ -84,21 +78,17 @@ public class ProfileExternalizationAdapterFactory extends AdapterFactoryImpl * * @generated */ - protected ProfileExternalizationSwitch<Adapter> modelSwitch = - new ProfileExternalizationSwitch<Adapter>() - { - @Override - public Adapter caseApplyProfiles(ApplyProfiles object) - { - return createApplyProfilesAdapter(); - } + protected ProfileExternalizationSwitch<Adapter> modelSwitch = new ProfileExternalizationSwitch<Adapter>() { + @Override + public Adapter caseApplyProfiles(ApplyProfiles object) { + return createApplyProfilesAdapter(); + } - @Override - public Adapter defaultCase(EObject object) - { - return createEObjectAdapter(); - } - }; + @Override + public Adapter defaultCase(EObject object) { + return createEObjectAdapter(); + } + }; /** * Creates an adapter for the <code>target</code>. @@ -111,8 +101,7 @@ public class ProfileExternalizationAdapterFactory extends AdapterFactoryImpl * @generated */ @Override - public Adapter createAdapter(Notifier target) - { + public Adapter createAdapter(Notifier target) { return modelSwitch.doSwitch((EObject) target); } @@ -128,8 +117,7 @@ public class ProfileExternalizationAdapterFactory extends AdapterFactoryImpl * @see org.eclipse.papyrus.uml.decoratormodel.profileExternalization.ApplyProfiles * @generated */ - public Adapter createApplyProfilesAdapter() - { + public Adapter createApplyProfilesAdapter() { return null; } @@ -142,8 +130,7 @@ public class ProfileExternalizationAdapterFactory extends AdapterFactoryImpl * @return the new adapter. * @generated */ - public Adapter createEObjectAdapter() - { + public Adapter createEObjectAdapter() { return null; } diff --git a/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel/src-gen/org/eclipse/papyrus/uml/decoratormodel/profileExternalization/util/ProfileExternalizationSwitch.java b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel/src-gen/org/eclipse/papyrus/uml/decoratormodel/profileExternalization/util/ProfileExternalizationSwitch.java index 10d8225afa9..d3ee520bc22 100644..100755 --- a/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel/src-gen/org/eclipse/papyrus/uml/decoratormodel/profileExternalization/util/ProfileExternalizationSwitch.java +++ b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel/src-gen/org/eclipse/papyrus/uml/decoratormodel/profileExternalization/util/ProfileExternalizationSwitch.java @@ -31,8 +31,7 @@ import org.eclipse.papyrus.uml.decoratormodel.profileExternalization.*; * @see org.eclipse.papyrus.uml.decoratormodel.profileExternalization.ProfileExternalizationPackage * @generated */ -public class ProfileExternalizationSwitch<T> extends Switch<T> -{ +public class ProfileExternalizationSwitch<T> extends Switch<T> { /** * The cached model package * <!-- begin-user-doc --> @@ -49,10 +48,8 @@ public class ProfileExternalizationSwitch<T> extends Switch<T> * * @generated */ - public ProfileExternalizationSwitch() - { - if (modelPackage == null) - { + public ProfileExternalizationSwitch() { + if (modelPackage == null) { modelPackage = ProfileExternalizationPackage.eINSTANCE; } } @@ -62,13 +59,13 @@ public class ProfileExternalizationSwitch<T> extends Switch<T> * <!-- begin-user-doc --> * <!-- end-user-doc --> * - * @parameter ePackage the package in question. + * @param ePackage + * the package in question. * @return whether this is a switch for the given package. * @generated */ @Override - protected boolean isSwitchFor(EPackage ePackage) - { + protected boolean isSwitchFor(EPackage ePackage) { return ePackage == modelPackage; } @@ -81,10 +78,8 @@ public class ProfileExternalizationSwitch<T> extends Switch<T> * @generated */ @Override - protected T doSwitch(int classifierID, EObject theEObject) - { - switch (classifierID) - { + protected T doSwitch(int classifierID, EObject theEObject) { + switch (classifierID) { case ProfileExternalizationPackage.APPLY_PROFILES: { ApplyProfiles applyProfiles = (ApplyProfiles) theEObject; T result = caseApplyProfiles(applyProfiles); @@ -111,8 +106,7 @@ public class ProfileExternalizationSwitch<T> extends Switch<T> * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) * @generated */ - public T caseApplyProfiles(ApplyProfiles object) - { + public T caseApplyProfiles(ApplyProfiles object) { return null; } @@ -130,8 +124,7 @@ public class ProfileExternalizationSwitch<T> extends Switch<T> * @generated */ @Override - public T defaultCase(EObject object) - { + public T defaultCase(EObject object) { return null; } diff --git a/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel/src-gen/org/eclipse/papyrus/uml/decoratormodel/profileExternalization/util/ProfileExternalizationValidator.java b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel/src-gen/org/eclipse/papyrus/uml/decoratormodel/profileExternalization/util/ProfileExternalizationValidator.java index 9485487cb99..4508ce8368a 100644..100755 --- a/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel/src-gen/org/eclipse/papyrus/uml/decoratormodel/profileExternalization/util/ProfileExternalizationValidator.java +++ b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel/src-gen/org/eclipse/papyrus/uml/decoratormodel/profileExternalization/util/ProfileExternalizationValidator.java @@ -30,8 +30,7 @@ import org.eclipse.papyrus.uml.decoratormodel.profileExternalization.*; * @see org.eclipse.papyrus.uml.decoratormodel.profileExternalization.ProfileExternalizationPackage * @generated */ -public class ProfileExternalizationValidator extends EObjectValidator -{ +public class ProfileExternalizationValidator extends EObjectValidator { /** * The cached model package * <!-- begin-user-doc --> @@ -77,8 +76,7 @@ public class ProfileExternalizationValidator extends EObjectValidator * * @generated */ - public ProfileExternalizationValidator() - { + public ProfileExternalizationValidator() { super(); } @@ -90,8 +88,7 @@ public class ProfileExternalizationValidator extends EObjectValidator * @generated */ @Override - protected EPackage getEPackage() - { + protected EPackage getEPackage() { return ProfileExternalizationPackage.eINSTANCE; } @@ -103,10 +100,8 @@ public class ProfileExternalizationValidator extends EObjectValidator * @generated */ @Override - protected boolean validate(int classifierID, Object value, DiagnosticChain diagnostics, Map<Object, Object> context) - { - switch (classifierID) - { + protected boolean validate(int classifierID, Object value, DiagnosticChain diagnostics, Map<Object, Object> context) { + switch (classifierID) { case ProfileExternalizationPackage.APPLY_PROFILES: return validateApplyProfiles((ApplyProfiles) value, diagnostics, context); default: @@ -120,8 +115,7 @@ public class ProfileExternalizationValidator extends EObjectValidator * * @generated */ - public boolean validateApplyProfiles(ApplyProfiles applyProfiles, DiagnosticChain diagnostics, Map<Object, Object> context) - { + public boolean validateApplyProfiles(ApplyProfiles applyProfiles, DiagnosticChain diagnostics, Map<Object, Object> context) { if (!validate_NoCircularContainment(applyProfiles, diagnostics, context)) { return false; } @@ -172,12 +166,12 @@ public class ProfileExternalizationValidator extends EObjectValidator * * @generated */ - public boolean validateApplyProfiles_suppliers_are_packages(ApplyProfiles applyProfiles, DiagnosticChain diagnostics, Map<Object, Object> context) - { + public boolean validateApplyProfiles_suppliers_are_packages(ApplyProfiles applyProfiles, DiagnosticChain diagnostics, Map<Object, Object> context) { return validate(ProfileExternalizationPackage.Literals.APPLY_PROFILES, applyProfiles, diagnostics, - context, "http://www.eclipse.org/emf/2002/Ecore/OCL", //$NON-NLS-1$ + context, + "http://www.eclipse.org/emf/2002/Ecore/OCL", //$NON-NLS-1$ "suppliers_are_packages", //$NON-NLS-1$ APPLY_PROFILES__SUPPLIERS_ARE_PACKAGES__EEXPRESSION, Diagnostic.ERROR, @@ -201,12 +195,12 @@ public class ProfileExternalizationValidator extends EObjectValidator * * @generated */ - public boolean validateApplyProfiles_clients_are_packages(ApplyProfiles applyProfiles, DiagnosticChain diagnostics, Map<Object, Object> context) - { + public boolean validateApplyProfiles_clients_are_packages(ApplyProfiles applyProfiles, DiagnosticChain diagnostics, Map<Object, Object> context) { return validate(ProfileExternalizationPackage.Literals.APPLY_PROFILES, applyProfiles, diagnostics, - context, "http://www.eclipse.org/emf/2002/Ecore/OCL", //$NON-NLS-1$ + context, + "http://www.eclipse.org/emf/2002/Ecore/OCL", //$NON-NLS-1$ "clients_are_packages", //$NON-NLS-1$ APPLY_PROFILES__CLIENTS_ARE_PACKAGES__EEXPRESSION, Diagnostic.ERROR, @@ -222,8 +216,7 @@ public class ProfileExternalizationValidator extends EObjectValidator * @generated */ @Override - public ResourceLocator getResourceLocator() - { + public ResourceLocator getResourceLocator() { // TODO // Specialize this to return a resource locator for messages specific to this validator. // Ensure that you remove @generated or mark it @generated NOT diff --git a/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel/src/org/eclipse/papyrus/uml/decoratormodel/helper/DecoratorModelUtils.java b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel/src/org/eclipse/papyrus/uml/decoratormodel/helper/DecoratorModelUtils.java index 4933fb6808b..a4aff1f93f6 100644..100755 --- a/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel/src/org/eclipse/papyrus/uml/decoratormodel/helper/DecoratorModelUtils.java +++ b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel/src/org/eclipse/papyrus/uml/decoratormodel/helper/DecoratorModelUtils.java @@ -1,6 +1,6 @@ /***************************************************************************** - * Copyright (c) 2013, 2015 CEA LIST, Christian W. Damus, and others. - * + * Copyright (c) 2013, 2015, 2018 CEA LIST, Christian W. Damus, and others. + * * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License 2.0 * which accompanies this distribution, and is available at @@ -14,7 +14,7 @@ * Christian W. Damus - bug 458197 * Christian W. Damus - bug 459613 * Christian W. Damus - bug 468030 - * + * Vincent LORENZO - bug 541313 - [UML][CDO] UML calls to the method getCacheAdapter(EObject) must be replaced *****************************************************************************/ package org.eclipse.papyrus.uml.decoratormodel.helper; @@ -139,7 +139,7 @@ public class DecoratorModelUtils { // their own applications of the same profile. For that matter, don't move stereotype applications governed by another // application of the same profile in the *same* resource (each stereotype application is tied to a particular // profile application, which may not be the one that we're externalizing) - List<EObject> stereotypeApplications = new ArrayList<EObject>(); + List<EObject> stereotypeApplications = new ArrayList<>(); for (TreeIterator<EObject> iter = UML2Util.getAllContents(applyingPackage, true, false); iter.hasNext();) { EObject next = iter.next(); if ((next instanceof Package) && (((Package) next).getProfileApplication(appliedProfile) != null)) { @@ -178,7 +178,7 @@ public class DecoratorModelUtils { Package applyingPackage = getUserPackage(externalPackage); // Find all of the profile's stereotype applications in the source resource - List<EObject> stereotypeApplications = new ArrayList<EObject>(); + List<EObject> stereotypeApplications = new ArrayList<>(); for (EObject next : sourceResource.getContents()) { if (!(next instanceof Element) && isDefinedBy(profileApplication, next)) { stereotypeApplications.add(next); @@ -263,7 +263,7 @@ public class DecoratorModelUtils { private static boolean isApplyProfiles(Dependency dependency) { boolean result = false; - CacheAdapter cache = CacheAdapter.getCacheAdapter(dependency); + CacheAdapter cache = CacheAdapter.getInstance(); if (cache != null) { for (EStructuralFeature.Setting setting : cache.getNonNavigableInverseReferences(dependency)) { if (setting.getEStructuralFeature() == ProfileExternalizationPackage.Literals.APPLY_PROFILES__BASE_DEPENDENCY) { @@ -280,7 +280,7 @@ public class DecoratorModelUtils { * Queries the packages in currently loaded decorator models that provide profile applications to a given package. * <p> * This method does <em>not</em> access the decorator model index. - * + * * @param package_ * a package * @return its currently loaded decorator-model packages @@ -290,7 +290,7 @@ public class DecoratorModelUtils { for (ApplyProfiles next : getDecoratorModelDependencies(package_)) { if (result == null) { - result = new LinkedHashSet<Package>(); + result = new LinkedHashSet<>(); } result.addAll(next.getExternalizedAppliedProfilePackages()); } @@ -302,7 +302,7 @@ public class DecoratorModelUtils { * Queries the currently loaded profile applications of a package that are provided by decorator models. * <p> * This method does <em>not</em> access the decorator model index. - * + * * @param package_ * a package * @return its currently loaded decorator-model profile applications @@ -312,7 +312,7 @@ public class DecoratorModelUtils { for (ApplyProfiles next : getDecoratorModelDependencies(package_)) { if (result == null) { - result = new LinkedHashSet<ProfileApplication>(); + result = new LinkedHashSet<>(); } for (Package externalPackage : next.getExternalizedAppliedProfilePackages()) { result.addAll(externalPackage.getProfileApplications()); @@ -326,7 +326,7 @@ public class DecoratorModelUtils { * Queries the package in the user model to which an externalized profile application applies a profile. * <p> * This method does <em>not</em> access the decorator model index. - * + * * @param profileApplication * a profile application * @return the user-model package to which it applies a profile @@ -343,10 +343,10 @@ public class DecoratorModelUtils { * Queries a mapping of the currently loaded profile applications in a decorator model resource. * <p> * This method does <em>not</em> access the decorator model index. - * + * * @param decoratorModel * a decorator model resource - * + * * @return a mapping of user-model package to applied profile as specified by the decorator model */ public static Map<Package, Profile> getDecoratorProfileApplications(Resource decoratorModel) { @@ -370,10 +370,10 @@ public class DecoratorModelUtils { * Queries the currently loaded applied profiles of a package from decorator models. * <p> * This method does <em>not</em> access the decorator model index. - * + * * @param package_ * a user model package - * + * * @return its applied profiles from currently loaded decorator models */ public static Iterable<Profile> getDecoratorModelAppliedProfiles(Package package_) { @@ -381,7 +381,7 @@ public class DecoratorModelUtils { for (ApplyProfiles next : getDecoratorModelDependencies(package_)) { if (result == null) { - result = new LinkedHashSet<Profile>(); + result = new LinkedHashSet<>(); } result.addAll(next.getAppliedProfiles()); } @@ -397,15 +397,15 @@ public class DecoratorModelUtils { * <p> * This method <em>accesses the decorator model index</em> and is therefore not suitable for use in time-sensitive code because an invocation may block the caller for an indeterminate interval. It is equivalent to invoking * {@code getAllDecoratorModelAppliedProfileDefinitions(package_, true, true)}. - * + * * @param package_ * a user model package - * + * * @return the mapping of URIs of all profiles that it applies, loaded and unloaded, to applied Ecore definitions by decorator model - * + * * @throws CoreException * on failure to access the decorator model index - * + * * @see #getAllDecoratorModelAppliedProfileDefinitions(Package, boolean, boolean) */ public static Map<URI, Map<URI, URI>> getAllDecoratorModelAppliedProfileDefinitions(Package package_) throws CoreException { @@ -419,7 +419,7 @@ public class DecoratorModelUtils { * to the same package. * <p> * This method <em>accesses the decorator model index</em> if {@code includeUnloaded} is {@code true} and is therefore not suitable for use in time-sensitive code in that case because an invocation may block the caller for an indeterminate interval. - * + * * @param package_ * a user model package * @param includeLoaded @@ -427,9 +427,9 @@ public class DecoratorModelUtils { * @param includeUnloaded * whether to include profile definitions from decorator models that are <em>not</em> currently loaded. * Obviously, it is not useful to exclude both loaded and unloaded decorator models, because that guarantees an empty result - * + * * @return the mapping of URIs of all profiles that it applies, loaded and unloaded, to applied Ecore definitions by decorator model - * + * * @throws CoreException * on failure to access the decorator model index in the {@code includeUnloaded} case */ @@ -500,10 +500,10 @@ public class DecoratorModelUtils { List<ApplyProfiles> result = null; for (Dependency dependency : package_.getClientDependencies()) { - for (EStructuralFeature.Setting setting : CacheAdapter.getCacheAdapter(dependency).getNonNavigableInverseReferences(dependency)) { + for (EStructuralFeature.Setting setting : CacheAdapter.getInstance().getNonNavigableInverseReferences(dependency)) { if (setting.getEStructuralFeature() == ProfileExternalizationPackage.Literals.APPLY_PROFILES__BASE_DEPENDENCY) { if (result == null) { - result = new ArrayList<ApplyProfiles>(); + result = new ArrayList<>(); } result.add((ApplyProfiles) setting.getEObject()); @@ -541,7 +541,7 @@ public class DecoratorModelUtils { * Queries the package in the user model to which a package in the decorator model applies profiles. * <p> * This method does <em>not</em> access the decorator model index. - * + * * @param decoratorPackage * a package in a decorator model * @return the user-model package to which it applies profiles @@ -565,7 +565,7 @@ public class DecoratorModelUtils { * Queries whether a package has the externalization profile applied that is used by decorator models. * <p> * This method does <em>not</em> access the decorator model index. - * + * * @param package_ * a package * @return whether it has the externalization profile applied @@ -616,12 +616,12 @@ public class DecoratorModelUtils { /** * Creates a command that reintegrates the specified profile applications into the user model proper. Empty decorator models will always be deleted. - * + * * @param profileApplications * the externalized profile applications to reintegrate - * + * * @return the delete command, or an unexecutable command if the request is invalid for some reason - * + * * @see #createReclaimProfileApplicationsCommand(Iterable, IDeleteEmptyDecoratorModelsPolicy) */ public static Command createReclaimProfileApplicationsCommand(Iterable<? extends ProfileApplication> profileApplications) { @@ -630,12 +630,12 @@ public class DecoratorModelUtils { /** * Creates a command that reintegrates the specified profile applications into the user model proper. - * + * * @param profileApplications * the externalized profile applications to reintegrate * @param deletePolicy * an optional policy determining whether any decorator models that are left without profile applications should be deleted. May be {@code null}, in which case empty decorator models will be deleted - * + * * @return the delete command, or an unexecutable command if the request is invalid for some reason */ public static Command createReclaimProfileApplicationsCommand(Iterable<? extends ProfileApplication> profileApplications, IDeleteEmptyDecoratorModelsPolicy deletePolicy) { @@ -676,16 +676,16 @@ public class DecoratorModelUtils { * Queries whether a package is the root of a decorator model. * <p> * This method does <em>not</em> access the decorator model index. - * + * * @param package_ * the root package of some UML model - * + * * @return whether it is a loaded decorator model */ public static boolean isDecoratorModel(Package package_) { // Must be a root return (((InternalEObject) package_).eDirectResource() != null) && - // Must have the externalization profile applied + // Must have the externalization profile applied hasExternalizationProfile(package_); } @@ -693,10 +693,10 @@ public class DecoratorModelUtils { * Queries whether a resource is a loaded decorator model resource. * <p> * This method does <em>not</em> access the decorator model index. - * + * * @param resource * a resource - * + * * @return whether it is a loaded decorator model resource */ public static boolean isDecoratorModel(Resource resource) { @@ -714,12 +714,12 @@ public class DecoratorModelUtils { * Queries whether a resource is a loaded decorator model for the given user model resource. * <p> * This method does <em>not</em> access the decorator model index. - * + * * @param resource * a resource * @param modelResource * a user model resource - * + * * @return whether the {@code resource} is a loaded decorator model for the user model resource */ public static boolean isDecoratorModelFor(Resource resource, Resource modelResource) { @@ -750,10 +750,10 @@ public class DecoratorModelUtils { * Queries the URIs of user model resources that contain packages for which a decorator model provides applied profiles. * <p> * This method does <em>not</em> access the decorator model index. - * + * * @param decoratorModelResource * a resource in a decorator model - * + * * @return the URIs of resources in user models containing packages to which the decorator model applies profiles */ public static Set<URI> getUserModelResources(Resource decoratorModelResource) { @@ -784,10 +784,10 @@ public class DecoratorModelUtils { * Queries whether a given {@code file} is a decorator model resource. * <p> * This method does <em>not</em> access the decorator model index. - * + * * @param file * a workspace file - * + * * @return whether the fileexists and is a decorator model */ public static boolean isDecoratorModel(IFile file) { @@ -810,10 +810,10 @@ public class DecoratorModelUtils { * Whether the resource indicated by the given URI is a decorator model resource. * <p> * This method does <em>not</em> access the decorator model index. - * + * * @param uri * the URI of some resource, which may or may not exist - * + * * @return whether the resource at the URI exists and is a decorator model */ public static boolean isDecoratorModel(URI uri) { @@ -858,10 +858,10 @@ public class DecoratorModelUtils { * profile applications for packages in that user model resource. * <p> * This method does <em>not</em> access the decorator model index. - * + * * @param modelResource * a resource in an user model - * + * * @return the URIs of resources currently loaded in the same resource set that provide profile applications to packages * in the user model resource */ @@ -871,7 +871,7 @@ public class DecoratorModelUtils { return Collections.emptySet(); } - CacheAdapter cache = CacheAdapter.getCacheAdapter(root); + CacheAdapter cache = CacheAdapter.getInstance(); @SuppressWarnings("unchecked") Set<URI> result = (Set<URI>) cache.get(root, LOADED_RESOURCES_CACHE_KEY); @@ -906,11 +906,11 @@ public class DecoratorModelUtils { * <p> * This method <em>accesses the decorator model index</em> and is therefore not suitable for use in time-sensitive code because an invocation may block the caller for an indeterminate interval. In cases where responsiveness is essential, use the * {@link #getUnloadedDecoratorModelsAsync(Resource)} API, instead. - * + * * @param modelResource * a user model resource * @return the URIs of its currently available unloaded decorator models - * + * * @see #getUnloadedDecoratorModelsAsync(Resource) */ public static Set<URI> getUnloadedDecoratorModels(Resource modelResource) { @@ -919,7 +919,7 @@ public class DecoratorModelUtils { return Collections.emptySet(); } - CacheAdapter cache = CacheAdapter.getCacheAdapter(root); + CacheAdapter cache = CacheAdapter.getInstance(); @SuppressWarnings("unchecked") Set<URI> result = (Set<URI>) cache.get(root, UNLOADED_RESOURCE_DECORATORS_CACHE_KEY); @@ -941,11 +941,11 @@ public class DecoratorModelUtils { * packages in the given user model resource. This set excludes and decorator models that have profile applications that * would conflict with natively-applied profiles of packages in the user model resource, as it would not be permitted * to load any of these. - * + * * @param modelResource * a user model resource * @return the future result of the URIs of its currently available unloaded decorator models - * + * * @see #getUnloadedDecoratorModelsAsync(Iterable) * @see #getUnloadedDecoratorModelsAsync(Package) * @see #getUnloadedDecoratorModels(Resource) @@ -959,11 +959,11 @@ public class DecoratorModelUtils { * packages in the given user model resources. This set excludes and decorator models that have profile applications that * would conflict with natively-applied profiles of packages in the user model resources, as it would not be permitted * to load any of these. - * + * * @param modelResources * zero or more user model resources * @return the future result of the URIs of their currently available unloaded decorator models - * + * * @see #getUnloadedDecoratorModelsAsync(Resource) * @see #getUnloadedDecoratorModelsAsync(Package) */ @@ -981,7 +981,7 @@ public class DecoratorModelUtils { for (Resource modelResource : modelResources) { Element root = Iterables.isEmpty(modelResources) ? null : (Element) EcoreUtil.getObjectByType(modelResource.getContents(), UMLPackage.Literals.ELEMENT); if (root != null) { - CacheAdapter cache = CacheAdapter.getCacheAdapter(root); + CacheAdapter cache = CacheAdapter.getInstance(); @SuppressWarnings("unchecked") Set<URI> local = (Set<URI>) cache.get(root, UNLOADED_RESOURCE_DECORATORS_CACHE_KEY); @@ -1006,11 +1006,11 @@ public class DecoratorModelUtils { * the given user model package. This set excludes and decorator models that have profile applications that * would conflict with natively-applied profiles of that package, as it would not be permitted * to load any of these. - * + * * @param package_ * a package in a user model * @return the future result of the URIs of its currently available unloaded decorator models - * + * * @see #getUnloadedDecoratorModelsAsync(Resource) * @see #getUnloadedDecoratorModelsAsync(Iterable) */ @@ -1019,7 +1019,7 @@ public class DecoratorModelUtils { return Futures.immediateFuture(Collections.<URI> emptySet()); } - CacheAdapter cache = CacheAdapter.getCacheAdapter(package_); + CacheAdapter cache = CacheAdapter.getInstance(); @SuppressWarnings("unchecked") Set<URI> cached = (Set<URI>) cache.get(package_, UNLOADED_PACKAGE_DECORATORS_CACHE_KEY); if (cached != null) { @@ -1044,7 +1044,7 @@ public class DecoratorModelUtils { // filter for only those unloaded resources that apply profiles to this package result.retainAll(input); - CacheAdapter cache = CacheAdapter.getCacheAdapter(package_); + CacheAdapter cache = CacheAdapter.getInstance(); cache.put(package_, UNLOADED_PACKAGE_DECORATORS_CACHE_KEY, result); return result; @@ -1057,13 +1057,13 @@ public class DecoratorModelUtils { /** * Asynchronously queries whether the resource containing the given package (or, optionally, any of its currently loaded * sub-units) has applicable decorator models that are not yet loaded. - * + * * @param package_ * a package in a user model * @param recursive * whether to check loaded sub-units recursively * @return the future result of whether the package has available unloaded decorator models - * + * * @see #getUnloadedDecoratorModelsAsync(Resource) */ public static ListenableFuture<Boolean> hasUnloadedDecoratorModelsAsync(Package package_, boolean recursive) { @@ -1117,7 +1117,7 @@ public class DecoratorModelUtils { return Collections.emptyList(); } - CacheAdapter cache = CacheAdapter.getCacheAdapter(root); + CacheAdapter cache = CacheAdapter.getInstance(); @SuppressWarnings("unchecked") Collection<ProfileApplication> result = (Collection<ProfileApplication>) cache.get(root, INTRINSIC_PROFILE_APPLICATIONS_CACHE_KEY); @@ -1160,10 +1160,10 @@ public class DecoratorModelUtils { * Obtains the currently loaded packages nested to any depth within the given package that are roots of sub-unit resources. * <p> * This method does <em>not</em> access the decorator model index. - * + * * @param package_ * a package in an user model - * + * * @return nested packages that are roots of loaded sub-unit resources */ public static Iterable<Package> getLoadedSubUnitPackages(Package package_) { @@ -1203,12 +1203,12 @@ public class DecoratorModelUtils { * Loads the specified decorator models in a given resource set context. * <p> * This method does <em>not</em> access the decorator model index. - * + * * @param resourceSet * the context in which to load the decorator models * @param resourceURIs * URIs of the decorator models to load - * + * * @return whether the decorator models were successfully loaded */ public static boolean loadDecoratorModels(final ResourceSet resourceSet, final Iterable<? extends URI> resourceURIs) { @@ -1247,7 +1247,7 @@ public class DecoratorModelUtils { /** * Configures a resource set to support profile applications externalized in decorator models. - * + * * @param resourceSet * the resource set to configure */ diff --git a/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel/src/org/eclipse/papyrus/uml/decoratormodel/model/DecoratorModel.java b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel/src/org/eclipse/papyrus/uml/decoratormodel/model/DecoratorModel.java index f6705dfcfc9..eb5c2dd0be2 100644 --- a/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel/src/org/eclipse/papyrus/uml/decoratormodel/model/DecoratorModel.java +++ b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel/src/org/eclipse/papyrus/uml/decoratormodel/model/DecoratorModel.java @@ -1,6 +1,6 @@ /***************************************************************************** - * Copyright (c) 2013, 2015 CEA LIST, Christian W. Damus, and others. - * + * Copyright (c) 2013, 2015, 2018 CEA LIST, Christian W. Damus, and others. + * * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License 2.0 * which accompanies this distribution, and is available at @@ -14,7 +14,7 @@ * Christian W. Damus - bug 458655 * Christian W. Damus - bug 458197 * Christian W. Damus - bug 481149 - * + * Vincent LORENZO - bug 541313 - [UML][CDO] UML calls to the method getCacheAdapter(EObject) must be replaced *****************************************************************************/ package org.eclipse.papyrus.uml.decoratormodel.model; @@ -91,7 +91,7 @@ public class DecoratorModel extends AbstractModel { /** * Returns a platform resource URI of the given path - * + * * @param path * the path * @return the uri @@ -121,7 +121,7 @@ public class DecoratorModel extends AbstractModel { /** * Returns the dynamically computed list of resources that are loaded decorator models. - * + * * @return the loaded decorator models */ protected List<Resource> getResources() { @@ -236,7 +236,7 @@ public class DecoratorModel extends AbstractModel { if (domain != null) { Adapter recorder = ((InternalTransactionalEditingDomain) domain).getChangeRecorder(); if (recorder != null) { - int afterCacheAdapter = resource.eAdapters().indexOf(CacheAdapter.getCacheAdapter(resource)) + 1; + int afterCacheAdapter = resource.eAdapters().indexOf(CacheAdapter.getInstance()) + 1; int index = resource.eAdapters().indexOf(recorder); if (index < 0) { resource.eAdapters().add(afterCacheAdapter, recorder); |