Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBenoit Maggi2018-06-25 12:49:55 +0000
committerBenoit Maggi2018-06-25 13:21:00 +0000
commit42b09296f7ec5240d422e86a71b05f8a3ce64542 (patch)
treed5d2e6f26e808c2e561bd2a63a6be6ad5dddc8ea /plugins/infra/architecture
parenta1fb9d3bd28792386e25c71e89b16ad812b5da32 (diff)
downloadorg.eclipse.papyrus-42b09296f7ec5240d422e86a71b05f8a3ce64542.tar.gz
org.eclipse.papyrus-42b09296f7ec5240d422e86a71b05f8a3ce64542.tar.xz
org.eclipse.papyrus-42b09296f7ec5240d422e86a71b05f8a3ce64542.zip
Bug 536247 - [Tests] Add a test plugin to infra architecture
- add test plugin - create first test class MergedArchitectureDomainTest - quality fixes - add missing informations in extension points Change-Id: I9220040c3ae2000303a5195786a808c52774c25d Signed-off-by: Benoit Maggi <benoit.maggi@cea.fr>
Diffstat (limited to 'plugins/infra/architecture')
-rw-r--r--plugins/infra/architecture/org.eclipse.papyrus.infra.architecture.representation.edit/src/org/eclipse/papyrus/infra/architecture/representation/provider/ComplexTypePropertyDescriptor.java2
-rw-r--r--plugins/infra/architecture/org.eclipse.papyrus.infra.architecture.representation.edit/src/org/eclipse/papyrus/infra/architecture/representation/provider/EClassPropertyDescriptor.java4
-rw-r--r--plugins/infra/architecture/org.eclipse.papyrus.infra.architecture.representation.edit/src/org/eclipse/papyrus/infra/architecture/representation/provider/EReferencePropertyDescriptor.java5
-rw-r--r--plugins/infra/architecture/org.eclipse.papyrus.infra.architecture.representation.edit/src/org/eclipse/papyrus/infra/architecture/representation/provider/StereotypePropertyDescriptor.java6
-rw-r--r--plugins/infra/architecture/org.eclipse.papyrus.infra.architecture.representation/src/org/eclipse/papyrus/infra/architecture/representation/impl/RepresentationFactoryCustomImpl.java11
-rw-r--r--plugins/infra/architecture/org.eclipse.papyrus.infra.architecture/schema/commands.exsd18
-rw-r--r--plugins/infra/architecture/org.eclipse.papyrus.infra.architecture/schema/listeners.exsd18
-rw-r--r--plugins/infra/architecture/org.eclipse.papyrus.infra.architecture/schema/models.exsd18
-rw-r--r--plugins/infra/architecture/org.eclipse.papyrus.infra.architecture/src/org/eclipse/papyrus/infra/architecture/ArchitectureDescriptionUtils.java4
-rw-r--r--plugins/infra/architecture/org.eclipse.papyrus.infra.architecture/src/org/eclipse/papyrus/infra/architecture/ArchitectureDomainMerger.java7
-rw-r--r--plugins/infra/architecture/org.eclipse.papyrus.infra.architecture/src/org/eclipse/papyrus/infra/architecture/commands/ModelCommandProviderRegistry.java4
-rw-r--r--plugins/infra/architecture/org.eclipse.papyrus.infra.architecture/src/org/eclipse/papyrus/infra/architecture/listeners/ArchitectureDescriptionNotifier.java4
-rw-r--r--plugins/infra/architecture/org.eclipse.papyrus.infra.architecture/src/org/eclipse/papyrus/infra/core/architecture/merged/MergedADElement.java4
-rw-r--r--plugins/infra/architecture/org.eclipse.papyrus.infra.architecture/src/org/eclipse/papyrus/infra/core/architecture/merged/MergedArchitectureContext.java6
-rw-r--r--plugins/infra/architecture/org.eclipse.papyrus.infra.architecture/src/org/eclipse/papyrus/infra/core/architecture/merged/MergedArchitectureDescriptionLanguage.java4
-rw-r--r--plugins/infra/architecture/org.eclipse.papyrus.infra.architecture/src/org/eclipse/papyrus/infra/core/architecture/merged/MergedArchitectureDomain.java6
-rw-r--r--plugins/infra/architecture/org.eclipse.papyrus.infra.architecture/src/org/eclipse/papyrus/infra/core/architecture/merged/MergedArchitectureViewpoint.java4
17 files changed, 83 insertions, 42 deletions
diff --git a/plugins/infra/architecture/org.eclipse.papyrus.infra.architecture.representation.edit/src/org/eclipse/papyrus/infra/architecture/representation/provider/ComplexTypePropertyDescriptor.java b/plugins/infra/architecture/org.eclipse.papyrus.infra.architecture.representation.edit/src/org/eclipse/papyrus/infra/architecture/representation/provider/ComplexTypePropertyDescriptor.java
index fdad8254577..066964bc1fe 100644
--- a/plugins/infra/architecture/org.eclipse.papyrus.infra.architecture.representation.edit/src/org/eclipse/papyrus/infra/architecture/representation/provider/ComplexTypePropertyDescriptor.java
+++ b/plugins/infra/architecture/org.eclipse.papyrus.infra.architecture.representation.edit/src/org/eclipse/papyrus/infra/architecture/representation/provider/ComplexTypePropertyDescriptor.java
@@ -57,7 +57,7 @@ public class ComplexTypePropertyDescriptor extends SurrogateItemPropertyDescript
PapyrusRepresentationKind repKind = (PapyrusRepresentationKind) owningRule.eContainer();
ArchitectureDescriptionLanguage language = repKind.getLanguage();
- List<String> result = new ArrayList<String>();
+ List<String> result = new ArrayList<>();
IClientContext context = ClientContextManager.getInstance().getClientContext(language.getId());
IElementType[] types = ElementTypeRegistry.getInstance().getElementTypes(context);
if (types != null) {
diff --git a/plugins/infra/architecture/org.eclipse.papyrus.infra.architecture.representation.edit/src/org/eclipse/papyrus/infra/architecture/representation/provider/EClassPropertyDescriptor.java b/plugins/infra/architecture/org.eclipse.papyrus.infra.architecture.representation.edit/src/org/eclipse/papyrus/infra/architecture/representation/provider/EClassPropertyDescriptor.java
index c371046190e..f6d3e0e254c 100644
--- a/plugins/infra/architecture/org.eclipse.papyrus.infra.architecture.representation.edit/src/org/eclipse/papyrus/infra/architecture/representation/provider/EClassPropertyDescriptor.java
+++ b/plugins/infra/architecture/org.eclipse.papyrus.infra.architecture.representation.edit/src/org/eclipse/papyrus/infra/architecture/representation/provider/EClassPropertyDescriptor.java
@@ -31,7 +31,7 @@ import org.eclipse.papyrus.infra.core.architecture.provider.SurrogateItemPropert
* @author Laurent Wouters
*/
public class EClassPropertyDescriptor extends SurrogateItemPropertyDescriptor {
- private static final Collection<EObject> empty = new ArrayList<EObject>();
+ private static final Collection<EObject> empty = new ArrayList<>();
/**
* Constructor.
@@ -58,7 +58,7 @@ public class EClassPropertyDescriptor extends SurrogateItemPropertyDescriptor {
return empty;
}
ArchitectureDescriptionLanguage conf = (ArchitectureDescriptionLanguage) current;
- List<EClass> result = new ArrayList<EClass>();
+ List<EClass> result = new ArrayList<>();
EPackage p = conf.getMetamodel();
if (p == null) {
return result;
diff --git a/plugins/infra/architecture/org.eclipse.papyrus.infra.architecture.representation.edit/src/org/eclipse/papyrus/infra/architecture/representation/provider/EReferencePropertyDescriptor.java b/plugins/infra/architecture/org.eclipse.papyrus.infra.architecture.representation.edit/src/org/eclipse/papyrus/infra/architecture/representation/provider/EReferencePropertyDescriptor.java
index 7a435e24b48..8745af587bf 100644
--- a/plugins/infra/architecture/org.eclipse.papyrus.infra.architecture.representation.edit/src/org/eclipse/papyrus/infra/architecture/representation/provider/EReferencePropertyDescriptor.java
+++ b/plugins/infra/architecture/org.eclipse.papyrus.infra.architecture.representation.edit/src/org/eclipse/papyrus/infra/architecture/representation/provider/EReferencePropertyDescriptor.java
@@ -17,10 +17,9 @@ import java.util.ArrayList;
import java.util.Collection;
import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EReference;
import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
-import org.eclipse.papyrus.infra.core.architecture.provider.SurrogateItemPropertyDescriptor;
import org.eclipse.papyrus.infra.architecture.representation.ModelAutoCreate;
+import org.eclipse.papyrus.infra.core.architecture.provider.SurrogateItemPropertyDescriptor;
/**
* Represents a descriptor for properties of type EReference
@@ -28,7 +27,7 @@ import org.eclipse.papyrus.infra.architecture.representation.ModelAutoCreate;
* @author Laurent Wouters
*/
public class EReferencePropertyDescriptor extends SurrogateItemPropertyDescriptor {
- private static final Collection<?> empty = new ArrayList<EReference>();
+ private static final Collection<?> empty = new ArrayList<>();
public EReferencePropertyDescriptor(IItemPropertyDescriptor inner) {
super(inner);
diff --git a/plugins/infra/architecture/org.eclipse.papyrus.infra.architecture.representation.edit/src/org/eclipse/papyrus/infra/architecture/representation/provider/StereotypePropertyDescriptor.java b/plugins/infra/architecture/org.eclipse.papyrus.infra.architecture.representation.edit/src/org/eclipse/papyrus/infra/architecture/representation/provider/StereotypePropertyDescriptor.java
index 8c833508b50..3d69ba03593 100644
--- a/plugins/infra/architecture/org.eclipse.papyrus.infra.architecture.representation.edit/src/org/eclipse/papyrus/infra/architecture/representation/provider/StereotypePropertyDescriptor.java
+++ b/plugins/infra/architecture/org.eclipse.papyrus.infra.architecture.representation.edit/src/org/eclipse/papyrus/infra/architecture/representation/provider/StereotypePropertyDescriptor.java
@@ -33,7 +33,7 @@ import org.eclipse.papyrus.infra.core.architecture.provider.SurrogateItemPropert
* @author Laurent Wouters
*/
public class StereotypePropertyDescriptor extends SurrogateItemPropertyDescriptor {
- private static final Collection<EObject> empty = new ArrayList<EObject>();
+ private static final Collection<EObject> empty = new ArrayList<>();
public StereotypePropertyDescriptor(IItemPropertyDescriptor inner) {
super(inner);
@@ -55,7 +55,7 @@ public class StereotypePropertyDescriptor extends SurrogateItemPropertyDescripto
return empty;
}
ArchitectureDescriptionLanguage conf = (ArchitectureDescriptionLanguage) current;
- List<EClass> result = new ArrayList<EClass>();
+ List<EClass> result = new ArrayList<>();
for (EPackage p : conf.getProfiles()) {
result.addAll(getAllStereotypes(p));
}
@@ -69,7 +69,7 @@ public class StereotypePropertyDescriptor extends SurrogateItemPropertyDescripto
* @return
*/
protected List<EClass> getAllStereotypes(EPackage ePackage) {
- List<EClass> result = new ArrayList<EClass>();
+ List<EClass> result = new ArrayList<>();
for (EClassifier clazz : ePackage.getEClassifiers()) {
if (clazz instanceof EClass) {
result.add((EClass) clazz);
diff --git a/plugins/infra/architecture/org.eclipse.papyrus.infra.architecture.representation/src/org/eclipse/papyrus/infra/architecture/representation/impl/RepresentationFactoryCustomImpl.java b/plugins/infra/architecture/org.eclipse.papyrus.infra.architecture.representation/src/org/eclipse/papyrus/infra/architecture/representation/impl/RepresentationFactoryCustomImpl.java
index cdfcbe7b66f..ccc6e51801a 100644
--- a/plugins/infra/architecture/org.eclipse.papyrus.infra.architecture.representation/src/org/eclipse/papyrus/infra/architecture/representation/impl/RepresentationFactoryCustomImpl.java
+++ b/plugins/infra/architecture/org.eclipse.papyrus.infra.architecture.representation/src/org/eclipse/papyrus/infra/architecture/representation/impl/RepresentationFactoryCustomImpl.java
@@ -18,8 +18,6 @@ import org.eclipse.emf.ecore.plugin.EcorePlugin;
import org.eclipse.papyrus.infra.architecture.representation.ModelAutoCreate;
import org.eclipse.papyrus.infra.architecture.representation.RepresentationFactory;
import org.eclipse.papyrus.infra.architecture.representation.RepresentationPackage;
-import org.eclipse.papyrus.infra.architecture.representation.impl.ModelAutoCreateImpl;
-import org.eclipse.papyrus.infra.architecture.representation.impl.RepresentationFactoryImpl;
public class RepresentationFactoryCustomImpl extends RepresentationFactoryImpl implements RepresentationFactory {
@@ -37,11 +35,7 @@ public class RepresentationFactoryCustomImpl extends RepresentationFactoryImpl i
}
/**
- * Creates an instance of the factory.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @generated
+ * Creates an instance of the custom factory.
*/
public RepresentationFactoryCustomImpl() {
super();
@@ -49,8 +43,7 @@ public class RepresentationFactoryCustomImpl extends RepresentationFactoryImpl i
@Override
public ModelAutoCreate createModelAutoCreate() {
- ModelAutoCreateImpl modelAutoCreate = new ModelAutoCreateCustomImpl();
- return modelAutoCreate;
+ return new ModelAutoCreateCustomImpl();
}
}
diff --git a/plugins/infra/architecture/org.eclipse.papyrus.infra.architecture/schema/commands.exsd b/plugins/infra/architecture/org.eclipse.papyrus.infra.architecture/schema/commands.exsd
index 964f9881d5f..6ca19d21aa9 100644
--- a/plugins/infra/architecture/org.eclipse.papyrus.infra.architecture/schema/commands.exsd
+++ b/plugins/infra/architecture/org.eclipse.papyrus.infra.architecture/schema/commands.exsd
@@ -72,7 +72,7 @@
<meta.section type="since"/>
</appInfo>
<documentation>
- [Enter the first release in which this extension point appears.]
+ org.eclipse.papyrus.infra.architecture 1.0.0 (Payrus Oxygen 3.0.0)
</documentation>
</annotation>
@@ -103,5 +103,21 @@
</documentation>
</annotation>
+ <annotation>
+ <appInfo>
+ <meta.section type="copyright"/>
+ </appInfo>
+ <documentation>
+ Copyright (c) 2017 CEA LIST.
+
+ All rights reserved. This program and the accompanying materials
+ are made available under the terms of the Eclipse Public License v1.0
+ which accompanies this distribution, and is available at
+ http://www.eclipse.org/legal/epl-v10.html
+
+Contributors:
+ Maged Elaasar - Initial API and implementation
+ </documentation>
+ </annotation>
</schema>
diff --git a/plugins/infra/architecture/org.eclipse.papyrus.infra.architecture/schema/listeners.exsd b/plugins/infra/architecture/org.eclipse.papyrus.infra.architecture/schema/listeners.exsd
index 2448123718b..0eb08d3e7b9 100644
--- a/plugins/infra/architecture/org.eclipse.papyrus.infra.architecture/schema/listeners.exsd
+++ b/plugins/infra/architecture/org.eclipse.papyrus.infra.architecture/schema/listeners.exsd
@@ -72,7 +72,7 @@
<meta.section type="since"/>
</appInfo>
<documentation>
- [Enter the first release in which this extension point appears.]
+ org.eclipse.papyrus.infra.architecture 1.0.0 (Payrus Oxygen 3.0.0)
</documentation>
</annotation>
@@ -103,5 +103,21 @@
</documentation>
</annotation>
+ <annotation>
+ <appInfo>
+ <meta.section type="copyright"/>
+ </appInfo>
+ <documentation>
+ Copyright (c) 2017 CEA LIST.
+
+ All rights reserved. This program and the accompanying materials
+ are made available under the terms of the Eclipse Public License v1.0
+ which accompanies this distribution, and is available at
+ http://www.eclipse.org/legal/epl-v10.html
+
+Contributors:
+ Maged Elaasar - Initial API and implementation
+ </documentation>
+ </annotation>
</schema>
diff --git a/plugins/infra/architecture/org.eclipse.papyrus.infra.architecture/schema/models.exsd b/plugins/infra/architecture/org.eclipse.papyrus.infra.architecture/schema/models.exsd
index 01d94c00902..4f0867c2fec 100644
--- a/plugins/infra/architecture/org.eclipse.papyrus.infra.architecture/schema/models.exsd
+++ b/plugins/infra/architecture/org.eclipse.papyrus.infra.architecture/schema/models.exsd
@@ -74,7 +74,7 @@ Note: Do not forget to add the file in the binary build of the plugin!
<meta.section type="since"/>
</appInfo>
<documentation>
- [Enter the first release in which this extension point appears.]
+ org.eclipse.papyrus.infra.architecture 1.0.0 (Payrus Oxygen 3.0.0)
</documentation>
</annotation>
@@ -105,5 +105,21 @@ Note: Do not forget to add the file in the binary build of the plugin!
</documentation>
</annotation>
+ <annotation>
+ <appInfo>
+ <meta.section type="copyright"/>
+ </appInfo>
+ <documentation>
+ Copyright (c) 2017 CEA LIST.
+
+ All rights reserved. This program and the accompanying materials
+ are made available under the terms of the Eclipse Public License v1.0
+ which accompanies this distribution, and is available at
+ http://www.eclipse.org/legal/epl-v10.html
+
+Contributors:
+ Maged Elaasar - Initial API and implementation
+ </documentation>
+ </annotation>
</schema>
diff --git a/plugins/infra/architecture/org.eclipse.papyrus.infra.architecture/src/org/eclipse/papyrus/infra/architecture/ArchitectureDescriptionUtils.java b/plugins/infra/architecture/org.eclipse.papyrus.infra.architecture/src/org/eclipse/papyrus/infra/architecture/ArchitectureDescriptionUtils.java
index 4f0221d2e7e..a4bc58ac74d 100644
--- a/plugins/infra/architecture/org.eclipse.papyrus.infra.architecture/src/org/eclipse/papyrus/infra/architecture/ArchitectureDescriptionUtils.java
+++ b/plugins/infra/architecture/org.eclipse.papyrus.infra.architecture/src/org/eclipse/papyrus/infra/architecture/ArchitectureDescriptionUtils.java
@@ -99,7 +99,7 @@ public class ArchitectureDescriptionUtils {
* @return a collection of architecture viewpoints
*/
public Collection<MergedArchitectureViewpoint> getArchitectureViewpoints() {
- List<MergedArchitectureViewpoint> viewpoints = new ArrayList<MergedArchitectureViewpoint>();
+ List<MergedArchitectureViewpoint> viewpoints = new ArrayList<>();
for (String viewpointId : getArchitectureViewpointIds()) {
MergedArchitectureViewpoint viewpoint = manager.getArchitectureViewpointById(viewpointId);
if (viewpoint != null)
@@ -121,7 +121,7 @@ public class ArchitectureDescriptionUtils {
Collection<MergedArchitectureViewpoint> viewpoints = context.getDefaultViewpoints();
if (viewpoints.isEmpty())
viewpoints = context.getViewpoints();
- Set<String> viewpointIds = new LinkedHashSet<String>();
+ Set<String> viewpointIds = new LinkedHashSet<>();
for (MergedArchitectureViewpoint viewpoint : viewpoints) {
viewpointIds.add(viewpoint.getId());
}
diff --git a/plugins/infra/architecture/org.eclipse.papyrus.infra.architecture/src/org/eclipse/papyrus/infra/architecture/ArchitectureDomainMerger.java b/plugins/infra/architecture/org.eclipse.papyrus.infra.architecture/src/org/eclipse/papyrus/infra/architecture/ArchitectureDomainMerger.java
index 005f0c02c7e..b35c7893bdd 100644
--- a/plugins/infra/architecture/org.eclipse.papyrus.infra.architecture/src/org/eclipse/papyrus/infra/architecture/ArchitectureDomainMerger.java
+++ b/plugins/infra/architecture/org.eclipse.papyrus.infra.architecture/src/org/eclipse/papyrus/infra/architecture/ArchitectureDomainMerger.java
@@ -207,7 +207,7 @@ public class ArchitectureDomainMerger implements Cloneable {
*/
void init() {
resourceSet = new ResourceSetImpl();
- mergedDomains = new HashMap<String, MergedArchitectureDomain>();
+ mergedDomains = new HashMap<>();
if (extensionModels != null) {
for (URI model : extensionModels) {
ArchitectureDomain domain = loadDomain(resourceSet.createResource(model));
@@ -244,8 +244,9 @@ public class ArchitectureDomainMerger implements Cloneable {
EObject content = resource.getContents().get(0);
if (content instanceof ArchitectureDomain) {
return (ArchitectureDomain) content;
- } else
+ } else {
Activator.log.warn("file "+resource.getURI()+ " is not an architecture model");
+ }
return null;
}
@@ -264,7 +265,7 @@ public class ArchitectureDomainMerger implements Cloneable {
* builds a id to element cache for faster lookup
*/
private void buildCache() {
- idCache = new HashMap<String, Object>();
+ idCache = new HashMap<>();
for (MergedArchitectureDomain domain : mergedDomains.values()) {
for (MergedArchitectureContext context : domain.getContexts()) {
idCache.put(context.getId(), context);
diff --git a/plugins/infra/architecture/org.eclipse.papyrus.infra.architecture/src/org/eclipse/papyrus/infra/architecture/commands/ModelCommandProviderRegistry.java b/plugins/infra/architecture/org.eclipse.papyrus.infra.architecture/src/org/eclipse/papyrus/infra/architecture/commands/ModelCommandProviderRegistry.java
index c30b5251d2f..78268054d1e 100644
--- a/plugins/infra/architecture/org.eclipse.papyrus.infra.architecture/src/org/eclipse/papyrus/infra/architecture/commands/ModelCommandProviderRegistry.java
+++ b/plugins/infra/architecture/org.eclipse.papyrus.infra.architecture/src/org/eclipse/papyrus/infra/architecture/commands/ModelCommandProviderRegistry.java
@@ -34,7 +34,7 @@ public class ModelCommandProviderRegistry implements IModelCommandProvider {
/**
* The extension point id
*/
- private final static String EXTENSION_POINT_ID = Activator.PLUGIN_ID + ".commandProviders";
+ private static final String EXTENSION_POINT_ID = Activator.PLUGIN_ID + ".commandProviders";
/**
* The name of the class attribute
@@ -102,7 +102,7 @@ public class ModelCommandProviderRegistry implements IModelCommandProvider {
* initializes the registry from extensions
*/
private void init() {
- providers = new ArrayList<IModelCommandProvider>();
+ providers = new ArrayList<>();
IConfigurationElement[] elements = Platform.getExtensionRegistry().getConfigurationElementsFor(EXTENSION_POINT_ID);
for (IConfigurationElement configurationElement : elements) {
try {
diff --git a/plugins/infra/architecture/org.eclipse.papyrus.infra.architecture/src/org/eclipse/papyrus/infra/architecture/listeners/ArchitectureDescriptionNotifier.java b/plugins/infra/architecture/org.eclipse.papyrus.infra.architecture/src/org/eclipse/papyrus/infra/architecture/listeners/ArchitectureDescriptionNotifier.java
index b2a5aa2c3d5..bc81db94b5c 100644
--- a/plugins/infra/architecture/org.eclipse.papyrus.infra.architecture/src/org/eclipse/papyrus/infra/architecture/listeners/ArchitectureDescriptionNotifier.java
+++ b/plugins/infra/architecture/org.eclipse.papyrus.infra.architecture/src/org/eclipse/papyrus/infra/architecture/listeners/ArchitectureDescriptionNotifier.java
@@ -32,7 +32,7 @@ public class ArchitectureDescriptionNotifier {
/**
* The name of the extension point
*/
- private final static String EXTENSION_POINT_ID = Activator.PLUGIN_ID + ".listeners";
+ private static final String EXTENSION_POINT_ID = Activator.PLUGIN_ID + ".listeners";
/**
* The class property name
@@ -57,7 +57,7 @@ public class ArchitectureDescriptionNotifier {
public static synchronized ArchitectureDescriptionNotifier getInstance() {
if (notifier == null) {
notifier = new ArchitectureDescriptionNotifier();
- listeners = new ArrayList<IArchitectureDescriptionListener>();
+ listeners = new ArrayList<>();
notifier.init();
}
return notifier;
diff --git a/plugins/infra/architecture/org.eclipse.papyrus.infra.architecture/src/org/eclipse/papyrus/infra/core/architecture/merged/MergedADElement.java b/plugins/infra/architecture/org.eclipse.papyrus.infra.architecture/src/org/eclipse/papyrus/infra/core/architecture/merged/MergedADElement.java
index 0cf5f185037..dba3638a190 100644
--- a/plugins/infra/architecture/org.eclipse.papyrus.infra.architecture/src/org/eclipse/papyrus/infra/core/architecture/merged/MergedADElement.java
+++ b/plugins/infra/architecture/org.eclipse.papyrus.infra.architecture/src/org/eclipse/papyrus/infra/core/architecture/merged/MergedADElement.java
@@ -51,7 +51,7 @@ public class MergedADElement {
*/
public MergedADElement(MergedADElement parent) {
this.parent = parent;
- this.elements = new LinkedHashSet<ADElement>();
+ this.elements = new LinkedHashSet<>();
}
/**
@@ -159,7 +159,7 @@ public class MergedADElement {
MergedADElement other = (MergedADElement) obj;
if (other.parent != this.parent)
return false;
- Set<ADElement> copy = new HashSet<ADElement>(this.elements);
+ Set<ADElement> copy = new HashSet<>(this.elements);
copy.retainAll(other.elements);
return copy.size() == this.elements.size();
}
diff --git a/plugins/infra/architecture/org.eclipse.papyrus.infra.architecture/src/org/eclipse/papyrus/infra/core/architecture/merged/MergedArchitectureContext.java b/plugins/infra/architecture/org.eclipse.papyrus.infra.architecture/src/org/eclipse/papyrus/infra/core/architecture/merged/MergedArchitectureContext.java
index 21043ddda80..41ca0371e60 100644
--- a/plugins/infra/architecture/org.eclipse.papyrus.infra.architecture/src/org/eclipse/papyrus/infra/core/architecture/merged/MergedArchitectureContext.java
+++ b/plugins/infra/architecture/org.eclipse.papyrus.infra.architecture/src/org/eclipse/papyrus/infra/core/architecture/merged/MergedArchitectureContext.java
@@ -149,7 +149,7 @@ public abstract class MergedArchitectureContext extends MergedADElement {
* @return a merged collection of element type set configurations
*/
public Collection<ElementTypeSetConfiguration> getElementTypes() {
- Set<ElementTypeSetConfiguration> configurations = new LinkedHashSet<ElementTypeSetConfiguration>();
+ Set<ElementTypeSetConfiguration> configurations = new LinkedHashSet<>();
for (ADElement element : elements) {
ArchitectureContext context = (ArchitectureContext) element;
configurations.addAll(context.getElementTypes());
@@ -163,7 +163,7 @@ public abstract class MergedArchitectureContext extends MergedADElement {
* @return a merged collection of viewpoints
*/
public Collection<MergedArchitectureViewpoint> getViewpoints() {
- Map<String, MergedArchitectureViewpoint> viewpoints = new HashMap<String, MergedArchitectureViewpoint>();
+ Map<String, MergedArchitectureViewpoint> viewpoints = new HashMap<>();
for (ADElement element : elements) {
ArchitectureContext context = (ArchitectureContext) element;
for (ArchitectureViewpoint viewpoint : context.getViewpoints()) {
@@ -183,7 +183,7 @@ public abstract class MergedArchitectureContext extends MergedADElement {
* @return a merged collection of viewpoints
*/
public Collection<MergedArchitectureViewpoint> getDefaultViewpoints() {
- Map<String, MergedArchitectureViewpoint> viewpoints = new HashMap<String, MergedArchitectureViewpoint>();
+ Map<String, MergedArchitectureViewpoint> viewpoints = new HashMap<>();
for (ADElement element : elements) {
ArchitectureContext context = (ArchitectureContext) element;
for (ArchitectureViewpoint viewpoint : context.getDefaultViewpoints()) {
diff --git a/plugins/infra/architecture/org.eclipse.papyrus.infra.architecture/src/org/eclipse/papyrus/infra/core/architecture/merged/MergedArchitectureDescriptionLanguage.java b/plugins/infra/architecture/org.eclipse.papyrus.infra.architecture/src/org/eclipse/papyrus/infra/core/architecture/merged/MergedArchitectureDescriptionLanguage.java
index 5e0b7b191e5..be6944d978f 100644
--- a/plugins/infra/architecture/org.eclipse.papyrus.infra.architecture/src/org/eclipse/papyrus/infra/core/architecture/merged/MergedArchitectureDescriptionLanguage.java
+++ b/plugins/infra/architecture/org.eclipse.papyrus.infra.architecture/src/org/eclipse/papyrus/infra/core/architecture/merged/MergedArchitectureDescriptionLanguage.java
@@ -65,7 +65,7 @@ public class MergedArchitectureDescriptionLanguage extends MergedArchitectureCon
* @return a collection of EPackages
*/
public Collection<EPackage> getProfiles() {
- Set<EPackage> profiles = new LinkedHashSet<EPackage>();
+ Set<EPackage> profiles = new LinkedHashSet<>();
for (ADElement element : elements) {
ArchitectureDescriptionLanguage language = (ArchitectureDescriptionLanguage) element;
profiles.addAll(language.getProfiles());
@@ -79,7 +79,7 @@ public class MergedArchitectureDescriptionLanguage extends MergedArchitectureCon
* @return a collection of representation kinds
*/
public Collection<RepresentationKind> getRepresentationKinds() {
- Set<RepresentationKind> kinds = new LinkedHashSet<RepresentationKind>();
+ Set<RepresentationKind> kinds = new LinkedHashSet<>();
for (ADElement element : elements) {
ArchitectureDescriptionLanguage language = (ArchitectureDescriptionLanguage) element;
kinds.addAll(language.getRepresentationKinds());
diff --git a/plugins/infra/architecture/org.eclipse.papyrus.infra.architecture/src/org/eclipse/papyrus/infra/core/architecture/merged/MergedArchitectureDomain.java b/plugins/infra/architecture/org.eclipse.papyrus.infra.architecture/src/org/eclipse/papyrus/infra/core/architecture/merged/MergedArchitectureDomain.java
index 0eeea05adb0..cb57b24a822 100644
--- a/plugins/infra/architecture/org.eclipse.papyrus.infra.architecture/src/org/eclipse/papyrus/infra/core/architecture/merged/MergedArchitectureDomain.java
+++ b/plugins/infra/architecture/org.eclipse.papyrus.infra.architecture/src/org/eclipse/papyrus/infra/core/architecture/merged/MergedArchitectureDomain.java
@@ -53,7 +53,7 @@ public class MergedArchitectureDomain extends MergedADElement {
* @return a collection of stakeholders
*/
public Collection<Stakeholder> getStakeholders() {
- Set<Stakeholder> stakeholders = new LinkedHashSet<Stakeholder>();
+ Set<Stakeholder> stakeholders = new LinkedHashSet<>();
for (ADElement element : elements) {
ArchitectureDomain domain = (ArchitectureDomain) element;
stakeholders.addAll(domain.getStakeholders());
@@ -67,7 +67,7 @@ public class MergedArchitectureDomain extends MergedADElement {
* @return a collection of concerns
*/
public Collection<Concern> getConcerns() {
- Set<Concern> concerns = new LinkedHashSet<Concern>();
+ Set<Concern> concerns = new LinkedHashSet<>();
for (ADElement element : elements) {
ArchitectureDomain domain = (ArchitectureDomain) element;
concerns.addAll(domain.getConcerns());
@@ -81,7 +81,7 @@ public class MergedArchitectureDomain extends MergedADElement {
* @return a collection of contexts
*/
public Collection<MergedArchitectureContext> getContexts() {
- Map<String, MergedArchitectureContext> contexts = new HashMap<String, MergedArchitectureContext>();
+ Map<String, MergedArchitectureContext> contexts = new HashMap<>();
for (ADElement element : elements) {
ArchitectureDomain domain = (ArchitectureDomain) element;
for (ArchitectureContext context : domain.getContexts()) {
diff --git a/plugins/infra/architecture/org.eclipse.papyrus.infra.architecture/src/org/eclipse/papyrus/infra/core/architecture/merged/MergedArchitectureViewpoint.java b/plugins/infra/architecture/org.eclipse.papyrus.infra.architecture/src/org/eclipse/papyrus/infra/core/architecture/merged/MergedArchitectureViewpoint.java
index c0e0846cfc5..75b34baac26 100644
--- a/plugins/infra/architecture/org.eclipse.papyrus.infra.architecture/src/org/eclipse/papyrus/infra/core/architecture/merged/MergedArchitectureViewpoint.java
+++ b/plugins/infra/architecture/org.eclipse.papyrus.infra.architecture/src/org/eclipse/papyrus/infra/core/architecture/merged/MergedArchitectureViewpoint.java
@@ -60,7 +60,7 @@ public class MergedArchitectureViewpoint extends MergedADElement {
* @return a merged collection of concerns
*/
public Collection<Concern> getConcerns() {
- Set<Concern> concerns = new LinkedHashSet<Concern>();
+ Set<Concern> concerns = new LinkedHashSet<>();
for (ADElement element : elements) {
ArchitectureViewpoint viewpoint = (ArchitectureViewpoint) element;
concerns.addAll(viewpoint.getConcerns());
@@ -74,7 +74,7 @@ public class MergedArchitectureViewpoint extends MergedADElement {
* @return a merged collection of representation kinds
*/
public Collection<RepresentationKind> getRepresentationKinds() {
- Set<RepresentationKind> kinds = new LinkedHashSet<RepresentationKind>();
+ Set<RepresentationKind> kinds = new LinkedHashSet<>();
for (ADElement element : elements) {
ArchitectureViewpoint viewpoint = (ArchitectureViewpoint) element;
kinds.addAll(viewpoint.getRepresentationKinds());

Back to the top