Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-uml/org/eclipse/papyrus/uml/diagram/common/edit/part/AbstractElementNodeLabelEditPart.java')
-rw-r--r--plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-uml/org/eclipse/papyrus/uml/diagram/common/edit/part/AbstractElementNodeLabelEditPart.java12
1 files changed, 7 insertions, 5 deletions
diff --git a/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-uml/org/eclipse/papyrus/uml/diagram/common/edit/part/AbstractElementNodeLabelEditPart.java b/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-uml/org/eclipse/papyrus/uml/diagram/common/edit/part/AbstractElementNodeLabelEditPart.java
index 7ffbbe8e246..637fe2b217c 100644
--- a/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-uml/org/eclipse/papyrus/uml/diagram/common/edit/part/AbstractElementNodeLabelEditPart.java
+++ b/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-uml/org/eclipse/papyrus/uml/diagram/common/edit/part/AbstractElementNodeLabelEditPart.java
@@ -7,7 +7,7 @@
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
- *
+ *
* CEA LIST - Initial API and implementation
*
*****************************************************************************/
@@ -40,6 +40,7 @@ import org.eclipse.gmf.runtime.common.ui.services.parser.ParserEditStatus;
import org.eclipse.gmf.runtime.common.ui.services.parser.ParserOptions;
import org.eclipse.gmf.runtime.common.ui.services.parser.ParserService;
import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.CompartmentEditPart;
import org.eclipse.gmf.runtime.diagram.ui.editparts.GraphicalEditPart;
import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
import org.eclipse.gmf.runtime.diagram.ui.editparts.TopGraphicEditPart;
@@ -72,8 +73,9 @@ import org.eclipse.papyrus.gmf.diagram.common.edit.policy.LabelDirectEditPolicy;
import org.eclipse.papyrus.gmf.diagram.common.edit.policy.TextNonResizableEditPolicy;
import org.eclipse.papyrus.gmf.diagram.common.edit.policy.TextSelectionEditPolicy;
import org.eclipse.papyrus.gmf.diagram.common.locator.TextCellEditorLocator;
-import org.eclipse.papyrus.infra.emf.appearance.helper.NameLabelIconHelper;
+import org.eclipse.papyrus.infra.emf.appearance.helper.AppearanceHelper;
import org.eclipse.papyrus.infra.emf.appearance.helper.VisualInformationPapyrusConstants;
+import org.eclipse.papyrus.infra.gmfdiag.common.commands.SemanticAdapter;
import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
import org.eclipse.papyrus.sysml.diagram.common.preferences.ILabelPreferenceConstants;
import org.eclipse.papyrus.sysml.diagram.common.preferences.LabelPreferenceHelper;
@@ -138,7 +140,7 @@ public abstract class AbstractElementNodeLabelEditPart extends GraphicalEditPart
TopGraphicEditPart focusTopEP = ((IGraphicalEditPart)focusPart).getTopGraphicEditPart();
TopGraphicEditPart myTopEP = getTopGraphicEditPart();
if(myTopEP == focusTopEP) {
- // check if the selection contains only editparts belonging to
+ // check if the selection contains only editparts belonging to
// the same top level editpart
Iterator<?> selection = getViewer().getSelectedEditParts().iterator();
while(selection.hasNext()) {
@@ -247,7 +249,7 @@ public abstract class AbstractElementNodeLabelEditPart extends GraphicalEditPart
List<View> views = DiagramEditPartsUtil.findViews(parserElement, getViewer());
for(View view : views) {
- if(NameLabelIconHelper.showLabelIcon(view)) {
+ if(AppearanceHelper.showElementIcon(view)) {
return org.eclipse.papyrus.sysml.diagram.common.Activator.getInstance().getLabelProvider().getImage(parserElement);
}
}
@@ -259,7 +261,7 @@ public abstract class AbstractElementNodeLabelEditPart extends GraphicalEditPart
String text = null;
EObject parserElement = getParserElement();
if(parserElement != null && getParser() != null) {
- text = getParser().getPrintString(new EObjectAdapter(parserElement), getParserOptions().intValue());
+ text = getParser().getPrintString(new SemanticAdapter(parserElement, getNotationView()), getParserOptions().intValue());
}
if(text == null || text.length() == 0) {
text = defaultText;

Back to the top