Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.stereotypeproperty.xtext.ui/src/org/eclipse/papyrus/uml/textedit/stereotypeproperty/xtext/ui/contributions/StereotypePropertyEditorConfigurationContribution.java')
-rw-r--r--plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.stereotypeproperty.xtext.ui/src/org/eclipse/papyrus/uml/textedit/stereotypeproperty/xtext/ui/contributions/StereotypePropertyEditorConfigurationContribution.java405
1 files changed, 135 insertions, 270 deletions
diff --git a/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.stereotypeproperty.xtext.ui/src/org/eclipse/papyrus/uml/textedit/stereotypeproperty/xtext/ui/contributions/StereotypePropertyEditorConfigurationContribution.java b/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.stereotypeproperty.xtext.ui/src/org/eclipse/papyrus/uml/textedit/stereotypeproperty/xtext/ui/contributions/StereotypePropertyEditorConfigurationContribution.java
index b796adf3511..c0f173adfde 100644
--- a/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.stereotypeproperty.xtext.ui/src/org/eclipse/papyrus/uml/textedit/stereotypeproperty/xtext/ui/contributions/StereotypePropertyEditorConfigurationContribution.java
+++ b/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.stereotypeproperty.xtext.ui/src/org/eclipse/papyrus/uml/textedit/stereotypeproperty/xtext/ui/contributions/StereotypePropertyEditorConfigurationContribution.java
@@ -9,21 +9,18 @@
*
* Contributors:
* CEA LIST - Initial API and implementation
- *
+ * Jeremie Tatibouet (CEA LIST)
*****************************************************************************/
package org.eclipse.papyrus.uml.textedit.stereotypeproperty.xtext.ui.contributions;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Collections;
-import java.util.Iterator;
+import java.util.List;
import org.eclipse.core.commands.ExecutionException;
import org.eclipse.core.runtime.IAdaptable;
import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.emf.common.util.Enumerator;
-import org.eclipse.emf.common.util.TreeIterator;
-import org.eclipse.emf.ecore.EEnumLiteral;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.transaction.util.TransactionUtil;
import org.eclipse.gmf.runtime.common.core.command.CommandResult;
@@ -33,13 +30,11 @@ import org.eclipse.gmf.runtime.common.ui.services.parser.IParser;
import org.eclipse.gmf.runtime.common.ui.services.parser.IParserEditStatus;
import org.eclipse.gmf.runtime.emf.commands.core.command.AbstractTransactionalCommand;
import org.eclipse.jface.text.contentassist.IContentAssistProcessor;
-import org.eclipse.papyrus.uml.alf.alf.BOOLEAN_LITERAL;
-import org.eclipse.papyrus.uml.alf.alf.INTEGER_LITERAL;
-import org.eclipse.papyrus.uml.alf.alf.NameExpression;
-import org.eclipse.papyrus.uml.alf.alf.STRING_LITERAL;
+import org.eclipse.papyrus.uml.alf.Expression;
import org.eclipse.papyrus.uml.profile.structure.AppliedStereotypeProperty;
import org.eclipse.papyrus.uml.textedit.stereotypeproperty.xtext.AppliedStereotypePropertyEditorUtil;
import org.eclipse.papyrus.uml.textedit.stereotypeproperty.xtext.StringConstants;
+import org.eclipse.papyrus.uml.textedit.stereotypeproperty.xtext.appliedStereotypeProperty.AppliedStereotypePropertyRule;
import org.eclipse.papyrus.uml.textedit.stereotypeproperty.xtext.ui.internal.AppliedStereotypePropertyActivator;
import org.eclipse.papyrus.uml.xtext.integration.DefaultXtextDirectEditorConfiguration;
import org.eclipse.papyrus.uml.xtext.integration.XtextFakeResourceContext;
@@ -48,6 +43,10 @@ import org.eclipse.papyrus.uml.xtext.integration.core.ContextElementAdapter.ICon
import org.eclipse.papyrus.uml.xtext.integration.core.ContextElementAdapter.IContextElementProviderWithInit;
import org.eclipse.uml2.uml.Element;
import org.eclipse.uml2.uml.Enumeration;
+import org.eclipse.uml2.uml.EnumerationLiteral;
+import org.eclipse.uml2.uml.NamedElement;
+import org.eclipse.uml2.uml.Property;
+import org.eclipse.uml2.uml.Stereotype;
import org.eclipse.uml2.uml.Type;
import org.eclipse.xtext.EcoreUtil2;
import org.eclipse.xtext.util.CancelIndicator;
@@ -85,40 +84,25 @@ public class StereotypePropertyEditorConfigurationContribution extends DefaultXt
umlObject = (EObject) objectToEdit; // replace with objectToEdit (umlObject is selected property, not stereotype application)
CompositeCommand command = new CompositeCommand(""); //$NON-NLS-1$
final AppliedStereotypeProperty appliedStereotypeProperty = (AppliedStereotypeProperty) umlObject;
- Object[] result = AppliedStereotypePropertyEditorUtil.getPossibleElements(appliedStereotypeProperty);
Type type = appliedStereotypeProperty.getStereotypeProperty().getType();
ICommand specificCommand = null;
// int
- if (type.getName().equals(StringConstants.INTEGER)) {
- specificCommand = reconcileInteger(appliedStereotypeProperty, xtextObject);
- }
- // boolean
- else if (type.getName().equals(StringConstants.BOOLEAN)) {
- specificCommand = reconcileBoolean(appliedStereotypeProperty, xtextObject);
- }
- // string
- else if (type.getName().equals(StringConstants.STRING)) {
- specificCommand = reconcileString(appliedStereotypeProperty, xtextObject);
+ if (type.getName().equals(StringConstants.INTEGER)
+ || type.getName().equals(StringConstants.BOOLEAN)
+ || type.getName().equals(StringConstants.STRING)) {
+ specificCommand = this.reconcilePrimitiveType(appliedStereotypeProperty, xtextObject);
}
// ref element stereotype application
else if (type.eClass().getName().equals("Stereotype")) { //$NON-NLS-1$
- specificCommand = reconcileRefToStereotypeApp(appliedStereotypeProperty, xtextObject, result);
- }
- // dataType
- else if (type.eClass().getName().equals(StringConstants.DATA_TYPE)) {
- specificCommand = reconcileString(appliedStereotypeProperty, xtextObject);
- }
- // primitiveType
- else if (type.eClass().getName().equals(StringConstants.PRIMITIVE_TYPE)) {
- specificCommand = reconcileString(appliedStereotypeProperty, xtextObject);
+ specificCommand = reconcileRefToStereotypeApp(appliedStereotypeProperty, xtextObject);
}
else if (type instanceof Enumeration) {
- specificCommand = reconcileEnumerationLiteral(appliedStereotypeProperty, xtextObject, result);
+ specificCommand = reconcileEnumerationLiteral(appliedStereotypeProperty, xtextObject);
}
// ref element
else if (type instanceof Element) {
- specificCommand = reconcileRefToElement(appliedStereotypeProperty, xtextObject, result);
+ specificCommand = reconcileRefToElement(appliedStereotypeProperty, xtextObject);
}
if (specificCommand != null) {
command.add(specificCommand);
@@ -127,6 +111,21 @@ public class StereotypePropertyEditorConfigurationContribution extends DefaultXt
}
/**
+ * Provide the list of all enumeration literal available from the enumeration
+ *
+ * @param enumeration
+ * the enumeration from which the list of candidates is computed
+ *
+ * @return tmp
+ * the list of all available enumeration literal
+ */
+ private List<NamedElement> getEnumerationCandidates(Enumeration enumeration) {
+ List<NamedElement> tmp = new ArrayList<NamedElement>(enumeration.getMembers());
+ tmp.removeAll(enumeration.getImportedMembers());
+ return tmp;
+ }
+
+ /**
* this method is used to reconcile Enumeration literal with application of
* the stereotype
*
@@ -134,72 +133,26 @@ public class StereotypePropertyEditorConfigurationContribution extends DefaultXt
* the application of stereotype
* @param xtextObject
* the AST of the grammar
- * @param possibleElement
- * list of possible elements that can be used
*/
- protected ICommand reconcileEnumerationLiteral(final AppliedStereotypeProperty appliedStereotypeProperty,
- EObject xtextObject, Object[] possibleElement) {
- ArrayList<NameExpression> eObjects = getAllElementRef(xtextObject);
-
+ protected ICommand reconcileEnumerationLiteral(final AppliedStereotypeProperty appliedStereotypeProperty, EObject model) {
+ Property property = appliedStereotypeProperty.getStereotypeProperty();
+ List<NamedElement> candidates = this.getEnumerationCandidates((Enumeration) property.getType());
+ Expression expression = this.getValueSpecificationExpression(model);
+ List<EnumerationLiteral> results = AppliedStereotypePropertyEditorUtil.resolveEnumerationLiteralValue(expression, candidates);
// cardinality 1
- if (appliedStereotypeProperty.getStereotypeProperty().getUpper() == 1) {
- if (eObjects.size() == 0) {
- return createUpdateCommand(appliedStereotypeProperty, null);
- } else {
- NameExpression nameExpression = eObjects.get(0);
- String id = nameExpression.getId();
- // EObject
- // foundStereotypeApplication=AppliedStereotypePropertyEditorUtil.getNamedElementFor(nameExpression,
- // result);
- EObject foundStereotypeApplication = null;
- // look for object
- for (int i = 0; i < possibleElement.length; i++) {
- if (possibleElement[i] instanceof EEnumLiteral
- && ((EEnumLiteral) possibleElement[i]).getName().equals(id)) {
- foundStereotypeApplication = (EEnumLiteral) possibleElement[i];
- }
- if (possibleElement[i] instanceof Enumerator
- && ((Enumerator) possibleElement[i]).getName().equals(id)) {
- return createUpdateCommand(appliedStereotypeProperty, possibleElement[i]);
- }
- }
- if (foundStereotypeApplication != null) {
- return createUpdateCommand(appliedStereotypeProperty, foundStereotypeApplication);
- }
+ if (property.getUpper() == 1) {
+ if (!results.isEmpty()) {
+ return createUpdateCommand(appliedStereotypeProperty, results.get(0));
}
+ return createUpdateCommand(appliedStereotypeProperty, null);
}
// cardinality *
else {
- if (eObjects.size() == 0) {
+ if (results.isEmpty()) {
return createUpdateCommand(appliedStereotypeProperty, new ArrayList<Object>());
- } else {
- // iterate on NameExpression
- ArrayList<Object> stereotypeApplicationList = new ArrayList<Object>();
- Iterator<NameExpression> iterator = eObjects.iterator();
- while (iterator.hasNext()) {
- NameExpression nameExpression = iterator.next();
- String id = nameExpression.getId();
- Object foundStereotypeApplication = null;
- // look for object
- for (int i = 0; i < possibleElement.length; i++) {
- if (possibleElement[i] instanceof EEnumLiteral
- && ((EEnumLiteral) possibleElement[i]).getName().equals(id)) {
- foundStereotypeApplication = possibleElement[i];
- }
- if (possibleElement[i] instanceof Enumerator
- && ((Enumerator) possibleElement[i]).getName().equals(id)) {
- foundStereotypeApplication = possibleElement[i];
- }
- }
-
- if (foundStereotypeApplication != null) {
- stereotypeApplicationList.add(foundStereotypeApplication);
- }
- }
- return createUpdateCommand(appliedStereotypeProperty, stereotypeApplicationList);
}
+ return createUpdateCommand(appliedStereotypeProperty, results);
}
- return null;
}
/**
@@ -213,127 +166,99 @@ public class StereotypePropertyEditorConfigurationContribution extends DefaultXt
* @param possibleElement
* list of possible elements that can be used
*/
- @SuppressWarnings("rawtypes")
- protected ICommand reconcileRefToStereotypeApp(final AppliedStereotypeProperty appliedStereotypeProperty,
- EObject xtextObject, Object[] result) {
- ArrayList<NameExpression> eObjects = getAllElementRef(xtextObject);
-
-
- // cardinality 1
- if (appliedStereotypeProperty.getStereotypeProperty().getUpper() == 1) {
- if (eObjects.size() == 0) {
- return createUpdateCommand(appliedStereotypeProperty, null);
- } else {
- NameExpression nameExpression = eObjects.get(0);
- EObject foundStereotypeApplication =
- AppliedStereotypePropertyEditorUtil.getApplicationStereotypeFor(appliedStereotypeProperty, nameExpression);
- return createUpdateCommand(appliedStereotypeProperty, foundStereotypeApplication);
+ protected ICommand reconcileRefToStereotypeApp(final AppliedStereotypeProperty appliedStereotypeProperty, EObject model) {
+ /* 1. Initialization */
+ Property property = appliedStereotypeProperty.getStereotypeProperty();
+ Expression expression = this.getValueSpecificationExpression(model);
+ Element scope = appliedStereotypeProperty.getBaseElement();
+ /* 2. Reference resolution */
+ List<NamedElement> references = AppliedStereotypePropertyEditorUtil.resolveReferenceValue(expression, scope);
+ List<EObject> stereotypeApplications = this.getStereotypeApplication(references, (Stereotype) property.getType());
+ /* 3. Assignment of the resolved element(s) */
+ if (property.getUpper() == 1) {// cardinality 1
+ if (!stereotypeApplications.isEmpty()) {
+ return createUpdateCommand(appliedStereotypeProperty, stereotypeApplications.get(0));
}
-
+ return createUpdateCommand(appliedStereotypeProperty, null);
}
- // cardinality *
- else {
- if (eObjects.size() == 0) {
- return createUpdateCommand(appliedStereotypeProperty, new ArrayList());
- } else {
- // iterate on NameExpression
- ArrayList<EObject> stereotypeApplicationList = new ArrayList<EObject>();
- Iterator<NameExpression> iterator = eObjects.iterator();
- while (iterator.hasNext()) {
- NameExpression nameExpression = iterator.next();
- EObject foundStereotypeApplication =
- AppliedStereotypePropertyEditorUtil.getApplicationStereotypeFor(appliedStereotypeProperty, nameExpression);
- if (foundStereotypeApplication != null) {
- stereotypeApplicationList.add(foundStereotypeApplication);
- }
- }
- return createUpdateCommand(appliedStereotypeProperty, stereotypeApplicationList);
- }
-
+ else { // cardinality *
+ return createUpdateCommand(appliedStereotypeProperty, stereotypeApplications);
}
}
/**
- * this method is used to reconcile integer with the current application of
- * the stereotype
- *
- * @param appliedStereotypeProperty
- * the application of stereotype
- * @param xtextObject
- * the AST of the grammar
+ * Provides the list of stereotype applications found for the elements in <code>references</code>
+ *
+ * @param references
+ * the list of references on which the <code>stereotype</code> should be applied
+ *
+ * @param stereotype
+ * the stereotype used in the applications
+ *
+ * @return stereotypeApplications
+ * the list of stereotype applications
*/
- @SuppressWarnings({ "rawtypes", "unchecked" })
- protected ICommand reconcileInteger(final AppliedStereotypeProperty appliedStereotypeProperty, EObject xtextObject) {
- ArrayList<INTEGER_LITERAL> intList = AppliedStereotypePropertyEditorUtil.get_INTEGER(xtextObject);
- // cardinality 1
- if (appliedStereotypeProperty.getStereotypeProperty().getUpper() == 1) {
- if (intList.size() == 0) {
- return createUpdateCommand(appliedStereotypeProperty, null);
- } else {
- INTEGER_LITERAL theint = intList.get(0);
- Integer value = new Integer(theint.getValue());
- return createUpdateCommand(appliedStereotypeProperty, value.intValue());
+ private List<EObject> getStereotypeApplication(List<NamedElement> references, Stereotype stereotype) {
+ List<EObject> stereotypeApplications = new ArrayList<EObject>();
+ for (NamedElement element : references) {
+ if (element.isStereotypeApplied(stereotype)) {
+ stereotypeApplications.add(element.getStereotypeApplication(stereotype));
}
}
- // cardinality *
- else {
- if (intList.size() == 0) {
- return createUpdateCommand(appliedStereotypeProperty, new ArrayList());
- } else {
- // iterate on NameExpression
- ArrayList resultList = new ArrayList();
- Iterator<INTEGER_LITERAL> iterator = intList.iterator();
- while (iterator.hasNext()) {
- INTEGER_LITERAL theint = iterator.next();
- Integer value = new Integer(theint.getValue());
- resultList.add(value.intValue());
- }
- return createUpdateCommand(appliedStereotypeProperty, resultList);
+ return stereotypeApplications;
+ }
+
+ /**
+ * Extract from the model of a stereotype property assignment the expression corresponding
+ * to the assigned value
+ *
+ * @param model
+ * the model from which the value specification extracted
+ * @return valueSpecification
+ * the expression used as the value specification for a property
+ */
+ private Expression getValueSpecificationExpression(EObject model) {
+ Expression valueSpecification = null;
+ if (model instanceof AppliedStereotypePropertyRule) {
+ if (((AppliedStereotypePropertyRule) model).getValue() != null) {
+ valueSpecification = ((AppliedStereotypePropertyRule) model).getValue().getExpression();
}
}
+ return valueSpecification;
}
/**
- * this method is used to reconcile boolean with the current application of
- * the stereotype
- *
+ * Reconcile the expression specified in the <code>model</code> onto a primitive element (e.g. a boolean)
+ *
* @param appliedStereotypeProperty
* the application of stereotype
- * @param xtextObject
- * the AST of the grammar
+ *
+ * @param model
+ * the model on which we try to resolve
+ *
+ * @return The update command
*/
-
- @SuppressWarnings("rawtypes")
- protected ICommand reconcileBoolean(final AppliedStereotypeProperty appliedStereotypeProperty, EObject xtextObject) {
- ArrayList<BOOLEAN_LITERAL> booleanList = AppliedStereotypePropertyEditorUtil.get_BOOLEAN(xtextObject);
- // cardinality 1
- if (appliedStereotypeProperty.getStereotypeProperty().getUpper() == 1) {
- if (booleanList.size() == 0) {
- return createUpdateCommand(appliedStereotypeProperty, null);
- } else {
- BOOLEAN_LITERAL theboolean = booleanList.get(0);
- Boolean value = new Boolean(theboolean.getValue().toString());
- return createUpdateCommand(appliedStereotypeProperty, value.booleanValue());
- }
- }
- // cardinality *
- else {
- if (booleanList.size() == 0) {
- return createUpdateCommand(appliedStereotypeProperty, new ArrayList());
- } else {
- // iterate on NameExpression
- ArrayList<Boolean> resultList = new ArrayList<Boolean>();
- Iterator<BOOLEAN_LITERAL> iterator = booleanList.iterator();
- while (iterator.hasNext()) {
- BOOLEAN_LITERAL theboolean = iterator.next();
- Boolean value = new Boolean(theboolean.getValue().toString());
- resultList.add(value.booleanValue());
+ protected ICommand reconcilePrimitiveType(final AppliedStereotypeProperty appliedStereotypeProperty, EObject model) {
+ Expression valueSpecification = this.getValueSpecificationExpression(model);
+ if (valueSpecification != null) {
+ List<Object> values = AppliedStereotypePropertyEditorUtil.resolvePrimitiveValue(valueSpecification);
+ // cardinality 1
+ if (appliedStereotypeProperty.getStereotypeProperty().getUpper() == 1) {
+ if (values.isEmpty()) {
+ return createUpdateCommand(appliedStereotypeProperty, null);
+ } else {
+ return createUpdateCommand(appliedStereotypeProperty, values.get(0));
}
- return createUpdateCommand(appliedStereotypeProperty, resultList);
+ }
+ // cardinality *
+ else {
+ return createUpdateCommand(appliedStereotypeProperty, values);
}
}
+ return null;
}
+
/**
* this method is used to reconcile references element with the current
* application of the stereotype
@@ -345,83 +270,36 @@ public class StereotypePropertyEditorConfigurationContribution extends DefaultXt
* @param possibleElement
* list of possible elements that can be used
*/
- @SuppressWarnings("rawtypes")
- protected ICommand reconcileRefToElement(final AppliedStereotypeProperty appliedStereotypeProperty,
- EObject xtextObject, Object[] result) {
- ArrayList<NameExpression> eObjects = getAllElementRef(xtextObject);
-
- // cardinality 1
- if (appliedStereotypeProperty.getStereotypeProperty().getUpper() == 1) {
- if (eObjects.size() == 0) {
- return createUpdateCommand(appliedStereotypeProperty, null);
- } else {
- NameExpression nameExpression = eObjects.get(0);
- EObject foundStereotypeApplication = AppliedStereotypePropertyEditorUtil.getNamedElementFor(
- nameExpression, result);
- return createUpdateCommand(appliedStereotypeProperty, foundStereotypeApplication);
+ protected ICommand reconcileRefToElement(final AppliedStereotypeProperty appliedStereotypeProperty, EObject model) {
+ /* 1. Initialization */
+ Expression valueSpecification = this.getValueSpecificationExpression(model);
+ Element scope = appliedStereotypeProperty.getBaseElement();
+ /* 2. Perform the resolution */
+ List<NamedElement> references = AppliedStereotypePropertyEditorUtil.resolveReferenceValue(valueSpecification, scope);
+ /* 3. Generate the comment corresponding to the assignment */
+ if (appliedStereotypeProperty.getStereotypeProperty().getUpper() == 1) {// cardinality 1
+ if (!references.isEmpty()) {
+ return createUpdateCommand(appliedStereotypeProperty, references.get(0));
}
-
+ return createUpdateCommand(appliedStereotypeProperty, null);
}
- // cardinality *
- else {
- if (eObjects.size() == 0) {
- return createUpdateCommand(appliedStereotypeProperty, new ArrayList());
- } else {
- // iterate on NameExpression
- ArrayList<EObject> stereotypeApplicationList = new ArrayList<EObject>();
- Iterator<NameExpression> iterator = eObjects.iterator();
- while (iterator.hasNext()) {
- NameExpression nameExpression = iterator.next();
- EObject foundStereotypeApplication = AppliedStereotypePropertyEditorUtil.getNamedElementFor(
- nameExpression, result);
- if (foundStereotypeApplication != null) {
- stereotypeApplicationList.add(foundStereotypeApplication);
- }
- }
- return createUpdateCommand(appliedStereotypeProperty, stereotypeApplicationList);
- }
-
+ else {// cardinality *
+ return createUpdateCommand(appliedStereotypeProperty, references);
}
}
/**
- * this method is used to reconcile Strings with the current application of
- * the stereotype
- *
+ * Create the command required to update the given stereotype property with the given value
+ *
* @param appliedStereotypeProperty
- * the application of stereotype
- * @param xtextObject
- * the AST of the grammar
+ * The stereotype property that need to be assigned
+ *
+ * @param value
+ * The value that will be used as assignment right hand side
+ *
+ * @return setValueCommand
+ * The update command
*/
- @SuppressWarnings("rawtypes")
- protected ICommand reconcileString(final AppliedStereotypeProperty appliedStereotypeProperty, EObject xtextObject) {
- ArrayList<STRING_LITERAL> theStringList = AppliedStereotypePropertyEditorUtil.get_STRING(xtextObject);
- // cardinality 1
- if (appliedStereotypeProperty.getStereotypeProperty().getUpper() == 1) {
- if (theStringList.size() == 0) {
- return createUpdateCommand(appliedStereotypeProperty, null);
- } else {
- STRING_LITERAL theString = theStringList.get(0);
- return createUpdateCommand(appliedStereotypeProperty, theString.getValue());
- }
- }
- // cardinality *
- else {
- if (theStringList.size() == 0) {
- return createUpdateCommand(appliedStereotypeProperty, new ArrayList());
- } else {
- // iterate on NameExpression
- ArrayList<String> resultList = new ArrayList<String>();
- Iterator<STRING_LITERAL> iterator = theStringList.iterator();
- while (iterator.hasNext()) {
- STRING_LITERAL theString = iterator.next();
- resultList.add(theString.getValue());
- }
- return createUpdateCommand(appliedStereotypeProperty, resultList);
- }
- }
- }
-
protected ICommand createUpdateCommand(final AppliedStereotypeProperty appliedStereotypeProperty, final Object value) {
AbstractTransactionalCommand setValueCommand = new AbstractTransactionalCommand(
TransactionUtil.getEditingDomain(appliedStereotypeProperty.getStereotypeProperty()), "", Collections.EMPTY_LIST) { //$NON-NLS-1$
@@ -438,22 +316,9 @@ public class StereotypePropertyEditorConfigurationContribution extends DefaultXt
}
- private ArrayList<NameExpression> getAllElementRef(EObject xtextObject) {
- ArrayList<NameExpression> result = new ArrayList<NameExpression>();
- TreeIterator<EObject> iterator = xtextObject.eAllContents();
- while (iterator.hasNext()) {
- EObject eObject = iterator.next();
- if (eObject instanceof NameExpression) {
- result.add((NameExpression) eObject);
- }
- }
-
- return result;
- }
-
/*
* (non-Javadoc)
- *
+ *
* @see
* org.eclipse.papyrus.infra.gmfdiag.xtext.glue.PopupEditorConfiguration
* #getTextToEdit(java.lang.Object)

Back to the top