aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--features/papyrus-tests-features/org.eclipse.papyrus.tests.uml.feature/feature.xml4
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/referencialgrilling/ComputeOwnerHelper.java12
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/validation/AsyncValidateCommand.java40
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/model/seqd_constraints.ocl43
-rw-r--r--plugins/uml/properties/org.eclipse.papyrus.uml.properties/Model/UML/ui/SingleCombinedFragment.xwt7
-rw-r--r--plugins/uml/properties/org.eclipse.papyrus.uml.properties/Model/UML/ui/SingleInteractionOperand.xwt7
-rw-r--r--plugins/uml/properties/org.eclipse.papyrus.uml.properties/src/org/eclipse/papyrus/uml/properties/modelelement/UMLModelElement.java59
-rw-r--r--tests/junit/framework/org.eclipse.papyrus.junit.utils/src/org/eclipse/papyrus/junit/matchers/DiagramMatchers.java20
-rw-r--r--tests/junit/framework/org.eclipse.papyrus.junit.utils/src/org/eclipse/papyrus/junit/utils/rules/PreferenceRule.java142
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence.tests/src/org/eclipse/papyrus/uml/diagram/sequence/tests/bug/CombinedFragmentRegressionTest.java159
-rw-r--r--tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/.classpath7
-rw-r--r--tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/.project28
-rw-r--r--tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/.settings/org.eclipse.core.resources.prefs2
-rw-r--r--tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/.settings/org.eclipse.core.runtime.prefs2
-rw-r--r--tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/.settings/org.eclipse.jdt.core.prefs291
-rw-r--r--tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/.settings/org.eclipse.jdt.ui.prefs68
-rw-r--r--tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/META-INF/MANIFEST.MF18
-rw-r--r--tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/about.html28
-rw-r--r--tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/build.properties7
-rw-r--r--tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/org.eclipse.papyrus.uml.properties.tests.launch43
-rw-r--r--tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/plugin.properties13
-rw-r--r--tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/pom.xml14
-rw-r--r--tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/src/org/eclipse/papyrus/uml/properties/modelelement/tests/UMLModelElementTest.java152
-rw-r--r--tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/src/org/eclipse/papyrus/uml/properties/modelelement/tests/bug507479.uml37
-rw-r--r--tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/src/org/eclipse/papyrus/uml/properties/tests/AllTests.java29
-rwxr-xr-xtests/junit/plugins/uml/org.eclipse.papyrus.uml.suite.tests/META-INF/MANIFEST.MF3
-rwxr-xr-xtests/junit/plugins/uml/org.eclipse.papyrus.uml.suite.tests/test/org/eclipse/papyrus/uml/suite/tests/AllTests.java1
-rwxr-xr-xtests/junit/plugins/uml/pom.xml1
28 files changed, 1175 insertions, 62 deletions
diff --git a/features/papyrus-tests-features/org.eclipse.papyrus.tests.uml.feature/feature.xml b/features/papyrus-tests-features/org.eclipse.papyrus.tests.uml.feature/feature.xml
index cb1feacb9d4..d183052103c 100644
--- a/features/papyrus-tests-features/org.eclipse.papyrus.tests.uml.feature/feature.xml
+++ b/features/papyrus-tests-features/org.eclipse.papyrus.tests.uml.feature/feature.xml
@@ -22,6 +22,8 @@ http://www.eclipse.org/legal/epl-v10.html
<plugin download-size="0" id="org.eclipse.papyrus.uml.modelrepair.tests" install-size="0" unpack="false" version="0.0.0"/>
+ <plugin download-size="0" id="org.eclipse.papyrus.uml.properties.tests" install-size="0" unpack="false" version="0.0.0"/>
+
<plugin download-size="0" id="org.eclipse.papyrus.uml.service.types.tests" install-size="0" unpack="false" version="0.0.0"/>
<plugin download-size="0" id="org.eclipse.papyrus.uml.service.types.ui.tests" install-size="0" unpack="false" version="0.0.0"/>
@@ -35,4 +37,4 @@ http://www.eclipse.org/legal/epl-v10.html
<plugin download-size="0" id="org.eclipse.papyrus.uml.dynamic.profile.tests" install-size="0" unpack="false" version="0.0.0"/>
-</feature> \ No newline at end of file
+</feature>
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/referencialgrilling/ComputeOwnerHelper.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/referencialgrilling/ComputeOwnerHelper.java
index e85d91dee02..b26b92d07ca 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/referencialgrilling/ComputeOwnerHelper.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/referencialgrilling/ComputeOwnerHelper.java
@@ -9,7 +9,7 @@
* Contributors:
* CEA LIST - Initial API and implementation
* Mickaƫl ADAM (ALL4TEC) mickael.adam@all4tec.net - Bug 525369
- * Christian W. Damus - bug 533679
+ * Christian W. Damus - bugs 533679, 507479
*****************************************************************************/
package org.eclipse.papyrus.uml.diagram.sequence.referencialgrilling;
@@ -29,6 +29,7 @@ import org.eclipse.gmf.runtime.notation.DecorationNode;
import org.eclipse.papyrus.uml.diagram.sequence.part.UMLDiagramEditorPlugin;
import org.eclipse.papyrus.uml.diagram.sequence.util.LogOptions;
import org.eclipse.papyrus.uml.diagram.sequence.validation.AsyncValidateCommand;
+import org.eclipse.uml2.uml.CombinedFragment;
import org.eclipse.uml2.uml.Element;
import org.eclipse.uml2.uml.ExecutionOccurrenceSpecification;
import org.eclipse.uml2.uml.ExecutionSpecification;
@@ -154,7 +155,14 @@ public class ComputeOwnerHelper implements IComputeOwnerHelper {
existedFragments.addAll(interactionOperand.getFragments());
grid.execute(new SetCommand(domain, interactionOperand, UMLPackage.eINSTANCE.getInteractionOperand_Fragment(), existedFragments));
- AsyncValidateCommand.get(interactionOperand)
+ // Asynchronously re-validate the whole combined fragment in case of
+ // dependencies between operands and the check for consistency between
+ // lifeline coverage of the combined fragment as compared to the lifeline
+ // coverage of the fragments of its operands
+ Optional<CombinedFragment> cfrag = Optional.of(interactionOperand)
+ .map(Element::getOwner).filter(CombinedFragment.class::isInstance)
+ .map(CombinedFragment.class::cast);
+ cfrag.flatMap(AsyncValidateCommand::get)
.ifPresent(grid::execute);
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/validation/AsyncValidateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/validation/AsyncValidateCommand.java
index e85ba137ed2..f9cdfdbf06c 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/validation/AsyncValidateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/validation/AsyncValidateCommand.java
@@ -19,6 +19,7 @@ import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.Optional;
+import java.util.function.Supplier;
import java.util.stream.Collectors;
import java.util.stream.Stream;
@@ -38,11 +39,11 @@ import org.eclipse.papyrus.uml.diagram.sequence.command.AsynchronousCommand;
import org.eclipse.papyrus.uml.diagram.sequence.part.UMLDiagramEditorPlugin;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Shell;
+import org.eclipse.uml2.uml.CombinedFragment;
import org.eclipse.uml2.uml.ExecutionSpecification;
import org.eclipse.uml2.uml.InteractionOperand;
import org.eclipse.uml2.uml.Message;
import org.eclipse.uml2.uml.MessageEnd;
-import org.eclipse.uml2.uml.NamedElement;
import org.eclipse.uml2.uml.OccurrenceSpecification;
import org.eclipse.uml2.uml.util.UMLSwitch;
@@ -71,8 +72,15 @@ public class AsyncValidateCommand extends AsynchronousCommand implements INonDir
ValidateSubtreeCommand cmd = new UMLSwitch<ValidateSubtreeCommand>() {
@Override
+ public ValidateSubtreeCommand caseCombinedFragment(CombinedFragment cfrag) {
+ return new ValidateCombinedFragmentCommand(cfrag,
+ () -> Stream.concat(messages(cfrag), nonOwnedExecutions(cfrag)));
+ }
+
+ @Override
public ValidateSubtreeCommand caseInteractionOperand(InteractionOperand operand) {
- return new ValidateOperandCommand(operand);
+ return new ValidateCombinedFragmentCommand(operand,
+ () -> Stream.concat(messages(operand), nonOwnedExecutions(operand)));
}
@Override
@@ -118,17 +126,27 @@ public class AsyncValidateCommand extends AsynchronousCommand implements INonDir
.orElseGet(() -> findExecutionWith(occurrence, false));
}
+ static Stream<Message> messages(CombinedFragment cfrag) {
+ return cfrag.getOperands().stream().flatMap(AsyncValidateCommand::messages)
+ .distinct();
+ }
+
+ static Stream<ExecutionSpecification> nonOwnedExecutions(CombinedFragment cfrag) {
+ return cfrag.getOperands().stream().flatMap(AsyncValidateCommand::nonOwnedExecutions)
+ .distinct();
+ }
+
//
// Nested types
//
- private static class ValidateOperandCommand extends ValidateSubtreeCommand {
- private final InteractionOperand operand;
+ private static class ValidateCombinedFragmentCommand extends ValidateSubtreeCommand {
+ private final Supplier<Stream<? extends EObject>> dependenciesSupplier;
- ValidateOperandCommand(InteractionOperand operand) {
- super(operand, new OperandDiagnostician());
+ ValidateCombinedFragmentCommand(EObject root, Supplier<Stream<? extends EObject>> dependenciesSupplier) {
+ super(root, new OperandDiagnostician());
- this.operand = operand;
+ this.dependenciesSupplier = dependenciesSupplier;
}
@Override
@@ -139,12 +157,12 @@ public class AsyncValidateCommand extends AsynchronousCommand implements INonDir
// final Shell shell = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell();
if (resource != null) {
if (validateElement != null) {
- // In an interaction operand, we validate also the messages and execution
- // specifications that are at least partially within it. We have to be
+ // In a combined fragment or an interaction operand, we validate also the
+ // messages and execution specifications (provided generically as "dependencies")
+ // that are at least partially within some operand in scope. We have to be
// careful about also removing existing markers for these related elements
// because the Diagnostician isn't responsible for that
- List<NamedElement> others = Stream.concat(messages(operand), nonOwnedExecutions(operand))
- .collect(Collectors.toList());
+ List<? extends EObject> others = dependenciesSupplier.get().collect(Collectors.toList());
int markersToCreate = diagnostic.getChildren().size();
SubMonitor sub = SubMonitor.convert(monitor, 1 + others.size() + markersToCreate);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/model/seqd_constraints.ocl b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/model/seqd_constraints.ocl
index debcd0d3cd6..fdcc359c7da 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/model/seqd_constraints.ocl
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/model/seqd_constraints.ocl
@@ -20,6 +20,15 @@ context Element
-- A helper operation that reports a problem as error severity instead of warning.
def: asError(ok: Boolean): Boolean = if ok then ok else null endif
+-- Helper to render collections of strings as lists
+def: asString(list : Collection(String)) : String =
+ list->iterate(i; l : String = '' |
+ i + (if l.size() > 0 then ', ' else '' endif) + l)
+
+-- Helper to put single quotes are strings in a collection
+def: quote(list : Collection(String)) : Sequence(String) =
+ list->collect(i | '\'' + i + '\'')->asSequence()
+
context Message
--
@@ -41,4 +50,38 @@ inv crosses_no_boundaries('Execution specification crosses an interaction operan
let events = Set{start, finish}->excluding(null) in
asError(events->notEmpty() implies events.owner->asSet()->size() = 1)
+context CombinedFragment
+
+--
+-- An combined fragment covers all of the lifelines that are covered by the
+-- fragments of its operands.
+--
+inv lifeline_coverage:
+ let uncovered = operand.fragment.covered->asSet()->excludingAll(self.covered)->sortedBy(name) in
+ Tuple {
+ status = uncovered->isEmpty(),
+ message = if uncovered->size() = 1 then
+ 'Lifeline \'' + uncovered.name->first() + '\' not covered that is covered by fragments of the operands.'
+ else
+ 'Lifelines ' + asString(quote(uncovered.name)) + ' not covered that are covered by fragments of the operands.'
+ endif
+ }
+
+context InteractionOperand
+
+--
+-- An interaction operand covers all of the lifelines that are covered by the
+-- fragments that it owns.
+--
+inv lifeline_coverage:
+ let uncovered = fragment.covered->asSet()->excludingAll(self.covered)->sortedBy(name) in
+ Tuple {
+ status = uncovered->isEmpty(),
+ message = if uncovered->size() = 1 then
+ 'Lifeline \'' + uncovered.name->first() + '\' not covered that is covered by owned fragments.'
+ else
+ 'Lifelines ' + asString(quote(uncovered.name)) + ' not covered that are covered by owned fragments.'
+ endif
+ }
+
endpackage
diff --git a/plugins/uml/properties/org.eclipse.papyrus.uml.properties/Model/UML/ui/SingleCombinedFragment.xwt b/plugins/uml/properties/org.eclipse.papyrus.uml.properties/Model/UML/ui/SingleCombinedFragment.xwt
index 3dc47534524..99cabaae846 100644
--- a/plugins/uml/properties/org.eclipse.papyrus.uml.properties/Model/UML/ui/SingleCombinedFragment.xwt
+++ b/plugins/uml/properties/org.eclipse.papyrus.uml.properties/Model/UML/ui/SingleCombinedFragment.xwt
@@ -21,4 +21,11 @@
property="UML:CombinedFragment:interactionOperator"></ppe:EnumCombo>
<ppe:EnumCombo input="{Binding}" property="UML:NamedElement:visibility"></ppe:EnumCombo>
</Composite>
+ <Composite>
+ <Composite.layout>
+ <ppel:PropertiesLayout></ppel:PropertiesLayout>
+ </Composite.layout>
+ <ppe:MultiReference input="{Binding}"
+ property="UML:InteractionFragment:covered"></ppe:MultiReference>
+ </Composite>
</Composite>
diff --git a/plugins/uml/properties/org.eclipse.papyrus.uml.properties/Model/UML/ui/SingleInteractionOperand.xwt b/plugins/uml/properties/org.eclipse.papyrus.uml.properties/Model/UML/ui/SingleInteractionOperand.xwt
index 505d6ad79fe..e6dd2a97422 100644
--- a/plugins/uml/properties/org.eclipse.papyrus.uml.properties/Model/UML/ui/SingleInteractionOperand.xwt
+++ b/plugins/uml/properties/org.eclipse.papyrus.uml.properties/Model/UML/ui/SingleInteractionOperand.xwt
@@ -30,6 +30,13 @@
<ppel:PropertiesLayout></ppel:PropertiesLayout>
</Composite.layout>
<ppe:MultiReference input="{Binding}"
+ property="UML:InteractionFragment:covered"></ppe:MultiReference>
+ </Composite>
+ <Composite>
+ <Composite.layout>
+ <ppel:PropertiesLayout></ppel:PropertiesLayout>
+ </Composite.layout>
+ <ppe:MultiReference input="{Binding}"
property="UML:InteractionOperand:fragment"></ppe:MultiReference>
</Composite>
</Composite>
diff --git a/plugins/uml/properties/org.eclipse.papyrus.uml.properties/src/org/eclipse/papyrus/uml/properties/modelelement/UMLModelElement.java b/plugins/uml/properties/org.eclipse.papyrus.uml.properties/src/org/eclipse/papyrus/uml/properties/modelelement/UMLModelElement.java
index 4f71bd6f662..9a0f9a53124 100644
--- a/plugins/uml/properties/org.eclipse.papyrus.uml.properties/src/org/eclipse/papyrus/uml/properties/modelelement/UMLModelElement.java
+++ b/plugins/uml/properties/org.eclipse.papyrus.uml.properties/src/org/eclipse/papyrus/uml/properties/modelelement/UMLModelElement.java
@@ -1,5 +1,5 @@
/*****************************************************************************
- * Copyright (c) 2011, 2014 CEA LIST and others.
+ * Copyright (c) 2011, 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 v1.0
@@ -8,14 +8,15 @@
*
* Contributors:
* Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation
- * Christian W. Damus (CEA) - bug 323802
- * Christian W. Damus (CEA) - bug 440108
+ * Christian W. Damus (CEA) - bugs 323802, 440108
* Gabriel Pascual (ALL4TEC) gabriel.pascual@all4tec.net - Initial API and implementation
* Nicolas FAUVERGUE (ALL4TEC) nicolas.fauvergue@all4tec.net - Bug 496905
+ * Christian W. Damus - bug 507479
*
*****************************************************************************/
package org.eclipse.papyrus.uml.properties.modelelement;
+import static org.eclipse.emf.ecore.util.EcoreUtil.isAncestor;
import static org.eclipse.uml2.uml.ParameterDirectionKind.INOUT_LITERAL;
import static org.eclipse.uml2.uml.ParameterDirectionKind.IN_LITERAL;
import static org.eclipse.uml2.uml.ParameterDirectionKind.OUT_LITERAL;
@@ -24,7 +25,9 @@ import static org.eclipse.uml2.uml.ParameterDirectionKind.RETURN_LITERAL;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
+import java.util.Optional;
import java.util.Set;
+import java.util.function.Predicate;
import org.eclipse.core.databinding.observable.IObservable;
import org.eclipse.core.databinding.observable.list.IObservableList;
@@ -38,6 +41,7 @@ import org.eclipse.emf.ecore.EReference;
import org.eclipse.emf.ecore.EStructuralFeature;
import org.eclipse.emf.ecore.resource.ResourceSet;
import org.eclipse.emf.edit.domain.EditingDomain;
+import org.eclipse.gmf.runtime.emf.core.util.EMFCoreUtil;
import org.eclipse.jface.viewers.ITreeContentProvider;
import org.eclipse.papyrus.infra.emf.utils.EMFHelper;
import org.eclipse.papyrus.infra.emf.utils.HistoryUtil;
@@ -74,6 +78,8 @@ import org.eclipse.papyrus.uml.tools.utils.NameResolutionHelper;
import org.eclipse.uml2.uml.Connector;
import org.eclipse.uml2.uml.Element;
import org.eclipse.uml2.uml.Extension;
+import org.eclipse.uml2.uml.Interaction;
+import org.eclipse.uml2.uml.InteractionFragment;
import org.eclipse.uml2.uml.Message;
import org.eclipse.uml2.uml.NamedElement;
import org.eclipse.uml2.uml.Namespace;
@@ -179,30 +185,35 @@ public class UMLModelElement extends EMFModelElement {
// Workaround: the standard ContentProvider does not correctly hide the selected elements in ReferenceSelector.
// With a ContainmentBasedBrowseStrategy, it works better (But we don't have the infinite tree in the selection dialog).
- if (feature == UMLPackage.eINSTANCE.getConstraint_ConstrainedElement()) {
+ if (feature == UMLPackage.Literals.CONSTRAINT__CONSTRAINED_ELEMENT) {
return new ConstrainedElementContentProvider(source, feature);
}
- if (feature == UMLPackage.eINSTANCE.getMessage_Signature()) {
- ResourceSet resourceSet = domain == null ? null : domain.getResourceSet();
- return new UMLContentProvider(source, feature, null, resourceSet) {
- /**
- * @see org.eclipse.papyrus.infra.widgets.providers.EncapsulatedContentProvider#isValidValue(java.lang.Object)
- *
- * @param element
- * @return
- */
- @Override
- public boolean isValidValue(Object element) {
- element = EMFHelper.getEObject(element);
- // according to the UML norm 2.5, section 17.4.3.1
- // The signature of a Message refers to either an Operation or a Signal.
- return element instanceof Operation || element instanceof Signal;
- }
- };
- }
ResourceSet resourceSet = domain == null ? null : domain.getResourceSet();
- return new UMLContentProvider(source, feature, null, resourceSet);
+ Optional<Predicate<EObject>> isValid = Optional.empty();
+
+ if (feature == UMLPackage.Literals.MESSAGE__SIGNATURE) {
+ // according to the UML norm 2.5, section 17.4.3.1
+ // The signature of a Message refers to either an Operation or a Signal.
+ isValid = Optional.of(element -> element instanceof Operation || element instanceof Signal);
+ } else if (feature == UMLPackage.Literals.INTERACTION_FRAGMENT__COVERED) {
+ // Can only cover a lifeline in the same interaction. So, allow any object in the same
+ // interaction or that contains the interaction (so that it may be reached in the tree)
+ InteractionFragment self = (InteractionFragment) this.source;
+ Interaction myInteraction = (Interaction) EMFCoreUtil.getContainer(self, UMLPackage.Literals.INTERACTION);
+ isValid = Optional.ofNullable(myInteraction)
+ .map(interaction -> element -> isAncestor(interaction, element));
+ }
+
+ return isValid.map(
+ valid -> new UMLContentProvider(source, feature, null, resourceSet) {
+ @Override
+ public boolean isValidValue(Object element) {
+ EObject eObject = EMFHelper.getEObject(element);
+ return valid.test(eObject) && super.isValidValue(element);
+ }
+ })
+ .orElseGet(() -> new UMLContentProvider(source, feature, null, resourceSet));
}
@Override
@@ -265,7 +276,7 @@ public class UMLModelElement extends EMFModelElement {
@Override
protected List<EClass> getAvailableEClasses() {
// according to the UML norm 2.5, section 17.4.3.1
- // The signature of a Message refers to either an Operation or a Signal.
+ // The signature of a Message refers to either an Operation or a Signal.
final List<EClass> eClasses = new ArrayList<EClass>();
eClasses.add(UMLPackage.eINSTANCE.getOperation());
eClasses.add(UMLPackage.eINSTANCE.getSignal());
diff --git a/tests/junit/framework/org.eclipse.papyrus.junit.utils/src/org/eclipse/papyrus/junit/matchers/DiagramMatchers.java b/tests/junit/framework/org.eclipse.papyrus.junit.utils/src/org/eclipse/papyrus/junit/matchers/DiagramMatchers.java
index 8267e6b3529..f10ae3c30e4 100644
--- a/tests/junit/framework/org.eclipse.papyrus.junit.utils/src/org/eclipse/papyrus/junit/matchers/DiagramMatchers.java
+++ b/tests/junit/framework/org.eclipse.papyrus.junit.utils/src/org/eclipse/papyrus/junit/matchers/DiagramMatchers.java
@@ -8,7 +8,7 @@
*
* Contributors:
* Christian W. Damus (CEA) - Initial API and implementation
- * Christian W. Damus - bugs 533673, 533676
+ * Christian W. Damus - bugs 533673, 533676, 507479
*
*/
package org.eclipse.papyrus.junit.matchers;
@@ -164,6 +164,24 @@ public class DiagramMatchers {
}
/**
+ * Match an edit-part that has a {@linkplain IPapyrusMarker#SEVERITY_WARNING warning}
+ * decoration having a message matching a given matcher.
+ *
+ * @param messageMatcher
+ * matcher for the decoration message
+ *
+ * @return the decoration matcher
+ *
+ * @since 2.2
+ *
+ * @see #hasDecorationThat(int, Matcher)
+ * @see IPapyrusMarker#SEVERITY_WARNING
+ */
+ public static Matcher<EditPart> hasWarningDecorationThat(Matcher<? super String> messageMatcher) {
+ return hasDecorationThat(IPapyrusMarker.SEVERITY_WARNING, messageMatcher);
+ }
+
+ /**
* Match an edit-part that has a decoration of a given severity having a message matching
* a given matcher.
*
diff --git a/tests/junit/framework/org.eclipse.papyrus.junit.utils/src/org/eclipse/papyrus/junit/utils/rules/PreferenceRule.java b/tests/junit/framework/org.eclipse.papyrus.junit.utils/src/org/eclipse/papyrus/junit/utils/rules/PreferenceRule.java
new file mode 100644
index 00000000000..f5570d83c1d
--- /dev/null
+++ b/tests/junit/framework/org.eclipse.papyrus.junit.utils/src/org/eclipse/papyrus/junit/utils/rules/PreferenceRule.java
@@ -0,0 +1,142 @@
+/*****************************************************************************
+ * Copyright (c) 2018 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 v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Christian W. Damus - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.junit.utils.rules;
+
+import java.util.function.BiFunction;
+
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.junit.rules.TestRule;
+import org.junit.runner.Description;
+import org.junit.runners.model.Statement;
+
+/**
+ * A JUnit test rule for ensuring some Eclipse Preference value for the duration
+ * of a test.
+ */
+public final class PreferenceRule<T> implements TestRule {
+
+ private final IPreferenceStore store;
+ private final String key;
+ private final T value;
+ private T oldValue;
+
+ private final BiFunction<IPreferenceStore, String, ? extends T> accessor;
+ private final TriConsumer<IPreferenceStore, String, ? super T> mutator;
+
+ /**
+ * Initializes me.
+ *
+ * @param store
+ * the preference store on which to operate
+ * @param key
+ * the preference key on which to operate
+ * @param the
+ * value to set in the preference
+ */
+ private PreferenceRule(IPreferenceStore store, String key, T value,
+ BiFunction<IPreferenceStore, String, ? extends T> accessor,
+ TriConsumer<IPreferenceStore, String, ? super T> mutator) {
+
+ super();
+
+ this.store = store;
+ this.key = key;
+ this.value = value;
+ this.accessor = accessor;
+ this.mutator = mutator;
+ }
+
+ @Override
+ public Statement apply(Statement base, Description description) {
+ return new Statement() {
+
+ @Override
+ public void evaluate() throws Throwable {
+ setPreference(store, key);
+
+ try {
+ base.evaluate();
+ } finally {
+ restorePreference(store, key);
+ }
+ }
+ };
+ }
+
+ protected void setPreference(IPreferenceStore store, String key) {
+ oldValue = accessor.apply(store, key);
+ mutator.accept(store, key, value);
+ }
+
+ protected void restorePreference(IPreferenceStore store, String key) {
+ mutator.accept(store, key, oldValue);
+ }
+
+ /**
+ * Create a boolean-valued preference rule.
+ *
+ * @param store
+ * the preference store
+ * @param key
+ * the preference key
+ * @param value
+ * the value to set for the duration of the test
+ * @return the preference rule
+ */
+ public static final PreferenceRule<Boolean> create(IPreferenceStore store, String key, boolean value) {
+ return new PreferenceRule<Boolean>(store, key, value,
+ IPreferenceStore::getBoolean, IPreferenceStore::setValue);
+ }
+
+ /**
+ * Create a string-valued preference rule.
+ *
+ * @param store
+ * the preference store
+ * @param key
+ * the preference key
+ * @param value
+ * the value to set for the duration of the test
+ * @return the preference rule
+ */
+ public static final PreferenceRule<String> create(IPreferenceStore store, String key, String value) {
+ return new PreferenceRule<String>(store, key, value,
+ IPreferenceStore::getString, IPreferenceStore::setValue);
+ }
+
+ /**
+ * Create an integer-valued preference rule.
+ *
+ * @param store
+ * the preference store
+ * @param key
+ * the preference key
+ * @param value
+ * the value to set for the duration of the test
+ * @return the preference rule
+ */
+ public static final PreferenceRule<Integer> create(IPreferenceStore store, String key, int value) {
+ return new PreferenceRule<Integer>(store, key, value,
+ IPreferenceStore::getInt, IPreferenceStore::setValue);
+ }
+
+ //
+ // Nested types
+ //
+
+ @FunctionalInterface
+ private interface TriConsumer<T, U, V> {
+ void accept(T t, U u, V v);
+ }
+}
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence.tests/src/org/eclipse/papyrus/uml/diagram/sequence/tests/bug/CombinedFragmentRegressionTest.java b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence.tests/src/org/eclipse/papyrus/uml/diagram/sequence/tests/bug/CombinedFragmentRegressionTest.java
index 4fda5bfdf62..ec9a97b5626 100644
--- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence.tests/src/org/eclipse/papyrus/uml/diagram/sequence/tests/bug/CombinedFragmentRegressionTest.java
+++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence.tests/src/org/eclipse/papyrus/uml/diagram/sequence/tests/bug/CombinedFragmentRegressionTest.java
@@ -14,6 +14,7 @@
package org.eclipse.papyrus.uml.diagram.sequence.tests.bug;
import static org.eclipse.papyrus.junit.matchers.DiagramMatchers.hasErrorDecorationThat;
+import static org.eclipse.papyrus.junit.matchers.DiagramMatchers.hasWarningDecorationThat;
import static org.eclipse.papyrus.junit.matchers.MoreMatchers.greaterThan;
import static org.eclipse.papyrus.junit.matchers.MoreMatchers.greaterThanOrEqual;
import static org.eclipse.papyrus.junit.matchers.MoreMatchers.isEmpty;
@@ -51,6 +52,8 @@ import org.eclipse.draw2d.geometry.Point;
import org.eclipse.draw2d.geometry.PointList;
import org.eclipse.draw2d.geometry.Rectangle;
import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.edit.command.AddCommand;
+import org.eclipse.emf.edit.command.RemoveCommand;
import org.eclipse.emf.validation.model.EvaluationMode;
import org.eclipse.emf.validation.service.IValidationListener;
import org.eclipse.emf.validation.service.ModelValidationService;
@@ -69,6 +72,7 @@ import org.eclipse.papyrus.junit.matchers.DiagramMatchers;
import org.eclipse.papyrus.junit.utils.rules.ActiveDiagram;
import org.eclipse.papyrus.junit.utils.rules.PapyrusEditorFixture;
import org.eclipse.papyrus.junit.utils.rules.PluginResource;
+import org.eclipse.papyrus.junit.utils.rules.PreferenceRule;
import org.eclipse.papyrus.uml.diagram.sequence.part.UMLDiagramEditorPlugin;
import org.eclipse.papyrus.uml.diagram.sequence.preferences.CustomDiagramGeneralPreferencePage;
import org.eclipse.papyrus.uml.diagram.sequence.providers.UMLElementTypes;
@@ -84,13 +88,14 @@ import org.eclipse.uml2.uml.InteractionFragment;
import org.eclipse.uml2.uml.InteractionOperand;
import org.eclipse.uml2.uml.Lifeline;
import org.eclipse.uml2.uml.Message;
+import org.eclipse.uml2.uml.UMLPackage;
import org.hamcrest.CoreMatchers;
import org.hamcrest.CustomTypeSafeMatcher;
import org.hamcrest.Matcher;
-import org.junit.After;
-import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
+import org.junit.rules.RuleChain;
+import org.junit.rules.TestRule;
/**
* Regression tests specifically for {@link CombinedFragment}s in the sequence diagram
@@ -102,8 +107,21 @@ import org.junit.Test;
@ActiveDiagram("sequence")
public class CombinedFragmentRegressionTest extends AbstractPapyrusTest {
+ // this needs to be a sequenceable rule so that it can be run before the editor
+ private final TestRule validationPreference = PreferenceRule.create(
+ UMLDiagramEditorPlugin.getInstance().getPreferenceStore(),
+ CustomDiagramGeneralPreferencePage.PREF_TRIGGER_ASYNC_VALIDATION,
+ true);
+
+ private final PapyrusEditorFixture editor = new PapyrusEditorFixture();
+
+ // Ensure intiialization of the validation preference before the editor
+ // because opening of the diagram needs to kick off validation via the
+ // initial owner updates computed by activation of the grid management
+ // edit policy
@Rule
- public final PapyrusEditorFixture editor = new PapyrusEditorFixture();
+ public final RuleChain rules = RuleChain.outerRule(validationPreference)
+ .around(editor);
/**
* Initializes me.
@@ -111,23 +129,7 @@ public class CombinedFragmentRegressionTest extends AbstractPapyrusTest {
public CombinedFragmentRegressionTest() {
super();
}
-
- /**
- * Before test initialization with preference initialization.
- */
- @Before
- public void init() {
- UMLDiagramEditorPlugin.getInstance().getPreferenceStore().setValue(CustomDiagramGeneralPreferencePage.PREF_TRIGGER_ASYNC_VALIDATION, true);
- }
-
- /**
- * After test with preference modification.
- */
- @After
- public void finalize() {
- UMLDiagramEditorPlugin.getInstance().getPreferenceStore().setValue(CustomDiagramGeneralPreferencePage.PREF_TRIGGER_ASYNC_VALIDATION, false);
- }
-
+
/**
* Verify the creation and extent of a default interaction operand in a newly
* created combined fragment.
@@ -674,7 +676,7 @@ public class CombinedFragmentRegressionTest extends AbstractPapyrusTest {
@Test
@PluginResource("resource/bugs/bug533676.di")
public void validateResizedInteractionOperand_533676() {
-
+
GraphicalEditPart operandEP = (GraphicalEditPart) editor.findEditPart("opt", InteractionOperand.class);
InteractionOperand operand = (InteractionOperand) operandEP.getAdapter(EObject.class);
Interaction interaction = (Interaction) operand.eContainer().eContainer();
@@ -697,7 +699,7 @@ public class CombinedFragmentRegressionTest extends AbstractPapyrusTest {
@Test
@PluginResource("resource/bugs/bug533676a.di")
public void validateCreatedInteractionOperand_533676() {
-
+
EditPart interactionEP = editor.findEditPart("doIt", Interaction.class);
EditPart interactionCompartment = editor.getShapeCompartment(interactionEP);
@@ -759,6 +761,119 @@ public class CombinedFragmentRegressionTest extends AbstractPapyrusTest {
assertThat(operand.getFragments(), hasItems(fragments));
}
+ /**
+ * Verify the validation of a combined fragment that has multiple lifelines
+ * uncovered that are covered by fragments of its operands.
+ */
+ @Test
+ @PluginResource("resource/bugs/bug533676.di")
+ public void validateCFragCoverage_multipleUncovered() {
+ // It's validated on open of the diagram editor
+ EditPart cfragEP = editor.findEditPart("cfrag", CombinedFragment.class);
+
+ assertThat(cfragEP, hasWarningDecorationThat(startsWith("Lifelines 'a', 'b' not covered")));
+ }
+
+ /**
+ * Verify the validation of a combined fragment that has a single lifeline
+ * uncovered that is covered by fragments of its operands.
+ */
+ @Test
+ @PluginResource("resource/bugs/bug533676.di")
+ public void validateCFragCoverage_singleUncovered() {
+ EditPart cfragEP = editor.findEditPart("cfrag", CombinedFragment.class);
+ CombinedFragment cfrag = cfragEP.getAdapter(CombinedFragment.class);
+ Interaction interaction = cfrag.getEnclosingInteraction();
+ Lifeline a = interaction.getLifeline("a");
+
+ // Add lifeline 'a' to the coverage of the combined fragment
+ org.eclipse.emf.common.command.Command addCoverage = AddCommand.create(
+ editor.getEditingDomain(), cfrag, UMLPackage.Literals.INTERACTION_FRAGMENT__COVERED, a);
+ editor.execute(addCoverage);
+
+ assertThat(cfragEP, hasWarningDecorationThat(startsWith("Lifeline 'b' not covered")));
+ }
+
+ /**
+ * Verify the validation of a combined fragment that has all lifelines
+ * covered that are covered by fragments of its operands.
+ */
+ @Test
+ @PluginResource("resource/bugs/bug533676.di")
+ public void validateCFragCoverage_noneUncovered() {
+ EditPart cfragEP = editor.findEditPart("cfrag", CombinedFragment.class);
+ CombinedFragment cfrag = cfragEP.getAdapter(CombinedFragment.class);
+ Interaction interaction = cfrag.getEnclosingInteraction();
+ Lifeline a = interaction.getLifeline("a");
+ Lifeline b = interaction.getLifeline("b");
+
+ // Add the lifelines to the coverage of the combined fragment
+ org.eclipse.emf.common.command.Command addCoverage = AddCommand.create(
+ editor.getEditingDomain(), cfrag, UMLPackage.Literals.INTERACTION_FRAGMENT__COVERED,
+ Arrays.asList(a, b));
+ editor.execute(addCoverage);
+
+ assertThat(cfragEP, not(hasWarningDecorationThat(startsWith("Lifeline"))));
+ }
+
+ /**
+ * Verify the validation of an interaction operand that has multiple lifelines
+ * uncovered that are covered by fragments that it owns.
+ */
+ @Test
+ @PluginResource("resource/bugs/bug533676.di")
+ public void validateOperandCoverage_multipleUncovered() {
+ // It's validated on open of the diagram editor
+ EditPart operandEP = editor.findEditPart("opt", InteractionOperand.class);
+ InteractionOperand operand = operandEP.getAdapter(InteractionOperand.class);
+ CombinedFragment cfrag = (CombinedFragment) operand.getOwner();
+ Interaction interaction = cfrag.getEnclosingInteraction();
+ Lifeline a = interaction.getLifeline("a");
+ Lifeline b = interaction.getLifeline("b");
+
+ // Remove the lifelines from the coverage of the combined fragment
+ org.eclipse.emf.common.command.Command removeCoverage = RemoveCommand.create(
+ editor.getEditingDomain(), operand, UMLPackage.Literals.INTERACTION_FRAGMENT__COVERED,
+ Arrays.asList(a, b));
+ editor.execute(removeCoverage);
+
+ assertThat(operandEP, hasWarningDecorationThat(startsWith("Lifelines 'a', 'b' not covered")));
+ }
+
+ /**
+ * Verify the validation of an interaction operand that has a single lifeline
+ * uncovered that is covered by fragments that it owns.
+ */
+ @Test
+ @PluginResource("resource/bugs/bug533676.di")
+ public void validateOperandCoverage_singleUncovered() {
+ EditPart operandEP = editor.findEditPart("opt", InteractionOperand.class);
+ InteractionOperand operand = operandEP.getAdapter(InteractionOperand.class);
+ CombinedFragment cfrag = (CombinedFragment) operand.getOwner();
+ Interaction interaction = cfrag.getEnclosingInteraction();
+ Lifeline a = interaction.getLifeline("a");
+
+ // Remove lifeline 'a' from the coverage of the operand
+ org.eclipse.emf.common.command.Command removeCoverage = RemoveCommand.create(
+ editor.getEditingDomain(), operand, UMLPackage.Literals.INTERACTION_FRAGMENT__COVERED, a);
+ editor.execute(removeCoverage);
+
+ assertThat(operandEP, hasWarningDecorationThat(startsWith("Lifeline 'a' not covered")));
+ }
+
+ /**
+ * Verify the validation of an interaction operand that has all lifelines
+ * covered that are covered by fragments that it owns.
+ */
+ @Test
+ @PluginResource("resource/bugs/bug533676.di")
+ public void validateOperandCoverage_noneUncovered() {
+ // It's validated on open of the diagram editor
+ EditPart operandEP = editor.findEditPart("opt", InteractionOperand.class);
+
+ assertThat(operandEP, not(hasWarningDecorationThat(startsWith("Lifeline"))));
+ }
+
//
// Test framework
//
diff --git a/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/.classpath b/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/.classpath
new file mode 100644
index 00000000000..eca7bdba8f0
--- /dev/null
+++ b/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/.classpath
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/.project b/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/.project
new file mode 100644
index 00000000000..088cd6168a0
--- /dev/null
+++ b/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.papyrus.uml.properties.tests</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
diff --git a/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/.settings/org.eclipse.core.resources.prefs b/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/.settings/org.eclipse.core.resources.prefs
new file mode 100644
index 00000000000..896a9a53a53
--- /dev/null
+++ b/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/.settings/org.eclipse.core.resources.prefs
@@ -0,0 +1,2 @@
+eclipse.preferences.version=1
+encoding/<project>=UTF-8 \ No newline at end of file
diff --git a/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/.settings/org.eclipse.core.runtime.prefs b/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/.settings/org.eclipse.core.runtime.prefs
new file mode 100644
index 00000000000..5a0ad22d2a7
--- /dev/null
+++ b/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/.settings/org.eclipse.core.runtime.prefs
@@ -0,0 +1,2 @@
+eclipse.preferences.version=1
+line.separator=\n
diff --git a/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/.settings/org.eclipse.jdt.core.prefs b/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 00000000000..b3aa6d60f94
--- /dev/null
+++ b/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,291 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
+org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.8
+org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_assignment=0
+org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
+org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
+org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
+org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
+org.eclipse.jdt.core.formatter.alignment_for_method_declaration=0
+org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_resources_in_try=80
+org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_union_type_in_multicatch=16
+org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_after_package=1
+org.eclipse.jdt.core.formatter.blank_lines_before_field=0
+org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0
+org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1
+org.eclipse.jdt.core.formatter.blank_lines_before_method=1
+org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
+org.eclipse.jdt.core.formatter.blank_lines_before_package=0
+org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1
+org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
+org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_lambda_body=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false
+org.eclipse.jdt.core.formatter.comment.format_block_comments=true
+org.eclipse.jdt.core.formatter.comment.format_header=false
+org.eclipse.jdt.core.formatter.comment.format_html=true
+org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=true
+org.eclipse.jdt.core.formatter.comment.format_line_comments=true
+org.eclipse.jdt.core.formatter.comment.format_source_code=true
+org.eclipse.jdt.core.formatter.comment.indent_parameter_description=true
+org.eclipse.jdt.core.formatter.comment.indent_root_tags=true
+org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
+org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=insert
+org.eclipse.jdt.core.formatter.comment.line_length=260
+org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries=true
+org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries=true
+org.eclipse.jdt.core.formatter.comment.preserve_white_space_between_code_and_line_comments=false
+org.eclipse.jdt.core.formatter.compact_else_if=true
+org.eclipse.jdt.core.formatter.continuation_indentation=2
+org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2
+org.eclipse.jdt.core.formatter.disabling_tag=@formatter\:off
+org.eclipse.jdt.core.formatter.enabling_tag=@formatter\:on
+org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
+org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
+org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_empty_lines=false
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=false
+org.eclipse.jdt.core.formatter.indentation.size=4
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_method=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_type=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_label=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_type_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
+org.eclipse.jdt.core.formatter.insert_space_after_lambda_arrow=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_try=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_try_resources=insert
+org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_try=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_lambda_arrow=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_try=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert
+org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_try_resources=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.join_lines_in_comments=false
+org.eclipse.jdt.core.formatter.join_wrapped_lines=false
+org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.lineSplit=260
+org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
+org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=5
+org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true
+org.eclipse.jdt.core.formatter.tabulation.char=tab
+org.eclipse.jdt.core.formatter.tabulation.size=4
+org.eclipse.jdt.core.formatter.use_on_off_tags=false
+org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
+org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
+org.eclipse.jdt.core.formatter.wrap_before_or_operator_multicatch=true
+org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested=true
diff --git a/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/.settings/org.eclipse.jdt.ui.prefs b/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/.settings/org.eclipse.jdt.ui.prefs
new file mode 100644
index 00000000000..954281dbc31
--- /dev/null
+++ b/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/.settings/org.eclipse.jdt.ui.prefs
@@ -0,0 +1,68 @@
+cleanup.add_default_serial_version_id=true
+cleanup.add_generated_serial_version_id=false
+cleanup.add_missing_annotations=true
+cleanup.add_missing_deprecated_annotations=true
+cleanup.add_missing_methods=false
+cleanup.add_missing_nls_tags=false
+cleanup.add_missing_override_annotations=true
+cleanup.add_missing_override_annotations_interface_methods=true
+cleanup.add_serial_version_id=false
+cleanup.always_use_blocks=true
+cleanup.always_use_parentheses_in_expressions=false
+cleanup.always_use_this_for_non_static_field_access=false
+cleanup.always_use_this_for_non_static_method_access=false
+cleanup.convert_functional_interfaces=false
+cleanup.convert_to_enhanced_for_loop=false
+cleanup.correct_indentation=false
+cleanup.format_source_code=false
+cleanup.format_source_code_changes_only=false
+cleanup.insert_inferred_type_arguments=false
+cleanup.make_local_variable_final=true
+cleanup.make_parameters_final=false
+cleanup.make_private_fields_final=true
+cleanup.make_type_abstract_if_missing_method=false
+cleanup.make_variable_declarations_final=false
+cleanup.never_use_blocks=false
+cleanup.never_use_parentheses_in_expressions=true
+cleanup.organize_imports=false
+cleanup.qualify_static_field_accesses_with_declaring_class=false
+cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
+cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
+cleanup.qualify_static_member_accesses_with_declaring_class=true
+cleanup.qualify_static_method_accesses_with_declaring_class=false
+cleanup.remove_private_constructors=true
+cleanup.remove_redundant_type_arguments=true
+cleanup.remove_trailing_whitespaces=true
+cleanup.remove_trailing_whitespaces_all=true
+cleanup.remove_trailing_whitespaces_ignore_empty=false
+cleanup.remove_unnecessary_casts=true
+cleanup.remove_unnecessary_nls_tags=true
+cleanup.remove_unused_imports=true
+cleanup.remove_unused_local_variables=false
+cleanup.remove_unused_private_fields=true
+cleanup.remove_unused_private_members=false
+cleanup.remove_unused_private_methods=true
+cleanup.remove_unused_private_types=true
+cleanup.sort_members=false
+cleanup.sort_members_all=false
+cleanup.use_anonymous_class_creation=false
+cleanup.use_blocks=true
+cleanup.use_blocks_only_for_return_and_throw=false
+cleanup.use_lambda=true
+cleanup.use_parentheses_in_expressions=false
+cleanup.use_this_for_non_static_field_access=false
+cleanup.use_this_for_non_static_field_access_only_if_necessary=true
+cleanup.use_this_for_non_static_method_access=false
+cleanup.use_this_for_non_static_method_access_only_if_necessary=true
+cleanup.use_type_arguments=false
+cleanup_profile=_Papyrus
+cleanup_settings_version=2
+eclipse.preferences.version=1
+formatter_profile=_Papyrus
+formatter_settings_version=12
+org.eclipse.jdt.ui.ignorelowercasenames=true
+org.eclipse.jdt.ui.importorder=java;javax;org;com;
+org.eclipse.jdt.ui.javadoc=true
+org.eclipse.jdt.ui.ondemandthreshold=99
+org.eclipse.jdt.ui.staticondemandthreshold=99
+org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8" standalone\="no"?><templates><template autoinsert\="true" context\="gettercomment_context" deleted\="false" description\="Comment for getter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.gettercomment" name\="gettercomment">/**\n * @return the ${bare_field_name}\n */</template><template autoinsert\="true" context\="settercomment_context" deleted\="false" description\="Comment for setter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.settercomment" name\="settercomment">/**\n * @param ${param} the ${bare_field_name} to set\n */</template><template autoinsert\="false" context\="constructorcomment_context" deleted\="false" description\="Comment for created constructors" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorcomment" name\="constructorcomment">/**\n * Constructor.\n *\n * ${tags}\n */</template><template autoinsert\="false" context\="filecomment_context" deleted\="false" description\="Comment for created Java files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.filecomment" name\="filecomment">/*****************************************************************************\n * Copyright (c) ${year} CEA LIST and others.\n * \n * All rights reserved. This program and the accompanying materials\n * are made available under the terms of the Eclipse Public License v1.0\n * which accompanies this distribution, and is available at\n * http\://www.eclipse.org/legal/epl-v10.html\n *\n * Contributors\:\n * CEA LIST - Initial API and implementation\n * \n *****************************************************************************/\n</template><template autoinsert\="true" context\="typecomment_context" deleted\="false" description\="Comment for created types" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.typecomment" name\="typecomment">/**\n * @author ${user}\n *\n * ${tags}\n */</template><template autoinsert\="true" context\="fieldcomment_context" deleted\="false" description\="Comment for fields" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.fieldcomment" name\="fieldcomment">/**\n * \n */</template><template autoinsert\="true" context\="methodcomment_context" deleted\="false" description\="Comment for non-overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodcomment" name\="methodcomment">/**\n * ${tags}\n */</template><template autoinsert\="false" context\="overridecomment_context" deleted\="false" description\="Comment for overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.overridecomment" name\="overridecomment">/**\n * ${see_to_overridden}\n *\n * ${tags}\n */</template><template autoinsert\="false" context\="delegatecomment_context" deleted\="false" description\="Comment for delegate methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.delegatecomment" name\="delegatecomment">/**\n * ${see_to_target}\n *\n * ${tags}\n */</template><template autoinsert\="true" context\="newtype_context" deleted\="false" description\="Newly created files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.newtype" name\="newtype">${filecomment}\n${package_declaration}\n\n${typecomment}\n${type_declaration}</template><template autoinsert\="true" context\="classbody_context" deleted\="false" description\="Code in new class type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.classbody" name\="classbody">\n</template><template autoinsert\="true" context\="interfacebody_context" deleted\="false" description\="Code in new interface type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.interfacebody" name\="interfacebody">\n</template><template autoinsert\="true" context\="enumbody_context" deleted\="false" description\="Code in new enum type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.enumbody" name\="enumbody">\n</template><template autoinsert\="true" context\="annotationbody_context" deleted\="false" description\="Code in new annotation type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.annotationbody" name\="annotationbody">\n</template><template autoinsert\="true" context\="catchblock_context" deleted\="false" description\="Code in new catch blocks" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.catchblock" name\="catchblock">// ${todo} Auto-generated catch block\n${exception_var}.printStackTrace();</template><template autoinsert\="true" context\="methodbody_context" deleted\="false" description\="Code in created method stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodbody" name\="methodbody">// ${todo} Auto-generated method stub\n${body_statement}</template><template autoinsert\="true" context\="constructorbody_context" deleted\="false" description\="Code in created constructor stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorbody" name\="constructorbody">${body_statement}\n// ${todo} Auto-generated constructor stub</template><template autoinsert\="true" context\="getterbody_context" deleted\="false" description\="Code in created getters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.getterbody" name\="getterbody">return ${field};</template><template autoinsert\="true" context\="setterbody_context" deleted\="false" description\="Code in created setters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.setterbody" name\="setterbody">${field} \= ${param};</template></templates>
diff --git a/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/META-INF/MANIFEST.MF b/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/META-INF/MANIFEST.MF
new file mode 100644
index 00000000000..bf63ae305b0
--- /dev/null
+++ b/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/META-INF/MANIFEST.MF
@@ -0,0 +1,18 @@
+Manifest-Version: 1.0
+Require-Bundle: org.junit;bundle-version="4.10.0";visibility:=reexport,
+ org.eclipse.papyrus.junit.framework;bundle-version="[1.2.0,2.0.0)";visibility:=reexport,
+ org.eclipse.papyrus.junit.utils;bundle-version="[2.0.0,3.0.0)",
+ org.hamcrest.core,
+ org.eclipse.papyrus.uml.properties;bundle-version="[3.1.100,4.0.0)",
+ org.eclipse.papyrus.infra.properties.ui;bundle-version="[3.3.0,4.0.0)"
+Export-Package: org.eclipse.papyrus.uml.properties.modelelement.tests,
+ org.eclipse.papyrus.uml.properties.tests
+Bundle-Vendor: %providerName
+Bundle-Version: 1.0.0.qualifier
+Bundle-Name: %pluginName
+Bundle-Localization: plugin
+Bundle-ManifestVersion: 2
+Bundle-SymbolicName: org.eclipse.papyrus.uml.properties.tests;singleton:=true
+Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+Import-Package: com.google.common.collect;version="21.0.0"
+Automatic-Module-Name: org.eclipse.papyrus.uml.properties.tests
diff --git a/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/about.html b/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/about.html
new file mode 100644
index 00000000000..d35d5aed64c
--- /dev/null
+++ b/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/about.html
@@ -0,0 +1,28 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
+<title>About</title>
+</head>
+<body lang="EN-US">
+<h2>About This Content</h2>
+
+<p>June 5, 2007</p>
+<h3>License</h3>
+
+<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
+indicated below, the Content is provided to you under the terms and conditions of the
+Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available
+at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
+For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
+
+<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
+being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
+apply to your use of any object code in the Content. Check the Redistributor's license that was
+provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
+indicated below, the terms and conditions of the EPL still apply to any source code in the Content
+and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p>
+
+</body>
+</html>
diff --git a/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/build.properties b/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/build.properties
new file mode 100644
index 00000000000..cdd2db7f1f5
--- /dev/null
+++ b/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/build.properties
@@ -0,0 +1,7 @@
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+ .,\
+ about.html,\
+ plugin.properties
+src.includes = about.html
diff --git a/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/org.eclipse.papyrus.uml.properties.tests.launch b/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/org.eclipse.papyrus.uml.properties.tests.launch
new file mode 100644
index 00000000000..ff56762e63d
--- /dev/null
+++ b/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/org.eclipse.papyrus.uml.properties.tests.launch
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<launchConfiguration type="org.eclipse.pde.ui.JunitLaunchConfig">
+<booleanAttribute key="append.args" value="true"/>
+<booleanAttribute key="askclear" value="false"/>
+<booleanAttribute key="automaticAdd" value="true"/>
+<booleanAttribute key="automaticValidate" value="false"/>
+<stringAttribute key="bootstrap" value=""/>
+<stringAttribute key="checked" value="[NONE]"/>
+<booleanAttribute key="clearConfig" value="true"/>
+<booleanAttribute key="clearws" value="true"/>
+<booleanAttribute key="clearwslog" value="false"/>
+<stringAttribute key="configLocation" value="${workspace_loc}/.metadata/.plugins/org.eclipse.pde.core/pde-junit"/>
+<booleanAttribute key="default" value="true"/>
+<booleanAttribute key="includeOptional" value="true"/>
+<stringAttribute key="location" value="${workspace_loc}/../junit-workspace"/>
+<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
+<listEntry value="/org.eclipse.papyrus.uml.properties.tests/src/org/eclipse/papyrus/uml/properties/tests/AllTests.java"/>
+</listAttribute>
+<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
+<listEntry value="1"/>
+</listAttribute>
+<stringAttribute key="org.eclipse.jdt.junit.CONTAINER" value=""/>
+<booleanAttribute key="org.eclipse.jdt.junit.KEEPRUNNING_ATTR" value="false"/>
+<stringAttribute key="org.eclipse.jdt.junit.TESTNAME" value=""/>
+<stringAttribute key="org.eclipse.jdt.junit.TEST_KIND" value="org.eclipse.jdt.junit.loader.junit4"/>
+<booleanAttribute key="org.eclipse.jdt.launching.ATTR_USE_START_ON_FIRST_THREAD" value="true"/>
+<stringAttribute key="org.eclipse.jdt.launching.JRE_CONTAINER" value="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
+<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="org.eclipse.papyrus.uml.properties.tests.AllTests"/>
+<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-os ${target.os} -ws ${target.ws} -arch ${target.arch} -nl ${target.nl} -consoleLog"/>
+<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="org.eclipse.papyrus.uml.properties.tests"/>
+<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.pde.ui.workbenchClasspathProvider"/>
+<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Dhelp.lucene.tokenizer=standard -Xms768m -Xmx1200m"/>
+<stringAttribute key="pde.version" value="3.3"/>
+<stringAttribute key="product" value="org.eclipse.platform.ide"/>
+<booleanAttribute key="run_in_ui_thread" value="true"/>
+<booleanAttribute key="show_selected_only" value="false"/>
+<stringAttribute key="templateConfig" value="${target_home}\configuration\config.ini"/>
+<booleanAttribute key="tracing" value="false"/>
+<booleanAttribute key="useCustomFeatures" value="false"/>
+<booleanAttribute key="useDefaultConfig" value="true"/>
+<booleanAttribute key="useDefaultConfigArea" value="false"/>
+<booleanAttribute key="useProduct" value="true"/>
+</launchConfiguration>
diff --git a/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/plugin.properties b/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/plugin.properties
new file mode 100644
index 00000000000..79ab858bc4f
--- /dev/null
+++ b/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/plugin.properties
@@ -0,0 +1,13 @@
+#################################################################################
+# Copyright (c) 2018 CEA LIST and others.
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License v1.0
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+# Christian W. Damus - Initial API and Implementation.
+#
+##################################################################################
+pluginName=Papyrus UML Properties Tests
+providerName=Eclipse Modeling Project
diff --git a/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/pom.xml b/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/pom.xml
new file mode 100644
index 00000000000..282b91f970f
--- /dev/null
+++ b/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/pom.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.eclipse.papyrus.tests</groupId>
+ <artifactId>org.eclipse.papyrus.uml.tests.releng</artifactId>
+ <version>0.0.1-SNAPSHOT</version>
+ </parent>
+ <groupId>org.eclipse.papyrus.tests</groupId>
+ <artifactId>org.eclipse.papyrus.uml.properties.tests</artifactId>
+ <version>1.0.0-SNAPSHOT</version>
+ <packaging>eclipse-test-plugin</packaging>
+</project>
diff --git a/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/src/org/eclipse/papyrus/uml/properties/modelelement/tests/UMLModelElementTest.java b/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/src/org/eclipse/papyrus/uml/properties/modelelement/tests/UMLModelElementTest.java
new file mode 100644
index 00000000000..bdbbb13f364
--- /dev/null
+++ b/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/src/org/eclipse/papyrus/uml/properties/modelelement/tests/UMLModelElementTest.java
@@ -0,0 +1,152 @@
+/*****************************************************************************
+ * Copyright (c) 2018 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Christian W. Damus - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.uml.properties.modelelement.tests;
+
+import static java.util.Collections.singleton;
+import static java.util.stream.Collectors.toSet;
+import static org.eclipse.emf.edit.domain.AdapterFactoryEditingDomain.getEditingDomainFor;
+import static org.hamcrest.CoreMatchers.instanceOf;
+import static org.hamcrest.CoreMatchers.is;
+import static org.hamcrest.MatcherAssert.assertThat;
+
+import java.util.Collection;
+import java.util.LinkedHashSet;
+import java.util.Set;
+import java.util.stream.Stream;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.jface.viewers.ITreeContentProvider;
+import org.eclipse.papyrus.infra.emf.utils.EMFHelper;
+import org.eclipse.papyrus.infra.properties.ui.modelelement.ModelElement;
+import org.eclipse.papyrus.infra.ui.emf.providers.strategy.ContainmentBrowseStrategy;
+import org.eclipse.papyrus.infra.widgets.providers.IStaticContentProvider;
+import org.eclipse.papyrus.infra.widgets.strategy.ProviderBasedBrowseStrategy;
+import org.eclipse.papyrus.infra.widgets.strategy.StrategyBasedContentProvider;
+import org.eclipse.papyrus.junit.framework.classification.tests.AbstractPapyrusTest;
+import org.eclipse.papyrus.junit.utils.rules.JavaResource;
+import org.eclipse.papyrus.junit.utils.rules.ResourceSetFixture;
+import org.eclipse.papyrus.uml.properties.modelelement.UMLModelElement;
+import org.eclipse.uml2.uml.Class;
+import org.eclipse.uml2.uml.CombinedFragment;
+import org.eclipse.uml2.uml.Interaction;
+import org.eclipse.uml2.uml.InteractionOperand;
+import org.eclipse.uml2.uml.Lifeline;
+import org.junit.Rule;
+import org.junit.Test;
+
+/**
+ * Tests for the {@link UMLModelElement} class.
+ */
+public class UMLModelElementTest extends AbstractPapyrusTest {
+
+ @Rule
+ public final ResourceSetFixture rset = new ResourceSetFixture();
+
+ /**
+ * Initializes me.
+ */
+ public UMLModelElementTest() {
+ super();
+ }
+
+ /**
+ * Verify that the content provider supplied for browsing potential covered lifelines
+ * of combined fragments includes only and exactly lifelines from the contextual
+ * interaction.
+ */
+ @Test
+ @JavaResource("bug507479.uml")
+ public void combinedFragment_contentProvider() {
+ Interaction interaction = getInteraction("Foo");
+ CombinedFragment cfrag = (CombinedFragment) interaction.getFragment("cfrag");
+
+ ITreeContentProvider content = getContentProvider(getElement(cfrag), "covered");
+
+ // The other class and its lifelines are not provided
+ Collection<Lifeline> lifelines = getProvidedContent(content, Lifeline.class);
+ Set<Interaction> fromInteractions = lifelines.stream().map(Lifeline::getInteraction).collect(toSet());
+ assertThat("Lifelines from wrong interaction", fromInteractions, is(singleton(interaction)));
+ }
+
+ /**
+ * Verify that the content provider supplied for browsing potential covered lifelines
+ * of interaction operands includes only and exactly lifelines from the contextual
+ * interaction.
+ */
+ @Test
+ @JavaResource("bug507479.uml")
+ public void interactionOperand_contentProvider() {
+ Interaction interaction = getInteraction("Foo");
+ CombinedFragment cfrag = (CombinedFragment) interaction.getFragment("cfrag");
+ InteractionOperand operand = cfrag.getOperand("opt");
+
+ ITreeContentProvider content = getContentProvider(getElement(operand), "covered");
+
+ // The other class and its lifelines are not provided
+ Collection<Lifeline> lifelines = getProvidedContent(content, Lifeline.class);
+ Set<Interaction> fromInteractions = lifelines.stream().map(Lifeline::getInteraction).collect(toSet());
+ assertThat("Lifelines from wrong interaction", fromInteractions, is(singleton(interaction)));
+ }
+
+ //
+ // Test framework
+ //
+
+ private Class getClass(String name) {
+ return (Class) rset.getModel().getOwnedType(name);
+ }
+
+ private Interaction getInteraction(String className) {
+ return (Interaction) getClass(className).getClassifierBehavior();
+ }
+
+ ModelElement getElement(EObject object) {
+ return new UMLModelElement(object, getEditingDomainFor(object));
+ }
+
+ ITreeContentProvider getContentProvider(ModelElement element, String propertyPath) {
+ IStaticContentProvider content = element.getContentProvider(propertyPath);
+ assertThat("Not a tree content provider", content, instanceOf(ITreeContentProvider.class));
+
+ ITreeContentProvider treeContent = (ITreeContentProvider) content;
+
+ // This uses isValidValue as in the Reference Editor Dialog to determine what
+ // to show and what may be selected
+ return new StrategyBasedContentProvider(new ProviderBasedBrowseStrategy(treeContent),
+ new ContainmentBrowseStrategy(treeContent));
+ }
+
+ <T> Collection<T> getProvidedContent(ITreeContentProvider content, java.lang.Class<T> type) {
+ Collection<T> result = new LinkedHashSet<>();
+
+ IStaticContentProvider staticContent = (IStaticContentProvider) content;
+ collectProvidedContent(content, staticContent.getElements(), type, 0, result);
+
+ return result;
+ }
+
+ private <T> void collectProvidedContent(ITreeContentProvider content, Object[] elements, java.lang.Class<T> type, int depth, Collection<? super T> result) {
+ if (depth < 100) { // Some content providers are cyclic
+ Stream.of(elements)
+ .peek(child -> collectProvidedContent(content, child, type, depth + 1, result))
+ .map(EMFHelper::getEObject)
+ .filter(type::isInstance).map(type::cast)
+ .forEach(result::add);
+ }
+ }
+
+ private <T> void collectProvidedContent(ITreeContentProvider content, Object parent, java.lang.Class<T> type, int depth, Collection<? super T> result) {
+ collectProvidedContent(content, content.getChildren(parent), type, depth, result);
+ }
+}
diff --git a/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/src/org/eclipse/papyrus/uml/properties/modelelement/tests/bug507479.uml b/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/src/org/eclipse/papyrus/uml/properties/modelelement/tests/bug507479.uml
new file mode 100644
index 00000000000..b50b4552f18
--- /dev/null
+++ b/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/src/org/eclipse/papyrus/uml/properties/modelelement/tests/bug507479.uml
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<uml:Model xmi:version="20131001" xmlns:xmi="http://www.omg.org/spec/XMI/20131001" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xmi:id="_Sot0IHi_EeizYruIlswaLQ" name="model">
+ <packagedElement xmi:type="uml:Class" xmi:id="_V4QSQHi_EeizYruIlswaLQ" name="Foo" classifierBehavior="_aYuMwHi_EeizYruIlswaLQ" isActive="true">
+ <ownedBehavior xmi:type="uml:Interaction" xmi:id="_aYuMwHi_EeizYruIlswaLQ" name="doIt">
+ <lifeline xmi:id="_b8u9MHi_EeizYruIlswaLQ" name="a" coveredBy="_i6VBcHi_EeizYruIlswaLQ _6u_wgHi_EeizYruIlswaLQ _4Ax2wHi_EeizYruIlswaLQ"/>
+ <lifeline xmi:id="_c2R0UHi_EeizYruIlswaLQ" name="b" coveredBy="_kj188Hi_EeizYruIlswaLQ _6u_wgHi_EeizYruIlswaLQ _4Ax2wHi_EeizYruIlswaLQ"/>
+ <lifeline xmi:id="_dAHs0Hi_EeizYruIlswaLQ" name="c"/>
+ <fragment xmi:type="uml:CombinedFragment" xmi:id="_4Ax2wHi_EeizYruIlswaLQ" name="cfrag" covered="_b8u9MHi_EeizYruIlswaLQ _c2R0UHi_EeizYruIlswaLQ" interactionOperator="opt">
+ <operand xmi:id="_6u_wgHi_EeizYruIlswaLQ" name="opt" covered="_b8u9MHi_EeizYruIlswaLQ _c2R0UHi_EeizYruIlswaLQ">
+ <fragment xmi:type="uml:MessageOccurrenceSpecification" xmi:id="_i6VBcHi_EeizYruIlswaLQ" name="send" covered="_b8u9MHi_EeizYruIlswaLQ" message="_mgSbgHi_EeizYruIlswaLQ"/>
+ <fragment xmi:type="uml:MessageOccurrenceSpecification" xmi:id="_kj188Hi_EeizYruIlswaLQ" name="recv" covered="_c2R0UHi_EeizYruIlswaLQ" message="_mgSbgHi_EeizYruIlswaLQ"/>
+ <guard xmi:id="_CU38wHjAEeizYruIlswaLQ">
+ <specification xmi:type="uml:LiteralBoolean" xmi:id="_E0eLsHjAEeizYruIlswaLQ" value="true"/>
+ </guard>
+ </operand>
+ </fragment>
+ <message xmi:id="_mgSbgHi_EeizYruIlswaLQ" name="hello" messageSort="asynchSignal" receiveEvent="_kj188Hi_EeizYruIlswaLQ" sendEvent="_i6VBcHi_EeizYruIlswaLQ"/>
+ </ownedBehavior>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Class" xmi:id="_HBI3kHjAEeizYruIlswaLQ" name="Bar" classifierBehavior="_HBI3kXjAEeizYruIlswaLQ" isActive="true">
+ <ownedBehavior xmi:type="uml:Interaction" xmi:id="_HBI3kXjAEeizYruIlswaLQ" name="forbidden">
+ <lifeline xmi:id="_HBI3knjAEeizYruIlswaLQ" name="a" coveredBy="_HBI3l3jAEeizYruIlswaLQ _HBI3lnjAEeizYruIlswaLQ _HBI3lXjAEeizYruIlswaLQ"/>
+ <lifeline xmi:id="_HBI3k3jAEeizYruIlswaLQ" name="b" coveredBy="_HBI3mHjAEeizYruIlswaLQ _HBI3lnjAEeizYruIlswaLQ _HBI3lXjAEeizYruIlswaLQ"/>
+ <lifeline xmi:id="_HBI3lHjAEeizYruIlswaLQ" name="c"/>
+ <fragment xmi:type="uml:CombinedFragment" xmi:id="_HBI3lXjAEeizYruIlswaLQ" name="cfrag" covered="_HBI3knjAEeizYruIlswaLQ _HBI3k3jAEeizYruIlswaLQ" interactionOperator="opt">
+ <operand xmi:id="_HBI3lnjAEeizYruIlswaLQ" name="opt" covered="_HBI3knjAEeizYruIlswaLQ _HBI3k3jAEeizYruIlswaLQ">
+ <fragment xmi:type="uml:MessageOccurrenceSpecification" xmi:id="_HBI3l3jAEeizYruIlswaLQ" name="send" covered="_HBI3knjAEeizYruIlswaLQ" message="_HBI3m3jAEeizYruIlswaLQ"/>
+ <fragment xmi:type="uml:MessageOccurrenceSpecification" xmi:id="_HBI3mHjAEeizYruIlswaLQ" name="recv" covered="_HBI3k3jAEeizYruIlswaLQ" message="_HBI3m3jAEeizYruIlswaLQ"/>
+ <guard xmi:id="_HBI3mXjAEeizYruIlswaLQ">
+ <specification xmi:type="uml:LiteralBoolean" xmi:id="_HBI3mnjAEeizYruIlswaLQ" value="true"/>
+ </guard>
+ </operand>
+ </fragment>
+ <message xmi:id="_HBI3m3jAEeizYruIlswaLQ" name="greet" messageSort="asynchSignal" receiveEvent="_HBI3mHjAEeizYruIlswaLQ" sendEvent="_HBI3l3jAEeizYruIlswaLQ"/>
+ </ownedBehavior>
+ </packagedElement>
+</uml:Model>
diff --git a/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/src/org/eclipse/papyrus/uml/properties/tests/AllTests.java b/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/src/org/eclipse/papyrus/uml/properties/tests/AllTests.java
new file mode 100644
index 00000000000..8cec2243e43
--- /dev/null
+++ b/tests/junit/plugins/uml/org.eclipse.papyrus.uml.properties.tests/src/org/eclipse/papyrus/uml/properties/tests/AllTests.java
@@ -0,0 +1,29 @@
+/*****************************************************************************
+ * Copyright (c) 2018 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Christian W. Damus - Initial API and implementation
+ *****************************************************************************/
+
+package org.eclipse.papyrus.uml.properties.tests;
+
+import org.eclipse.papyrus.junit.framework.classification.ClassificationSuite;
+import org.eclipse.papyrus.uml.properties.modelelement.tests.UMLModelElementTest;
+import org.junit.runner.RunWith;
+import org.junit.runners.Suite.SuiteClasses;
+
+/**
+ * Test suite for the UML Properties bundle.
+ */
+@RunWith(ClassificationSuite.class)
+@SuiteClasses({
+ UMLModelElementTest.class,
+})
+public class AllTests {
+ // Everything is specified in class annotations
+}
diff --git a/tests/junit/plugins/uml/org.eclipse.papyrus.uml.suite.tests/META-INF/MANIFEST.MF b/tests/junit/plugins/uml/org.eclipse.papyrus.uml.suite.tests/META-INF/MANIFEST.MF
index be4d998b161..84ed38084d7 100755
--- a/tests/junit/plugins/uml/org.eclipse.papyrus.uml.suite.tests/META-INF/MANIFEST.MF
+++ b/tests/junit/plugins/uml/org.eclipse.papyrus.uml.suite.tests/META-INF/MANIFEST.MF
@@ -37,5 +37,6 @@ Require-Bundle: org.eclipse.ui,
org.eclipse.papyrus.uml.internationalization.tests;bundle-version="[1.0.0,2.0.0)",
org.eclipse.papyrus.uml.alf.tests;bundle-version="[1.2.0,2.0.0)",
org.eclipse.papyrus.uml.expressions.tests;bundle-version="[1.0.0,2.0.0)",
- org.eclipse.papyrus.uml.architecture.tests;bundle-version="1.1.200"
+ org.eclipse.papyrus.uml.architecture.tests;bundle-version="1.1.200",
+ org.eclipse.papyrus.uml.properties.tests;bundle-version="[1.0.0,2.0.0)"
Automatic-Module-Name: org.eclipse.papyrus.uml.suite.tests
diff --git a/tests/junit/plugins/uml/org.eclipse.papyrus.uml.suite.tests/test/org/eclipse/papyrus/uml/suite/tests/AllTests.java b/tests/junit/plugins/uml/org.eclipse.papyrus.uml.suite.tests/test/org/eclipse/papyrus/uml/suite/tests/AllTests.java
index 29b0f0d4aca..d3b36f37271 100755
--- a/tests/junit/plugins/uml/org.eclipse.papyrus.uml.suite.tests/test/org/eclipse/papyrus/uml/suite/tests/AllTests.java
+++ b/tests/junit/plugins/uml/org.eclipse.papyrus.uml.suite.tests/test/org/eclipse/papyrus/uml/suite/tests/AllTests.java
@@ -49,6 +49,7 @@ public class AllTests {
suiteClasses.add(new PluginTestSuiteClass(org.eclipse.papyrus.uml.diagram.stereotypeproperty.AllTests.class));
suiteClasses.add(new PluginTestSuiteClass(org.eclipse.papyrus.uml.diagram.wizards.AllTests.class));
suiteClasses.add(new PluginTestSuiteClass(org.eclipse.papyrus.uml.modelrepair.tests.AllTests.class));
+ suiteClasses.add(new PluginTestSuiteClass(org.eclipse.papyrus.uml.properties.tests.AllTests.class));
suiteClasses.add(new PluginTestSuiteClass(org.eclipse.papyrus.uml.profile.tests.AllTests.class));
suiteClasses.add(new PluginTestSuiteClass(org.eclipse.papyrus.uml.decoratormodel.tests.AllTests.class));
suiteClasses.add(new PluginTestSuiteClass(org.eclipse.papyrus.uml.decoratormodel.controlmode.tests.AllTests.class));
diff --git a/tests/junit/plugins/uml/pom.xml b/tests/junit/plugins/uml/pom.xml
index 01206c56a53..9ae5e7392bb 100755
--- a/tests/junit/plugins/uml/pom.xml
+++ b/tests/junit/plugins/uml/pom.xml
@@ -34,6 +34,7 @@
<module>org.eclipse.papyrus.uml.dynamic.profile.tests</module>
<module>org.eclipse.papyrus.uml.filters.tests</module>
<module>org.eclipse.papyrus.uml.modelrepair.tests</module>
+ <module>org.eclipse.papyrus.uml.properties.tests</module>
<module>org.eclipse.papyrus.uml.service.types.tests</module>
<module>org.eclipse.papyrus.uml.service.types.ui.tests</module>
<module>org.eclipse.papyrus.uml.architecture.tests</module>