Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/SubstitutionAppliedStereotypeEditPart.java')
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/SubstitutionAppliedStereotypeEditPart.java20
1 files changed, 12 insertions, 8 deletions
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/SubstitutionAppliedStereotypeEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/SubstitutionAppliedStereotypeEditPart.java
index 73e11d5b4ac..41bc4f0cd98 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/SubstitutionAppliedStereotypeEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/SubstitutionAppliedStereotypeEditPart.java
@@ -61,6 +61,7 @@ import org.eclipse.papyrus.extensionpoints.editors.utils.DirectEditorsUtil;
import org.eclipse.papyrus.extensionpoints.editors.utils.IDirectEditorsIds;
import org.eclipse.papyrus.infra.gmfdiag.common.editpart.PapyrusLabelEditPart;
import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
import org.eclipse.papyrus.uml.diagram.common.directedit.MultilineLabelDirectEditManager;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.IDirectEdition;
import org.eclipse.papyrus.uml.diagram.common.figure.node.ILabelFigure;
@@ -319,7 +320,6 @@ public class SubstitutionAppliedStereotypeEditPart extends PapyrusLabelEditPart
ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -406,9 +406,7 @@ public class SubstitutionAppliedStereotypeEditPart extends PapyrusLabelEditPart
* @generated
*/
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
@@ -441,7 +439,6 @@ public class SubstitutionAppliedStereotypeEditPart extends PapyrusLabelEditPart
return;
}
final Dialog finalDialog = dialog;
-
if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@@ -449,7 +446,6 @@ public class SubstitutionAppliedStereotypeEditPart extends PapyrusLabelEditPart
@Override
protected void doExecute() {
configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
-
}
};
domain.getCommandStack().execute(command);
@@ -506,8 +502,17 @@ public class SubstitutionAppliedStereotypeEditPart extends PapyrusLabelEditPart
protected void refreshLabel() {
EditPolicy maskLabelPolicy = getEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY);
if(maskLabelPolicy == null) {
- setLabelTextHelper(getFigure(), getLabelText());
- setLabelIconHelper(getFigure(), getLabelIcon());
+ maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
+ }
+ if(maskLabelPolicy == null) {
+ View view = (View)getModel();
+ if(view.isVisible()) {
+ setLabelTextHelper(getFigure(), getLabelText());
+ setLabelIconHelper(getFigure(), getLabelIcon());
+ } else {
+ setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
+ setLabelIconHelper(getFigure(), null);
+ }
}
Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
@@ -738,7 +743,6 @@ public class SubstitutionAppliedStereotypeEditPart extends PapyrusLabelEditPart
}
}
}
-
super.handleNotificationEvent(event);
}

Back to the top