diff options
author | ptessier | 2014-05-23 14:03:44 +0000 |
---|---|---|
committer | ptessier | 2014-05-23 14:03:44 +0000 |
commit | 947ecc8a092eb9739b9d01567850e88151f9dd96 (patch) | |
tree | 80406e704e5c38194e2cb9cfbe928cc034cecf25 /plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram | |
parent | f956b546c6399169680498b162b9fea3c8aec8f0 (diff) | |
download | org.eclipse.papyrus-947ecc8a092eb9739b9d01567850e88151f9dd96.tar.gz org.eclipse.papyrus-947ecc8a092eb9739b9d01567850e88151f9dd96.tar.xz org.eclipse.papyrus-947ecc8a092eb9739b9d01567850e88151f9dd96.zip |
434626: [Diagram] change gmfgen to ensure that shape are generated
https://bugs.eclipse.org/bugs/show_bug.cgi?id=434626
Change-Id: Id6d26edb819e33f16750575fe8b0b2672cad7dda
Diffstat (limited to 'plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram')
491 files changed, 1794 insertions, 5515 deletions
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/SynchroSemanticForPopertyPartCompartment.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/SynchroSemanticForPopertyPartCompartment.java index 20da4853afe..0ed082a2098 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/SynchroSemanticForPopertyPartCompartment.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/SynchroSemanticForPopertyPartCompartment.java @@ -10,7 +10,6 @@ * Contributors:
* Patrick Tessier (CEA LIST) Patrick.tessier@cea.fr - Initial API and implementation
*****************************************************************************/
-
package org.eclipse.papyrus.uml.diagram.composite;
import java.util.ArrayList;
@@ -21,7 +20,7 @@ import org.eclipse.papyrus.uml.diagram.synchronizeview.customization.ISynchroSem import org.eclipse.uml2.uml.Property;
/**
- *This class is used to precise semantic element that could be displayed in compartment of parts
+ * This class is used to precise semantic element that could be displayed in compartment of parts
*/
public class SynchroSemanticForPopertyPartCompartment implements ISynchroSemanticChild {
@@ -30,20 +29,19 @@ public class SynchroSemanticForPopertyPartCompartment implements ISynchroSemanti @Override
public List<EObject> getSynchroSemanticChild(EObject semanticFromEditPart) {
- ArrayList<EObject> result=new ArrayList<EObject>();
- if( semanticFromEditPart instanceof Property){
- if (((Property)semanticFromEditPart).getType()!=null){
+ ArrayList<EObject> result = new ArrayList<EObject>();
+ if(semanticFromEditPart instanceof Property) {
+ if(((Property)semanticFromEditPart).getType() != null) {
result.addAll(((Property)semanticFromEditPart).getType().getOwnedElements());
}
}
return result;
}
-
-
+
@Override
public EObject getSemanticEObjectToListen(EObject semanticFromEditPart) {
- if( semanticFromEditPart instanceof Property){
- if (((Property)semanticFromEditPart).getType()!=null){
+ if(semanticFromEditPart instanceof Property) {
+ if(((Property)semanticFromEditPart).getType() != null) {
return ((Property)semanticFromEditPart).getType();
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/AbstractionCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/AbstractionCreateCommand.java index ea1f91484a0..d6c15f1386e 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/AbstractionCreateCommand.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/AbstractionCreateCommand.java @@ -89,7 +89,6 @@ public class AbstractionCreateCommand extends EditElementCommand { if(!canExecute()) {
throw new ExecutionException("Invalid arguments in create link command"); //$NON-NLS-1$
}
-
Abstraction newElement = UMLFactory.eINSTANCE.createAbstraction();
getContainer().getPackagedElements().add(newElement);
newElement.getClients().add(getSource());
@@ -98,7 +97,6 @@ public class AbstractionCreateCommand extends EditElementCommand { doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
return CommandResult.newOKCommandResult(newElement);
-
}
/**
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/ActivityCompositeCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/ActivityCompositeCreateCommand.java index cca394865a3..d799b16b1f5 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/ActivityCompositeCreateCommand.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/ActivityCompositeCreateCommand.java @@ -66,21 +66,16 @@ public class ActivityCompositeCreateCommand extends EditElementCommand { * @generated
*/
public boolean canExecute() {
-
EObject target = getElementToEdit();
ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getActivity());
return data.isPermitted();
-
-
}
/**
* @generated
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
-
Activity newElement = UMLFactory.eINSTANCE.createActivity();
-
EObject target = getElementToEdit();
ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
if(data.isPermitted()) {
@@ -88,20 +83,14 @@ public class ActivityCompositeCreateCommand extends EditElementCommand { if(!data.execute(target, newElement))
return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
} else {
-
Package qualifiedTarget = (Package)target;
qualifiedTarget.getPackagedElements().add(newElement);
-
}
} else {
return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
}
-
-
ElementInitializers.getInstance().init_Activity_2060(newElement);
-
doConfigure(newElement, monitor, info);
-
((CreateElementRequest)getRequest()).setNewElement(newElement);
return CommandResult.newOKCommandResult(newElement);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/ActivityCompositeCreateCommandCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/ActivityCompositeCreateCommandCN.java index 9ab946fe1f0..0447a994a3b 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/ActivityCompositeCreateCommandCN.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/ActivityCompositeCreateCommandCN.java @@ -66,21 +66,16 @@ public class ActivityCompositeCreateCommandCN extends EditElementCommand { * @generated
*/
public boolean canExecute() {
-
EObject target = getElementToEdit();
ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getActivity());
return data.isPermitted();
-
-
}
/**
* @generated
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
-
Activity newElement = UMLFactory.eINSTANCE.createActivity();
-
EObject target = getElementToEdit();
ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
if(data.isPermitted()) {
@@ -88,20 +83,14 @@ public class ActivityCompositeCreateCommandCN extends EditElementCommand { if(!data.execute(target, newElement))
return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
} else {
-
Class qualifiedTarget = (Class)target;
qualifiedTarget.getNestedClassifiers().add(newElement);
-
}
} else {
return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
}
-
-
ElementInitializers.getInstance().init_Activity_3072(newElement);
-
doConfigure(newElement, monitor, info);
-
((CreateElementRequest)getRequest()).setNewElement(newElement);
return CommandResult.newOKCommandResult(newElement);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/ActorCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/ActorCreateCommand.java index 757daf4383b..717a5dbe731 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/ActorCreateCommand.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/ActorCreateCommand.java @@ -66,21 +66,16 @@ public class ActorCreateCommand extends EditElementCommand { * @generated
*/
public boolean canExecute() {
-
EObject target = getElementToEdit();
ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getActor());
return data.isPermitted();
-
-
}
/**
* @generated
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
-
Actor newElement = UMLFactory.eINSTANCE.createActor();
-
EObject target = getElementToEdit();
ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
if(data.isPermitted()) {
@@ -88,20 +83,14 @@ public class ActorCreateCommand extends EditElementCommand { if(!data.execute(target, newElement))
return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
} else {
-
Package qualifiedTarget = (Package)target;
qualifiedTarget.getPackagedElements().add(newElement);
-
}
} else {
return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
}
-
-
ElementInitializers.getInstance().init_Actor_2077(newElement);
-
doConfigure(newElement, monitor, info);
-
((CreateElementRequest)getRequest()).setNewElement(newElement);
return CommandResult.newOKCommandResult(newElement);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/ActorCreateCommandCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/ActorCreateCommandCN.java index a583815ab31..cbdfd887d2b 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/ActorCreateCommandCN.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/ActorCreateCommandCN.java @@ -66,21 +66,16 @@ public class ActorCreateCommandCN extends EditElementCommand { * @generated
*/
public boolean canExecute() {
-
EObject target = getElementToEdit();
ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getActor());
return data.isPermitted();
-
-
}
/**
* @generated
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
-
Actor newElement = UMLFactory.eINSTANCE.createActor();
-
EObject target = getElementToEdit();
ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
if(data.isPermitted()) {
@@ -88,20 +83,14 @@ public class ActorCreateCommandCN extends EditElementCommand { if(!data.execute(target, newElement))
return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
} else {
-
Class qualifiedTarget = (Class)target;
qualifiedTarget.getNestedClassifiers().add(newElement);
-
}
} else {
return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
}
-
-
ElementInitializers.getInstance().init_Actor_3091(newElement);
-
doConfigure(newElement, monitor, info);
-
((CreateElementRequest)getRequest()).setNewElement(newElement);
return CommandResult.newOKCommandResult(newElement);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/AnyReceiveEventCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/AnyReceiveEventCreateCommand.java index 7bb1ca9da28..e3a1ceac451 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/AnyReceiveEventCreateCommand.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/AnyReceiveEventCreateCommand.java @@ -66,21 +66,16 @@ public class AnyReceiveEventCreateCommand extends EditElementCommand { * @generated
*/
public boolean canExecute() {
-
EObject target = getElementToEdit();
ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getAnyReceiveEvent());
return data.isPermitted();
-
-
}
/**
* @generated
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
-
AnyReceiveEvent newElement = UMLFactory.eINSTANCE.createAnyReceiveEvent();
-
EObject target = getElementToEdit();
ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
if(data.isPermitted()) {
@@ -88,20 +83,14 @@ public class AnyReceiveEventCreateCommand extends EditElementCommand { if(!data.execute(target, newElement))
return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
} else {
-
Package qualifiedTarget = (Package)target;
qualifiedTarget.getPackagedElements().add(newElement);
-
}
} else {
return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
}
-
-
ElementInitializers.getInstance().init_AnyReceiveEvent_2085(newElement);
-
doConfigure(newElement, monitor, info);
-
((CreateElementRequest)getRequest()).setNewElement(newElement);
return CommandResult.newOKCommandResult(newElement);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/ArtifactCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/ArtifactCreateCommand.java index 6661c4b2a00..3435a1b4cf5 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/ArtifactCreateCommand.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/ArtifactCreateCommand.java @@ -66,21 +66,16 @@ public class ArtifactCreateCommand extends EditElementCommand { * @generated
*/
public boolean canExecute() {
-
EObject target = getElementToEdit();
ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getArtifact());
return data.isPermitted();
-
-
}
/**
* @generated
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
-
Artifact newElement = UMLFactory.eINSTANCE.createArtifact();
-
EObject target = getElementToEdit();
ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
if(data.isPermitted()) {
@@ -88,20 +83,14 @@ public class ArtifactCreateCommand extends EditElementCommand { if(!data.execute(target, newElement))
return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
} else {
-
Package qualifiedTarget = (Package)target;
qualifiedTarget.getPackagedElements().add(newElement);
-
}
} else {
return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
}
-
-
ElementInitializers.getInstance().init_Artifact_2079(newElement);
-
doConfigure(newElement, monitor, info);
-
((CreateElementRequest)getRequest()).setNewElement(newElement);
return CommandResult.newOKCommandResult(newElement);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/ArtifactCreateCommandCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/ArtifactCreateCommandCN.java index a670b32d4f8..d4251833b72 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/ArtifactCreateCommandCN.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/ArtifactCreateCommandCN.java @@ -66,21 +66,16 @@ public class ArtifactCreateCommandCN extends EditElementCommand { * @generated
*/
public boolean canExecute() {
-
EObject target = getElementToEdit();
ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getArtifact());
return data.isPermitted();
-
-
}
/**
* @generated
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
-
Artifact newElement = UMLFactory.eINSTANCE.createArtifact();
-
EObject target = getElementToEdit();
ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
if(data.isPermitted()) {
@@ -88,20 +83,14 @@ public class ArtifactCreateCommandCN extends EditElementCommand { if(!data.execute(target, newElement))
return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
} else {
-
Class qualifiedTarget = (Class)target;
qualifiedTarget.getNestedClassifiers().add(newElement);
-
}
} else {
return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
}
-
-
ElementInitializers.getInstance().init_Artifact_3093(newElement);
-
doConfigure(newElement, monitor, info);
-
((CreateElementRequest)getRequest()).setNewElement(newElement);
return CommandResult.newOKCommandResult(newElement);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/CallEventCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/CallEventCreateCommand.java index 6fa4b16519f..454252c0e9b 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/CallEventCreateCommand.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/CallEventCreateCommand.java @@ -66,21 +66,16 @@ public class CallEventCreateCommand extends EditElementCommand { * @generated
*/
public boolean canExecute() {
-
EObject target = getElementToEdit();
ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getCallEvent());
return data.isPermitted();
-
-
}
/**
* @generated
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
-
CallEvent newElement = UMLFactory.eINSTANCE.createCallEvent();
-
EObject target = getElementToEdit();
ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
if(data.isPermitted()) {
@@ -88,20 +83,14 @@ public class CallEventCreateCommand extends EditElementCommand { if(!data.execute(target, newElement))
return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
} else {
-
Package qualifiedTarget = (Package)target;
qualifiedTarget.getPackagedElements().add(newElement);
-
}
} else {
return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
}
-
-
ElementInitializers.getInstance().init_CallEvent_2084(newElement);
-
doConfigure(newElement, monitor, info);
-
((CreateElementRequest)getRequest()).setNewElement(newElement);
return CommandResult.newOKCommandResult(newElement);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/ChangeEventCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/ChangeEventCreateCommand.java index f0d9ff197a3..7255947b6e3 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/ChangeEventCreateCommand.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/ChangeEventCreateCommand.java @@ -66,21 +66,16 @@ public class ChangeEventCreateCommand extends EditElementCommand { * @generated
*/
public boolean canExecute() {
-
EObject target = getElementToEdit();
ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getChangeEvent());
return data.isPermitted();
-
-
}
/**
* @generated
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
-
ChangeEvent newElement = UMLFactory.eINSTANCE.createChangeEvent();
-
EObject target = getElementToEdit();
ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
if(data.isPermitted()) {
@@ -88,20 +83,14 @@ public class ChangeEventCreateCommand extends EditElementCommand { if(!data.execute(target, newElement))
return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
} else {
-
Package qualifiedTarget = (Package)target;
qualifiedTarget.getPackagedElements().add(newElement);
-
}
} else {
return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
}
-
-
ElementInitializers.getInstance().init_ChangeEvent_2088(newElement);
-
doConfigure(newElement, monitor, info);
-
((CreateElementRequest)getRequest()).setNewElement(newElement);
return CommandResult.newOKCommandResult(newElement);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/ClassCompositeCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/ClassCompositeCreateCommand.java index 5427e786543..4575f8a800b 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/ClassCompositeCreateCommand.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/ClassCompositeCreateCommand.java @@ -66,21 +66,16 @@ public class ClassCompositeCreateCommand extends EditElementCommand { * @generated
*/
public boolean canExecute() {
-
EObject target = getElementToEdit();
ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getClass_());
return data.isPermitted();
-
-
}
/**
* @generated
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
-
Class newElement = UMLFactory.eINSTANCE.createClass();
-
EObject target = getElementToEdit();
ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
if(data.isPermitted()) {
@@ -88,20 +83,14 @@ public class ClassCompositeCreateCommand extends EditElementCommand { if(!data.execute(target, newElement))
return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
} else {
-
Package qualifiedTarget = (Package)target;
qualifiedTarget.getPackagedElements().add(newElement);
-
}
} else {
return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
}
-
-
ElementInitializers.getInstance().init_Class_2073(newElement);
-
doConfigure(newElement, monitor, info);
-
((CreateElementRequest)getRequest()).setNewElement(newElement);
return CommandResult.newOKCommandResult(newElement);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/ClassCompositeCreateCommandCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/ClassCompositeCreateCommandCN.java index d13f942b4c3..a0418e63b54 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/ClassCompositeCreateCommandCN.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/ClassCompositeCreateCommandCN.java @@ -65,21 +65,16 @@ public class ClassCompositeCreateCommandCN extends EditElementCommand { * @generated
*/
public boolean canExecute() {
-
EObject target = getElementToEdit();
ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getClass_());
return data.isPermitted();
-
-
}
/**
* @generated
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
-
Class newElement = UMLFactory.eINSTANCE.createClass();
-
EObject target = getElementToEdit();
ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
if(data.isPermitted()) {
@@ -87,20 +82,14 @@ public class ClassCompositeCreateCommandCN extends EditElementCommand { if(!data.execute(target, newElement))
return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
} else {
-
Class qualifiedTarget = (Class)target;
qualifiedTarget.getNestedClassifiers().add(newElement);
-
}
} else {
return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
}
-
-
ElementInitializers.getInstance().init_Class_3085(newElement);
-
doConfigure(newElement, monitor, info);
-
((CreateElementRequest)getRequest()).setNewElement(newElement);
return CommandResult.newOKCommandResult(newElement);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/CollaborationCompositeCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/CollaborationCompositeCreateCommand.java index 33004200690..0666c8c3b79 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/CollaborationCompositeCreateCommand.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/CollaborationCompositeCreateCommand.java @@ -66,21 +66,16 @@ public class CollaborationCompositeCreateCommand extends EditElementCommand { * @generated
*/
public boolean canExecute() {
-
EObject target = getElementToEdit();
ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getCollaboration());
return data.isPermitted();
-
-
}
/**
* @generated
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
-
Collaboration newElement = UMLFactory.eINSTANCE.createCollaboration();
-
EObject target = getElementToEdit();
ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
if(data.isPermitted()) {
@@ -88,20 +83,14 @@ public class CollaborationCompositeCreateCommand extends EditElementCommand { if(!data.execute(target, newElement))
return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
} else {
-
Package qualifiedTarget = (Package)target;
qualifiedTarget.getPackagedElements().add(newElement);
-
}
} else {
return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
}
-
-
ElementInitializers.getInstance().init_Collaboration_2075(newElement);
-
doConfigure(newElement, monitor, info);
-
((CreateElementRequest)getRequest()).setNewElement(newElement);
return CommandResult.newOKCommandResult(newElement);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/CollaborationCompositeCreateCommandCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/CollaborationCompositeCreateCommandCN.java index a0c7a8cdf19..f824c24cf1b 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/CollaborationCompositeCreateCommandCN.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/CollaborationCompositeCreateCommandCN.java @@ -66,21 +66,16 @@ public class CollaborationCompositeCreateCommandCN extends EditElementCommand { * @generated
*/
public boolean canExecute() {
-
EObject target = getElementToEdit();
ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getCollaboration());
return data.isPermitted();
-
-
}
/**
* @generated
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
-
Collaboration newElement = UMLFactory.eINSTANCE.createCollaboration();
-
EObject target = getElementToEdit();
ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
if(data.isPermitted()) {
@@ -88,20 +83,14 @@ public class CollaborationCompositeCreateCommandCN extends EditElementCommand { if(!data.execute(target, newElement))
return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
} else {
-
Class qualifiedTarget = (Class)target;
qualifiedTarget.getNestedClassifiers().add(newElement);
-
}
} else {
return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
}
-
-
ElementInitializers.getInstance().init_Collaboration_3086(newElement);
-
doConfigure(newElement, monitor, info);
-
((CreateElementRequest)getRequest()).setNewElement(newElement);
return CommandResult.newOKCommandResult(newElement);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/CollaborationRoleCreateCommandCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/CollaborationRoleCreateCommandCN.java index fb89e8b8c8c..4e2f80e1426 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/CollaborationRoleCreateCommandCN.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/CollaborationRoleCreateCommandCN.java @@ -63,19 +63,15 @@ public class CollaborationRoleCreateCommandCN extends EditElementCommand { * @generated
*/
public boolean canExecute() {
-
EObject target = getElementToEdit();
ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getConnectableElement());
return data.isPermitted();
-
-
}
/**
* @generated
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
-
throw new UnsupportedOperationException("Unimplemented operation (abstract domain element).");
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/CollaborationUseCreateCommandCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/CollaborationUseCreateCommandCN.java index c5a04101f5f..057579d86d2 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/CollaborationUseCreateCommandCN.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/CollaborationUseCreateCommandCN.java @@ -66,21 +66,16 @@ public class CollaborationUseCreateCommandCN extends EditElementCommand { * @generated
*/
public boolean canExecute() {
-
EObject target = getElementToEdit();
ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getCollaborationUse());
return data.isPermitted();
-
-
}
/**
* @generated
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
-
CollaborationUse newElement = UMLFactory.eINSTANCE.createCollaborationUse();
-
EObject target = getElementToEdit();
ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
if(data.isPermitted()) {
@@ -88,20 +83,14 @@ public class CollaborationUseCreateCommandCN extends EditElementCommand { if(!data.execute(target, newElement))
return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
} else {
-
Classifier qualifiedTarget = (Classifier)target;
qualifiedTarget.getCollaborationUses().add(newElement);
-
}
} else {
return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
}
-
-
ElementInitializers.getInstance().init_CollaborationUse_3071(newElement);
-
doConfigure(newElement, monitor, info);
-
((CreateElementRequest)getRequest()).setNewElement(newElement);
return CommandResult.newOKCommandResult(newElement);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/CommentAnnotatedElementCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/CommentAnnotatedElementCreateCommand.java index 5ce81013f4e..02add988a47 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/CommentAnnotatedElementCreateCommand.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/CommentAnnotatedElementCreateCommand.java @@ -73,12 +73,10 @@ public class CommentAnnotatedElementCreateCommand extends EditElementCommand { if(!canExecute()) {
throw new ExecutionException("Invalid arguments in create link command"); //$NON-NLS-1$
}
-
if(getSource() != null && getTarget() != null) {
getSource().getAnnotatedElements().add(getTarget());
}
return CommandResult.newOKCommandResult();
-
}
/**
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/CommentCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/CommentCreateCommand.java index c1c6bcbbbba..13d440a981d 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/CommentCreateCommand.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/CommentCreateCommand.java @@ -66,21 +66,16 @@ public class CommentCreateCommand extends EditElementCommand { * @generated
*/
public boolean canExecute() {
-
EObject target = getElementToEdit();
ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getComment());
return data.isPermitted();
-
-
}
/**
* @generated
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
-
Comment newElement = UMLFactory.eINSTANCE.createComment();
-
EObject target = getElementToEdit();
ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
if(data.isPermitted()) {
@@ -88,20 +83,14 @@ public class CommentCreateCommand extends EditElementCommand { if(!data.execute(target, newElement))
return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
} else {
-
Element qualifiedTarget = (Element)target;
qualifiedTarget.getOwnedComments().add(newElement);
-
}
} else {
return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
}
-
-
ElementInitializers.getInstance().init_Comment_2109(newElement);
-
doConfigure(newElement, monitor, info);
-
((CreateElementRequest)getRequest()).setNewElement(newElement);
return CommandResult.newOKCommandResult(newElement);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/CommentCreateCommandCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/CommentCreateCommandCN.java index db0aedaa365..65f8aedc6c1 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/CommentCreateCommandCN.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/CommentCreateCommandCN.java @@ -66,21 +66,16 @@ public class CommentCreateCommandCN extends EditElementCommand { * @generated
*/
public boolean canExecute() {
-
EObject target = getElementToEdit();
ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getComment());
return data.isPermitted();
-
-
}
/**
* @generated
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
-
Comment newElement = UMLFactory.eINSTANCE.createComment();
-
EObject target = getElementToEdit();
ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
if(data.isPermitted()) {
@@ -88,20 +83,14 @@ public class CommentCreateCommandCN extends EditElementCommand { if(!data.execute(target, newElement))
return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
} else {
-
Element qualifiedTarget = (Element)target;
qualifiedTarget.getOwnedComments().add(newElement);
-
}
} else {
return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
}
-
-
ElementInitializers.getInstance().init_Comment_3097(newElement);
-
doConfigure(newElement, monitor, info);
-
((CreateElementRequest)getRequest()).setNewElement(newElement);
return CommandResult.newOKCommandResult(newElement);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/ComponentCompositeCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/ComponentCompositeCreateCommand.java index 47874099393..cc7defbf25a 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/ComponentCompositeCreateCommand.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/ComponentCompositeCreateCommand.java @@ -66,21 +66,16 @@ public class ComponentCompositeCreateCommand extends EditElementCommand { * @generated
*/
public boolean canExecute() {
-
EObject target = getElementToEdit();
ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getComponent());
return data.isPermitted();
-
-
}
/**
* @generated
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
-
Component newElement = UMLFactory.eINSTANCE.createComponent();
-
EObject target = getElementToEdit();
ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
if(data.isPermitted()) {
@@ -88,20 +83,14 @@ public class ComponentCompositeCreateCommand extends EditElementCommand { if(!data.execute(target, newElement))
return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
} else {
-
Package qualifiedTarget = (Package)target;
qualifiedTarget.getPackagedElements().add(newElement);
-
}
} else {
return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
}
-
-
ElementInitializers.getInstance().init_Component_2069(newElement);
-
doConfigure(newElement, monitor, info);
-
((CreateElementRequest)getRequest()).setNewElement(newElement);
return CommandResult.newOKCommandResult(newElement);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/ComponentCompositeCreateCommandCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/ComponentCompositeCreateCommandCN.java index 863f8b58a2a..10144ad8659 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/ComponentCompositeCreateCommandCN.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/ComponentCompositeCreateCommandCN.java @@ -66,21 +66,16 @@ public class ComponentCompositeCreateCommandCN extends EditElementCommand { * @generated
*/
public boolean canExecute() {
-
EObject target = getElementToEdit();
ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getComponent());
return data.isPermitted();
-
-
}
/**
* @generated
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
-
Component newElement = UMLFactory.eINSTANCE.createComponent();
-
EObject target = getElementToEdit();
ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
if(data.isPermitted()) {
@@ -88,20 +83,14 @@ public class ComponentCompositeCreateCommandCN extends EditElementCommand { if(!data.execute(target, newElement))
return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
} else {
-
Class qualifiedTarget = (Class)target;
qualifiedTarget.getNestedClassifiers().add(newElement);
-
}
} else {
return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
}
-
-
ElementInitializers.getInstance().init_Component_3081(newElement);
-
doConfigure(newElement, monitor, info);
-
((CreateElementRequest)getRequest()).setNewElement(newElement);
return CommandResult.newOKCommandResult(newElement);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/ComponentRealizationCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/ComponentRealizationCreateCommand.java index 190c326bd37..ebff8d7e7bb 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/ComponentRealizationCreateCommand.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/ComponentRealizationCreateCommand.java @@ -89,7 +89,6 @@ public class ComponentRealizationCreateCommand extends EditElementCommand { if(!canExecute()) {
throw new ExecutionException("Invalid arguments in create link command"); //$NON-NLS-1$
}
-
ComponentRealization newElement = UMLFactory.eINSTANCE.createComponentRealization();
getContainer().getPackagedElements().add(newElement);
newElement.getClients().add(getSource());
@@ -98,7 +97,6 @@ public class ComponentRealizationCreateCommand extends EditElementCommand { doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
return CommandResult.newOKCommandResult(newElement);
-
}
/**
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/ConnectorCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/ConnectorCreateCommand.java index 205650afe83..f03985e0d05 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/ConnectorCreateCommand.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/ConnectorCreateCommand.java @@ -89,7 +89,6 @@ public class ConnectorCreateCommand extends EditElementCommand { if(!canExecute()) {
throw new ExecutionException("Invalid arguments in create link command"); //$NON-NLS-1$
}
-
Connector newElement = UMLFactory.eINSTANCE.createConnector();
getContainer().getOwnedConnectors().add(newElement);
newElement.getEnds().add(getSource());
@@ -98,7 +97,6 @@ public class ConnectorCreateCommand extends EditElementCommand { doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
return CommandResult.newOKCommandResult(newElement);
-
}
/**
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/ConstraintConstrainedElementCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/ConstraintConstrainedElementCreateCommand.java index 7bb4435a9fc..f5cbed8e42e 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/ConstraintConstrainedElementCreateCommand.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/ConstraintConstrainedElementCreateCommand.java @@ -73,12 +73,10 @@ public class ConstraintConstrainedElementCreateCommand extends EditElementComman if(!canExecute()) {
throw new ExecutionException("Invalid arguments in create link command"); //$NON-NLS-1$
}
-
if(getSource() != null && getTarget() != null) {
getSource().getConstrainedElements().add(getTarget());
}
return CommandResult.newOKCommandResult();
-
}
/**
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/ConstraintCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/ConstraintCreateCommand.java index a974cc82dd3..7b7f89e0c4d 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/ConstraintCreateCommand.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/ConstraintCreateCommand.java @@ -66,21 +66,16 @@ public class ConstraintCreateCommand extends EditElementCommand { * @generated
*/
public boolean canExecute() {
-
EObject target = getElementToEdit();
ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getConstraint());
return data.isPermitted();
-
-
}
/**
* @generated
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
-
Constraint newElement = UMLFactory.eINSTANCE.createConstraint();
-
EObject target = getElementToEdit();
ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
if(data.isPermitted()) {
@@ -88,20 +83,14 @@ public class ConstraintCreateCommand extends EditElementCommand { if(!data.execute(target, newElement))
return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
} else {
-
Namespace qualifiedTarget = (Namespace)target;
qualifiedTarget.getOwnedRules().add(newElement);
-
}
} else {
return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
}
-
-
ElementInitializers.getInstance().init_Constraint_2114(newElement);
-
doConfigure(newElement, monitor, info);
-
((CreateElementRequest)getRequest()).setNewElement(newElement);
return CommandResult.newOKCommandResult(newElement);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/ConstraintCreateCommandCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/ConstraintCreateCommandCN.java index 37ff8308d16..156bcdef2ed 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/ConstraintCreateCommandCN.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/ConstraintCreateCommandCN.java @@ -66,21 +66,16 @@ public class ConstraintCreateCommandCN extends EditElementCommand { * @generated
*/
public boolean canExecute() {
-
EObject target = getElementToEdit();
ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getConstraint());
return data.isPermitted();
-
-
}
/**
* @generated
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
-
Constraint newElement = UMLFactory.eINSTANCE.createConstraint();
-
EObject target = getElementToEdit();
ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
if(data.isPermitted()) {
@@ -88,20 +83,14 @@ public class ConstraintCreateCommandCN extends EditElementCommand { if(!data.execute(target, newElement))
return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
} else {
-
Namespace qualifiedTarget = (Namespace)target;
qualifiedTarget.getOwnedRules().add(newElement);
-
}
} else {
return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
}
-
-
ElementInitializers.getInstance().init_Constraint_3120(newElement);
-
doConfigure(newElement, monitor, info);
-
((CreateElementRequest)getRequest()).setNewElement(newElement);
return CommandResult.newOKCommandResult(newElement);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/DataTypeCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/DataTypeCreateCommand.java index 0889431357f..a124c950ce8 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/DataTypeCreateCommand.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/DataTypeCreateCommand.java @@ -66,21 +66,16 @@ public class DataTypeCreateCommand extends EditElementCommand { * @generated
*/
public boolean canExecute() {
-
EObject target = getElementToEdit();
ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getDataType());
return data.isPermitted();
-
-
}
/**
* @generated
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
-
DataType newElement = UMLFactory.eINSTANCE.createDataType();
-
EObject target = getElementToEdit();
ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
if(data.isPermitted()) {
@@ -88,20 +83,14 @@ public class DataTypeCreateCommand extends EditElementCommand { if(!data.execute(target, newElement))
return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
} else {
-
Package qualifiedTarget = (Package)target;
qualifiedTarget.getPackagedElements().add(newElement);
-
}
} else {
return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
}
-
-
ElementInitializers.getInstance().init_DataType_2068(newElement);
-
doConfigure(newElement, monitor, info);
-
((CreateElementRequest)getRequest()).setNewElement(newElement);
return CommandResult.newOKCommandResult(newElement);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/DataTypeCreateCommandCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/DataTypeCreateCommandCN.java index ffd045dc5af..3d8bdb6defc 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/DataTypeCreateCommandCN.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/DataTypeCreateCommandCN.java @@ -66,21 +66,16 @@ public class DataTypeCreateCommandCN extends EditElementCommand { * @generated
*/
public boolean canExecute() {
-
EObject target = getElementToEdit();
ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getDataType());
return data.isPermitted();
-
-
}
/**
* @generated
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
-
DataType newElement = UMLFactory.eINSTANCE.createDataType();
-
EObject target = getElementToEdit();
ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
if(data.isPermitted()) {
@@ -88,20 +83,14 @@ public class DataTypeCreateCommandCN extends EditElementCommand { if(!data.execute(target, newElement))
return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
} else {
-
Class qualifiedTarget = (Class)target;
qualifiedTarget.getNestedClassifiers().add(newElement);
-
}
} else {
return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
}
-
-
ElementInitializers.getInstance().init_DataType_3080(newElement);
-
doConfigure(newElement, monitor, info);
-
((CreateElementRequest)getRequest()).setNewElement(newElement);
return CommandResult.newOKCommandResult(newElement);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/DependencyCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/DependencyCreateCommand.java index 28ca4523bc3..6bc90a2d67f 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/DependencyCreateCommand.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/DependencyCreateCommand.java @@ -89,7 +89,6 @@ public class DependencyCreateCommand extends EditElementCommand { if(!canExecute()) {
throw new ExecutionException("Invalid arguments in create link command"); //$NON-NLS-1$
}
-
Dependency newElement = UMLFactory.eINSTANCE.createDependency();
getContainer().getPackagedElements().add(newElement);
newElement.getClients().add(getSource());
@@ -98,7 +97,6 @@ public class DependencyCreateCommand extends EditElementCommand { doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
return CommandResult.newOKCommandResult(newElement);
-
}
/**
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/DeploymentCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/DeploymentCreateCommand.java index 3d68992cf71..5909de2a83a 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/DeploymentCreateCommand.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/DeploymentCreateCommand.java @@ -89,7 +89,6 @@ public class DeploymentCreateCommand extends EditElementCommand { if(!canExecute()) {
throw new ExecutionException("Invalid arguments in create link command"); //$NON-NLS-1$
}
-
Deployment newElement = UMLFactory.eINSTANCE.createDeployment();
getContainer().getPackagedElements().add(newElement);
newElement.getClients().add(getSource());
@@ -98,7 +97,6 @@ public class DeploymentCreateCommand extends EditElementCommand { doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
return CommandResult.newOKCommandResult(newElement);
-
}
/**
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/DeploymentSpecificationCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/DeploymentSpecificationCreateCommand.java index 579953b6433..f6368c6f831 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/DeploymentSpecificationCreateCommand.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/DeploymentSpecificationCreateCommand.java @@ -66,21 +66,16 @@ public class DeploymentSpecificationCreateCommand extends EditElementCommand { * @generated
*/
public boolean canExecute() {
-
EObject target = getElementToEdit();
ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getDeploymentSpecification());
return data.isPermitted();
-
-
}
/**
* @generated
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
-
DeploymentSpecification newElement = UMLFactory.eINSTANCE.createDeploymentSpecification();
-
EObject target = getElementToEdit();
ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
if(data.isPermitted()) {
@@ -88,20 +83,14 @@ public class DeploymentSpecificationCreateCommand extends EditElementCommand { if(!data.execute(target, newElement))
return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
} else {
-
Package qualifiedTarget = (Package)target;
qualifiedTarget.getPackagedElements().add(newElement);
-
}
} else {
return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
}
-
-
ElementInitializers.getInstance().init_DeploymentSpecification_2078(newElement);
-
doConfigure(newElement, monitor, info);
-
((CreateElementRequest)getRequest()).setNewElement(newElement);
return CommandResult.newOKCommandResult(newElement);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/DeploymentSpecificationCreateCommandCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/DeploymentSpecificationCreateCommandCN.java index 09b55007a00..9dc024c6c71 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/DeploymentSpecificationCreateCommandCN.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/DeploymentSpecificationCreateCommandCN.java @@ -66,21 +66,16 @@ public class DeploymentSpecificationCreateCommandCN extends EditElementCommand { * @generated
*/
public boolean canExecute() {
-
EObject target = getElementToEdit();
ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getDeploymentSpecification());
return data.isPermitted();
-
-
}
/**
* @generated
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
-
DeploymentSpecification newElement = UMLFactory.eINSTANCE.createDeploymentSpecification();
-
EObject target = getElementToEdit();
ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
if(data.isPermitted()) {
@@ -88,20 +83,14 @@ public class DeploymentSpecificationCreateCommandCN extends EditElementCommand { if(!data.execute(target, newElement))
return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
} else {
-
Class qualifiedTarget = (Class)target;
qualifiedTarget.getNestedClassifiers().add(newElement);
-
}
} else {
return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
}
-
-
ElementInitializers.getInstance().init_DeploymentSpecification_3092(newElement);
-
doConfigure(newElement, monitor, info);
-
((CreateElementRequest)getRequest()).setNewElement(newElement);
return CommandResult.newOKCommandResult(newElement);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/DeviceCompositeCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/DeviceCompositeCreateCommand.java index d53ceb6e539..5ec831f44b7 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/DeviceCompositeCreateCommand.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/DeviceCompositeCreateCommand.java @@ -66,21 +66,16 @@ public class DeviceCompositeCreateCommand extends EditElementCommand { * @generated
*/
public boolean canExecute() {
-
EObject target = getElementToEdit();
ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getDevice());
return data.isPermitted();
-
-
}
/**
* @generated
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
-
Device newElement = UMLFactory.eINSTANCE.createDevice();
-
EObject target = getElementToEdit();
ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
if(data.isPermitted()) {
@@ -88,20 +83,14 @@ public class DeviceCompositeCreateCommand extends EditElementCommand { if(!data.execute(target, newElement))
return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
} else {
-
Package qualifiedTarget = (Package)target;
qualifiedTarget.getPackagedElements().add(newElement);
-
}
} else {
return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
}
-
-
ElementInitializers.getInstance().init_Device_2070(newElement);
-
doConfigure(newElement, monitor, info);
-
((CreateElementRequest)getRequest()).setNewElement(newElement);
return CommandResult.newOKCommandResult(newElement);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/DeviceCompositeCreateCommandCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/DeviceCompositeCreateCommandCN.java index 69daff90688..0c611225335 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/DeviceCompositeCreateCommandCN.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/DeviceCompositeCreateCommandCN.java @@ -66,21 +66,16 @@ public class DeviceCompositeCreateCommandCN extends EditElementCommand { * @generated
*/
public boolean canExecute() {
-
EObject target = getElementToEdit();
ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getDevice());
return data.isPermitted();
-
-
}
/**
* @generated
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
-
Device newElement = UMLFactory.eINSTANCE.createDevice();
-
EObject target = getElementToEdit();
ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
if(data.isPermitted()) {
@@ -88,20 +83,14 @@ public class DeviceCompositeCreateCommandCN extends EditElementCommand { if(!data.execute(target, newElement))
return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
} else {
-
Class qualifiedTarget = (Class)target;
qualifiedTarget.getNestedClassifiers().add(newElement);
-
}
} else {
return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
}
-
-
ElementInitializers.getInstance().init_Device_3082(newElement);
-
doConfigure(newElement, monitor, info);
-
((CreateElementRequest)getRequest()).setNewElement(newElement);
return CommandResult.newOKCommandResult(newElement);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/DurationConstraintCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/DurationConstraintCreateCommand.java index 9e2dcf495b7..3094fb6a11d 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/DurationConstraintCreateCommand.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/DurationConstraintCreateCommand.java @@ -66,21 +66,16 @@ public class DurationConstraintCreateCommand extends EditElementCommand { * @generated
*/
public boolean canExecute() {
-
EObject target = getElementToEdit();
ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getDurationConstraint());
return data.isPermitted();
-
-
}
/**
* @generated
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
-
DurationConstraint newElement = UMLFactory.eINSTANCE.createDurationConstraint();
-
EObject target = getElementToEdit();
ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
if(data.isPermitted()) {
@@ -88,20 +83,14 @@ public class DurationConstraintCreateCommand extends EditElementCommand { if(!data.execute(target, newElement))
return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
} else {
-
Namespace qualifiedTarget = (Namespace)target;
qualifiedTarget.getOwnedRules().add(newElement);
-
}
} else {
return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
}
-
-
ElementInitializers.getInstance().init_DurationConstraint_2110(newElement);
-
doConfigure(newElement, monitor, info);
-
((CreateElementRequest)getRequest()).setNewElement(newElement);
return CommandResult.newOKCommandResult(newElement);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/DurationConstraintCreateCommandCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/DurationConstraintCreateCommandCN.java index a6751de995a..22270265bec 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/DurationConstraintCreateCommandCN.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/DurationConstraintCreateCommandCN.java @@ -66,21 +66,16 @@ public class DurationConstraintCreateCommandCN extends EditElementCommand { * @generated
*/
public boolean canExecute() {
-
EObject target = getElementToEdit();
ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getDurationConstraint());
return data.isPermitted();
-
-
}
/**
* @generated
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
-
DurationConstraint newElement = UMLFactory.eINSTANCE.createDurationConstraint();
-
EObject target = getElementToEdit();
ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
if(data.isPermitted()) {
@@ -88,20 +83,14 @@ public class DurationConstraintCreateCommandCN extends EditElementCommand { if(!data.execute(target, newElement))
return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
} else {
-
Namespace qualifiedTarget = (Namespace)target;
qualifiedTarget.getOwnedRules().add(newElement);
-
}
} else {
return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
}
-
-
ElementInitializers.getInstance().init_DurationConstraint_3116(newElement);
-
doConfigure(newElement, monitor, info);
-
((CreateElementRequest)getRequest()).setNewElement(newElement);
return CommandResult.newOKCommandResult(newElement);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/DurationCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/DurationCreateCommand.java index 03e39d5bd77..512511d8566 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/DurationCreateCommand.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/DurationCreateCommand.java @@ -66,21 +66,16 @@ public class DurationCreateCommand extends EditElementCommand { * @generated
*/
public boolean canExecute() {
-
EObject target = getElementToEdit();
ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getDuration());
return data.isPermitted();
-
-
}
/**
* @generated
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
-
Duration newElement = UMLFactory.eINSTANCE.createDuration();
-
EObject target = getElementToEdit();
ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
if(data.isPermitted()) {
@@ -88,20 +83,14 @@ public class DurationCreateCommand extends EditElementCommand { if(!data.execute(target, newElement))
return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
} else {
-
Package qualifiedTarget = (Package)target;
qualifiedTarget.getPackagedElements().add(newElement);
-
}
} else {
return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
}
-
-
ElementInitializers.getInstance().init_Duration_2104(newElement);
-
doConfigure(newElement, monitor, info);
-
((CreateElementRequest)getRequest()).setNewElement(newElement);
return CommandResult.newOKCommandResult(newElement);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/DurationIntervalCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/DurationIntervalCreateCommand.java index 16b95cd2a7d..f9334cfff20 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/DurationIntervalCreateCommand.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/DurationIntervalCreateCommand.java @@ -66,21 +66,16 @@ public class DurationIntervalCreateCommand extends EditElementCommand { * @generated
*/
public boolean canExecute() {
-
EObject target = getElementToEdit();
ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getDurationInterval());
return data.isPermitted();
-
-
}
/**
* @generated
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
-
DurationInterval newElement = UMLFactory.eINSTANCE.createDurationInterval();
-
EObject target = getElementToEdit();
ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
if(data.isPermitted()) {
@@ -88,20 +83,14 @@ public class DurationIntervalCreateCommand extends EditElementCommand { if(!data.execute(target, newElement))
return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
} else {
-
Package qualifiedTarget = (Package)target;
qualifiedTarget.getPackagedElements().add(newElement);
-
}
} else {
return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
}
-
-
ElementInitializers.getInstance().init_DurationInterval_2106(newElement);
-
doConfigure(newElement, monitor, info);
-
((CreateElementRequest)getRequest()).setNewElement(newElement);
return CommandResult.newOKCommandResult(newElement);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/DurationObservationCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/DurationObservationCreateCommand.java index af33e1796b7..72731c22a5d 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/DurationObservationCreateCommand.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/DurationObservationCreateCommand.java @@ -66,21 +66,16 @@ public class DurationObservationCreateCommand extends EditElementCommand { * @generated
*/
public boolean canExecute() {
-
EObject target = getElementToEdit();
ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getDurationObservation());
return data.isPermitted();
-
-
}
/**
* @generated
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
-
DurationObservation newElement = UMLFactory.eINSTANCE.createDurationObservation();
-
EObject target = getElementToEdit();
ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
if(data.isPermitted()) {
@@ -88,20 +83,14 @@ public class DurationObservationCreateCommand extends EditElementCommand { if(!data.execute(target, newElement))
return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
} else {
-
Package qualifiedTarget = (Package)target;
qualifiedTarget.getPackagedElements().add(newElement);
-
}
} else {
return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
}
-
-
ElementInitializers.getInstance().init_DurationObservation_2093(newElement);
-
doConfigure(newElement, monitor, info);
-
((CreateElementRequest)getRequest()).setNewElement(newElement);
return CommandResult.newOKCommandResult(newElement);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/DurationObservationEventCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/DurationObservationEventCreateCommand.java index d3726dbbefe..edcd327694f 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/DurationObservationEventCreateCommand.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/DurationObservationEventCreateCommand.java @@ -73,12 +73,10 @@ public class DurationObservationEventCreateCommand extends EditElementCommand { if(!canExecute()) {
throw new ExecutionException("Invalid arguments in create link command"); //$NON-NLS-1$
}
-
if(getSource() != null && getTarget() != null) {
getSource().getEvents().add(getTarget());
}
return CommandResult.newOKCommandResult();
-
}
/**
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/EnumerationCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/EnumerationCreateCommand.java index dc65fb8de8c..5157d94eef5 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/EnumerationCreateCommand.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/EnumerationCreateCommand.java @@ -66,21 +66,16 @@ public class EnumerationCreateCommand extends EditElementCommand { * @generated
*/
public boolean canExecute() {
-
EObject target = getElementToEdit();
ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getEnumeration());
return data.isPermitted();
-
-
}
/**
* @generated
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
-
Enumeration newElement = UMLFactory.eINSTANCE.createEnumeration();
-
EObject target = getElementToEdit();
ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
if(data.isPermitted()) {
@@ -88,20 +83,14 @@ public class EnumerationCreateCommand extends EditElementCommand { if(!data.execute(target, newElement))
return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
} else {
-
Package qualifiedTarget = (Package)target;
qualifiedTarget.getPackagedElements().add(newElement);
-
}
} else {
return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
}
-
-
ElementInitializers.getInstance().init_Enumeration_2067(newElement);
-
doConfigure(newElement, monitor, info);
-
((CreateElementRequest)getRequest()).setNewElement(newElement);
return CommandResult.newOKCommandResult(newElement);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/EnumerationCreateCommandCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/EnumerationCreateCommandCN.java index c45abacf6af..caf830fb714 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/EnumerationCreateCommandCN.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/EnumerationCreateCommandCN.java @@ -66,21 +66,16 @@ public class EnumerationCreateCommandCN extends EditElementCommand { * @generated
*/
public boolean canExecute() {
-
EObject target = getElementToEdit();
ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getEnumeration());
return data.isPermitted();
-
-
}
/**
* @generated
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
-
Enumeration newElement = UMLFactory.eINSTANCE.createEnumeration();
-
EObject target = getElementToEdit();
ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
if(data.isPermitted()) {
@@ -88,20 +83,14 @@ public class EnumerationCreateCommandCN extends EditElementCommand { if(!data.execute(target, newElement))
return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
} else {
-
Class qualifiedTarget = (Class)target;
qualifiedTarget.getNestedClassifiers().add(newElement);
-
}
} else {
return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
}
-
-
ElementInitializers.getInstance().init_Enumeration_3079(newElement);
-
doConfigure(newElement, monitor, info);
-
((CreateElementRequest)getRequest()).setNewElement(newElement);
return CommandResult.newOKCommandResult(newElement);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/EnumerationLiteralCreateCommandCLN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/EnumerationLiteralCreateCommandCLN.java index 967f74004b0..8ba6481f48c 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/EnumerationLiteralCreateCommandCLN.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/EnumerationLiteralCreateCommandCLN.java @@ -66,21 +66,16 @@ public class EnumerationLiteralCreateCommandCLN extends EditElementCommand { * @generated
*/
public boolean canExecute() {
-
EObject target = getElementToEdit();
ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getEnumerationLiteral());
return data.isPermitted();
-
-
}
/**
* @generated
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
-
EnumerationLiteral newElement = UMLFactory.eINSTANCE.createEnumerationLiteral();
-
EObject target = getElementToEdit();
ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
if(data.isPermitted()) {
@@ -88,20 +83,14 @@ public class EnumerationLiteralCreateCommandCLN extends EditElementCommand { if(!data.execute(target, newElement))
return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
} else {
-
Enumeration qualifiedTarget = (Enumeration)target;
qualifiedTarget.getOwnedLiterals().add(newElement);
-
}
} else {
return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
}
-
-
ElementInitializers.getInstance().init_EnumerationLiteral_3066(newElement);
-
doConfigure(newElement, monitor, info);
-
((CreateElementRequest)getRequest()).setNewElement(newElement);
return CommandResult.newOKCommandResult(newElement);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/ExecutionEnvironmentCompositeCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/ExecutionEnvironmentCompositeCreateCommand.java index 22782148dce..9d1b5008678 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/ExecutionEnvironmentCompositeCreateCommand.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/ExecutionEnvironmentCompositeCreateCommand.java @@ -66,21 +66,16 @@ public class ExecutionEnvironmentCompositeCreateCommand extends EditElementComma * @generated
*/
public boolean canExecute() {
-
EObject target = getElementToEdit();
ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getExecutionEnvironment());
return data.isPermitted();
-
-
}
/**
* @generated
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
-
ExecutionEnvironment newElement = UMLFactory.eINSTANCE.createExecutionEnvironment();
-
EObject target = getElementToEdit();
ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
if(data.isPermitted()) {
@@ -88,20 +83,14 @@ public class ExecutionEnvironmentCompositeCreateCommand extends EditElementComma if(!data.execute(target, newElement))
return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
} else {
-
Package qualifiedTarget = (Package)target;
qualifiedTarget.getPackagedElements().add(newElement);
-
}
} else {
return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
}
-
-
ElementInitializers.getInstance().init_ExecutionEnvironment_2071(newElement);
-
doConfigure(newElement, monitor, info);
-
((CreateElementRequest)getRequest()).setNewElement(newElement);
return CommandResult.newOKCommandResult(newElement);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/ExecutionEnvironmentCompositeCreateCommandCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/ExecutionEnvironmentCompositeCreateCommandCN.java index 83bf1a293e3..27e45226df7 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/ExecutionEnvironmentCompositeCreateCommandCN.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/ExecutionEnvironmentCompositeCreateCommandCN.java @@ -66,21 +66,16 @@ public class ExecutionEnvironmentCompositeCreateCommandCN extends EditElementCom * @generated
*/
public boolean canExecute() {
-
EObject target = getElementToEdit();
ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getExecutionEnvironment());
return data.isPermitted();
-
-
}
/**
* @generated
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
-
ExecutionEnvironment newElement = UMLFactory.eINSTANCE.createExecutionEnvironment();
-
EObject target = getElementToEdit();
ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
if(data.isPermitted()) {
@@ -88,20 +83,14 @@ public class ExecutionEnvironmentCompositeCreateCommandCN extends EditElementCom if(!data.execute(target, newElement))
return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
} else {
-
Class qualifiedTarget = (Class)target;
qualifiedTarget.getNestedClassifiers().add(newElement);
-
}
} else {
return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
}
-
-
ElementInitializers.getInstance().init_ExecutionEnvironment_3083(newElement);
-
doConfigure(newElement, monitor, info);
-
((CreateElementRequest)getRequest()).setNewElement(newElement);
return CommandResult.newOKCommandResult(newElement);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/ExpressionCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/ExpressionCreateCommand.java index 4eddbf0b8d3..6eff9401ecf 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/ExpressionCreateCommand.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/ExpressionCreateCommand.java @@ -66,21 +66,16 @@ public class ExpressionCreateCommand extends EditElementCommand { * @generated
*/
public boolean canExecute() {
-
EObject target = getElementToEdit();
ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getExpression());
return data.isPermitted();
-
-
}
/**
* @generated
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
-
Expression newElement = UMLFactory.eINSTANCE.createExpression();
-
EObject target = getElementToEdit();
ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
if(data.isPermitted()) {
@@ -88,20 +83,14 @@ public class ExpressionCreateCommand extends EditElementCommand { if(!data.execute(target, newElement))
return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
} else {
-
Package qualifiedTarget = (Package)target;
qualifiedTarget.getPackagedElements().add(newElement);
-
}
} else {
return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
}
-
-
ElementInitializers.getInstance().init_Expression_2103(newElement);
-
doConfigure(newElement, monitor, info);
-
((CreateElementRequest)getRequest()).setNewElement(newElement);
return CommandResult.newOKCommandResult(newElement);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/FunctionBehaviorCompositeCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/FunctionBehaviorCompositeCreateCommand.java index 82c52fefb29..69e4d1139ca 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/FunctionBehaviorCompositeCreateCommand.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/FunctionBehaviorCompositeCreateCommand.java @@ -66,21 +66,16 @@ public class FunctionBehaviorCompositeCreateCommand extends EditElementCommand { * @generated
*/
public boolean canExecute() {
-
EObject target = getElementToEdit();
ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getFunctionBehavior());
return data.isPermitted();
-
-
}
/**
* @generated
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
-
FunctionBehavior newElement = UMLFactory.eINSTANCE.createFunctionBehavior();
-
EObject target = getElementToEdit();
ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
if(data.isPermitted()) {
@@ -88,20 +83,14 @@ public class FunctionBehaviorCompositeCreateCommand extends EditElementCommand { if(!data.execute(target, newElement))
return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
} else {
-
Package qualifiedTarget = (Package)target;
qualifiedTarget.getPackagedElements().add(newElement);
-
}
} else {
return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
}
-
-
ElementInitializers.getInstance().init_FunctionBehavior_2064(newElement);
-
doConfigure(newElement, monitor, info);
-
((CreateElementRequest)getRequest()).setNewElement(newElement);
return CommandResult.newOKCommandResult(newElement);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/FunctionBehaviorCompositeCreateCommandCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/FunctionBehaviorCompositeCreateCommandCN.java index b49385947d3..b0b4d106705 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/FunctionBehaviorCompositeCreateCommandCN.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/FunctionBehaviorCompositeCreateCommandCN.java @@ -66,21 +66,16 @@ public class FunctionBehaviorCompositeCreateCommandCN extends EditElementCommand * @generated
*/
public boolean canExecute() {
-
EObject target = getElementToEdit();
ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getFunctionBehavior());
return data.isPermitted();
-
-
}
/**
* @generated
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
-
FunctionBehavior newElement = UMLFactory.eINSTANCE.createFunctionBehavior();
-
EObject target = getElementToEdit();
ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
if(data.isPermitted()) {
@@ -88,20 +83,14 @@ public class FunctionBehaviorCompositeCreateCommandCN extends EditElementCommand if(!data.execute(target, newElement))
return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
} else {
-
Class qualifiedTarget = (Class)target;
qualifiedTarget.getNestedClassifiers().add(newElement);
-
}
} else {
return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
}
-
-
ElementInitializers.getInstance().init_FunctionBehavior_3076(newElement);
-
doConfigure(newElement, monitor, info);
-
((CreateElementRequest)getRequest()).setNewElement(newElement);
return CommandResult.newOKCommandResult(newElement);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/GeneralizationCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/GeneralizationCreateCommand.java index 78c8548c0dd..53ad352cabf 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/GeneralizationCreateCommand.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/GeneralizationCreateCommand.java @@ -87,7 +87,6 @@ public class GeneralizationCreateCommand extends EditElementCommand { if(!canExecute()) {
throw new ExecutionException("Invalid arguments in create link command"); //$NON-NLS-1$
}
-
Generalization newElement = UMLFactory.eINSTANCE.createGeneralization();
getContainer().getGeneralizations().add(newElement);
newElement.setSpecific(getSource());
@@ -95,7 +94,6 @@ public class GeneralizationCreateCommand extends EditElementCommand { doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
return CommandResult.newOKCommandResult(newElement);
-
}
/**
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/InformationFlowCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/InformationFlowCreateCommand.java index b918cdca78d..57015f48e8f 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/InformationFlowCreateCommand.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/InformationFlowCreateCommand.java @@ -89,7 +89,6 @@ public class InformationFlowCreateCommand extends EditElementCommand { if(!canExecute()) {
throw new ExecutionException("Invalid arguments in create link command"); //$NON-NLS-1$
}
-
InformationFlow newElement = UMLFactory.eINSTANCE.createInformationFlow();
getContainer().getPackagedElements().add(newElement);
newElement.getInformationSources().add(getSource());
@@ -98,7 +97,6 @@ public class InformationFlowCreateCommand extends EditElementCommand { doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
return CommandResult.newOKCommandResult(newElement);
-
}
/**
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/InformationItemCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/InformationItemCreateCommand.java index b84be4bc84a..53b90eec855 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/InformationItemCreateCommand.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/InformationItemCreateCommand.java @@ -66,21 +66,16 @@ public class InformationItemCreateCommand extends EditElementCommand { * @generated
*/
public boolean canExecute() {
-
EObject target = getElementToEdit();
ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getInformationItem());
return data.isPermitted();
-
-
}
/**
* @generated
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
-
InformationItem newElement = UMLFactory.eINSTANCE.createInformationItem();
-
EObject target = getElementToEdit();
ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
if(data.isPermitted()) {
@@ -88,20 +83,14 @@ public class InformationItemCreateCommand extends EditElementCommand { if(!data.execute(target, newElement))
return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
} else {
-
Package qualifiedTarget = (Package)target;
qualifiedTarget.getPackagedElements().add(newElement);
-
}
} else {
return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
}
-
-
ElementInitializers.getInstance().init_InformationItem_2080(newElement);
-
doConfigure(newElement, monitor, info);
-
((CreateElementRequest)getRequest()).setNewElement(newElement);
return CommandResult.newOKCommandResult(newElement);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/InformationItemCreateCommandCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/InformationItemCreateCommandCN.java index c9e6ac3a01a..0f43c1a3d69 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/InformationItemCreateCommandCN.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/InformationItemCreateCommandCN.java @@ -66,21 +66,16 @@ public class InformationItemCreateCommandCN extends EditElementCommand { * @generated
*/
public boolean canExecute() {
-
EObject target = getElementToEdit();
ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getInformationItem());
return data.isPermitted();
-
-
}
/**
* @generated
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
-
InformationItem newElement = UMLFactory.eINSTANCE.createInformationItem();
-
EObject target = getElementToEdit();
ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
if(data.isPermitted()) {
@@ -88,20 +83,14 @@ public class InformationItemCreateCommandCN extends EditElementCommand { if(!data.execute(target, newElement))
return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
} else {
-
Class qualifiedTarget = (Class)target;
qualifiedTarget.getNestedClassifiers().add(newElement);
-
}
} else {
return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
}
-
-
ElementInitializers.getInstance().init_InformationItem_3094(newElement);
-
doConfigure(newElement, monitor, info);
-
((CreateElementRequest)getRequest()).setNewElement(newElement);
return CommandResult.newOKCommandResult(newElement);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/InstanceValueCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/InstanceValueCreateCommand.java index 7bb34d6de70..74d29f64901 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/InstanceValueCreateCommand.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/InstanceValueCreateCommand.java @@ -66,21 +66,16 @@ public class InstanceValueCreateCommand extends EditElementCommand { * @generated
*/
public boolean canExecute() {
-
EObject target = getElementToEdit();
ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getInstanceValue());
return data.isPermitted();
-
-
}
/**
* @generated
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
-
InstanceValue newElement = UMLFactory.eINSTANCE.createInstanceValue();
-
EObject target = getElementToEdit();
ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
if(data.isPermitted()) {
@@ -88,20 +83,14 @@ public class InstanceValueCreateCommand extends EditElementCommand { if(!data.execute(target, newElement))
return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
} else {
-
Package qualifiedTarget = (Package)target;
qualifiedTarget.getPackagedElements().add(newElement);
-
}
} else {
return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
}
-
-
ElementInitializers.getInstance().init_InstanceValue_2108(newElement);
-
doConfigure(newElement, monitor, info);
-
((CreateElementRequest)getRequest()).setNewElement(newElement);
return CommandResult.newOKCommandResult(newElement);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/InteractionCompositeCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/InteractionCompositeCreateCommand.java index dd6b8ec0820..476047e653e 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/InteractionCompositeCreateCommand.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/InteractionCompositeCreateCommand.java @@ -66,21 +66,16 @@ public class InteractionCompositeCreateCommand extends EditElementCommand { * @generated
*/
public boolean canExecute() {
-
EObject target = getElementToEdit();
ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getInteraction());
return data.isPermitted();
-
-
}
/**
* @generated
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
-
Interaction newElement = UMLFactory.eINSTANCE.createInteraction();
-
EObject target = getElementToEdit();
ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
if(data.isPermitted()) {
@@ -88,20 +83,14 @@ public class InteractionCompositeCreateCommand extends EditElementCommand { if(!data.execute(target, newElement))
return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
} else {
-
Package qualifiedTarget = (Package)target;
qualifiedTarget.getPackagedElements().add(newElement);
-
}
} else {
return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
}
-
-
ElementInitializers.getInstance().init_Interaction_2061(newElement);
-
doConfigure(newElement, monitor, info);
-
((CreateElementRequest)getRequest()).setNewElement(newElement);
return CommandResult.newOKCommandResult(newElement);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/InteractionCompositeCreateCommandCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/InteractionCompositeCreateCommandCN.java index 89a581b7192..1b16a5ed50e 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/InteractionCompositeCreateCommandCN.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/InteractionCompositeCreateCommandCN.java @@ -66,21 +66,16 @@ public class InteractionCompositeCreateCommandCN extends EditElementCommand { * @generated
*/
public boolean canExecute() {
-
EObject target = getElementToEdit();
ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getInteraction());
return data.isPermitted();
-
-
}
/**
* @generated
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
-
Interaction newElement = UMLFactory.eINSTANCE.createInteraction();
-
EObject target = getElementToEdit();
ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
if(data.isPermitted()) {
@@ -88,20 +83,14 @@ public class InteractionCompositeCreateCommandCN extends EditElementCommand { if(!data.execute(target, newElement))
return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
} else {
-
Class qualifiedTarget = (Class)target;
qualifiedTarget.getNestedClassifiers().add(newElement);
-
}
} else {
return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
}
-
-
ElementInitializers.getInstance().init_Interaction_3073(newElement);
-
doConfigure(newElement, monitor, info);
-
((CreateElementRequest)getRequest()).setNewElement(newElement);
return CommandResult.newOKCommandResult(newElement);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/InteractionConstraintCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/InteractionConstraintCreateCommand.java index 4f322358831..fafb37638dd 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/InteractionConstraintCreateCommand.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/InteractionConstraintCreateCommand.java @@ -66,21 +66,16 @@ public class InteractionConstraintCreateCommand extends EditElementCommand { * @generated
*/
public boolean canExecute() {
-
EObject target = getElementToEdit();
ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getInteractionConstraint());
return data.isPermitted();
-
-
}
/**
* @generated
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
-
InteractionConstraint newElement = UMLFactory.eINSTANCE.createInteractionConstraint();
-
EObject target = getElementToEdit();
ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
if(data.isPermitted()) {
@@ -88,20 +83,14 @@ public class InteractionConstraintCreateCommand extends EditElementCommand { if(!data.execute(target, newElement))
return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
} else {
-
Namespace qualifiedTarget = (Namespace)target;
qualifiedTarget.getOwnedRules().add(newElement);
-
}
} else {
return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
}
-
-
ElementInitializers.getInstance().init_InteractionConstraint_2113(newElement);
-
doConfigure(newElement, monitor, info);
-
((CreateElementRequest)getRequest()).setNewElement(newElement);
return CommandResult.newOKCommandResult(newElement);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/InteractionConstraintCreateCommandCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/InteractionConstraintCreateCommandCN.java index bb3fd888d21..60d505f85c9 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/InteractionConstraintCreateCommandCN.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/InteractionConstraintCreateCommandCN.java @@ -66,21 +66,16 @@ public class InteractionConstraintCreateCommandCN extends EditElementCommand { * @generated
*/
public boolean canExecute() {
-
EObject target = getElementToEdit();
ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getInteractionConstraint());
return data.isPermitted();
-
-
}
/**
* @generated
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
-
InteractionConstraint newElement = UMLFactory.eINSTANCE.createInteractionConstraint();
-
EObject target = getElementToEdit();
ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
if(data.isPermitted()) {
@@ -88,20 +83,14 @@ public class InteractionConstraintCreateCommandCN extends EditElementCommand { if(!data.execute(target, newElement))
return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
} else {
-
Namespace qualifiedTarget = (Namespace)target;
qualifiedTarget.getOwnedRules().add(newElement);
-
}
} else {
return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
}
-
-
ElementInitializers.getInstance().init_InteractionConstraint_3119(newElement);
-
doConfigure(newElement, monitor, info);
-
((CreateElementRequest)getRequest()).setNewElement(newElement);
return CommandResult.newOKCommandResult(newElement);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/InterfaceCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/InterfaceCreateCommand.java index bc9ed4946a0..44227bc03c6 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/InterfaceCreateCommand.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/InterfaceCreateCommand.java @@ -66,21 +66,16 @@ public class InterfaceCreateCommand extends EditElementCommand { * @generated
*/
public boolean canExecute() {
-
EObject target = getElementToEdit();
ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getInterface());
return data.isPermitted();
-
-
}
/**
* @generated
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
-
Interface newElement = UMLFactory.eINSTANCE.createInterface();
-
EObject target = getElementToEdit();
ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
if(data.isPermitted()) {
@@ -88,20 +83,14 @@ public class InterfaceCreateCommand extends EditElementCommand { if(!data.execute(target, newElement))
return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
} else {
-
Package qualifiedTarget = (Package)target;
qualifiedTarget.getPackagedElements().add(newElement);
-
}
} else {
return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
}
-
-
ElementInitializers.getInstance().init_Interface_2076(newElement);
-
doConfigure(newElement, monitor, info);
-
((CreateElementRequest)getRequest()).setNewElement(newElement);
return CommandResult.newOKCommandResult(newElement);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/InterfaceCreateCommandCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/InterfaceCreateCommandCN.java index 3872de15739..7d4bbe2905d 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/InterfaceCreateCommandCN.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/InterfaceCreateCommandCN.java @@ -66,21 +66,16 @@ public class InterfaceCreateCommandCN extends EditElementCommand { * @generated
*/
public boolean canExecute() {
-
EObject target = getElementToEdit();
ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getInterface());
return data.isPermitted();
-
-
}
/**
* @generated
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
-
Interface newElement = UMLFactory.eINSTANCE.createInterface();
-
EObject target = getElementToEdit();
ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
if(data.isPermitted()) {
@@ -88,20 +83,14 @@ public class InterfaceCreateCommandCN extends EditElementCommand { if(!data.execute(target, newElement))
return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
} else {
-
Class qualifiedTarget = (Class)target;
qualifiedTarget.getNestedClassifiers().add(newElement);
-
}
} else {
return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
}
-
-
ElementInitializers.getInstance().init_Interface_3087(newElement);
-
doConfigure(newElement, monitor, info);
-
((CreateElementRequest)getRequest()).setNewElement(newElement);
return CommandResult.newOKCommandResult(newElement);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/InterfaceRealizationCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/InterfaceRealizationCreateCommand.java index cfb592b0d24..f6509955f24 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/InterfaceRealizationCreateCommand.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/InterfaceRealizationCreateCommand.java @@ -89,7 +89,6 @@ public class InterfaceRealizationCreateCommand extends EditElementCommand { if(!canExecute()) {
throw new ExecutionException("Invalid arguments in create link command"); //$NON-NLS-1$
}
-
InterfaceRealization newElement = UMLFactory.eINSTANCE.createInterfaceRealization();
getContainer().getPackagedElements().add(newElement);
newElement.getClients().add(getSource());
@@ -98,7 +97,6 @@ public class InterfaceRealizationCreateCommand extends EditElementCommand { doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
return CommandResult.newOKCommandResult(newElement);
-
}
/**
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/IntervalConstraintCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/IntervalConstraintCreateCommand.java index e11bed5d0e4..3b74f3a4a16 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/IntervalConstraintCreateCommand.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/IntervalConstraintCreateCommand.java @@ -66,21 +66,16 @@ public class IntervalConstraintCreateCommand extends EditElementCommand { * @generated
*/
public boolean canExecute() {
-
EObject target = getElementToEdit();
ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getIntervalConstraint());
return data.isPermitted();
-
-
}
/**
* @generated
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
-
IntervalConstraint newElement = UMLFactory.eINSTANCE.createIntervalConstraint();
-
EObject target = getElementToEdit();
ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
if(data.isPermitted()) {
@@ -88,20 +83,14 @@ public class IntervalConstraintCreateCommand extends EditElementCommand { if(!data.execute(target, newElement))
return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
} else {
-
Namespace qualifiedTarget = (Namespace)target;
qualifiedTarget.getOwnedRules().add(newElement);
-
}
} else {
return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
}
-
-
ElementInitializers.getInstance().init_IntervalConstraint_2112(newElement);
-
doConfigure(newElement, monitor, info);
-
((CreateElementRequest)getRequest()).setNewElement(newElement);
return CommandResult.newOKCommandResult(newElement);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/IntervalConstraintCreateCommandCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/IntervalConstraintCreateCommandCN.java index 1d802aaff5b..be25af1ea9c 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/IntervalConstraintCreateCommandCN.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/IntervalConstraintCreateCommandCN.java @@ -66,21 +66,16 @@ public class IntervalConstraintCreateCommandCN extends EditElementCommand { * @generated
*/
public boolean canExecute() {
-
EObject target = getElementToEdit();
ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getIntervalConstraint());
return data.isPermitted();
-
-
}
/**
* @generated
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
-
IntervalConstraint newElement = UMLFactory.eINSTANCE.createIntervalConstraint();
-
EObject target = getElementToEdit();
ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
if(data.isPermitted()) {
@@ -88,20 +83,14 @@ public class IntervalConstraintCreateCommandCN extends EditElementCommand { if(!data.execute(target, newElement))
return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
} else {
-
Namespace qualifiedTarget = (Namespace)target;
qualifiedTarget.getOwnedRules().add(newElement);
-
}
} else {
return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
}
-
-
ElementInitializers.getInstance().init_IntervalConstraint_3118(newElement);
-
doConfigure(newElement, monitor, info);
-
((CreateElementRequest)getRequest()).setNewElement(newElement);
return CommandResult.newOKCommandResult(newElement);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/IntervalCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/IntervalCreateCommand.java index 60062d72830..3bed0af3441 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/IntervalCreateCommand.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/IntervalCreateCommand.java @@ -66,21 +66,16 @@ public class IntervalCreateCommand extends EditElementCommand { * @generated
*/
public boolean canExecute() {
-
EObject target = getElementToEdit();
ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getInterval());
return data.isPermitted();
-
-
}
/**
* @generated
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
-
Interval newElement = UMLFactory.eINSTANCE.createInterval();
-
EObject target = getElementToEdit();
ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
if(data.isPermitted()) {
@@ -88,20 +83,14 @@ public class IntervalCreateCommand extends EditElementCommand { if(!data.execute(target, newElement))
return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
} else {
-
Package qualifiedTarget = (Package)target;
qualifiedTarget.getPackagedElements().add(newElement);
-
}
} else {
return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
}
-
-
ElementInitializers.getInstance().init_Interval_2107(newElement);
-
doConfigure(newElement, monitor, info);
-
((CreateElementRequest)getRequest()).setNewElement(newElement);
return CommandResult.newOKCommandResult(newElement);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/LiteralBooleanCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/LiteralBooleanCreateCommand.java index 5a852593f0e..98e417338b4 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/LiteralBooleanCreateCommand.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/LiteralBooleanCreateCommand.java @@ -66,21 +66,16 @@ public class LiteralBooleanCreateCommand extends EditElementCommand { * @generated
*/
public boolean canExecute() {
-
EObject target = getElementToEdit();
ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getLiteralBoolean());
return data.isPermitted();
-
-
}
/**
* @generated
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
-
LiteralBoolean newElement = UMLFactory.eINSTANCE.createLiteralBoolean();
-
EObject target = getElementToEdit();
ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
if(data.isPermitted()) {
@@ -88,20 +83,14 @@ public class LiteralBooleanCreateCommand extends EditElementCommand { if(!data.execute(target, newElement))
return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
} else {
-
Package qualifiedTarget = (Package)target;
qualifiedTarget.getPackagedElements().add(newElement);
-
}
} else {
return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
}
-
-
ElementInitializers.getInstance().init_LiteralBoolean_2095(newElement);
-
doConfigure(newElement, monitor, info);
-
((CreateElementRequest)getRequest()).setNewElement(newElement);
return CommandResult.newOKCommandResult(newElement);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/LiteralIntegerCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/LiteralIntegerCreateCommand.java index 950f66494be..1058518d0d0 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/LiteralIntegerCreateCommand.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/LiteralIntegerCreateCommand.java @@ -66,21 +66,16 @@ public class LiteralIntegerCreateCommand extends EditElementCommand { * @generated
*/
public boolean canExecute() {
-
EObject target = getElementToEdit();
ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getLiteralInteger());
return data.isPermitted();
-
-
}
/**
* @generated
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
-
LiteralInteger newElement = UMLFactory.eINSTANCE.createLiteralInteger();
-
EObject target = getElementToEdit();
ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
if(data.isPermitted()) {
@@ -88,20 +83,14 @@ public class LiteralIntegerCreateCommand extends EditElementCommand { if(!data.execute(target, newElement))
return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
} else {
-
Package qualifiedTarget = (Package)target;
qualifiedTarget.getPackagedElements().add(newElement);
-
}
} else {
return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
}
-
-
ElementInitializers.getInstance().init_LiteralInteger_2096(newElement);
-
doConfigure(newElement, monitor, info);
-
((CreateElementRequest)getRequest()).setNewElement(newElement);
return CommandResult.newOKCommandResult(newElement);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/LiteralNullCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/LiteralNullCreateCommand.java index a96c156c8ee..6ed39af7646 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/LiteralNullCreateCommand.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/LiteralNullCreateCommand.java @@ -66,21 +66,16 @@ public class LiteralNullCreateCommand extends EditElementCommand { * @generated
*/
public boolean canExecute() {
-
EObject target = getElementToEdit();
ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getLiteralNull());
return data.isPermitted();
-
-
}
/**
* @generated
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
-
LiteralNull newElement = UMLFactory.eINSTANCE.createLiteralNull();
-
EObject target = getElementToEdit();
ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
if(data.isPermitted()) {
@@ -88,20 +83,14 @@ public class LiteralNullCreateCommand extends EditElementCommand { if(!data.execute(target, newElement))
return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
} else {
-
Package qualifiedTarget = (Package)target;
qualifiedTarget.getPackagedElements().add(newElement);
-
}
} else {
return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
}
-
-
ElementInitializers.getInstance().init_LiteralNull_2097(newElement);
-
doConfigure(newElement, monitor, info);
-
((CreateElementRequest)getRequest()).setNewElement(newElement);
return CommandResult.newOKCommandResult(newElement);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/LiteralStringCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/LiteralStringCreateCommand.java index 7e8ecb16307..27bb8631fee 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/LiteralStringCreateCommand.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/LiteralStringCreateCommand.java @@ -66,21 +66,16 @@ public class LiteralStringCreateCommand extends EditElementCommand { * @generated
*/
public boolean canExecute() {
-
EObject target = getElementToEdit();
ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getLiteralString());
return data.isPermitted();
-
-
}
/**
* @generated
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
-
LiteralString newElement = UMLFactory.eINSTANCE.createLiteralString();
-
EObject target = getElementToEdit();
ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
if(data.isPermitted()) {
@@ -88,20 +83,14 @@ public class LiteralStringCreateCommand extends EditElementCommand { if(!data.execute(target, newElement))
return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
} else {
-
Package qualifiedTarget = (Package)target;
qualifiedTarget.getPackagedElements().add(newElement);
-
}
} else {
return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
}
-
-
ElementInitializers.getInstance().init_LiteralString_2098(newElement);
-
doConfigure(newElement, monitor, info);
-
((CreateElementRequest)getRequest()).setNewElement(newElement);
return CommandResult.newOKCommandResult(newElement);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/LiteralUnlimitedNaturalCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/LiteralUnlimitedNaturalCreateCommand.java index 5df9680550d..74622878015 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/LiteralUnlimitedNaturalCreateCommand.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/LiteralUnlimitedNaturalCreateCommand.java @@ -66,21 +66,16 @@ public class LiteralUnlimitedNaturalCreateCommand extends EditElementCommand { * @generated
*/
public boolean canExecute() {
-
EObject target = getElementToEdit();
ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getLiteralUnlimitedNatural());
return data.isPermitted();
-
-
}
/**
* @generated
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
-
LiteralUnlimitedNatural newElement = UMLFactory.eINSTANCE.createLiteralUnlimitedNatural();
-
EObject target = getElementToEdit();
ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
if(data.isPermitted()) {
@@ -88,20 +83,14 @@ public class LiteralUnlimitedNaturalCreateCommand extends EditElementCommand { if(!data.execute(target, newElement))
return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
} else {
-
Package qualifiedTarget = (Package)target;
qualifiedTarget.getPackagedElements().add(newElement);
-
}
} else {
return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
}
-
-
ElementInitializers.getInstance().init_LiteralUnlimitedNatural_2099(newElement);
-
doConfigure(newElement, monitor, info);
-
((CreateElementRequest)getRequest()).setNewElement(newElement);
return CommandResult.newOKCommandResult(newElement);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/ManifestationCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/ManifestationCreateCommand.java index b3528d9f144..6d9cec03a10 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/ManifestationCreateCommand.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/ManifestationCreateCommand.java @@ -89,7 +89,6 @@ public class ManifestationCreateCommand extends EditElementCommand { if(!canExecute()) {
throw new ExecutionException("Invalid arguments in create link command"); //$NON-NLS-1$
}
-
Manifestation newElement = UMLFactory.eINSTANCE.createManifestation();
getContainer().getPackagedElements().add(newElement);
newElement.getClients().add(getSource());
@@ -98,7 +97,6 @@ public class ManifestationCreateCommand extends EditElementCommand { doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
return CommandResult.newOKCommandResult(newElement);
-
}
/**
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/NodeCompositeCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/NodeCompositeCreateCommand.java index a69a3d3119e..205d5eb8eca 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/NodeCompositeCreateCommand.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/NodeCompositeCreateCommand.java @@ -66,21 +66,16 @@ public class NodeCompositeCreateCommand extends EditElementCommand { * @generated
*/
public boolean canExecute() {
-
EObject target = getElementToEdit();
ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getNode());
return data.isPermitted();
-
-
}
/**
* @generated
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
-
Node newElement = UMLFactory.eINSTANCE.createNode();
-
EObject target = getElementToEdit();
ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
if(data.isPermitted()) {
@@ -88,20 +83,14 @@ public class NodeCompositeCreateCommand extends EditElementCommand { if(!data.execute(target, newElement))
return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
} else {
-
Package qualifiedTarget = (Package)target;
qualifiedTarget.getPackagedElements().add(newElement);
-
}
} else {
return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
}
-
-
ElementInitializers.getInstance().init_Node_2072(newElement);
-
doConfigure(newElement, monitor, info);
-
((CreateElementRequest)getRequest()).setNewElement(newElement);
return CommandResult.newOKCommandResult(newElement);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/NodeCompositeCreateCommandCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/NodeCompositeCreateCommandCN.java index e76a82721ea..2b0fb2a7217 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/NodeCompositeCreateCommandCN.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/NodeCompositeCreateCommandCN.java @@ -66,21 +66,16 @@ public class NodeCompositeCreateCommandCN extends EditElementCommand { * @generated
*/
public boolean canExecute() {
-
EObject target = getElementToEdit();
ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getNode());
return data.isPermitted();
-
-
}
/**
* @generated
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
-
Node newElement = UMLFactory.eINSTANCE.createNode();
-
EObject target = getElementToEdit();
ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
if(data.isPermitted()) {
@@ -88,20 +83,14 @@ public class NodeCompositeCreateCommandCN extends EditElementCommand { if(!data.execute(target, newElement))
return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
} else {
-
Class qualifiedTarget = (Class)target;
qualifiedTarget.getNestedClassifiers().add(newElement);
-
}
} else {
return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
}
-
-
ElementInitializers.getInstance().init_Node_3084(newElement);
-
doConfigure(newElement, monitor, info);
-
((CreateElementRequest)getRequest()).setNewElement(newElement);
return CommandResult.newOKCommandResult(newElement);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/OpaqueBehaviorCompositeCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/OpaqueBehaviorCompositeCreateCommand.java index 6122132fbe8..64200aec6e6 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/OpaqueBehaviorCompositeCreateCommand.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/OpaqueBehaviorCompositeCreateCommand.java @@ -66,21 +66,16 @@ public class OpaqueBehaviorCompositeCreateCommand extends EditElementCommand { * @generated
*/
public boolean canExecute() {
-
EObject target = getElementToEdit();
ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getOpaqueBehavior());
return data.isPermitted();
-
-
}
/**
* @generated
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
-
OpaqueBehavior newElement = UMLFactory.eINSTANCE.createOpaqueBehavior();
-
EObject target = getElementToEdit();
ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
if(data.isPermitted()) {
@@ -88,20 +83,14 @@ public class OpaqueBehaviorCompositeCreateCommand extends EditElementCommand { if(!data.execute(target, newElement))
return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
} else {
-
Package qualifiedTarget = (Package)target;
qualifiedTarget.getPackagedElements().add(newElement);
-
}
} else {
return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
}
-
-
ElementInitializers.getInstance().init_OpaqueBehavior_2065(newElement);
-
doConfigure(newElement, monitor, info);
-
((CreateElementRequest)getRequest()).setNewElement(newElement);
return CommandResult.newOKCommandResult(newElement);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/OpaqueBehaviorCompositeCreateCommandCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/OpaqueBehaviorCompositeCreateCommandCN.java index fbd88a9fcde..8e7389d2bc0 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/OpaqueBehaviorCompositeCreateCommandCN.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/OpaqueBehaviorCompositeCreateCommandCN.java @@ -66,21 +66,16 @@ public class OpaqueBehaviorCompositeCreateCommandCN extends EditElementCommand { * @generated
*/
public boolean canExecute() {
-
EObject target = getElementToEdit();
ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getOpaqueBehavior());
return data.isPermitted();
-
-
}
/**
* @generated
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
-
OpaqueBehavior newElement = UMLFactory.eINSTANCE.createOpaqueBehavior();
-
EObject target = getElementToEdit();
ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
if(data.isPermitted()) {
@@ -88,20 +83,14 @@ public class OpaqueBehaviorCompositeCreateCommandCN extends EditElementCommand { if(!data.execute(target, newElement))
return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
} else {
-
Class qualifiedTarget = (Class)target;
qualifiedTarget.getNestedClassifiers().add(newElement);
-
}
} else {
return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
}
-
-
ElementInitializers.getInstance().init_OpaqueBehavior_3077(newElement);
-
doConfigure(newElement, monitor, info);
-
((CreateElementRequest)getRequest()).setNewElement(newElement);
return CommandResult.newOKCommandResult(newElement);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/OpaqueExpressionCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/OpaqueExpressionCreateCommand.java index 71a200e2e17..f124e3efb79 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/OpaqueExpressionCreateCommand.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/OpaqueExpressionCreateCommand.java @@ -66,21 +66,16 @@ public class OpaqueExpressionCreateCommand extends EditElementCommand { * @generated
*/
public boolean canExecute() {
-
EObject target = getElementToEdit();
ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getOpaqueExpression());
return data.isPermitted();
-
-
}
/**
* @generated
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
-
OpaqueExpression newElement = UMLFactory.eINSTANCE.createOpaqueExpression();
-
EObject target = getElementToEdit();
ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
if(data.isPermitted()) {
@@ -88,20 +83,14 @@ public class OpaqueExpressionCreateCommand extends EditElementCommand { if(!data.execute(target, newElement))
return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
} else {
-
Package qualifiedTarget = (Package)target;
qualifiedTarget.getPackagedElements().add(newElement);
-
}
} else {
return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
}
-
-
ElementInitializers.getInstance().init_OpaqueExpression_2101(newElement);
-
doConfigure(newElement, monitor, info);
-
((CreateElementRequest)getRequest()).setNewElement(newElement);
return CommandResult.newOKCommandResult(newElement);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/OperationCreateCommandCLN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/OperationCreateCommandCLN.java index 71773a886f6..7c9791d8581 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/OperationCreateCommandCLN.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/OperationCreateCommandCLN.java @@ -66,21 +66,16 @@ public class OperationCreateCommandCLN extends EditElementCommand { * @generated
*/
public boolean canExecute() {
-
EObject target = getElementToEdit();
ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getOperation());
return data.isPermitted();
-
-
}
/**
* @generated
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
-
Operation newElement = UMLFactory.eINSTANCE.createOperation();
-
EObject target = getElementToEdit();
ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
if(data.isPermitted()) {
@@ -88,20 +83,14 @@ public class OperationCreateCommandCLN extends EditElementCommand { if(!data.execute(target, newElement))
return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
} else {
-
Class qualifiedTarget = (Class)target;
qualifiedTarget.getOwnedOperations().add(newElement);
-
}
} else {
return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
}
-
-
ElementInitializers.getInstance().init_Operation_3102(newElement);
-
doConfigure(newElement, monitor, info);
-
((CreateElementRequest)getRequest()).setNewElement(newElement);
return CommandResult.newOKCommandResult(newElement);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/ParameterCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/ParameterCreateCommand.java index 336a1834f93..9ec7e0322f3 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/ParameterCreateCommand.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/ParameterCreateCommand.java @@ -66,21 +66,16 @@ public class ParameterCreateCommand extends EditElementCommand { * @generated
*/
public boolean canExecute() {
-
EObject target = getElementToEdit();
ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getParameter());
return data.isPermitted();
-
-
}
/**
* @generated
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
-
Parameter newElement = UMLFactory.eINSTANCE.createParameter();
-
EObject target = getElementToEdit();
ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
if(data.isPermitted()) {
@@ -88,20 +83,14 @@ public class ParameterCreateCommand extends EditElementCommand { if(!data.execute(target, newElement))
return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
} else {
-
Behavior qualifiedTarget = (Behavior)target;
qualifiedTarget.getOwnedParameters().add(newElement);
-
}
} else {
return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
}
-
-
ElementInitializers.getInstance().init_Parameter_3088(newElement);
-
doConfigure(newElement, monitor, info);
-
((CreateElementRequest)getRequest()).setNewElement(newElement);
return CommandResult.newOKCommandResult(newElement);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/PortCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/PortCreateCommand.java index 3c757766183..604250d86f8 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/PortCreateCommand.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/PortCreateCommand.java @@ -66,21 +66,16 @@ public class PortCreateCommand extends EditElementCommand { * @generated
*/
public boolean canExecute() {
-
EObject target = getElementToEdit();
ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getPort());
return data.isPermitted();
-
-
}
/**
* @generated
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
-
Port newElement = UMLFactory.eINSTANCE.createPort();
-
EObject target = getElementToEdit();
ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
if(data.isPermitted()) {
@@ -88,20 +83,14 @@ public class PortCreateCommand extends EditElementCommand { if(!data.execute(target, newElement))
return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
} else {
-
StructuredClassifier qualifiedTarget = (StructuredClassifier)target;
qualifiedTarget.getOwnedAttributes().add(newElement);
-
}
} else {
return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
}
-
-
ElementInitializers.getInstance().init_Port_3069(newElement);
-
doConfigure(newElement, monitor, info);
-
((CreateElementRequest)getRequest()).setNewElement(newElement);
return CommandResult.newOKCommandResult(newElement);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/PrimitiveTypeCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/PrimitiveTypeCreateCommand.java index e7dad7f2da4..74cdf2ee6da 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/PrimitiveTypeCreateCommand.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/PrimitiveTypeCreateCommand.java @@ -66,21 +66,16 @@ public class PrimitiveTypeCreateCommand extends EditElementCommand { * @generated
*/
public boolean canExecute() {
-
EObject target = getElementToEdit();
ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getPrimitiveType());
return data.isPermitted();
-
-
}
/**
* @generated
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
-
PrimitiveType newElement = UMLFactory.eINSTANCE.createPrimitiveType();
-
EObject target = getElementToEdit();
ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
if(data.isPermitted()) {
@@ -88,20 +83,14 @@ public class PrimitiveTypeCreateCommand extends EditElementCommand { if(!data.execute(target, newElement))
return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
} else {
-
Package qualifiedTarget = (Package)target;
qualifiedTarget.getPackagedElements().add(newElement);
-
}
} else {
return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
}
-
-
ElementInitializers.getInstance().init_PrimitiveType_2066(newElement);
-
doConfigure(newElement, monitor, info);
-
((CreateElementRequest)getRequest()).setNewElement(newElement);
return CommandResult.newOKCommandResult(newElement);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/PrimitiveTypeCreateCommandCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/PrimitiveTypeCreateCommandCN.java index c88a916198e..abccfb6338c 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/PrimitiveTypeCreateCommandCN.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/PrimitiveTypeCreateCommandCN.java @@ -66,21 +66,16 @@ public class PrimitiveTypeCreateCommandCN extends EditElementCommand { * @generated
*/
public boolean canExecute() {
-
EObject target = getElementToEdit();
ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getPrimitiveType());
return data.isPermitted();
-
-
}
/**
* @generated
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
-
PrimitiveType newElement = UMLFactory.eINSTANCE.createPrimitiveType();
-
EObject target = getElementToEdit();
ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
if(data.isPermitted()) {
@@ -88,20 +83,14 @@ public class PrimitiveTypeCreateCommandCN extends EditElementCommand { if(!data.execute(target, newElement))
return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
} else {
-
Class qualifiedTarget = (Class)target;
qualifiedTarget.getNestedClassifiers().add(newElement);
-
}
} else {
return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
}
-
-
ElementInitializers.getInstance().init_PrimitiveType_3078(newElement);
-
doConfigure(newElement, monitor, info);
-
((CreateElementRequest)getRequest()).setNewElement(newElement);
return CommandResult.newOKCommandResult(newElement);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/PropertyCreateCommandCLN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/PropertyCreateCommandCLN.java index f3ba3b84f69..56c69983361 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/PropertyCreateCommandCLN.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/PropertyCreateCommandCLN.java @@ -66,21 +66,16 @@ public class PropertyCreateCommandCLN extends EditElementCommand { * @generated
*/
public boolean canExecute() {
-
EObject target = getElementToEdit();
ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getProperty());
return data.isPermitted();
-
-
}
/**
* @generated
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
-
Property newElement = UMLFactory.eINSTANCE.createProperty();
-
EObject target = getElementToEdit();
ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
if(data.isPermitted()) {
@@ -88,20 +83,14 @@ public class PropertyCreateCommandCLN extends EditElementCommand { if(!data.execute(target, newElement))
return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
} else {
-
StructuredClassifier qualifiedTarget = (StructuredClassifier)target;
qualifiedTarget.getOwnedAttributes().add(newElement);
-
}
} else {
return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
}
-
-
ElementInitializers.getInstance().init_Property_3101(newElement);
-
doConfigure(newElement, monitor, info);
-
((CreateElementRequest)getRequest()).setNewElement(newElement);
return CommandResult.newOKCommandResult(newElement);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/PropertyPartCreateCommandCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/PropertyPartCreateCommandCN.java index bb142587fa7..c2636aaccb3 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/PropertyPartCreateCommandCN.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/PropertyPartCreateCommandCN.java @@ -66,21 +66,16 @@ public class PropertyPartCreateCommandCN extends EditElementCommand { * @generated
*/
public boolean canExecute() {
-
EObject target = getElementToEdit();
ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getProperty());
return data.isPermitted();
-
-
}
/**
* @generated
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
-
Property newElement = UMLFactory.eINSTANCE.createProperty();
-
EObject target = getElementToEdit();
ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
if(data.isPermitted()) {
@@ -88,20 +83,14 @@ public class PropertyPartCreateCommandCN extends EditElementCommand { if(!data.execute(target, newElement))
return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
} else {
-
StructuredClassifier qualifiedTarget = (StructuredClassifier)target;
qualifiedTarget.getOwnedAttributes().add(newElement);
-
}
} else {
return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
}
-
-
ElementInitializers.getInstance().init_Property_3070(newElement);
-
doConfigure(newElement, monitor, info);
-
((CreateElementRequest)getRequest()).setNewElement(newElement);
return CommandResult.newOKCommandResult(newElement);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/ProtocolStateMachineCompositeCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/ProtocolStateMachineCompositeCreateCommand.java index 751cf91b632..bb7c7f18e8c 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/ProtocolStateMachineCompositeCreateCommand.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/ProtocolStateMachineCompositeCreateCommand.java @@ -66,21 +66,16 @@ public class ProtocolStateMachineCompositeCreateCommand extends EditElementComma * @generated
*/
public boolean canExecute() {
-
EObject target = getElementToEdit();
ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getProtocolStateMachine());
return data.isPermitted();
-
-
}
/**
* @generated
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
-
ProtocolStateMachine newElement = UMLFactory.eINSTANCE.createProtocolStateMachine();
-
EObject target = getElementToEdit();
ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
if(data.isPermitted()) {
@@ -88,20 +83,14 @@ public class ProtocolStateMachineCompositeCreateCommand extends EditElementComma if(!data.execute(target, newElement))
return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
} else {
-
Package qualifiedTarget = (Package)target;
qualifiedTarget.getPackagedElements().add(newElement);
-
}
} else {
return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
}
-
-
ElementInitializers.getInstance().init_ProtocolStateMachine_2062(newElement);
-
doConfigure(newElement, monitor, info);
-
((CreateElementRequest)getRequest()).setNewElement(newElement);
return CommandResult.newOKCommandResult(newElement);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/ProtocolStateMachineCompositeCreateCommandCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/ProtocolStateMachineCompositeCreateCommandCN.java index b351f2fa25a..92886690904 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/ProtocolStateMachineCompositeCreateCommandCN.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/ProtocolStateMachineCompositeCreateCommandCN.java @@ -66,21 +66,16 @@ public class ProtocolStateMachineCompositeCreateCommandCN extends EditElementCom * @generated
*/
public boolean canExecute() {
-
EObject target = getElementToEdit();
ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getProtocolStateMachine());
return data.isPermitted();
-
-
}
/**
* @generated
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
-
ProtocolStateMachine newElement = UMLFactory.eINSTANCE.createProtocolStateMachine();
-
EObject target = getElementToEdit();
ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
if(data.isPermitted()) {
@@ -88,20 +83,14 @@ public class ProtocolStateMachineCompositeCreateCommandCN extends EditElementCom if(!data.execute(target, newElement))
return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
} else {
-
Class qualifiedTarget = (Class)target;
qualifiedTarget.getNestedClassifiers().add(newElement);
-
}
} else {
return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
}
-
-
ElementInitializers.getInstance().init_ProtocolStateMachine_3074(newElement);
-
doConfigure(newElement, monitor, info);
-
((CreateElementRequest)getRequest()).setNewElement(newElement);
return CommandResult.newOKCommandResult(newElement);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/RealizationCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/RealizationCreateCommand.java index 795052818ae..14dba986267 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/RealizationCreateCommand.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/RealizationCreateCommand.java @@ -89,7 +89,6 @@ public class RealizationCreateCommand extends EditElementCommand { if(!canExecute()) {
throw new ExecutionException("Invalid arguments in create link command"); //$NON-NLS-1$
}
-
Realization newElement = UMLFactory.eINSTANCE.createRealization();
getContainer().getPackagedElements().add(newElement);
newElement.getClients().add(getSource());
@@ -98,7 +97,6 @@ public class RealizationCreateCommand extends EditElementCommand { doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
return CommandResult.newOKCommandResult(newElement);
-
}
/**
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/RepresentationCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/RepresentationCreateCommand.java index eac58c4fff7..55e883db8d3 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/RepresentationCreateCommand.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/RepresentationCreateCommand.java @@ -73,12 +73,10 @@ public class RepresentationCreateCommand extends EditElementCommand { if(!canExecute()) {
throw new ExecutionException("Invalid arguments in create link command"); //$NON-NLS-1$
}
-
if(getSource() != null && getTarget() != null) {
getSource().getRepresenteds().add(getTarget());
}
return CommandResult.newOKCommandResult();
-
}
/**
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/RoleBindingCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/RoleBindingCreateCommand.java index 0e41fea863f..6482c92ac20 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/RoleBindingCreateCommand.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/RoleBindingCreateCommand.java @@ -88,7 +88,6 @@ public class RoleBindingCreateCommand extends EditElementCommand { if(!canExecute()) {
throw new ExecutionException("Invalid arguments in create link command"); //$NON-NLS-1$
}
-
Dependency newElement = UMLFactory.eINSTANCE.createDependency();
getContainer().getPackagedElements().add(newElement);
newElement.getClients().add(getSource());
@@ -96,7 +95,6 @@ public class RoleBindingCreateCommand extends EditElementCommand { doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
return CommandResult.newOKCommandResult(newElement);
-
}
/**
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/SignalCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/SignalCreateCommand.java index 5f031e807d4..e2589336e33 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/SignalCreateCommand.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/SignalCreateCommand.java @@ -66,21 +66,16 @@ public class SignalCreateCommand extends EditElementCommand { * @generated
*/
public boolean canExecute() {
-
EObject target = getElementToEdit();
ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getSignal());
return data.isPermitted();
-
-
}
/**
* @generated
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
-
Signal newElement = UMLFactory.eINSTANCE.createSignal();
-
EObject target = getElementToEdit();
ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
if(data.isPermitted()) {
@@ -88,20 +83,14 @@ public class SignalCreateCommand extends EditElementCommand { if(!data.execute(target, newElement))
return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
} else {
-
Package qualifiedTarget = (Package)target;
qualifiedTarget.getPackagedElements().add(newElement);
-
}
} else {
return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
}
-
-
ElementInitializers.getInstance().init_Signal_2081(newElement);
-
doConfigure(newElement, monitor, info);
-
((CreateElementRequest)getRequest()).setNewElement(newElement);
return CommandResult.newOKCommandResult(newElement);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/SignalCreateCommandCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/SignalCreateCommandCN.java index da3eea2b05d..eab03b94c06 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/SignalCreateCommandCN.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/SignalCreateCommandCN.java @@ -66,21 +66,16 @@ public class SignalCreateCommandCN extends EditElementCommand { * @generated
*/
public boolean canExecute() {
-
EObject target = getElementToEdit();
ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getSignal());
return data.isPermitted();
-
-
}
/**
* @generated
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
-
Signal newElement = UMLFactory.eINSTANCE.createSignal();
-
EObject target = getElementToEdit();
ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
if(data.isPermitted()) {
@@ -88,20 +83,14 @@ public class SignalCreateCommandCN extends EditElementCommand { if(!data.execute(target, newElement))
return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
} else {
-
Class qualifiedTarget = (Class)target;
qualifiedTarget.getNestedClassifiers().add(newElement);
-
}
} else {
return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
}
-
-
ElementInitializers.getInstance().init_Signal_3095(newElement);
-
doConfigure(newElement, monitor, info);
-
((CreateElementRequest)getRequest()).setNewElement(newElement);
return CommandResult.newOKCommandResult(newElement);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/SignalEventCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/SignalEventCreateCommand.java index 8d172181d1f..91b0f5e7b89 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/SignalEventCreateCommand.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/SignalEventCreateCommand.java @@ -66,21 +66,16 @@ public class SignalEventCreateCommand extends EditElementCommand { * @generated
*/
public boolean canExecute() {
-
EObject target = getElementToEdit();
ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getSignalEvent());
return data.isPermitted();
-
-
}
/**
* @generated
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
-
SignalEvent newElement = UMLFactory.eINSTANCE.createSignalEvent();
-
EObject target = getElementToEdit();
ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
if(data.isPermitted()) {
@@ -88,20 +83,14 @@ public class SignalEventCreateCommand extends EditElementCommand { if(!data.execute(target, newElement))
return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
} else {
-
Package qualifiedTarget = (Package)target;
qualifiedTarget.getPackagedElements().add(newElement);
-
}
} else {
return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
}
-
-
ElementInitializers.getInstance().init_SignalEvent_2083(newElement);
-
doConfigure(newElement, monitor, info);
-
((CreateElementRequest)getRequest()).setNewElement(newElement);
return CommandResult.newOKCommandResult(newElement);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/StateMachineCompositeCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/StateMachineCompositeCreateCommand.java index b24558d754a..c990b051c1a 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/StateMachineCompositeCreateCommand.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/StateMachineCompositeCreateCommand.java @@ -66,21 +66,16 @@ public class StateMachineCompositeCreateCommand extends EditElementCommand { * @generated
*/
public boolean canExecute() {
-
EObject target = getElementToEdit();
ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getStateMachine());
return data.isPermitted();
-
-
}
/**
* @generated
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
-
StateMachine newElement = UMLFactory.eINSTANCE.createStateMachine();
-
EObject target = getElementToEdit();
ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
if(data.isPermitted()) {
@@ -88,20 +83,14 @@ public class StateMachineCompositeCreateCommand extends EditElementCommand { if(!data.execute(target, newElement))
return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
} else {
-
Package qualifiedTarget = (Package)target;
qualifiedTarget.getPackagedElements().add(newElement);
-
}
} else {
return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
}
-
-
ElementInitializers.getInstance().init_StateMachine_2063(newElement);
-
doConfigure(newElement, monitor, info);
-
((CreateElementRequest)getRequest()).setNewElement(newElement);
return CommandResult.newOKCommandResult(newElement);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/StateMachineCompositeCreateCommandCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/StateMachineCompositeCreateCommandCN.java index 4861d167c71..ee8e3091acb 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/StateMachineCompositeCreateCommandCN.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/StateMachineCompositeCreateCommandCN.java @@ -66,21 +66,16 @@ public class StateMachineCompositeCreateCommandCN extends EditElementCommand { * @generated
*/
public boolean canExecute() {
-
EObject target = getElementToEdit();
ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getStateMachine());
return data.isPermitted();
-
-
}
/**
* @generated
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
-
StateMachine newElement = UMLFactory.eINSTANCE.createStateMachine();
-
EObject target = getElementToEdit();
ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
if(data.isPermitted()) {
@@ -88,20 +83,14 @@ public class StateMachineCompositeCreateCommandCN extends EditElementCommand { if(!data.execute(target, newElement))
return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
} else {
-
Class qualifiedTarget = (Class)target;
qualifiedTarget.getNestedClassifiers().add(newElement);
-
}
} else {
return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
}
-
-
ElementInitializers.getInstance().init_StateMachine_3075(newElement);
-
doConfigure(newElement, monitor, info);
-
((CreateElementRequest)getRequest()).setNewElement(newElement);
return CommandResult.newOKCommandResult(newElement);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/StringExpressionCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/StringExpressionCreateCommand.java index eabd0304179..c42d11686e4 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/StringExpressionCreateCommand.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/StringExpressionCreateCommand.java @@ -66,21 +66,16 @@ public class StringExpressionCreateCommand extends EditElementCommand { * @generated
*/
public boolean canExecute() {
-
EObject target = getElementToEdit();
ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getStringExpression());
return data.isPermitted();
-
-
}
/**
* @generated
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
-
StringExpression newElement = UMLFactory.eINSTANCE.createStringExpression();
-
EObject target = getElementToEdit();
ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
if(data.isPermitted()) {
@@ -88,20 +83,14 @@ public class StringExpressionCreateCommand extends EditElementCommand { if(!data.execute(target, newElement))
return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
} else {
-
Package qualifiedTarget = (Package)target;
qualifiedTarget.getPackagedElements().add(newElement);
-
}
} else {
return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
}
-
-
ElementInitializers.getInstance().init_StringExpression_2100(newElement);
-
doConfigure(newElement, monitor, info);
-
((CreateElementRequest)getRequest()).setNewElement(newElement);
return CommandResult.newOKCommandResult(newElement);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/SubstitutionCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/SubstitutionCreateCommand.java index e20a913a324..e081ab0f1a6 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/SubstitutionCreateCommand.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/SubstitutionCreateCommand.java @@ -89,7 +89,6 @@ public class SubstitutionCreateCommand extends EditElementCommand { if(!canExecute()) {
throw new ExecutionException("Invalid arguments in create link command"); //$NON-NLS-1$
}
-
Substitution newElement = UMLFactory.eINSTANCE.createSubstitution();
getContainer().getPackagedElements().add(newElement);
newElement.getClients().add(getSource());
@@ -98,7 +97,6 @@ public class SubstitutionCreateCommand extends EditElementCommand { doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
return CommandResult.newOKCommandResult(newElement);
-
}
/**
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/TimeConstraintCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/TimeConstraintCreateCommand.java index 24e230f4483..8a2fb5f7144 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/TimeConstraintCreateCommand.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/TimeConstraintCreateCommand.java @@ -66,21 +66,16 @@ public class TimeConstraintCreateCommand extends EditElementCommand { * @generated
*/
public boolean canExecute() {
-
EObject target = getElementToEdit();
ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getTimeConstraint());
return data.isPermitted();
-
-
}
/**
* @generated
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
-
TimeConstraint newElement = UMLFactory.eINSTANCE.createTimeConstraint();
-
EObject target = getElementToEdit();
ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
if(data.isPermitted()) {
@@ -88,20 +83,14 @@ public class TimeConstraintCreateCommand extends EditElementCommand { if(!data.execute(target, newElement))
return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
} else {
-
Namespace qualifiedTarget = (Namespace)target;
qualifiedTarget.getOwnedRules().add(newElement);
-
}
} else {
return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
}
-
-
ElementInitializers.getInstance().init_TimeConstraint_2111(newElement);
-
doConfigure(newElement, monitor, info);
-
((CreateElementRequest)getRequest()).setNewElement(newElement);
return CommandResult.newOKCommandResult(newElement);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/TimeConstraintCreateCommandCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/TimeConstraintCreateCommandCN.java index 70598351e02..3add20b1155 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/TimeConstraintCreateCommandCN.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/TimeConstraintCreateCommandCN.java @@ -66,21 +66,16 @@ public class TimeConstraintCreateCommandCN extends EditElementCommand { * @generated
*/
public boolean canExecute() {
-
EObject target = getElementToEdit();
ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getTimeConstraint());
return data.isPermitted();
-
-
}
/**
* @generated
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
-
TimeConstraint newElement = UMLFactory.eINSTANCE.createTimeConstraint();
-
EObject target = getElementToEdit();
ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
if(data.isPermitted()) {
@@ -88,20 +83,14 @@ public class TimeConstraintCreateCommandCN extends EditElementCommand { if(!data.execute(target, newElement))
return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
} else {
-
Namespace qualifiedTarget = (Namespace)target;
qualifiedTarget.getOwnedRules().add(newElement);
-
}
} else {
return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
}
-
-
ElementInitializers.getInstance().init_TimeConstraint_3117(newElement);
-
doConfigure(newElement, monitor, info);
-
((CreateElementRequest)getRequest()).setNewElement(newElement);
return CommandResult.newOKCommandResult(newElement);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/TimeEventCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/TimeEventCreateCommand.java index ab6e813086d..b74d8b5cab9 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/TimeEventCreateCommand.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/TimeEventCreateCommand.java @@ -66,21 +66,16 @@ public class TimeEventCreateCommand extends EditElementCommand { * @generated
*/
public boolean canExecute() {
-
EObject target = getElementToEdit();
ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getTimeEvent());
return data.isPermitted();
-
-
}
/**
* @generated
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
-
TimeEvent newElement = UMLFactory.eINSTANCE.createTimeEvent();
-
EObject target = getElementToEdit();
ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
if(data.isPermitted()) {
@@ -88,20 +83,14 @@ public class TimeEventCreateCommand extends EditElementCommand { if(!data.execute(target, newElement))
return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
} else {
-
Package qualifiedTarget = (Package)target;
qualifiedTarget.getPackagedElements().add(newElement);
-
}
} else {
return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
}
-
-
ElementInitializers.getInstance().init_TimeEvent_2089(newElement);
-
doConfigure(newElement, monitor, info);
-
((CreateElementRequest)getRequest()).setNewElement(newElement);
return CommandResult.newOKCommandResult(newElement);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/TimeExpressionCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/TimeExpressionCreateCommand.java index 4bd608e6283..254cb367d71 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/TimeExpressionCreateCommand.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/TimeExpressionCreateCommand.java @@ -66,21 +66,16 @@ public class TimeExpressionCreateCommand extends EditElementCommand { * @generated
*/
public boolean canExecute() {
-
EObject target = getElementToEdit();
ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getTimeExpression());
return data.isPermitted();
-
-
}
/**
* @generated
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
-
TimeExpression newElement = UMLFactory.eINSTANCE.createTimeExpression();
-
EObject target = getElementToEdit();
ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
if(data.isPermitted()) {
@@ -88,20 +83,14 @@ public class TimeExpressionCreateCommand extends EditElementCommand { if(!data.execute(target, newElement))
return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
} else {
-
Package qualifiedTarget = (Package)target;
qualifiedTarget.getPackagedElements().add(newElement);
-
}
} else {
return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
}
-
-
ElementInitializers.getInstance().init_TimeExpression_2102(newElement);
-
doConfigure(newElement, monitor, info);
-
((CreateElementRequest)getRequest()).setNewElement(newElement);
return CommandResult.newOKCommandResult(newElement);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/TimeIntervalCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/TimeIntervalCreateCommand.java index 57a3ebfbdfc..453b5597daf 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/TimeIntervalCreateCommand.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/TimeIntervalCreateCommand.java @@ -66,21 +66,16 @@ public class TimeIntervalCreateCommand extends EditElementCommand { * @generated
*/
public boolean canExecute() {
-
EObject target = getElementToEdit();
ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getTimeInterval());
return data.isPermitted();
-
-
}
/**
* @generated
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
-
TimeInterval newElement = UMLFactory.eINSTANCE.createTimeInterval();
-
EObject target = getElementToEdit();
ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
if(data.isPermitted()) {
@@ -88,20 +83,14 @@ public class TimeIntervalCreateCommand extends EditElementCommand { if(!data.execute(target, newElement))
return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
} else {
-
Package qualifiedTarget = (Package)target;
qualifiedTarget.getPackagedElements().add(newElement);
-
}
} else {
return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
}
-
-
ElementInitializers.getInstance().init_TimeInterval_2105(newElement);
-
doConfigure(newElement, monitor, info);
-
((CreateElementRequest)getRequest()).setNewElement(newElement);
return CommandResult.newOKCommandResult(newElement);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/TimeObservationCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/TimeObservationCreateCommand.java index 77d402ae2eb..ad3c0f95e8e 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/TimeObservationCreateCommand.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/TimeObservationCreateCommand.java @@ -66,21 +66,16 @@ public class TimeObservationCreateCommand extends EditElementCommand { * @generated
*/
public boolean canExecute() {
-
EObject target = getElementToEdit();
ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getTimeObservation());
return data.isPermitted();
-
-
}
/**
* @generated
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
-
TimeObservation newElement = UMLFactory.eINSTANCE.createTimeObservation();
-
EObject target = getElementToEdit();
ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
if(data.isPermitted()) {
@@ -88,20 +83,14 @@ public class TimeObservationCreateCommand extends EditElementCommand { if(!data.execute(target, newElement))
return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
} else {
-
Package qualifiedTarget = (Package)target;
qualifiedTarget.getPackagedElements().add(newElement);
-
}
} else {
return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
}
-
-
ElementInitializers.getInstance().init_TimeObservation_2094(newElement);
-
doConfigure(newElement, monitor, info);
-
((CreateElementRequest)getRequest()).setNewElement(newElement);
return CommandResult.newOKCommandResult(newElement);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/TimeObservationEventCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/TimeObservationEventCreateCommand.java index 5677622dbf7..2db84e07c1a 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/TimeObservationEventCreateCommand.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/TimeObservationEventCreateCommand.java @@ -73,12 +73,10 @@ public class TimeObservationEventCreateCommand extends EditElementCommand { if(!canExecute()) {
throw new ExecutionException("Invalid arguments in create link command"); //$NON-NLS-1$
}
-
if(getSource() != null && getTarget() != null) {
getSource().setEvent(getTarget());
}
return CommandResult.newOKCommandResult();
-
}
/**
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/UsageCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/UsageCreateCommand.java index 021c8bde36b..8223320aeb6 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/UsageCreateCommand.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/UsageCreateCommand.java @@ -89,7 +89,6 @@ public class UsageCreateCommand extends EditElementCommand { if(!canExecute()) {
throw new ExecutionException("Invalid arguments in create link command"); //$NON-NLS-1$
}
-
Usage newElement = UMLFactory.eINSTANCE.createUsage();
getContainer().getPackagedElements().add(newElement);
newElement.getClients().add(getSource());
@@ -98,7 +97,6 @@ public class UsageCreateCommand extends EditElementCommand { doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
return CommandResult.newOKCommandResult(newElement);
-
}
/**
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/UseCaseCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/UseCaseCreateCommand.java index b1cf5ef79fb..fc54d8f8382 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/UseCaseCreateCommand.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/UseCaseCreateCommand.java @@ -66,21 +66,16 @@ public class UseCaseCreateCommand extends EditElementCommand { * @generated
*/
public boolean canExecute() {
-
EObject target = getElementToEdit();
ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getUseCase());
return data.isPermitted();
-
-
}
/**
* @generated
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
-
UseCase newElement = UMLFactory.eINSTANCE.createUseCase();
-
EObject target = getElementToEdit();
ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
if(data.isPermitted()) {
@@ -88,20 +83,14 @@ public class UseCaseCreateCommand extends EditElementCommand { if(!data.execute(target, newElement))
return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
} else {
-
Package qualifiedTarget = (Package)target;
qualifiedTarget.getPackagedElements().add(newElement);
-
}
} else {
return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
}
-
-
ElementInitializers.getInstance().init_UseCase_2082(newElement);
-
doConfigure(newElement, monitor, info);
-
((CreateElementRequest)getRequest()).setNewElement(newElement);
return CommandResult.newOKCommandResult(newElement);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/UseCaseCreateCommandCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/UseCaseCreateCommandCN.java index 2f95f6d2058..cf21e3e4fe3 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/UseCaseCreateCommandCN.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/UseCaseCreateCommandCN.java @@ -66,21 +66,16 @@ public class UseCaseCreateCommandCN extends EditElementCommand { * @generated
*/
public boolean canExecute() {
-
EObject target = getElementToEdit();
ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getUseCase());
return data.isPermitted();
-
-
}
/**
* @generated
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
-
UseCase newElement = UMLFactory.eINSTANCE.createUseCase();
-
EObject target = getElementToEdit();
ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
if(data.isPermitted()) {
@@ -88,20 +83,14 @@ public class UseCaseCreateCommandCN extends EditElementCommand { if(!data.execute(target, newElement))
return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
} else {
-
Class qualifiedTarget = (Class)target;
qualifiedTarget.getNestedClassifiers().add(newElement);
-
}
} else {
return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
}
-
-
ElementInitializers.getInstance().init_UseCase_3096(newElement);
-
doConfigure(newElement, monitor, info);
-
((CreateElementRequest)getRequest()).setNewElement(newElement);
return CommandResult.newOKCommandResult(newElement);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/AbstractionAppliedStereotypeEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/AbstractionAppliedStereotypeEditPart.java index bf3de87b055..9cc55d99abf 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/AbstractionAppliedStereotypeEditPart.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/AbstractionAppliedStereotypeEditPart.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 AbstractionAppliedStereotypeEditPart extends PapyrusLabelEditPart i ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -406,9 +406,7 @@ public class AbstractionAppliedStereotypeEditPart extends PapyrusLabelEditPart i * @generated
*/
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
@@ -441,7 +439,6 @@ public class AbstractionAppliedStereotypeEditPart extends PapyrusLabelEditPart i 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 AbstractionAppliedStereotypeEditPart extends PapyrusLabelEditPart i @Override
protected void doExecute() {
configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
-
}
};
domain.getCommandStack().execute(command);
@@ -506,8 +502,17 @@ public class AbstractionAppliedStereotypeEditPart extends PapyrusLabelEditPart i 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 AbstractionAppliedStereotypeEditPart extends PapyrusLabelEditPart i }
}
}
-
super.handleNotificationEvent(event);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/AbstractionNameEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/AbstractionNameEditPart.java index ec8dae93497..99edb614b3c 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/AbstractionNameEditPart.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/AbstractionNameEditPart.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 AbstractionNameEditPart extends PapyrusLabelEditPart implements ITe ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -406,9 +406,7 @@ public class AbstractionNameEditPart extends PapyrusLabelEditPart implements ITe * @generated
*/
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
@@ -441,7 +439,6 @@ public class AbstractionNameEditPart extends PapyrusLabelEditPart implements ITe 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 AbstractionNameEditPart extends PapyrusLabelEditPart implements ITe @Override
protected void doExecute() {
configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
-
}
};
domain.getCommandStack().execute(command);
@@ -506,8 +502,17 @@ public class AbstractionNameEditPart extends PapyrusLabelEditPart implements ITe 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) {
@@ -628,7 +633,6 @@ public class AbstractionNameEditPart extends PapyrusLabelEditPart implements ITe if(checkDefaultEdition()) {
return IDirectEdition.DEFAULT_DIRECT_EDITOR;
}
-
// not a named element. no specific editor => do nothing
return IDirectEdition.NO_DIRECT_EDITION;
}
@@ -746,7 +750,6 @@ public class AbstractionNameEditPart extends PapyrusLabelEditPart implements ITe }
}
}
-
super.handleNotificationEvent(event);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ActivityCompositeCompartmentEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ActivityCompositeCompartmentEditPart.java index 7f09c5d8868..d0408924260 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ActivityCompositeCompartmentEditPart.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ActivityCompositeCompartmentEditPart.java @@ -88,7 +88,6 @@ public class ActivityCompositeCompartmentEditPart extends ShapeCompartmentEditPa * @generated
*/
public EditPart getTargetEditPart(Request request) {
-
return super.getTargetEditPart(request);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ActivityCompositeCompartmentEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ActivityCompositeCompartmentEditPartCN.java index a459a1913ce..64d3938b57e 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ActivityCompositeCompartmentEditPartCN.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ActivityCompositeCompartmentEditPartCN.java @@ -88,7 +88,6 @@ public class ActivityCompositeCompartmentEditPartCN extends ShapeCompartmentEdit * @generated
*/
public EditPart getTargetEditPart(Request request) {
-
return super.getTargetEditPart(request);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ActivityCompositeEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ActivityCompositeEditPart.java index f7928409a73..73ab3e04bc2 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ActivityCompositeEditPart.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ActivityCompositeEditPart.java @@ -30,6 +30,7 @@ import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout; import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure;
import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IPapyrusNodeFigure;
import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.SelectableBorderedNodeFigure;
import org.eclipse.papyrus.uml.diagram.common.editparts.NamedElementEditPart;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.AffixedNodeAlignmentEditPolicy;
@@ -135,7 +136,6 @@ public class ActivityCompositeEditPart extends NamedElementEditPart { **/
protected void handleNotificationEvent(Notification event) {
super.handleNotificationEvent(event);
-
}
/**
@@ -162,35 +162,24 @@ public class ActivityCompositeEditPart extends NamedElementEditPart { ((ActivityCompositeNameEditPart)childEditPart).setLabel(getPrimaryShape().getNameLabel());
return true;
}
-
-
if(childEditPart instanceof ActivityCompositeCompartmentEditPart) {
IFigure pane = getPrimaryShape().getCompositeCompartmentFigure();
setupContentPane(pane); // FIXME each comparment should handle his content pane in his own way
pane.add(((ActivityCompositeCompartmentEditPart)childEditPart).getFigure());
return true;
}
-
-
-
//Papyrus Gencode :Affixed Port locator
if(childEditPart instanceof PortEditPart) {
IBorderItemLocator locator = new PortPositionLocator(getMainFigure(), PositionConstants.NONE);
getBorderedFigure().getBorderItemContainer().add(((PortEditPart)childEditPart).getFigure(), locator);
return true;
}
-
-
-
-
//Papyrus Gencode :Affixed Port locator
if(childEditPart instanceof ParameterEditPart) {
IBorderItemLocator locator = new PortPositionLocator(getMainFigure(), PositionConstants.NONE);
getBorderedFigure().getBorderItemContainer().add(((ParameterEditPart)childEditPart).getFigure(), locator);
return true;
}
-
-
return false;
}
@@ -268,7 +257,6 @@ public class ActivityCompositeEditPart extends NamedElementEditPart { */
protected NodeFigure createMainFigure() {
return new SelectableBorderedNodeFigure(createMainFigureWithSVG());
-
}
/**
@@ -318,8 +306,8 @@ public class ActivityCompositeEditPart extends NamedElementEditPart { * @generated
*/
protected void setLineType(int style) {
- if(primaryShape instanceof NodeFigure) {
- ((NodeFigure)primaryShape).setLineStyle(style);
+ if(primaryShape instanceof IPapyrusNodeFigure) {
+ ((IPapyrusNodeFigure)primaryShape).setLineStyle(style);
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ActivityCompositeEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ActivityCompositeEditPartCN.java index fdfa79b12a2..07f9e5ae1e6 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ActivityCompositeEditPartCN.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ActivityCompositeEditPartCN.java @@ -30,6 +30,7 @@ import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout; import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure;
import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IPapyrusNodeFigure;
import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.SelectableBorderedNodeFigure;
import org.eclipse.papyrus.uml.diagram.common.editparts.NamedElementEditPart;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.AffixedNodeAlignmentEditPolicy;
@@ -135,7 +136,6 @@ public class ActivityCompositeEditPartCN extends NamedElementEditPart { **/
protected void handleNotificationEvent(Notification event) {
super.handleNotificationEvent(event);
-
}
/**
@@ -162,35 +162,24 @@ public class ActivityCompositeEditPartCN extends NamedElementEditPart { ((ActivityCompositeNameEditPartCN)childEditPart).setLabel(getPrimaryShape().getNameLabel());
return true;
}
-
-
if(childEditPart instanceof ActivityCompositeCompartmentEditPartCN) {
IFigure pane = getPrimaryShape().getCompositeCompartmentFigure();
setupContentPane(pane); // FIXME each comparment should handle his content pane in his own way
pane.add(((ActivityCompositeCompartmentEditPartCN)childEditPart).getFigure());
return true;
}
-
-
-
//Papyrus Gencode :Affixed Port locator
if(childEditPart instanceof PortEditPart) {
IBorderItemLocator locator = new PortPositionLocator(getMainFigure(), PositionConstants.NONE);
getBorderedFigure().getBorderItemContainer().add(((PortEditPart)childEditPart).getFigure(), locator);
return true;
}
-
-
-
-
//Papyrus Gencode :Affixed Port locator
if(childEditPart instanceof ParameterEditPart) {
IBorderItemLocator locator = new PortPositionLocator(getMainFigure(), PositionConstants.NONE);
getBorderedFigure().getBorderItemContainer().add(((ParameterEditPart)childEditPart).getFigure(), locator);
return true;
}
-
-
return false;
}
@@ -268,7 +257,6 @@ public class ActivityCompositeEditPartCN extends NamedElementEditPart { */
protected NodeFigure createMainFigure() {
return new SelectableBorderedNodeFigure(createMainFigureWithSVG());
-
}
/**
@@ -318,8 +306,8 @@ public class ActivityCompositeEditPartCN extends NamedElementEditPart { * @generated
*/
protected void setLineType(int style) {
- if(primaryShape instanceof NodeFigure) {
- ((NodeFigure)primaryShape).setLineStyle(style);
+ if(primaryShape instanceof IPapyrusNodeFigure) {
+ ((IPapyrusNodeFigure)primaryShape).setLineStyle(style);
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ActivityCompositeNameEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ActivityCompositeNameEditPart.java index b7cfa3ea6f0..30617a27e98 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ActivityCompositeNameEditPart.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ActivityCompositeNameEditPart.java @@ -64,6 +64,7 @@ import org.eclipse.papyrus.infra.emf.appearance.helper.VisualInformationPapyrusC import org.eclipse.papyrus.infra.gmfdiag.common.editpart.IControlParserForDirectEdit;
import org.eclipse.papyrus.infra.gmfdiag.common.editpart.PapyrusCompartmentEditPart;
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;
@@ -320,7 +321,6 @@ public class ActivityCompositeNameEditPart extends PapyrusCompartmentEditPart im ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -407,9 +407,7 @@ public class ActivityCompositeNameEditPart extends PapyrusCompartmentEditPart im * @generated
*/
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
@@ -442,7 +440,6 @@ public class ActivityCompositeNameEditPart extends PapyrusCompartmentEditPart im return;
}
final Dialog finalDialog = dialog;
-
if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@@ -450,7 +447,6 @@ public class ActivityCompositeNameEditPart extends PapyrusCompartmentEditPart im @Override
protected void doExecute() {
configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
-
}
};
domain.getCommandStack().execute(command);
@@ -507,8 +503,17 @@ public class ActivityCompositeNameEditPart extends PapyrusCompartmentEditPart im 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) {
@@ -629,7 +634,6 @@ public class ActivityCompositeNameEditPart extends PapyrusCompartmentEditPart im if(checkDefaultEdition()) {
return IDirectEdition.DEFAULT_DIRECT_EDITOR;
}
-
// not a named element. no specific editor => do nothing
return IDirectEdition.NO_DIRECT_EDITION;
}
@@ -796,7 +800,6 @@ public class ActivityCompositeNameEditPart extends PapyrusCompartmentEditPart im */
protected void addOwnerElementListeners() {
addListenerFilter(ADD_PARENT_MODEL, this, ((View)getParent().getModel())); //$NON-NLS-1$
-
}
/**
@@ -805,7 +808,6 @@ public class ActivityCompositeNameEditPart extends PapyrusCompartmentEditPart im public void deactivate() {
removeOwnerElementListeners();
super.deactivate();
-
}
/**
@@ -813,6 +815,5 @@ public class ActivityCompositeNameEditPart extends PapyrusCompartmentEditPart im */
protected void removeOwnerElementListeners() {
removeListenerFilter(ADD_PARENT_MODEL);
-
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ActivityCompositeNameEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ActivityCompositeNameEditPartCN.java index 9b2c280e66e..f2c0bcacf35 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ActivityCompositeNameEditPartCN.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ActivityCompositeNameEditPartCN.java @@ -64,6 +64,7 @@ import org.eclipse.papyrus.infra.emf.appearance.helper.VisualInformationPapyrusC import org.eclipse.papyrus.infra.gmfdiag.common.editpart.IControlParserForDirectEdit;
import org.eclipse.papyrus.infra.gmfdiag.common.editpart.PapyrusCompartmentEditPart;
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;
@@ -320,7 +321,6 @@ public class ActivityCompositeNameEditPartCN extends PapyrusCompartmentEditPart ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -407,9 +407,7 @@ public class ActivityCompositeNameEditPartCN extends PapyrusCompartmentEditPart * @generated
*/
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
@@ -442,7 +440,6 @@ public class ActivityCompositeNameEditPartCN extends PapyrusCompartmentEditPart return;
}
final Dialog finalDialog = dialog;
-
if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@@ -450,7 +447,6 @@ public class ActivityCompositeNameEditPartCN extends PapyrusCompartmentEditPart @Override
protected void doExecute() {
configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
-
}
};
domain.getCommandStack().execute(command);
@@ -507,8 +503,17 @@ public class ActivityCompositeNameEditPartCN extends PapyrusCompartmentEditPart 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) {
@@ -629,7 +634,6 @@ public class ActivityCompositeNameEditPartCN extends PapyrusCompartmentEditPart if(checkDefaultEdition()) {
return IDirectEdition.DEFAULT_DIRECT_EDITOR;
}
-
// not a named element. no specific editor => do nothing
return IDirectEdition.NO_DIRECT_EDITION;
}
@@ -796,7 +800,6 @@ public class ActivityCompositeNameEditPartCN extends PapyrusCompartmentEditPart */
protected void addOwnerElementListeners() {
addListenerFilter(ADD_PARENT_MODEL, this, ((View)getParent().getModel())); //$NON-NLS-1$
-
}
/**
@@ -805,7 +808,6 @@ public class ActivityCompositeNameEditPartCN extends PapyrusCompartmentEditPart public void deactivate() {
removeOwnerElementListeners();
super.deactivate();
-
}
/**
@@ -813,6 +815,5 @@ public class ActivityCompositeNameEditPartCN extends PapyrusCompartmentEditPart */
protected void removeOwnerElementListeners() {
removeListenerFilter(ADD_PARENT_MODEL);
-
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ActorEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ActorEditPart.java index 3acf0efe8a5..19d3e347b56 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ActorEditPart.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ActorEditPart.java @@ -26,6 +26,7 @@ import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure; import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
import org.eclipse.gmf.runtime.notation.View;
import org.eclipse.papyrus.infra.gmfdiag.common.editpart.NodeEditPart;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IPapyrusNodeFigure;
import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.SelectableBorderedNodeFigure;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy;
@@ -126,8 +127,6 @@ public class ActorEditPart extends NodeEditPart { ((ActorNameEditPart)childEditPart).setLabel(getPrimaryShape().getNameLabel());
return true;
}
-
-
return false;
}
@@ -186,7 +185,6 @@ public class ActorEditPart extends NodeEditPart { */
protected NodeFigure createNodeFigure() {
return new SelectableBorderedNodeFigure(createMainFigureWithSVG());
-
}
/**
@@ -236,8 +234,8 @@ public class ActorEditPart extends NodeEditPart { * @generated
*/
protected void setLineType(int style) {
- if(primaryShape instanceof NodeFigure) {
- ((NodeFigure)primaryShape).setLineStyle(style);
+ if(primaryShape instanceof IPapyrusNodeFigure) {
+ ((IPapyrusNodeFigure)primaryShape).setLineStyle(style);
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ActorEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ActorEditPartCN.java index 3407815d3e7..33e67fc2367 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ActorEditPartCN.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ActorEditPartCN.java @@ -26,6 +26,7 @@ import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure; import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
import org.eclipse.gmf.runtime.notation.View;
import org.eclipse.papyrus.infra.gmfdiag.common.editpart.NodeEditPart;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IPapyrusNodeFigure;
import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.SelectableBorderedNodeFigure;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy;
@@ -126,8 +127,6 @@ public class ActorEditPartCN extends NodeEditPart { ((ActorNameEditPartCN)childEditPart).setLabel(getPrimaryShape().getNameLabel());
return true;
}
-
-
return false;
}
@@ -186,7 +185,6 @@ public class ActorEditPartCN extends NodeEditPart { */
protected NodeFigure createNodeFigure() {
return new SelectableBorderedNodeFigure(createMainFigureWithSVG());
-
}
/**
@@ -236,8 +234,8 @@ public class ActorEditPartCN extends NodeEditPart { * @generated
*/
protected void setLineType(int style) {
- if(primaryShape instanceof NodeFigure) {
- ((NodeFigure)primaryShape).setLineStyle(style);
+ if(primaryShape instanceof IPapyrusNodeFigure) {
+ ((IPapyrusNodeFigure)primaryShape).setLineStyle(style);
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ActorNameEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ActorNameEditPart.java index 26fd446fcf7..15f23d42373 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ActorNameEditPart.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ActorNameEditPart.java @@ -64,6 +64,7 @@ import org.eclipse.papyrus.infra.emf.appearance.helper.VisualInformationPapyrusC import org.eclipse.papyrus.infra.gmfdiag.common.editpart.IControlParserForDirectEdit;
import org.eclipse.papyrus.infra.gmfdiag.common.editpart.PapyrusCompartmentEditPart;
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;
@@ -320,7 +321,6 @@ public class ActorNameEditPart extends PapyrusCompartmentEditPart implements ITe ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -407,9 +407,7 @@ public class ActorNameEditPart extends PapyrusCompartmentEditPart implements ITe * @generated
*/
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
@@ -442,7 +440,6 @@ public class ActorNameEditPart extends PapyrusCompartmentEditPart implements ITe return;
}
final Dialog finalDialog = dialog;
-
if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@@ -450,7 +447,6 @@ public class ActorNameEditPart extends PapyrusCompartmentEditPart implements ITe @Override
protected void doExecute() {
configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
-
}
};
domain.getCommandStack().execute(command);
@@ -507,8 +503,17 @@ public class ActorNameEditPart extends PapyrusCompartmentEditPart implements ITe 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) {
@@ -629,7 +634,6 @@ public class ActorNameEditPart extends PapyrusCompartmentEditPart implements ITe if(checkDefaultEdition()) {
return IDirectEdition.DEFAULT_DIRECT_EDITOR;
}
-
// not a named element. no specific editor => do nothing
return IDirectEdition.NO_DIRECT_EDITION;
}
@@ -796,7 +800,6 @@ public class ActorNameEditPart extends PapyrusCompartmentEditPart implements ITe */
protected void addOwnerElementListeners() {
addListenerFilter(ADD_PARENT_MODEL, this, ((View)getParent().getModel())); //$NON-NLS-1$
-
}
/**
@@ -805,7 +808,6 @@ public class ActorNameEditPart extends PapyrusCompartmentEditPart implements ITe public void deactivate() {
removeOwnerElementListeners();
super.deactivate();
-
}
/**
@@ -813,6 +815,5 @@ public class ActorNameEditPart extends PapyrusCompartmentEditPart implements ITe */
protected void removeOwnerElementListeners() {
removeListenerFilter(ADD_PARENT_MODEL);
-
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ActorNameEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ActorNameEditPartCN.java index 78b056563ef..0f1dc013d29 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ActorNameEditPartCN.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ActorNameEditPartCN.java @@ -64,6 +64,7 @@ import org.eclipse.papyrus.infra.emf.appearance.helper.VisualInformationPapyrusC import org.eclipse.papyrus.infra.gmfdiag.common.editpart.IControlParserForDirectEdit;
import org.eclipse.papyrus.infra.gmfdiag.common.editpart.PapyrusCompartmentEditPart;
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;
@@ -320,7 +321,6 @@ public class ActorNameEditPartCN extends PapyrusCompartmentEditPart implements I ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -407,9 +407,7 @@ public class ActorNameEditPartCN extends PapyrusCompartmentEditPart implements I * @generated
*/
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
@@ -442,7 +440,6 @@ public class ActorNameEditPartCN extends PapyrusCompartmentEditPart implements I return;
}
final Dialog finalDialog = dialog;
-
if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@@ -450,7 +447,6 @@ public class ActorNameEditPartCN extends PapyrusCompartmentEditPart implements I @Override
protected void doExecute() {
configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
-
}
};
domain.getCommandStack().execute(command);
@@ -507,8 +503,17 @@ public class ActorNameEditPartCN extends PapyrusCompartmentEditPart implements I 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) {
@@ -629,7 +634,6 @@ public class ActorNameEditPartCN extends PapyrusCompartmentEditPart implements I if(checkDefaultEdition()) {
return IDirectEdition.DEFAULT_DIRECT_EDITOR;
}
-
// not a named element. no specific editor => do nothing
return IDirectEdition.NO_DIRECT_EDITION;
}
@@ -796,7 +800,6 @@ public class ActorNameEditPartCN extends PapyrusCompartmentEditPart implements I */
protected void addOwnerElementListeners() {
addListenerFilter(ADD_PARENT_MODEL, this, ((View)getParent().getModel())); //$NON-NLS-1$
-
}
/**
@@ -805,7 +808,6 @@ public class ActorNameEditPartCN extends PapyrusCompartmentEditPart implements I public void deactivate() {
removeOwnerElementListeners();
super.deactivate();
-
}
/**
@@ -813,6 +815,5 @@ public class ActorNameEditPartCN extends PapyrusCompartmentEditPart implements I */
protected void removeOwnerElementListeners() {
removeListenerFilter(ADD_PARENT_MODEL);
-
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/AnyReceiveEventEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/AnyReceiveEventEditPart.java index 65e46e1d8be..e475cef6f74 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/AnyReceiveEventEditPart.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/AnyReceiveEventEditPart.java @@ -26,6 +26,7 @@ import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure; import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
import org.eclipse.gmf.runtime.notation.View;
import org.eclipse.papyrus.infra.gmfdiag.common.editpart.NodeEditPart;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IPapyrusNodeFigure;
import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.SelectableBorderedNodeFigure;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy;
@@ -124,8 +125,6 @@ public class AnyReceiveEventEditPart extends NodeEditPart { ((AnyReceiveEventNameEditPart)childEditPart).setLabel(getPrimaryShape().getNameLabel());
return true;
}
-
-
return false;
}
@@ -184,7 +183,6 @@ public class AnyReceiveEventEditPart extends NodeEditPart { */
protected NodeFigure createNodeFigure() {
return new SelectableBorderedNodeFigure(createMainFigureWithSVG());
-
}
/**
@@ -234,8 +232,8 @@ public class AnyReceiveEventEditPart extends NodeEditPart { * @generated
*/
protected void setLineType(int style) {
- if(primaryShape instanceof NodeFigure) {
- ((NodeFigure)primaryShape).setLineStyle(style);
+ if(primaryShape instanceof IPapyrusNodeFigure) {
+ ((IPapyrusNodeFigure)primaryShape).setLineStyle(style);
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/AnyReceiveEventNameEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/AnyReceiveEventNameEditPart.java index d48634fe129..a475efa2c14 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/AnyReceiveEventNameEditPart.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/AnyReceiveEventNameEditPart.java @@ -64,6 +64,7 @@ import org.eclipse.papyrus.infra.emf.appearance.helper.VisualInformationPapyrusC import org.eclipse.papyrus.infra.gmfdiag.common.editpart.IControlParserForDirectEdit;
import org.eclipse.papyrus.infra.gmfdiag.common.editpart.PapyrusCompartmentEditPart;
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;
@@ -320,7 +321,6 @@ public class AnyReceiveEventNameEditPart extends PapyrusCompartmentEditPart impl ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -407,9 +407,7 @@ public class AnyReceiveEventNameEditPart extends PapyrusCompartmentEditPart impl * @generated
*/
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
@@ -442,7 +440,6 @@ public class AnyReceiveEventNameEditPart extends PapyrusCompartmentEditPart impl return;
}
final Dialog finalDialog = dialog;
-
if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@@ -450,7 +447,6 @@ public class AnyReceiveEventNameEditPart extends PapyrusCompartmentEditPart impl @Override
protected void doExecute() {
configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
-
}
};
domain.getCommandStack().execute(command);
@@ -507,8 +503,17 @@ public class AnyReceiveEventNameEditPart extends PapyrusCompartmentEditPart impl 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) {
@@ -629,7 +634,6 @@ public class AnyReceiveEventNameEditPart extends PapyrusCompartmentEditPart impl if(checkDefaultEdition()) {
return IDirectEdition.DEFAULT_DIRECT_EDITOR;
}
-
// not a named element. no specific editor => do nothing
return IDirectEdition.NO_DIRECT_EDITION;
}
@@ -796,7 +800,6 @@ public class AnyReceiveEventNameEditPart extends PapyrusCompartmentEditPart impl */
protected void addOwnerElementListeners() {
addListenerFilter(ADD_PARENT_MODEL, this, ((View)getParent().getModel())); //$NON-NLS-1$
-
}
/**
@@ -805,7 +808,6 @@ public class AnyReceiveEventNameEditPart extends PapyrusCompartmentEditPart impl public void deactivate() {
removeOwnerElementListeners();
super.deactivate();
-
}
/**
@@ -813,6 +815,5 @@ public class AnyReceiveEventNameEditPart extends PapyrusCompartmentEditPart impl */
protected void removeOwnerElementListeners() {
removeListenerFilter(ADD_PARENT_MODEL);
-
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ArtifactEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ArtifactEditPart.java index 163c0413f2f..65cdca91db5 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ArtifactEditPart.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ArtifactEditPart.java @@ -26,6 +26,7 @@ import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure; import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
import org.eclipse.gmf.runtime.notation.View;
import org.eclipse.papyrus.infra.gmfdiag.common.editpart.NodeEditPart;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IPapyrusNodeFigure;
import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.SelectableBorderedNodeFigure;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy;
@@ -126,8 +127,6 @@ public class ArtifactEditPart extends NodeEditPart { ((ArtifactNameEditPart)childEditPart).setLabel(getPrimaryShape().getNameLabel());
return true;
}
-
-
return false;
}
@@ -186,7 +185,6 @@ public class ArtifactEditPart extends NodeEditPart { */
protected NodeFigure createNodeFigure() {
return new SelectableBorderedNodeFigure(createMainFigureWithSVG());
-
}
/**
@@ -236,8 +234,8 @@ public class ArtifactEditPart extends NodeEditPart { * @generated
*/
protected void setLineType(int style) {
- if(primaryShape instanceof NodeFigure) {
- ((NodeFigure)primaryShape).setLineStyle(style);
+ if(primaryShape instanceof IPapyrusNodeFigure) {
+ ((IPapyrusNodeFigure)primaryShape).setLineStyle(style);
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ArtifactEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ArtifactEditPartCN.java index f0e98535dae..79a37576e4d 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ArtifactEditPartCN.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ArtifactEditPartCN.java @@ -26,6 +26,7 @@ import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure; import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
import org.eclipse.gmf.runtime.notation.View;
import org.eclipse.papyrus.infra.gmfdiag.common.editpart.NodeEditPart;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IPapyrusNodeFigure;
import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.SelectableBorderedNodeFigure;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy;
@@ -126,8 +127,6 @@ public class ArtifactEditPartCN extends NodeEditPart { ((ArtifactNameEditPartCN)childEditPart).setLabel(getPrimaryShape().getNameLabel());
return true;
}
-
-
return false;
}
@@ -186,7 +185,6 @@ public class ArtifactEditPartCN extends NodeEditPart { */
protected NodeFigure createNodeFigure() {
return new SelectableBorderedNodeFigure(createMainFigureWithSVG());
-
}
/**
@@ -236,8 +234,8 @@ public class ArtifactEditPartCN extends NodeEditPart { * @generated
*/
protected void setLineType(int style) {
- if(primaryShape instanceof NodeFigure) {
- ((NodeFigure)primaryShape).setLineStyle(style);
+ if(primaryShape instanceof IPapyrusNodeFigure) {
+ ((IPapyrusNodeFigure)primaryShape).setLineStyle(style);
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ArtifactNameEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ArtifactNameEditPart.java index 2e65229a461..0c9d064364e 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ArtifactNameEditPart.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ArtifactNameEditPart.java @@ -64,6 +64,7 @@ import org.eclipse.papyrus.infra.emf.appearance.helper.VisualInformationPapyrusC import org.eclipse.papyrus.infra.gmfdiag.common.editpart.IControlParserForDirectEdit;
import org.eclipse.papyrus.infra.gmfdiag.common.editpart.PapyrusCompartmentEditPart;
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;
@@ -320,7 +321,6 @@ public class ArtifactNameEditPart extends PapyrusCompartmentEditPart implements ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -407,9 +407,7 @@ public class ArtifactNameEditPart extends PapyrusCompartmentEditPart implements * @generated
*/
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
@@ -442,7 +440,6 @@ public class ArtifactNameEditPart extends PapyrusCompartmentEditPart implements return;
}
final Dialog finalDialog = dialog;
-
if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@@ -450,7 +447,6 @@ public class ArtifactNameEditPart extends PapyrusCompartmentEditPart implements @Override
protected void doExecute() {
configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
-
}
};
domain.getCommandStack().execute(command);
@@ -507,8 +503,17 @@ public class ArtifactNameEditPart extends PapyrusCompartmentEditPart implements 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) {
@@ -629,7 +634,6 @@ public class ArtifactNameEditPart extends PapyrusCompartmentEditPart implements if(checkDefaultEdition()) {
return IDirectEdition.DEFAULT_DIRECT_EDITOR;
}
-
// not a named element. no specific editor => do nothing
return IDirectEdition.NO_DIRECT_EDITION;
}
@@ -796,7 +800,6 @@ public class ArtifactNameEditPart extends PapyrusCompartmentEditPart implements */
protected void addOwnerElementListeners() {
addListenerFilter(ADD_PARENT_MODEL, this, ((View)getParent().getModel())); //$NON-NLS-1$
-
}
/**
@@ -805,7 +808,6 @@ public class ArtifactNameEditPart extends PapyrusCompartmentEditPart implements public void deactivate() {
removeOwnerElementListeners();
super.deactivate();
-
}
/**
@@ -813,6 +815,5 @@ public class ArtifactNameEditPart extends PapyrusCompartmentEditPart implements */
protected void removeOwnerElementListeners() {
removeListenerFilter(ADD_PARENT_MODEL);
-
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ArtifactNameEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ArtifactNameEditPartCN.java index a4838e4c2b7..6a540cb6a19 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ArtifactNameEditPartCN.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ArtifactNameEditPartCN.java @@ -64,6 +64,7 @@ import org.eclipse.papyrus.infra.emf.appearance.helper.VisualInformationPapyrusC import org.eclipse.papyrus.infra.gmfdiag.common.editpart.IControlParserForDirectEdit;
import org.eclipse.papyrus.infra.gmfdiag.common.editpart.PapyrusCompartmentEditPart;
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;
@@ -320,7 +321,6 @@ public class ArtifactNameEditPartCN extends PapyrusCompartmentEditPart implement ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -407,9 +407,7 @@ public class ArtifactNameEditPartCN extends PapyrusCompartmentEditPart implement * @generated
*/
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
@@ -442,7 +440,6 @@ public class ArtifactNameEditPartCN extends PapyrusCompartmentEditPart implement return;
}
final Dialog finalDialog = dialog;
-
if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@@ -450,7 +447,6 @@ public class ArtifactNameEditPartCN extends PapyrusCompartmentEditPart implement @Override
protected void doExecute() {
configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
-
}
};
domain.getCommandStack().execute(command);
@@ -507,8 +503,17 @@ public class ArtifactNameEditPartCN extends PapyrusCompartmentEditPart implement 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) {
@@ -629,7 +634,6 @@ public class ArtifactNameEditPartCN extends PapyrusCompartmentEditPart implement if(checkDefaultEdition()) {
return IDirectEdition.DEFAULT_DIRECT_EDITOR;
}
-
// not a named element. no specific editor => do nothing
return IDirectEdition.NO_DIRECT_EDITION;
}
@@ -796,7 +800,6 @@ public class ArtifactNameEditPartCN extends PapyrusCompartmentEditPart implement */
protected void addOwnerElementListeners() {
addListenerFilter(ADD_PARENT_MODEL, this, ((View)getParent().getModel())); //$NON-NLS-1$
-
}
/**
@@ -805,7 +808,6 @@ public class ArtifactNameEditPartCN extends PapyrusCompartmentEditPart implement public void deactivate() {
removeOwnerElementListeners();
super.deactivate();
-
}
/**
@@ -813,6 +815,5 @@ public class ArtifactNameEditPartCN extends PapyrusCompartmentEditPart implement */
protected void removeOwnerElementListeners() {
removeListenerFilter(ADD_PARENT_MODEL);
-
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/BehaviorPortEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/BehaviorPortEditPart.java index e3114e919fe..03bad45a424 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/BehaviorPortEditPart.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/BehaviorPortEditPart.java @@ -24,6 +24,7 @@ import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles; import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure;
import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IPapyrusNodeFigure;
import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.SelectableBorderedNodeFigure;
import org.eclipse.papyrus.uml.diagram.common.figure.node.PapyrusRoundedNodeFigure;
import org.eclipse.papyrus.uml.diagram.composite.custom.edit.parts.AbstractBehaviorPortEditPart;
@@ -103,7 +104,6 @@ public class BehaviorPortEditPart extends AbstractBehaviorPortEditPart { **/
protected void handleNotificationEvent(Notification event) {
super.handleNotificationEvent(event);
-
}
/**
@@ -140,7 +140,6 @@ public class BehaviorPortEditPart extends AbstractBehaviorPortEditPart { */
protected NodeFigure createNodeFigure() {
return new SelectableBorderedNodeFigure(createMainFigureWithSVG());
-
}
/**
@@ -185,8 +184,8 @@ public class BehaviorPortEditPart extends AbstractBehaviorPortEditPart { * @generated
*/
protected void setLineType(int style) {
- if(primaryShape instanceof NodeFigure) {
- ((NodeFigure)primaryShape).setLineStyle(style);
+ if(primaryShape instanceof IPapyrusNodeFigure) {
+ ((IPapyrusNodeFigure)primaryShape).setLineStyle(style);
}
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/CallEventEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/CallEventEditPart.java index d2a76f55916..a23057859b6 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/CallEventEditPart.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/CallEventEditPart.java @@ -26,6 +26,7 @@ import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure; import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
import org.eclipse.gmf.runtime.notation.View;
import org.eclipse.papyrus.infra.gmfdiag.common.editpart.NodeEditPart;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IPapyrusNodeFigure;
import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.SelectableBorderedNodeFigure;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy;
@@ -124,8 +125,6 @@ public class CallEventEditPart extends NodeEditPart { ((CallEventNameEditPart)childEditPart).setLabel(getPrimaryShape().getNameLabel());
return true;
}
-
-
return false;
}
@@ -184,7 +183,6 @@ public class CallEventEditPart extends NodeEditPart { */
protected NodeFigure createNodeFigure() {
return new SelectableBorderedNodeFigure(createMainFigureWithSVG());
-
}
/**
@@ -234,8 +232,8 @@ public class CallEventEditPart extends NodeEditPart { * @generated
*/
protected void setLineType(int style) {
- if(primaryShape instanceof NodeFigure) {
- ((NodeFigure)primaryShape).setLineStyle(style);
+ if(primaryShape instanceof IPapyrusNodeFigure) {
+ ((IPapyrusNodeFigure)primaryShape).setLineStyle(style);
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/CallEventNameEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/CallEventNameEditPart.java index ac9abdc79c6..afb73debb38 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/CallEventNameEditPart.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/CallEventNameEditPart.java @@ -64,6 +64,7 @@ import org.eclipse.papyrus.infra.emf.appearance.helper.VisualInformationPapyrusC import org.eclipse.papyrus.infra.gmfdiag.common.editpart.IControlParserForDirectEdit;
import org.eclipse.papyrus.infra.gmfdiag.common.editpart.PapyrusCompartmentEditPart;
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;
@@ -320,7 +321,6 @@ public class CallEventNameEditPart extends PapyrusCompartmentEditPart implements ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -407,9 +407,7 @@ public class CallEventNameEditPart extends PapyrusCompartmentEditPart implements * @generated
*/
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
@@ -442,7 +440,6 @@ public class CallEventNameEditPart extends PapyrusCompartmentEditPart implements return;
}
final Dialog finalDialog = dialog;
-
if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@@ -450,7 +447,6 @@ public class CallEventNameEditPart extends PapyrusCompartmentEditPart implements @Override
protected void doExecute() {
configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
-
}
};
domain.getCommandStack().execute(command);
@@ -507,8 +503,17 @@ public class CallEventNameEditPart extends PapyrusCompartmentEditPart implements 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) {
@@ -629,7 +634,6 @@ public class CallEventNameEditPart extends PapyrusCompartmentEditPart implements if(checkDefaultEdition()) {
return IDirectEdition.DEFAULT_DIRECT_EDITOR;
}
-
// not a named element. no specific editor => do nothing
return IDirectEdition.NO_DIRECT_EDITION;
}
@@ -796,7 +800,6 @@ public class CallEventNameEditPart extends PapyrusCompartmentEditPart implements */
protected void addOwnerElementListeners() {
addListenerFilter(ADD_PARENT_MODEL, this, ((View)getParent().getModel())); //$NON-NLS-1$
-
}
/**
@@ -805,7 +808,6 @@ public class CallEventNameEditPart extends PapyrusCompartmentEditPart implements public void deactivate() {
removeOwnerElementListeners();
super.deactivate();
-
}
/**
@@ -813,6 +815,5 @@ public class CallEventNameEditPart extends PapyrusCompartmentEditPart implements */
protected void removeOwnerElementListeners() {
removeListenerFilter(ADD_PARENT_MODEL);
-
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ChangeEventEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ChangeEventEditPart.java index 468acc2b47e..9b045ee0891 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ChangeEventEditPart.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ChangeEventEditPart.java @@ -26,6 +26,7 @@ import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure; import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
import org.eclipse.gmf.runtime.notation.View;
import org.eclipse.papyrus.infra.gmfdiag.common.editpart.NodeEditPart;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IPapyrusNodeFigure;
import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.SelectableBorderedNodeFigure;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy;
@@ -124,8 +125,6 @@ public class ChangeEventEditPart extends NodeEditPart { ((ChangeEventNameEditPart)childEditPart).setLabel(getPrimaryShape().getNameLabel());
return true;
}
-
-
return false;
}
@@ -184,7 +183,6 @@ public class ChangeEventEditPart extends NodeEditPart { */
protected NodeFigure createNodeFigure() {
return new SelectableBorderedNodeFigure(createMainFigureWithSVG());
-
}
/**
@@ -234,8 +232,8 @@ public class ChangeEventEditPart extends NodeEditPart { * @generated
*/
protected void setLineType(int style) {
- if(primaryShape instanceof NodeFigure) {
- ((NodeFigure)primaryShape).setLineStyle(style);
+ if(primaryShape instanceof IPapyrusNodeFigure) {
+ ((IPapyrusNodeFigure)primaryShape).setLineStyle(style);
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ChangeEventNameEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ChangeEventNameEditPart.java index 28155765930..a60c8627601 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ChangeEventNameEditPart.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ChangeEventNameEditPart.java @@ -64,6 +64,7 @@ import org.eclipse.papyrus.infra.emf.appearance.helper.VisualInformationPapyrusC import org.eclipse.papyrus.infra.gmfdiag.common.editpart.IControlParserForDirectEdit;
import org.eclipse.papyrus.infra.gmfdiag.common.editpart.PapyrusCompartmentEditPart;
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;
@@ -320,7 +321,6 @@ public class ChangeEventNameEditPart extends PapyrusCompartmentEditPart implemen ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -407,9 +407,7 @@ public class ChangeEventNameEditPart extends PapyrusCompartmentEditPart implemen * @generated
*/
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
@@ -442,7 +440,6 @@ public class ChangeEventNameEditPart extends PapyrusCompartmentEditPart implemen return;
}
final Dialog finalDialog = dialog;
-
if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@@ -450,7 +447,6 @@ public class ChangeEventNameEditPart extends PapyrusCompartmentEditPart implemen @Override
protected void doExecute() {
configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
-
}
};
domain.getCommandStack().execute(command);
@@ -507,8 +503,17 @@ public class ChangeEventNameEditPart extends PapyrusCompartmentEditPart implemen 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) {
@@ -629,7 +634,6 @@ public class ChangeEventNameEditPart extends PapyrusCompartmentEditPart implemen if(checkDefaultEdition()) {
return IDirectEdition.DEFAULT_DIRECT_EDITOR;
}
-
// not a named element. no specific editor => do nothing
return IDirectEdition.NO_DIRECT_EDITION;
}
@@ -796,7 +800,6 @@ public class ChangeEventNameEditPart extends PapyrusCompartmentEditPart implemen */
protected void addOwnerElementListeners() {
addListenerFilter(ADD_PARENT_MODEL, this, ((View)getParent().getModel())); //$NON-NLS-1$
-
}
/**
@@ -805,7 +808,6 @@ public class ChangeEventNameEditPart extends PapyrusCompartmentEditPart implemen public void deactivate() {
removeOwnerElementListeners();
super.deactivate();
-
}
/**
@@ -813,6 +815,5 @@ public class ChangeEventNameEditPart extends PapyrusCompartmentEditPart implemen */
protected void removeOwnerElementListeners() {
removeListenerFilter(ADD_PARENT_MODEL);
-
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ClassCompositeCompartmentEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ClassCompositeCompartmentEditPart.java index 144515e1867..ba2229782af 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ClassCompositeCompartmentEditPart.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ClassCompositeCompartmentEditPart.java @@ -88,7 +88,6 @@ public class ClassCompositeCompartmentEditPart extends ShapeCompartmentEditPart * @generated
*/
public EditPart getTargetEditPart(Request request) {
-
return super.getTargetEditPart(request);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ClassCompositeCompartmentEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ClassCompositeCompartmentEditPartCN.java index 9638019916f..56e71b034fb 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ClassCompositeCompartmentEditPartCN.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ClassCompositeCompartmentEditPartCN.java @@ -88,7 +88,6 @@ public class ClassCompositeCompartmentEditPartCN extends ShapeCompartmentEditPar * @generated
*/
public EditPart getTargetEditPart(Request request) {
-
return super.getTargetEditPart(request);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ClassCompositeEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ClassCompositeEditPart.java index 6904c70cdc2..066631aaf28 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ClassCompositeEditPart.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ClassCompositeEditPart.java @@ -30,6 +30,7 @@ import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout; import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure;
import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IPapyrusNodeFigure;
import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.SelectableBorderedNodeFigure;
import org.eclipse.papyrus.uml.diagram.common.editparts.NamedElementEditPart;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.AffixedNodeAlignmentEditPolicy;
@@ -136,7 +137,6 @@ public class ClassCompositeEditPart extends NamedElementEditPart { **/
protected void handleNotificationEvent(Notification event) {
super.handleNotificationEvent(event);
-
}
/**
@@ -163,25 +163,18 @@ public class ClassCompositeEditPart extends NamedElementEditPart { ((ClassCompositeNameEditPart)childEditPart).setLabel(getPrimaryShape().getNameLabel());
return true;
}
-
-
if(childEditPart instanceof ClassCompositeCompartmentEditPart) {
IFigure pane = getPrimaryShape().getCompositeCompartmentFigure();
setupContentPane(pane); // FIXME each comparment should handle his content pane in his own way
pane.add(((ClassCompositeCompartmentEditPart)childEditPart).getFigure());
return true;
}
-
-
-
//Papyrus Gencode :Affixed Port locator
if(childEditPart instanceof PortEditPart) {
IBorderItemLocator locator = new PortPositionLocator(getMainFigure(), PositionConstants.NONE);
getBorderedFigure().getBorderItemContainer().add(((PortEditPart)childEditPart).getFigure(), locator);
return true;
}
-
-
return false;
}
@@ -255,7 +248,6 @@ public class ClassCompositeEditPart extends NamedElementEditPart { */
protected NodeFigure createMainFigure() {
return new SelectableBorderedNodeFigure(createMainFigureWithSVG());
-
}
/**
@@ -305,8 +297,8 @@ public class ClassCompositeEditPart extends NamedElementEditPart { * @generated
*/
protected void setLineType(int style) {
- if(primaryShape instanceof NodeFigure) {
- ((NodeFigure)primaryShape).setLineStyle(style);
+ if(primaryShape instanceof IPapyrusNodeFigure) {
+ ((IPapyrusNodeFigure)primaryShape).setLineStyle(style);
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ClassCompositeEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ClassCompositeEditPartCN.java index 884b9a09b44..c5b4b12e330 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ClassCompositeEditPartCN.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ClassCompositeEditPartCN.java @@ -30,6 +30,7 @@ import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout; import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure;
import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IPapyrusNodeFigure;
import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.SelectableBorderedNodeFigure;
import org.eclipse.papyrus.uml.diagram.common.editparts.NamedElementEditPart;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.AffixedNodeAlignmentEditPolicy;
@@ -136,7 +137,6 @@ public class ClassCompositeEditPartCN extends NamedElementEditPart { **/
protected void handleNotificationEvent(Notification event) {
super.handleNotificationEvent(event);
-
}
/**
@@ -163,25 +163,18 @@ public class ClassCompositeEditPartCN extends NamedElementEditPart { ((ClassCompositeNameEditPartCN)childEditPart).setLabel(getPrimaryShape().getNameLabel());
return true;
}
-
-
if(childEditPart instanceof ClassCompositeCompartmentEditPartCN) {
IFigure pane = getPrimaryShape().getCompositeCompartmentFigure();
setupContentPane(pane); // FIXME each comparment should handle his content pane in his own way
pane.add(((ClassCompositeCompartmentEditPartCN)childEditPart).getFigure());
return true;
}
-
-
-
//Papyrus Gencode :Affixed Port locator
if(childEditPart instanceof PortEditPart) {
IBorderItemLocator locator = new PortPositionLocator(getMainFigure(), PositionConstants.NONE);
getBorderedFigure().getBorderItemContainer().add(((PortEditPart)childEditPart).getFigure(), locator);
return true;
}
-
-
return false;
}
@@ -255,7 +248,6 @@ public class ClassCompositeEditPartCN extends NamedElementEditPart { */
protected NodeFigure createMainFigure() {
return new SelectableBorderedNodeFigure(createMainFigureWithSVG());
-
}
/**
@@ -305,8 +297,8 @@ public class ClassCompositeEditPartCN extends NamedElementEditPart { * @generated
*/
protected void setLineType(int style) {
- if(primaryShape instanceof NodeFigure) {
- ((NodeFigure)primaryShape).setLineStyle(style);
+ if(primaryShape instanceof IPapyrusNodeFigure) {
+ ((IPapyrusNodeFigure)primaryShape).setLineStyle(style);
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ClassCompositeNameEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ClassCompositeNameEditPart.java index 55d64054f94..ba15e7cafba 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ClassCompositeNameEditPart.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ClassCompositeNameEditPart.java @@ -64,6 +64,7 @@ import org.eclipse.papyrus.infra.emf.appearance.helper.VisualInformationPapyrusC import org.eclipse.papyrus.infra.gmfdiag.common.editpart.IControlParserForDirectEdit;
import org.eclipse.papyrus.infra.gmfdiag.common.editpart.PapyrusCompartmentEditPart;
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;
@@ -320,7 +321,6 @@ public class ClassCompositeNameEditPart extends PapyrusCompartmentEditPart imple ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -407,9 +407,7 @@ public class ClassCompositeNameEditPart extends PapyrusCompartmentEditPart imple * @generated
*/
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
@@ -442,7 +440,6 @@ public class ClassCompositeNameEditPart extends PapyrusCompartmentEditPart imple return;
}
final Dialog finalDialog = dialog;
-
if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@@ -450,7 +447,6 @@ public class ClassCompositeNameEditPart extends PapyrusCompartmentEditPart imple @Override
protected void doExecute() {
configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
-
}
};
domain.getCommandStack().execute(command);
@@ -507,8 +503,17 @@ public class ClassCompositeNameEditPart extends PapyrusCompartmentEditPart imple 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) {
@@ -629,7 +634,6 @@ public class ClassCompositeNameEditPart extends PapyrusCompartmentEditPart imple if(checkDefaultEdition()) {
return IDirectEdition.DEFAULT_DIRECT_EDITOR;
}
-
// not a named element. no specific editor => do nothing
return IDirectEdition.NO_DIRECT_EDITION;
}
@@ -796,7 +800,6 @@ public class ClassCompositeNameEditPart extends PapyrusCompartmentEditPart imple */
protected void addOwnerElementListeners() {
addListenerFilter(ADD_PARENT_MODEL, this, ((View)getParent().getModel())); //$NON-NLS-1$
-
}
/**
@@ -805,7 +808,6 @@ public class ClassCompositeNameEditPart extends PapyrusCompartmentEditPart imple public void deactivate() {
removeOwnerElementListeners();
super.deactivate();
-
}
/**
@@ -813,6 +815,5 @@ public class ClassCompositeNameEditPart extends PapyrusCompartmentEditPart imple */
protected void removeOwnerElementListeners() {
removeListenerFilter(ADD_PARENT_MODEL);
-
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ClassCompositeNameEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ClassCompositeNameEditPartCN.java index fc23a3c09ca..8fdfbffb0ab 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ClassCompositeNameEditPartCN.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ClassCompositeNameEditPartCN.java @@ -64,6 +64,7 @@ import org.eclipse.papyrus.infra.emf.appearance.helper.VisualInformationPapyrusC import org.eclipse.papyrus.infra.gmfdiag.common.editpart.IControlParserForDirectEdit;
import org.eclipse.papyrus.infra.gmfdiag.common.editpart.PapyrusCompartmentEditPart;
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;
@@ -320,7 +321,6 @@ public class ClassCompositeNameEditPartCN extends PapyrusCompartmentEditPart imp ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -407,9 +407,7 @@ public class ClassCompositeNameEditPartCN extends PapyrusCompartmentEditPart imp * @generated
*/
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
@@ -442,7 +440,6 @@ public class ClassCompositeNameEditPartCN extends PapyrusCompartmentEditPart imp return;
}
final Dialog finalDialog = dialog;
-
if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@@ -450,7 +447,6 @@ public class ClassCompositeNameEditPartCN extends PapyrusCompartmentEditPart imp @Override
protected void doExecute() {
configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
-
}
};
domain.getCommandStack().execute(command);
@@ -507,8 +503,17 @@ public class ClassCompositeNameEditPartCN extends PapyrusCompartmentEditPart imp 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) {
@@ -629,7 +634,6 @@ public class ClassCompositeNameEditPartCN extends PapyrusCompartmentEditPart imp if(checkDefaultEdition()) {
return IDirectEdition.DEFAULT_DIRECT_EDITOR;
}
-
// not a named element. no specific editor => do nothing
return IDirectEdition.NO_DIRECT_EDITION;
}
@@ -796,7 +800,6 @@ public class ClassCompositeNameEditPartCN extends PapyrusCompartmentEditPart imp */
protected void addOwnerElementListeners() {
addListenerFilter(ADD_PARENT_MODEL, this, ((View)getParent().getModel())); //$NON-NLS-1$
-
}
/**
@@ -805,7 +808,6 @@ public class ClassCompositeNameEditPartCN extends PapyrusCompartmentEditPart imp public void deactivate() {
removeOwnerElementListeners();
super.deactivate();
-
}
/**
@@ -813,6 +815,5 @@ public class ClassCompositeNameEditPartCN extends PapyrusCompartmentEditPart imp */
protected void removeOwnerElementListeners() {
removeListenerFilter(ADD_PARENT_MODEL);
-
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/CollaborationCompositeCompartmentEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/CollaborationCompositeCompartmentEditPart.java index 7713f230eab..d238bbdbc2e 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/CollaborationCompositeCompartmentEditPart.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/CollaborationCompositeCompartmentEditPart.java @@ -88,7 +88,6 @@ public class CollaborationCompositeCompartmentEditPart extends ShapeCompartmentE * @generated
*/
public EditPart getTargetEditPart(Request request) {
-
return super.getTargetEditPart(request);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/CollaborationCompositeCompartmentEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/CollaborationCompositeCompartmentEditPartCN.java index 09980f5cae1..7513341ff95 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/CollaborationCompositeCompartmentEditPartCN.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/CollaborationCompositeCompartmentEditPartCN.java @@ -88,7 +88,6 @@ public class CollaborationCompositeCompartmentEditPartCN extends ShapeCompartmen * @generated
*/
public EditPart getTargetEditPart(Request request) {
-
return super.getTargetEditPart(request);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/CollaborationCompositeEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/CollaborationCompositeEditPart.java index eab433569d8..2a58f610447 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/CollaborationCompositeEditPart.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/CollaborationCompositeEditPart.java @@ -26,6 +26,7 @@ import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout; import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure;
import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IPapyrusNodeFigure;
import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.SelectableBorderedNodeFigure;
import org.eclipse.papyrus.uml.diagram.common.editparts.NamedElementEditPart;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy;
@@ -114,7 +115,6 @@ public class CollaborationCompositeEditPart extends NamedElementEditPart { **/
protected void handleNotificationEvent(Notification event) {
super.handleNotificationEvent(event);
-
}
/**
@@ -141,15 +141,12 @@ public class CollaborationCompositeEditPart extends NamedElementEditPart { ((CollaborationCompositeNameEditPart)childEditPart).setLabel(getPrimaryShape().getNameLabel());
return true;
}
-
-
if(childEditPart instanceof CollaborationCompositeCompartmentEditPart) {
IFigure pane = getPrimaryShape().getCompositeCompartmentFigure();
setupContentPane(pane); // FIXME each comparment should handle his content pane in his own way
pane.add(((CollaborationCompositeCompartmentEditPart)childEditPart).getFigure());
return true;
}
-
return false;
}
@@ -216,7 +213,6 @@ public class CollaborationCompositeEditPart extends NamedElementEditPart { */
protected NodeFigure createNodeFigure() {
return new SelectableBorderedNodeFigure(createMainFigureWithSVG());
-
}
/**
@@ -266,8 +262,8 @@ public class CollaborationCompositeEditPart extends NamedElementEditPart { * @generated
*/
protected void setLineType(int style) {
- if(primaryShape instanceof NodeFigure) {
- ((NodeFigure)primaryShape).setLineStyle(style);
+ if(primaryShape instanceof IPapyrusNodeFigure) {
+ ((IPapyrusNodeFigure)primaryShape).setLineStyle(style);
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/CollaborationCompositeEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/CollaborationCompositeEditPartCN.java index 436a3094a68..3f1678f9219 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/CollaborationCompositeEditPartCN.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/CollaborationCompositeEditPartCN.java @@ -26,6 +26,7 @@ import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout; import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure;
import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IPapyrusNodeFigure;
import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.SelectableBorderedNodeFigure;
import org.eclipse.papyrus.uml.diagram.common.editparts.NamedElementEditPart;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy;
@@ -114,7 +115,6 @@ public class CollaborationCompositeEditPartCN extends NamedElementEditPart { **/
protected void handleNotificationEvent(Notification event) {
super.handleNotificationEvent(event);
-
}
/**
@@ -141,15 +141,12 @@ public class CollaborationCompositeEditPartCN extends NamedElementEditPart { ((CollaborationCompositeNameEditPartCN)childEditPart).setLabel(getPrimaryShape().getNameLabel());
return true;
}
-
-
if(childEditPart instanceof CollaborationCompositeCompartmentEditPartCN) {
IFigure pane = getPrimaryShape().getCompositeCompartmentFigure();
setupContentPane(pane); // FIXME each comparment should handle his content pane in his own way
pane.add(((CollaborationCompositeCompartmentEditPartCN)childEditPart).getFigure());
return true;
}
-
return false;
}
@@ -216,7 +213,6 @@ public class CollaborationCompositeEditPartCN extends NamedElementEditPart { */
protected NodeFigure createNodeFigure() {
return new SelectableBorderedNodeFigure(createMainFigureWithSVG());
-
}
/**
@@ -266,8 +262,8 @@ public class CollaborationCompositeEditPartCN extends NamedElementEditPart { * @generated
*/
protected void setLineType(int style) {
- if(primaryShape instanceof NodeFigure) {
- ((NodeFigure)primaryShape).setLineStyle(style);
+ if(primaryShape instanceof IPapyrusNodeFigure) {
+ ((IPapyrusNodeFigure)primaryShape).setLineStyle(style);
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/CollaborationCompositeNameEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/CollaborationCompositeNameEditPart.java index d3536a4442e..8a757ee4dc2 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/CollaborationCompositeNameEditPart.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/CollaborationCompositeNameEditPart.java @@ -64,6 +64,7 @@ import org.eclipse.papyrus.infra.emf.appearance.helper.VisualInformationPapyrusC import org.eclipse.papyrus.infra.gmfdiag.common.editpart.IControlParserForDirectEdit;
import org.eclipse.papyrus.infra.gmfdiag.common.editpart.PapyrusCompartmentEditPart;
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;
@@ -320,7 +321,6 @@ public class CollaborationCompositeNameEditPart extends PapyrusCompartmentEditPa ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -407,9 +407,7 @@ public class CollaborationCompositeNameEditPart extends PapyrusCompartmentEditPa * @generated
*/
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
@@ -442,7 +440,6 @@ public class CollaborationCompositeNameEditPart extends PapyrusCompartmentEditPa return;
}
final Dialog finalDialog = dialog;
-
if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@@ -450,7 +447,6 @@ public class CollaborationCompositeNameEditPart extends PapyrusCompartmentEditPa @Override
protected void doExecute() {
configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
-
}
};
domain.getCommandStack().execute(command);
@@ -507,8 +503,17 @@ public class CollaborationCompositeNameEditPart extends PapyrusCompartmentEditPa 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) {
@@ -629,7 +634,6 @@ public class CollaborationCompositeNameEditPart extends PapyrusCompartmentEditPa if(checkDefaultEdition()) {
return IDirectEdition.DEFAULT_DIRECT_EDITOR;
}
-
// not a named element. no specific editor => do nothing
return IDirectEdition.NO_DIRECT_EDITION;
}
@@ -796,7 +800,6 @@ public class CollaborationCompositeNameEditPart extends PapyrusCompartmentEditPa */
protected void addOwnerElementListeners() {
addListenerFilter(ADD_PARENT_MODEL, this, ((View)getParent().getModel())); //$NON-NLS-1$
-
}
/**
@@ -805,7 +808,6 @@ public class CollaborationCompositeNameEditPart extends PapyrusCompartmentEditPa public void deactivate() {
removeOwnerElementListeners();
super.deactivate();
-
}
/**
@@ -813,6 +815,5 @@ public class CollaborationCompositeNameEditPart extends PapyrusCompartmentEditPa */
protected void removeOwnerElementListeners() {
removeListenerFilter(ADD_PARENT_MODEL);
-
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/CollaborationCompositeNameEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/CollaborationCompositeNameEditPartCN.java index 1be8fb349eb..221473c3cc3 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/CollaborationCompositeNameEditPartCN.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/CollaborationCompositeNameEditPartCN.java @@ -64,6 +64,7 @@ import org.eclipse.papyrus.infra.emf.appearance.helper.VisualInformationPapyrusC import org.eclipse.papyrus.infra.gmfdiag.common.editpart.IControlParserForDirectEdit;
import org.eclipse.papyrus.infra.gmfdiag.common.editpart.PapyrusCompartmentEditPart;
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;
@@ -320,7 +321,6 @@ public class CollaborationCompositeNameEditPartCN extends PapyrusCompartmentEdit ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -407,9 +407,7 @@ public class CollaborationCompositeNameEditPartCN extends PapyrusCompartmentEdit * @generated
*/
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
@@ -442,7 +440,6 @@ public class CollaborationCompositeNameEditPartCN extends PapyrusCompartmentEdit return;
}
final Dialog finalDialog = dialog;
-
if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@@ -450,7 +447,6 @@ public class CollaborationCompositeNameEditPartCN extends PapyrusCompartmentEdit @Override
protected void doExecute() {
configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
-
}
};
domain.getCommandStack().execute(command);
@@ -507,8 +503,17 @@ public class CollaborationCompositeNameEditPartCN extends PapyrusCompartmentEdit 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) {
@@ -629,7 +634,6 @@ public class CollaborationCompositeNameEditPartCN extends PapyrusCompartmentEdit if(checkDefaultEdition()) {
return IDirectEdition.DEFAULT_DIRECT_EDITOR;
}
-
// not a named element. no specific editor => do nothing
return IDirectEdition.NO_DIRECT_EDITION;
}
@@ -796,7 +800,6 @@ public class CollaborationCompositeNameEditPartCN extends PapyrusCompartmentEdit */
protected void addOwnerElementListeners() {
addListenerFilter(ADD_PARENT_MODEL, this, ((View)getParent().getModel())); //$NON-NLS-1$
-
}
/**
@@ -805,7 +808,6 @@ public class CollaborationCompositeNameEditPartCN extends PapyrusCompartmentEdit public void deactivate() {
removeOwnerElementListeners();
super.deactivate();
-
}
/**
@@ -813,6 +815,5 @@ public class CollaborationCompositeNameEditPartCN extends PapyrusCompartmentEdit */
protected void removeOwnerElementListeners() {
removeListenerFilter(ADD_PARENT_MODEL);
-
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/CollaborationRoleEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/CollaborationRoleEditPartCN.java index 5daada2070d..1170bc57529 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/CollaborationRoleEditPartCN.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/CollaborationRoleEditPartCN.java @@ -26,6 +26,7 @@ import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout; import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure;
import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IPapyrusNodeFigure;
import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.SelectableBorderedNodeFigure;
import org.eclipse.papyrus.uml.diagram.common.editparts.NamedElementEditPart;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy;
@@ -112,7 +113,6 @@ public class CollaborationRoleEditPartCN extends NamedElementEditPart { **/
protected void handleNotificationEvent(Notification event) {
super.handleNotificationEvent(event);
-
}
/**
@@ -139,8 +139,6 @@ public class CollaborationRoleEditPartCN extends NamedElementEditPart { ((CollaborationRoleNameEditPartCN)childEditPart).setLabel(getPrimaryShape().getNameLabel());
return true;
}
-
-
return false;
}
@@ -199,7 +197,6 @@ public class CollaborationRoleEditPartCN extends NamedElementEditPart { */
protected NodeFigure createNodeFigure() {
return new SelectableBorderedNodeFigure(createMainFigureWithSVG());
-
}
/**
@@ -249,8 +246,8 @@ public class CollaborationRoleEditPartCN extends NamedElementEditPart { * @generated
*/
protected void setLineType(int style) {
- if(primaryShape instanceof NodeFigure) {
- ((NodeFigure)primaryShape).setLineStyle(style);
+ if(primaryShape instanceof IPapyrusNodeFigure) {
+ ((IPapyrusNodeFigure)primaryShape).setLineStyle(style);
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/CollaborationRoleNameEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/CollaborationRoleNameEditPartCN.java index e4675b6ed62..710baa4438e 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/CollaborationRoleNameEditPartCN.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/CollaborationRoleNameEditPartCN.java @@ -64,6 +64,7 @@ import org.eclipse.papyrus.infra.emf.appearance.helper.VisualInformationPapyrusC import org.eclipse.papyrus.infra.gmfdiag.common.editpart.IControlParserForDirectEdit;
import org.eclipse.papyrus.infra.gmfdiag.common.editpart.PapyrusCompartmentEditPart;
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;
@@ -320,7 +321,6 @@ public class CollaborationRoleNameEditPartCN extends PapyrusCompartmentEditPart ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -407,9 +407,7 @@ public class CollaborationRoleNameEditPartCN extends PapyrusCompartmentEditPart * @generated
*/
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
@@ -442,7 +440,6 @@ public class CollaborationRoleNameEditPartCN extends PapyrusCompartmentEditPart return;
}
final Dialog finalDialog = dialog;
-
if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@@ -450,7 +447,6 @@ public class CollaborationRoleNameEditPartCN extends PapyrusCompartmentEditPart @Override
protected void doExecute() {
configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
-
}
};
domain.getCommandStack().execute(command);
@@ -507,8 +503,17 @@ public class CollaborationRoleNameEditPartCN extends PapyrusCompartmentEditPart 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) {
@@ -788,7 +793,6 @@ public class CollaborationRoleNameEditPartCN extends PapyrusCompartmentEditPart */
protected void addOwnerElementListeners() {
addListenerFilter(ADD_PARENT_MODEL, this, ((View)getParent().getModel())); //$NON-NLS-1$
-
}
/**
@@ -797,7 +801,6 @@ public class CollaborationRoleNameEditPartCN extends PapyrusCompartmentEditPart public void deactivate() {
removeOwnerElementListeners();
super.deactivate();
-
}
/**
@@ -805,6 +808,5 @@ public class CollaborationRoleNameEditPartCN extends PapyrusCompartmentEditPart */
protected void removeOwnerElementListeners() {
removeListenerFilter(ADD_PARENT_MODEL);
-
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/CollaborationUseEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/CollaborationUseEditPartCN.java index 2be03b48288..2894ac8f01b 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/CollaborationUseEditPartCN.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/CollaborationUseEditPartCN.java @@ -26,6 +26,7 @@ import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout; import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure;
import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IPapyrusNodeFigure;
import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.SelectableBorderedNodeFigure;
import org.eclipse.papyrus.uml.diagram.common.editparts.NamedElementEditPart;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy;
@@ -112,7 +113,6 @@ public class CollaborationUseEditPartCN extends NamedElementEditPart { **/
protected void handleNotificationEvent(Notification event) {
super.handleNotificationEvent(event);
-
}
/**
@@ -139,8 +139,6 @@ public class CollaborationUseEditPartCN extends NamedElementEditPart { ((CollaborationUseNameEditPart)childEditPart).setLabel(getPrimaryShape().getNameLabel());
return true;
}
-
-
return false;
}
@@ -199,7 +197,6 @@ public class CollaborationUseEditPartCN extends NamedElementEditPart { */
protected NodeFigure createNodeFigure() {
return new SelectableBorderedNodeFigure(createMainFigureWithSVG());
-
}
/**
@@ -249,8 +246,8 @@ public class CollaborationUseEditPartCN extends NamedElementEditPart { * @generated
*/
protected void setLineType(int style) {
- if(primaryShape instanceof NodeFigure) {
- ((NodeFigure)primaryShape).setLineStyle(style);
+ if(primaryShape instanceof IPapyrusNodeFigure) {
+ ((IPapyrusNodeFigure)primaryShape).setLineStyle(style);
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/CollaborationUseNameEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/CollaborationUseNameEditPart.java index dad18deef6b..13910659def 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/CollaborationUseNameEditPart.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/CollaborationUseNameEditPart.java @@ -64,6 +64,7 @@ import org.eclipse.papyrus.infra.emf.appearance.helper.VisualInformationPapyrusC import org.eclipse.papyrus.infra.gmfdiag.common.editpart.IControlParserForDirectEdit;
import org.eclipse.papyrus.infra.gmfdiag.common.editpart.PapyrusCompartmentEditPart;
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;
@@ -322,7 +323,6 @@ public class CollaborationUseNameEditPart extends PapyrusCompartmentEditPart imp ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -409,9 +409,7 @@ public class CollaborationUseNameEditPart extends PapyrusCompartmentEditPart imp * @generated
*/
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
@@ -444,7 +442,6 @@ public class CollaborationUseNameEditPart extends PapyrusCompartmentEditPart imp return;
}
final Dialog finalDialog = dialog;
-
if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@@ -452,7 +449,6 @@ public class CollaborationUseNameEditPart extends PapyrusCompartmentEditPart imp @Override
protected void doExecute() {
configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
-
}
};
domain.getCommandStack().execute(command);
@@ -509,8 +505,17 @@ public class CollaborationUseNameEditPart extends PapyrusCompartmentEditPart imp 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) {
@@ -631,7 +636,6 @@ public class CollaborationUseNameEditPart extends PapyrusCompartmentEditPart imp if(checkDefaultEdition()) {
return IDirectEdition.DEFAULT_DIRECT_EDITOR;
}
-
// not a named element. no specific editor => do nothing
return IDirectEdition.NO_DIRECT_EDITION;
}
@@ -798,7 +802,6 @@ public class CollaborationUseNameEditPart extends PapyrusCompartmentEditPart imp */
protected void addOwnerElementListeners() {
addListenerFilter(ADD_PARENT_MODEL, this, ((View)getParent().getModel())); //$NON-NLS-1$
-
}
/**
@@ -807,7 +810,6 @@ public class CollaborationUseNameEditPart extends PapyrusCompartmentEditPart imp public void deactivate() {
removeOwnerElementListeners();
super.deactivate();
-
}
/**
@@ -815,6 +817,5 @@ public class CollaborationUseNameEditPart extends PapyrusCompartmentEditPart imp */
protected void removeOwnerElementListeners() {
removeListenerFilter(ADD_PARENT_MODEL);
-
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/CommentBodyEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/CommentBodyEditPart.java index 06a957f94ab..b4960f7ae6d 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/CommentBodyEditPart.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/CommentBodyEditPart.java @@ -61,6 +61,7 @@ import org.eclipse.papyrus.extensionpoints.editors.utils.IDirectEditorsIds; import org.eclipse.papyrus.infra.gmfdiag.common.editpart.IControlParserForDirectEdit;
import org.eclipse.papyrus.infra.gmfdiag.common.editpart.PapyrusCompartmentEditPart;
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;
@@ -306,7 +307,6 @@ public class CommentBodyEditPart extends PapyrusCompartmentEditPart implements I ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -393,9 +393,7 @@ public class CommentBodyEditPart extends PapyrusCompartmentEditPart implements I * @generated
*/
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
@@ -428,7 +426,6 @@ public class CommentBodyEditPart extends PapyrusCompartmentEditPart implements I return;
}
final Dialog finalDialog = dialog;
-
if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@@ -436,7 +433,6 @@ public class CommentBodyEditPart extends PapyrusCompartmentEditPart implements I @Override
protected void doExecute() {
configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
-
}
};
domain.getCommandStack().execute(command);
@@ -493,8 +489,17 @@ public class CommentBodyEditPart extends PapyrusCompartmentEditPart implements I 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) {
@@ -615,7 +620,6 @@ public class CommentBodyEditPart extends PapyrusCompartmentEditPart implements I if(checkDefaultEdition()) {
return IDirectEdition.DEFAULT_DIRECT_EDITOR;
}
-
// not a named element. no specific editor => do nothing
return IDirectEdition.NO_DIRECT_EDITION;
}
@@ -779,7 +783,6 @@ public class CommentBodyEditPart extends PapyrusCompartmentEditPart implements I */
protected void addOwnerElementListeners() {
addListenerFilter(ADD_PARENT_MODEL, this, ((View)getParent().getModel())); //$NON-NLS-1$
-
}
/**
@@ -788,7 +791,6 @@ public class CommentBodyEditPart extends PapyrusCompartmentEditPart implements I public void deactivate() {
removeOwnerElementListeners();
super.deactivate();
-
}
/**
@@ -796,6 +798,5 @@ public class CommentBodyEditPart extends PapyrusCompartmentEditPart implements I */
protected void removeOwnerElementListeners() {
removeListenerFilter(ADD_PARENT_MODEL);
-
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/CommentBodyEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/CommentBodyEditPartCN.java index 3933301ef07..d24f05a5fe9 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/CommentBodyEditPartCN.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/CommentBodyEditPartCN.java @@ -61,6 +61,7 @@ import org.eclipse.papyrus.extensionpoints.editors.utils.IDirectEditorsIds; import org.eclipse.papyrus.infra.gmfdiag.common.editpart.IControlParserForDirectEdit;
import org.eclipse.papyrus.infra.gmfdiag.common.editpart.PapyrusCompartmentEditPart;
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;
@@ -306,7 +307,6 @@ public class CommentBodyEditPartCN extends PapyrusCompartmentEditPart implements ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -393,9 +393,7 @@ public class CommentBodyEditPartCN extends PapyrusCompartmentEditPart implements * @generated
*/
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
@@ -428,7 +426,6 @@ public class CommentBodyEditPartCN extends PapyrusCompartmentEditPart implements return;
}
final Dialog finalDialog = dialog;
-
if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@@ -436,7 +433,6 @@ public class CommentBodyEditPartCN extends PapyrusCompartmentEditPart implements @Override
protected void doExecute() {
configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
-
}
};
domain.getCommandStack().execute(command);
@@ -493,8 +489,17 @@ public class CommentBodyEditPartCN extends PapyrusCompartmentEditPart implements 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) {
@@ -615,7 +620,6 @@ public class CommentBodyEditPartCN extends PapyrusCompartmentEditPart implements if(checkDefaultEdition()) {
return IDirectEdition.DEFAULT_DIRECT_EDITOR;
}
-
// not a named element. no specific editor => do nothing
return IDirectEdition.NO_DIRECT_EDITION;
}
@@ -779,7 +783,6 @@ public class CommentBodyEditPartCN extends PapyrusCompartmentEditPart implements */
protected void addOwnerElementListeners() {
addListenerFilter(ADD_PARENT_MODEL, this, ((View)getParent().getModel())); //$NON-NLS-1$
-
}
/**
@@ -788,7 +791,6 @@ public class CommentBodyEditPartCN extends PapyrusCompartmentEditPart implements public void deactivate() {
removeOwnerElementListeners();
super.deactivate();
-
}
/**
@@ -796,6 +798,5 @@ public class CommentBodyEditPartCN extends PapyrusCompartmentEditPart implements */
protected void removeOwnerElementListeners() {
removeListenerFilter(ADD_PARENT_MODEL);
-
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/CommentEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/CommentEditPart.java index 81e1cae987b..a1de068bb7b 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/CommentEditPart.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/CommentEditPart.java @@ -26,6 +26,7 @@ import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout; import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure;
import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IPapyrusNodeFigure;
import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.SelectableBorderedNodeFigure;
import org.eclipse.papyrus.uml.diagram.common.editparts.AbstractCommentEditPart;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy;
@@ -106,7 +107,6 @@ public class CommentEditPart extends AbstractCommentEditPart { **/
protected void handleNotificationEvent(Notification event) {
super.handleNotificationEvent(event);
-
}
/**
@@ -133,8 +133,6 @@ public class CommentEditPart extends AbstractCommentEditPart { ((CommentBodyEditPart)childEditPart).setLabel(getPrimaryShape().getCornerBentFigure());
return true;
}
-
-
return false;
}
@@ -193,7 +191,6 @@ public class CommentEditPart extends AbstractCommentEditPart { */
protected NodeFigure createNodeFigure() {
return new SelectableBorderedNodeFigure(createMainFigureWithSVG());
-
}
/**
@@ -243,8 +240,8 @@ public class CommentEditPart extends AbstractCommentEditPart { * @generated
*/
protected void setLineType(int style) {
- if(primaryShape instanceof NodeFigure) {
- ((NodeFigure)primaryShape).setLineStyle(style);
+ if(primaryShape instanceof IPapyrusNodeFigure) {
+ ((IPapyrusNodeFigure)primaryShape).setLineStyle(style);
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/CommentEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/CommentEditPartCN.java index e224bfe5b7c..e49082b4397 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/CommentEditPartCN.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/CommentEditPartCN.java @@ -26,6 +26,7 @@ import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout; import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure;
import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IPapyrusNodeFigure;
import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.SelectableBorderedNodeFigure;
import org.eclipse.papyrus.uml.diagram.common.editparts.AbstractCommentEditPart;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy;
@@ -106,7 +107,6 @@ public class CommentEditPartCN extends AbstractCommentEditPart { **/
protected void handleNotificationEvent(Notification event) {
super.handleNotificationEvent(event);
-
}
/**
@@ -133,8 +133,6 @@ public class CommentEditPartCN extends AbstractCommentEditPart { ((CommentBodyEditPartCN)childEditPart).setLabel(getPrimaryShape().getCornerBentFigure());
return true;
}
-
-
return false;
}
@@ -193,7 +191,6 @@ public class CommentEditPartCN extends AbstractCommentEditPart { */
protected NodeFigure createNodeFigure() {
return new SelectableBorderedNodeFigure(createMainFigureWithSVG());
-
}
/**
@@ -243,8 +240,8 @@ public class CommentEditPartCN extends AbstractCommentEditPart { * @generated
*/
protected void setLineType(int style) {
- if(primaryShape instanceof NodeFigure) {
- ((NodeFigure)primaryShape).setLineStyle(style);
+ if(primaryShape instanceof IPapyrusNodeFigure) {
+ ((IPapyrusNodeFigure)primaryShape).setLineStyle(style);
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ComponentCompositeCompartmentEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ComponentCompositeCompartmentEditPart.java index 9b641debf32..7ea1b0d224c 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ComponentCompositeCompartmentEditPart.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ComponentCompositeCompartmentEditPart.java @@ -88,7 +88,6 @@ public class ComponentCompositeCompartmentEditPart extends ShapeCompartmentEditP * @generated
*/
public EditPart getTargetEditPart(Request request) {
-
return super.getTargetEditPart(request);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ComponentCompositeCompartmentEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ComponentCompositeCompartmentEditPartCN.java index c75a049855b..a0b3f03056c 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ComponentCompositeCompartmentEditPartCN.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ComponentCompositeCompartmentEditPartCN.java @@ -88,7 +88,6 @@ public class ComponentCompositeCompartmentEditPartCN extends ShapeCompartmentEdi * @generated
*/
public EditPart getTargetEditPart(Request request) {
-
return super.getTargetEditPart(request);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ComponentCompositeEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ComponentCompositeEditPart.java index 608cda77ea9..182e28a0d14 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ComponentCompositeEditPart.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ComponentCompositeEditPart.java @@ -30,6 +30,7 @@ import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout; import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure;
import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IPapyrusNodeFigure;
import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.SelectableBorderedNodeFigure;
import org.eclipse.papyrus.uml.diagram.common.editparts.NamedElementEditPart;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.AffixedNodeAlignmentEditPolicy;
@@ -136,7 +137,6 @@ public class ComponentCompositeEditPart extends NamedElementEditPart { **/
protected void handleNotificationEvent(Notification event) {
super.handleNotificationEvent(event);
-
}
/**
@@ -163,25 +163,18 @@ public class ComponentCompositeEditPart extends NamedElementEditPart { ((ComponentCompositeNameEditPart)childEditPart).setLabel(getPrimaryShape().getNameLabel());
return true;
}
-
-
if(childEditPart instanceof ComponentCompositeCompartmentEditPart) {
IFigure pane = getPrimaryShape().getCompositeCompartmentFigure();
setupContentPane(pane); // FIXME each comparment should handle his content pane in his own way
pane.add(((ComponentCompositeCompartmentEditPart)childEditPart).getFigure());
return true;
}
-
-
-
//Papyrus Gencode :Affixed Port locator
if(childEditPart instanceof PortEditPart) {
IBorderItemLocator locator = new PortPositionLocator(getMainFigure(), PositionConstants.NONE);
getBorderedFigure().getBorderItemContainer().add(((PortEditPart)childEditPart).getFigure(), locator);
return true;
}
-
-
return false;
}
@@ -255,7 +248,6 @@ public class ComponentCompositeEditPart extends NamedElementEditPart { */
protected NodeFigure createMainFigure() {
return new SelectableBorderedNodeFigure(createMainFigureWithSVG());
-
}
/**
@@ -305,8 +297,8 @@ public class ComponentCompositeEditPart extends NamedElementEditPart { * @generated
*/
protected void setLineType(int style) {
- if(primaryShape instanceof NodeFigure) {
- ((NodeFigure)primaryShape).setLineStyle(style);
+ if(primaryShape instanceof IPapyrusNodeFigure) {
+ ((IPapyrusNodeFigure)primaryShape).setLineStyle(style);
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ComponentCompositeEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ComponentCompositeEditPartCN.java index 29c096d58b0..e96cc8938ce 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ComponentCompositeEditPartCN.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ComponentCompositeEditPartCN.java @@ -30,6 +30,7 @@ import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout; import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure;
import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IPapyrusNodeFigure;
import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.SelectableBorderedNodeFigure;
import org.eclipse.papyrus.uml.diagram.common.editparts.NamedElementEditPart;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.AffixedNodeAlignmentEditPolicy;
@@ -136,7 +137,6 @@ public class ComponentCompositeEditPartCN extends NamedElementEditPart { **/
protected void handleNotificationEvent(Notification event) {
super.handleNotificationEvent(event);
-
}
/**
@@ -163,25 +163,18 @@ public class ComponentCompositeEditPartCN extends NamedElementEditPart { ((ComponentCompositeNameEditPartCN)childEditPart).setLabel(getPrimaryShape().getNameLabel());
return true;
}
-
-
if(childEditPart instanceof ComponentCompositeCompartmentEditPartCN) {
IFigure pane = getPrimaryShape().getCompositeCompartmentFigure();
setupContentPane(pane); // FIXME each comparment should handle his content pane in his own way
pane.add(((ComponentCompositeCompartmentEditPartCN)childEditPart).getFigure());
return true;
}
-
-
-
//Papyrus Gencode :Affixed Port locator
if(childEditPart instanceof PortEditPart) {
IBorderItemLocator locator = new PortPositionLocator(getMainFigure(), PositionConstants.NONE);
getBorderedFigure().getBorderItemContainer().add(((PortEditPart)childEditPart).getFigure(), locator);
return true;
}
-
-
return false;
}
@@ -255,7 +248,6 @@ public class ComponentCompositeEditPartCN extends NamedElementEditPart { */
protected NodeFigure createMainFigure() {
return new SelectableBorderedNodeFigure(createMainFigureWithSVG());
-
}
/**
@@ -305,8 +297,8 @@ public class ComponentCompositeEditPartCN extends NamedElementEditPart { * @generated
*/
protected void setLineType(int style) {
- if(primaryShape instanceof NodeFigure) {
- ((NodeFigure)primaryShape).setLineStyle(style);
+ if(primaryShape instanceof IPapyrusNodeFigure) {
+ ((IPapyrusNodeFigure)primaryShape).setLineStyle(style);
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ComponentCompositeNameEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ComponentCompositeNameEditPart.java index 6d959620204..d16e582dbb2 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ComponentCompositeNameEditPart.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ComponentCompositeNameEditPart.java @@ -64,6 +64,7 @@ import org.eclipse.papyrus.infra.emf.appearance.helper.VisualInformationPapyrusC import org.eclipse.papyrus.infra.gmfdiag.common.editpart.IControlParserForDirectEdit;
import org.eclipse.papyrus.infra.gmfdiag.common.editpart.PapyrusCompartmentEditPart;
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;
@@ -320,7 +321,6 @@ public class ComponentCompositeNameEditPart extends PapyrusCompartmentEditPart i ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -407,9 +407,7 @@ public class ComponentCompositeNameEditPart extends PapyrusCompartmentEditPart i * @generated
*/
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
@@ -442,7 +440,6 @@ public class ComponentCompositeNameEditPart extends PapyrusCompartmentEditPart i return;
}
final Dialog finalDialog = dialog;
-
if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@@ -450,7 +447,6 @@ public class ComponentCompositeNameEditPart extends PapyrusCompartmentEditPart i @Override
protected void doExecute() {
configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
-
}
};
domain.getCommandStack().execute(command);
@@ -507,8 +503,17 @@ public class ComponentCompositeNameEditPart extends PapyrusCompartmentEditPart i 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) {
@@ -629,7 +634,6 @@ public class ComponentCompositeNameEditPart extends PapyrusCompartmentEditPart i if(checkDefaultEdition()) {
return IDirectEdition.DEFAULT_DIRECT_EDITOR;
}
-
// not a named element. no specific editor => do nothing
return IDirectEdition.NO_DIRECT_EDITION;
}
@@ -796,7 +800,6 @@ public class ComponentCompositeNameEditPart extends PapyrusCompartmentEditPart i */
protected void addOwnerElementListeners() {
addListenerFilter(ADD_PARENT_MODEL, this, ((View)getParent().getModel())); //$NON-NLS-1$
-
}
/**
@@ -805,7 +808,6 @@ public class ComponentCompositeNameEditPart extends PapyrusCompartmentEditPart i public void deactivate() {
removeOwnerElementListeners();
super.deactivate();
-
}
/**
@@ -813,6 +815,5 @@ public class ComponentCompositeNameEditPart extends PapyrusCompartmentEditPart i */
protected void removeOwnerElementListeners() {
removeListenerFilter(ADD_PARENT_MODEL);
-
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ComponentCompositeNameEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ComponentCompositeNameEditPartCN.java index ea57c2434fa..468aafc7e18 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ComponentCompositeNameEditPartCN.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ComponentCompositeNameEditPartCN.java @@ -64,6 +64,7 @@ import org.eclipse.papyrus.infra.emf.appearance.helper.VisualInformationPapyrusC import org.eclipse.papyrus.infra.gmfdiag.common.editpart.IControlParserForDirectEdit;
import org.eclipse.papyrus.infra.gmfdiag.common.editpart.PapyrusCompartmentEditPart;
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;
@@ -320,7 +321,6 @@ public class ComponentCompositeNameEditPartCN extends PapyrusCompartmentEditPart ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -407,9 +407,7 @@ public class ComponentCompositeNameEditPartCN extends PapyrusCompartmentEditPart * @generated
*/
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
@@ -442,7 +440,6 @@ public class ComponentCompositeNameEditPartCN extends PapyrusCompartmentEditPart return;
}
final Dialog finalDialog = dialog;
-
if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@@ -450,7 +447,6 @@ public class ComponentCompositeNameEditPartCN extends PapyrusCompartmentEditPart @Override
protected void doExecute() {
configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
-
}
};
domain.getCommandStack().execute(command);
@@ -507,8 +503,17 @@ public class ComponentCompositeNameEditPartCN extends PapyrusCompartmentEditPart 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) {
@@ -629,7 +634,6 @@ public class ComponentCompositeNameEditPartCN extends PapyrusCompartmentEditPart if(checkDefaultEdition()) {
return IDirectEdition.DEFAULT_DIRECT_EDITOR;
}
-
// not a named element. no specific editor => do nothing
return IDirectEdition.NO_DIRECT_EDITION;
}
@@ -796,7 +800,6 @@ public class ComponentCompositeNameEditPartCN extends PapyrusCompartmentEditPart */
protected void addOwnerElementListeners() {
addListenerFilter(ADD_PARENT_MODEL, this, ((View)getParent().getModel())); //$NON-NLS-1$
-
}
/**
@@ -805,7 +808,6 @@ public class ComponentCompositeNameEditPartCN extends PapyrusCompartmentEditPart public void deactivate() {
removeOwnerElementListeners();
super.deactivate();
-
}
/**
@@ -813,6 +815,5 @@ public class ComponentCompositeNameEditPartCN extends PapyrusCompartmentEditPart */
protected void removeOwnerElementListeners() {
removeListenerFilter(ADD_PARENT_MODEL);
-
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ComponentRealizationAppliedStereotypeEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ComponentRealizationAppliedStereotypeEditPart.java index acd91e2cd51..a887380b1de 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ComponentRealizationAppliedStereotypeEditPart.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ComponentRealizationAppliedStereotypeEditPart.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 ComponentRealizationAppliedStereotypeEditPart extends PapyrusLabelE ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -406,9 +406,7 @@ public class ComponentRealizationAppliedStereotypeEditPart extends PapyrusLabelE * @generated
*/
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
@@ -441,7 +439,6 @@ public class ComponentRealizationAppliedStereotypeEditPart extends PapyrusLabelE 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 ComponentRealizationAppliedStereotypeEditPart extends PapyrusLabelE @Override
protected void doExecute() {
configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
-
}
};
domain.getCommandStack().execute(command);
@@ -506,8 +502,17 @@ public class ComponentRealizationAppliedStereotypeEditPart extends PapyrusLabelE 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 ComponentRealizationAppliedStereotypeEditPart extends PapyrusLabelE }
}
}
-
super.handleNotificationEvent(event);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ComponentRealizationNameEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ComponentRealizationNameEditPart.java index 1f1980e1e95..8c195296e21 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ComponentRealizationNameEditPart.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ComponentRealizationNameEditPart.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 ComponentRealizationNameEditPart extends PapyrusLabelEditPart imple ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -406,9 +406,7 @@ public class ComponentRealizationNameEditPart extends PapyrusLabelEditPart imple * @generated
*/
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
@@ -441,7 +439,6 @@ public class ComponentRealizationNameEditPart extends PapyrusLabelEditPart imple 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 ComponentRealizationNameEditPart extends PapyrusLabelEditPart imple @Override
protected void doExecute() {
configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
-
}
};
domain.getCommandStack().execute(command);
@@ -506,8 +502,17 @@ public class ComponentRealizationNameEditPart extends PapyrusLabelEditPart imple 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) {
@@ -628,7 +633,6 @@ public class ComponentRealizationNameEditPart extends PapyrusLabelEditPart imple if(checkDefaultEdition()) {
return IDirectEdition.DEFAULT_DIRECT_EDITOR;
}
-
// not a named element. no specific editor => do nothing
return IDirectEdition.NO_DIRECT_EDITION;
}
@@ -746,7 +750,6 @@ public class ComponentRealizationNameEditPart extends PapyrusLabelEditPart imple }
}
}
-
super.handleNotificationEvent(event);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/CompositeStructureDiagramEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/CompositeStructureDiagramEditPart.java index 447e98930ff..5823cb52a2c 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/CompositeStructureDiagramEditPart.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/CompositeStructureDiagramEditPart.java @@ -47,10 +47,8 @@ public class CompositeStructureDiagramEditPart extends PapyrusDiagramEditPart { */
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
-
installEditPolicy(EditPolicyRoles.CREATION_ROLE, new PapyrusCreationEditPolicy());
installEditPolicy(DuplicatePasteEditPolicy.PASTE_ROLE, new DuplicatePasteEditPolicy());
-
installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new CompositeStructureDiagramItemSemanticEditPolicy());
installEditPolicy("REMOVE_ORPHAN_VIEW", new RemoveOrphanViewPolicy()); //$NON-NLS-1$
installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new CustomDiagramDragDropEditPolicy());
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ConnectorAppliedStereotypeEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ConnectorAppliedStereotypeEditPart.java index ff6ef9560ae..8598c935c52 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ConnectorAppliedStereotypeEditPart.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ConnectorAppliedStereotypeEditPart.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 ConnectorAppliedStereotypeEditPart extends PapyrusLabelEditPart imp ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -406,9 +406,7 @@ public class ConnectorAppliedStereotypeEditPart extends PapyrusLabelEditPart imp * @generated
*/
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
@@ -441,7 +439,6 @@ public class ConnectorAppliedStereotypeEditPart extends PapyrusLabelEditPart imp 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 ConnectorAppliedStereotypeEditPart extends PapyrusLabelEditPart imp @Override
protected void doExecute() {
configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
-
}
};
domain.getCommandStack().execute(command);
@@ -506,8 +502,17 @@ public class ConnectorAppliedStereotypeEditPart extends PapyrusLabelEditPart imp 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 ConnectorAppliedStereotypeEditPart extends PapyrusLabelEditPart imp }
}
}
-
super.handleNotificationEvent(event);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ConnectorMultiplicitySourceEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ConnectorMultiplicitySourceEditPart.java index cb5545ba1c7..02b04a71d21 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ConnectorMultiplicitySourceEditPart.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ConnectorMultiplicitySourceEditPart.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 ConnectorMultiplicitySourceEditPart extends PapyrusLabelEditPart im ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -406,9 +406,7 @@ public class ConnectorMultiplicitySourceEditPart extends PapyrusLabelEditPart im * @generated
*/
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
@@ -441,7 +439,6 @@ public class ConnectorMultiplicitySourceEditPart extends PapyrusLabelEditPart im 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 ConnectorMultiplicitySourceEditPart extends PapyrusLabelEditPart im @Override
protected void doExecute() {
configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
-
}
};
domain.getCommandStack().execute(command);
@@ -506,8 +502,17 @@ public class ConnectorMultiplicitySourceEditPart extends PapyrusLabelEditPart im 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 ConnectorMultiplicitySourceEditPart extends PapyrusLabelEditPart im }
}
}
-
super.handleNotificationEvent(event);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ConnectorMultiplicityTargetEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ConnectorMultiplicityTargetEditPart.java index fd616b90007..24639ee8979 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ConnectorMultiplicityTargetEditPart.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ConnectorMultiplicityTargetEditPart.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 ConnectorMultiplicityTargetEditPart extends PapyrusLabelEditPart im ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -406,9 +406,7 @@ public class ConnectorMultiplicityTargetEditPart extends PapyrusLabelEditPart im * @generated
*/
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
@@ -441,7 +439,6 @@ public class ConnectorMultiplicityTargetEditPart extends PapyrusLabelEditPart im 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 ConnectorMultiplicityTargetEditPart extends PapyrusLabelEditPart im @Override
protected void doExecute() {
configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
-
}
};
domain.getCommandStack().execute(command);
@@ -506,8 +502,17 @@ public class ConnectorMultiplicityTargetEditPart extends PapyrusLabelEditPart im 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 ConnectorMultiplicityTargetEditPart extends PapyrusLabelEditPart im }
}
}
-
super.handleNotificationEvent(event);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ConnectorNameEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ConnectorNameEditPart.java index af6b894f964..560c5dc0707 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ConnectorNameEditPart.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ConnectorNameEditPart.java @@ -64,6 +64,7 @@ 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.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;
@@ -333,7 +334,6 @@ public class ConnectorNameEditPart extends PapyrusLabelEditPart implements IText ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -420,9 +420,7 @@ public class ConnectorNameEditPart extends PapyrusLabelEditPart implements IText * @generated
*/
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
@@ -455,7 +453,6 @@ public class ConnectorNameEditPart extends PapyrusLabelEditPart implements IText return;
}
final Dialog finalDialog = dialog;
-
if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@@ -463,7 +460,6 @@ public class ConnectorNameEditPart extends PapyrusLabelEditPart implements IText @Override
protected void doExecute() {
configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
-
}
};
domain.getCommandStack().execute(command);
@@ -520,8 +516,17 @@ public class ConnectorNameEditPart extends PapyrusLabelEditPart implements IText 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) {
@@ -642,7 +647,6 @@ public class ConnectorNameEditPart extends PapyrusLabelEditPart implements IText if(checkDefaultEdition()) {
return IDirectEdition.DEFAULT_DIRECT_EDITOR;
}
-
// not a named element. no specific editor => do nothing
return IDirectEdition.NO_DIRECT_EDITION;
}
@@ -760,7 +764,6 @@ public class ConnectorNameEditPart extends PapyrusLabelEditPart implements IText }
}
}
-
if(event.getNewValue() instanceof EAnnotation && VisualInformationPapyrusConstants.DISPLAY_NAMELABELICON.equals(((EAnnotation)event.getNewValue()).getSource())) {
refreshLabel();
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ConstraintEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ConstraintEditPart.java index e903ab34f53..c5e969b2d28 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ConstraintEditPart.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ConstraintEditPart.java @@ -26,6 +26,7 @@ import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout; import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure;
import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IPapyrusNodeFigure;
import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.SelectableBorderedNodeFigure;
import org.eclipse.papyrus.uml.diagram.common.editparts.AbstractConstraintEditPart;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy;
@@ -106,7 +107,6 @@ public class ConstraintEditPart extends AbstractConstraintEditPart { **/
protected void handleNotificationEvent(Notification event) {
super.handleNotificationEvent(event);
-
}
/**
@@ -137,8 +137,6 @@ public class ConstraintEditPart extends AbstractConstraintEditPart { ((ConstraintSpecificationEditPart)childEditPart).setLabel(getPrimaryShape().getConstraintFigure());
return true;
}
-
-
return false;
}
@@ -200,7 +198,6 @@ public class ConstraintEditPart extends AbstractConstraintEditPart { */
protected NodeFigure createNodeFigure() {
return new SelectableBorderedNodeFigure(createMainFigureWithSVG());
-
}
/**
@@ -250,8 +247,8 @@ public class ConstraintEditPart extends AbstractConstraintEditPart { * @generated
*/
protected void setLineType(int style) {
- if(primaryShape instanceof NodeFigure) {
- ((NodeFigure)primaryShape).setLineStyle(style);
+ if(primaryShape instanceof IPapyrusNodeFigure) {
+ ((IPapyrusNodeFigure)primaryShape).setLineStyle(style);
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ConstraintEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ConstraintEditPartCN.java index 7fe4c2682dd..fb39dd7bfd5 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ConstraintEditPartCN.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ConstraintEditPartCN.java @@ -26,6 +26,7 @@ import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout; import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure;
import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IPapyrusNodeFigure;
import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.SelectableBorderedNodeFigure;
import org.eclipse.papyrus.uml.diagram.common.editparts.AbstractConstraintEditPart;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy;
@@ -106,7 +107,6 @@ public class ConstraintEditPartCN extends AbstractConstraintEditPart { **/
protected void handleNotificationEvent(Notification event) {
super.handleNotificationEvent(event);
-
}
/**
@@ -137,8 +137,6 @@ public class ConstraintEditPartCN extends AbstractConstraintEditPart { ((ConstraintSpecificationEditPartCN)childEditPart).setLabel(getPrimaryShape().getConstraintFigure());
return true;
}
-
-
return false;
}
@@ -200,7 +198,6 @@ public class ConstraintEditPartCN extends AbstractConstraintEditPart { */
protected NodeFigure createNodeFigure() {
return new SelectableBorderedNodeFigure(createMainFigureWithSVG());
-
}
/**
@@ -250,8 +247,8 @@ public class ConstraintEditPartCN extends AbstractConstraintEditPart { * @generated
*/
protected void setLineType(int style) {
- if(primaryShape instanceof NodeFigure) {
- ((NodeFigure)primaryShape).setLineStyle(style);
+ if(primaryShape instanceof IPapyrusNodeFigure) {
+ ((IPapyrusNodeFigure)primaryShape).setLineStyle(style);
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ConstraintNameEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ConstraintNameEditPart.java index 49d8e4faa87..c6405a7e33e 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ConstraintNameEditPart.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ConstraintNameEditPart.java @@ -64,6 +64,7 @@ import org.eclipse.papyrus.infra.emf.appearance.helper.VisualInformationPapyrusC import org.eclipse.papyrus.infra.gmfdiag.common.editpart.IControlParserForDirectEdit;
import org.eclipse.papyrus.infra.gmfdiag.common.editpart.PapyrusCompartmentEditPart;
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;
@@ -320,7 +321,6 @@ public class ConstraintNameEditPart extends PapyrusCompartmentEditPart implement ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -407,9 +407,7 @@ public class ConstraintNameEditPart extends PapyrusCompartmentEditPart implement * @generated
*/
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
@@ -442,7 +440,6 @@ public class ConstraintNameEditPart extends PapyrusCompartmentEditPart implement return;
}
final Dialog finalDialog = dialog;
-
if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@@ -450,7 +447,6 @@ public class ConstraintNameEditPart extends PapyrusCompartmentEditPart implement @Override
protected void doExecute() {
configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
-
}
};
domain.getCommandStack().execute(command);
@@ -507,8 +503,17 @@ public class ConstraintNameEditPart extends PapyrusCompartmentEditPart implement 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) {
@@ -629,7 +634,6 @@ public class ConstraintNameEditPart extends PapyrusCompartmentEditPart implement if(checkDefaultEdition()) {
return IDirectEdition.DEFAULT_DIRECT_EDITOR;
}
-
// not a named element. no specific editor => do nothing
return IDirectEdition.NO_DIRECT_EDITION;
}
@@ -796,7 +800,6 @@ public class ConstraintNameEditPart extends PapyrusCompartmentEditPart implement */
protected void addOwnerElementListeners() {
addListenerFilter(ADD_PARENT_MODEL, this, ((View)getParent().getModel())); //$NON-NLS-1$
-
}
/**
@@ -805,7 +808,6 @@ public class ConstraintNameEditPart extends PapyrusCompartmentEditPart implement public void deactivate() {
removeOwnerElementListeners();
super.deactivate();
-
}
/**
@@ -813,6 +815,5 @@ public class ConstraintNameEditPart extends PapyrusCompartmentEditPart implement */
protected void removeOwnerElementListeners() {
removeListenerFilter(ADD_PARENT_MODEL);
-
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ConstraintNameEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ConstraintNameEditPartCN.java index 07fd67b2088..583b4e6516a 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ConstraintNameEditPartCN.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ConstraintNameEditPartCN.java @@ -64,6 +64,7 @@ import org.eclipse.papyrus.infra.emf.appearance.helper.VisualInformationPapyrusC import org.eclipse.papyrus.infra.gmfdiag.common.editpart.IControlParserForDirectEdit;
import org.eclipse.papyrus.infra.gmfdiag.common.editpart.PapyrusCompartmentEditPart;
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;
@@ -320,7 +321,6 @@ public class ConstraintNameEditPartCN extends PapyrusCompartmentEditPart impleme ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -407,9 +407,7 @@ public class ConstraintNameEditPartCN extends PapyrusCompartmentEditPart impleme * @generated
*/
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
@@ -442,7 +440,6 @@ public class ConstraintNameEditPartCN extends PapyrusCompartmentEditPart impleme return;
}
final Dialog finalDialog = dialog;
-
if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@@ -450,7 +447,6 @@ public class ConstraintNameEditPartCN extends PapyrusCompartmentEditPart impleme @Override
protected void doExecute() {
configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
-
}
};
domain.getCommandStack().execute(command);
@@ -507,8 +503,17 @@ public class ConstraintNameEditPartCN extends PapyrusCompartmentEditPart impleme 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) {
@@ -629,7 +634,6 @@ public class ConstraintNameEditPartCN extends PapyrusCompartmentEditPart impleme if(checkDefaultEdition()) {
return IDirectEdition.DEFAULT_DIRECT_EDITOR;
}
-
// not a named element. no specific editor => do nothing
return IDirectEdition.NO_DIRECT_EDITION;
}
@@ -796,7 +800,6 @@ public class ConstraintNameEditPartCN extends PapyrusCompartmentEditPart impleme */
protected void addOwnerElementListeners() {
addListenerFilter(ADD_PARENT_MODEL, this, ((View)getParent().getModel())); //$NON-NLS-1$
-
}
/**
@@ -805,7 +808,6 @@ public class ConstraintNameEditPartCN extends PapyrusCompartmentEditPart impleme public void deactivate() {
removeOwnerElementListeners();
super.deactivate();
-
}
/**
@@ -813,6 +815,5 @@ public class ConstraintNameEditPartCN extends PapyrusCompartmentEditPart impleme */
protected void removeOwnerElementListeners() {
removeListenerFilter(ADD_PARENT_MODEL);
-
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ConstraintSpecificationEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ConstraintSpecificationEditPart.java index 68344bd166d..c2ddfc25918 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ConstraintSpecificationEditPart.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ConstraintSpecificationEditPart.java @@ -61,6 +61,7 @@ import org.eclipse.papyrus.extensionpoints.editors.utils.IDirectEditorsIds; import org.eclipse.papyrus.infra.gmfdiag.common.editpart.IControlParserForDirectEdit;
import org.eclipse.papyrus.infra.gmfdiag.common.editpart.PapyrusCompartmentEditPart;
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;
@@ -306,7 +307,6 @@ public class ConstraintSpecificationEditPart extends PapyrusCompartmentEditPart ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -393,9 +393,7 @@ public class ConstraintSpecificationEditPart extends PapyrusCompartmentEditPart * @generated
*/
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
@@ -428,7 +426,6 @@ public class ConstraintSpecificationEditPart extends PapyrusCompartmentEditPart return;
}
final Dialog finalDialog = dialog;
-
if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@@ -436,7 +433,6 @@ public class ConstraintSpecificationEditPart extends PapyrusCompartmentEditPart @Override
protected void doExecute() {
configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
-
}
};
domain.getCommandStack().execute(command);
@@ -493,8 +489,17 @@ public class ConstraintSpecificationEditPart extends PapyrusCompartmentEditPart 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) {
@@ -615,7 +620,6 @@ public class ConstraintSpecificationEditPart extends PapyrusCompartmentEditPart if(checkDefaultEdition()) {
return IDirectEdition.DEFAULT_DIRECT_EDITOR;
}
-
// not a named element. no specific editor => do nothing
return IDirectEdition.NO_DIRECT_EDITION;
}
@@ -779,7 +783,6 @@ public class ConstraintSpecificationEditPart extends PapyrusCompartmentEditPart */
protected void addOwnerElementListeners() {
addListenerFilter(ADD_PARENT_MODEL, this, ((View)getParent().getModel())); //$NON-NLS-1$
-
}
/**
@@ -788,7 +791,6 @@ public class ConstraintSpecificationEditPart extends PapyrusCompartmentEditPart public void deactivate() {
removeOwnerElementListeners();
super.deactivate();
-
}
/**
@@ -796,6 +798,5 @@ public class ConstraintSpecificationEditPart extends PapyrusCompartmentEditPart */
protected void removeOwnerElementListeners() {
removeListenerFilter(ADD_PARENT_MODEL);
-
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ConstraintSpecificationEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ConstraintSpecificationEditPartCN.java index 3be0e924013..25689369973 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ConstraintSpecificationEditPartCN.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ConstraintSpecificationEditPartCN.java @@ -61,6 +61,7 @@ import org.eclipse.papyrus.extensionpoints.editors.utils.IDirectEditorsIds; import org.eclipse.papyrus.infra.gmfdiag.common.editpart.IControlParserForDirectEdit;
import org.eclipse.papyrus.infra.gmfdiag.common.editpart.PapyrusCompartmentEditPart;
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;
@@ -306,7 +307,6 @@ public class ConstraintSpecificationEditPartCN extends PapyrusCompartmentEditPar ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -393,9 +393,7 @@ public class ConstraintSpecificationEditPartCN extends PapyrusCompartmentEditPar * @generated
*/
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
@@ -428,7 +426,6 @@ public class ConstraintSpecificationEditPartCN extends PapyrusCompartmentEditPar return;
}
final Dialog finalDialog = dialog;
-
if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@@ -436,7 +433,6 @@ public class ConstraintSpecificationEditPartCN extends PapyrusCompartmentEditPar @Override
protected void doExecute() {
configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
-
}
};
domain.getCommandStack().execute(command);
@@ -493,8 +489,17 @@ public class ConstraintSpecificationEditPartCN extends PapyrusCompartmentEditPar 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) {
@@ -615,7 +620,6 @@ public class ConstraintSpecificationEditPartCN extends PapyrusCompartmentEditPar if(checkDefaultEdition()) {
return IDirectEdition.DEFAULT_DIRECT_EDITOR;
}
-
// not a named element. no specific editor => do nothing
return IDirectEdition.NO_DIRECT_EDITION;
}
@@ -779,7 +783,6 @@ public class ConstraintSpecificationEditPartCN extends PapyrusCompartmentEditPar */
protected void addOwnerElementListeners() {
addListenerFilter(ADD_PARENT_MODEL, this, ((View)getParent().getModel())); //$NON-NLS-1$
-
}
/**
@@ -788,7 +791,6 @@ public class ConstraintSpecificationEditPartCN extends PapyrusCompartmentEditPar public void deactivate() {
removeOwnerElementListeners();
super.deactivate();
-
}
/**
@@ -796,6 +798,5 @@ public class ConstraintSpecificationEditPartCN extends PapyrusCompartmentEditPar */
protected void removeOwnerElementListeners() {
removeListenerFilter(ADD_PARENT_MODEL);
-
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DataTypeAttributeCompartmentEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DataTypeAttributeCompartmentEditPart.java index d0e7273f69c..a88fc663290 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DataTypeAttributeCompartmentEditPart.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DataTypeAttributeCompartmentEditPart.java @@ -91,7 +91,6 @@ public class DataTypeAttributeCompartmentEditPart extends ListCompartmentEditPar * @generated
*/
public EditPart getTargetEditPart(Request request) {
-
return super.getTargetEditPart(request);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DataTypeAttributeCompartmentEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DataTypeAttributeCompartmentEditPartCN.java index 1419771c90b..97a75752a71 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DataTypeAttributeCompartmentEditPartCN.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DataTypeAttributeCompartmentEditPartCN.java @@ -91,7 +91,6 @@ public class DataTypeAttributeCompartmentEditPartCN extends ListCompartmentEditP * @generated
*/
public EditPart getTargetEditPart(Request request) {
-
return super.getTargetEditPart(request);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DataTypeEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DataTypeEditPart.java index 6574d734a6a..5de114c1a48 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DataTypeEditPart.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DataTypeEditPart.java @@ -29,6 +29,7 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType; import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure;
import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IPapyrusNodeFigure;
import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.SelectableBorderedNodeFigure;
import org.eclipse.papyrus.uml.diagram.common.editparts.NamedElementEditPart;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy;
@@ -118,7 +119,6 @@ public class DataTypeEditPart extends NamedElementEditPart { **/
protected void handleNotificationEvent(Notification event) {
super.handleNotificationEvent(event);
-
}
/**
@@ -145,22 +145,18 @@ public class DataTypeEditPart extends NamedElementEditPart { ((DataTypeNameEditPart)childEditPart).setLabel(getPrimaryShape().getNameLabel());
return true;
}
-
-
if(childEditPart instanceof DataTypeAttributeCompartmentEditPart) {
IFigure pane = getPrimaryShape().getAttributeCompartmentFigure();
setupContentPane(pane); // FIXME each comparment should handle his content pane in his own way
pane.add(((DataTypeAttributeCompartmentEditPart)childEditPart).getFigure());
return true;
}
-
if(childEditPart instanceof DataTypeOperationCompartmentEditPart) {
IFigure pane = getPrimaryShape().getOperationCompartmentFigure();
setupContentPane(pane); // FIXME each comparment should handle his content pane in his own way
pane.add(((DataTypeOperationCompartmentEditPart)childEditPart).getFigure());
return true;
}
-
return false;
}
@@ -235,7 +231,6 @@ public class DataTypeEditPart extends NamedElementEditPart { */
protected NodeFigure createNodeFigure() {
return new SelectableBorderedNodeFigure(createMainFigureWithSVG());
-
}
/**
@@ -285,8 +280,8 @@ public class DataTypeEditPart extends NamedElementEditPart { * @generated
*/
protected void setLineType(int style) {
- if(primaryShape instanceof NodeFigure) {
- ((NodeFigure)primaryShape).setLineStyle(style);
+ if(primaryShape instanceof IPapyrusNodeFigure) {
+ ((IPapyrusNodeFigure)primaryShape).setLineStyle(style);
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DataTypeEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DataTypeEditPartCN.java index 9ca138b74de..790ae3a0515 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DataTypeEditPartCN.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DataTypeEditPartCN.java @@ -29,6 +29,7 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType; import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure;
import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IPapyrusNodeFigure;
import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.SelectableBorderedNodeFigure;
import org.eclipse.papyrus.uml.diagram.common.editparts.NamedElementEditPart;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy;
@@ -118,7 +119,6 @@ public class DataTypeEditPartCN extends NamedElementEditPart { **/
protected void handleNotificationEvent(Notification event) {
super.handleNotificationEvent(event);
-
}
/**
@@ -145,22 +145,18 @@ public class DataTypeEditPartCN extends NamedElementEditPart { ((DataTypeNameEditPartCN)childEditPart).setLabel(getPrimaryShape().getNameLabel());
return true;
}
-
-
if(childEditPart instanceof DataTypeAttributeCompartmentEditPartCN) {
IFigure pane = getPrimaryShape().getAttributeCompartmentFigure();
setupContentPane(pane); // FIXME each comparment should handle his content pane in his own way
pane.add(((DataTypeAttributeCompartmentEditPartCN)childEditPart).getFigure());
return true;
}
-
if(childEditPart instanceof DataTypeOperationCompartmentEditPartCN) {
IFigure pane = getPrimaryShape().getOperationCompartmentFigure();
setupContentPane(pane); // FIXME each comparment should handle his content pane in his own way
pane.add(((DataTypeOperationCompartmentEditPartCN)childEditPart).getFigure());
return true;
}
-
return false;
}
@@ -235,7 +231,6 @@ public class DataTypeEditPartCN extends NamedElementEditPart { */
protected NodeFigure createNodeFigure() {
return new SelectableBorderedNodeFigure(createMainFigureWithSVG());
-
}
/**
@@ -285,8 +280,8 @@ public class DataTypeEditPartCN extends NamedElementEditPart { * @generated
*/
protected void setLineType(int style) {
- if(primaryShape instanceof NodeFigure) {
- ((NodeFigure)primaryShape).setLineStyle(style);
+ if(primaryShape instanceof IPapyrusNodeFigure) {
+ ((IPapyrusNodeFigure)primaryShape).setLineStyle(style);
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DataTypeNameEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DataTypeNameEditPart.java index 43e03e254b8..6ff7b0fff05 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DataTypeNameEditPart.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DataTypeNameEditPart.java @@ -64,6 +64,7 @@ import org.eclipse.papyrus.infra.emf.appearance.helper.VisualInformationPapyrusC import org.eclipse.papyrus.infra.gmfdiag.common.editpart.IControlParserForDirectEdit;
import org.eclipse.papyrus.infra.gmfdiag.common.editpart.PapyrusCompartmentEditPart;
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;
@@ -320,7 +321,6 @@ public class DataTypeNameEditPart extends PapyrusCompartmentEditPart implements ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -407,9 +407,7 @@ public class DataTypeNameEditPart extends PapyrusCompartmentEditPart implements * @generated
*/
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
@@ -442,7 +440,6 @@ public class DataTypeNameEditPart extends PapyrusCompartmentEditPart implements return;
}
final Dialog finalDialog = dialog;
-
if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@@ -450,7 +447,6 @@ public class DataTypeNameEditPart extends PapyrusCompartmentEditPart implements @Override
protected void doExecute() {
configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
-
}
};
domain.getCommandStack().execute(command);
@@ -507,8 +503,17 @@ public class DataTypeNameEditPart extends PapyrusCompartmentEditPart implements 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) {
@@ -629,7 +634,6 @@ public class DataTypeNameEditPart extends PapyrusCompartmentEditPart implements if(checkDefaultEdition()) {
return IDirectEdition.DEFAULT_DIRECT_EDITOR;
}
-
// not a named element. no specific editor => do nothing
return IDirectEdition.NO_DIRECT_EDITION;
}
@@ -796,7 +800,6 @@ public class DataTypeNameEditPart extends PapyrusCompartmentEditPart implements */
protected void addOwnerElementListeners() {
addListenerFilter(ADD_PARENT_MODEL, this, ((View)getParent().getModel())); //$NON-NLS-1$
-
}
/**
@@ -805,7 +808,6 @@ public class DataTypeNameEditPart extends PapyrusCompartmentEditPart implements public void deactivate() {
removeOwnerElementListeners();
super.deactivate();
-
}
/**
@@ -813,6 +815,5 @@ public class DataTypeNameEditPart extends PapyrusCompartmentEditPart implements */
protected void removeOwnerElementListeners() {
removeListenerFilter(ADD_PARENT_MODEL);
-
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DataTypeNameEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DataTypeNameEditPartCN.java index cf6cb2f667b..5e6a9c652de 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DataTypeNameEditPartCN.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DataTypeNameEditPartCN.java @@ -64,6 +64,7 @@ import org.eclipse.papyrus.infra.emf.appearance.helper.VisualInformationPapyrusC import org.eclipse.papyrus.infra.gmfdiag.common.editpart.IControlParserForDirectEdit;
import org.eclipse.papyrus.infra.gmfdiag.common.editpart.PapyrusCompartmentEditPart;
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;
@@ -320,7 +321,6 @@ public class DataTypeNameEditPartCN extends PapyrusCompartmentEditPart implement ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -407,9 +407,7 @@ public class DataTypeNameEditPartCN extends PapyrusCompartmentEditPart implement * @generated
*/
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
@@ -442,7 +440,6 @@ public class DataTypeNameEditPartCN extends PapyrusCompartmentEditPart implement return;
}
final Dialog finalDialog = dialog;
-
if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@@ -450,7 +447,6 @@ public class DataTypeNameEditPartCN extends PapyrusCompartmentEditPart implement @Override
protected void doExecute() {
configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
-
}
};
domain.getCommandStack().execute(command);
@@ -507,8 +503,17 @@ public class DataTypeNameEditPartCN extends PapyrusCompartmentEditPart implement 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) {
@@ -629,7 +634,6 @@ public class DataTypeNameEditPartCN extends PapyrusCompartmentEditPart implement if(checkDefaultEdition()) {
return IDirectEdition.DEFAULT_DIRECT_EDITOR;
}
-
// not a named element. no specific editor => do nothing
return IDirectEdition.NO_DIRECT_EDITION;
}
@@ -796,7 +800,6 @@ public class DataTypeNameEditPartCN extends PapyrusCompartmentEditPart implement */
protected void addOwnerElementListeners() {
addListenerFilter(ADD_PARENT_MODEL, this, ((View)getParent().getModel())); //$NON-NLS-1$
-
}
/**
@@ -805,7 +808,6 @@ public class DataTypeNameEditPartCN extends PapyrusCompartmentEditPart implement public void deactivate() {
removeOwnerElementListeners();
super.deactivate();
-
}
/**
@@ -813,6 +815,5 @@ public class DataTypeNameEditPartCN extends PapyrusCompartmentEditPart implement */
protected void removeOwnerElementListeners() {
removeListenerFilter(ADD_PARENT_MODEL);
-
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DataTypeOperationCompartmentEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DataTypeOperationCompartmentEditPart.java index a8e5c7ba56e..f9fdcfe844b 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DataTypeOperationCompartmentEditPart.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DataTypeOperationCompartmentEditPart.java @@ -91,7 +91,6 @@ public class DataTypeOperationCompartmentEditPart extends ListCompartmentEditPar * @generated
*/
public EditPart getTargetEditPart(Request request) {
-
return super.getTargetEditPart(request);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DataTypeOperationCompartmentEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DataTypeOperationCompartmentEditPartCN.java index 085c03968a5..98b9ccddfd2 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DataTypeOperationCompartmentEditPartCN.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DataTypeOperationCompartmentEditPartCN.java @@ -91,7 +91,6 @@ public class DataTypeOperationCompartmentEditPartCN extends ListCompartmentEditP * @generated
*/
public EditPart getTargetEditPart(Request request) {
-
return super.getTargetEditPart(request);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DependencyAppliedStereotypeEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DependencyAppliedStereotypeEditPart.java index 1da88d4e709..9e960e10196 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DependencyAppliedStereotypeEditPart.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DependencyAppliedStereotypeEditPart.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 DependencyAppliedStereotypeEditPart extends PapyrusLabelEditPart im ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -406,9 +406,7 @@ public class DependencyAppliedStereotypeEditPart extends PapyrusLabelEditPart im * @generated
*/
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
@@ -441,7 +439,6 @@ public class DependencyAppliedStereotypeEditPart extends PapyrusLabelEditPart im 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 DependencyAppliedStereotypeEditPart extends PapyrusLabelEditPart im @Override
protected void doExecute() {
configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
-
}
};
domain.getCommandStack().execute(command);
@@ -506,8 +502,17 @@ public class DependencyAppliedStereotypeEditPart extends PapyrusLabelEditPart im 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 DependencyAppliedStereotypeEditPart extends PapyrusLabelEditPart im }
}
}
-
super.handleNotificationEvent(event);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DependencyNameEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DependencyNameEditPart.java index 2c1de4e624d..52a247425ff 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DependencyNameEditPart.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DependencyNameEditPart.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 DependencyNameEditPart extends PapyrusLabelEditPart implements ITex ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -406,9 +406,7 @@ public class DependencyNameEditPart extends PapyrusLabelEditPart implements ITex * @generated
*/
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
@@ -441,7 +439,6 @@ public class DependencyNameEditPart extends PapyrusLabelEditPart implements ITex 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 DependencyNameEditPart extends PapyrusLabelEditPart implements ITex @Override
protected void doExecute() {
configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
-
}
};
domain.getCommandStack().execute(command);
@@ -506,8 +502,17 @@ public class DependencyNameEditPart extends PapyrusLabelEditPart implements ITex 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) {
@@ -628,7 +633,6 @@ public class DependencyNameEditPart extends PapyrusLabelEditPart implements ITex if(checkDefaultEdition()) {
return IDirectEdition.DEFAULT_DIRECT_EDITOR;
}
-
// not a named element. no specific editor => do nothing
return IDirectEdition.NO_DIRECT_EDITION;
}
@@ -746,7 +750,6 @@ public class DependencyNameEditPart extends PapyrusLabelEditPart implements ITex }
}
}
-
super.handleNotificationEvent(event);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DeploymentAppliedStereotypeEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DeploymentAppliedStereotypeEditPart.java index 837dbd5917f..65f8d255f70 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DeploymentAppliedStereotypeEditPart.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DeploymentAppliedStereotypeEditPart.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 DeploymentAppliedStereotypeEditPart extends PapyrusLabelEditPart im ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -406,9 +406,7 @@ public class DeploymentAppliedStereotypeEditPart extends PapyrusLabelEditPart im * @generated
*/
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
@@ -441,7 +439,6 @@ public class DeploymentAppliedStereotypeEditPart extends PapyrusLabelEditPart im 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 DeploymentAppliedStereotypeEditPart extends PapyrusLabelEditPart im @Override
protected void doExecute() {
configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
-
}
};
domain.getCommandStack().execute(command);
@@ -506,8 +502,17 @@ public class DeploymentAppliedStereotypeEditPart extends PapyrusLabelEditPart im 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 DeploymentAppliedStereotypeEditPart extends PapyrusLabelEditPart im }
}
}
-
super.handleNotificationEvent(event);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DeploymentNameEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DeploymentNameEditPart.java index 962ca1bc07c..b64a905ef45 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DeploymentNameEditPart.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DeploymentNameEditPart.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 DeploymentNameEditPart extends PapyrusLabelEditPart implements ITex ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -406,9 +406,7 @@ public class DeploymentNameEditPart extends PapyrusLabelEditPart implements ITex * @generated
*/
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
@@ -441,7 +439,6 @@ public class DeploymentNameEditPart extends PapyrusLabelEditPart implements ITex 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 DeploymentNameEditPart extends PapyrusLabelEditPart implements ITex @Override
protected void doExecute() {
configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
-
}
};
domain.getCommandStack().execute(command);
@@ -506,8 +502,17 @@ public class DeploymentNameEditPart extends PapyrusLabelEditPart implements ITex 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) {
@@ -628,7 +633,6 @@ public class DeploymentNameEditPart extends PapyrusLabelEditPart implements ITex if(checkDefaultEdition()) {
return IDirectEdition.DEFAULT_DIRECT_EDITOR;
}
-
// not a named element. no specific editor => do nothing
return IDirectEdition.NO_DIRECT_EDITION;
}
@@ -746,7 +750,6 @@ public class DeploymentNameEditPart extends PapyrusLabelEditPart implements ITex }
}
}
-
super.handleNotificationEvent(event);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DeploymentSpecificationEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DeploymentSpecificationEditPart.java index b7d1599f911..717931a485c 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DeploymentSpecificationEditPart.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DeploymentSpecificationEditPart.java @@ -26,6 +26,7 @@ import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure; import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
import org.eclipse.gmf.runtime.notation.View;
import org.eclipse.papyrus.infra.gmfdiag.common.editpart.NodeEditPart;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IPapyrusNodeFigure;
import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.SelectableBorderedNodeFigure;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy;
@@ -124,8 +125,6 @@ public class DeploymentSpecificationEditPart extends NodeEditPart { ((DeploymentSpecificationNameEditPart)childEditPart).setLabel(getPrimaryShape().getNameLabel());
return true;
}
-
-
return false;
}
@@ -184,7 +183,6 @@ public class DeploymentSpecificationEditPart extends NodeEditPart { */
protected NodeFigure createNodeFigure() {
return new SelectableBorderedNodeFigure(createMainFigureWithSVG());
-
}
/**
@@ -234,8 +232,8 @@ public class DeploymentSpecificationEditPart extends NodeEditPart { * @generated
*/
protected void setLineType(int style) {
- if(primaryShape instanceof NodeFigure) {
- ((NodeFigure)primaryShape).setLineStyle(style);
+ if(primaryShape instanceof IPapyrusNodeFigure) {
+ ((IPapyrusNodeFigure)primaryShape).setLineStyle(style);
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DeploymentSpecificationEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DeploymentSpecificationEditPartCN.java index 12237c137ef..7eec40b3152 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DeploymentSpecificationEditPartCN.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DeploymentSpecificationEditPartCN.java @@ -26,6 +26,7 @@ import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure; import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
import org.eclipse.gmf.runtime.notation.View;
import org.eclipse.papyrus.infra.gmfdiag.common.editpart.NodeEditPart;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IPapyrusNodeFigure;
import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.SelectableBorderedNodeFigure;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy;
@@ -124,8 +125,6 @@ public class DeploymentSpecificationEditPartCN extends NodeEditPart { ((DeploymentSpecificationNameEditPartCN)childEditPart).setLabel(getPrimaryShape().getNameLabel());
return true;
}
-
-
return false;
}
@@ -184,7 +183,6 @@ public class DeploymentSpecificationEditPartCN extends NodeEditPart { */
protected NodeFigure createNodeFigure() {
return new SelectableBorderedNodeFigure(createMainFigureWithSVG());
-
}
/**
@@ -234,8 +232,8 @@ public class DeploymentSpecificationEditPartCN extends NodeEditPart { * @generated
*/
protected void setLineType(int style) {
- if(primaryShape instanceof NodeFigure) {
- ((NodeFigure)primaryShape).setLineStyle(style);
+ if(primaryShape instanceof IPapyrusNodeFigure) {
+ ((IPapyrusNodeFigure)primaryShape).setLineStyle(style);
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DeploymentSpecificationNameEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DeploymentSpecificationNameEditPart.java index 5a7c15a2a7d..28813b74131 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DeploymentSpecificationNameEditPart.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DeploymentSpecificationNameEditPart.java @@ -64,6 +64,7 @@ import org.eclipse.papyrus.infra.emf.appearance.helper.VisualInformationPapyrusC import org.eclipse.papyrus.infra.gmfdiag.common.editpart.IControlParserForDirectEdit;
import org.eclipse.papyrus.infra.gmfdiag.common.editpart.PapyrusCompartmentEditPart;
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;
@@ -320,7 +321,6 @@ public class DeploymentSpecificationNameEditPart extends PapyrusCompartmentEditP ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -407,9 +407,7 @@ public class DeploymentSpecificationNameEditPart extends PapyrusCompartmentEditP * @generated
*/
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
@@ -442,7 +440,6 @@ public class DeploymentSpecificationNameEditPart extends PapyrusCompartmentEditP return;
}
final Dialog finalDialog = dialog;
-
if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@@ -450,7 +447,6 @@ public class DeploymentSpecificationNameEditPart extends PapyrusCompartmentEditP @Override
protected void doExecute() {
configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
-
}
};
domain.getCommandStack().execute(command);
@@ -507,8 +503,17 @@ public class DeploymentSpecificationNameEditPart extends PapyrusCompartmentEditP 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) {
@@ -629,7 +634,6 @@ public class DeploymentSpecificationNameEditPart extends PapyrusCompartmentEditP if(checkDefaultEdition()) {
return IDirectEdition.DEFAULT_DIRECT_EDITOR;
}
-
// not a named element. no specific editor => do nothing
return IDirectEdition.NO_DIRECT_EDITION;
}
@@ -796,7 +800,6 @@ public class DeploymentSpecificationNameEditPart extends PapyrusCompartmentEditP */
protected void addOwnerElementListeners() {
addListenerFilter(ADD_PARENT_MODEL, this, ((View)getParent().getModel())); //$NON-NLS-1$
-
}
/**
@@ -805,7 +808,6 @@ public class DeploymentSpecificationNameEditPart extends PapyrusCompartmentEditP public void deactivate() {
removeOwnerElementListeners();
super.deactivate();
-
}
/**
@@ -813,6 +815,5 @@ public class DeploymentSpecificationNameEditPart extends PapyrusCompartmentEditP */
protected void removeOwnerElementListeners() {
removeListenerFilter(ADD_PARENT_MODEL);
-
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DeploymentSpecificationNameEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DeploymentSpecificationNameEditPartCN.java index 73c2a78661e..dfe2296c18f 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DeploymentSpecificationNameEditPartCN.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DeploymentSpecificationNameEditPartCN.java @@ -64,6 +64,7 @@ import org.eclipse.papyrus.infra.emf.appearance.helper.VisualInformationPapyrusC import org.eclipse.papyrus.infra.gmfdiag.common.editpart.IControlParserForDirectEdit;
import org.eclipse.papyrus.infra.gmfdiag.common.editpart.PapyrusCompartmentEditPart;
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;
@@ -320,7 +321,6 @@ public class DeploymentSpecificationNameEditPartCN extends PapyrusCompartmentEdi ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -407,9 +407,7 @@ public class DeploymentSpecificationNameEditPartCN extends PapyrusCompartmentEdi * @generated
*/
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
@@ -442,7 +440,6 @@ public class DeploymentSpecificationNameEditPartCN extends PapyrusCompartmentEdi return;
}
final Dialog finalDialog = dialog;
-
if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@@ -450,7 +447,6 @@ public class DeploymentSpecificationNameEditPartCN extends PapyrusCompartmentEdi @Override
protected void doExecute() {
configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
-
}
};
domain.getCommandStack().execute(command);
@@ -507,8 +503,17 @@ public class DeploymentSpecificationNameEditPartCN extends PapyrusCompartmentEdi 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) {
@@ -629,7 +634,6 @@ public class DeploymentSpecificationNameEditPartCN extends PapyrusCompartmentEdi if(checkDefaultEdition()) {
return IDirectEdition.DEFAULT_DIRECT_EDITOR;
}
-
// not a named element. no specific editor => do nothing
return IDirectEdition.NO_DIRECT_EDITION;
}
@@ -796,7 +800,6 @@ public class DeploymentSpecificationNameEditPartCN extends PapyrusCompartmentEdi */
protected void addOwnerElementListeners() {
addListenerFilter(ADD_PARENT_MODEL, this, ((View)getParent().getModel())); //$NON-NLS-1$
-
}
/**
@@ -805,7 +808,6 @@ public class DeploymentSpecificationNameEditPartCN extends PapyrusCompartmentEdi public void deactivate() {
removeOwnerElementListeners();
super.deactivate();
-
}
/**
@@ -813,6 +815,5 @@ public class DeploymentSpecificationNameEditPartCN extends PapyrusCompartmentEdi */
protected void removeOwnerElementListeners() {
removeListenerFilter(ADD_PARENT_MODEL);
-
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DeviceCompositeCompartmentEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DeviceCompositeCompartmentEditPart.java index 63e996feceb..7d70e568e8e 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DeviceCompositeCompartmentEditPart.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DeviceCompositeCompartmentEditPart.java @@ -88,7 +88,6 @@ public class DeviceCompositeCompartmentEditPart extends ShapeCompartmentEditPart * @generated
*/
public EditPart getTargetEditPart(Request request) {
-
return super.getTargetEditPart(request);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DeviceCompositeCompartmentEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DeviceCompositeCompartmentEditPartCN.java index e6225366e20..e73aaf0962f 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DeviceCompositeCompartmentEditPartCN.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DeviceCompositeCompartmentEditPartCN.java @@ -88,7 +88,6 @@ public class DeviceCompositeCompartmentEditPartCN extends ShapeCompartmentEditPa * @generated
*/
public EditPart getTargetEditPart(Request request) {
-
return super.getTargetEditPart(request);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DeviceCompositeEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DeviceCompositeEditPart.java index afe4e287efa..5f463a26cc6 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DeviceCompositeEditPart.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DeviceCompositeEditPart.java @@ -30,6 +30,7 @@ import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout; import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure;
import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IPapyrusNodeFigure;
import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.SelectableBorderedNodeFigure;
import org.eclipse.papyrus.uml.diagram.common.editparts.NamedElementEditPart;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.AffixedNodeAlignmentEditPolicy;
@@ -134,7 +135,6 @@ public class DeviceCompositeEditPart extends NamedElementEditPart { **/
protected void handleNotificationEvent(Notification event) {
super.handleNotificationEvent(event);
-
}
/**
@@ -161,25 +161,18 @@ public class DeviceCompositeEditPart extends NamedElementEditPart { ((DeviceCompositeNameEditPart)childEditPart).setLabel(getPrimaryShape().getNameLabel());
return true;
}
-
-
if(childEditPart instanceof DeviceCompositeCompartmentEditPart) {
IFigure pane = getPrimaryShape().getCompositeCompartmentFigure();
setupContentPane(pane); // FIXME each comparment should handle his content pane in his own way
pane.add(((DeviceCompositeCompartmentEditPart)childEditPart).getFigure());
return true;
}
-
-
-
//Papyrus Gencode :Affixed Port locator
if(childEditPart instanceof PortEditPart) {
IBorderItemLocator locator = new PortPositionLocator(getMainFigure(), PositionConstants.NONE);
getBorderedFigure().getBorderItemContainer().add(((PortEditPart)childEditPart).getFigure(), locator);
return true;
}
-
-
return false;
}
@@ -253,7 +246,6 @@ public class DeviceCompositeEditPart extends NamedElementEditPart { */
protected NodeFigure createMainFigure() {
return new SelectableBorderedNodeFigure(createMainFigureWithSVG());
-
}
/**
@@ -303,8 +295,8 @@ public class DeviceCompositeEditPart extends NamedElementEditPart { * @generated
*/
protected void setLineType(int style) {
- if(primaryShape instanceof NodeFigure) {
- ((NodeFigure)primaryShape).setLineStyle(style);
+ if(primaryShape instanceof IPapyrusNodeFigure) {
+ ((IPapyrusNodeFigure)primaryShape).setLineStyle(style);
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DeviceCompositeEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DeviceCompositeEditPartCN.java index 5295c768a7c..ad7393520be 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DeviceCompositeEditPartCN.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DeviceCompositeEditPartCN.java @@ -30,6 +30,7 @@ import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout; import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure;
import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IPapyrusNodeFigure;
import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.SelectableBorderedNodeFigure;
import org.eclipse.papyrus.uml.diagram.common.editparts.NamedElementEditPart;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.AffixedNodeAlignmentEditPolicy;
@@ -134,7 +135,6 @@ public class DeviceCompositeEditPartCN extends NamedElementEditPart { **/
protected void handleNotificationEvent(Notification event) {
super.handleNotificationEvent(event);
-
}
/**
@@ -161,25 +161,18 @@ public class DeviceCompositeEditPartCN extends NamedElementEditPart { ((DeviceCompositeNameEditPartCN)childEditPart).setLabel(getPrimaryShape().getNameLabel());
return true;
}
-
-
if(childEditPart instanceof DeviceCompositeCompartmentEditPartCN) {
IFigure pane = getPrimaryShape().getCompositeCompartmentFigure();
setupContentPane(pane); // FIXME each comparment should handle his content pane in his own way
pane.add(((DeviceCompositeCompartmentEditPartCN)childEditPart).getFigure());
return true;
}
-
-
-
//Papyrus Gencode :Affixed Port locator
if(childEditPart instanceof PortEditPart) {
IBorderItemLocator locator = new PortPositionLocator(getMainFigure(), PositionConstants.NONE);
getBorderedFigure().getBorderItemContainer().add(((PortEditPart)childEditPart).getFigure(), locator);
return true;
}
-
-
return false;
}
@@ -253,7 +246,6 @@ public class DeviceCompositeEditPartCN extends NamedElementEditPart { */
protected NodeFigure createMainFigure() {
return new SelectableBorderedNodeFigure(createMainFigureWithSVG());
-
}
/**
@@ -303,8 +295,8 @@ public class DeviceCompositeEditPartCN extends NamedElementEditPart { * @generated
*/
protected void setLineType(int style) {
- if(primaryShape instanceof NodeFigure) {
- ((NodeFigure)primaryShape).setLineStyle(style);
+ if(primaryShape instanceof IPapyrusNodeFigure) {
+ ((IPapyrusNodeFigure)primaryShape).setLineStyle(style);
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DeviceCompositeNameEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DeviceCompositeNameEditPart.java index 1d3c4db4fbf..31d7226e885 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DeviceCompositeNameEditPart.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DeviceCompositeNameEditPart.java @@ -64,6 +64,7 @@ import org.eclipse.papyrus.infra.emf.appearance.helper.VisualInformationPapyrusC import org.eclipse.papyrus.infra.gmfdiag.common.editpart.IControlParserForDirectEdit;
import org.eclipse.papyrus.infra.gmfdiag.common.editpart.PapyrusCompartmentEditPart;
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;
@@ -320,7 +321,6 @@ public class DeviceCompositeNameEditPart extends PapyrusCompartmentEditPart impl ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -407,9 +407,7 @@ public class DeviceCompositeNameEditPart extends PapyrusCompartmentEditPart impl * @generated
*/
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
@@ -442,7 +440,6 @@ public class DeviceCompositeNameEditPart extends PapyrusCompartmentEditPart impl return;
}
final Dialog finalDialog = dialog;
-
if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@@ -450,7 +447,6 @@ public class DeviceCompositeNameEditPart extends PapyrusCompartmentEditPart impl @Override
protected void doExecute() {
configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
-
}
};
domain.getCommandStack().execute(command);
@@ -507,8 +503,17 @@ public class DeviceCompositeNameEditPart extends PapyrusCompartmentEditPart impl 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) {
@@ -629,7 +634,6 @@ public class DeviceCompositeNameEditPart extends PapyrusCompartmentEditPart impl if(checkDefaultEdition()) {
return IDirectEdition.DEFAULT_DIRECT_EDITOR;
}
-
// not a named element. no specific editor => do nothing
return IDirectEdition.NO_DIRECT_EDITION;
}
@@ -796,7 +800,6 @@ public class DeviceCompositeNameEditPart extends PapyrusCompartmentEditPart impl */
protected void addOwnerElementListeners() {
addListenerFilter(ADD_PARENT_MODEL, this, ((View)getParent().getModel())); //$NON-NLS-1$
-
}
/**
@@ -805,7 +808,6 @@ public class DeviceCompositeNameEditPart extends PapyrusCompartmentEditPart impl public void deactivate() {
removeOwnerElementListeners();
super.deactivate();
-
}
/**
@@ -813,6 +815,5 @@ public class DeviceCompositeNameEditPart extends PapyrusCompartmentEditPart impl */
protected void removeOwnerElementListeners() {
removeListenerFilter(ADD_PARENT_MODEL);
-
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DeviceCompositeNameEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DeviceCompositeNameEditPartCN.java index b8560c664ff..09b22cf100e 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DeviceCompositeNameEditPartCN.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DeviceCompositeNameEditPartCN.java @@ -64,6 +64,7 @@ import org.eclipse.papyrus.infra.emf.appearance.helper.VisualInformationPapyrusC import org.eclipse.papyrus.infra.gmfdiag.common.editpart.IControlParserForDirectEdit;
import org.eclipse.papyrus.infra.gmfdiag.common.editpart.PapyrusCompartmentEditPart;
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;
@@ -320,7 +321,6 @@ public class DeviceCompositeNameEditPartCN extends PapyrusCompartmentEditPart im ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -407,9 +407,7 @@ public class DeviceCompositeNameEditPartCN extends PapyrusCompartmentEditPart im * @generated
*/
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
@@ -442,7 +440,6 @@ public class DeviceCompositeNameEditPartCN extends PapyrusCompartmentEditPart im return;
}
final Dialog finalDialog = dialog;
-
if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@@ -450,7 +447,6 @@ public class DeviceCompositeNameEditPartCN extends PapyrusCompartmentEditPart im @Override
protected void doExecute() {
configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
-
}
};
domain.getCommandStack().execute(command);
@@ -507,8 +503,17 @@ public class DeviceCompositeNameEditPartCN extends PapyrusCompartmentEditPart im 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) {
@@ -629,7 +634,6 @@ public class DeviceCompositeNameEditPartCN extends PapyrusCompartmentEditPart im if(checkDefaultEdition()) {
return IDirectEdition.DEFAULT_DIRECT_EDITOR;
}
-
// not a named element. no specific editor => do nothing
return IDirectEdition.NO_DIRECT_EDITION;
}
@@ -796,7 +800,6 @@ public class DeviceCompositeNameEditPartCN extends PapyrusCompartmentEditPart im */
protected void addOwnerElementListeners() {
addListenerFilter(ADD_PARENT_MODEL, this, ((View)getParent().getModel())); //$NON-NLS-1$
-
}
/**
@@ -805,7 +808,6 @@ public class DeviceCompositeNameEditPartCN extends PapyrusCompartmentEditPart im public void deactivate() {
removeOwnerElementListeners();
super.deactivate();
-
}
/**
@@ -813,6 +815,5 @@ public class DeviceCompositeNameEditPartCN extends PapyrusCompartmentEditPart im */
protected void removeOwnerElementListeners() {
removeListenerFilter(ADD_PARENT_MODEL);
-
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DurationConstraintEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DurationConstraintEditPart.java index cbafa80d578..3e377b257c6 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DurationConstraintEditPart.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DurationConstraintEditPart.java @@ -26,6 +26,7 @@ import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout; import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure;
import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IPapyrusNodeFigure;
import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.SelectableBorderedNodeFigure;
import org.eclipse.papyrus.uml.diagram.common.editparts.AbstractConstraintEditPart;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy;
@@ -106,7 +107,6 @@ public class DurationConstraintEditPart extends AbstractConstraintEditPart { **/
protected void handleNotificationEvent(Notification event) {
super.handleNotificationEvent(event);
-
}
/**
@@ -137,8 +137,6 @@ public class DurationConstraintEditPart extends AbstractConstraintEditPart { ((DurationConstraintSpecificationEditPart)childEditPart).setLabel(getPrimaryShape().getConstraintFigure());
return true;
}
-
-
return false;
}
@@ -200,7 +198,6 @@ public class DurationConstraintEditPart extends AbstractConstraintEditPart { */
protected NodeFigure createNodeFigure() {
return new SelectableBorderedNodeFigure(createMainFigureWithSVG());
-
}
/**
@@ -250,8 +247,8 @@ public class DurationConstraintEditPart extends AbstractConstraintEditPart { * @generated
*/
protected void setLineType(int style) {
- if(primaryShape instanceof NodeFigure) {
- ((NodeFigure)primaryShape).setLineStyle(style);
+ if(primaryShape instanceof IPapyrusNodeFigure) {
+ ((IPapyrusNodeFigure)primaryShape).setLineStyle(style);
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DurationConstraintEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DurationConstraintEditPartCN.java index 781b264fcab..1b17e66e90e 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DurationConstraintEditPartCN.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DurationConstraintEditPartCN.java @@ -26,6 +26,7 @@ import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout; import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure;
import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IPapyrusNodeFigure;
import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.SelectableBorderedNodeFigure;
import org.eclipse.papyrus.uml.diagram.common.editparts.AbstractConstraintEditPart;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy;
@@ -106,7 +107,6 @@ public class DurationConstraintEditPartCN extends AbstractConstraintEditPart { **/
protected void handleNotificationEvent(Notification event) {
super.handleNotificationEvent(event);
-
}
/**
@@ -137,8 +137,6 @@ public class DurationConstraintEditPartCN extends AbstractConstraintEditPart { ((DurationConstraintSpecificationEditPartCN)childEditPart).setLabel(getPrimaryShape().getConstraintFigure());
return true;
}
-
-
return false;
}
@@ -200,7 +198,6 @@ public class DurationConstraintEditPartCN extends AbstractConstraintEditPart { */
protected NodeFigure createNodeFigure() {
return new SelectableBorderedNodeFigure(createMainFigureWithSVG());
-
}
/**
@@ -250,8 +247,8 @@ public class DurationConstraintEditPartCN extends AbstractConstraintEditPart { * @generated
*/
protected void setLineType(int style) {
- if(primaryShape instanceof NodeFigure) {
- ((NodeFigure)primaryShape).setLineStyle(style);
+ if(primaryShape instanceof IPapyrusNodeFigure) {
+ ((IPapyrusNodeFigure)primaryShape).setLineStyle(style);
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DurationConstraintNameEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DurationConstraintNameEditPart.java index 2e340ec0bc6..1cb3867915d 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DurationConstraintNameEditPart.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DurationConstraintNameEditPart.java @@ -64,6 +64,7 @@ import org.eclipse.papyrus.infra.emf.appearance.helper.VisualInformationPapyrusC import org.eclipse.papyrus.infra.gmfdiag.common.editpart.IControlParserForDirectEdit;
import org.eclipse.papyrus.infra.gmfdiag.common.editpart.PapyrusCompartmentEditPart;
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;
@@ -320,7 +321,6 @@ public class DurationConstraintNameEditPart extends PapyrusCompartmentEditPart i ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -407,9 +407,7 @@ public class DurationConstraintNameEditPart extends PapyrusCompartmentEditPart i * @generated
*/
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
@@ -442,7 +440,6 @@ public class DurationConstraintNameEditPart extends PapyrusCompartmentEditPart i return;
}
final Dialog finalDialog = dialog;
-
if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@@ -450,7 +447,6 @@ public class DurationConstraintNameEditPart extends PapyrusCompartmentEditPart i @Override
protected void doExecute() {
configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
-
}
};
domain.getCommandStack().execute(command);
@@ -507,8 +503,17 @@ public class DurationConstraintNameEditPart extends PapyrusCompartmentEditPart i 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) {
@@ -629,7 +634,6 @@ public class DurationConstraintNameEditPart extends PapyrusCompartmentEditPart i if(checkDefaultEdition()) {
return IDirectEdition.DEFAULT_DIRECT_EDITOR;
}
-
// not a named element. no specific editor => do nothing
return IDirectEdition.NO_DIRECT_EDITION;
}
@@ -796,7 +800,6 @@ public class DurationConstraintNameEditPart extends PapyrusCompartmentEditPart i */
protected void addOwnerElementListeners() {
addListenerFilter(ADD_PARENT_MODEL, this, ((View)getParent().getModel())); //$NON-NLS-1$
-
}
/**
@@ -805,7 +808,6 @@ public class DurationConstraintNameEditPart extends PapyrusCompartmentEditPart i public void deactivate() {
removeOwnerElementListeners();
super.deactivate();
-
}
/**
@@ -813,6 +815,5 @@ public class DurationConstraintNameEditPart extends PapyrusCompartmentEditPart i */
protected void removeOwnerElementListeners() {
removeListenerFilter(ADD_PARENT_MODEL);
-
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DurationConstraintNameEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DurationConstraintNameEditPartCN.java index 212b1b9adea..70b2ed646fe 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DurationConstraintNameEditPartCN.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DurationConstraintNameEditPartCN.java @@ -64,6 +64,7 @@ import org.eclipse.papyrus.infra.emf.appearance.helper.VisualInformationPapyrusC import org.eclipse.papyrus.infra.gmfdiag.common.editpart.IControlParserForDirectEdit;
import org.eclipse.papyrus.infra.gmfdiag.common.editpart.PapyrusCompartmentEditPart;
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;
@@ -320,7 +321,6 @@ public class DurationConstraintNameEditPartCN extends PapyrusCompartmentEditPart ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -407,9 +407,7 @@ public class DurationConstraintNameEditPartCN extends PapyrusCompartmentEditPart * @generated
*/
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
@@ -442,7 +440,6 @@ public class DurationConstraintNameEditPartCN extends PapyrusCompartmentEditPart return;
}
final Dialog finalDialog = dialog;
-
if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@@ -450,7 +447,6 @@ public class DurationConstraintNameEditPartCN extends PapyrusCompartmentEditPart @Override
protected void doExecute() {
configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
-
}
};
domain.getCommandStack().execute(command);
@@ -507,8 +503,17 @@ public class DurationConstraintNameEditPartCN extends PapyrusCompartmentEditPart 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) {
@@ -629,7 +634,6 @@ public class DurationConstraintNameEditPartCN extends PapyrusCompartmentEditPart if(checkDefaultEdition()) {
return IDirectEdition.DEFAULT_DIRECT_EDITOR;
}
-
// not a named element. no specific editor => do nothing
return IDirectEdition.NO_DIRECT_EDITION;
}
@@ -796,7 +800,6 @@ public class DurationConstraintNameEditPartCN extends PapyrusCompartmentEditPart */
protected void addOwnerElementListeners() {
addListenerFilter(ADD_PARENT_MODEL, this, ((View)getParent().getModel())); //$NON-NLS-1$
-
}
/**
@@ -805,7 +808,6 @@ public class DurationConstraintNameEditPartCN extends PapyrusCompartmentEditPart public void deactivate() {
removeOwnerElementListeners();
super.deactivate();
-
}
/**
@@ -813,6 +815,5 @@ public class DurationConstraintNameEditPartCN extends PapyrusCompartmentEditPart */
protected void removeOwnerElementListeners() {
removeListenerFilter(ADD_PARENT_MODEL);
-
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DurationConstraintSpecificationEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DurationConstraintSpecificationEditPart.java index 01b56a720c3..3f805def81b 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DurationConstraintSpecificationEditPart.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DurationConstraintSpecificationEditPart.java @@ -61,6 +61,7 @@ import org.eclipse.papyrus.extensionpoints.editors.utils.IDirectEditorsIds; import org.eclipse.papyrus.infra.gmfdiag.common.editpart.IControlParserForDirectEdit;
import org.eclipse.papyrus.infra.gmfdiag.common.editpart.PapyrusCompartmentEditPart;
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;
@@ -306,7 +307,6 @@ public class DurationConstraintSpecificationEditPart extends PapyrusCompartmentE ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -393,9 +393,7 @@ public class DurationConstraintSpecificationEditPart extends PapyrusCompartmentE * @generated
*/
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
@@ -428,7 +426,6 @@ public class DurationConstraintSpecificationEditPart extends PapyrusCompartmentE return;
}
final Dialog finalDialog = dialog;
-
if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@@ -436,7 +433,6 @@ public class DurationConstraintSpecificationEditPart extends PapyrusCompartmentE @Override
protected void doExecute() {
configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
-
}
};
domain.getCommandStack().execute(command);
@@ -493,8 +489,17 @@ public class DurationConstraintSpecificationEditPart extends PapyrusCompartmentE 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) {
@@ -615,7 +620,6 @@ public class DurationConstraintSpecificationEditPart extends PapyrusCompartmentE if(checkDefaultEdition()) {
return IDirectEdition.DEFAULT_DIRECT_EDITOR;
}
-
// not a named element. no specific editor => do nothing
return IDirectEdition.NO_DIRECT_EDITION;
}
@@ -779,7 +783,6 @@ public class DurationConstraintSpecificationEditPart extends PapyrusCompartmentE */
protected void addOwnerElementListeners() {
addListenerFilter(ADD_PARENT_MODEL, this, ((View)getParent().getModel())); //$NON-NLS-1$
-
}
/**
@@ -788,7 +791,6 @@ public class DurationConstraintSpecificationEditPart extends PapyrusCompartmentE public void deactivate() {
removeOwnerElementListeners();
super.deactivate();
-
}
/**
@@ -796,6 +798,5 @@ public class DurationConstraintSpecificationEditPart extends PapyrusCompartmentE */
protected void removeOwnerElementListeners() {
removeListenerFilter(ADD_PARENT_MODEL);
-
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DurationConstraintSpecificationEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DurationConstraintSpecificationEditPartCN.java index cd79be55525..0a241526bec 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DurationConstraintSpecificationEditPartCN.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DurationConstraintSpecificationEditPartCN.java @@ -61,6 +61,7 @@ import org.eclipse.papyrus.extensionpoints.editors.utils.IDirectEditorsIds; import org.eclipse.papyrus.infra.gmfdiag.common.editpart.IControlParserForDirectEdit;
import org.eclipse.papyrus.infra.gmfdiag.common.editpart.PapyrusCompartmentEditPart;
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;
@@ -306,7 +307,6 @@ public class DurationConstraintSpecificationEditPartCN extends PapyrusCompartmen ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -393,9 +393,7 @@ public class DurationConstraintSpecificationEditPartCN extends PapyrusCompartmen * @generated
*/
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
@@ -428,7 +426,6 @@ public class DurationConstraintSpecificationEditPartCN extends PapyrusCompartmen return;
}
final Dialog finalDialog = dialog;
-
if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@@ -436,7 +433,6 @@ public class DurationConstraintSpecificationEditPartCN extends PapyrusCompartmen @Override
protected void doExecute() {
configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
-
}
};
domain.getCommandStack().execute(command);
@@ -493,8 +489,17 @@ public class DurationConstraintSpecificationEditPartCN extends PapyrusCompartmen 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) {
@@ -615,7 +620,6 @@ public class DurationConstraintSpecificationEditPartCN extends PapyrusCompartmen if(checkDefaultEdition()) {
return IDirectEdition.DEFAULT_DIRECT_EDITOR;
}
-
// not a named element. no specific editor => do nothing
return IDirectEdition.NO_DIRECT_EDITION;
}
@@ -779,7 +783,6 @@ public class DurationConstraintSpecificationEditPartCN extends PapyrusCompartmen */
protected void addOwnerElementListeners() {
addListenerFilter(ADD_PARENT_MODEL, this, ((View)getParent().getModel())); //$NON-NLS-1$
-
}
/**
@@ -788,7 +791,6 @@ public class DurationConstraintSpecificationEditPartCN extends PapyrusCompartmen public void deactivate() {
removeOwnerElementListeners();
super.deactivate();
-
}
/**
@@ -796,6 +798,5 @@ public class DurationConstraintSpecificationEditPartCN extends PapyrusCompartmen */
protected void removeOwnerElementListeners() {
removeListenerFilter(ADD_PARENT_MODEL);
-
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DurationEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DurationEditPart.java index 4f7417dac8e..caa0a405c26 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DurationEditPart.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DurationEditPart.java @@ -26,6 +26,7 @@ import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure; import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
import org.eclipse.gmf.runtime.notation.View;
import org.eclipse.papyrus.infra.gmfdiag.common.editpart.NodeEditPart;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IPapyrusNodeFigure;
import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.SelectableBorderedNodeFigure;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy;
@@ -124,8 +125,6 @@ public class DurationEditPart extends NodeEditPart { ((DurationNameEditPart)childEditPart).setLabel(getPrimaryShape().getNameLabel());
return true;
}
-
-
return false;
}
@@ -184,7 +183,6 @@ public class DurationEditPart extends NodeEditPart { */
protected NodeFigure createNodeFigure() {
return new SelectableBorderedNodeFigure(createMainFigureWithSVG());
-
}
/**
@@ -234,8 +232,8 @@ public class DurationEditPart extends NodeEditPart { * @generated
*/
protected void setLineType(int style) {
- if(primaryShape instanceof NodeFigure) {
- ((NodeFigure)primaryShape).setLineStyle(style);
+ if(primaryShape instanceof IPapyrusNodeFigure) {
+ ((IPapyrusNodeFigure)primaryShape).setLineStyle(style);
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DurationIntervalEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DurationIntervalEditPart.java index 4c0b2c7b825..04c440a99e2 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DurationIntervalEditPart.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DurationIntervalEditPart.java @@ -26,6 +26,7 @@ import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure; import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
import org.eclipse.gmf.runtime.notation.View;
import org.eclipse.papyrus.infra.gmfdiag.common.editpart.NodeEditPart;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IPapyrusNodeFigure;
import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.SelectableBorderedNodeFigure;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy;
@@ -124,8 +125,6 @@ public class DurationIntervalEditPart extends NodeEditPart { ((DurationIntervalNameEditPart)childEditPart).setLabel(getPrimaryShape().getNameLabel());
return true;
}
-
-
return false;
}
@@ -184,7 +183,6 @@ public class DurationIntervalEditPart extends NodeEditPart { */
protected NodeFigure createNodeFigure() {
return new SelectableBorderedNodeFigure(createMainFigureWithSVG());
-
}
/**
@@ -234,8 +232,8 @@ public class DurationIntervalEditPart extends NodeEditPart { * @generated
*/
protected void setLineType(int style) {
- if(primaryShape instanceof NodeFigure) {
- ((NodeFigure)primaryShape).setLineStyle(style);
+ if(primaryShape instanceof IPapyrusNodeFigure) {
+ ((IPapyrusNodeFigure)primaryShape).setLineStyle(style);
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DurationIntervalNameEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DurationIntervalNameEditPart.java index 7f9ec73e32c..d653d1d37c0 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DurationIntervalNameEditPart.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DurationIntervalNameEditPart.java @@ -64,6 +64,7 @@ import org.eclipse.papyrus.infra.emf.appearance.helper.VisualInformationPapyrusC import org.eclipse.papyrus.infra.gmfdiag.common.editpart.IControlParserForDirectEdit;
import org.eclipse.papyrus.infra.gmfdiag.common.editpart.PapyrusCompartmentEditPart;
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;
@@ -320,7 +321,6 @@ public class DurationIntervalNameEditPart extends PapyrusCompartmentEditPart imp ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -407,9 +407,7 @@ public class DurationIntervalNameEditPart extends PapyrusCompartmentEditPart imp * @generated
*/
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
@@ -442,7 +440,6 @@ public class DurationIntervalNameEditPart extends PapyrusCompartmentEditPart imp return;
}
final Dialog finalDialog = dialog;
-
if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@@ -450,7 +447,6 @@ public class DurationIntervalNameEditPart extends PapyrusCompartmentEditPart imp @Override
protected void doExecute() {
configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
-
}
};
domain.getCommandStack().execute(command);
@@ -507,8 +503,17 @@ public class DurationIntervalNameEditPart extends PapyrusCompartmentEditPart imp 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) {
@@ -629,7 +634,6 @@ public class DurationIntervalNameEditPart extends PapyrusCompartmentEditPart imp if(checkDefaultEdition()) {
return IDirectEdition.DEFAULT_DIRECT_EDITOR;
}
-
// not a named element. no specific editor => do nothing
return IDirectEdition.NO_DIRECT_EDITION;
}
@@ -796,7 +800,6 @@ public class DurationIntervalNameEditPart extends PapyrusCompartmentEditPart imp */
protected void addOwnerElementListeners() {
addListenerFilter(ADD_PARENT_MODEL, this, ((View)getParent().getModel())); //$NON-NLS-1$
-
}
/**
@@ -805,7 +808,6 @@ public class DurationIntervalNameEditPart extends PapyrusCompartmentEditPart imp public void deactivate() {
removeOwnerElementListeners();
super.deactivate();
-
}
/**
@@ -813,6 +815,5 @@ public class DurationIntervalNameEditPart extends PapyrusCompartmentEditPart imp */
protected void removeOwnerElementListeners() {
removeListenerFilter(ADD_PARENT_MODEL);
-
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DurationNameEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DurationNameEditPart.java index 83dbee7e064..85a2f771386 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DurationNameEditPart.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DurationNameEditPart.java @@ -64,6 +64,7 @@ import org.eclipse.papyrus.infra.emf.appearance.helper.VisualInformationPapyrusC import org.eclipse.papyrus.infra.gmfdiag.common.editpart.IControlParserForDirectEdit;
import org.eclipse.papyrus.infra.gmfdiag.common.editpart.PapyrusCompartmentEditPart;
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;
@@ -320,7 +321,6 @@ public class DurationNameEditPart extends PapyrusCompartmentEditPart implements ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -407,9 +407,7 @@ public class DurationNameEditPart extends PapyrusCompartmentEditPart implements * @generated
*/
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
@@ -442,7 +440,6 @@ public class DurationNameEditPart extends PapyrusCompartmentEditPart implements return;
}
final Dialog finalDialog = dialog;
-
if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@@ -450,7 +447,6 @@ public class DurationNameEditPart extends PapyrusCompartmentEditPart implements @Override
protected void doExecute() {
configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
-
}
};
domain.getCommandStack().execute(command);
@@ -507,8 +503,17 @@ public class DurationNameEditPart extends PapyrusCompartmentEditPart implements 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) {
@@ -629,7 +634,6 @@ public class DurationNameEditPart extends PapyrusCompartmentEditPart implements if(checkDefaultEdition()) {
return IDirectEdition.DEFAULT_DIRECT_EDITOR;
}
-
// not a named element. no specific editor => do nothing
return IDirectEdition.NO_DIRECT_EDITION;
}
@@ -796,7 +800,6 @@ public class DurationNameEditPart extends PapyrusCompartmentEditPart implements */
protected void addOwnerElementListeners() {
addListenerFilter(ADD_PARENT_MODEL, this, ((View)getParent().getModel())); //$NON-NLS-1$
-
}
/**
@@ -805,7 +808,6 @@ public class DurationNameEditPart extends PapyrusCompartmentEditPart implements public void deactivate() {
removeOwnerElementListeners();
super.deactivate();
-
}
/**
@@ -813,6 +815,5 @@ public class DurationNameEditPart extends PapyrusCompartmentEditPart implements */
protected void removeOwnerElementListeners() {
removeListenerFilter(ADD_PARENT_MODEL);
-
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DurationObservationEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DurationObservationEditPart.java index aeb98c3e856..91b6419c5e2 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DurationObservationEditPart.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DurationObservationEditPart.java @@ -34,6 +34,7 @@ import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure; import org.eclipse.gmf.runtime.notation.Edge;
import org.eclipse.gmf.runtime.notation.NotationPackage;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IPapyrusNodeFigure;
import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.SelectableBorderedNodeFigure;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeIconlDisplayEditPolicy;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy;
@@ -149,7 +150,6 @@ public class DurationObservationEditPart extends AbstractObservationEditPart { }
}
super.handleNotificationEvent(event);
-
}
/**
@@ -201,7 +201,6 @@ public class DurationObservationEditPart extends AbstractObservationEditPart { */
protected NodeFigure createMainFigure() {
return new SelectableBorderedNodeFigure(createMainFigureWithSVG());
-
}
/**
@@ -246,8 +245,8 @@ public class DurationObservationEditPart extends AbstractObservationEditPart { * @generated
*/
protected void setLineType(int style) {
- if(primaryShape instanceof NodeFigure) {
- ((NodeFigure)primaryShape).setLineStyle(style);
+ if(primaryShape instanceof IPapyrusNodeFigure) {
+ ((IPapyrusNodeFigure)primaryShape).setLineStyle(style);
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DurationObservationNameEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DurationObservationNameEditPart.java index 2207e5eaa37..1a64cfee5f0 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DurationObservationNameEditPart.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DurationObservationNameEditPart.java @@ -62,6 +62,7 @@ import org.eclipse.papyrus.extensionpoints.editors.ui.IPopupEditorHelper; import org.eclipse.papyrus.extensionpoints.editors.utils.DirectEditorsUtil;
import org.eclipse.papyrus.extensionpoints.editors.utils.IDirectEditorsIds;
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;
@@ -335,7 +336,6 @@ public class DurationObservationNameEditPart extends LabelEditPart implements IT ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -422,9 +422,7 @@ public class DurationObservationNameEditPart extends LabelEditPart implements IT * @generated
*/
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
@@ -457,7 +455,6 @@ public class DurationObservationNameEditPart extends LabelEditPart implements IT return;
}
final Dialog finalDialog = dialog;
-
if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@@ -465,7 +462,6 @@ public class DurationObservationNameEditPart extends LabelEditPart implements IT @Override
protected void doExecute() {
configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
-
}
};
domain.getCommandStack().execute(command);
@@ -522,8 +518,17 @@ public class DurationObservationNameEditPart extends LabelEditPart implements IT 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) {
@@ -644,7 +649,6 @@ public class DurationObservationNameEditPart extends LabelEditPart implements IT if(checkDefaultEdition()) {
return IDirectEdition.DEFAULT_DIRECT_EDITOR;
}
-
// not a named element. no specific editor => do nothing
return IDirectEdition.NO_DIRECT_EDITION;
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DurationObservationStereotypeLabelEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DurationObservationStereotypeLabelEditPart.java index 1d69dcd0327..fe297ba9af6 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DurationObservationStereotypeLabelEditPart.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/DurationObservationStereotypeLabelEditPart.java @@ -61,6 +61,7 @@ import org.eclipse.papyrus.extensionpoints.editors.ui.IPopupEditorHelper; import org.eclipse.papyrus.extensionpoints.editors.utils.DirectEditorsUtil;
import org.eclipse.papyrus.extensionpoints.editors.utils.IDirectEditorsIds;
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.editparts.AbstractLabelEditPart;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeExternalNodeEditPolicy;
@@ -339,7 +340,6 @@ public class DurationObservationStereotypeLabelEditPart extends AbstractLabelEdi ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -426,9 +426,7 @@ public class DurationObservationStereotypeLabelEditPart extends AbstractLabelEdi * @generated
*/
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
@@ -461,7 +459,6 @@ public class DurationObservationStereotypeLabelEditPart extends AbstractLabelEdi return;
}
final Dialog finalDialog = dialog;
-
if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@@ -469,7 +466,6 @@ public class DurationObservationStereotypeLabelEditPart extends AbstractLabelEdi @Override
protected void doExecute() {
configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
-
}
};
domain.getCommandStack().execute(command);
@@ -526,8 +522,17 @@ public class DurationObservationStereotypeLabelEditPart extends AbstractLabelEdi 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) {
@@ -648,7 +653,6 @@ public class DurationObservationStereotypeLabelEditPart extends AbstractLabelEdi if(checkDefaultEdition()) {
return IDirectEdition.DEFAULT_DIRECT_EDITOR;
}
-
// not a named element. no specific editor => do nothing
return IDirectEdition.NO_DIRECT_EDITION;
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/EnumerationEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/EnumerationEditPart.java index f4c2396131b..d18a9c8ab01 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/EnumerationEditPart.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/EnumerationEditPart.java @@ -30,6 +30,7 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType; import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure;
import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IPapyrusNodeFigure;
import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.SelectableBorderedNodeFigure;
import org.eclipse.papyrus.uml.diagram.common.editparts.NamedElementEditPart;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy;
@@ -120,7 +121,6 @@ public class EnumerationEditPart extends NamedElementEditPart { **/
protected void handleNotificationEvent(Notification event) {
super.handleNotificationEvent(event);
-
}
/**
@@ -147,15 +147,12 @@ public class EnumerationEditPart extends NamedElementEditPart { ((EnumerationNameEditPart)childEditPart).setLabel(getPrimaryShape().getNameLabel());
return true;
}
-
-
if(childEditPart instanceof EnumerationEnumerationLiteralCompartmentEditPart) {
IFigure pane = getPrimaryShape().getEnumerationLiteralCompartmentFigure();
setupContentPane(pane); // FIXME each comparment should handle his content pane in his own way
pane.add(((EnumerationEnumerationLiteralCompartmentEditPart)childEditPart).getFigure());
return true;
}
-
return false;
}
@@ -222,7 +219,6 @@ public class EnumerationEditPart extends NamedElementEditPart { */
protected NodeFigure createNodeFigure() {
return new SelectableBorderedNodeFigure(createMainFigureWithSVG());
-
}
/**
@@ -272,8 +268,8 @@ public class EnumerationEditPart extends NamedElementEditPart { * @generated
*/
protected void setLineType(int style) {
- if(primaryShape instanceof NodeFigure) {
- ((NodeFigure)primaryShape).setLineStyle(style);
+ if(primaryShape instanceof IPapyrusNodeFigure) {
+ ((IPapyrusNodeFigure)primaryShape).setLineStyle(style);
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/EnumerationEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/EnumerationEditPartCN.java index 86a8094a453..27d6f72d442 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/EnumerationEditPartCN.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/EnumerationEditPartCN.java @@ -30,6 +30,7 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType; import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure;
import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IPapyrusNodeFigure;
import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.SelectableBorderedNodeFigure;
import org.eclipse.papyrus.uml.diagram.common.editparts.NamedElementEditPart;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy;
@@ -120,7 +121,6 @@ public class EnumerationEditPartCN extends NamedElementEditPart { **/
protected void handleNotificationEvent(Notification event) {
super.handleNotificationEvent(event);
-
}
/**
@@ -147,15 +147,12 @@ public class EnumerationEditPartCN extends NamedElementEditPart { ((EnumerationNameEditPartCN)childEditPart).setLabel(getPrimaryShape().getNameLabel());
return true;
}
-
-
if(childEditPart instanceof EnumerationEnumerationLiteralCompartmentEditPartCN) {
IFigure pane = getPrimaryShape().getEnumerationLiteralCompartmentFigure();
setupContentPane(pane); // FIXME each comparment should handle his content pane in his own way
pane.add(((EnumerationEnumerationLiteralCompartmentEditPartCN)childEditPart).getFigure());
return true;
}
-
return false;
}
@@ -222,7 +219,6 @@ public class EnumerationEditPartCN extends NamedElementEditPart { */
protected NodeFigure createNodeFigure() {
return new SelectableBorderedNodeFigure(createMainFigureWithSVG());
-
}
/**
@@ -272,8 +268,8 @@ public class EnumerationEditPartCN extends NamedElementEditPart { * @generated
*/
protected void setLineType(int style) {
- if(primaryShape instanceof NodeFigure) {
- ((NodeFigure)primaryShape).setLineStyle(style);
+ if(primaryShape instanceof IPapyrusNodeFigure) {
+ ((IPapyrusNodeFigure)primaryShape).setLineStyle(style);
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/EnumerationEnumerationLiteralCompartmentEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/EnumerationEnumerationLiteralCompartmentEditPart.java index cc1b824b6bd..218326b84b2 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/EnumerationEnumerationLiteralCompartmentEditPart.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/EnumerationEnumerationLiteralCompartmentEditPart.java @@ -91,7 +91,6 @@ public class EnumerationEnumerationLiteralCompartmentEditPart extends ListCompar * @generated
*/
public EditPart getTargetEditPart(Request request) {
-
return super.getTargetEditPart(request);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/EnumerationEnumerationLiteralCompartmentEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/EnumerationEnumerationLiteralCompartmentEditPartCN.java index a6a757f1fc4..feec72b21d1 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/EnumerationEnumerationLiteralCompartmentEditPartCN.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/EnumerationEnumerationLiteralCompartmentEditPartCN.java @@ -91,7 +91,6 @@ public class EnumerationEnumerationLiteralCompartmentEditPartCN extends ListComp * @generated
*/
public EditPart getTargetEditPart(Request request) {
-
return super.getTargetEditPart(request);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/EnumerationLiteralEditPartCLN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/EnumerationLiteralEditPartCLN.java index e352416db96..f9c5fcd2e1b 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/EnumerationLiteralEditPartCLN.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/EnumerationLiteralEditPartCLN.java @@ -69,6 +69,7 @@ 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.editpart.IControlParserForDirectEdit;
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;
@@ -339,7 +340,6 @@ public class EnumerationLiteralEditPartCLN extends CompartmentEditPart implement ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -426,9 +426,7 @@ public class EnumerationLiteralEditPartCLN extends CompartmentEditPart implement * @generated
*/
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
@@ -461,7 +459,6 @@ public class EnumerationLiteralEditPartCLN extends CompartmentEditPart implement return;
}
final Dialog finalDialog = dialog;
-
if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@@ -469,7 +466,6 @@ public class EnumerationLiteralEditPartCLN extends CompartmentEditPart implement @Override
protected void doExecute() {
configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
-
}
};
domain.getCommandStack().execute(command);
@@ -526,8 +522,17 @@ public class EnumerationLiteralEditPartCLN extends CompartmentEditPart implement 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) {
@@ -648,7 +653,6 @@ public class EnumerationLiteralEditPartCLN extends CompartmentEditPart implement if(checkDefaultEdition()) {
return IDirectEdition.DEFAULT_DIRECT_EDITOR;
}
-
// not a named element. no specific editor => do nothing
return IDirectEdition.NO_DIRECT_EDITION;
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/EnumerationNameEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/EnumerationNameEditPart.java index 16bae274b4b..8b3c6a2eec7 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/EnumerationNameEditPart.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/EnumerationNameEditPart.java @@ -64,6 +64,7 @@ import org.eclipse.papyrus.infra.emf.appearance.helper.VisualInformationPapyrusC import org.eclipse.papyrus.infra.gmfdiag.common.editpart.IControlParserForDirectEdit;
import org.eclipse.papyrus.infra.gmfdiag.common.editpart.PapyrusCompartmentEditPart;
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;
@@ -320,7 +321,6 @@ public class EnumerationNameEditPart extends PapyrusCompartmentEditPart implemen ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -407,9 +407,7 @@ public class EnumerationNameEditPart extends PapyrusCompartmentEditPart implemen * @generated
*/
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
@@ -442,7 +440,6 @@ public class EnumerationNameEditPart extends PapyrusCompartmentEditPart implemen return;
}
final Dialog finalDialog = dialog;
-
if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@@ -450,7 +447,6 @@ public class EnumerationNameEditPart extends PapyrusCompartmentEditPart implemen @Override
protected void doExecute() {
configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
-
}
};
domain.getCommandStack().execute(command);
@@ -507,8 +503,17 @@ public class EnumerationNameEditPart extends PapyrusCompartmentEditPart implemen 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) {
@@ -629,7 +634,6 @@ public class EnumerationNameEditPart extends PapyrusCompartmentEditPart implemen if(checkDefaultEdition()) {
return IDirectEdition.DEFAULT_DIRECT_EDITOR;
}
-
// not a named element. no specific editor => do nothing
return IDirectEdition.NO_DIRECT_EDITION;
}
@@ -796,7 +800,6 @@ public class EnumerationNameEditPart extends PapyrusCompartmentEditPart implemen */
protected void addOwnerElementListeners() {
addListenerFilter(ADD_PARENT_MODEL, this, ((View)getParent().getModel())); //$NON-NLS-1$
-
}
/**
@@ -805,7 +808,6 @@ public class EnumerationNameEditPart extends PapyrusCompartmentEditPart implemen public void deactivate() {
removeOwnerElementListeners();
super.deactivate();
-
}
/**
@@ -813,6 +815,5 @@ public class EnumerationNameEditPart extends PapyrusCompartmentEditPart implemen */
protected void removeOwnerElementListeners() {
removeListenerFilter(ADD_PARENT_MODEL);
-
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/EnumerationNameEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/EnumerationNameEditPartCN.java index 25612e09372..7c2a131f8fc 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/EnumerationNameEditPartCN.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/EnumerationNameEditPartCN.java @@ -64,6 +64,7 @@ import org.eclipse.papyrus.infra.emf.appearance.helper.VisualInformationPapyrusC import org.eclipse.papyrus.infra.gmfdiag.common.editpart.IControlParserForDirectEdit;
import org.eclipse.papyrus.infra.gmfdiag.common.editpart.PapyrusCompartmentEditPart;
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;
@@ -320,7 +321,6 @@ public class EnumerationNameEditPartCN extends PapyrusCompartmentEditPart implem ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -407,9 +407,7 @@ public class EnumerationNameEditPartCN extends PapyrusCompartmentEditPart implem * @generated
*/
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
@@ -442,7 +440,6 @@ public class EnumerationNameEditPartCN extends PapyrusCompartmentEditPart implem return;
}
final Dialog finalDialog = dialog;
-
if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@@ -450,7 +447,6 @@ public class EnumerationNameEditPartCN extends PapyrusCompartmentEditPart implem @Override
protected void doExecute() {
configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
-
}
};
domain.getCommandStack().execute(command);
@@ -507,8 +503,17 @@ public class EnumerationNameEditPartCN extends PapyrusCompartmentEditPart implem 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) {
@@ -629,7 +634,6 @@ public class EnumerationNameEditPartCN extends PapyrusCompartmentEditPart implem if(checkDefaultEdition()) {
return IDirectEdition.DEFAULT_DIRECT_EDITOR;
}
-
// not a named element. no specific editor => do nothing
return IDirectEdition.NO_DIRECT_EDITION;
}
@@ -796,7 +800,6 @@ public class EnumerationNameEditPartCN extends PapyrusCompartmentEditPart implem */
protected void addOwnerElementListeners() {
addListenerFilter(ADD_PARENT_MODEL, this, ((View)getParent().getModel())); //$NON-NLS-1$
-
}
/**
@@ -805,7 +808,6 @@ public class EnumerationNameEditPartCN extends PapyrusCompartmentEditPart implem public void deactivate() {
removeOwnerElementListeners();
super.deactivate();
-
}
/**
@@ -813,6 +815,5 @@ public class EnumerationNameEditPartCN extends PapyrusCompartmentEditPart implem */
protected void removeOwnerElementListeners() {
removeListenerFilter(ADD_PARENT_MODEL);
-
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ExecutionEnvironmentCompositeCompartmentEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ExecutionEnvironmentCompositeCompartmentEditPart.java index 5f1ea3fe4aa..ce2114d7429 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ExecutionEnvironmentCompositeCompartmentEditPart.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ExecutionEnvironmentCompositeCompartmentEditPart.java @@ -88,7 +88,6 @@ public class ExecutionEnvironmentCompositeCompartmentEditPart extends ShapeCompa * @generated
*/
public EditPart getTargetEditPart(Request request) {
-
return super.getTargetEditPart(request);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ExecutionEnvironmentCompositeCompartmentEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ExecutionEnvironmentCompositeCompartmentEditPartCN.java index 17305427167..fad65773c40 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ExecutionEnvironmentCompositeCompartmentEditPartCN.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ExecutionEnvironmentCompositeCompartmentEditPartCN.java @@ -88,7 +88,6 @@ public class ExecutionEnvironmentCompositeCompartmentEditPartCN extends ShapeCom * @generated
*/
public EditPart getTargetEditPart(Request request) {
-
return super.getTargetEditPart(request);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ExecutionEnvironmentCompositeEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ExecutionEnvironmentCompositeEditPart.java index 22e31131319..b5c238dfcd2 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ExecutionEnvironmentCompositeEditPart.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ExecutionEnvironmentCompositeEditPart.java @@ -30,6 +30,7 @@ import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout; import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure;
import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IPapyrusNodeFigure;
import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.SelectableBorderedNodeFigure;
import org.eclipse.papyrus.uml.diagram.common.editparts.NamedElementEditPart;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.AffixedNodeAlignmentEditPolicy;
@@ -134,7 +135,6 @@ public class ExecutionEnvironmentCompositeEditPart extends NamedElementEditPart **/
protected void handleNotificationEvent(Notification event) {
super.handleNotificationEvent(event);
-
}
/**
@@ -161,25 +161,18 @@ public class ExecutionEnvironmentCompositeEditPart extends NamedElementEditPart ((ExecutionEnvironmentCompositeNameEditPart)childEditPart).setLabel(getPrimaryShape().getNameLabel());
return true;
}
-
-
if(childEditPart instanceof ExecutionEnvironmentCompositeCompartmentEditPart) {
IFigure pane = getPrimaryShape().getCompositeCompartmentFigure();
setupContentPane(pane); // FIXME each comparment should handle his content pane in his own way
pane.add(((ExecutionEnvironmentCompositeCompartmentEditPart)childEditPart).getFigure());
return true;
}
-
-
-
//Papyrus Gencode :Affixed Port locator
if(childEditPart instanceof PortEditPart) {
IBorderItemLocator locator = new PortPositionLocator(getMainFigure(), PositionConstants.NONE);
getBorderedFigure().getBorderItemContainer().add(((PortEditPart)childEditPart).getFigure(), locator);
return true;
}
-
-
return false;
}
@@ -253,7 +246,6 @@ public class ExecutionEnvironmentCompositeEditPart extends NamedElementEditPart */
protected NodeFigure createMainFigure() {
return new SelectableBorderedNodeFigure(createMainFigureWithSVG());
-
}
/**
@@ -303,8 +295,8 @@ public class ExecutionEnvironmentCompositeEditPart extends NamedElementEditPart * @generated
*/
protected void setLineType(int style) {
- if(primaryShape instanceof NodeFigure) {
- ((NodeFigure)primaryShape).setLineStyle(style);
+ if(primaryShape instanceof IPapyrusNodeFigure) {
+ ((IPapyrusNodeFigure)primaryShape).setLineStyle(style);
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ExecutionEnvironmentCompositeEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ExecutionEnvironmentCompositeEditPartCN.java index 715d92d22f6..4cbc2c45f8a 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ExecutionEnvironmentCompositeEditPartCN.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ExecutionEnvironmentCompositeEditPartCN.java @@ -30,6 +30,7 @@ import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout; import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure;
import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IPapyrusNodeFigure;
import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.SelectableBorderedNodeFigure;
import org.eclipse.papyrus.uml.diagram.common.editparts.NamedElementEditPart;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.AffixedNodeAlignmentEditPolicy;
@@ -134,7 +135,6 @@ public class ExecutionEnvironmentCompositeEditPartCN extends NamedElementEditPar **/
protected void handleNotificationEvent(Notification event) {
super.handleNotificationEvent(event);
-
}
/**
@@ -161,25 +161,18 @@ public class ExecutionEnvironmentCompositeEditPartCN extends NamedElementEditPar ((ExecutionEnvironmentCompositeNameEditPartCN)childEditPart).setLabel(getPrimaryShape().getNameLabel());
return true;
}
-
-
if(childEditPart instanceof ExecutionEnvironmentCompositeCompartmentEditPartCN) {
IFigure pane = getPrimaryShape().getCompositeCompartmentFigure();
setupContentPane(pane); // FIXME each comparment should handle his content pane in his own way
pane.add(((ExecutionEnvironmentCompositeCompartmentEditPartCN)childEditPart).getFigure());
return true;
}
-
-
-
//Papyrus Gencode :Affixed Port locator
if(childEditPart instanceof PortEditPart) {
IBorderItemLocator locator = new PortPositionLocator(getMainFigure(), PositionConstants.NONE);
getBorderedFigure().getBorderItemContainer().add(((PortEditPart)childEditPart).getFigure(), locator);
return true;
}
-
-
return false;
}
@@ -253,7 +246,6 @@ public class ExecutionEnvironmentCompositeEditPartCN extends NamedElementEditPar */
protected NodeFigure createMainFigure() {
return new SelectableBorderedNodeFigure(createMainFigureWithSVG());
-
}
/**
@@ -303,8 +295,8 @@ public class ExecutionEnvironmentCompositeEditPartCN extends NamedElementEditPar * @generated
*/
protected void setLineType(int style) {
- if(primaryShape instanceof NodeFigure) {
- ((NodeFigure)primaryShape).setLineStyle(style);
+ if(primaryShape instanceof IPapyrusNodeFigure) {
+ ((IPapyrusNodeFigure)primaryShape).setLineStyle(style);
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ExecutionEnvironmentCompositeNameEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ExecutionEnvironmentCompositeNameEditPart.java index 478d43d3fcb..07ce94508b3 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ExecutionEnvironmentCompositeNameEditPart.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ExecutionEnvironmentCompositeNameEditPart.java @@ -64,6 +64,7 @@ import org.eclipse.papyrus.infra.emf.appearance.helper.VisualInformationPapyrusC import org.eclipse.papyrus.infra.gmfdiag.common.editpart.IControlParserForDirectEdit;
import org.eclipse.papyrus.infra.gmfdiag.common.editpart.PapyrusCompartmentEditPart;
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;
@@ -320,7 +321,6 @@ public class ExecutionEnvironmentCompositeNameEditPart extends PapyrusCompartmen ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -407,9 +407,7 @@ public class ExecutionEnvironmentCompositeNameEditPart extends PapyrusCompartmen * @generated
*/
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
@@ -442,7 +440,6 @@ public class ExecutionEnvironmentCompositeNameEditPart extends PapyrusCompartmen return;
}
final Dialog finalDialog = dialog;
-
if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@@ -450,7 +447,6 @@ public class ExecutionEnvironmentCompositeNameEditPart extends PapyrusCompartmen @Override
protected void doExecute() {
configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
-
}
};
domain.getCommandStack().execute(command);
@@ -507,8 +503,17 @@ public class ExecutionEnvironmentCompositeNameEditPart extends PapyrusCompartmen 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) {
@@ -629,7 +634,6 @@ public class ExecutionEnvironmentCompositeNameEditPart extends PapyrusCompartmen if(checkDefaultEdition()) {
return IDirectEdition.DEFAULT_DIRECT_EDITOR;
}
-
// not a named element. no specific editor => do nothing
return IDirectEdition.NO_DIRECT_EDITION;
}
@@ -796,7 +800,6 @@ public class ExecutionEnvironmentCompositeNameEditPart extends PapyrusCompartmen */
protected void addOwnerElementListeners() {
addListenerFilter(ADD_PARENT_MODEL, this, ((View)getParent().getModel())); //$NON-NLS-1$
-
}
/**
@@ -805,7 +808,6 @@ public class ExecutionEnvironmentCompositeNameEditPart extends PapyrusCompartmen public void deactivate() {
removeOwnerElementListeners();
super.deactivate();
-
}
/**
@@ -813,6 +815,5 @@ public class ExecutionEnvironmentCompositeNameEditPart extends PapyrusCompartmen */
protected void removeOwnerElementListeners() {
removeListenerFilter(ADD_PARENT_MODEL);
-
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ExecutionEnvironmentCompositeNameEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ExecutionEnvironmentCompositeNameEditPartCN.java index 294dd495149..bb764e7892c 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ExecutionEnvironmentCompositeNameEditPartCN.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ExecutionEnvironmentCompositeNameEditPartCN.java @@ -64,6 +64,7 @@ import org.eclipse.papyrus.infra.emf.appearance.helper.VisualInformationPapyrusC import org.eclipse.papyrus.infra.gmfdiag.common.editpart.IControlParserForDirectEdit;
import org.eclipse.papyrus.infra.gmfdiag.common.editpart.PapyrusCompartmentEditPart;
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;
@@ -320,7 +321,6 @@ public class ExecutionEnvironmentCompositeNameEditPartCN extends PapyrusCompartm ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -407,9 +407,7 @@ public class ExecutionEnvironmentCompositeNameEditPartCN extends PapyrusCompartm * @generated
*/
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
@@ -442,7 +440,6 @@ public class ExecutionEnvironmentCompositeNameEditPartCN extends PapyrusCompartm return;
}
final Dialog finalDialog = dialog;
-
if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@@ -450,7 +447,6 @@ public class ExecutionEnvironmentCompositeNameEditPartCN extends PapyrusCompartm @Override
protected void doExecute() {
configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
-
}
};
domain.getCommandStack().execute(command);
@@ -507,8 +503,17 @@ public class ExecutionEnvironmentCompositeNameEditPartCN extends PapyrusCompartm 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) {
@@ -629,7 +634,6 @@ public class ExecutionEnvironmentCompositeNameEditPartCN extends PapyrusCompartm if(checkDefaultEdition()) {
return IDirectEdition.DEFAULT_DIRECT_EDITOR;
}
-
// not a named element. no specific editor => do nothing
return IDirectEdition.NO_DIRECT_EDITION;
}
@@ -796,7 +800,6 @@ public class ExecutionEnvironmentCompositeNameEditPartCN extends PapyrusCompartm */
protected void addOwnerElementListeners() {
addListenerFilter(ADD_PARENT_MODEL, this, ((View)getParent().getModel())); //$NON-NLS-1$
-
}
/**
@@ -805,7 +808,6 @@ public class ExecutionEnvironmentCompositeNameEditPartCN extends PapyrusCompartm public void deactivate() {
removeOwnerElementListeners();
super.deactivate();
-
}
/**
@@ -813,6 +815,5 @@ public class ExecutionEnvironmentCompositeNameEditPartCN extends PapyrusCompartm */
protected void removeOwnerElementListeners() {
removeListenerFilter(ADD_PARENT_MODEL);
-
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ExpressionEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ExpressionEditPart.java index d37114e35c8..c54a4ccd11f 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ExpressionEditPart.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ExpressionEditPart.java @@ -26,6 +26,7 @@ import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure; import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
import org.eclipse.gmf.runtime.notation.View;
import org.eclipse.papyrus.infra.gmfdiag.common.editpart.NodeEditPart;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IPapyrusNodeFigure;
import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.SelectableBorderedNodeFigure;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy;
@@ -124,8 +125,6 @@ public class ExpressionEditPart extends NodeEditPart { ((ExpressionNameEditPart)childEditPart).setLabel(getPrimaryShape().getNameLabel());
return true;
}
-
-
return false;
}
@@ -184,7 +183,6 @@ public class ExpressionEditPart extends NodeEditPart { */
protected NodeFigure createNodeFigure() {
return new SelectableBorderedNodeFigure(createMainFigureWithSVG());
-
}
/**
@@ -234,8 +232,8 @@ public class ExpressionEditPart extends NodeEditPart { * @generated
*/
protected void setLineType(int style) {
- if(primaryShape instanceof NodeFigure) {
- ((NodeFigure)primaryShape).setLineStyle(style);
+ if(primaryShape instanceof IPapyrusNodeFigure) {
+ ((IPapyrusNodeFigure)primaryShape).setLineStyle(style);
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ExpressionNameEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ExpressionNameEditPart.java index 623e1655855..f6bcef54f48 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ExpressionNameEditPart.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ExpressionNameEditPart.java @@ -64,6 +64,7 @@ import org.eclipse.papyrus.infra.emf.appearance.helper.VisualInformationPapyrusC import org.eclipse.papyrus.infra.gmfdiag.common.editpart.IControlParserForDirectEdit;
import org.eclipse.papyrus.infra.gmfdiag.common.editpart.PapyrusCompartmentEditPart;
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;
@@ -320,7 +321,6 @@ public class ExpressionNameEditPart extends PapyrusCompartmentEditPart implement ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -407,9 +407,7 @@ public class ExpressionNameEditPart extends PapyrusCompartmentEditPart implement * @generated
*/
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
@@ -442,7 +440,6 @@ public class ExpressionNameEditPart extends PapyrusCompartmentEditPart implement return;
}
final Dialog finalDialog = dialog;
-
if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@@ -450,7 +447,6 @@ public class ExpressionNameEditPart extends PapyrusCompartmentEditPart implement @Override
protected void doExecute() {
configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
-
}
};
domain.getCommandStack().execute(command);
@@ -507,8 +503,17 @@ public class ExpressionNameEditPart extends PapyrusCompartmentEditPart implement 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) {
@@ -629,7 +634,6 @@ public class ExpressionNameEditPart extends PapyrusCompartmentEditPart implement if(checkDefaultEdition()) {
return IDirectEdition.DEFAULT_DIRECT_EDITOR;
}
-
// not a named element. no specific editor => do nothing
return IDirectEdition.NO_DIRECT_EDITION;
}
@@ -796,7 +800,6 @@ public class ExpressionNameEditPart extends PapyrusCompartmentEditPart implement */
protected void addOwnerElementListeners() {
addListenerFilter(ADD_PARENT_MODEL, this, ((View)getParent().getModel())); //$NON-NLS-1$
-
}
/**
@@ -805,7 +808,6 @@ public class ExpressionNameEditPart extends PapyrusCompartmentEditPart implement public void deactivate() {
removeOwnerElementListeners();
super.deactivate();
-
}
/**
@@ -813,6 +815,5 @@ public class ExpressionNameEditPart extends PapyrusCompartmentEditPart implement */
protected void removeOwnerElementListeners() {
removeListenerFilter(ADD_PARENT_MODEL);
-
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/FunctionBehaviorCompositeCompartmentEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/FunctionBehaviorCompositeCompartmentEditPart.java index 14fe9f533f6..9d467e4b518 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/FunctionBehaviorCompositeCompartmentEditPart.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/FunctionBehaviorCompositeCompartmentEditPart.java @@ -88,7 +88,6 @@ public class FunctionBehaviorCompositeCompartmentEditPart extends ShapeCompartme * @generated
*/
public EditPart getTargetEditPart(Request request) {
-
return super.getTargetEditPart(request);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/FunctionBehaviorCompositeCompartmentEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/FunctionBehaviorCompositeCompartmentEditPartCN.java index d9e068e25c4..b11f32620a1 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/FunctionBehaviorCompositeCompartmentEditPartCN.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/FunctionBehaviorCompositeCompartmentEditPartCN.java @@ -88,7 +88,6 @@ public class FunctionBehaviorCompositeCompartmentEditPartCN extends ShapeCompart * @generated
*/
public EditPart getTargetEditPart(Request request) {
-
return super.getTargetEditPart(request);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/FunctionBehaviorCompositeEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/FunctionBehaviorCompositeEditPart.java index e09ab8242b9..1c0550176a9 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/FunctionBehaviorCompositeEditPart.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/FunctionBehaviorCompositeEditPart.java @@ -30,6 +30,7 @@ import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout; import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure;
import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IPapyrusNodeFigure;
import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.SelectableBorderedNodeFigure;
import org.eclipse.papyrus.uml.diagram.common.editparts.NamedElementEditPart;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.AffixedNodeAlignmentEditPolicy;
@@ -135,7 +136,6 @@ public class FunctionBehaviorCompositeEditPart extends NamedElementEditPart { **/
protected void handleNotificationEvent(Notification event) {
super.handleNotificationEvent(event);
-
}
/**
@@ -162,35 +162,24 @@ public class FunctionBehaviorCompositeEditPart extends NamedElementEditPart { ((FunctionBehaviorCompositeNameEditPart)childEditPart).setLabel(getPrimaryShape().getNameLabel());
return true;
}
-
-
if(childEditPart instanceof FunctionBehaviorCompositeCompartmentEditPart) {
IFigure pane = getPrimaryShape().getCompositeCompartmentFigure();
setupContentPane(pane); // FIXME each comparment should handle his content pane in his own way
pane.add(((FunctionBehaviorCompositeCompartmentEditPart)childEditPart).getFigure());
return true;
}
-
-
-
//Papyrus Gencode :Affixed Port locator
if(childEditPart instanceof PortEditPart) {
IBorderItemLocator locator = new PortPositionLocator(getMainFigure(), PositionConstants.NONE);
getBorderedFigure().getBorderItemContainer().add(((PortEditPart)childEditPart).getFigure(), locator);
return true;
}
-
-
-
-
//Papyrus Gencode :Affixed Port locator
if(childEditPart instanceof ParameterEditPart) {
IBorderItemLocator locator = new PortPositionLocator(getMainFigure(), PositionConstants.NONE);
getBorderedFigure().getBorderItemContainer().add(((ParameterEditPart)childEditPart).getFigure(), locator);
return true;
}
-
-
return false;
}
@@ -268,7 +257,6 @@ public class FunctionBehaviorCompositeEditPart extends NamedElementEditPart { */
protected NodeFigure createMainFigure() {
return new SelectableBorderedNodeFigure(createMainFigureWithSVG());
-
}
/**
@@ -318,8 +306,8 @@ public class FunctionBehaviorCompositeEditPart extends NamedElementEditPart { * @generated
*/
protected void setLineType(int style) {
- if(primaryShape instanceof NodeFigure) {
- ((NodeFigure)primaryShape).setLineStyle(style);
+ if(primaryShape instanceof IPapyrusNodeFigure) {
+ ((IPapyrusNodeFigure)primaryShape).setLineStyle(style);
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/FunctionBehaviorCompositeEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/FunctionBehaviorCompositeEditPartCN.java index dfb50d969a6..5a93e4bed2f 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/FunctionBehaviorCompositeEditPartCN.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/FunctionBehaviorCompositeEditPartCN.java @@ -30,6 +30,7 @@ import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout; import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure;
import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IPapyrusNodeFigure;
import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.SelectableBorderedNodeFigure;
import org.eclipse.papyrus.uml.diagram.common.editparts.NamedElementEditPart;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.AffixedNodeAlignmentEditPolicy;
@@ -135,7 +136,6 @@ public class FunctionBehaviorCompositeEditPartCN extends NamedElementEditPart { **/
protected void handleNotificationEvent(Notification event) {
super.handleNotificationEvent(event);
-
}
/**
@@ -162,35 +162,24 @@ public class FunctionBehaviorCompositeEditPartCN extends NamedElementEditPart { ((FunctionBehaviorCompositeNameEditPartCN)childEditPart).setLabel(getPrimaryShape().getNameLabel());
return true;
}
-
-
if(childEditPart instanceof FunctionBehaviorCompositeCompartmentEditPartCN) {
IFigure pane = getPrimaryShape().getCompositeCompartmentFigure();
setupContentPane(pane); // FIXME each comparment should handle his content pane in his own way
pane.add(((FunctionBehaviorCompositeCompartmentEditPartCN)childEditPart).getFigure());
return true;
}
-
-
-
//Papyrus Gencode :Affixed Port locator
if(childEditPart instanceof PortEditPart) {
IBorderItemLocator locator = new PortPositionLocator(getMainFigure(), PositionConstants.NONE);
getBorderedFigure().getBorderItemContainer().add(((PortEditPart)childEditPart).getFigure(), locator);
return true;
}
-
-
-
-
//Papyrus Gencode :Affixed Port locator
if(childEditPart instanceof ParameterEditPart) {
IBorderItemLocator locator = new PortPositionLocator(getMainFigure(), PositionConstants.NONE);
getBorderedFigure().getBorderItemContainer().add(((ParameterEditPart)childEditPart).getFigure(), locator);
return true;
}
-
-
return false;
}
@@ -268,7 +257,6 @@ public class FunctionBehaviorCompositeEditPartCN extends NamedElementEditPart { */
protected NodeFigure createMainFigure() {
return new SelectableBorderedNodeFigure(createMainFigureWithSVG());
-
}
/**
@@ -318,8 +306,8 @@ public class FunctionBehaviorCompositeEditPartCN extends NamedElementEditPart { * @generated
*/
protected void setLineType(int style) {
- if(primaryShape instanceof NodeFigure) {
- ((NodeFigure)primaryShape).setLineStyle(style);
+ if(primaryShape instanceof IPapyrusNodeFigure) {
+ ((IPapyrusNodeFigure)primaryShape).setLineStyle(style);
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/FunctionBehaviorCompositeNameEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/FunctionBehaviorCompositeNameEditPart.java index 7b52e1cbcb3..7ea7e215f0a 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/FunctionBehaviorCompositeNameEditPart.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/FunctionBehaviorCompositeNameEditPart.java @@ -64,6 +64,7 @@ import org.eclipse.papyrus.infra.emf.appearance.helper.VisualInformationPapyrusC import org.eclipse.papyrus.infra.gmfdiag.common.editpart.IControlParserForDirectEdit;
import org.eclipse.papyrus.infra.gmfdiag.common.editpart.PapyrusCompartmentEditPart;
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;
@@ -320,7 +321,6 @@ public class FunctionBehaviorCompositeNameEditPart extends PapyrusCompartmentEdi ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -407,9 +407,7 @@ public class FunctionBehaviorCompositeNameEditPart extends PapyrusCompartmentEdi * @generated
*/
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
@@ -442,7 +440,6 @@ public class FunctionBehaviorCompositeNameEditPart extends PapyrusCompartmentEdi return;
}
final Dialog finalDialog = dialog;
-
if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@@ -450,7 +447,6 @@ public class FunctionBehaviorCompositeNameEditPart extends PapyrusCompartmentEdi @Override
protected void doExecute() {
configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
-
}
};
domain.getCommandStack().execute(command);
@@ -507,8 +503,17 @@ public class FunctionBehaviorCompositeNameEditPart extends PapyrusCompartmentEdi 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) {
@@ -629,7 +634,6 @@ public class FunctionBehaviorCompositeNameEditPart extends PapyrusCompartmentEdi if(checkDefaultEdition()) {
return IDirectEdition.DEFAULT_DIRECT_EDITOR;
}
-
// not a named element. no specific editor => do nothing
return IDirectEdition.NO_DIRECT_EDITION;
}
@@ -796,7 +800,6 @@ public class FunctionBehaviorCompositeNameEditPart extends PapyrusCompartmentEdi */
protected void addOwnerElementListeners() {
addListenerFilter(ADD_PARENT_MODEL, this, ((View)getParent().getModel())); //$NON-NLS-1$
-
}
/**
@@ -805,7 +808,6 @@ public class FunctionBehaviorCompositeNameEditPart extends PapyrusCompartmentEdi public void deactivate() {
removeOwnerElementListeners();
super.deactivate();
-
}
/**
@@ -813,6 +815,5 @@ public class FunctionBehaviorCompositeNameEditPart extends PapyrusCompartmentEdi */
protected void removeOwnerElementListeners() {
removeListenerFilter(ADD_PARENT_MODEL);
-
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/FunctionBehaviorCompositeNameEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/FunctionBehaviorCompositeNameEditPartCN.java index 7ca06c4823b..04588efe43e 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/FunctionBehaviorCompositeNameEditPartCN.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/FunctionBehaviorCompositeNameEditPartCN.java @@ -64,6 +64,7 @@ import org.eclipse.papyrus.infra.emf.appearance.helper.VisualInformationPapyrusC import org.eclipse.papyrus.infra.gmfdiag.common.editpart.IControlParserForDirectEdit;
import org.eclipse.papyrus.infra.gmfdiag.common.editpart.PapyrusCompartmentEditPart;
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;
@@ -320,7 +321,6 @@ public class FunctionBehaviorCompositeNameEditPartCN extends PapyrusCompartmentE ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -407,9 +407,7 @@ public class FunctionBehaviorCompositeNameEditPartCN extends PapyrusCompartmentE * @generated
*/
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
@@ -442,7 +440,6 @@ public class FunctionBehaviorCompositeNameEditPartCN extends PapyrusCompartmentE return;
}
final Dialog finalDialog = dialog;
-
if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@@ -450,7 +447,6 @@ public class FunctionBehaviorCompositeNameEditPartCN extends PapyrusCompartmentE @Override
protected void doExecute() {
configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
-
}
};
domain.getCommandStack().execute(command);
@@ -507,8 +503,17 @@ public class FunctionBehaviorCompositeNameEditPartCN extends PapyrusCompartmentE 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) {
@@ -629,7 +634,6 @@ public class FunctionBehaviorCompositeNameEditPartCN extends PapyrusCompartmentE if(checkDefaultEdition()) {
return IDirectEdition.DEFAULT_DIRECT_EDITOR;
}
-
// not a named element. no specific editor => do nothing
return IDirectEdition.NO_DIRECT_EDITION;
}
@@ -796,7 +800,6 @@ public class FunctionBehaviorCompositeNameEditPartCN extends PapyrusCompartmentE */
protected void addOwnerElementListeners() {
addListenerFilter(ADD_PARENT_MODEL, this, ((View)getParent().getModel())); //$NON-NLS-1$
-
}
/**
@@ -805,7 +808,6 @@ public class FunctionBehaviorCompositeNameEditPartCN extends PapyrusCompartmentE public void deactivate() {
removeOwnerElementListeners();
super.deactivate();
-
}
/**
@@ -813,6 +815,5 @@ public class FunctionBehaviorCompositeNameEditPartCN extends PapyrusCompartmentE */
protected void removeOwnerElementListeners() {
removeListenerFilter(ADD_PARENT_MODEL);
-
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/GeneralizationAppliedStereotypeEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/GeneralizationAppliedStereotypeEditPart.java index e587654d3cf..6f11a3aadf9 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/GeneralizationAppliedStereotypeEditPart.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/GeneralizationAppliedStereotypeEditPart.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 GeneralizationAppliedStereotypeEditPart extends PapyrusLabelEditPar ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -406,9 +406,7 @@ public class GeneralizationAppliedStereotypeEditPart extends PapyrusLabelEditPar * @generated
*/
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
@@ -441,7 +439,6 @@ public class GeneralizationAppliedStereotypeEditPart extends PapyrusLabelEditPar 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 GeneralizationAppliedStereotypeEditPart extends PapyrusLabelEditPar @Override
protected void doExecute() {
configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
-
}
};
domain.getCommandStack().execute(command);
@@ -506,8 +502,17 @@ public class GeneralizationAppliedStereotypeEditPart extends PapyrusLabelEditPar 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 GeneralizationAppliedStereotypeEditPart extends PapyrusLabelEditPar }
}
}
-
super.handleNotificationEvent(event);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/InformationFlowAppliedStereotypeEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/InformationFlowAppliedStereotypeEditPart.java index 04dcaa27500..0b765cbf21d 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/InformationFlowAppliedStereotypeEditPart.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/InformationFlowAppliedStereotypeEditPart.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 InformationFlowAppliedStereotypeEditPart extends PapyrusLabelEditPa ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -406,9 +406,7 @@ public class InformationFlowAppliedStereotypeEditPart extends PapyrusLabelEditPa * @generated
*/
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
@@ -441,7 +439,6 @@ public class InformationFlowAppliedStereotypeEditPart extends PapyrusLabelEditPa 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 InformationFlowAppliedStereotypeEditPart extends PapyrusLabelEditPa @Override
protected void doExecute() {
configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
-
}
};
domain.getCommandStack().execute(command);
@@ -506,8 +502,17 @@ public class InformationFlowAppliedStereotypeEditPart extends PapyrusLabelEditPa 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 InformationFlowAppliedStereotypeEditPart extends PapyrusLabelEditPa }
}
}
-
super.handleNotificationEvent(event);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/InformationFlowConveyedLabelEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/InformationFlowConveyedLabelEditPart.java index d21c8102ce2..68663d5f5e5 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/InformationFlowConveyedLabelEditPart.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/InformationFlowConveyedLabelEditPart.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;
@@ -323,7 +324,6 @@ public class InformationFlowConveyedLabelEditPart extends PapyrusLabelEditPart i ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -410,9 +410,7 @@ public class InformationFlowConveyedLabelEditPart extends PapyrusLabelEditPart i * @generated
*/
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
@@ -445,7 +443,6 @@ public class InformationFlowConveyedLabelEditPart extends PapyrusLabelEditPart i return;
}
final Dialog finalDialog = dialog;
-
if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@@ -453,7 +450,6 @@ public class InformationFlowConveyedLabelEditPart extends PapyrusLabelEditPart i @Override
protected void doExecute() {
configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
-
}
};
domain.getCommandStack().execute(command);
@@ -510,8 +506,17 @@ public class InformationFlowConveyedLabelEditPart extends PapyrusLabelEditPart i 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) {
@@ -632,7 +637,6 @@ public class InformationFlowConveyedLabelEditPart extends PapyrusLabelEditPart i if(checkDefaultEdition()) {
return IDirectEdition.DEFAULT_DIRECT_EDITOR;
}
-
// not a named element. no specific editor => do nothing
return IDirectEdition.NO_DIRECT_EDITION;
}
@@ -750,7 +754,6 @@ public class InformationFlowConveyedLabelEditPart extends PapyrusLabelEditPart i }
}
}
-
super.handleNotificationEvent(event);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/InformationItemEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/InformationItemEditPart.java index 674696bedbd..26d2363d296 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/InformationItemEditPart.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/InformationItemEditPart.java @@ -26,6 +26,7 @@ import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout; import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure;
import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IPapyrusNodeFigure;
import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.SelectableBorderedNodeFigure;
import org.eclipse.papyrus.uml.diagram.common.editparts.NamedElementEditPart;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy;
@@ -110,7 +111,6 @@ public class InformationItemEditPart extends NamedElementEditPart { **/
protected void handleNotificationEvent(Notification event) {
super.handleNotificationEvent(event);
-
}
/**
@@ -137,8 +137,6 @@ public class InformationItemEditPart extends NamedElementEditPart { ((InformationItemNameEditPart)childEditPart).setLabel(getPrimaryShape().getNameLabel());
return true;
}
-
-
return false;
}
@@ -197,7 +195,6 @@ public class InformationItemEditPart extends NamedElementEditPart { */
protected NodeFigure createNodeFigure() {
return new SelectableBorderedNodeFigure(createMainFigureWithSVG());
-
}
/**
@@ -247,8 +244,8 @@ public class InformationItemEditPart extends NamedElementEditPart { * @generated
*/
protected void setLineType(int style) {
- if(primaryShape instanceof NodeFigure) {
- ((NodeFigure)primaryShape).setLineStyle(style);
+ if(primaryShape instanceof IPapyrusNodeFigure) {
+ ((IPapyrusNodeFigure)primaryShape).setLineStyle(style);
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/InformationItemEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/InformationItemEditPartCN.java index 697fc3b8a63..b381b87f512 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/InformationItemEditPartCN.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/InformationItemEditPartCN.java @@ -26,6 +26,7 @@ import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout; import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure;
import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IPapyrusNodeFigure;
import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.SelectableBorderedNodeFigure;
import org.eclipse.papyrus.uml.diagram.common.editparts.NamedElementEditPart;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy;
@@ -110,7 +111,6 @@ public class InformationItemEditPartCN extends NamedElementEditPart { **/
protected void handleNotificationEvent(Notification event) {
super.handleNotificationEvent(event);
-
}
/**
@@ -137,8 +137,6 @@ public class InformationItemEditPartCN extends NamedElementEditPart { ((InformationItemNameEditPartCN)childEditPart).setLabel(getPrimaryShape().getNameLabel());
return true;
}
-
-
return false;
}
@@ -197,7 +195,6 @@ public class InformationItemEditPartCN extends NamedElementEditPart { */
protected NodeFigure createNodeFigure() {
return new SelectableBorderedNodeFigure(createMainFigureWithSVG());
-
}
/**
@@ -247,8 +244,8 @@ public class InformationItemEditPartCN extends NamedElementEditPart { * @generated
*/
protected void setLineType(int style) {
- if(primaryShape instanceof NodeFigure) {
- ((NodeFigure)primaryShape).setLineStyle(style);
+ if(primaryShape instanceof IPapyrusNodeFigure) {
+ ((IPapyrusNodeFigure)primaryShape).setLineStyle(style);
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/InformationItemNameEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/InformationItemNameEditPart.java index e27b4dbc08b..a1e19d06e6e 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/InformationItemNameEditPart.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/InformationItemNameEditPart.java @@ -64,6 +64,7 @@ import org.eclipse.papyrus.infra.emf.appearance.helper.VisualInformationPapyrusC import org.eclipse.papyrus.infra.gmfdiag.common.editpart.IControlParserForDirectEdit;
import org.eclipse.papyrus.infra.gmfdiag.common.editpart.PapyrusCompartmentEditPart;
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;
@@ -320,7 +321,6 @@ public class InformationItemNameEditPart extends PapyrusCompartmentEditPart impl ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -407,9 +407,7 @@ public class InformationItemNameEditPart extends PapyrusCompartmentEditPart impl * @generated
*/
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
@@ -442,7 +440,6 @@ public class InformationItemNameEditPart extends PapyrusCompartmentEditPart impl return;
}
final Dialog finalDialog = dialog;
-
if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@@ -450,7 +447,6 @@ public class InformationItemNameEditPart extends PapyrusCompartmentEditPart impl @Override
protected void doExecute() {
configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
-
}
};
domain.getCommandStack().execute(command);
@@ -507,8 +503,17 @@ public class InformationItemNameEditPart extends PapyrusCompartmentEditPart impl 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) {
@@ -629,7 +634,6 @@ public class InformationItemNameEditPart extends PapyrusCompartmentEditPart impl if(checkDefaultEdition()) {
return IDirectEdition.DEFAULT_DIRECT_EDITOR;
}
-
// not a named element. no specific editor => do nothing
return IDirectEdition.NO_DIRECT_EDITION;
}
@@ -796,7 +800,6 @@ public class InformationItemNameEditPart extends PapyrusCompartmentEditPart impl */
protected void addOwnerElementListeners() {
addListenerFilter(ADD_PARENT_MODEL, this, ((View)getParent().getModel())); //$NON-NLS-1$
-
}
/**
@@ -805,7 +808,6 @@ public class InformationItemNameEditPart extends PapyrusCompartmentEditPart impl public void deactivate() {
removeOwnerElementListeners();
super.deactivate();
-
}
/**
@@ -813,6 +815,5 @@ public class InformationItemNameEditPart extends PapyrusCompartmentEditPart impl */
protected void removeOwnerElementListeners() {
removeListenerFilter(ADD_PARENT_MODEL);
-
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/InformationItemNameEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/InformationItemNameEditPartCN.java index 5b2503549bc..461a8537468 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/InformationItemNameEditPartCN.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/InformationItemNameEditPartCN.java @@ -64,6 +64,7 @@ import org.eclipse.papyrus.infra.emf.appearance.helper.VisualInformationPapyrusC import org.eclipse.papyrus.infra.gmfdiag.common.editpart.IControlParserForDirectEdit;
import org.eclipse.papyrus.infra.gmfdiag.common.editpart.PapyrusCompartmentEditPart;
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;
@@ -320,7 +321,6 @@ public class InformationItemNameEditPartCN extends PapyrusCompartmentEditPart im ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -407,9 +407,7 @@ public class InformationItemNameEditPartCN extends PapyrusCompartmentEditPart im * @generated
*/
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
@@ -442,7 +440,6 @@ public class InformationItemNameEditPartCN extends PapyrusCompartmentEditPart im return;
}
final Dialog finalDialog = dialog;
-
if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@@ -450,7 +447,6 @@ public class InformationItemNameEditPartCN extends PapyrusCompartmentEditPart im @Override
protected void doExecute() {
configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
-
}
};
domain.getCommandStack().execute(command);
@@ -507,8 +503,17 @@ public class InformationItemNameEditPartCN extends PapyrusCompartmentEditPart im 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) {
@@ -629,7 +634,6 @@ public class InformationItemNameEditPartCN extends PapyrusCompartmentEditPart im if(checkDefaultEdition()) {
return IDirectEdition.DEFAULT_DIRECT_EDITOR;
}
-
// not a named element. no specific editor => do nothing
return IDirectEdition.NO_DIRECT_EDITION;
}
@@ -796,7 +800,6 @@ public class InformationItemNameEditPartCN extends PapyrusCompartmentEditPart im */
protected void addOwnerElementListeners() {
addListenerFilter(ADD_PARENT_MODEL, this, ((View)getParent().getModel())); //$NON-NLS-1$
-
}
/**
@@ -805,7 +808,6 @@ public class InformationItemNameEditPartCN extends PapyrusCompartmentEditPart im public void deactivate() {
removeOwnerElementListeners();
super.deactivate();
-
}
/**
@@ -813,6 +815,5 @@ public class InformationItemNameEditPartCN extends PapyrusCompartmentEditPart im */
protected void removeOwnerElementListeners() {
removeListenerFilter(ADD_PARENT_MODEL);
-
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/InstanceValueEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/InstanceValueEditPart.java index 744f1458d6d..17191f3db7e 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/InstanceValueEditPart.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/InstanceValueEditPart.java @@ -26,6 +26,7 @@ import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure; import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
import org.eclipse.gmf.runtime.notation.View;
import org.eclipse.papyrus.infra.gmfdiag.common.editpart.NodeEditPart;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IPapyrusNodeFigure;
import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.SelectableBorderedNodeFigure;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy;
@@ -124,8 +125,6 @@ public class InstanceValueEditPart extends NodeEditPart { ((InstanceValueNameEditPart)childEditPart).setLabel(getPrimaryShape().getNameLabel());
return true;
}
-
-
return false;
}
@@ -184,7 +183,6 @@ public class InstanceValueEditPart extends NodeEditPart { */
protected NodeFigure createNodeFigure() {
return new SelectableBorderedNodeFigure(createMainFigureWithSVG());
-
}
/**
@@ -234,8 +232,8 @@ public class InstanceValueEditPart extends NodeEditPart { * @generated
*/
protected void setLineType(int style) {
- if(primaryShape instanceof NodeFigure) {
- ((NodeFigure)primaryShape).setLineStyle(style);
+ if(primaryShape instanceof IPapyrusNodeFigure) {
+ ((IPapyrusNodeFigure)primaryShape).setLineStyle(style);
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/InstanceValueNameEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/InstanceValueNameEditPart.java index 6eca1192198..6b08d93f9c0 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/InstanceValueNameEditPart.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/InstanceValueNameEditPart.java @@ -64,6 +64,7 @@ import org.eclipse.papyrus.infra.emf.appearance.helper.VisualInformationPapyrusC import org.eclipse.papyrus.infra.gmfdiag.common.editpart.IControlParserForDirectEdit;
import org.eclipse.papyrus.infra.gmfdiag.common.editpart.PapyrusCompartmentEditPart;
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;
@@ -320,7 +321,6 @@ public class InstanceValueNameEditPart extends PapyrusCompartmentEditPart implem ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -407,9 +407,7 @@ public class InstanceValueNameEditPart extends PapyrusCompartmentEditPart implem * @generated
*/
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
@@ -442,7 +440,6 @@ public class InstanceValueNameEditPart extends PapyrusCompartmentEditPart implem return;
}
final Dialog finalDialog = dialog;
-
if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@@ -450,7 +447,6 @@ public class InstanceValueNameEditPart extends PapyrusCompartmentEditPart implem @Override
protected void doExecute() {
configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
-
}
};
domain.getCommandStack().execute(command);
@@ -507,8 +503,17 @@ public class InstanceValueNameEditPart extends PapyrusCompartmentEditPart implem 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) {
@@ -629,7 +634,6 @@ public class InstanceValueNameEditPart extends PapyrusCompartmentEditPart implem if(checkDefaultEdition()) {
return IDirectEdition.DEFAULT_DIRECT_EDITOR;
}
-
// not a named element. no specific editor => do nothing
return IDirectEdition.NO_DIRECT_EDITION;
}
@@ -796,7 +800,6 @@ public class InstanceValueNameEditPart extends PapyrusCompartmentEditPart implem */
protected void addOwnerElementListeners() {
addListenerFilter(ADD_PARENT_MODEL, this, ((View)getParent().getModel())); //$NON-NLS-1$
-
}
/**
@@ -805,7 +808,6 @@ public class InstanceValueNameEditPart extends PapyrusCompartmentEditPart implem public void deactivate() {
removeOwnerElementListeners();
super.deactivate();
-
}
/**
@@ -813,6 +815,5 @@ public class InstanceValueNameEditPart extends PapyrusCompartmentEditPart implem */
protected void removeOwnerElementListeners() {
removeListenerFilter(ADD_PARENT_MODEL);
-
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/InteractionCompositeCompartmentEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/InteractionCompositeCompartmentEditPart.java index 18f7460b643..575ba8f334a 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/InteractionCompositeCompartmentEditPart.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/InteractionCompositeCompartmentEditPart.java @@ -88,7 +88,6 @@ public class InteractionCompositeCompartmentEditPart extends ShapeCompartmentEdi * @generated
*/
public EditPart getTargetEditPart(Request request) {
-
return super.getTargetEditPart(request);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/InteractionCompositeCompartmentEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/InteractionCompositeCompartmentEditPartCN.java index 47b1f9874d1..efd1a707742 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/InteractionCompositeCompartmentEditPartCN.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/InteractionCompositeCompartmentEditPartCN.java @@ -88,7 +88,6 @@ public class InteractionCompositeCompartmentEditPartCN extends ShapeCompartmentE * @generated
*/
public EditPart getTargetEditPart(Request request) {
-
return super.getTargetEditPart(request);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/InteractionCompositeEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/InteractionCompositeEditPart.java index f23d5e2070d..91841de65e1 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/InteractionCompositeEditPart.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/InteractionCompositeEditPart.java @@ -30,6 +30,7 @@ import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout; import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure;
import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IPapyrusNodeFigure;
import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.SelectableBorderedNodeFigure;
import org.eclipse.papyrus.uml.diagram.common.editparts.NamedElementEditPart;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.AffixedNodeAlignmentEditPolicy;
@@ -135,7 +136,6 @@ public class InteractionCompositeEditPart extends NamedElementEditPart { **/
protected void handleNotificationEvent(Notification event) {
super.handleNotificationEvent(event);
-
}
/**
@@ -162,35 +162,24 @@ public class InteractionCompositeEditPart extends NamedElementEditPart { ((InteractionCompositeNameEditPart)childEditPart).setLabel(getPrimaryShape().getNameLabel());
return true;
}
-
-
if(childEditPart instanceof InteractionCompositeCompartmentEditPart) {
IFigure pane = getPrimaryShape().getCompositeCompartmentFigure();
setupContentPane(pane); // FIXME each comparment should handle his content pane in his own way
pane.add(((InteractionCompositeCompartmentEditPart)childEditPart).getFigure());
return true;
}
-
-
-
//Papyrus Gencode :Affixed Port locator
if(childEditPart instanceof PortEditPart) {
IBorderItemLocator locator = new PortPositionLocator(getMainFigure(), PositionConstants.NONE);
getBorderedFigure().getBorderItemContainer().add(((PortEditPart)childEditPart).getFigure(), locator);
return true;
}
-
-
-
-
//Papyrus Gencode :Affixed Port locator
if(childEditPart instanceof ParameterEditPart) {
IBorderItemLocator locator = new PortPositionLocator(getMainFigure(), PositionConstants.NONE);
getBorderedFigure().getBorderItemContainer().add(((ParameterEditPart)childEditPart).getFigure(), locator);
return true;
}
-
-
return false;
}
@@ -268,7 +257,6 @@ public class InteractionCompositeEditPart extends NamedElementEditPart { */
protected NodeFigure createMainFigure() {
return new SelectableBorderedNodeFigure(createMainFigureWithSVG());
-
}
/**
@@ -318,8 +306,8 @@ public class InteractionCompositeEditPart extends NamedElementEditPart { * @generated
*/
protected void setLineType(int style) {
- if(primaryShape instanceof NodeFigure) {
- ((NodeFigure)primaryShape).setLineStyle(style);
+ if(primaryShape instanceof IPapyrusNodeFigure) {
+ ((IPapyrusNodeFigure)primaryShape).setLineStyle(style);
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/InteractionCompositeEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/InteractionCompositeEditPartCN.java index 5c36b12a296..da41321d9f5 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/InteractionCompositeEditPartCN.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/InteractionCompositeEditPartCN.java @@ -30,6 +30,7 @@ import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout; import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure;
import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IPapyrusNodeFigure;
import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.SelectableBorderedNodeFigure;
import org.eclipse.papyrus.uml.diagram.common.editparts.NamedElementEditPart;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.AffixedNodeAlignmentEditPolicy;
@@ -135,7 +136,6 @@ public class InteractionCompositeEditPartCN extends NamedElementEditPart { **/
protected void handleNotificationEvent(Notification event) {
super.handleNotificationEvent(event);
-
}
/**
@@ -162,35 +162,24 @@ public class InteractionCompositeEditPartCN extends NamedElementEditPart { ((InteractionCompositeNameEditPartCN)childEditPart).setLabel(getPrimaryShape().getNameLabel());
return true;
}
-
-
if(childEditPart instanceof InteractionCompositeCompartmentEditPartCN) {
IFigure pane = getPrimaryShape().getCompositeCompartmentFigure();
setupContentPane(pane); // FIXME each comparment should handle his content pane in his own way
pane.add(((InteractionCompositeCompartmentEditPartCN)childEditPart).getFigure());
return true;
}
-
-
-
//Papyrus Gencode :Affixed Port locator
if(childEditPart instanceof PortEditPart) {
IBorderItemLocator locator = new PortPositionLocator(getMainFigure(), PositionConstants.NONE);
getBorderedFigure().getBorderItemContainer().add(((PortEditPart)childEditPart).getFigure(), locator);
return true;
}
-
-
-
-
//Papyrus Gencode :Affixed Port locator
if(childEditPart instanceof ParameterEditPart) {
IBorderItemLocator locator = new PortPositionLocator(getMainFigure(), PositionConstants.NONE);
getBorderedFigure().getBorderItemContainer().add(((ParameterEditPart)childEditPart).getFigure(), locator);
return true;
}
-
-
return false;
}
@@ -268,7 +257,6 @@ public class InteractionCompositeEditPartCN extends NamedElementEditPart { */
protected NodeFigure createMainFigure() {
return new SelectableBorderedNodeFigure(createMainFigureWithSVG());
-
}
/**
@@ -318,8 +306,8 @@ public class InteractionCompositeEditPartCN extends NamedElementEditPart { * @generated
*/
protected void setLineType(int style) {
- if(primaryShape instanceof NodeFigure) {
- ((NodeFigure)primaryShape).setLineStyle(style);
+ if(primaryShape instanceof IPapyrusNodeFigure) {
+ ((IPapyrusNodeFigure)primaryShape).setLineStyle(style);
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/InteractionCompositeNameEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/InteractionCompositeNameEditPart.java index 650fa9a5ab6..e04844caf63 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/InteractionCompositeNameEditPart.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/InteractionCompositeNameEditPart.java @@ -64,6 +64,7 @@ import org.eclipse.papyrus.infra.emf.appearance.helper.VisualInformationPapyrusC import org.eclipse.papyrus.infra.gmfdiag.common.editpart.IControlParserForDirectEdit;
import org.eclipse.papyrus.infra.gmfdiag.common.editpart.PapyrusCompartmentEditPart;
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;
@@ -320,7 +321,6 @@ public class InteractionCompositeNameEditPart extends PapyrusCompartmentEditPart ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -407,9 +407,7 @@ public class InteractionCompositeNameEditPart extends PapyrusCompartmentEditPart * @generated
*/
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
@@ -442,7 +440,6 @@ public class InteractionCompositeNameEditPart extends PapyrusCompartmentEditPart return;
}
final Dialog finalDialog = dialog;
-
if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@@ -450,7 +447,6 @@ public class InteractionCompositeNameEditPart extends PapyrusCompartmentEditPart @Override
protected void doExecute() {
configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
-
}
};
domain.getCommandStack().execute(command);
@@ -507,8 +503,17 @@ public class InteractionCompositeNameEditPart extends PapyrusCompartmentEditPart 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) {
@@ -629,7 +634,6 @@ public class InteractionCompositeNameEditPart extends PapyrusCompartmentEditPart if(checkDefaultEdition()) {
return IDirectEdition.DEFAULT_DIRECT_EDITOR;
}
-
// not a named element. no specific editor => do nothing
return IDirectEdition.NO_DIRECT_EDITION;
}
@@ -796,7 +800,6 @@ public class InteractionCompositeNameEditPart extends PapyrusCompartmentEditPart */
protected void addOwnerElementListeners() {
addListenerFilter(ADD_PARENT_MODEL, this, ((View)getParent().getModel())); //$NON-NLS-1$
-
}
/**
@@ -805,7 +808,6 @@ public class InteractionCompositeNameEditPart extends PapyrusCompartmentEditPart public void deactivate() {
removeOwnerElementListeners();
super.deactivate();
-
}
/**
@@ -813,6 +815,5 @@ public class InteractionCompositeNameEditPart extends PapyrusCompartmentEditPart */
protected void removeOwnerElementListeners() {
removeListenerFilter(ADD_PARENT_MODEL);
-
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/InteractionCompositeNameEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/InteractionCompositeNameEditPartCN.java index 3074c02b8cd..a70d3d45773 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/InteractionCompositeNameEditPartCN.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/InteractionCompositeNameEditPartCN.java @@ -64,6 +64,7 @@ import org.eclipse.papyrus.infra.emf.appearance.helper.VisualInformationPapyrusC import org.eclipse.papyrus.infra.gmfdiag.common.editpart.IControlParserForDirectEdit;
import org.eclipse.papyrus.infra.gmfdiag.common.editpart.PapyrusCompartmentEditPart;
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;
@@ -320,7 +321,6 @@ public class InteractionCompositeNameEditPartCN extends PapyrusCompartmentEditPa ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -407,9 +407,7 @@ public class InteractionCompositeNameEditPartCN extends PapyrusCompartmentEditPa * @generated
*/
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
@@ -442,7 +440,6 @@ public class InteractionCompositeNameEditPartCN extends PapyrusCompartmentEditPa return;
}
final Dialog finalDialog = dialog;
-
if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@@ -450,7 +447,6 @@ public class InteractionCompositeNameEditPartCN extends PapyrusCompartmentEditPa @Override
protected void doExecute() {
configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
-
}
};
domain.getCommandStack().execute(command);
@@ -507,8 +503,17 @@ public class InteractionCompositeNameEditPartCN extends PapyrusCompartmentEditPa 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) {
@@ -629,7 +634,6 @@ public class InteractionCompositeNameEditPartCN extends PapyrusCompartmentEditPa if(checkDefaultEdition()) {
return IDirectEdition.DEFAULT_DIRECT_EDITOR;
}
-
// not a named element. no specific editor => do nothing
return IDirectEdition.NO_DIRECT_EDITION;
}
@@ -796,7 +800,6 @@ public class InteractionCompositeNameEditPartCN extends PapyrusCompartmentEditPa */
protected void addOwnerElementListeners() {
addListenerFilter(ADD_PARENT_MODEL, this, ((View)getParent().getModel())); //$NON-NLS-1$
-
}
/**
@@ -805,7 +808,6 @@ public class InteractionCompositeNameEditPartCN extends PapyrusCompartmentEditPa public void deactivate() {
removeOwnerElementListeners();
super.deactivate();
-
}
/**
@@ -813,6 +815,5 @@ public class InteractionCompositeNameEditPartCN extends PapyrusCompartmentEditPa */
protected void removeOwnerElementListeners() {
removeListenerFilter(ADD_PARENT_MODEL);
-
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/InteractionConstraintEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/InteractionConstraintEditPart.java index 08211268473..adec257b1d5 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/InteractionConstraintEditPart.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/InteractionConstraintEditPart.java @@ -26,6 +26,7 @@ import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout; import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure;
import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IPapyrusNodeFigure;
import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.SelectableBorderedNodeFigure;
import org.eclipse.papyrus.uml.diagram.common.editparts.AbstractConstraintEditPart;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy;
@@ -106,7 +107,6 @@ public class InteractionConstraintEditPart extends AbstractConstraintEditPart { **/
protected void handleNotificationEvent(Notification event) {
super.handleNotificationEvent(event);
-
}
/**
@@ -137,8 +137,6 @@ public class InteractionConstraintEditPart extends AbstractConstraintEditPart { ((InteractionConstraintSpecificationEditPart)childEditPart).setLabel(getPrimaryShape().getConstraintFigure());
return true;
}
-
-
return false;
}
@@ -200,7 +198,6 @@ public class InteractionConstraintEditPart extends AbstractConstraintEditPart { */
protected NodeFigure createNodeFigure() {
return new SelectableBorderedNodeFigure(createMainFigureWithSVG());
-
}
/**
@@ -250,8 +247,8 @@ public class InteractionConstraintEditPart extends AbstractConstraintEditPart { * @generated
*/
protected void setLineType(int style) {
- if(primaryShape instanceof NodeFigure) {
- ((NodeFigure)primaryShape).setLineStyle(style);
+ if(primaryShape instanceof IPapyrusNodeFigure) {
+ ((IPapyrusNodeFigure)primaryShape).setLineStyle(style);
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/InteractionConstraintEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/InteractionConstraintEditPartCN.java index 73a3436b929..f1b6bec56f6 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/InteractionConstraintEditPartCN.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/InteractionConstraintEditPartCN.java @@ -26,6 +26,7 @@ import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout; import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure;
import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IPapyrusNodeFigure;
import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.SelectableBorderedNodeFigure;
import org.eclipse.papyrus.uml.diagram.common.editparts.AbstractConstraintEditPart;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy;
@@ -106,7 +107,6 @@ public class InteractionConstraintEditPartCN extends AbstractConstraintEditPart **/
protected void handleNotificationEvent(Notification event) {
super.handleNotificationEvent(event);
-
}
/**
@@ -137,8 +137,6 @@ public class InteractionConstraintEditPartCN extends AbstractConstraintEditPart ((InteractionConstraintSpecificationEditPartCN)childEditPart).setLabel(getPrimaryShape().getConstraintFigure());
return true;
}
-
-
return false;
}
@@ -200,7 +198,6 @@ public class InteractionConstraintEditPartCN extends AbstractConstraintEditPart */
protected NodeFigure createNodeFigure() {
return new SelectableBorderedNodeFigure(createMainFigureWithSVG());
-
}
/**
@@ -250,8 +247,8 @@ public class InteractionConstraintEditPartCN extends AbstractConstraintEditPart * @generated
*/
protected void setLineType(int style) {
- if(primaryShape instanceof NodeFigure) {
- ((NodeFigure)primaryShape).setLineStyle(style);
+ if(primaryShape instanceof IPapyrusNodeFigure) {
+ ((IPapyrusNodeFigure)primaryShape).setLineStyle(style);
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/InteractionConstraintNameEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/InteractionConstraintNameEditPart.java index 8bb9dc0d694..9a06148778e 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/InteractionConstraintNameEditPart.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/InteractionConstraintNameEditPart.java @@ -64,6 +64,7 @@ import org.eclipse.papyrus.infra.emf.appearance.helper.VisualInformationPapyrusC import org.eclipse.papyrus.infra.gmfdiag.common.editpart.IControlParserForDirectEdit;
import org.eclipse.papyrus.infra.gmfdiag.common.editpart.PapyrusCompartmentEditPart;
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;
@@ -320,7 +321,6 @@ public class InteractionConstraintNameEditPart extends PapyrusCompartmentEditPar ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -407,9 +407,7 @@ public class InteractionConstraintNameEditPart extends PapyrusCompartmentEditPar * @generated
*/
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
@@ -442,7 +440,6 @@ public class InteractionConstraintNameEditPart extends PapyrusCompartmentEditPar return;
}
final Dialog finalDialog = dialog;
-
if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@@ -450,7 +447,6 @@ public class InteractionConstraintNameEditPart extends PapyrusCompartmentEditPar @Override
protected void doExecute() {
configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
-
}
};
domain.getCommandStack().execute(command);
@@ -507,8 +503,17 @@ public class InteractionConstraintNameEditPart extends PapyrusCompartmentEditPar 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) {
@@ -629,7 +634,6 @@ public class InteractionConstraintNameEditPart extends PapyrusCompartmentEditPar if(checkDefaultEdition()) {
return IDirectEdition.DEFAULT_DIRECT_EDITOR;
}
-
// not a named element. no specific editor => do nothing
return IDirectEdition.NO_DIRECT_EDITION;
}
@@ -796,7 +800,6 @@ public class InteractionConstraintNameEditPart extends PapyrusCompartmentEditPar */
protected void addOwnerElementListeners() {
addListenerFilter(ADD_PARENT_MODEL, this, ((View)getParent().getModel())); //$NON-NLS-1$
-
}
/**
@@ -805,7 +808,6 @@ public class InteractionConstraintNameEditPart extends PapyrusCompartmentEditPar public void deactivate() {
removeOwnerElementListeners();
super.deactivate();
-
}
/**
@@ -813,6 +815,5 @@ public class InteractionConstraintNameEditPart extends PapyrusCompartmentEditPar */
protected void removeOwnerElementListeners() {
removeListenerFilter(ADD_PARENT_MODEL);
-
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/InteractionConstraintNameEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/InteractionConstraintNameEditPartCN.java index f901d697d7c..c8bd7052374 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/InteractionConstraintNameEditPartCN.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/InteractionConstraintNameEditPartCN.java @@ -64,6 +64,7 @@ import org.eclipse.papyrus.infra.emf.appearance.helper.VisualInformationPapyrusC import org.eclipse.papyrus.infra.gmfdiag.common.editpart.IControlParserForDirectEdit;
import org.eclipse.papyrus.infra.gmfdiag.common.editpart.PapyrusCompartmentEditPart;
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;
@@ -320,7 +321,6 @@ public class InteractionConstraintNameEditPartCN extends PapyrusCompartmentEditP ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -407,9 +407,7 @@ public class InteractionConstraintNameEditPartCN extends PapyrusCompartmentEditP * @generated
*/
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
@@ -442,7 +440,6 @@ public class InteractionConstraintNameEditPartCN extends PapyrusCompartmentEditP return;
}
final Dialog finalDialog = dialog;
-
if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@@ -450,7 +447,6 @@ public class InteractionConstraintNameEditPartCN extends PapyrusCompartmentEditP @Override
protected void doExecute() {
configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
-
}
};
domain.getCommandStack().execute(command);
@@ -507,8 +503,17 @@ public class InteractionConstraintNameEditPartCN extends PapyrusCompartmentEditP 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) {
@@ -629,7 +634,6 @@ public class InteractionConstraintNameEditPartCN extends PapyrusCompartmentEditP if(checkDefaultEdition()) {
return IDirectEdition.DEFAULT_DIRECT_EDITOR;
}
-
// not a named element. no specific editor => do nothing
return IDirectEdition.NO_DIRECT_EDITION;
}
@@ -796,7 +800,6 @@ public class InteractionConstraintNameEditPartCN extends PapyrusCompartmentEditP */
protected void addOwnerElementListeners() {
addListenerFilter(ADD_PARENT_MODEL, this, ((View)getParent().getModel())); //$NON-NLS-1$
-
}
/**
@@ -805,7 +808,6 @@ public class InteractionConstraintNameEditPartCN extends PapyrusCompartmentEditP public void deactivate() {
removeOwnerElementListeners();
super.deactivate();
-
}
/**
@@ -813,6 +815,5 @@ public class InteractionConstraintNameEditPartCN extends PapyrusCompartmentEditP */
protected void removeOwnerElementListeners() {
removeListenerFilter(ADD_PARENT_MODEL);
-
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/InteractionConstraintSpecificationEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/InteractionConstraintSpecificationEditPart.java index c76c9a0d4a2..475868d8f52 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/InteractionConstraintSpecificationEditPart.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/InteractionConstraintSpecificationEditPart.java @@ -61,6 +61,7 @@ import org.eclipse.papyrus.extensionpoints.editors.utils.IDirectEditorsIds; import org.eclipse.papyrus.infra.gmfdiag.common.editpart.IControlParserForDirectEdit;
import org.eclipse.papyrus.infra.gmfdiag.common.editpart.PapyrusCompartmentEditPart;
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;
@@ -306,7 +307,6 @@ public class InteractionConstraintSpecificationEditPart extends PapyrusCompartme ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -393,9 +393,7 @@ public class InteractionConstraintSpecificationEditPart extends PapyrusCompartme * @generated
*/
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
@@ -428,7 +426,6 @@ public class InteractionConstraintSpecificationEditPart extends PapyrusCompartme return;
}
final Dialog finalDialog = dialog;
-
if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@@ -436,7 +433,6 @@ public class InteractionConstraintSpecificationEditPart extends PapyrusCompartme @Override
protected void doExecute() {
configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
-
}
};
domain.getCommandStack().execute(command);
@@ -493,8 +489,17 @@ public class InteractionConstraintSpecificationEditPart extends PapyrusCompartme 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) {
@@ -615,7 +620,6 @@ public class InteractionConstraintSpecificationEditPart extends PapyrusCompartme if(checkDefaultEdition()) {
return IDirectEdition.DEFAULT_DIRECT_EDITOR;
}
-
// not a named element. no specific editor => do nothing
return IDirectEdition.NO_DIRECT_EDITION;
}
@@ -779,7 +783,6 @@ public class InteractionConstraintSpecificationEditPart extends PapyrusCompartme */
protected void addOwnerElementListeners() {
addListenerFilter(ADD_PARENT_MODEL, this, ((View)getParent().getModel())); //$NON-NLS-1$
-
}
/**
@@ -788,7 +791,6 @@ public class InteractionConstraintSpecificationEditPart extends PapyrusCompartme public void deactivate() {
removeOwnerElementListeners();
super.deactivate();
-
}
/**
@@ -796,6 +798,5 @@ public class InteractionConstraintSpecificationEditPart extends PapyrusCompartme */
protected void removeOwnerElementListeners() {
removeListenerFilter(ADD_PARENT_MODEL);
-
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/InteractionConstraintSpecificationEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/InteractionConstraintSpecificationEditPartCN.java index 716e6ec4e7a..2d6c9fa37b4 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/InteractionConstraintSpecificationEditPartCN.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/InteractionConstraintSpecificationEditPartCN.java @@ -61,6 +61,7 @@ import org.eclipse.papyrus.extensionpoints.editors.utils.IDirectEditorsIds; import org.eclipse.papyrus.infra.gmfdiag.common.editpart.IControlParserForDirectEdit;
import org.eclipse.papyrus.infra.gmfdiag.common.editpart.PapyrusCompartmentEditPart;
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;
@@ -306,7 +307,6 @@ public class InteractionConstraintSpecificationEditPartCN extends PapyrusCompart ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -393,9 +393,7 @@ public class InteractionConstraintSpecificationEditPartCN extends PapyrusCompart * @generated
*/
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
@@ -428,7 +426,6 @@ public class InteractionConstraintSpecificationEditPartCN extends PapyrusCompart return;
}
final Dialog finalDialog = dialog;
-
if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@@ -436,7 +433,6 @@ public class InteractionConstraintSpecificationEditPartCN extends PapyrusCompart @Override
protected void doExecute() {
configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
-
}
};
domain.getCommandStack().execute(command);
@@ -493,8 +489,17 @@ public class InteractionConstraintSpecificationEditPartCN extends PapyrusCompart 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) {
@@ -615,7 +620,6 @@ public class InteractionConstraintSpecificationEditPartCN extends PapyrusCompart if(checkDefaultEdition()) {
return IDirectEdition.DEFAULT_DIRECT_EDITOR;
}
-
// not a named element. no specific editor => do nothing
return IDirectEdition.NO_DIRECT_EDITION;
}
@@ -779,7 +783,6 @@ public class InteractionConstraintSpecificationEditPartCN extends PapyrusCompart */
protected void addOwnerElementListeners() {
addListenerFilter(ADD_PARENT_MODEL, this, ((View)getParent().getModel())); //$NON-NLS-1$
-
}
/**
@@ -788,7 +791,6 @@ public class InteractionConstraintSpecificationEditPartCN extends PapyrusCompart public void deactivate() {
removeOwnerElementListeners();
super.deactivate();
-
}
/**
@@ -796,6 +798,5 @@ public class InteractionConstraintSpecificationEditPartCN extends PapyrusCompart */
protected void removeOwnerElementListeners() {
removeListenerFilter(ADD_PARENT_MODEL);
-
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/InterfaceEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/InterfaceEditPart.java index 5020380a0ed..c9ac9c8a9bf 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/InterfaceEditPart.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/InterfaceEditPart.java @@ -26,6 +26,7 @@ import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout; import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure;
import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IPapyrusNodeFigure;
import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.SelectableBorderedNodeFigure;
import org.eclipse.papyrus.uml.diagram.common.editparts.NamedElementEditPart;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy;
@@ -112,7 +113,6 @@ public class InterfaceEditPart extends NamedElementEditPart { **/
protected void handleNotificationEvent(Notification event) {
super.handleNotificationEvent(event);
-
}
/**
@@ -139,8 +139,6 @@ public class InterfaceEditPart extends NamedElementEditPart { ((InterfaceNameEditPart)childEditPart).setLabel(getPrimaryShape().getNameLabel());
return true;
}
-
-
return false;
}
@@ -199,7 +197,6 @@ public class InterfaceEditPart extends NamedElementEditPart { */
protected NodeFigure createNodeFigure() {
return new SelectableBorderedNodeFigure(createMainFigureWithSVG());
-
}
/**
@@ -249,8 +246,8 @@ public class InterfaceEditPart extends NamedElementEditPart { * @generated
*/
protected void setLineType(int style) {
- if(primaryShape instanceof NodeFigure) {
- ((NodeFigure)primaryShape).setLineStyle(style);
+ if(primaryShape instanceof IPapyrusNodeFigure) {
+ ((IPapyrusNodeFigure)primaryShape).setLineStyle(style);
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/InterfaceEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/InterfaceEditPartCN.java index 19a1b0631f9..1f41e964d6b 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/InterfaceEditPartCN.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/InterfaceEditPartCN.java @@ -26,6 +26,7 @@ import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout; import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure;
import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IPapyrusNodeFigure;
import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.SelectableBorderedNodeFigure;
import org.eclipse.papyrus.uml.diagram.common.editparts.NamedElementEditPart;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy;
@@ -112,7 +113,6 @@ public class InterfaceEditPartCN extends NamedElementEditPart { **/
protected void handleNotificationEvent(Notification event) {
super.handleNotificationEvent(event);
-
}
/**
@@ -139,8 +139,6 @@ public class InterfaceEditPartCN extends NamedElementEditPart { ((InterfaceNameEditPartCN)childEditPart).setLabel(getPrimaryShape().getNameLabel());
return true;
}
-
-
return false;
}
@@ -199,7 +197,6 @@ public class InterfaceEditPartCN extends NamedElementEditPart { */
protected NodeFigure createNodeFigure() {
return new SelectableBorderedNodeFigure(createMainFigureWithSVG());
-
}
/**
@@ -249,8 +246,8 @@ public class InterfaceEditPartCN extends NamedElementEditPart { * @generated
*/
protected void setLineType(int style) {
- if(primaryShape instanceof NodeFigure) {
- ((NodeFigure)primaryShape).setLineStyle(style);
+ if(primaryShape instanceof IPapyrusNodeFigure) {
+ ((IPapyrusNodeFigure)primaryShape).setLineStyle(style);
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/InterfaceNameEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/InterfaceNameEditPart.java index eb1dc734263..eff3f000e19 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/InterfaceNameEditPart.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/InterfaceNameEditPart.java @@ -64,6 +64,7 @@ import org.eclipse.papyrus.infra.emf.appearance.helper.VisualInformationPapyrusC import org.eclipse.papyrus.infra.gmfdiag.common.editpart.IControlParserForDirectEdit;
import org.eclipse.papyrus.infra.gmfdiag.common.editpart.PapyrusCompartmentEditPart;
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;
@@ -320,7 +321,6 @@ public class InterfaceNameEditPart extends PapyrusCompartmentEditPart implements ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -407,9 +407,7 @@ public class InterfaceNameEditPart extends PapyrusCompartmentEditPart implements * @generated
*/
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
@@ -442,7 +440,6 @@ public class InterfaceNameEditPart extends PapyrusCompartmentEditPart implements return;
}
final Dialog finalDialog = dialog;
-
if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@@ -450,7 +447,6 @@ public class InterfaceNameEditPart extends PapyrusCompartmentEditPart implements @Override
protected void doExecute() {
configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
-
}
};
domain.getCommandStack().execute(command);
@@ -507,8 +503,17 @@ public class InterfaceNameEditPart extends PapyrusCompartmentEditPart implements 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) {
@@ -629,7 +634,6 @@ public class InterfaceNameEditPart extends PapyrusCompartmentEditPart implements if(checkDefaultEdition()) {
return IDirectEdition.DEFAULT_DIRECT_EDITOR;
}
-
// not a named element. no specific editor => do nothing
return IDirectEdition.NO_DIRECT_EDITION;
}
@@ -796,7 +800,6 @@ public class InterfaceNameEditPart extends PapyrusCompartmentEditPart implements */
protected void addOwnerElementListeners() {
addListenerFilter(ADD_PARENT_MODEL, this, ((View)getParent().getModel())); //$NON-NLS-1$
-
}
/**
@@ -805,7 +808,6 @@ public class InterfaceNameEditPart extends PapyrusCompartmentEditPart implements public void deactivate() {
removeOwnerElementListeners();
super.deactivate();
-
}
/**
@@ -813,6 +815,5 @@ public class InterfaceNameEditPart extends PapyrusCompartmentEditPart implements */
protected void removeOwnerElementListeners() {
removeListenerFilter(ADD_PARENT_MODEL);
-
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/InterfaceNameEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/InterfaceNameEditPartCN.java index fca639738c2..30b087efcc1 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/InterfaceNameEditPartCN.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/InterfaceNameEditPartCN.java @@ -64,6 +64,7 @@ import org.eclipse.papyrus.infra.emf.appearance.helper.VisualInformationPapyrusC import org.eclipse.papyrus.infra.gmfdiag.common.editpart.IControlParserForDirectEdit;
import org.eclipse.papyrus.infra.gmfdiag.common.editpart.PapyrusCompartmentEditPart;
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;
@@ -320,7 +321,6 @@ public class InterfaceNameEditPartCN extends PapyrusCompartmentEditPart implemen ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -407,9 +407,7 @@ public class InterfaceNameEditPartCN extends PapyrusCompartmentEditPart implemen * @generated
*/
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
@@ -442,7 +440,6 @@ public class InterfaceNameEditPartCN extends PapyrusCompartmentEditPart implemen return;
}
final Dialog finalDialog = dialog;
-
if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@@ -450,7 +447,6 @@ public class InterfaceNameEditPartCN extends PapyrusCompartmentEditPart implemen @Override
protected void doExecute() {
configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
-
}
};
domain.getCommandStack().execute(command);
@@ -507,8 +503,17 @@ public class InterfaceNameEditPartCN extends PapyrusCompartmentEditPart implemen 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) {
@@ -629,7 +634,6 @@ public class InterfaceNameEditPartCN extends PapyrusCompartmentEditPart implemen if(checkDefaultEdition()) {
return IDirectEdition.DEFAULT_DIRECT_EDITOR;
}
-
// not a named element. no specific editor => do nothing
return IDirectEdition.NO_DIRECT_EDITION;
}
@@ -796,7 +800,6 @@ public class InterfaceNameEditPartCN extends PapyrusCompartmentEditPart implemen */
protected void addOwnerElementListeners() {
addListenerFilter(ADD_PARENT_MODEL, this, ((View)getParent().getModel())); //$NON-NLS-1$
-
}
/**
@@ -805,7 +808,6 @@ public class InterfaceNameEditPartCN extends PapyrusCompartmentEditPart implemen public void deactivate() {
removeOwnerElementListeners();
super.deactivate();
-
}
/**
@@ -813,6 +815,5 @@ public class InterfaceNameEditPartCN extends PapyrusCompartmentEditPart implemen */
protected void removeOwnerElementListeners() {
removeListenerFilter(ADD_PARENT_MODEL);
-
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/InterfaceRealizationAppliedStereotypeEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/InterfaceRealizationAppliedStereotypeEditPart.java index fc4a62c08f1..645841fb70a 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/InterfaceRealizationAppliedStereotypeEditPart.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/InterfaceRealizationAppliedStereotypeEditPart.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 InterfaceRealizationAppliedStereotypeEditPart extends PapyrusLabelE ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -406,9 +406,7 @@ public class InterfaceRealizationAppliedStereotypeEditPart extends PapyrusLabelE * @generated
*/
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
@@ -441,7 +439,6 @@ public class InterfaceRealizationAppliedStereotypeEditPart extends PapyrusLabelE 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 InterfaceRealizationAppliedStereotypeEditPart extends PapyrusLabelE @Override
protected void doExecute() {
configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
-
}
};
domain.getCommandStack().execute(command);
@@ -506,8 +502,17 @@ public class InterfaceRealizationAppliedStereotypeEditPart extends PapyrusLabelE 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 InterfaceRealizationAppliedStereotypeEditPart extends PapyrusLabelE }
}
}
-
super.handleNotificationEvent(event);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/InterfaceRealizationNameEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/InterfaceRealizationNameEditPart.java index 127ea16ffd7..6abbc28c3e4 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/InterfaceRealizationNameEditPart.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/InterfaceRealizationNameEditPart.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 InterfaceRealizationNameEditPart extends PapyrusLabelEditPart imple ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -406,9 +406,7 @@ public class InterfaceRealizationNameEditPart extends PapyrusLabelEditPart imple * @generated
*/
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
@@ -441,7 +439,6 @@ public class InterfaceRealizationNameEditPart extends PapyrusLabelEditPart imple 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 InterfaceRealizationNameEditPart extends PapyrusLabelEditPart imple @Override
protected void doExecute() {
configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
-
}
};
domain.getCommandStack().execute(command);
@@ -506,8 +502,17 @@ public class InterfaceRealizationNameEditPart extends PapyrusLabelEditPart imple 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) {
@@ -628,7 +633,6 @@ public class InterfaceRealizationNameEditPart extends PapyrusLabelEditPart imple if(checkDefaultEdition()) {
return IDirectEdition.DEFAULT_DIRECT_EDITOR;
}
-
// not a named element. no specific editor => do nothing
return IDirectEdition.NO_DIRECT_EDITION;
}
@@ -746,7 +750,6 @@ public class InterfaceRealizationNameEditPart extends PapyrusLabelEditPart imple }
}
}
-
super.handleNotificationEvent(event);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/IntervalConstraintEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/IntervalConstraintEditPart.java index c9e17c02b7f..64b4764065e 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/IntervalConstraintEditPart.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/IntervalConstraintEditPart.java @@ -26,6 +26,7 @@ import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout; import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure;
import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IPapyrusNodeFigure;
import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.SelectableBorderedNodeFigure;
import org.eclipse.papyrus.uml.diagram.common.editparts.AbstractConstraintEditPart;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy;
@@ -106,7 +107,6 @@ public class IntervalConstraintEditPart extends AbstractConstraintEditPart { **/
protected void handleNotificationEvent(Notification event) {
super.handleNotificationEvent(event);
-
}
/**
@@ -137,8 +137,6 @@ public class IntervalConstraintEditPart extends AbstractConstraintEditPart { ((IntervalConstraintSpecificationEditPart)childEditPart).setLabel(getPrimaryShape().getConstraintFigure());
return true;
}
-
-
return false;
}
@@ -200,7 +198,6 @@ public class IntervalConstraintEditPart extends AbstractConstraintEditPart { */
protected NodeFigure createNodeFigure() {
return new SelectableBorderedNodeFigure(createMainFigureWithSVG());
-
}
/**
@@ -250,8 +247,8 @@ public class IntervalConstraintEditPart extends AbstractConstraintEditPart { * @generated
*/
protected void setLineType(int style) {
- if(primaryShape instanceof NodeFigure) {
- ((NodeFigure)primaryShape).setLineStyle(style);
+ if(primaryShape instanceof IPapyrusNodeFigure) {
+ ((IPapyrusNodeFigure)primaryShape).setLineStyle(style);
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/IntervalConstraintEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/IntervalConstraintEditPartCN.java index e6acd9c6111..6f34c624479 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/IntervalConstraintEditPartCN.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/IntervalConstraintEditPartCN.java @@ -26,6 +26,7 @@ import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout; import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure;
import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IPapyrusNodeFigure;
import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.SelectableBorderedNodeFigure;
import org.eclipse.papyrus.uml.diagram.common.editparts.AbstractConstraintEditPart;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy;
@@ -106,7 +107,6 @@ public class IntervalConstraintEditPartCN extends AbstractConstraintEditPart { **/
protected void handleNotificationEvent(Notification event) {
super.handleNotificationEvent(event);
-
}
/**
@@ -137,8 +137,6 @@ public class IntervalConstraintEditPartCN extends AbstractConstraintEditPart { ((IntervalConstraintSpecificationEditPartCN)childEditPart).setLabel(getPrimaryShape().getConstraintFigure());
return true;
}
-
-
return false;
}
@@ -200,7 +198,6 @@ public class IntervalConstraintEditPartCN extends AbstractConstraintEditPart { */
protected NodeFigure createNodeFigure() {
return new SelectableBorderedNodeFigure(createMainFigureWithSVG());
-
}
/**
@@ -250,8 +247,8 @@ public class IntervalConstraintEditPartCN extends AbstractConstraintEditPart { * @generated
*/
protected void setLineType(int style) {
- if(primaryShape instanceof NodeFigure) {
- ((NodeFigure)primaryShape).setLineStyle(style);
+ if(primaryShape instanceof IPapyrusNodeFigure) {
+ ((IPapyrusNodeFigure)primaryShape).setLineStyle(style);
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/IntervalConstraintNameEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/IntervalConstraintNameEditPart.java index 203456c8a2b..0d860fdb221 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/IntervalConstraintNameEditPart.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/IntervalConstraintNameEditPart.java @@ -64,6 +64,7 @@ import org.eclipse.papyrus.infra.emf.appearance.helper.VisualInformationPapyrusC import org.eclipse.papyrus.infra.gmfdiag.common.editpart.IControlParserForDirectEdit;
import org.eclipse.papyrus.infra.gmfdiag.common.editpart.PapyrusCompartmentEditPart;
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;
@@ -320,7 +321,6 @@ public class IntervalConstraintNameEditPart extends PapyrusCompartmentEditPart i ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -407,9 +407,7 @@ public class IntervalConstraintNameEditPart extends PapyrusCompartmentEditPart i * @generated
*/
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
@@ -442,7 +440,6 @@ public class IntervalConstraintNameEditPart extends PapyrusCompartmentEditPart i return;
}
final Dialog finalDialog = dialog;
-
if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@@ -450,7 +447,6 @@ public class IntervalConstraintNameEditPart extends PapyrusCompartmentEditPart i @Override
protected void doExecute() {
configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
-
}
};
domain.getCommandStack().execute(command);
@@ -507,8 +503,17 @@ public class IntervalConstraintNameEditPart extends PapyrusCompartmentEditPart i 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) {
@@ -629,7 +634,6 @@ public class IntervalConstraintNameEditPart extends PapyrusCompartmentEditPart i if(checkDefaultEdition()) {
return IDirectEdition.DEFAULT_DIRECT_EDITOR;
}
-
// not a named element. no specific editor => do nothing
return IDirectEdition.NO_DIRECT_EDITION;
}
@@ -796,7 +800,6 @@ public class IntervalConstraintNameEditPart extends PapyrusCompartmentEditPart i */
protected void addOwnerElementListeners() {
addListenerFilter(ADD_PARENT_MODEL, this, ((View)getParent().getModel())); //$NON-NLS-1$
-
}
/**
@@ -805,7 +808,6 @@ public class IntervalConstraintNameEditPart extends PapyrusCompartmentEditPart i public void deactivate() {
removeOwnerElementListeners();
super.deactivate();
-
}
/**
@@ -813,6 +815,5 @@ public class IntervalConstraintNameEditPart extends PapyrusCompartmentEditPart i */
protected void removeOwnerElementListeners() {
removeListenerFilter(ADD_PARENT_MODEL);
-
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/IntervalConstraintNameEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/IntervalConstraintNameEditPartCN.java index 036624f8875..28d457cf4bd 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/IntervalConstraintNameEditPartCN.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/IntervalConstraintNameEditPartCN.java @@ -64,6 +64,7 @@ import org.eclipse.papyrus.infra.emf.appearance.helper.VisualInformationPapyrusC import org.eclipse.papyrus.infra.gmfdiag.common.editpart.IControlParserForDirectEdit;
import org.eclipse.papyrus.infra.gmfdiag.common.editpart.PapyrusCompartmentEditPart;
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;
@@ -320,7 +321,6 @@ public class IntervalConstraintNameEditPartCN extends PapyrusCompartmentEditPart ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -407,9 +407,7 @@ public class IntervalConstraintNameEditPartCN extends PapyrusCompartmentEditPart * @generated
*/
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
@@ -442,7 +440,6 @@ public class IntervalConstraintNameEditPartCN extends PapyrusCompartmentEditPart return;
}
final Dialog finalDialog = dialog;
-
if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@@ -450,7 +447,6 @@ public class IntervalConstraintNameEditPartCN extends PapyrusCompartmentEditPart @Override
protected void doExecute() {
configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
-
}
};
domain.getCommandStack().execute(command);
@@ -507,8 +503,17 @@ public class IntervalConstraintNameEditPartCN extends PapyrusCompartmentEditPart 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) {
@@ -629,7 +634,6 @@ public class IntervalConstraintNameEditPartCN extends PapyrusCompartmentEditPart if(checkDefaultEdition()) {
return IDirectEdition.DEFAULT_DIRECT_EDITOR;
}
-
// not a named element. no specific editor => do nothing
return IDirectEdition.NO_DIRECT_EDITION;
}
@@ -796,7 +800,6 @@ public class IntervalConstraintNameEditPartCN extends PapyrusCompartmentEditPart */
protected void addOwnerElementListeners() {
addListenerFilter(ADD_PARENT_MODEL, this, ((View)getParent().getModel())); //$NON-NLS-1$
-
}
/**
@@ -805,7 +808,6 @@ public class IntervalConstraintNameEditPartCN extends PapyrusCompartmentEditPart public void deactivate() {
removeOwnerElementListeners();
super.deactivate();
-
}
/**
@@ -813,6 +815,5 @@ public class IntervalConstraintNameEditPartCN extends PapyrusCompartmentEditPart */
protected void removeOwnerElementListeners() {
removeListenerFilter(ADD_PARENT_MODEL);
-
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/IntervalConstraintSpecificationEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/IntervalConstraintSpecificationEditPart.java index eb0b2178693..e955723d1fe 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/IntervalConstraintSpecificationEditPart.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/IntervalConstraintSpecificationEditPart.java @@ -61,6 +61,7 @@ import org.eclipse.papyrus.extensionpoints.editors.utils.IDirectEditorsIds; import org.eclipse.papyrus.infra.gmfdiag.common.editpart.IControlParserForDirectEdit;
import org.eclipse.papyrus.infra.gmfdiag.common.editpart.PapyrusCompartmentEditPart;
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;
@@ -306,7 +307,6 @@ public class IntervalConstraintSpecificationEditPart extends PapyrusCompartmentE ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -393,9 +393,7 @@ public class IntervalConstraintSpecificationEditPart extends PapyrusCompartmentE * @generated
*/
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
@@ -428,7 +426,6 @@ public class IntervalConstraintSpecificationEditPart extends PapyrusCompartmentE return;
}
final Dialog finalDialog = dialog;
-
if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@@ -436,7 +433,6 @@ public class IntervalConstraintSpecificationEditPart extends PapyrusCompartmentE @Override
protected void doExecute() {
configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
-
}
};
domain.getCommandStack().execute(command);
@@ -493,8 +489,17 @@ public class IntervalConstraintSpecificationEditPart extends PapyrusCompartmentE 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) {
@@ -615,7 +620,6 @@ public class IntervalConstraintSpecificationEditPart extends PapyrusCompartmentE if(checkDefaultEdition()) {
return IDirectEdition.DEFAULT_DIRECT_EDITOR;
}
-
// not a named element. no specific editor => do nothing
return IDirectEdition.NO_DIRECT_EDITION;
}
@@ -779,7 +783,6 @@ public class IntervalConstraintSpecificationEditPart extends PapyrusCompartmentE */
protected void addOwnerElementListeners() {
addListenerFilter(ADD_PARENT_MODEL, this, ((View)getParent().getModel())); //$NON-NLS-1$
-
}
/**
@@ -788,7 +791,6 @@ public class IntervalConstraintSpecificationEditPart extends PapyrusCompartmentE public void deactivate() {
removeOwnerElementListeners();
super.deactivate();
-
}
/**
@@ -796,6 +798,5 @@ public class IntervalConstraintSpecificationEditPart extends PapyrusCompartmentE */
protected void removeOwnerElementListeners() {
removeListenerFilter(ADD_PARENT_MODEL);
-
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/IntervalConstraintSpecificationEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/IntervalConstraintSpecificationEditPartCN.java index f3b1db8fce0..f5869cca121 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/IntervalConstraintSpecificationEditPartCN.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/IntervalConstraintSpecificationEditPartCN.java @@ -61,6 +61,7 @@ import org.eclipse.papyrus.extensionpoints.editors.utils.IDirectEditorsIds; import org.eclipse.papyrus.infra.gmfdiag.common.editpart.IControlParserForDirectEdit;
import org.eclipse.papyrus.infra.gmfdiag.common.editpart.PapyrusCompartmentEditPart;
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;
@@ -306,7 +307,6 @@ public class IntervalConstraintSpecificationEditPartCN extends PapyrusCompartmen ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -393,9 +393,7 @@ public class IntervalConstraintSpecificationEditPartCN extends PapyrusCompartmen * @generated
*/
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
@@ -428,7 +426,6 @@ public class IntervalConstraintSpecificationEditPartCN extends PapyrusCompartmen return;
}
final Dialog finalDialog = dialog;
-
if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@@ -436,7 +433,6 @@ public class IntervalConstraintSpecificationEditPartCN extends PapyrusCompartmen @Override
protected void doExecute() {
configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
-
}
};
domain.getCommandStack().execute(command);
@@ -493,8 +489,17 @@ public class IntervalConstraintSpecificationEditPartCN extends PapyrusCompartmen 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) {
@@ -615,7 +620,6 @@ public class IntervalConstraintSpecificationEditPartCN extends PapyrusCompartmen if(checkDefaultEdition()) {
return IDirectEdition.DEFAULT_DIRECT_EDITOR;
}
-
// not a named element. no specific editor => do nothing
return IDirectEdition.NO_DIRECT_EDITION;
}
@@ -779,7 +783,6 @@ public class IntervalConstraintSpecificationEditPartCN extends PapyrusCompartmen */
protected void addOwnerElementListeners() {
addListenerFilter(ADD_PARENT_MODEL, this, ((View)getParent().getModel())); //$NON-NLS-1$
-
}
/**
@@ -788,7 +791,6 @@ public class IntervalConstraintSpecificationEditPartCN extends PapyrusCompartmen public void deactivate() {
removeOwnerElementListeners();
super.deactivate();
-
}
/**
@@ -796,6 +798,5 @@ public class IntervalConstraintSpecificationEditPartCN extends PapyrusCompartmen */
protected void removeOwnerElementListeners() {
removeListenerFilter(ADD_PARENT_MODEL);
-
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/IntervalEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/IntervalEditPart.java index df7e6f03a21..31da3836704 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/IntervalEditPart.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/IntervalEditPart.java @@ -26,6 +26,7 @@ import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure; import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
import org.eclipse.gmf.runtime.notation.View;
import org.eclipse.papyrus.infra.gmfdiag.common.editpart.NodeEditPart;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IPapyrusNodeFigure;
import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.SelectableBorderedNodeFigure;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy;
@@ -124,8 +125,6 @@ public class IntervalEditPart extends NodeEditPart { ((IntervalNameEditPart)childEditPart).setLabel(getPrimaryShape().getNameLabel());
return true;
}
-
-
return false;
}
@@ -184,7 +183,6 @@ public class IntervalEditPart extends NodeEditPart { */
protected NodeFigure createNodeFigure() {
return new SelectableBorderedNodeFigure(createMainFigureWithSVG());
-
}
/**
@@ -234,8 +232,8 @@ public class IntervalEditPart extends NodeEditPart { * @generated
*/
protected void setLineType(int style) {
- if(primaryShape instanceof NodeFigure) {
- ((NodeFigure)primaryShape).setLineStyle(style);
+ if(primaryShape instanceof IPapyrusNodeFigure) {
+ ((IPapyrusNodeFigure)primaryShape).setLineStyle(style);
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/IntervalNameEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/IntervalNameEditPart.java index a733e45de46..dd7c85eaee0 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/IntervalNameEditPart.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/IntervalNameEditPart.java @@ -64,6 +64,7 @@ import org.eclipse.papyrus.infra.emf.appearance.helper.VisualInformationPapyrusC import org.eclipse.papyrus.infra.gmfdiag.common.editpart.IControlParserForDirectEdit;
import org.eclipse.papyrus.infra.gmfdiag.common.editpart.PapyrusCompartmentEditPart;
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;
@@ -320,7 +321,6 @@ public class IntervalNameEditPart extends PapyrusCompartmentEditPart implements ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -407,9 +407,7 @@ public class IntervalNameEditPart extends PapyrusCompartmentEditPart implements * @generated
*/
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
@@ -442,7 +440,6 @@ public class IntervalNameEditPart extends PapyrusCompartmentEditPart implements return;
}
final Dialog finalDialog = dialog;
-
if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@@ -450,7 +447,6 @@ public class IntervalNameEditPart extends PapyrusCompartmentEditPart implements @Override
protected void doExecute() {
configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
-
}
};
domain.getCommandStack().execute(command);
@@ -507,8 +503,17 @@ public class IntervalNameEditPart extends PapyrusCompartmentEditPart implements 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) {
@@ -629,7 +634,6 @@ public class IntervalNameEditPart extends PapyrusCompartmentEditPart implements if(checkDefaultEdition()) {
return IDirectEdition.DEFAULT_DIRECT_EDITOR;
}
-
// not a named element. no specific editor => do nothing
return IDirectEdition.NO_DIRECT_EDITION;
}
@@ -796,7 +800,6 @@ public class IntervalNameEditPart extends PapyrusCompartmentEditPart implements */
protected void addOwnerElementListeners() {
addListenerFilter(ADD_PARENT_MODEL, this, ((View)getParent().getModel())); //$NON-NLS-1$
-
}
/**
@@ -805,7 +808,6 @@ public class IntervalNameEditPart extends PapyrusCompartmentEditPart implements public void deactivate() {
removeOwnerElementListeners();
super.deactivate();
-
}
/**
@@ -813,6 +815,5 @@ public class IntervalNameEditPart extends PapyrusCompartmentEditPart implements */
protected void removeOwnerElementListeners() {
removeListenerFilter(ADD_PARENT_MODEL);
-
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/LiteralBooleanEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/LiteralBooleanEditPart.java index c62b0255a5f..a1771e8dd96 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/LiteralBooleanEditPart.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/LiteralBooleanEditPart.java @@ -26,6 +26,7 @@ import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure; import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
import org.eclipse.gmf.runtime.notation.View;
import org.eclipse.papyrus.infra.gmfdiag.common.editpart.NodeEditPart;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IPapyrusNodeFigure;
import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.SelectableBorderedNodeFigure;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy;
@@ -124,8 +125,6 @@ public class LiteralBooleanEditPart extends NodeEditPart { ((LiteralBooleanNameEditPart)childEditPart).setLabel(getPrimaryShape().getNameLabel());
return true;
}
-
-
return false;
}
@@ -184,7 +183,6 @@ public class LiteralBooleanEditPart extends NodeEditPart { */
protected NodeFigure createNodeFigure() {
return new SelectableBorderedNodeFigure(createMainFigureWithSVG());
-
}
/**
@@ -234,8 +232,8 @@ public class LiteralBooleanEditPart extends NodeEditPart { * @generated
*/
protected void setLineType(int style) {
- if(primaryShape instanceof NodeFigure) {
- ((NodeFigure)primaryShape).setLineStyle(style);
+ if(primaryShape instanceof IPapyrusNodeFigure) {
+ ((IPapyrusNodeFigure)primaryShape).setLineStyle(style);
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/LiteralBooleanNameEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/LiteralBooleanNameEditPart.java index dda5c8add31..9b5c1c3b44d 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/LiteralBooleanNameEditPart.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/LiteralBooleanNameEditPart.java @@ -64,6 +64,7 @@ import org.eclipse.papyrus.infra.emf.appearance.helper.VisualInformationPapyrusC import org.eclipse.papyrus.infra.gmfdiag.common.editpart.IControlParserForDirectEdit;
import org.eclipse.papyrus.infra.gmfdiag.common.editpart.PapyrusCompartmentEditPart;
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;
@@ -320,7 +321,6 @@ public class LiteralBooleanNameEditPart extends PapyrusCompartmentEditPart imple ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -407,9 +407,7 @@ public class LiteralBooleanNameEditPart extends PapyrusCompartmentEditPart imple * @generated
*/
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
@@ -442,7 +440,6 @@ public class LiteralBooleanNameEditPart extends PapyrusCompartmentEditPart imple return;
}
final Dialog finalDialog = dialog;
-
if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@@ -450,7 +447,6 @@ public class LiteralBooleanNameEditPart extends PapyrusCompartmentEditPart imple @Override
protected void doExecute() {
configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
-
}
};
domain.getCommandStack().execute(command);
@@ -507,8 +503,17 @@ public class LiteralBooleanNameEditPart extends PapyrusCompartmentEditPart imple 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) {
@@ -629,7 +634,6 @@ public class LiteralBooleanNameEditPart extends PapyrusCompartmentEditPart imple if(checkDefaultEdition()) {
return IDirectEdition.DEFAULT_DIRECT_EDITOR;
}
-
// not a named element. no specific editor => do nothing
return IDirectEdition.NO_DIRECT_EDITION;
}
@@ -796,7 +800,6 @@ public class LiteralBooleanNameEditPart extends PapyrusCompartmentEditPart imple */
protected void addOwnerElementListeners() {
addListenerFilter(ADD_PARENT_MODEL, this, ((View)getParent().getModel())); //$NON-NLS-1$
-
}
/**
@@ -805,7 +808,6 @@ public class LiteralBooleanNameEditPart extends PapyrusCompartmentEditPart imple public void deactivate() {
removeOwnerElementListeners();
super.deactivate();
-
}
/**
@@ -813,6 +815,5 @@ public class LiteralBooleanNameEditPart extends PapyrusCompartmentEditPart imple */
protected void removeOwnerElementListeners() {
removeListenerFilter(ADD_PARENT_MODEL);
-
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/LiteralIntegerEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/LiteralIntegerEditPart.java index ed984890383..fa0c42291fd 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/LiteralIntegerEditPart.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/LiteralIntegerEditPart.java @@ -26,6 +26,7 @@ import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure; import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
import org.eclipse.gmf.runtime.notation.View;
import org.eclipse.papyrus.infra.gmfdiag.common.editpart.NodeEditPart;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IPapyrusNodeFigure;
import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.SelectableBorderedNodeFigure;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy;
@@ -124,8 +125,6 @@ public class LiteralIntegerEditPart extends NodeEditPart { ((LiteralIntegerNameEditPart)childEditPart).setLabel(getPrimaryShape().getNameLabel());
return true;
}
-
-
return false;
}
@@ -184,7 +183,6 @@ public class LiteralIntegerEditPart extends NodeEditPart { */
protected NodeFigure createNodeFigure() {
return new SelectableBorderedNodeFigure(createMainFigureWithSVG());
-
}
/**
@@ -234,8 +232,8 @@ public class LiteralIntegerEditPart extends NodeEditPart { * @generated
*/
protected void setLineType(int style) {
- if(primaryShape instanceof NodeFigure) {
- ((NodeFigure)primaryShape).setLineStyle(style);
+ if(primaryShape instanceof IPapyrusNodeFigure) {
+ ((IPapyrusNodeFigure)primaryShape).setLineStyle(style);
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/LiteralIntegerNameEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/LiteralIntegerNameEditPart.java index 9d724a42189..538ef75a0eb 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/LiteralIntegerNameEditPart.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/LiteralIntegerNameEditPart.java @@ -64,6 +64,7 @@ import org.eclipse.papyrus.infra.emf.appearance.helper.VisualInformationPapyrusC import org.eclipse.papyrus.infra.gmfdiag.common.editpart.IControlParserForDirectEdit;
import org.eclipse.papyrus.infra.gmfdiag.common.editpart.PapyrusCompartmentEditPart;
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;
@@ -320,7 +321,6 @@ public class LiteralIntegerNameEditPart extends PapyrusCompartmentEditPart imple ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -407,9 +407,7 @@ public class LiteralIntegerNameEditPart extends PapyrusCompartmentEditPart imple * @generated
*/
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
@@ -442,7 +440,6 @@ public class LiteralIntegerNameEditPart extends PapyrusCompartmentEditPart imple return;
}
final Dialog finalDialog = dialog;
-
if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@@ -450,7 +447,6 @@ public class LiteralIntegerNameEditPart extends PapyrusCompartmentEditPart imple @Override
protected void doExecute() {
configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
-
}
};
domain.getCommandStack().execute(command);
@@ -507,8 +503,17 @@ public class LiteralIntegerNameEditPart extends PapyrusCompartmentEditPart imple 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) {
@@ -629,7 +634,6 @@ public class LiteralIntegerNameEditPart extends PapyrusCompartmentEditPart imple if(checkDefaultEdition()) {
return IDirectEdition.DEFAULT_DIRECT_EDITOR;
}
-
// not a named element. no specific editor => do nothing
return IDirectEdition.NO_DIRECT_EDITION;
}
@@ -796,7 +800,6 @@ public class LiteralIntegerNameEditPart extends PapyrusCompartmentEditPart imple */
protected void addOwnerElementListeners() {
addListenerFilter(ADD_PARENT_MODEL, this, ((View)getParent().getModel())); //$NON-NLS-1$
-
}
/**
@@ -805,7 +808,6 @@ public class LiteralIntegerNameEditPart extends PapyrusCompartmentEditPart imple public void deactivate() {
removeOwnerElementListeners();
super.deactivate();
-
}
/**
@@ -813,6 +815,5 @@ public class LiteralIntegerNameEditPart extends PapyrusCompartmentEditPart imple */
protected void removeOwnerElementListeners() {
removeListenerFilter(ADD_PARENT_MODEL);
-
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/LiteralNullEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/LiteralNullEditPart.java index 09a1279fa3e..1ff238a6f29 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/LiteralNullEditPart.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/LiteralNullEditPart.java @@ -26,6 +26,7 @@ import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure; import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
import org.eclipse.gmf.runtime.notation.View;
import org.eclipse.papyrus.infra.gmfdiag.common.editpart.NodeEditPart;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IPapyrusNodeFigure;
import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.SelectableBorderedNodeFigure;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy;
@@ -124,8 +125,6 @@ public class LiteralNullEditPart extends NodeEditPart { ((LiteralNullNameEditPart)childEditPart).setLabel(getPrimaryShape().getNameLabel());
return true;
}
-
-
return false;
}
@@ -184,7 +183,6 @@ public class LiteralNullEditPart extends NodeEditPart { */
protected NodeFigure createNodeFigure() {
return new SelectableBorderedNodeFigure(createMainFigureWithSVG());
-
}
/**
@@ -234,8 +232,8 @@ public class LiteralNullEditPart extends NodeEditPart { * @generated
*/
protected void setLineType(int style) {
- if(primaryShape instanceof NodeFigure) {
- ((NodeFigure)primaryShape).setLineStyle(style);
+ if(primaryShape instanceof IPapyrusNodeFigure) {
+ ((IPapyrusNodeFigure)primaryShape).setLineStyle(style);
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/LiteralNullNameEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/LiteralNullNameEditPart.java index 49b1a2ab011..2662193cb48 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/LiteralNullNameEditPart.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/LiteralNullNameEditPart.java @@ -64,6 +64,7 @@ import org.eclipse.papyrus.infra.emf.appearance.helper.VisualInformationPapyrusC import org.eclipse.papyrus.infra.gmfdiag.common.editpart.IControlParserForDirectEdit;
import org.eclipse.papyrus.infra.gmfdiag.common.editpart.PapyrusCompartmentEditPart;
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;
@@ -320,7 +321,6 @@ public class LiteralNullNameEditPart extends PapyrusCompartmentEditPart implemen ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -407,9 +407,7 @@ public class LiteralNullNameEditPart extends PapyrusCompartmentEditPart implemen * @generated
*/
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
@@ -442,7 +440,6 @@ public class LiteralNullNameEditPart extends PapyrusCompartmentEditPart implemen return;
}
final Dialog finalDialog = dialog;
-
if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@@ -450,7 +447,6 @@ public class LiteralNullNameEditPart extends PapyrusCompartmentEditPart implemen @Override
protected void doExecute() {
configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
-
}
};
domain.getCommandStack().execute(command);
@@ -507,8 +503,17 @@ public class LiteralNullNameEditPart extends PapyrusCompartmentEditPart implemen 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) {
@@ -629,7 +634,6 @@ public class LiteralNullNameEditPart extends PapyrusCompartmentEditPart implemen if(checkDefaultEdition()) {
return IDirectEdition.DEFAULT_DIRECT_EDITOR;
}
-
// not a named element. no specific editor => do nothing
return IDirectEdition.NO_DIRECT_EDITION;
}
@@ -796,7 +800,6 @@ public class LiteralNullNameEditPart extends PapyrusCompartmentEditPart implemen */
protected void addOwnerElementListeners() {
addListenerFilter(ADD_PARENT_MODEL, this, ((View)getParent().getModel())); //$NON-NLS-1$
-
}
/**
@@ -805,7 +808,6 @@ public class LiteralNullNameEditPart extends PapyrusCompartmentEditPart implemen public void deactivate() {
removeOwnerElementListeners();
super.deactivate();
-
}
/**
@@ -813,6 +815,5 @@ public class LiteralNullNameEditPart extends PapyrusCompartmentEditPart implemen */
protected void removeOwnerElementListeners() {
removeListenerFilter(ADD_PARENT_MODEL);
-
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/LiteralStringEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/LiteralStringEditPart.java index 8fbaa75e81b..860d9ae01d7 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/LiteralStringEditPart.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/LiteralStringEditPart.java @@ -26,6 +26,7 @@ import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure; import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
import org.eclipse.gmf.runtime.notation.View;
import org.eclipse.papyrus.infra.gmfdiag.common.editpart.NodeEditPart;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IPapyrusNodeFigure;
import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.SelectableBorderedNodeFigure;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy;
@@ -124,8 +125,6 @@ public class LiteralStringEditPart extends NodeEditPart { ((LiteralStringNameEditPart)childEditPart).setLabel(getPrimaryShape().getNameLabel());
return true;
}
-
-
return false;
}
@@ -184,7 +183,6 @@ public class LiteralStringEditPart extends NodeEditPart { */
protected NodeFigure createNodeFigure() {
return new SelectableBorderedNodeFigure(createMainFigureWithSVG());
-
}
/**
@@ -234,8 +232,8 @@ public class LiteralStringEditPart extends NodeEditPart { * @generated
*/
protected void setLineType(int style) {
- if(primaryShape instanceof NodeFigure) {
- ((NodeFigure)primaryShape).setLineStyle(style);
+ if(primaryShape instanceof IPapyrusNodeFigure) {
+ ((IPapyrusNodeFigure)primaryShape).setLineStyle(style);
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/LiteralStringNameEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/LiteralStringNameEditPart.java index 7677b2a7138..054e9abcde0 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/LiteralStringNameEditPart.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/LiteralStringNameEditPart.java @@ -64,6 +64,7 @@ import org.eclipse.papyrus.infra.emf.appearance.helper.VisualInformationPapyrusC import org.eclipse.papyrus.infra.gmfdiag.common.editpart.IControlParserForDirectEdit;
import org.eclipse.papyrus.infra.gmfdiag.common.editpart.PapyrusCompartmentEditPart;
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;
@@ -320,7 +321,6 @@ public class LiteralStringNameEditPart extends PapyrusCompartmentEditPart implem ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -407,9 +407,7 @@ public class LiteralStringNameEditPart extends PapyrusCompartmentEditPart implem * @generated
*/
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
@@ -442,7 +440,6 @@ public class LiteralStringNameEditPart extends PapyrusCompartmentEditPart implem return;
}
final Dialog finalDialog = dialog;
-
if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@@ -450,7 +447,6 @@ public class LiteralStringNameEditPart extends PapyrusCompartmentEditPart implem @Override
protected void doExecute() {
configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
-
}
};
domain.getCommandStack().execute(command);
@@ -507,8 +503,17 @@ public class LiteralStringNameEditPart extends PapyrusCompartmentEditPart implem 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) {
@@ -629,7 +634,6 @@ public class LiteralStringNameEditPart extends PapyrusCompartmentEditPart implem if(checkDefaultEdition()) {
return IDirectEdition.DEFAULT_DIRECT_EDITOR;
}
-
// not a named element. no specific editor => do nothing
return IDirectEdition.NO_DIRECT_EDITION;
}
@@ -796,7 +800,6 @@ public class LiteralStringNameEditPart extends PapyrusCompartmentEditPart implem */
protected void addOwnerElementListeners() {
addListenerFilter(ADD_PARENT_MODEL, this, ((View)getParent().getModel())); //$NON-NLS-1$
-
}
/**
@@ -805,7 +808,6 @@ public class LiteralStringNameEditPart extends PapyrusCompartmentEditPart implem public void deactivate() {
removeOwnerElementListeners();
super.deactivate();
-
}
/**
@@ -813,6 +815,5 @@ public class LiteralStringNameEditPart extends PapyrusCompartmentEditPart implem */
protected void removeOwnerElementListeners() {
removeListenerFilter(ADD_PARENT_MODEL);
-
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/LiteralUnlimitedNaturalEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/LiteralUnlimitedNaturalEditPart.java index 9abc93fb964..038556067d9 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/LiteralUnlimitedNaturalEditPart.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/LiteralUnlimitedNaturalEditPart.java @@ -26,6 +26,7 @@ import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure; import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
import org.eclipse.gmf.runtime.notation.View;
import org.eclipse.papyrus.infra.gmfdiag.common.editpart.NodeEditPart;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IPapyrusNodeFigure;
import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.SelectableBorderedNodeFigure;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy;
@@ -124,8 +125,6 @@ public class LiteralUnlimitedNaturalEditPart extends NodeEditPart { ((LiteralUnlimitedNaturalNameEditPart)childEditPart).setLabel(getPrimaryShape().getNameLabel());
return true;
}
-
-
return false;
}
@@ -184,7 +183,6 @@ public class LiteralUnlimitedNaturalEditPart extends NodeEditPart { */
protected NodeFigure createNodeFigure() {
return new SelectableBorderedNodeFigure(createMainFigureWithSVG());
-
}
/**
@@ -234,8 +232,8 @@ public class LiteralUnlimitedNaturalEditPart extends NodeEditPart { * @generated
*/
protected void setLineType(int style) {
- if(primaryShape instanceof NodeFigure) {
- ((NodeFigure)primaryShape).setLineStyle(style);
+ if(primaryShape instanceof IPapyrusNodeFigure) {
+ ((IPapyrusNodeFigure)primaryShape).setLineStyle(style);
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/LiteralUnlimitedNaturalNameEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/LiteralUnlimitedNaturalNameEditPart.java index 06b67d7ef91..130a94d63bc 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/LiteralUnlimitedNaturalNameEditPart.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/LiteralUnlimitedNaturalNameEditPart.java @@ -64,6 +64,7 @@ import org.eclipse.papyrus.infra.emf.appearance.helper.VisualInformationPapyrusC import org.eclipse.papyrus.infra.gmfdiag.common.editpart.IControlParserForDirectEdit;
import org.eclipse.papyrus.infra.gmfdiag.common.editpart.PapyrusCompartmentEditPart;
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;
@@ -320,7 +321,6 @@ public class LiteralUnlimitedNaturalNameEditPart extends PapyrusCompartmentEditP ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -407,9 +407,7 @@ public class LiteralUnlimitedNaturalNameEditPart extends PapyrusCompartmentEditP * @generated
*/
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
@@ -442,7 +440,6 @@ public class LiteralUnlimitedNaturalNameEditPart extends PapyrusCompartmentEditP return;
}
final Dialog finalDialog = dialog;
-
if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@@ -450,7 +447,6 @@ public class LiteralUnlimitedNaturalNameEditPart extends PapyrusCompartmentEditP @Override
protected void doExecute() {
configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
-
}
};
domain.getCommandStack().execute(command);
@@ -507,8 +503,17 @@ public class LiteralUnlimitedNaturalNameEditPart extends PapyrusCompartmentEditP 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) {
@@ -629,7 +634,6 @@ public class LiteralUnlimitedNaturalNameEditPart extends PapyrusCompartmentEditP if(checkDefaultEdition()) {
return IDirectEdition.DEFAULT_DIRECT_EDITOR;
}
-
// not a named element. no specific editor => do nothing
return IDirectEdition.NO_DIRECT_EDITION;
}
@@ -796,7 +800,6 @@ public class LiteralUnlimitedNaturalNameEditPart extends PapyrusCompartmentEditP */
protected void addOwnerElementListeners() {
addListenerFilter(ADD_PARENT_MODEL, this, ((View)getParent().getModel())); //$NON-NLS-1$
-
}
/**
@@ -805,7 +808,6 @@ public class LiteralUnlimitedNaturalNameEditPart extends PapyrusCompartmentEditP public void deactivate() {
removeOwnerElementListeners();
super.deactivate();
-
}
/**
@@ -813,6 +815,5 @@ public class LiteralUnlimitedNaturalNameEditPart extends PapyrusCompartmentEditP */
protected void removeOwnerElementListeners() {
removeListenerFilter(ADD_PARENT_MODEL);
-
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ManifestationAppliedStereotypeEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ManifestationAppliedStereotypeEditPart.java index 06355ec4e8d..3a935dc12e9 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ManifestationAppliedStereotypeEditPart.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ManifestationAppliedStereotypeEditPart.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 ManifestationAppliedStereotypeEditPart extends PapyrusLabelEditPart ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -406,9 +406,7 @@ public class ManifestationAppliedStereotypeEditPart 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 ManifestationAppliedStereotypeEditPart 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 ManifestationAppliedStereotypeEditPart extends PapyrusLabelEditPart @Override
protected void doExecute() {
configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
-
}
};
domain.getCommandStack().execute(command);
@@ -506,8 +502,17 @@ public class ManifestationAppliedStereotypeEditPart 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 ManifestationAppliedStereotypeEditPart extends PapyrusLabelEditPart }
}
}
-
super.handleNotificationEvent(event);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ManifestationNameEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ManifestationNameEditPart.java index f5695511375..6a1f95ddb24 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ManifestationNameEditPart.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ManifestationNameEditPart.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 ManifestationNameEditPart extends PapyrusLabelEditPart implements I ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -406,9 +406,7 @@ public class ManifestationNameEditPart extends PapyrusLabelEditPart implements I * @generated
*/
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
@@ -441,7 +439,6 @@ public class ManifestationNameEditPart extends PapyrusLabelEditPart implements I 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 ManifestationNameEditPart extends PapyrusLabelEditPart implements I @Override
protected void doExecute() {
configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
-
}
};
domain.getCommandStack().execute(command);
@@ -506,8 +502,17 @@ public class ManifestationNameEditPart extends PapyrusLabelEditPart implements I 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) {
@@ -628,7 +633,6 @@ public class ManifestationNameEditPart extends PapyrusLabelEditPart implements I if(checkDefaultEdition()) {
return IDirectEdition.DEFAULT_DIRECT_EDITOR;
}
-
// not a named element. no specific editor => do nothing
return IDirectEdition.NO_DIRECT_EDITION;
}
@@ -746,7 +750,6 @@ public class ManifestationNameEditPart extends PapyrusLabelEditPart implements I }
}
}
-
super.handleNotificationEvent(event);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/NodeCompositeCompartmentEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/NodeCompositeCompartmentEditPart.java index 064784b03d0..3a8b476c171 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/NodeCompositeCompartmentEditPart.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/NodeCompositeCompartmentEditPart.java @@ -88,7 +88,6 @@ public class NodeCompositeCompartmentEditPart extends ShapeCompartmentEditPart { * @generated
*/
public EditPart getTargetEditPart(Request request) {
-
return super.getTargetEditPart(request);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/NodeCompositeCompartmentEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/NodeCompositeCompartmentEditPartCN.java index e334932b844..fd7dd1fe372 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/NodeCompositeCompartmentEditPartCN.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/NodeCompositeCompartmentEditPartCN.java @@ -88,7 +88,6 @@ public class NodeCompositeCompartmentEditPartCN extends ShapeCompartmentEditPart * @generated
*/
public EditPart getTargetEditPart(Request request) {
-
return super.getTargetEditPart(request);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/NodeCompositeEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/NodeCompositeEditPart.java index 7131e3bd022..649c0549c0f 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/NodeCompositeEditPart.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/NodeCompositeEditPart.java @@ -30,6 +30,7 @@ import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout; import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure;
import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IPapyrusNodeFigure;
import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.SelectableBorderedNodeFigure;
import org.eclipse.papyrus.uml.diagram.common.editparts.NamedElementEditPart;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.AffixedNodeAlignmentEditPolicy;
@@ -136,7 +137,6 @@ public class NodeCompositeEditPart extends NamedElementEditPart { **/
protected void handleNotificationEvent(Notification event) {
super.handleNotificationEvent(event);
-
}
/**
@@ -163,25 +163,18 @@ public class NodeCompositeEditPart extends NamedElementEditPart { ((NodeCompositeNameEditPart)childEditPart).setLabel(getPrimaryShape().getNameLabel());
return true;
}
-
-
if(childEditPart instanceof NodeCompositeCompartmentEditPart) {
IFigure pane = getPrimaryShape().getCompositeCompartmentFigure();
setupContentPane(pane); // FIXME each comparment should handle his content pane in his own way
pane.add(((NodeCompositeCompartmentEditPart)childEditPart).getFigure());
return true;
}
-
-
-
//Papyrus Gencode :Affixed Port locator
if(childEditPart instanceof PortEditPart) {
IBorderItemLocator locator = new PortPositionLocator(getMainFigure(), PositionConstants.NONE);
getBorderedFigure().getBorderItemContainer().add(((PortEditPart)childEditPart).getFigure(), locator);
return true;
}
-
-
return false;
}
@@ -255,7 +248,6 @@ public class NodeCompositeEditPart extends NamedElementEditPart { */
protected NodeFigure createMainFigure() {
return new SelectableBorderedNodeFigure(createMainFigureWithSVG());
-
}
/**
@@ -305,8 +297,8 @@ public class NodeCompositeEditPart extends NamedElementEditPart { * @generated
*/
protected void setLineType(int style) {
- if(primaryShape instanceof NodeFigure) {
- ((NodeFigure)primaryShape).setLineStyle(style);
+ if(primaryShape instanceof IPapyrusNodeFigure) {
+ ((IPapyrusNodeFigure)primaryShape).setLineStyle(style);
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/NodeCompositeEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/NodeCompositeEditPartCN.java index eff09000332..de5dbff4832 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/NodeCompositeEditPartCN.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/NodeCompositeEditPartCN.java @@ -30,6 +30,7 @@ import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout; import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure;
import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IPapyrusNodeFigure;
import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.SelectableBorderedNodeFigure;
import org.eclipse.papyrus.uml.diagram.common.editparts.NamedElementEditPart;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.AffixedNodeAlignmentEditPolicy;
@@ -136,7 +137,6 @@ public class NodeCompositeEditPartCN extends NamedElementEditPart { **/
protected void handleNotificationEvent(Notification event) {
super.handleNotificationEvent(event);
-
}
/**
@@ -163,25 +163,18 @@ public class NodeCompositeEditPartCN extends NamedElementEditPart { ((NodeCompositeNameEditPartCN)childEditPart).setLabel(getPrimaryShape().getNameLabel());
return true;
}
-
-
if(childEditPart instanceof NodeCompositeCompartmentEditPartCN) {
IFigure pane = getPrimaryShape().getCompositeCompartmentFigure();
setupContentPane(pane); // FIXME each comparment should handle his content pane in his own way
pane.add(((NodeCompositeCompartmentEditPartCN)childEditPart).getFigure());
return true;
}
-
-
-
//Papyrus Gencode :Affixed Port locator
if(childEditPart instanceof PortEditPart) {
IBorderItemLocator locator = new PortPositionLocator(getMainFigure(), PositionConstants.NONE);
getBorderedFigure().getBorderItemContainer().add(((PortEditPart)childEditPart).getFigure(), locator);
return true;
}
-
-
return false;
}
@@ -255,7 +248,6 @@ public class NodeCompositeEditPartCN extends NamedElementEditPart { */
protected NodeFigure createMainFigure() {
return new SelectableBorderedNodeFigure(createMainFigureWithSVG());
-
}
/**
@@ -305,8 +297,8 @@ public class NodeCompositeEditPartCN extends NamedElementEditPart { * @generated
*/
protected void setLineType(int style) {
- if(primaryShape instanceof NodeFigure) {
- ((NodeFigure)primaryShape).setLineStyle(style);
+ if(primaryShape instanceof IPapyrusNodeFigure) {
+ ((IPapyrusNodeFigure)primaryShape).setLineStyle(style);
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/NodeCompositeNameEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/NodeCompositeNameEditPart.java index 65d4be22e90..336180911fc 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/NodeCompositeNameEditPart.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/NodeCompositeNameEditPart.java @@ -64,6 +64,7 @@ import org.eclipse.papyrus.infra.emf.appearance.helper.VisualInformationPapyrusC import org.eclipse.papyrus.infra.gmfdiag.common.editpart.IControlParserForDirectEdit;
import org.eclipse.papyrus.infra.gmfdiag.common.editpart.PapyrusCompartmentEditPart;
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;
@@ -320,7 +321,6 @@ public class NodeCompositeNameEditPart extends PapyrusCompartmentEditPart implem ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -407,9 +407,7 @@ public class NodeCompositeNameEditPart extends PapyrusCompartmentEditPart implem * @generated
*/
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
@@ -442,7 +440,6 @@ public class NodeCompositeNameEditPart extends PapyrusCompartmentEditPart implem return;
}
final Dialog finalDialog = dialog;
-
if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@@ -450,7 +447,6 @@ public class NodeCompositeNameEditPart extends PapyrusCompartmentEditPart implem @Override
protected void doExecute() {
configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
-
}
};
domain.getCommandStack().execute(command);
@@ -507,8 +503,17 @@ public class NodeCompositeNameEditPart extends PapyrusCompartmentEditPart implem 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) {
@@ -629,7 +634,6 @@ public class NodeCompositeNameEditPart extends PapyrusCompartmentEditPart implem if(checkDefaultEdition()) {
return IDirectEdition.DEFAULT_DIRECT_EDITOR;
}
-
// not a named element. no specific editor => do nothing
return IDirectEdition.NO_DIRECT_EDITION;
}
@@ -796,7 +800,6 @@ public class NodeCompositeNameEditPart extends PapyrusCompartmentEditPart implem */
protected void addOwnerElementListeners() {
addListenerFilter(ADD_PARENT_MODEL, this, ((View)getParent().getModel())); //$NON-NLS-1$
-
}
/**
@@ -805,7 +808,6 @@ public class NodeCompositeNameEditPart extends PapyrusCompartmentEditPart implem public void deactivate() {
removeOwnerElementListeners();
super.deactivate();
-
}
/**
@@ -813,6 +815,5 @@ public class NodeCompositeNameEditPart extends PapyrusCompartmentEditPart implem */
protected void removeOwnerElementListeners() {
removeListenerFilter(ADD_PARENT_MODEL);
-
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/NodeCompositeNameEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/NodeCompositeNameEditPartCN.java index 330347d8bbc..25ac0336927 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/NodeCompositeNameEditPartCN.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/NodeCompositeNameEditPartCN.java @@ -64,6 +64,7 @@ import org.eclipse.papyrus.infra.emf.appearance.helper.VisualInformationPapyrusC import org.eclipse.papyrus.infra.gmfdiag.common.editpart.IControlParserForDirectEdit;
import org.eclipse.papyrus.infra.gmfdiag.common.editpart.PapyrusCompartmentEditPart;
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;
@@ -320,7 +321,6 @@ public class NodeCompositeNameEditPartCN extends PapyrusCompartmentEditPart impl ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -407,9 +407,7 @@ public class NodeCompositeNameEditPartCN extends PapyrusCompartmentEditPart impl * @generated
*/
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
@@ -442,7 +440,6 @@ public class NodeCompositeNameEditPartCN extends PapyrusCompartmentEditPart impl return;
}
final Dialog finalDialog = dialog;
-
if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@@ -450,7 +447,6 @@ public class NodeCompositeNameEditPartCN extends PapyrusCompartmentEditPart impl @Override
protected void doExecute() {
configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
-
}
};
domain.getCommandStack().execute(command);
@@ -507,8 +503,17 @@ public class NodeCompositeNameEditPartCN extends PapyrusCompartmentEditPart impl 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) {
@@ -629,7 +634,6 @@ public class NodeCompositeNameEditPartCN extends PapyrusCompartmentEditPart impl if(checkDefaultEdition()) {
return IDirectEdition.DEFAULT_DIRECT_EDITOR;
}
-
// not a named element. no specific editor => do nothing
return IDirectEdition.NO_DIRECT_EDITION;
}
@@ -796,7 +800,6 @@ public class NodeCompositeNameEditPartCN extends PapyrusCompartmentEditPart impl */
protected void addOwnerElementListeners() {
addListenerFilter(ADD_PARENT_MODEL, this, ((View)getParent().getModel())); //$NON-NLS-1$
-
}
/**
@@ -805,7 +808,6 @@ public class NodeCompositeNameEditPartCN extends PapyrusCompartmentEditPart impl public void deactivate() {
removeOwnerElementListeners();
super.deactivate();
-
}
/**
@@ -813,6 +815,5 @@ public class NodeCompositeNameEditPartCN extends PapyrusCompartmentEditPart impl */
protected void removeOwnerElementListeners() {
removeListenerFilter(ADD_PARENT_MODEL);
-
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/OpaqueBehaviorCompositeCompartmentEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/OpaqueBehaviorCompositeCompartmentEditPart.java index 94e2b42000c..5a21f75d6e3 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/OpaqueBehaviorCompositeCompartmentEditPart.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/OpaqueBehaviorCompositeCompartmentEditPart.java @@ -88,7 +88,6 @@ public class OpaqueBehaviorCompositeCompartmentEditPart extends ShapeCompartment * @generated
*/
public EditPart getTargetEditPart(Request request) {
-
return super.getTargetEditPart(request);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/OpaqueBehaviorCompositeCompartmentEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/OpaqueBehaviorCompositeCompartmentEditPartCN.java index cca24b66357..1986f35176a 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/OpaqueBehaviorCompositeCompartmentEditPartCN.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/OpaqueBehaviorCompositeCompartmentEditPartCN.java @@ -88,7 +88,6 @@ public class OpaqueBehaviorCompositeCompartmentEditPartCN extends ShapeCompartme * @generated
*/
public EditPart getTargetEditPart(Request request) {
-
return super.getTargetEditPart(request);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/OpaqueBehaviorCompositeEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/OpaqueBehaviorCompositeEditPart.java index c08f38da123..3f18b903135 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/OpaqueBehaviorCompositeEditPart.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/OpaqueBehaviorCompositeEditPart.java @@ -30,6 +30,7 @@ import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout; import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure;
import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IPapyrusNodeFigure;
import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.SelectableBorderedNodeFigure;
import org.eclipse.papyrus.uml.diagram.common.editparts.NamedElementEditPart;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.AffixedNodeAlignmentEditPolicy;
@@ -135,7 +136,6 @@ public class OpaqueBehaviorCompositeEditPart extends NamedElementEditPart { **/
protected void handleNotificationEvent(Notification event) {
super.handleNotificationEvent(event);
-
}
/**
@@ -162,35 +162,24 @@ public class OpaqueBehaviorCompositeEditPart extends NamedElementEditPart { ((OpaqueBehaviorCompositeNameEditPart)childEditPart).setLabel(getPrimaryShape().getNameLabel());
return true;
}
-
-
if(childEditPart instanceof OpaqueBehaviorCompositeCompartmentEditPart) {
IFigure pane = getPrimaryShape().getCompositeCompartmentFigure();
setupContentPane(pane); // FIXME each comparment should handle his content pane in his own way
pane.add(((OpaqueBehaviorCompositeCompartmentEditPart)childEditPart).getFigure());
return true;
}
-
-
-
//Papyrus Gencode :Affixed Port locator
if(childEditPart instanceof PortEditPart) {
IBorderItemLocator locator = new PortPositionLocator(getMainFigure(), PositionConstants.NONE);
getBorderedFigure().getBorderItemContainer().add(((PortEditPart)childEditPart).getFigure(), locator);
return true;
}
-
-
-
-
//Papyrus Gencode :Affixed Port locator
if(childEditPart instanceof ParameterEditPart) {
IBorderItemLocator locator = new PortPositionLocator(getMainFigure(), PositionConstants.NONE);
getBorderedFigure().getBorderItemContainer().add(((ParameterEditPart)childEditPart).getFigure(), locator);
return true;
}
-
-
return false;
}
@@ -268,7 +257,6 @@ public class OpaqueBehaviorCompositeEditPart extends NamedElementEditPart { */
protected NodeFigure createMainFigure() {
return new SelectableBorderedNodeFigure(createMainFigureWithSVG());
-
}
/**
@@ -318,8 +306,8 @@ public class OpaqueBehaviorCompositeEditPart extends NamedElementEditPart { * @generated
*/
protected void setLineType(int style) {
- if(primaryShape instanceof NodeFigure) {
- ((NodeFigure)primaryShape).setLineStyle(style);
+ if(primaryShape instanceof IPapyrusNodeFigure) {
+ ((IPapyrusNodeFigure)primaryShape).setLineStyle(style);
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/OpaqueBehaviorCompositeEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/OpaqueBehaviorCompositeEditPartCN.java index 68d2e5434e5..5d96f00093f 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/OpaqueBehaviorCompositeEditPartCN.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/OpaqueBehaviorCompositeEditPartCN.java @@ -30,6 +30,7 @@ import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout; import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure;
import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IPapyrusNodeFigure;
import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.SelectableBorderedNodeFigure;
import org.eclipse.papyrus.uml.diagram.common.editparts.NamedElementEditPart;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.AffixedNodeAlignmentEditPolicy;
@@ -135,7 +136,6 @@ public class OpaqueBehaviorCompositeEditPartCN extends NamedElementEditPart { **/
protected void handleNotificationEvent(Notification event) {
super.handleNotificationEvent(event);
-
}
/**
@@ -162,35 +162,24 @@ public class OpaqueBehaviorCompositeEditPartCN extends NamedElementEditPart { ((OpaqueBehaviorCompositeNameEditPartCN)childEditPart).setLabel(getPrimaryShape().getNameLabel());
return true;
}
-
-
if(childEditPart instanceof OpaqueBehaviorCompositeCompartmentEditPartCN) {
IFigure pane = getPrimaryShape().getCompositeCompartmentFigure();
setupContentPane(pane); // FIXME each comparment should handle his content pane in his own way
pane.add(((OpaqueBehaviorCompositeCompartmentEditPartCN)childEditPart).getFigure());
return true;
}
-
-
-
//Papyrus Gencode :Affixed Port locator
if(childEditPart instanceof PortEditPart) {
IBorderItemLocator locator = new PortPositionLocator(getMainFigure(), PositionConstants.NONE);
getBorderedFigure().getBorderItemContainer().add(((PortEditPart)childEditPart).getFigure(), locator);
return true;
}
-
-
-
-
//Papyrus Gencode :Affixed Port locator
if(childEditPart instanceof ParameterEditPart) {
IBorderItemLocator locator = new PortPositionLocator(getMainFigure(), PositionConstants.NONE);
getBorderedFigure().getBorderItemContainer().add(((ParameterEditPart)childEditPart).getFigure(), locator);
return true;
}
-
-
return false;
}
@@ -268,7 +257,6 @@ public class OpaqueBehaviorCompositeEditPartCN extends NamedElementEditPart { */
protected NodeFigure createMainFigure() {
return new SelectableBorderedNodeFigure(createMainFigureWithSVG());
-
}
/**
@@ -318,8 +306,8 @@ public class OpaqueBehaviorCompositeEditPartCN extends NamedElementEditPart { * @generated
*/
protected void setLineType(int style) {
- if(primaryShape instanceof NodeFigure) {
- ((NodeFigure)primaryShape).setLineStyle(style);
+ if(primaryShape instanceof IPapyrusNodeFigure) {
+ ((IPapyrusNodeFigure)primaryShape).setLineStyle(style);
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/OpaqueBehaviorCompositeNameEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/OpaqueBehaviorCompositeNameEditPart.java index 16fe94c81b4..d8f69ec6a10 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/OpaqueBehaviorCompositeNameEditPart.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/OpaqueBehaviorCompositeNameEditPart.java @@ -64,6 +64,7 @@ import org.eclipse.papyrus.infra.emf.appearance.helper.VisualInformationPapyrusC import org.eclipse.papyrus.infra.gmfdiag.common.editpart.IControlParserForDirectEdit;
import org.eclipse.papyrus.infra.gmfdiag.common.editpart.PapyrusCompartmentEditPart;
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;
@@ -320,7 +321,6 @@ public class OpaqueBehaviorCompositeNameEditPart extends PapyrusCompartmentEditP ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -407,9 +407,7 @@ public class OpaqueBehaviorCompositeNameEditPart extends PapyrusCompartmentEditP * @generated
*/
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
@@ -442,7 +440,6 @@ public class OpaqueBehaviorCompositeNameEditPart extends PapyrusCompartmentEditP return;
}
final Dialog finalDialog = dialog;
-
if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@@ -450,7 +447,6 @@ public class OpaqueBehaviorCompositeNameEditPart extends PapyrusCompartmentEditP @Override
protected void doExecute() {
configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
-
}
};
domain.getCommandStack().execute(command);
@@ -507,8 +503,17 @@ public class OpaqueBehaviorCompositeNameEditPart extends PapyrusCompartmentEditP 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) {
@@ -629,7 +634,6 @@ public class OpaqueBehaviorCompositeNameEditPart extends PapyrusCompartmentEditP if(checkDefaultEdition()) {
return IDirectEdition.DEFAULT_DIRECT_EDITOR;
}
-
// not a named element. no specific editor => do nothing
return IDirectEdition.NO_DIRECT_EDITION;
}
@@ -796,7 +800,6 @@ public class OpaqueBehaviorCompositeNameEditPart extends PapyrusCompartmentEditP */
protected void addOwnerElementListeners() {
addListenerFilter(ADD_PARENT_MODEL, this, ((View)getParent().getModel())); //$NON-NLS-1$
-
}
/**
@@ -805,7 +808,6 @@ public class OpaqueBehaviorCompositeNameEditPart extends PapyrusCompartmentEditP public void deactivate() {
removeOwnerElementListeners();
super.deactivate();
-
}
/**
@@ -813,6 +815,5 @@ public class OpaqueBehaviorCompositeNameEditPart extends PapyrusCompartmentEditP */
protected void removeOwnerElementListeners() {
removeListenerFilter(ADD_PARENT_MODEL);
-
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/OpaqueBehaviorCompositeNameEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/OpaqueBehaviorCompositeNameEditPartCN.java index 7e26d2ba9b6..f8b26a35fd0 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/OpaqueBehaviorCompositeNameEditPartCN.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/OpaqueBehaviorCompositeNameEditPartCN.java @@ -64,6 +64,7 @@ import org.eclipse.papyrus.infra.emf.appearance.helper.VisualInformationPapyrusC import org.eclipse.papyrus.infra.gmfdiag.common.editpart.IControlParserForDirectEdit;
import org.eclipse.papyrus.infra.gmfdiag.common.editpart.PapyrusCompartmentEditPart;
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;
@@ -320,7 +321,6 @@ public class OpaqueBehaviorCompositeNameEditPartCN extends PapyrusCompartmentEdi ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -407,9 +407,7 @@ public class OpaqueBehaviorCompositeNameEditPartCN extends PapyrusCompartmentEdi * @generated
*/
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
@@ -442,7 +440,6 @@ public class OpaqueBehaviorCompositeNameEditPartCN extends PapyrusCompartmentEdi return;
}
final Dialog finalDialog = dialog;
-
if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@@ -450,7 +447,6 @@ public class OpaqueBehaviorCompositeNameEditPartCN extends PapyrusCompartmentEdi @Override
protected void doExecute() {
configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
-
}
};
domain.getCommandStack().execute(command);
@@ -507,8 +503,17 @@ public class OpaqueBehaviorCompositeNameEditPartCN extends PapyrusCompartmentEdi 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) {
@@ -629,7 +634,6 @@ public class OpaqueBehaviorCompositeNameEditPartCN extends PapyrusCompartmentEdi if(checkDefaultEdition()) {
return IDirectEdition.DEFAULT_DIRECT_EDITOR;
}
-
// not a named element. no specific editor => do nothing
return IDirectEdition.NO_DIRECT_EDITION;
}
@@ -796,7 +800,6 @@ public class OpaqueBehaviorCompositeNameEditPartCN extends PapyrusCompartmentEdi */
protected void addOwnerElementListeners() {
addListenerFilter(ADD_PARENT_MODEL, this, ((View)getParent().getModel())); //$NON-NLS-1$
-
}
/**
@@ -805,7 +808,6 @@ public class OpaqueBehaviorCompositeNameEditPartCN extends PapyrusCompartmentEdi public void deactivate() {
removeOwnerElementListeners();
super.deactivate();
-
}
/**
@@ -813,6 +815,5 @@ public class OpaqueBehaviorCompositeNameEditPartCN extends PapyrusCompartmentEdi */
protected void removeOwnerElementListeners() {
removeListenerFilter(ADD_PARENT_MODEL);
-
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/OpaqueExpressionEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/OpaqueExpressionEditPart.java index 3ae6fc38b26..11d8a521a6a 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/OpaqueExpressionEditPart.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/OpaqueExpressionEditPart.java @@ -26,6 +26,7 @@ import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure; import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
import org.eclipse.gmf.runtime.notation.View;
import org.eclipse.papyrus.infra.gmfdiag.common.editpart.NodeEditPart;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IPapyrusNodeFigure;
import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.SelectableBorderedNodeFigure;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy;
@@ -124,8 +125,6 @@ public class OpaqueExpressionEditPart extends NodeEditPart { ((OpaqueExpressionNameEditPart)childEditPart).setLabel(getPrimaryShape().getNameLabel());
return true;
}
-
-
return false;
}
@@ -184,7 +183,6 @@ public class OpaqueExpressionEditPart extends NodeEditPart { */
protected NodeFigure createNodeFigure() {
return new SelectableBorderedNodeFigure(createMainFigureWithSVG());
-
}
/**
@@ -234,8 +232,8 @@ public class OpaqueExpressionEditPart extends NodeEditPart { * @generated
*/
protected void setLineType(int style) {
- if(primaryShape instanceof NodeFigure) {
- ((NodeFigure)primaryShape).setLineStyle(style);
+ if(primaryShape instanceof IPapyrusNodeFigure) {
+ ((IPapyrusNodeFigure)primaryShape).setLineStyle(style);
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/OpaqueExpressionNameEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/OpaqueExpressionNameEditPart.java index 7820e21513f..d4b08f2965b 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/OpaqueExpressionNameEditPart.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/OpaqueExpressionNameEditPart.java @@ -64,6 +64,7 @@ import org.eclipse.papyrus.infra.emf.appearance.helper.VisualInformationPapyrusC import org.eclipse.papyrus.infra.gmfdiag.common.editpart.IControlParserForDirectEdit;
import org.eclipse.papyrus.infra.gmfdiag.common.editpart.PapyrusCompartmentEditPart;
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;
@@ -320,7 +321,6 @@ public class OpaqueExpressionNameEditPart extends PapyrusCompartmentEditPart imp ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -407,9 +407,7 @@ public class OpaqueExpressionNameEditPart extends PapyrusCompartmentEditPart imp * @generated
*/
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
@@ -442,7 +440,6 @@ public class OpaqueExpressionNameEditPart extends PapyrusCompartmentEditPart imp return;
}
final Dialog finalDialog = dialog;
-
if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@@ -450,7 +447,6 @@ public class OpaqueExpressionNameEditPart extends PapyrusCompartmentEditPart imp @Override
protected void doExecute() {
configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
-
}
};
domain.getCommandStack().execute(command);
@@ -507,8 +503,17 @@ public class OpaqueExpressionNameEditPart extends PapyrusCompartmentEditPart imp 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) {
@@ -629,7 +634,6 @@ public class OpaqueExpressionNameEditPart extends PapyrusCompartmentEditPart imp if(checkDefaultEdition()) {
return IDirectEdition.DEFAULT_DIRECT_EDITOR;
}
-
// not a named element. no specific editor => do nothing
return IDirectEdition.NO_DIRECT_EDITION;
}
@@ -796,7 +800,6 @@ public class OpaqueExpressionNameEditPart extends PapyrusCompartmentEditPart imp */
protected void addOwnerElementListeners() {
addListenerFilter(ADD_PARENT_MODEL, this, ((View)getParent().getModel())); //$NON-NLS-1$
-
}
/**
@@ -805,7 +808,6 @@ public class OpaqueExpressionNameEditPart extends PapyrusCompartmentEditPart imp public void deactivate() {
removeOwnerElementListeners();
super.deactivate();
-
}
/**
@@ -813,6 +815,5 @@ public class OpaqueExpressionNameEditPart extends PapyrusCompartmentEditPart imp */
protected void removeOwnerElementListeners() {
removeListenerFilter(ADD_PARENT_MODEL);
-
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/OperationEditPartCLN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/OperationEditPartCLN.java index 72f05b292a8..a643f69cc12 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/OperationEditPartCLN.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/OperationEditPartCLN.java @@ -69,6 +69,7 @@ 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.editpart.IControlParserForDirectEdit;
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;
@@ -339,7 +340,6 @@ public class OperationEditPartCLN extends CompartmentEditPart implements ITextAw ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -426,9 +426,7 @@ public class OperationEditPartCLN extends CompartmentEditPart implements ITextAw * @generated
*/
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
@@ -461,7 +459,6 @@ public class OperationEditPartCLN extends CompartmentEditPart implements ITextAw return;
}
final Dialog finalDialog = dialog;
-
if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@@ -469,7 +466,6 @@ public class OperationEditPartCLN extends CompartmentEditPart implements ITextAw @Override
protected void doExecute() {
configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
-
}
};
domain.getCommandStack().execute(command);
@@ -526,8 +522,17 @@ public class OperationEditPartCLN extends CompartmentEditPart implements ITextAw 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) {
@@ -648,7 +653,6 @@ public class OperationEditPartCLN extends CompartmentEditPart implements ITextAw if(checkDefaultEdition()) {
return IDirectEdition.DEFAULT_DIRECT_EDITOR;
}
-
// not a named element. no specific editor => do nothing
return IDirectEdition.NO_DIRECT_EDITION;
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ParameterAppliedStereotypeEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ParameterAppliedStereotypeEditPart.java index 1b876555489..ce0712f3028 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ParameterAppliedStereotypeEditPart.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ParameterAppliedStereotypeEditPart.java @@ -62,6 +62,7 @@ import org.eclipse.papyrus.extensionpoints.editors.ui.IPopupEditorHelper; import org.eclipse.papyrus.extensionpoints.editors.utils.DirectEditorsUtil;
import org.eclipse.papyrus.extensionpoints.editors.utils.IDirectEditorsIds;
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.AppliedStereotypeExternalNodeEditPolicy;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy;
@@ -339,7 +340,6 @@ public class ParameterAppliedStereotypeEditPart extends LabelEditPart implements ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -426,9 +426,7 @@ public class ParameterAppliedStereotypeEditPart extends LabelEditPart implements * @generated
*/
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
@@ -461,7 +459,6 @@ public class ParameterAppliedStereotypeEditPart extends LabelEditPart implements return;
}
final Dialog finalDialog = dialog;
-
if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@@ -469,7 +466,6 @@ public class ParameterAppliedStereotypeEditPart extends LabelEditPart implements @Override
protected void doExecute() {
configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
-
}
};
domain.getCommandStack().execute(command);
@@ -526,8 +522,17 @@ public class ParameterAppliedStereotypeEditPart extends LabelEditPart implements 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) {
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ParameterEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ParameterEditPart.java index 18d2e9bf6fc..b0f78bf7098 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ParameterEditPart.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ParameterEditPart.java @@ -35,6 +35,7 @@ import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure; import org.eclipse.gmf.runtime.notation.Edge;
import org.eclipse.gmf.runtime.notation.NotationPackage;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IPapyrusNodeFigure;
import org.eclipse.papyrus.uml.diagram.common.editparts.AbstractBorderEditPart;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeIconlDisplayEditPolicy;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy;
@@ -152,7 +153,6 @@ public class ParameterEditPart extends AbstractBorderEditPart { }
}
super.handleNotificationEvent(event);
-
}
/**
@@ -209,7 +209,6 @@ public class ParameterEditPart extends AbstractBorderEditPart { figure.add(shape);
contentPane = setupContentPane(shape);
return figure;
-
}
/**
@@ -254,8 +253,8 @@ public class ParameterEditPart extends AbstractBorderEditPart { * @generated
*/
protected void setLineType(int style) {
- if(primaryShape instanceof NodeFigure) {
- ((NodeFigure)primaryShape).setLineStyle(style);
+ if(primaryShape instanceof IPapyrusNodeFigure) {
+ ((IPapyrusNodeFigure)primaryShape).setLineStyle(style);
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ParameterNameEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ParameterNameEditPart.java index 736d456e973..9102390de54 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ParameterNameEditPart.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ParameterNameEditPart.java @@ -63,6 +63,7 @@ import org.eclipse.papyrus.extensionpoints.editors.utils.DirectEditorsUtil; import org.eclipse.papyrus.extensionpoints.editors.utils.IDirectEditorsIds;
import org.eclipse.papyrus.infra.emf.appearance.helper.AppearanceHelper;
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;
@@ -349,7 +350,6 @@ public class ParameterNameEditPart extends LabelEditPart implements ITextAwareEd ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -436,9 +436,7 @@ public class ParameterNameEditPart extends LabelEditPart implements ITextAwareEd * @generated
*/
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
@@ -471,7 +469,6 @@ public class ParameterNameEditPart extends LabelEditPart implements ITextAwareEd return;
}
final Dialog finalDialog = dialog;
-
if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@@ -479,7 +476,6 @@ public class ParameterNameEditPart extends LabelEditPart implements ITextAwareEd @Override
protected void doExecute() {
configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
-
}
};
domain.getCommandStack().execute(command);
@@ -536,8 +532,17 @@ public class ParameterNameEditPart extends LabelEditPart implements ITextAwareEd 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) {
@@ -658,7 +663,6 @@ public class ParameterNameEditPart extends LabelEditPart implements ITextAwareEd if(checkDefaultEdition()) {
return IDirectEdition.DEFAULT_DIRECT_EDITOR;
}
-
// not a named element. no specific editor => do nothing
return IDirectEdition.NO_DIRECT_EDITION;
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/PortAppliedStereotypeEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/PortAppliedStereotypeEditPart.java index 56583cbcffc..2a60daa608d 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/PortAppliedStereotypeEditPart.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/PortAppliedStereotypeEditPart.java @@ -61,6 +61,7 @@ import org.eclipse.papyrus.extensionpoints.editors.ui.IPopupEditorHelper; import org.eclipse.papyrus.extensionpoints.editors.utils.DirectEditorsUtil;
import org.eclipse.papyrus.extensionpoints.editors.utils.IDirectEditorsIds;
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.editparts.AbstractLabelEditPart;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeExternalNodeEditPolicy;
@@ -339,7 +340,6 @@ public class PortAppliedStereotypeEditPart extends AbstractLabelEditPart impleme ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -426,9 +426,7 @@ public class PortAppliedStereotypeEditPart extends AbstractLabelEditPart impleme * @generated
*/
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
@@ -461,7 +459,6 @@ public class PortAppliedStereotypeEditPart extends AbstractLabelEditPart impleme return;
}
final Dialog finalDialog = dialog;
-
if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@@ -469,7 +466,6 @@ public class PortAppliedStereotypeEditPart extends AbstractLabelEditPart impleme @Override
protected void doExecute() {
configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
-
}
};
domain.getCommandStack().execute(command);
@@ -526,8 +522,17 @@ public class PortAppliedStereotypeEditPart extends AbstractLabelEditPart impleme 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) {
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/PortEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/PortEditPart.java index 8d71ae9ed9e..e17ab8ca9d5 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/PortEditPart.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/PortEditPart.java @@ -35,9 +35,12 @@ import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure; import org.eclipse.gmf.runtime.notation.Edge;
import org.eclipse.gmf.runtime.notation.NotationPackage;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IPapyrusNodeFigure;
import org.eclipse.papyrus.uml.diagram.common.editparts.AbstractBorderEditPart;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeIconlDisplayEditPolicy;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.MaskManagedNodeEditPolicy;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideLabelEditPolicy;
import org.eclipse.papyrus.uml.diagram.common.locator.ExternalLabelPositionLocator;
import org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.BehaviorPortEditPolicy;
@@ -92,6 +95,7 @@ public class PortEditPart extends AbstractBorderEditPart { installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new CustomDiagramDragDropEditPolicy());
installEditPolicy(ShowHideLabelEditPolicy.SHOW_HIDE_LABEL_ROLE, new ShowHideLabelEditPolicy());
installEditPolicy(BehaviorPortEditPolicy.BEHAVIOR_PORT, new BehaviorPortEditPolicy());
+ installEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY, new MaskManagedNodeEditPolicy());
// XXX need an SCR to runtime to have another abstract superclass that would let children add reasonable editpolicies
// removeEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CONNECTION_HANDLES_ROLE);
}
@@ -154,7 +158,6 @@ public class PortEditPart extends AbstractBorderEditPart { }
}
super.handleNotificationEvent(event);
-
}
/**
@@ -211,7 +214,6 @@ public class PortEditPart extends AbstractBorderEditPart { figure.add(shape);
contentPane = setupContentPane(shape);
return figure;
-
}
/**
@@ -256,8 +258,8 @@ public class PortEditPart extends AbstractBorderEditPart { * @generated
*/
protected void setLineType(int style) {
- if(primaryShape instanceof NodeFigure) {
- ((NodeFigure)primaryShape).setLineStyle(style);
+ if(primaryShape instanceof IPapyrusNodeFigure) {
+ ((IPapyrusNodeFigure)primaryShape).setLineStyle(style);
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/PortNameEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/PortNameEditPart.java index 7978508c778..79f450f8391 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/PortNameEditPart.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/PortNameEditPart.java @@ -63,9 +63,10 @@ import org.eclipse.papyrus.extensionpoints.editors.utils.DirectEditorsUtil; import org.eclipse.papyrus.extensionpoints.editors.utils.IDirectEditorsIds;
import org.eclipse.papyrus.infra.emf.appearance.helper.AppearanceHelper;
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.editpolicies.PortLabelEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.IndirectPortLabelEditPolicy;
import org.eclipse.papyrus.uml.diagram.common.figure.node.ILabelFigure;
import org.eclipse.papyrus.uml.diagram.common.util.DiagramEditPartsUtil;
import org.eclipse.papyrus.uml.diagram.composite.edit.policies.UMLTextSelectionEditPolicy;
@@ -146,7 +147,7 @@ public class PortNameEditPart extends LabelEditPart implements ITextAwareEditPar super.createDefaultEditPolicies();
installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
- installEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY, new PortLabelEditPolicy());
+ installEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL, new IndirectPortLabelEditPolicy());
}
/**
@@ -349,7 +350,6 @@ public class PortNameEditPart extends LabelEditPart implements ITextAwareEditPar ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -436,9 +436,7 @@ public class PortNameEditPart extends LabelEditPart implements ITextAwareEditPar * @generated
*/
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
@@ -471,7 +469,6 @@ public class PortNameEditPart extends LabelEditPart implements ITextAwareEditPar return;
}
final Dialog finalDialog = dialog;
-
if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@@ -479,7 +476,6 @@ public class PortNameEditPart extends LabelEditPart implements ITextAwareEditPar @Override
protected void doExecute() {
configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
-
}
};
domain.getCommandStack().execute(command);
@@ -536,8 +532,17 @@ public class PortNameEditPart extends LabelEditPart implements ITextAwareEditPar 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) {
@@ -658,7 +663,6 @@ public class PortNameEditPart extends LabelEditPart implements ITextAwareEditPar if(checkDefaultEdition()) {
return IDirectEdition.DEFAULT_DIRECT_EDITOR;
}
-
// not a named element. no specific editor => do nothing
return IDirectEdition.NO_DIRECT_EDITION;
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/PrimitiveTypeEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/PrimitiveTypeEditPart.java index 258af0c2215..8505574dab7 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/PrimitiveTypeEditPart.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/PrimitiveTypeEditPart.java @@ -26,6 +26,7 @@ import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout; import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure;
import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IPapyrusNodeFigure;
import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.SelectableBorderedNodeFigure;
import org.eclipse.papyrus.uml.diagram.common.editparts.NamedElementEditPart;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy;
@@ -112,7 +113,6 @@ public class PrimitiveTypeEditPart extends NamedElementEditPart { **/
protected void handleNotificationEvent(Notification event) {
super.handleNotificationEvent(event);
-
}
/**
@@ -139,8 +139,6 @@ public class PrimitiveTypeEditPart extends NamedElementEditPart { ((PrimitiveTypeNameEditPart)childEditPart).setLabel(getPrimaryShape().getNameLabel());
return true;
}
-
-
return false;
}
@@ -199,7 +197,6 @@ public class PrimitiveTypeEditPart extends NamedElementEditPart { */
protected NodeFigure createNodeFigure() {
return new SelectableBorderedNodeFigure(createMainFigureWithSVG());
-
}
/**
@@ -249,8 +246,8 @@ public class PrimitiveTypeEditPart extends NamedElementEditPart { * @generated
*/
protected void setLineType(int style) {
- if(primaryShape instanceof NodeFigure) {
- ((NodeFigure)primaryShape).setLineStyle(style);
+ if(primaryShape instanceof IPapyrusNodeFigure) {
+ ((IPapyrusNodeFigure)primaryShape).setLineStyle(style);
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/PrimitiveTypeEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/PrimitiveTypeEditPartCN.java index d9f735fe8eb..707ccd0d8d3 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/PrimitiveTypeEditPartCN.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/PrimitiveTypeEditPartCN.java @@ -26,6 +26,7 @@ import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout; import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure;
import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IPapyrusNodeFigure;
import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.SelectableBorderedNodeFigure;
import org.eclipse.papyrus.uml.diagram.common.editparts.NamedElementEditPart;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy;
@@ -112,7 +113,6 @@ public class PrimitiveTypeEditPartCN extends NamedElementEditPart { **/
protected void handleNotificationEvent(Notification event) {
super.handleNotificationEvent(event);
-
}
/**
@@ -139,8 +139,6 @@ public class PrimitiveTypeEditPartCN extends NamedElementEditPart { ((PrimitiveTypeNameEditPartCN)childEditPart).setLabel(getPrimaryShape().getNameLabel());
return true;
}
-
-
return false;
}
@@ -199,7 +197,6 @@ public class PrimitiveTypeEditPartCN extends NamedElementEditPart { */
protected NodeFigure createNodeFigure() {
return new SelectableBorderedNodeFigure(createMainFigureWithSVG());
-
}
/**
@@ -249,8 +246,8 @@ public class PrimitiveTypeEditPartCN extends NamedElementEditPart { * @generated
*/
protected void setLineType(int style) {
- if(primaryShape instanceof NodeFigure) {
- ((NodeFigure)primaryShape).setLineStyle(style);
+ if(primaryShape instanceof IPapyrusNodeFigure) {
+ ((IPapyrusNodeFigure)primaryShape).setLineStyle(style);
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/PrimitiveTypeNameEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/PrimitiveTypeNameEditPart.java index 1f70a73dfcd..0bce46bdcb3 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/PrimitiveTypeNameEditPart.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/PrimitiveTypeNameEditPart.java @@ -64,6 +64,7 @@ import org.eclipse.papyrus.infra.emf.appearance.helper.VisualInformationPapyrusC import org.eclipse.papyrus.infra.gmfdiag.common.editpart.IControlParserForDirectEdit;
import org.eclipse.papyrus.infra.gmfdiag.common.editpart.PapyrusCompartmentEditPart;
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;
@@ -320,7 +321,6 @@ public class PrimitiveTypeNameEditPart extends PapyrusCompartmentEditPart implem ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -407,9 +407,7 @@ public class PrimitiveTypeNameEditPart extends PapyrusCompartmentEditPart implem * @generated
*/
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
@@ -442,7 +440,6 @@ public class PrimitiveTypeNameEditPart extends PapyrusCompartmentEditPart implem return;
}
final Dialog finalDialog = dialog;
-
if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@@ -450,7 +447,6 @@ public class PrimitiveTypeNameEditPart extends PapyrusCompartmentEditPart implem @Override
protected void doExecute() {
configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
-
}
};
domain.getCommandStack().execute(command);
@@ -507,8 +503,17 @@ public class PrimitiveTypeNameEditPart extends PapyrusCompartmentEditPart implem 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) {
@@ -629,7 +634,6 @@ public class PrimitiveTypeNameEditPart extends PapyrusCompartmentEditPart implem if(checkDefaultEdition()) {
return IDirectEdition.DEFAULT_DIRECT_EDITOR;
}
-
// not a named element. no specific editor => do nothing
return IDirectEdition.NO_DIRECT_EDITION;
}
@@ -796,7 +800,6 @@ public class PrimitiveTypeNameEditPart extends PapyrusCompartmentEditPart implem */
protected void addOwnerElementListeners() {
addListenerFilter(ADD_PARENT_MODEL, this, ((View)getParent().getModel())); //$NON-NLS-1$
-
}
/**
@@ -805,7 +808,6 @@ public class PrimitiveTypeNameEditPart extends PapyrusCompartmentEditPart implem public void deactivate() {
removeOwnerElementListeners();
super.deactivate();
-
}
/**
@@ -813,6 +815,5 @@ public class PrimitiveTypeNameEditPart extends PapyrusCompartmentEditPart implem */
protected void removeOwnerElementListeners() {
removeListenerFilter(ADD_PARENT_MODEL);
-
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/PrimitiveTypeNameEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/PrimitiveTypeNameEditPartCN.java index 299be10496f..bd12180cc12 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/PrimitiveTypeNameEditPartCN.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/PrimitiveTypeNameEditPartCN.java @@ -64,6 +64,7 @@ import org.eclipse.papyrus.infra.emf.appearance.helper.VisualInformationPapyrusC import org.eclipse.papyrus.infra.gmfdiag.common.editpart.IControlParserForDirectEdit;
import org.eclipse.papyrus.infra.gmfdiag.common.editpart.PapyrusCompartmentEditPart;
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;
@@ -320,7 +321,6 @@ public class PrimitiveTypeNameEditPartCN extends PapyrusCompartmentEditPart impl ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -407,9 +407,7 @@ public class PrimitiveTypeNameEditPartCN extends PapyrusCompartmentEditPart impl * @generated
*/
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
@@ -442,7 +440,6 @@ public class PrimitiveTypeNameEditPartCN extends PapyrusCompartmentEditPart impl return;
}
final Dialog finalDialog = dialog;
-
if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@@ -450,7 +447,6 @@ public class PrimitiveTypeNameEditPartCN extends PapyrusCompartmentEditPart impl @Override
protected void doExecute() {
configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
-
}
};
domain.getCommandStack().execute(command);
@@ -507,8 +503,17 @@ public class PrimitiveTypeNameEditPartCN extends PapyrusCompartmentEditPart impl 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) {
@@ -629,7 +634,6 @@ public class PrimitiveTypeNameEditPartCN extends PapyrusCompartmentEditPart impl if(checkDefaultEdition()) {
return IDirectEdition.DEFAULT_DIRECT_EDITOR;
}
-
// not a named element. no specific editor => do nothing
return IDirectEdition.NO_DIRECT_EDITION;
}
@@ -796,7 +800,6 @@ public class PrimitiveTypeNameEditPartCN extends PapyrusCompartmentEditPart impl */
protected void addOwnerElementListeners() {
addListenerFilter(ADD_PARENT_MODEL, this, ((View)getParent().getModel())); //$NON-NLS-1$
-
}
/**
@@ -805,7 +808,6 @@ public class PrimitiveTypeNameEditPartCN extends PapyrusCompartmentEditPart impl public void deactivate() {
removeOwnerElementListeners();
super.deactivate();
-
}
/**
@@ -813,6 +815,5 @@ public class PrimitiveTypeNameEditPartCN extends PapyrusCompartmentEditPart impl */
protected void removeOwnerElementListeners() {
removeListenerFilter(ADD_PARENT_MODEL);
-
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/PropertyEditPartCLN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/PropertyEditPartCLN.java index 1bcad4bb862..0475f0835d5 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/PropertyEditPartCLN.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/PropertyEditPartCLN.java @@ -69,6 +69,7 @@ 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.editpart.IControlParserForDirectEdit;
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;
@@ -339,7 +340,6 @@ public class PropertyEditPartCLN extends CompartmentEditPart implements ITextAwa ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -426,9 +426,7 @@ public class PropertyEditPartCLN extends CompartmentEditPart implements ITextAwa * @generated
*/
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
@@ -461,7 +459,6 @@ public class PropertyEditPartCLN extends CompartmentEditPart implements ITextAwa return;
}
final Dialog finalDialog = dialog;
-
if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@@ -469,7 +466,6 @@ public class PropertyEditPartCLN extends CompartmentEditPart implements ITextAwa @Override
protected void doExecute() {
configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
-
}
};
domain.getCommandStack().execute(command);
@@ -526,8 +522,17 @@ public class PropertyEditPartCLN extends CompartmentEditPart implements ITextAwa 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) {
@@ -648,7 +653,6 @@ public class PropertyEditPartCLN extends CompartmentEditPart implements ITextAwa if(checkDefaultEdition()) {
return IDirectEdition.DEFAULT_DIRECT_EDITOR;
}
-
// not a named element. no specific editor => do nothing
return IDirectEdition.NO_DIRECT_EDITION;
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/PropertyPartCompartmentEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/PropertyPartCompartmentEditPartCN.java index 53881fee40a..af29eee5e29 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/PropertyPartCompartmentEditPartCN.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/PropertyPartCompartmentEditPartCN.java @@ -90,7 +90,6 @@ public class PropertyPartCompartmentEditPartCN extends ShapeCompartmentEditPart * @generated
*/
public EditPart getTargetEditPart(Request request) {
-
return super.getTargetEditPart(request);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/PropertyPartEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/PropertyPartEditPartCN.java index 20b7a02d206..e439bfcd9f5 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/PropertyPartEditPartCN.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/PropertyPartEditPartCN.java @@ -30,11 +30,14 @@ import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout; import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure;
import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IPapyrusNodeFigure;
import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.SelectableBorderedNodeFigure;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.AffixedNodeAlignmentEditPolicy;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.BorderItemResizableEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.MaskManagedNodeEditPolicy;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.PapyrusCreationEditPolicy;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy;
@@ -98,6 +101,7 @@ public class PropertyPartEditPartCN extends CustomPropertyPartEditPartCN { installEditPolicy("REMOVE_ORPHAN_VIEW", new RemoveOrphanViewPolicy()); //$NON-NLS-1$
installEditPolicy(ShowHideRelatedContentsEditPolicy.SHOW_HIDE_RELATED_CONTENTS_POLICY, new ShowHideRelatedContentsEditPolicy());
installEditPolicy(ShowHideRelatedContentsEditPolicy.SHOW_HIDE_RELATED_CONTENTS_POLICY, new ShowHideRelatedContentsEditPolicy());
+ installEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY, new MaskManagedNodeEditPolicy());
// XXX need an SCR to runtime to have another abstract superclass that would let children add reasonable editpolicies
// removeEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CONNECTION_HANDLES_ROLE);
}
@@ -139,7 +143,6 @@ public class PropertyPartEditPartCN extends CustomPropertyPartEditPartCN { **/
protected void handleNotificationEvent(Notification event) {
super.handleNotificationEvent(event);
-
}
/**
@@ -166,25 +169,18 @@ public class PropertyPartEditPartCN extends CustomPropertyPartEditPartCN { ((PropertyPartNameEditPartCN)childEditPart).setLabel(getPrimaryShape().getNameLabel());
return true;
}
-
-
if(childEditPart instanceof PropertyPartCompartmentEditPartCN) {
IFigure pane = getPrimaryShape().getCompositeCompartmentFigure();
setupContentPane(pane); // FIXME each comparment should handle his content pane in his own way
pane.add(((PropertyPartCompartmentEditPartCN)childEditPart).getFigure());
return true;
}
-
-
-
//Papyrus Gencode :Affixed Port locator
if(childEditPart instanceof PortEditPart) {
IBorderItemLocator locator = new PortPositionLocator(getMainFigure(), PositionConstants.NONE);
getBorderedFigure().getBorderItemContainer().add(((PortEditPart)childEditPart).getFigure(), locator);
return true;
}
-
-
return false;
}
@@ -258,7 +254,6 @@ public class PropertyPartEditPartCN extends CustomPropertyPartEditPartCN { */
protected NodeFigure createMainFigure() {
return new SelectableBorderedNodeFigure(createMainFigureWithSVG());
-
}
/**
@@ -308,8 +303,8 @@ public class PropertyPartEditPartCN extends CustomPropertyPartEditPartCN { * @generated
*/
protected void setLineType(int style) {
- if(primaryShape instanceof NodeFigure) {
- ((NodeFigure)primaryShape).setLineStyle(style);
+ if(primaryShape instanceof IPapyrusNodeFigure) {
+ ((IPapyrusNodeFigure)primaryShape).setLineStyle(style);
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/PropertyPartNameEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/PropertyPartNameEditPartCN.java index 2ab618d0706..16e0a047120 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/PropertyPartNameEditPartCN.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/PropertyPartNameEditPartCN.java @@ -64,9 +64,10 @@ import org.eclipse.papyrus.infra.emf.appearance.helper.VisualInformationPapyrusC import org.eclipse.papyrus.infra.gmfdiag.common.editpart.IControlParserForDirectEdit;
import org.eclipse.papyrus.infra.gmfdiag.common.editpart.PapyrusCompartmentEditPart;
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.editpolicies.PropertyLabelEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.IndirectPropertyLabelEditPolicy;
import org.eclipse.papyrus.uml.diagram.common.figure.node.ILabelFigure;
import org.eclipse.papyrus.uml.diagram.common.util.DiagramEditPartsUtil;
import org.eclipse.papyrus.uml.diagram.composite.edit.policies.UMLTextSelectionEditPolicy;
@@ -142,7 +143,7 @@ public class PropertyPartNameEditPartCN extends PapyrusCompartmentEditPart imple installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new DefaultNodeLabelDragPolicy());
- installEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY, new PropertyLabelEditPolicy());
+ installEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL, new IndirectPropertyLabelEditPolicy());
}
/**
@@ -322,7 +323,6 @@ public class PropertyPartNameEditPartCN extends PapyrusCompartmentEditPart imple ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -409,9 +409,7 @@ public class PropertyPartNameEditPartCN extends PapyrusCompartmentEditPart imple * @generated
*/
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
@@ -444,7 +442,6 @@ public class PropertyPartNameEditPartCN extends PapyrusCompartmentEditPart imple return;
}
final Dialog finalDialog = dialog;
-
if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@@ -452,7 +449,6 @@ public class PropertyPartNameEditPartCN extends PapyrusCompartmentEditPart imple @Override
protected void doExecute() {
configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
-
}
};
domain.getCommandStack().execute(command);
@@ -509,8 +505,17 @@ public class PropertyPartNameEditPartCN extends PapyrusCompartmentEditPart imple 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) {
@@ -631,7 +636,6 @@ public class PropertyPartNameEditPartCN extends PapyrusCompartmentEditPart imple if(checkDefaultEdition()) {
return IDirectEdition.DEFAULT_DIRECT_EDITOR;
}
-
// not a named element. no specific editor => do nothing
return IDirectEdition.NO_DIRECT_EDITION;
}
@@ -798,7 +802,6 @@ public class PropertyPartNameEditPartCN extends PapyrusCompartmentEditPart imple */
protected void addOwnerElementListeners() {
addListenerFilter(ADD_PARENT_MODEL, this, ((View)getParent().getModel())); //$NON-NLS-1$
-
}
/**
@@ -807,7 +810,6 @@ public class PropertyPartNameEditPartCN extends PapyrusCompartmentEditPart imple public void deactivate() {
removeOwnerElementListeners();
super.deactivate();
-
}
/**
@@ -815,6 +817,5 @@ public class PropertyPartNameEditPartCN extends PapyrusCompartmentEditPart imple */
protected void removeOwnerElementListeners() {
removeListenerFilter(ADD_PARENT_MODEL);
-
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ProtocolStateMachineCompositeCompartmentEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ProtocolStateMachineCompositeCompartmentEditPart.java index 3088bff6400..4dedb563461 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ProtocolStateMachineCompositeCompartmentEditPart.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ProtocolStateMachineCompositeCompartmentEditPart.java @@ -88,7 +88,6 @@ public class ProtocolStateMachineCompositeCompartmentEditPart extends ShapeCompa * @generated
*/
public EditPart getTargetEditPart(Request request) {
-
return super.getTargetEditPart(request);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ProtocolStateMachineCompositeCompartmentEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ProtocolStateMachineCompositeCompartmentEditPartCN.java index 45dd9d65df1..9f4e8ea9b96 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ProtocolStateMachineCompositeCompartmentEditPartCN.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ProtocolStateMachineCompositeCompartmentEditPartCN.java @@ -88,7 +88,6 @@ public class ProtocolStateMachineCompositeCompartmentEditPartCN extends ShapeCom * @generated
*/
public EditPart getTargetEditPart(Request request) {
-
return super.getTargetEditPart(request);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ProtocolStateMachineCompositeEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ProtocolStateMachineCompositeEditPart.java index 08c0280dd48..57215c75d0a 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ProtocolStateMachineCompositeEditPart.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ProtocolStateMachineCompositeEditPart.java @@ -30,6 +30,7 @@ import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout; import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure;
import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IPapyrusNodeFigure;
import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.SelectableBorderedNodeFigure;
import org.eclipse.papyrus.uml.diagram.common.editparts.NamedElementEditPart;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.AffixedNodeAlignmentEditPolicy;
@@ -135,7 +136,6 @@ public class ProtocolStateMachineCompositeEditPart extends NamedElementEditPart **/
protected void handleNotificationEvent(Notification event) {
super.handleNotificationEvent(event);
-
}
/**
@@ -162,35 +162,24 @@ public class ProtocolStateMachineCompositeEditPart extends NamedElementEditPart ((ProtocolStateMachineCompositeNameEditPart)childEditPart).setLabel(getPrimaryShape().getNameLabel());
return true;
}
-
-
if(childEditPart instanceof ProtocolStateMachineCompositeCompartmentEditPart) {
IFigure pane = getPrimaryShape().getCompositeCompartmentFigure();
setupContentPane(pane); // FIXME each comparment should handle his content pane in his own way
pane.add(((ProtocolStateMachineCompositeCompartmentEditPart)childEditPart).getFigure());
return true;
}
-
-
-
//Papyrus Gencode :Affixed Port locator
if(childEditPart instanceof PortEditPart) {
IBorderItemLocator locator = new PortPositionLocator(getMainFigure(), PositionConstants.NONE);
getBorderedFigure().getBorderItemContainer().add(((PortEditPart)childEditPart).getFigure(), locator);
return true;
}
-
-
-
-
//Papyrus Gencode :Affixed Port locator
if(childEditPart instanceof ParameterEditPart) {
IBorderItemLocator locator = new PortPositionLocator(getMainFigure(), PositionConstants.NONE);
getBorderedFigure().getBorderItemContainer().add(((ParameterEditPart)childEditPart).getFigure(), locator);
return true;
}
-
-
return false;
}
@@ -268,7 +257,6 @@ public class ProtocolStateMachineCompositeEditPart extends NamedElementEditPart */
protected NodeFigure createMainFigure() {
return new SelectableBorderedNodeFigure(createMainFigureWithSVG());
-
}
/**
@@ -318,8 +306,8 @@ public class ProtocolStateMachineCompositeEditPart extends NamedElementEditPart * @generated
*/
protected void setLineType(int style) {
- if(primaryShape instanceof NodeFigure) {
- ((NodeFigure)primaryShape).setLineStyle(style);
+ if(primaryShape instanceof IPapyrusNodeFigure) {
+ ((IPapyrusNodeFigure)primaryShape).setLineStyle(style);
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ProtocolStateMachineCompositeEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ProtocolStateMachineCompositeEditPartCN.java index 587864e0ccc..d2995cd6af4 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ProtocolStateMachineCompositeEditPartCN.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ProtocolStateMachineCompositeEditPartCN.java @@ -30,6 +30,7 @@ import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout; import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure;
import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IPapyrusNodeFigure;
import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.SelectableBorderedNodeFigure;
import org.eclipse.papyrus.uml.diagram.common.editparts.NamedElementEditPart;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.AffixedNodeAlignmentEditPolicy;
@@ -135,7 +136,6 @@ public class ProtocolStateMachineCompositeEditPartCN extends NamedElementEditPar **/
protected void handleNotificationEvent(Notification event) {
super.handleNotificationEvent(event);
-
}
/**
@@ -162,35 +162,24 @@ public class ProtocolStateMachineCompositeEditPartCN extends NamedElementEditPar ((ProtocolStateMachineCompositeNameEditPartCN)childEditPart).setLabel(getPrimaryShape().getNameLabel());
return true;
}
-
-
if(childEditPart instanceof ProtocolStateMachineCompositeCompartmentEditPartCN) {
IFigure pane = getPrimaryShape().getCompositeCompartmentFigure();
setupContentPane(pane); // FIXME each comparment should handle his content pane in his own way
pane.add(((ProtocolStateMachineCompositeCompartmentEditPartCN)childEditPart).getFigure());
return true;
}
-
-
-
//Papyrus Gencode :Affixed Port locator
if(childEditPart instanceof PortEditPart) {
IBorderItemLocator locator = new PortPositionLocator(getMainFigure(), PositionConstants.NONE);
getBorderedFigure().getBorderItemContainer().add(((PortEditPart)childEditPart).getFigure(), locator);
return true;
}
-
-
-
-
//Papyrus Gencode :Affixed Port locator
if(childEditPart instanceof ParameterEditPart) {
IBorderItemLocator locator = new PortPositionLocator(getMainFigure(), PositionConstants.NONE);
getBorderedFigure().getBorderItemContainer().add(((ParameterEditPart)childEditPart).getFigure(), locator);
return true;
}
-
-
return false;
}
@@ -268,7 +257,6 @@ public class ProtocolStateMachineCompositeEditPartCN extends NamedElementEditPar */
protected NodeFigure createMainFigure() {
return new SelectableBorderedNodeFigure(createMainFigureWithSVG());
-
}
/**
@@ -318,8 +306,8 @@ public class ProtocolStateMachineCompositeEditPartCN extends NamedElementEditPar * @generated
*/
protected void setLineType(int style) {
- if(primaryShape instanceof NodeFigure) {
- ((NodeFigure)primaryShape).setLineStyle(style);
+ if(primaryShape instanceof IPapyrusNodeFigure) {
+ ((IPapyrusNodeFigure)primaryShape).setLineStyle(style);
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ProtocolStateMachineCompositeNameEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ProtocolStateMachineCompositeNameEditPart.java index 57e82fafc4a..88f65581661 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ProtocolStateMachineCompositeNameEditPart.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ProtocolStateMachineCompositeNameEditPart.java @@ -64,6 +64,7 @@ import org.eclipse.papyrus.infra.emf.appearance.helper.VisualInformationPapyrusC import org.eclipse.papyrus.infra.gmfdiag.common.editpart.IControlParserForDirectEdit;
import org.eclipse.papyrus.infra.gmfdiag.common.editpart.PapyrusCompartmentEditPart;
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;
@@ -320,7 +321,6 @@ public class ProtocolStateMachineCompositeNameEditPart extends PapyrusCompartmen ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -407,9 +407,7 @@ public class ProtocolStateMachineCompositeNameEditPart extends PapyrusCompartmen * @generated
*/
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
@@ -442,7 +440,6 @@ public class ProtocolStateMachineCompositeNameEditPart extends PapyrusCompartmen return;
}
final Dialog finalDialog = dialog;
-
if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@@ -450,7 +447,6 @@ public class ProtocolStateMachineCompositeNameEditPart extends PapyrusCompartmen @Override
protected void doExecute() {
configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
-
}
};
domain.getCommandStack().execute(command);
@@ -507,8 +503,17 @@ public class ProtocolStateMachineCompositeNameEditPart extends PapyrusCompartmen 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) {
@@ -629,7 +634,6 @@ public class ProtocolStateMachineCompositeNameEditPart extends PapyrusCompartmen if(checkDefaultEdition()) {
return IDirectEdition.DEFAULT_DIRECT_EDITOR;
}
-
// not a named element. no specific editor => do nothing
return IDirectEdition.NO_DIRECT_EDITION;
}
@@ -796,7 +800,6 @@ public class ProtocolStateMachineCompositeNameEditPart extends PapyrusCompartmen */
protected void addOwnerElementListeners() {
addListenerFilter(ADD_PARENT_MODEL, this, ((View)getParent().getModel())); //$NON-NLS-1$
-
}
/**
@@ -805,7 +808,6 @@ public class ProtocolStateMachineCompositeNameEditPart extends PapyrusCompartmen public void deactivate() {
removeOwnerElementListeners();
super.deactivate();
-
}
/**
@@ -813,6 +815,5 @@ public class ProtocolStateMachineCompositeNameEditPart extends PapyrusCompartmen */
protected void removeOwnerElementListeners() {
removeListenerFilter(ADD_PARENT_MODEL);
-
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ProtocolStateMachineCompositeNameEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ProtocolStateMachineCompositeNameEditPartCN.java index 7c63482a804..93ff509f555 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ProtocolStateMachineCompositeNameEditPartCN.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/ProtocolStateMachineCompositeNameEditPartCN.java @@ -64,6 +64,7 @@ import org.eclipse.papyrus.infra.emf.appearance.helper.VisualInformationPapyrusC import org.eclipse.papyrus.infra.gmfdiag.common.editpart.IControlParserForDirectEdit;
import org.eclipse.papyrus.infra.gmfdiag.common.editpart.PapyrusCompartmentEditPart;
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;
@@ -320,7 +321,6 @@ public class ProtocolStateMachineCompositeNameEditPartCN extends PapyrusCompartm ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -407,9 +407,7 @@ public class ProtocolStateMachineCompositeNameEditPartCN extends PapyrusCompartm * @generated
*/
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
@@ -442,7 +440,6 @@ public class ProtocolStateMachineCompositeNameEditPartCN extends PapyrusCompartm return;
}
final Dialog finalDialog = dialog;
-
if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@@ -450,7 +447,6 @@ public class ProtocolStateMachineCompositeNameEditPartCN extends PapyrusCompartm @Override
protected void doExecute() {
configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
-
}
};
domain.getCommandStack().execute(command);
@@ -507,8 +503,17 @@ public class ProtocolStateMachineCompositeNameEditPartCN extends PapyrusCompartm 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) {
@@ -629,7 +634,6 @@ public class ProtocolStateMachineCompositeNameEditPartCN extends PapyrusCompartm if(checkDefaultEdition()) {
return IDirectEdition.DEFAULT_DIRECT_EDITOR;
}
-
// not a named element. no specific editor => do nothing
return IDirectEdition.NO_DIRECT_EDITION;
}
@@ -796,7 +800,6 @@ public class ProtocolStateMachineCompositeNameEditPartCN extends PapyrusCompartm */
protected void addOwnerElementListeners() {
addListenerFilter(ADD_PARENT_MODEL, this, ((View)getParent().getModel())); //$NON-NLS-1$
-
}
/**
@@ -805,7 +808,6 @@ public class ProtocolStateMachineCompositeNameEditPartCN extends PapyrusCompartm public void deactivate() {
removeOwnerElementListeners();
super.deactivate();
-
}
/**
@@ -813,6 +815,5 @@ public class ProtocolStateMachineCompositeNameEditPartCN extends PapyrusCompartm */
protected void removeOwnerElementListeners() {
removeListenerFilter(ADD_PARENT_MODEL);
-
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/RealizationAppliedStereotypeEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/RealizationAppliedStereotypeEditPart.java index a181e6e30cd..55a39e64316 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/RealizationAppliedStereotypeEditPart.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/RealizationAppliedStereotypeEditPart.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 RealizationAppliedStereotypeEditPart extends PapyrusLabelEditPart i ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -406,9 +406,7 @@ public class RealizationAppliedStereotypeEditPart extends PapyrusLabelEditPart i * @generated
*/
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
@@ -441,7 +439,6 @@ public class RealizationAppliedStereotypeEditPart extends PapyrusLabelEditPart i 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 RealizationAppliedStereotypeEditPart extends PapyrusLabelEditPart i @Override
protected void doExecute() {
configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
-
}
};
domain.getCommandStack().execute(command);
@@ -506,8 +502,17 @@ public class RealizationAppliedStereotypeEditPart extends PapyrusLabelEditPart i 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 RealizationAppliedStereotypeEditPart extends PapyrusLabelEditPart i }
}
}
-
super.handleNotificationEvent(event);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/RealizationNameEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/RealizationNameEditPart.java index f8e4dbc00d8..aaaa9d22865 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/RealizationNameEditPart.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/RealizationNameEditPart.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 RealizationNameEditPart extends PapyrusLabelEditPart implements ITe ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -406,9 +406,7 @@ public class RealizationNameEditPart extends PapyrusLabelEditPart implements ITe * @generated
*/
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
@@ -441,7 +439,6 @@ public class RealizationNameEditPart extends PapyrusLabelEditPart implements ITe 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 RealizationNameEditPart extends PapyrusLabelEditPart implements ITe @Override
protected void doExecute() {
configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
-
}
};
domain.getCommandStack().execute(command);
@@ -506,8 +502,17 @@ public class RealizationNameEditPart extends PapyrusLabelEditPart implements ITe 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) {
@@ -628,7 +633,6 @@ public class RealizationNameEditPart extends PapyrusLabelEditPart implements ITe if(checkDefaultEdition()) {
return IDirectEdition.DEFAULT_DIRECT_EDITOR;
}
-
// not a named element. no specific editor => do nothing
return IDirectEdition.NO_DIRECT_EDITION;
}
@@ -746,7 +750,6 @@ public class RealizationNameEditPart extends PapyrusLabelEditPart implements ITe }
}
}
-
super.handleNotificationEvent(event);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/RepresentationTagLabelEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/RepresentationTagLabelEditPart.java index 6a7d5ef35c1..c5bd5975241 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/RepresentationTagLabelEditPart.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/RepresentationTagLabelEditPart.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;
@@ -320,7 +321,6 @@ public class RepresentationTagLabelEditPart extends PapyrusLabelEditPart impleme ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -407,9 +407,7 @@ public class RepresentationTagLabelEditPart extends PapyrusLabelEditPart impleme * @generated
*/
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
@@ -442,7 +440,6 @@ public class RepresentationTagLabelEditPart extends PapyrusLabelEditPart impleme return;
}
final Dialog finalDialog = dialog;
-
if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@@ -450,7 +447,6 @@ public class RepresentationTagLabelEditPart extends PapyrusLabelEditPart impleme @Override
protected void doExecute() {
configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
-
}
};
domain.getCommandStack().execute(command);
@@ -507,8 +503,17 @@ public class RepresentationTagLabelEditPart extends PapyrusLabelEditPart impleme 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) {
@@ -629,7 +634,6 @@ public class RepresentationTagLabelEditPart extends PapyrusLabelEditPart impleme if(checkDefaultEdition()) {
return IDirectEdition.DEFAULT_DIRECT_EDITOR;
}
-
// not a named element. no specific editor => do nothing
return IDirectEdition.NO_DIRECT_EDITION;
}
@@ -747,7 +751,6 @@ public class RepresentationTagLabelEditPart extends PapyrusLabelEditPart impleme }
}
}
-
super.handleNotificationEvent(event);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/RoleBindingAppliedStereotypeEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/RoleBindingAppliedStereotypeEditPart.java index 21325a07131..4759240316b 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/RoleBindingAppliedStereotypeEditPart.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/RoleBindingAppliedStereotypeEditPart.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 RoleBindingAppliedStereotypeEditPart extends PapyrusLabelEditPart i ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -406,9 +406,7 @@ public class RoleBindingAppliedStereotypeEditPart extends PapyrusLabelEditPart i * @generated
*/
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
@@ -441,7 +439,6 @@ public class RoleBindingAppliedStereotypeEditPart extends PapyrusLabelEditPart i 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 RoleBindingAppliedStereotypeEditPart extends PapyrusLabelEditPart i @Override
protected void doExecute() {
configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
-
}
};
domain.getCommandStack().execute(command);
@@ -506,8 +502,17 @@ public class RoleBindingAppliedStereotypeEditPart extends PapyrusLabelEditPart i 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 RoleBindingAppliedStereotypeEditPart extends PapyrusLabelEditPart i }
}
}
-
super.handleNotificationEvent(event);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/RoleBindingRoleNameEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/RoleBindingRoleNameEditPart.java index b5bda93b393..f1bc6f740b2 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/RoleBindingRoleNameEditPart.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/RoleBindingRoleNameEditPart.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 RoleBindingRoleNameEditPart extends PapyrusLabelEditPart implements ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -406,9 +406,7 @@ public class RoleBindingRoleNameEditPart extends PapyrusLabelEditPart implements * @generated
*/
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
@@ -441,7 +439,6 @@ public class RoleBindingRoleNameEditPart extends PapyrusLabelEditPart implements 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 RoleBindingRoleNameEditPart extends PapyrusLabelEditPart implements @Override
protected void doExecute() {
configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
-
}
};
domain.getCommandStack().execute(command);
@@ -506,8 +502,17 @@ public class RoleBindingRoleNameEditPart extends PapyrusLabelEditPart implements 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 RoleBindingRoleNameEditPart extends PapyrusLabelEditPart implements }
}
}
-
super.handleNotificationEvent(event);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/SignalEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/SignalEditPart.java index 8bcfe16ba65..c01bb0f8e43 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/SignalEditPart.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/SignalEditPart.java @@ -26,6 +26,7 @@ import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout; import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure;
import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IPapyrusNodeFigure;
import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.SelectableBorderedNodeFigure;
import org.eclipse.papyrus.uml.diagram.common.editparts.NamedElementEditPart;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy;
@@ -108,7 +109,6 @@ public class SignalEditPart extends NamedElementEditPart { **/
protected void handleNotificationEvent(Notification event) {
super.handleNotificationEvent(event);
-
}
/**
@@ -135,8 +135,6 @@ public class SignalEditPart extends NamedElementEditPart { ((SignalNameEditPart)childEditPart).setLabel(getPrimaryShape().getNameLabel());
return true;
}
-
-
return false;
}
@@ -195,7 +193,6 @@ public class SignalEditPart extends NamedElementEditPart { */
protected NodeFigure createNodeFigure() {
return new SelectableBorderedNodeFigure(createMainFigureWithSVG());
-
}
/**
@@ -245,8 +242,8 @@ public class SignalEditPart extends NamedElementEditPart { * @generated
*/
protected void setLineType(int style) {
- if(primaryShape instanceof NodeFigure) {
- ((NodeFigure)primaryShape).setLineStyle(style);
+ if(primaryShape instanceof IPapyrusNodeFigure) {
+ ((IPapyrusNodeFigure)primaryShape).setLineStyle(style);
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/SignalEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/SignalEditPartCN.java index fdde655c88e..d3368e9f1f1 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/SignalEditPartCN.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/SignalEditPartCN.java @@ -26,6 +26,7 @@ import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout; import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure;
import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IPapyrusNodeFigure;
import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.SelectableBorderedNodeFigure;
import org.eclipse.papyrus.uml.diagram.common.editparts.NamedElementEditPart;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy;
@@ -108,7 +109,6 @@ public class SignalEditPartCN extends NamedElementEditPart { **/
protected void handleNotificationEvent(Notification event) {
super.handleNotificationEvent(event);
-
}
/**
@@ -135,8 +135,6 @@ public class SignalEditPartCN extends NamedElementEditPart { ((SignalNameEditPartCN)childEditPart).setLabel(getPrimaryShape().getNameLabel());
return true;
}
-
-
return false;
}
@@ -195,7 +193,6 @@ public class SignalEditPartCN extends NamedElementEditPart { */
protected NodeFigure createNodeFigure() {
return new SelectableBorderedNodeFigure(createMainFigureWithSVG());
-
}
/**
@@ -245,8 +242,8 @@ public class SignalEditPartCN extends NamedElementEditPart { * @generated
*/
protected void setLineType(int style) {
- if(primaryShape instanceof NodeFigure) {
- ((NodeFigure)primaryShape).setLineStyle(style);
+ if(primaryShape instanceof IPapyrusNodeFigure) {
+ ((IPapyrusNodeFigure)primaryShape).setLineStyle(style);
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/SignalEventEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/SignalEventEditPart.java index 1efdb476f22..afb11b740cb 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/SignalEventEditPart.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/SignalEventEditPart.java @@ -26,6 +26,7 @@ import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure; import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
import org.eclipse.gmf.runtime.notation.View;
import org.eclipse.papyrus.infra.gmfdiag.common.editpart.NodeEditPart;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IPapyrusNodeFigure;
import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.SelectableBorderedNodeFigure;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy;
@@ -124,8 +125,6 @@ public class SignalEventEditPart extends NodeEditPart { ((SignalEventNameEditPart)childEditPart).setLabel(getPrimaryShape().getNameLabel());
return true;
}
-
-
return false;
}
@@ -184,7 +183,6 @@ public class SignalEventEditPart extends NodeEditPart { */
protected NodeFigure createNodeFigure() {
return new SelectableBorderedNodeFigure(createMainFigureWithSVG());
-
}
/**
@@ -234,8 +232,8 @@ public class SignalEventEditPart extends NodeEditPart { * @generated
*/
protected void setLineType(int style) {
- if(primaryShape instanceof NodeFigure) {
- ((NodeFigure)primaryShape).setLineStyle(style);
+ if(primaryShape instanceof IPapyrusNodeFigure) {
+ ((IPapyrusNodeFigure)primaryShape).setLineStyle(style);
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/SignalEventNameEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/SignalEventNameEditPart.java index f918a2d54f3..edafec341d0 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/SignalEventNameEditPart.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/SignalEventNameEditPart.java @@ -64,6 +64,7 @@ import org.eclipse.papyrus.infra.emf.appearance.helper.VisualInformationPapyrusC import org.eclipse.papyrus.infra.gmfdiag.common.editpart.IControlParserForDirectEdit;
import org.eclipse.papyrus.infra.gmfdiag.common.editpart.PapyrusCompartmentEditPart;
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;
@@ -320,7 +321,6 @@ public class SignalEventNameEditPart extends PapyrusCompartmentEditPart implemen ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -407,9 +407,7 @@ public class SignalEventNameEditPart extends PapyrusCompartmentEditPart implemen * @generated
*/
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
@@ -442,7 +440,6 @@ public class SignalEventNameEditPart extends PapyrusCompartmentEditPart implemen return;
}
final Dialog finalDialog = dialog;
-
if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@@ -450,7 +447,6 @@ public class SignalEventNameEditPart extends PapyrusCompartmentEditPart implemen @Override
protected void doExecute() {
configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
-
}
};
domain.getCommandStack().execute(command);
@@ -507,8 +503,17 @@ public class SignalEventNameEditPart extends PapyrusCompartmentEditPart implemen 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) {
@@ -629,7 +634,6 @@ public class SignalEventNameEditPart extends PapyrusCompartmentEditPart implemen if(checkDefaultEdition()) {
return IDirectEdition.DEFAULT_DIRECT_EDITOR;
}
-
// not a named element. no specific editor => do nothing
return IDirectEdition.NO_DIRECT_EDITION;
}
@@ -796,7 +800,6 @@ public class SignalEventNameEditPart extends PapyrusCompartmentEditPart implemen */
protected void addOwnerElementListeners() {
addListenerFilter(ADD_PARENT_MODEL, this, ((View)getParent().getModel())); //$NON-NLS-1$
-
}
/**
@@ -805,7 +808,6 @@ public class SignalEventNameEditPart extends PapyrusCompartmentEditPart implemen public void deactivate() {
removeOwnerElementListeners();
super.deactivate();
-
}
/**
@@ -813,6 +815,5 @@ public class SignalEventNameEditPart extends PapyrusCompartmentEditPart implemen */
protected void removeOwnerElementListeners() {
removeListenerFilter(ADD_PARENT_MODEL);
-
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/SignalNameEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/SignalNameEditPart.java index 525d4e9eb78..c7a485c5c48 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/SignalNameEditPart.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/SignalNameEditPart.java @@ -64,6 +64,7 @@ import org.eclipse.papyrus.infra.emf.appearance.helper.VisualInformationPapyrusC import org.eclipse.papyrus.infra.gmfdiag.common.editpart.IControlParserForDirectEdit;
import org.eclipse.papyrus.infra.gmfdiag.common.editpart.PapyrusCompartmentEditPart;
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;
@@ -320,7 +321,6 @@ public class SignalNameEditPart extends PapyrusCompartmentEditPart implements IT ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -407,9 +407,7 @@ public class SignalNameEditPart extends PapyrusCompartmentEditPart implements IT * @generated
*/
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
@@ -442,7 +440,6 @@ public class SignalNameEditPart extends PapyrusCompartmentEditPart implements IT return;
}
final Dialog finalDialog = dialog;
-
if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@@ -450,7 +447,6 @@ public class SignalNameEditPart extends PapyrusCompartmentEditPart implements IT @Override
protected void doExecute() {
configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
-
}
};
domain.getCommandStack().execute(command);
@@ -507,8 +503,17 @@ public class SignalNameEditPart extends PapyrusCompartmentEditPart implements IT 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) {
@@ -629,7 +634,6 @@ public class SignalNameEditPart extends PapyrusCompartmentEditPart implements IT if(checkDefaultEdition()) {
return IDirectEdition.DEFAULT_DIRECT_EDITOR;
}
-
// not a named element. no specific editor => do nothing
return IDirectEdition.NO_DIRECT_EDITION;
}
@@ -796,7 +800,6 @@ public class SignalNameEditPart extends PapyrusCompartmentEditPart implements IT */
protected void addOwnerElementListeners() {
addListenerFilter(ADD_PARENT_MODEL, this, ((View)getParent().getModel())); //$NON-NLS-1$
-
}
/**
@@ -805,7 +808,6 @@ public class SignalNameEditPart extends PapyrusCompartmentEditPart implements IT public void deactivate() {
removeOwnerElementListeners();
super.deactivate();
-
}
/**
@@ -813,6 +815,5 @@ public class SignalNameEditPart extends PapyrusCompartmentEditPart implements IT */
protected void removeOwnerElementListeners() {
removeListenerFilter(ADD_PARENT_MODEL);
-
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/SignalNameEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/SignalNameEditPartCN.java index b80eef2f0c7..5a27508ea42 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/SignalNameEditPartCN.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/SignalNameEditPartCN.java @@ -64,6 +64,7 @@ import org.eclipse.papyrus.infra.emf.appearance.helper.VisualInformationPapyrusC import org.eclipse.papyrus.infra.gmfdiag.common.editpart.IControlParserForDirectEdit;
import org.eclipse.papyrus.infra.gmfdiag.common.editpart.PapyrusCompartmentEditPart;
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;
@@ -320,7 +321,6 @@ public class SignalNameEditPartCN extends PapyrusCompartmentEditPart implements ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -407,9 +407,7 @@ public class SignalNameEditPartCN extends PapyrusCompartmentEditPart implements * @generated
*/
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
@@ -442,7 +440,6 @@ public class SignalNameEditPartCN extends PapyrusCompartmentEditPart implements return;
}
final Dialog finalDialog = dialog;
-
if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@@ -450,7 +447,6 @@ public class SignalNameEditPartCN extends PapyrusCompartmentEditPart implements @Override
protected void doExecute() {
configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
-
}
};
domain.getCommandStack().execute(command);
@@ -507,8 +503,17 @@ public class SignalNameEditPartCN extends PapyrusCompartmentEditPart implements 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) {
@@ -629,7 +634,6 @@ public class SignalNameEditPartCN extends PapyrusCompartmentEditPart implements if(checkDefaultEdition()) {
return IDirectEdition.DEFAULT_DIRECT_EDITOR;
}
-
// not a named element. no specific editor => do nothing
return IDirectEdition.NO_DIRECT_EDITION;
}
@@ -796,7 +800,6 @@ public class SignalNameEditPartCN extends PapyrusCompartmentEditPart implements */
protected void addOwnerElementListeners() {
addListenerFilter(ADD_PARENT_MODEL, this, ((View)getParent().getModel())); //$NON-NLS-1$
-
}
/**
@@ -805,7 +808,6 @@ public class SignalNameEditPartCN extends PapyrusCompartmentEditPart implements public void deactivate() {
removeOwnerElementListeners();
super.deactivate();
-
}
/**
@@ -813,6 +815,5 @@ public class SignalNameEditPartCN extends PapyrusCompartmentEditPart implements */
protected void removeOwnerElementListeners() {
removeListenerFilter(ADD_PARENT_MODEL);
-
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/StateMachineCompositeCompartmentEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/StateMachineCompositeCompartmentEditPart.java index 84c78fd3f62..ed28a09ad7b 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/StateMachineCompositeCompartmentEditPart.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/StateMachineCompositeCompartmentEditPart.java @@ -88,7 +88,6 @@ public class StateMachineCompositeCompartmentEditPart extends ShapeCompartmentEd * @generated
*/
public EditPart getTargetEditPart(Request request) {
-
return super.getTargetEditPart(request);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/StateMachineCompositeCompartmentEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/StateMachineCompositeCompartmentEditPartCN.java index d131ad03f6d..542e22d4a4c 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/StateMachineCompositeCompartmentEditPartCN.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/StateMachineCompositeCompartmentEditPartCN.java @@ -88,7 +88,6 @@ public class StateMachineCompositeCompartmentEditPartCN extends ShapeCompartment * @generated
*/
public EditPart getTargetEditPart(Request request) {
-
return super.getTargetEditPart(request);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/StateMachineCompositeEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/StateMachineCompositeEditPart.java index 7f2a0c64b86..4483b6e3e4a 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/StateMachineCompositeEditPart.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/StateMachineCompositeEditPart.java @@ -30,6 +30,7 @@ import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout; import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure;
import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IPapyrusNodeFigure;
import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.SelectableBorderedNodeFigure;
import org.eclipse.papyrus.uml.diagram.common.editparts.NamedElementEditPart;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.AffixedNodeAlignmentEditPolicy;
@@ -135,7 +136,6 @@ public class StateMachineCompositeEditPart extends NamedElementEditPart { **/
protected void handleNotificationEvent(Notification event) {
super.handleNotificationEvent(event);
-
}
/**
@@ -162,35 +162,24 @@ public class StateMachineCompositeEditPart extends NamedElementEditPart { ((StateMachineCompositeNameEditPart)childEditPart).setLabel(getPrimaryShape().getNameLabel());
return true;
}
-
-
if(childEditPart instanceof StateMachineCompositeCompartmentEditPart) {
IFigure pane = getPrimaryShape().getCompositeCompartmentFigure();
setupContentPane(pane); // FIXME each comparment should handle his content pane in his own way
pane.add(((StateMachineCompositeCompartmentEditPart)childEditPart).getFigure());
return true;
}
-
-
-
//Papyrus Gencode :Affixed Port locator
if(childEditPart instanceof PortEditPart) {
IBorderItemLocator locator = new PortPositionLocator(getMainFigure(), PositionConstants.NONE);
getBorderedFigure().getBorderItemContainer().add(((PortEditPart)childEditPart).getFigure(), locator);
return true;
}
-
-
-
-
//Papyrus Gencode :Affixed Port locator
if(childEditPart instanceof ParameterEditPart) {
IBorderItemLocator locator = new PortPositionLocator(getMainFigure(), PositionConstants.NONE);
getBorderedFigure().getBorderItemContainer().add(((ParameterEditPart)childEditPart).getFigure(), locator);
return true;
}
-
-
return false;
}
@@ -268,7 +257,6 @@ public class StateMachineCompositeEditPart extends NamedElementEditPart { */
protected NodeFigure createMainFigure() {
return new SelectableBorderedNodeFigure(createMainFigureWithSVG());
-
}
/**
@@ -318,8 +306,8 @@ public class StateMachineCompositeEditPart extends NamedElementEditPart { * @generated
*/
protected void setLineType(int style) {
- if(primaryShape instanceof NodeFigure) {
- ((NodeFigure)primaryShape).setLineStyle(style);
+ if(primaryShape instanceof IPapyrusNodeFigure) {
+ ((IPapyrusNodeFigure)primaryShape).setLineStyle(style);
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/StateMachineCompositeEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/StateMachineCompositeEditPartCN.java index 36504fcb40f..a034360e229 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/StateMachineCompositeEditPartCN.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/StateMachineCompositeEditPartCN.java @@ -30,6 +30,7 @@ import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout; import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure;
import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IPapyrusNodeFigure;
import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.SelectableBorderedNodeFigure;
import org.eclipse.papyrus.uml.diagram.common.editparts.NamedElementEditPart;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.AffixedNodeAlignmentEditPolicy;
@@ -135,7 +136,6 @@ public class StateMachineCompositeEditPartCN extends NamedElementEditPart { **/
protected void handleNotificationEvent(Notification event) {
super.handleNotificationEvent(event);
-
}
/**
@@ -162,35 +162,24 @@ public class StateMachineCompositeEditPartCN extends NamedElementEditPart { ((StateMachineCompositeNameEditPartCN)childEditPart).setLabel(getPrimaryShape().getNameLabel());
return true;
}
-
-
if(childEditPart instanceof StateMachineCompositeCompartmentEditPartCN) {
IFigure pane = getPrimaryShape().getCompositeCompartmentFigure();
setupContentPane(pane); // FIXME each comparment should handle his content pane in his own way
pane.add(((StateMachineCompositeCompartmentEditPartCN)childEditPart).getFigure());
return true;
}
-
-
-
//Papyrus Gencode :Affixed Port locator
if(childEditPart instanceof PortEditPart) {
IBorderItemLocator locator = new PortPositionLocator(getMainFigure(), PositionConstants.NONE);
getBorderedFigure().getBorderItemContainer().add(((PortEditPart)childEditPart).getFigure(), locator);
return true;
}
-
-
-
-
//Papyrus Gencode :Affixed Port locator
if(childEditPart instanceof ParameterEditPart) {
IBorderItemLocator locator = new PortPositionLocator(getMainFigure(), PositionConstants.NONE);
getBorderedFigure().getBorderItemContainer().add(((ParameterEditPart)childEditPart).getFigure(), locator);
return true;
}
-
-
return false;
}
@@ -268,7 +257,6 @@ public class StateMachineCompositeEditPartCN extends NamedElementEditPart { */
protected NodeFigure createMainFigure() {
return new SelectableBorderedNodeFigure(createMainFigureWithSVG());
-
}
/**
@@ -318,8 +306,8 @@ public class StateMachineCompositeEditPartCN extends NamedElementEditPart { * @generated
*/
protected void setLineType(int style) {
- if(primaryShape instanceof NodeFigure) {
- ((NodeFigure)primaryShape).setLineStyle(style);
+ if(primaryShape instanceof IPapyrusNodeFigure) {
+ ((IPapyrusNodeFigure)primaryShape).setLineStyle(style);
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/StateMachineCompositeNameEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/StateMachineCompositeNameEditPart.java index 2caec83b22b..6b7b4dc7f02 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/StateMachineCompositeNameEditPart.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/StateMachineCompositeNameEditPart.java @@ -64,6 +64,7 @@ import org.eclipse.papyrus.infra.emf.appearance.helper.VisualInformationPapyrusC import org.eclipse.papyrus.infra.gmfdiag.common.editpart.IControlParserForDirectEdit;
import org.eclipse.papyrus.infra.gmfdiag.common.editpart.PapyrusCompartmentEditPart;
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;
@@ -320,7 +321,6 @@ public class StateMachineCompositeNameEditPart extends PapyrusCompartmentEditPar ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -407,9 +407,7 @@ public class StateMachineCompositeNameEditPart extends PapyrusCompartmentEditPar * @generated
*/
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
@@ -442,7 +440,6 @@ public class StateMachineCompositeNameEditPart extends PapyrusCompartmentEditPar return;
}
final Dialog finalDialog = dialog;
-
if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@@ -450,7 +447,6 @@ public class StateMachineCompositeNameEditPart extends PapyrusCompartmentEditPar @Override
protected void doExecute() {
configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
-
}
};
domain.getCommandStack().execute(command);
@@ -507,8 +503,17 @@ public class StateMachineCompositeNameEditPart extends PapyrusCompartmentEditPar 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) {
@@ -629,7 +634,6 @@ public class StateMachineCompositeNameEditPart extends PapyrusCompartmentEditPar if(checkDefaultEdition()) {
return IDirectEdition.DEFAULT_DIRECT_EDITOR;
}
-
// not a named element. no specific editor => do nothing
return IDirectEdition.NO_DIRECT_EDITION;
}
@@ -796,7 +800,6 @@ public class StateMachineCompositeNameEditPart extends PapyrusCompartmentEditPar */
protected void addOwnerElementListeners() {
addListenerFilter(ADD_PARENT_MODEL, this, ((View)getParent().getModel())); //$NON-NLS-1$
-
}
/**
@@ -805,7 +808,6 @@ public class StateMachineCompositeNameEditPart extends PapyrusCompartmentEditPar public void deactivate() {
removeOwnerElementListeners();
super.deactivate();
-
}
/**
@@ -813,6 +815,5 @@ public class StateMachineCompositeNameEditPart extends PapyrusCompartmentEditPar */
protected void removeOwnerElementListeners() {
removeListenerFilter(ADD_PARENT_MODEL);
-
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/StateMachineCompositeNameEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/StateMachineCompositeNameEditPartCN.java index 72e5aa43e39..f443b003573 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/StateMachineCompositeNameEditPartCN.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/StateMachineCompositeNameEditPartCN.java @@ -64,6 +64,7 @@ import org.eclipse.papyrus.infra.emf.appearance.helper.VisualInformationPapyrusC import org.eclipse.papyrus.infra.gmfdiag.common.editpart.IControlParserForDirectEdit;
import org.eclipse.papyrus.infra.gmfdiag.common.editpart.PapyrusCompartmentEditPart;
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;
@@ -320,7 +321,6 @@ public class StateMachineCompositeNameEditPartCN extends PapyrusCompartmentEditP ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -407,9 +407,7 @@ public class StateMachineCompositeNameEditPartCN extends PapyrusCompartmentEditP * @generated
*/
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
@@ -442,7 +440,6 @@ public class StateMachineCompositeNameEditPartCN extends PapyrusCompartmentEditP return;
}
final Dialog finalDialog = dialog;
-
if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@@ -450,7 +447,6 @@ public class StateMachineCompositeNameEditPartCN extends PapyrusCompartmentEditP @Override
protected void doExecute() {
configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
-
}
};
domain.getCommandStack().execute(command);
@@ -507,8 +503,17 @@ public class StateMachineCompositeNameEditPartCN extends PapyrusCompartmentEditP 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) {
@@ -629,7 +634,6 @@ public class StateMachineCompositeNameEditPartCN extends PapyrusCompartmentEditP if(checkDefaultEdition()) {
return IDirectEdition.DEFAULT_DIRECT_EDITOR;
}
-
// not a named element. no specific editor => do nothing
return IDirectEdition.NO_DIRECT_EDITION;
}
@@ -796,7 +800,6 @@ public class StateMachineCompositeNameEditPartCN extends PapyrusCompartmentEditP */
protected void addOwnerElementListeners() {
addListenerFilter(ADD_PARENT_MODEL, this, ((View)getParent().getModel())); //$NON-NLS-1$
-
}
/**
@@ -805,7 +808,6 @@ public class StateMachineCompositeNameEditPartCN extends PapyrusCompartmentEditP public void deactivate() {
removeOwnerElementListeners();
super.deactivate();
-
}
/**
@@ -813,6 +815,5 @@ public class StateMachineCompositeNameEditPartCN extends PapyrusCompartmentEditP */
protected void removeOwnerElementListeners() {
removeListenerFilter(ADD_PARENT_MODEL);
-
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/StringExpressionEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/StringExpressionEditPart.java index 6b603f98771..d7a4fb7ac56 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/StringExpressionEditPart.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/StringExpressionEditPart.java @@ -26,6 +26,7 @@ import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure; import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
import org.eclipse.gmf.runtime.notation.View;
import org.eclipse.papyrus.infra.gmfdiag.common.editpart.NodeEditPart;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IPapyrusNodeFigure;
import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.SelectableBorderedNodeFigure;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy;
@@ -124,8 +125,6 @@ public class StringExpressionEditPart extends NodeEditPart { ((StringExpressionNameEditPart)childEditPart).setLabel(getPrimaryShape().getNameLabel());
return true;
}
-
-
return false;
}
@@ -184,7 +183,6 @@ public class StringExpressionEditPart extends NodeEditPart { */
protected NodeFigure createNodeFigure() {
return new SelectableBorderedNodeFigure(createMainFigureWithSVG());
-
}
/**
@@ -234,8 +232,8 @@ public class StringExpressionEditPart extends NodeEditPart { * @generated
*/
protected void setLineType(int style) {
- if(primaryShape instanceof NodeFigure) {
- ((NodeFigure)primaryShape).setLineStyle(style);
+ if(primaryShape instanceof IPapyrusNodeFigure) {
+ ((IPapyrusNodeFigure)primaryShape).setLineStyle(style);
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/StringExpressionNameEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/StringExpressionNameEditPart.java index 10f3fc73f73..3199cd56d64 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/StringExpressionNameEditPart.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/StringExpressionNameEditPart.java @@ -64,6 +64,7 @@ import org.eclipse.papyrus.infra.emf.appearance.helper.VisualInformationPapyrusC import org.eclipse.papyrus.infra.gmfdiag.common.editpart.IControlParserForDirectEdit;
import org.eclipse.papyrus.infra.gmfdiag.common.editpart.PapyrusCompartmentEditPart;
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;
@@ -320,7 +321,6 @@ public class StringExpressionNameEditPart extends PapyrusCompartmentEditPart imp ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -407,9 +407,7 @@ public class StringExpressionNameEditPart extends PapyrusCompartmentEditPart imp * @generated
*/
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
@@ -442,7 +440,6 @@ public class StringExpressionNameEditPart extends PapyrusCompartmentEditPart imp return;
}
final Dialog finalDialog = dialog;
-
if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@@ -450,7 +447,6 @@ public class StringExpressionNameEditPart extends PapyrusCompartmentEditPart imp @Override
protected void doExecute() {
configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
-
}
};
domain.getCommandStack().execute(command);
@@ -507,8 +503,17 @@ public class StringExpressionNameEditPart extends PapyrusCompartmentEditPart imp 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) {
@@ -629,7 +634,6 @@ public class StringExpressionNameEditPart extends PapyrusCompartmentEditPart imp if(checkDefaultEdition()) {
return IDirectEdition.DEFAULT_DIRECT_EDITOR;
}
-
// not a named element. no specific editor => do nothing
return IDirectEdition.NO_DIRECT_EDITION;
}
@@ -796,7 +800,6 @@ public class StringExpressionNameEditPart extends PapyrusCompartmentEditPart imp */
protected void addOwnerElementListeners() {
addListenerFilter(ADD_PARENT_MODEL, this, ((View)getParent().getModel())); //$NON-NLS-1$
-
}
/**
@@ -805,7 +808,6 @@ public class StringExpressionNameEditPart extends PapyrusCompartmentEditPart imp public void deactivate() {
removeOwnerElementListeners();
super.deactivate();
-
}
/**
@@ -813,6 +815,5 @@ public class StringExpressionNameEditPart extends PapyrusCompartmentEditPart imp */
protected void removeOwnerElementListeners() {
removeListenerFilter(ADD_PARENT_MODEL);
-
}
}
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);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/SubstitutionNameEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/SubstitutionNameEditPart.java index 723c99d9e36..0ec609a1f40 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/SubstitutionNameEditPart.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/SubstitutionNameEditPart.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 SubstitutionNameEditPart extends PapyrusLabelEditPart implements IT ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -406,9 +406,7 @@ public class SubstitutionNameEditPart extends PapyrusLabelEditPart implements IT * @generated
*/
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
@@ -441,7 +439,6 @@ public class SubstitutionNameEditPart extends PapyrusLabelEditPart implements IT 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 SubstitutionNameEditPart extends PapyrusLabelEditPart implements IT @Override
protected void doExecute() {
configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
-
}
};
domain.getCommandStack().execute(command);
@@ -506,8 +502,17 @@ public class SubstitutionNameEditPart extends PapyrusLabelEditPart implements IT 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) {
@@ -628,7 +633,6 @@ public class SubstitutionNameEditPart extends PapyrusLabelEditPart implements IT if(checkDefaultEdition()) {
return IDirectEdition.DEFAULT_DIRECT_EDITOR;
}
-
// not a named element. no specific editor => do nothing
return IDirectEdition.NO_DIRECT_EDITION;
}
@@ -746,7 +750,6 @@ public class SubstitutionNameEditPart extends PapyrusLabelEditPart implements IT }
}
}
-
super.handleNotificationEvent(event);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/TimeConstraintEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/TimeConstraintEditPart.java index 4c6ffa9f106..c25db3ea265 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/TimeConstraintEditPart.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/TimeConstraintEditPart.java @@ -26,6 +26,7 @@ import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout; import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure;
import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IPapyrusNodeFigure;
import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.SelectableBorderedNodeFigure;
import org.eclipse.papyrus.uml.diagram.common.editparts.AbstractConstraintEditPart;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy;
@@ -106,7 +107,6 @@ public class TimeConstraintEditPart extends AbstractConstraintEditPart { **/
protected void handleNotificationEvent(Notification event) {
super.handleNotificationEvent(event);
-
}
/**
@@ -137,8 +137,6 @@ public class TimeConstraintEditPart extends AbstractConstraintEditPart { ((TimeConstraintSpecificationEditPart)childEditPart).setLabel(getPrimaryShape().getConstraintFigure());
return true;
}
-
-
return false;
}
@@ -200,7 +198,6 @@ public class TimeConstraintEditPart extends AbstractConstraintEditPart { */
protected NodeFigure createNodeFigure() {
return new SelectableBorderedNodeFigure(createMainFigureWithSVG());
-
}
/**
@@ -250,8 +247,8 @@ public class TimeConstraintEditPart extends AbstractConstraintEditPart { * @generated
*/
protected void setLineType(int style) {
- if(primaryShape instanceof NodeFigure) {
- ((NodeFigure)primaryShape).setLineStyle(style);
+ if(primaryShape instanceof IPapyrusNodeFigure) {
+ ((IPapyrusNodeFigure)primaryShape).setLineStyle(style);
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/TimeConstraintEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/TimeConstraintEditPartCN.java index 9dd87cd1495..c802bfd3128 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/TimeConstraintEditPartCN.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/TimeConstraintEditPartCN.java @@ -26,6 +26,7 @@ import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout; import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure;
import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IPapyrusNodeFigure;
import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.SelectableBorderedNodeFigure;
import org.eclipse.papyrus.uml.diagram.common.editparts.AbstractConstraintEditPart;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy;
@@ -106,7 +107,6 @@ public class TimeConstraintEditPartCN extends AbstractConstraintEditPart { **/
protected void handleNotificationEvent(Notification event) {
super.handleNotificationEvent(event);
-
}
/**
@@ -137,8 +137,6 @@ public class TimeConstraintEditPartCN extends AbstractConstraintEditPart { ((TimeConstraintSpecificationEditPartCN)childEditPart).setLabel(getPrimaryShape().getConstraintFigure());
return true;
}
-
-
return false;
}
@@ -200,7 +198,6 @@ public class TimeConstraintEditPartCN extends AbstractConstraintEditPart { */
protected NodeFigure createNodeFigure() {
return new SelectableBorderedNodeFigure(createMainFigureWithSVG());
-
}
/**
@@ -250,8 +247,8 @@ public class TimeConstraintEditPartCN extends AbstractConstraintEditPart { * @generated
*/
protected void setLineType(int style) {
- if(primaryShape instanceof NodeFigure) {
- ((NodeFigure)primaryShape).setLineStyle(style);
+ if(primaryShape instanceof IPapyrusNodeFigure) {
+ ((IPapyrusNodeFigure)primaryShape).setLineStyle(style);
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/TimeConstraintNameEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/TimeConstraintNameEditPart.java index 5a8b05aeb51..1b052978d49 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/TimeConstraintNameEditPart.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/TimeConstraintNameEditPart.java @@ -64,6 +64,7 @@ import org.eclipse.papyrus.infra.emf.appearance.helper.VisualInformationPapyrusC import org.eclipse.papyrus.infra.gmfdiag.common.editpart.IControlParserForDirectEdit;
import org.eclipse.papyrus.infra.gmfdiag.common.editpart.PapyrusCompartmentEditPart;
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;
@@ -320,7 +321,6 @@ public class TimeConstraintNameEditPart extends PapyrusCompartmentEditPart imple ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -407,9 +407,7 @@ public class TimeConstraintNameEditPart extends PapyrusCompartmentEditPart imple * @generated
*/
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
@@ -442,7 +440,6 @@ public class TimeConstraintNameEditPart extends PapyrusCompartmentEditPart imple return;
}
final Dialog finalDialog = dialog;
-
if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@@ -450,7 +447,6 @@ public class TimeConstraintNameEditPart extends PapyrusCompartmentEditPart imple @Override
protected void doExecute() {
configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
-
}
};
domain.getCommandStack().execute(command);
@@ -507,8 +503,17 @@ public class TimeConstraintNameEditPart extends PapyrusCompartmentEditPart imple 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) {
@@ -629,7 +634,6 @@ public class TimeConstraintNameEditPart extends PapyrusCompartmentEditPart imple if(checkDefaultEdition()) {
return IDirectEdition.DEFAULT_DIRECT_EDITOR;
}
-
// not a named element. no specific editor => do nothing
return IDirectEdition.NO_DIRECT_EDITION;
}
@@ -796,7 +800,6 @@ public class TimeConstraintNameEditPart extends PapyrusCompartmentEditPart imple */
protected void addOwnerElementListeners() {
addListenerFilter(ADD_PARENT_MODEL, this, ((View)getParent().getModel())); //$NON-NLS-1$
-
}
/**
@@ -805,7 +808,6 @@ public class TimeConstraintNameEditPart extends PapyrusCompartmentEditPart imple public void deactivate() {
removeOwnerElementListeners();
super.deactivate();
-
}
/**
@@ -813,6 +815,5 @@ public class TimeConstraintNameEditPart extends PapyrusCompartmentEditPart imple */
protected void removeOwnerElementListeners() {
removeListenerFilter(ADD_PARENT_MODEL);
-
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/TimeConstraintNameEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/TimeConstraintNameEditPartCN.java index 63fbafce985..2276ebeb094 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/TimeConstraintNameEditPartCN.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/TimeConstraintNameEditPartCN.java @@ -64,6 +64,7 @@ import org.eclipse.papyrus.infra.emf.appearance.helper.VisualInformationPapyrusC import org.eclipse.papyrus.infra.gmfdiag.common.editpart.IControlParserForDirectEdit;
import org.eclipse.papyrus.infra.gmfdiag.common.editpart.PapyrusCompartmentEditPart;
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;
@@ -320,7 +321,6 @@ public class TimeConstraintNameEditPartCN extends PapyrusCompartmentEditPart imp ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -407,9 +407,7 @@ public class TimeConstraintNameEditPartCN extends PapyrusCompartmentEditPart imp * @generated
*/
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
@@ -442,7 +440,6 @@ public class TimeConstraintNameEditPartCN extends PapyrusCompartmentEditPart imp return;
}
final Dialog finalDialog = dialog;
-
if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@@ -450,7 +447,6 @@ public class TimeConstraintNameEditPartCN extends PapyrusCompartmentEditPart imp @Override
protected void doExecute() {
configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
-
}
};
domain.getCommandStack().execute(command);
@@ -507,8 +503,17 @@ public class TimeConstraintNameEditPartCN extends PapyrusCompartmentEditPart imp 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) {
@@ -629,7 +634,6 @@ public class TimeConstraintNameEditPartCN extends PapyrusCompartmentEditPart imp if(checkDefaultEdition()) {
return IDirectEdition.DEFAULT_DIRECT_EDITOR;
}
-
// not a named element. no specific editor => do nothing
return IDirectEdition.NO_DIRECT_EDITION;
}
@@ -796,7 +800,6 @@ public class TimeConstraintNameEditPartCN extends PapyrusCompartmentEditPart imp */
protected void addOwnerElementListeners() {
addListenerFilter(ADD_PARENT_MODEL, this, ((View)getParent().getModel())); //$NON-NLS-1$
-
}
/**
@@ -805,7 +808,6 @@ public class TimeConstraintNameEditPartCN extends PapyrusCompartmentEditPart imp public void deactivate() {
removeOwnerElementListeners();
super.deactivate();
-
}
/**
@@ -813,6 +815,5 @@ public class TimeConstraintNameEditPartCN extends PapyrusCompartmentEditPart imp */
protected void removeOwnerElementListeners() {
removeListenerFilter(ADD_PARENT_MODEL);
-
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/TimeConstraintSpecificationEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/TimeConstraintSpecificationEditPart.java index 10510f23592..05a049b997d 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/TimeConstraintSpecificationEditPart.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/TimeConstraintSpecificationEditPart.java @@ -61,6 +61,7 @@ import org.eclipse.papyrus.extensionpoints.editors.utils.IDirectEditorsIds; import org.eclipse.papyrus.infra.gmfdiag.common.editpart.IControlParserForDirectEdit;
import org.eclipse.papyrus.infra.gmfdiag.common.editpart.PapyrusCompartmentEditPart;
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;
@@ -306,7 +307,6 @@ public class TimeConstraintSpecificationEditPart extends PapyrusCompartmentEditP ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -393,9 +393,7 @@ public class TimeConstraintSpecificationEditPart extends PapyrusCompartmentEditP * @generated
*/
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
@@ -428,7 +426,6 @@ public class TimeConstraintSpecificationEditPart extends PapyrusCompartmentEditP return;
}
final Dialog finalDialog = dialog;
-
if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@@ -436,7 +433,6 @@ public class TimeConstraintSpecificationEditPart extends PapyrusCompartmentEditP @Override
protected void doExecute() {
configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
-
}
};
domain.getCommandStack().execute(command);
@@ -493,8 +489,17 @@ public class TimeConstraintSpecificationEditPart extends PapyrusCompartmentEditP 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) {
@@ -615,7 +620,6 @@ public class TimeConstraintSpecificationEditPart extends PapyrusCompartmentEditP if(checkDefaultEdition()) {
return IDirectEdition.DEFAULT_DIRECT_EDITOR;
}
-
// not a named element. no specific editor => do nothing
return IDirectEdition.NO_DIRECT_EDITION;
}
@@ -779,7 +783,6 @@ public class TimeConstraintSpecificationEditPart extends PapyrusCompartmentEditP */
protected void addOwnerElementListeners() {
addListenerFilter(ADD_PARENT_MODEL, this, ((View)getParent().getModel())); //$NON-NLS-1$
-
}
/**
@@ -788,7 +791,6 @@ public class TimeConstraintSpecificationEditPart extends PapyrusCompartmentEditP public void deactivate() {
removeOwnerElementListeners();
super.deactivate();
-
}
/**
@@ -796,6 +798,5 @@ public class TimeConstraintSpecificationEditPart extends PapyrusCompartmentEditP */
protected void removeOwnerElementListeners() {
removeListenerFilter(ADD_PARENT_MODEL);
-
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/TimeConstraintSpecificationEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/TimeConstraintSpecificationEditPartCN.java index d182d38c235..c174b4f047b 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/TimeConstraintSpecificationEditPartCN.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/TimeConstraintSpecificationEditPartCN.java @@ -61,6 +61,7 @@ import org.eclipse.papyrus.extensionpoints.editors.utils.IDirectEditorsIds; import org.eclipse.papyrus.infra.gmfdiag.common.editpart.IControlParserForDirectEdit;
import org.eclipse.papyrus.infra.gmfdiag.common.editpart.PapyrusCompartmentEditPart;
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;
@@ -306,7 +307,6 @@ public class TimeConstraintSpecificationEditPartCN extends PapyrusCompartmentEdi ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -393,9 +393,7 @@ public class TimeConstraintSpecificationEditPartCN extends PapyrusCompartmentEdi * @generated
*/
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
@@ -428,7 +426,6 @@ public class TimeConstraintSpecificationEditPartCN extends PapyrusCompartmentEdi return;
}
final Dialog finalDialog = dialog;
-
if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@@ -436,7 +433,6 @@ public class TimeConstraintSpecificationEditPartCN extends PapyrusCompartmentEdi @Override
protected void doExecute() {
configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
-
}
};
domain.getCommandStack().execute(command);
@@ -493,8 +489,17 @@ public class TimeConstraintSpecificationEditPartCN extends PapyrusCompartmentEdi 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) {
@@ -615,7 +620,6 @@ public class TimeConstraintSpecificationEditPartCN extends PapyrusCompartmentEdi if(checkDefaultEdition()) {
return IDirectEdition.DEFAULT_DIRECT_EDITOR;
}
-
// not a named element. no specific editor => do nothing
return IDirectEdition.NO_DIRECT_EDITION;
}
@@ -779,7 +783,6 @@ public class TimeConstraintSpecificationEditPartCN extends PapyrusCompartmentEdi */
protected void addOwnerElementListeners() {
addListenerFilter(ADD_PARENT_MODEL, this, ((View)getParent().getModel())); //$NON-NLS-1$
-
}
/**
@@ -788,7 +791,6 @@ public class TimeConstraintSpecificationEditPartCN extends PapyrusCompartmentEdi public void deactivate() {
removeOwnerElementListeners();
super.deactivate();
-
}
/**
@@ -796,6 +798,5 @@ public class TimeConstraintSpecificationEditPartCN extends PapyrusCompartmentEdi */
protected void removeOwnerElementListeners() {
removeListenerFilter(ADD_PARENT_MODEL);
-
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/TimeEventEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/TimeEventEditPart.java index 661b53b92fe..9b0cae36f5a 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/TimeEventEditPart.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/TimeEventEditPart.java @@ -26,6 +26,7 @@ import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure; import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
import org.eclipse.gmf.runtime.notation.View;
import org.eclipse.papyrus.infra.gmfdiag.common.editpart.NodeEditPart;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IPapyrusNodeFigure;
import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.SelectableBorderedNodeFigure;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy;
@@ -124,8 +125,6 @@ public class TimeEventEditPart extends NodeEditPart { ((TimeEventNameEditPart)childEditPart).setLabel(getPrimaryShape().getNameLabel());
return true;
}
-
-
return false;
}
@@ -184,7 +183,6 @@ public class TimeEventEditPart extends NodeEditPart { */
protected NodeFigure createNodeFigure() {
return new SelectableBorderedNodeFigure(createMainFigureWithSVG());
-
}
/**
@@ -234,8 +232,8 @@ public class TimeEventEditPart extends NodeEditPart { * @generated
*/
protected void setLineType(int style) {
- if(primaryShape instanceof NodeFigure) {
- ((NodeFigure)primaryShape).setLineStyle(style);
+ if(primaryShape instanceof IPapyrusNodeFigure) {
+ ((IPapyrusNodeFigure)primaryShape).setLineStyle(style);
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/TimeEventNameEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/TimeEventNameEditPart.java index f1cb00b46a9..75333925712 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/TimeEventNameEditPart.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/TimeEventNameEditPart.java @@ -64,6 +64,7 @@ import org.eclipse.papyrus.infra.emf.appearance.helper.VisualInformationPapyrusC import org.eclipse.papyrus.infra.gmfdiag.common.editpart.IControlParserForDirectEdit;
import org.eclipse.papyrus.infra.gmfdiag.common.editpart.PapyrusCompartmentEditPart;
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;
@@ -320,7 +321,6 @@ public class TimeEventNameEditPart extends PapyrusCompartmentEditPart implements ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -407,9 +407,7 @@ public class TimeEventNameEditPart extends PapyrusCompartmentEditPart implements * @generated
*/
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
@@ -442,7 +440,6 @@ public class TimeEventNameEditPart extends PapyrusCompartmentEditPart implements return;
}
final Dialog finalDialog = dialog;
-
if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@@ -450,7 +447,6 @@ public class TimeEventNameEditPart extends PapyrusCompartmentEditPart implements @Override
protected void doExecute() {
configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
-
}
};
domain.getCommandStack().execute(command);
@@ -507,8 +503,17 @@ public class TimeEventNameEditPart extends PapyrusCompartmentEditPart implements 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) {
@@ -629,7 +634,6 @@ public class TimeEventNameEditPart extends PapyrusCompartmentEditPart implements if(checkDefaultEdition()) {
return IDirectEdition.DEFAULT_DIRECT_EDITOR;
}
-
// not a named element. no specific editor => do nothing
return IDirectEdition.NO_DIRECT_EDITION;
}
@@ -796,7 +800,6 @@ public class TimeEventNameEditPart extends PapyrusCompartmentEditPart implements */
protected void addOwnerElementListeners() {
addListenerFilter(ADD_PARENT_MODEL, this, ((View)getParent().getModel())); //$NON-NLS-1$
-
}
/**
@@ -805,7 +808,6 @@ public class TimeEventNameEditPart extends PapyrusCompartmentEditPart implements public void deactivate() {
removeOwnerElementListeners();
super.deactivate();
-
}
/**
@@ -813,6 +815,5 @@ public class TimeEventNameEditPart extends PapyrusCompartmentEditPart implements */
protected void removeOwnerElementListeners() {
removeListenerFilter(ADD_PARENT_MODEL);
-
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/TimeExpressionEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/TimeExpressionEditPart.java index cfcf52c4882..06967e6934e 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/TimeExpressionEditPart.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/TimeExpressionEditPart.java @@ -26,6 +26,7 @@ import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure; import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
import org.eclipse.gmf.runtime.notation.View;
import org.eclipse.papyrus.infra.gmfdiag.common.editpart.NodeEditPart;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IPapyrusNodeFigure;
import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.SelectableBorderedNodeFigure;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy;
@@ -124,8 +125,6 @@ public class TimeExpressionEditPart extends NodeEditPart { ((TimeExpressionNameEditPart)childEditPart).setLabel(getPrimaryShape().getNameLabel());
return true;
}
-
-
return false;
}
@@ -184,7 +183,6 @@ public class TimeExpressionEditPart extends NodeEditPart { */
protected NodeFigure createNodeFigure() {
return new SelectableBorderedNodeFigure(createMainFigureWithSVG());
-
}
/**
@@ -234,8 +232,8 @@ public class TimeExpressionEditPart extends NodeEditPart { * @generated
*/
protected void setLineType(int style) {
- if(primaryShape instanceof NodeFigure) {
- ((NodeFigure)primaryShape).setLineStyle(style);
+ if(primaryShape instanceof IPapyrusNodeFigure) {
+ ((IPapyrusNodeFigure)primaryShape).setLineStyle(style);
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/TimeExpressionNameEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/TimeExpressionNameEditPart.java index c1146d87152..75691e46b7f 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/TimeExpressionNameEditPart.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/TimeExpressionNameEditPart.java @@ -64,6 +64,7 @@ import org.eclipse.papyrus.infra.emf.appearance.helper.VisualInformationPapyrusC import org.eclipse.papyrus.infra.gmfdiag.common.editpart.IControlParserForDirectEdit;
import org.eclipse.papyrus.infra.gmfdiag.common.editpart.PapyrusCompartmentEditPart;
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;
@@ -320,7 +321,6 @@ public class TimeExpressionNameEditPart extends PapyrusCompartmentEditPart imple ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -407,9 +407,7 @@ public class TimeExpressionNameEditPart extends PapyrusCompartmentEditPart imple * @generated
*/
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
@@ -442,7 +440,6 @@ public class TimeExpressionNameEditPart extends PapyrusCompartmentEditPart imple return;
}
final Dialog finalDialog = dialog;
-
if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@@ -450,7 +447,6 @@ public class TimeExpressionNameEditPart extends PapyrusCompartmentEditPart imple @Override
protected void doExecute() {
configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
-
}
};
domain.getCommandStack().execute(command);
@@ -507,8 +503,17 @@ public class TimeExpressionNameEditPart extends PapyrusCompartmentEditPart imple 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) {
@@ -629,7 +634,6 @@ public class TimeExpressionNameEditPart extends PapyrusCompartmentEditPart imple if(checkDefaultEdition()) {
return IDirectEdition.DEFAULT_DIRECT_EDITOR;
}
-
// not a named element. no specific editor => do nothing
return IDirectEdition.NO_DIRECT_EDITION;
}
@@ -796,7 +800,6 @@ public class TimeExpressionNameEditPart extends PapyrusCompartmentEditPart imple */
protected void addOwnerElementListeners() {
addListenerFilter(ADD_PARENT_MODEL, this, ((View)getParent().getModel())); //$NON-NLS-1$
-
}
/**
@@ -805,7 +808,6 @@ public class TimeExpressionNameEditPart extends PapyrusCompartmentEditPart imple public void deactivate() {
removeOwnerElementListeners();
super.deactivate();
-
}
/**
@@ -813,6 +815,5 @@ public class TimeExpressionNameEditPart extends PapyrusCompartmentEditPart imple */
protected void removeOwnerElementListeners() {
removeListenerFilter(ADD_PARENT_MODEL);
-
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/TimeIntervalEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/TimeIntervalEditPart.java index ea21cdd4b52..53f961affd2 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/TimeIntervalEditPart.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/TimeIntervalEditPart.java @@ -26,6 +26,7 @@ import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure; import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
import org.eclipse.gmf.runtime.notation.View;
import org.eclipse.papyrus.infra.gmfdiag.common.editpart.NodeEditPart;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IPapyrusNodeFigure;
import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.SelectableBorderedNodeFigure;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy;
@@ -124,8 +125,6 @@ public class TimeIntervalEditPart extends NodeEditPart { ((TimeIntervalNameEditPart)childEditPart).setLabel(getPrimaryShape().getNameLabel());
return true;
}
-
-
return false;
}
@@ -184,7 +183,6 @@ public class TimeIntervalEditPart extends NodeEditPart { */
protected NodeFigure createNodeFigure() {
return new SelectableBorderedNodeFigure(createMainFigureWithSVG());
-
}
/**
@@ -234,8 +232,8 @@ public class TimeIntervalEditPart extends NodeEditPart { * @generated
*/
protected void setLineType(int style) {
- if(primaryShape instanceof NodeFigure) {
- ((NodeFigure)primaryShape).setLineStyle(style);
+ if(primaryShape instanceof IPapyrusNodeFigure) {
+ ((IPapyrusNodeFigure)primaryShape).setLineStyle(style);
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/TimeIntervalNameEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/TimeIntervalNameEditPart.java index 667145a582f..83a4ddf8e53 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/TimeIntervalNameEditPart.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/TimeIntervalNameEditPart.java @@ -64,6 +64,7 @@ import org.eclipse.papyrus.infra.emf.appearance.helper.VisualInformationPapyrusC import org.eclipse.papyrus.infra.gmfdiag.common.editpart.IControlParserForDirectEdit;
import org.eclipse.papyrus.infra.gmfdiag.common.editpart.PapyrusCompartmentEditPart;
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;
@@ -320,7 +321,6 @@ public class TimeIntervalNameEditPart extends PapyrusCompartmentEditPart impleme ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -407,9 +407,7 @@ public class TimeIntervalNameEditPart extends PapyrusCompartmentEditPart impleme * @generated
*/
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
@@ -442,7 +440,6 @@ public class TimeIntervalNameEditPart extends PapyrusCompartmentEditPart impleme return;
}
final Dialog finalDialog = dialog;
-
if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@@ -450,7 +447,6 @@ public class TimeIntervalNameEditPart extends PapyrusCompartmentEditPart impleme @Override
protected void doExecute() {
configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
-
}
};
domain.getCommandStack().execute(command);
@@ -507,8 +503,17 @@ public class TimeIntervalNameEditPart extends PapyrusCompartmentEditPart impleme 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) {
@@ -629,7 +634,6 @@ public class TimeIntervalNameEditPart extends PapyrusCompartmentEditPart impleme if(checkDefaultEdition()) {
return IDirectEdition.DEFAULT_DIRECT_EDITOR;
}
-
// not a named element. no specific editor => do nothing
return IDirectEdition.NO_DIRECT_EDITION;
}
@@ -796,7 +800,6 @@ public class TimeIntervalNameEditPart extends PapyrusCompartmentEditPart impleme */
protected void addOwnerElementListeners() {
addListenerFilter(ADD_PARENT_MODEL, this, ((View)getParent().getModel())); //$NON-NLS-1$
-
}
/**
@@ -805,7 +808,6 @@ public class TimeIntervalNameEditPart extends PapyrusCompartmentEditPart impleme public void deactivate() {
removeOwnerElementListeners();
super.deactivate();
-
}
/**
@@ -813,6 +815,5 @@ public class TimeIntervalNameEditPart extends PapyrusCompartmentEditPart impleme */
protected void removeOwnerElementListeners() {
removeListenerFilter(ADD_PARENT_MODEL);
-
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/TimeObservationEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/TimeObservationEditPart.java index 72bac153eae..a2e17c80fd1 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/TimeObservationEditPart.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/TimeObservationEditPart.java @@ -34,6 +34,7 @@ import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure; import org.eclipse.gmf.runtime.notation.Edge;
import org.eclipse.gmf.runtime.notation.NotationPackage;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IPapyrusNodeFigure;
import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.SelectableBorderedNodeFigure;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeIconlDisplayEditPolicy;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy;
@@ -149,7 +150,6 @@ public class TimeObservationEditPart extends AbstractObservationEditPart { }
}
super.handleNotificationEvent(event);
-
}
/**
@@ -201,7 +201,6 @@ public class TimeObservationEditPart extends AbstractObservationEditPart { */
protected NodeFigure createMainFigure() {
return new SelectableBorderedNodeFigure(createMainFigureWithSVG());
-
}
/**
@@ -246,8 +245,8 @@ public class TimeObservationEditPart extends AbstractObservationEditPart { * @generated
*/
protected void setLineType(int style) {
- if(primaryShape instanceof NodeFigure) {
- ((NodeFigure)primaryShape).setLineStyle(style);
+ if(primaryShape instanceof IPapyrusNodeFigure) {
+ ((IPapyrusNodeFigure)primaryShape).setLineStyle(style);
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/TimeObservationNameEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/TimeObservationNameEditPart.java index 64fd8d20aaa..95233e77f1c 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/TimeObservationNameEditPart.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/TimeObservationNameEditPart.java @@ -62,6 +62,7 @@ import org.eclipse.papyrus.extensionpoints.editors.ui.IPopupEditorHelper; import org.eclipse.papyrus.extensionpoints.editors.utils.DirectEditorsUtil;
import org.eclipse.papyrus.extensionpoints.editors.utils.IDirectEditorsIds;
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;
@@ -335,7 +336,6 @@ public class TimeObservationNameEditPart extends LabelEditPart implements ITextA ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -422,9 +422,7 @@ public class TimeObservationNameEditPart extends LabelEditPart implements ITextA * @generated
*/
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
@@ -457,7 +455,6 @@ public class TimeObservationNameEditPart extends LabelEditPart implements ITextA return;
}
final Dialog finalDialog = dialog;
-
if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@@ -465,7 +462,6 @@ public class TimeObservationNameEditPart extends LabelEditPart implements ITextA @Override
protected void doExecute() {
configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
-
}
};
domain.getCommandStack().execute(command);
@@ -522,8 +518,17 @@ public class TimeObservationNameEditPart extends LabelEditPart implements ITextA 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) {
@@ -644,7 +649,6 @@ public class TimeObservationNameEditPart extends LabelEditPart implements ITextA if(checkDefaultEdition()) {
return IDirectEdition.DEFAULT_DIRECT_EDITOR;
}
-
// not a named element. no specific editor => do nothing
return IDirectEdition.NO_DIRECT_EDITION;
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/TimeObservationStereotypeLabelEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/TimeObservationStereotypeLabelEditPart.java index fcde4a3b766..2820d688939 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/TimeObservationStereotypeLabelEditPart.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/TimeObservationStereotypeLabelEditPart.java @@ -61,6 +61,7 @@ import org.eclipse.papyrus.extensionpoints.editors.ui.IPopupEditorHelper; import org.eclipse.papyrus.extensionpoints.editors.utils.DirectEditorsUtil;
import org.eclipse.papyrus.extensionpoints.editors.utils.IDirectEditorsIds;
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.editparts.AbstractLabelEditPart;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeExternalNodeEditPolicy;
@@ -339,7 +340,6 @@ public class TimeObservationStereotypeLabelEditPart extends AbstractLabelEditPar ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -426,9 +426,7 @@ public class TimeObservationStereotypeLabelEditPart extends AbstractLabelEditPar * @generated
*/
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
@@ -461,7 +459,6 @@ public class TimeObservationStereotypeLabelEditPart extends AbstractLabelEditPar return;
}
final Dialog finalDialog = dialog;
-
if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@@ -469,7 +466,6 @@ public class TimeObservationStereotypeLabelEditPart extends AbstractLabelEditPar @Override
protected void doExecute() {
configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
-
}
};
domain.getCommandStack().execute(command);
@@ -526,8 +522,17 @@ public class TimeObservationStereotypeLabelEditPart extends AbstractLabelEditPar 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) {
@@ -648,7 +653,6 @@ public class TimeObservationStereotypeLabelEditPart extends AbstractLabelEditPar if(checkDefaultEdition()) {
return IDirectEdition.DEFAULT_DIRECT_EDITOR;
}
-
// not a named element. no specific editor => do nothing
return IDirectEdition.NO_DIRECT_EDITION;
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/UMLEditPartFactory.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/UMLEditPartFactory.java index 9c3e627cb85..be912ac84b9 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/UMLEditPartFactory.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/UMLEditPartFactory.java @@ -37,812 +37,530 @@ public class UMLEditPartFactory implements EditPartFactory { if(model instanceof View) {
View view = (View)model;
switch(UMLVisualIDRegistry.getVisualID(view)) {
-
case CompositeStructureDiagramEditPart.VISUAL_ID:
return new CompositeStructureDiagramEditPart(view);
-
case ActivityCompositeEditPart.VISUAL_ID:
return new ActivityCompositeEditPart(view);
-
case ActivityCompositeNameEditPart.VISUAL_ID:
return new ActivityCompositeNameEditPart(view);
-
case InteractionCompositeEditPart.VISUAL_ID:
return new InteractionCompositeEditPart(view);
-
case InteractionCompositeNameEditPart.VISUAL_ID:
return new InteractionCompositeNameEditPart(view);
-
case ProtocolStateMachineCompositeEditPart.VISUAL_ID:
return new ProtocolStateMachineCompositeEditPart(view);
-
case ProtocolStateMachineCompositeNameEditPart.VISUAL_ID:
return new ProtocolStateMachineCompositeNameEditPart(view);
-
case StateMachineCompositeEditPart.VISUAL_ID:
return new StateMachineCompositeEditPart(view);
-
case StateMachineCompositeNameEditPart.VISUAL_ID:
return new StateMachineCompositeNameEditPart(view);
-
case FunctionBehaviorCompositeEditPart.VISUAL_ID:
return new FunctionBehaviorCompositeEditPart(view);
-
case FunctionBehaviorCompositeNameEditPart.VISUAL_ID:
return new FunctionBehaviorCompositeNameEditPart(view);
-
case OpaqueBehaviorCompositeEditPart.VISUAL_ID:
return new OpaqueBehaviorCompositeEditPart(view);
-
case OpaqueBehaviorCompositeNameEditPart.VISUAL_ID:
return new OpaqueBehaviorCompositeNameEditPart(view);
-
case ComponentCompositeEditPart.VISUAL_ID:
return new ComponentCompositeEditPart(view);
-
case ComponentCompositeNameEditPart.VISUAL_ID:
return new ComponentCompositeNameEditPart(view);
-
case DeviceCompositeEditPart.VISUAL_ID:
return new DeviceCompositeEditPart(view);
-
case DeviceCompositeNameEditPart.VISUAL_ID:
return new DeviceCompositeNameEditPart(view);
-
case ExecutionEnvironmentCompositeEditPart.VISUAL_ID:
return new ExecutionEnvironmentCompositeEditPart(view);
-
case ExecutionEnvironmentCompositeNameEditPart.VISUAL_ID:
return new ExecutionEnvironmentCompositeNameEditPart(view);
-
case NodeCompositeEditPart.VISUAL_ID:
return new NodeCompositeEditPart(view);
-
case NodeCompositeNameEditPart.VISUAL_ID:
return new NodeCompositeNameEditPart(view);
-
case ClassCompositeEditPart.VISUAL_ID:
return new ClassCompositeEditPart(view);
-
case ClassCompositeNameEditPart.VISUAL_ID:
return new ClassCompositeNameEditPart(view);
-
case CollaborationCompositeEditPart.VISUAL_ID:
return new CollaborationCompositeEditPart(view);
-
case CollaborationCompositeNameEditPart.VISUAL_ID:
return new CollaborationCompositeNameEditPart(view);
-
case InterfaceEditPart.VISUAL_ID:
return new InterfaceEditPart(view);
-
case InterfaceNameEditPart.VISUAL_ID:
return new InterfaceNameEditPart(view);
-
case PrimitiveTypeEditPart.VISUAL_ID:
return new PrimitiveTypeEditPart(view);
-
case PrimitiveTypeNameEditPart.VISUAL_ID:
return new PrimitiveTypeNameEditPart(view);
-
case EnumerationEditPart.VISUAL_ID:
return new EnumerationEditPart(view);
-
case EnumerationNameEditPart.VISUAL_ID:
return new EnumerationNameEditPart(view);
-
case DataTypeEditPart.VISUAL_ID:
return new DataTypeEditPart(view);
-
case DataTypeNameEditPart.VISUAL_ID:
return new DataTypeNameEditPart(view);
-
case ActorEditPart.VISUAL_ID:
return new ActorEditPart(view);
-
case ActorNameEditPart.VISUAL_ID:
return new ActorNameEditPart(view);
-
case DeploymentSpecificationEditPart.VISUAL_ID:
return new DeploymentSpecificationEditPart(view);
-
case DeploymentSpecificationNameEditPart.VISUAL_ID:
return new DeploymentSpecificationNameEditPart(view);
-
case ArtifactEditPart.VISUAL_ID:
return new ArtifactEditPart(view);
-
case ArtifactNameEditPart.VISUAL_ID:
return new ArtifactNameEditPart(view);
-
case InformationItemEditPart.VISUAL_ID:
return new InformationItemEditPart(view);
-
case InformationItemNameEditPart.VISUAL_ID:
return new InformationItemNameEditPart(view);
-
case SignalEditPart.VISUAL_ID:
return new SignalEditPart(view);
-
case SignalNameEditPart.VISUAL_ID:
return new SignalNameEditPart(view);
-
case UseCaseEditPart.VISUAL_ID:
return new UseCaseEditPart(view);
-
case UseCaseNameEditPart.VISUAL_ID:
return new UseCaseNameEditPart(view);
-
case SignalEventEditPart.VISUAL_ID:
return new SignalEventEditPart(view);
-
case SignalEventNameEditPart.VISUAL_ID:
return new SignalEventNameEditPart(view);
-
case CallEventEditPart.VISUAL_ID:
return new CallEventEditPart(view);
-
case CallEventNameEditPart.VISUAL_ID:
return new CallEventNameEditPart(view);
-
case AnyReceiveEventEditPart.VISUAL_ID:
return new AnyReceiveEventEditPart(view);
-
case AnyReceiveEventNameEditPart.VISUAL_ID:
return new AnyReceiveEventNameEditPart(view);
-
case ChangeEventEditPart.VISUAL_ID:
return new ChangeEventEditPart(view);
-
case ChangeEventNameEditPart.VISUAL_ID:
return new ChangeEventNameEditPart(view);
-
case TimeEventEditPart.VISUAL_ID:
return new TimeEventEditPart(view);
-
case TimeEventNameEditPart.VISUAL_ID:
return new TimeEventNameEditPart(view);
-
case DurationObservationEditPart.VISUAL_ID:
return new DurationObservationEditPart(view);
-
case DurationObservationNameEditPart.VISUAL_ID:
return new DurationObservationNameEditPart(view);
-
case DurationObservationStereotypeLabelEditPart.VISUAL_ID:
return new DurationObservationStereotypeLabelEditPart(view);
-
case TimeObservationEditPart.VISUAL_ID:
return new TimeObservationEditPart(view);
-
case TimeObservationNameEditPart.VISUAL_ID:
return new TimeObservationNameEditPart(view);
-
case TimeObservationStereotypeLabelEditPart.VISUAL_ID:
return new TimeObservationStereotypeLabelEditPart(view);
-
case LiteralBooleanEditPart.VISUAL_ID:
return new LiteralBooleanEditPart(view);
-
case LiteralBooleanNameEditPart.VISUAL_ID:
return new LiteralBooleanNameEditPart(view);
-
case LiteralIntegerEditPart.VISUAL_ID:
return new LiteralIntegerEditPart(view);
-
case LiteralIntegerNameEditPart.VISUAL_ID:
return new LiteralIntegerNameEditPart(view);
-
case LiteralNullEditPart.VISUAL_ID:
return new LiteralNullEditPart(view);
-
case LiteralNullNameEditPart.VISUAL_ID:
return new LiteralNullNameEditPart(view);
-
case LiteralStringEditPart.VISUAL_ID:
return new LiteralStringEditPart(view);
-
case LiteralStringNameEditPart.VISUAL_ID:
return new LiteralStringNameEditPart(view);
-
case LiteralUnlimitedNaturalEditPart.VISUAL_ID:
return new LiteralUnlimitedNaturalEditPart(view);
-
case LiteralUnlimitedNaturalNameEditPart.VISUAL_ID:
return new LiteralUnlimitedNaturalNameEditPart(view);
-
case StringExpressionEditPart.VISUAL_ID:
return new StringExpressionEditPart(view);
-
case StringExpressionNameEditPart.VISUAL_ID:
return new StringExpressionNameEditPart(view);
-
case OpaqueExpressionEditPart.VISUAL_ID:
return new OpaqueExpressionEditPart(view);
-
case OpaqueExpressionNameEditPart.VISUAL_ID:
return new OpaqueExpressionNameEditPart(view);
-
case TimeExpressionEditPart.VISUAL_ID:
return new TimeExpressionEditPart(view);
-
case TimeExpressionNameEditPart.VISUAL_ID:
return new TimeExpressionNameEditPart(view);
-
case ExpressionEditPart.VISUAL_ID:
return new ExpressionEditPart(view);
-
case ExpressionNameEditPart.VISUAL_ID:
return new ExpressionNameEditPart(view);
-
case DurationEditPart.VISUAL_ID:
return new DurationEditPart(view);
-
case DurationNameEditPart.VISUAL_ID:
return new DurationNameEditPart(view);
-
case TimeIntervalEditPart.VISUAL_ID:
return new TimeIntervalEditPart(view);
-
case TimeIntervalNameEditPart.VISUAL_ID:
return new TimeIntervalNameEditPart(view);
-
case DurationIntervalEditPart.VISUAL_ID:
return new DurationIntervalEditPart(view);
-
case DurationIntervalNameEditPart.VISUAL_ID:
return new DurationIntervalNameEditPart(view);
-
case IntervalEditPart.VISUAL_ID:
return new IntervalEditPart(view);
-
case IntervalNameEditPart.VISUAL_ID:
return new IntervalNameEditPart(view);
-
case InstanceValueEditPart.VISUAL_ID:
return new InstanceValueEditPart(view);
-
case InstanceValueNameEditPart.VISUAL_ID:
return new InstanceValueNameEditPart(view);
-
case CommentEditPart.VISUAL_ID:
return new CommentEditPart(view);
-
case CommentBodyEditPart.VISUAL_ID:
return new CommentBodyEditPart(view);
-
case DurationConstraintEditPart.VISUAL_ID:
return new DurationConstraintEditPart(view);
-
case DurationConstraintNameEditPart.VISUAL_ID:
return new DurationConstraintNameEditPart(view);
-
case DurationConstraintSpecificationEditPart.VISUAL_ID:
return new DurationConstraintSpecificationEditPart(view);
-
case TimeConstraintEditPart.VISUAL_ID:
return new TimeConstraintEditPart(view);
-
case TimeConstraintNameEditPart.VISUAL_ID:
return new TimeConstraintNameEditPart(view);
-
case TimeConstraintSpecificationEditPart.VISUAL_ID:
return new TimeConstraintSpecificationEditPart(view);
-
case IntervalConstraintEditPart.VISUAL_ID:
return new IntervalConstraintEditPart(view);
-
case IntervalConstraintNameEditPart.VISUAL_ID:
return new IntervalConstraintNameEditPart(view);
-
case IntervalConstraintSpecificationEditPart.VISUAL_ID:
return new IntervalConstraintSpecificationEditPart(view);
-
case InteractionConstraintEditPart.VISUAL_ID:
return new InteractionConstraintEditPart(view);
-
case InteractionConstraintNameEditPart.VISUAL_ID:
return new InteractionConstraintNameEditPart(view);
-
case InteractionConstraintSpecificationEditPart.VISUAL_ID:
return new InteractionConstraintSpecificationEditPart(view);
-
case ConstraintEditPart.VISUAL_ID:
return new ConstraintEditPart(view);
-
case ConstraintNameEditPart.VISUAL_ID:
return new ConstraintNameEditPart(view);
-
case ConstraintSpecificationEditPart.VISUAL_ID:
return new ConstraintSpecificationEditPart(view);
-
case BehaviorPortEditPart.VISUAL_ID:
return new BehaviorPortEditPart(view);
-
case PortEditPart.VISUAL_ID:
return new PortEditPart(view);
-
case PortNameEditPart.VISUAL_ID:
return new PortNameEditPart(view);
-
case PortAppliedStereotypeEditPart.VISUAL_ID:
return new PortAppliedStereotypeEditPart(view);
-
case ParameterEditPart.VISUAL_ID:
return new ParameterEditPart(view);
-
case ParameterNameEditPart.VISUAL_ID:
return new ParameterNameEditPart(view);
-
case ParameterAppliedStereotypeEditPart.VISUAL_ID:
return new ParameterAppliedStereotypeEditPart(view);
-
case PropertyPartEditPartCN.VISUAL_ID:
return new PropertyPartEditPartCN(view);
-
case PropertyPartNameEditPartCN.VISUAL_ID:
return new PropertyPartNameEditPartCN(view);
-
case CollaborationRoleEditPartCN.VISUAL_ID:
return new CollaborationRoleEditPartCN(view);
-
case CollaborationRoleNameEditPartCN.VISUAL_ID:
return new CollaborationRoleNameEditPartCN(view);
-
case CollaborationUseEditPartCN.VISUAL_ID:
return new CollaborationUseEditPartCN(view);
-
case CollaborationUseNameEditPart.VISUAL_ID:
return new CollaborationUseNameEditPart(view);
-
case ActivityCompositeEditPartCN.VISUAL_ID:
return new ActivityCompositeEditPartCN(view);
-
case ActivityCompositeNameEditPartCN.VISUAL_ID:
return new ActivityCompositeNameEditPartCN(view);
-
case InteractionCompositeEditPartCN.VISUAL_ID:
return new InteractionCompositeEditPartCN(view);
-
case InteractionCompositeNameEditPartCN.VISUAL_ID:
return new InteractionCompositeNameEditPartCN(view);
-
case ProtocolStateMachineCompositeEditPartCN.VISUAL_ID:
return new ProtocolStateMachineCompositeEditPartCN(view);
-
case ProtocolStateMachineCompositeNameEditPartCN.VISUAL_ID:
return new ProtocolStateMachineCompositeNameEditPartCN(view);
-
case StateMachineCompositeEditPartCN.VISUAL_ID:
return new StateMachineCompositeEditPartCN(view);
-
case StateMachineCompositeNameEditPartCN.VISUAL_ID:
return new StateMachineCompositeNameEditPartCN(view);
-
case FunctionBehaviorCompositeEditPartCN.VISUAL_ID:
return new FunctionBehaviorCompositeEditPartCN(view);
-
case FunctionBehaviorCompositeNameEditPartCN.VISUAL_ID:
return new FunctionBehaviorCompositeNameEditPartCN(view);
-
case OpaqueBehaviorCompositeEditPartCN.VISUAL_ID:
return new OpaqueBehaviorCompositeEditPartCN(view);
-
case OpaqueBehaviorCompositeNameEditPartCN.VISUAL_ID:
return new OpaqueBehaviorCompositeNameEditPartCN(view);
-
case ComponentCompositeEditPartCN.VISUAL_ID:
return new ComponentCompositeEditPartCN(view);
-
case ComponentCompositeNameEditPartCN.VISUAL_ID:
return new ComponentCompositeNameEditPartCN(view);
-
case DeviceCompositeEditPartCN.VISUAL_ID:
return new DeviceCompositeEditPartCN(view);
-
case DeviceCompositeNameEditPartCN.VISUAL_ID:
return new DeviceCompositeNameEditPartCN(view);
-
case ExecutionEnvironmentCompositeEditPartCN.VISUAL_ID:
return new ExecutionEnvironmentCompositeEditPartCN(view);
-
case ExecutionEnvironmentCompositeNameEditPartCN.VISUAL_ID:
return new ExecutionEnvironmentCompositeNameEditPartCN(view);
-
case NodeCompositeEditPartCN.VISUAL_ID:
return new NodeCompositeEditPartCN(view);
-
case NodeCompositeNameEditPartCN.VISUAL_ID:
return new NodeCompositeNameEditPartCN(view);
-
case ClassCompositeEditPartCN.VISUAL_ID:
return new ClassCompositeEditPartCN(view);
-
case ClassCompositeNameEditPartCN.VISUAL_ID:
return new ClassCompositeNameEditPartCN(view);
-
case CollaborationCompositeEditPartCN.VISUAL_ID:
return new CollaborationCompositeEditPartCN(view);
-
case CollaborationCompositeNameEditPartCN.VISUAL_ID:
return new CollaborationCompositeNameEditPartCN(view);
-
case InterfaceEditPartCN.VISUAL_ID:
return new InterfaceEditPartCN(view);
-
case InterfaceNameEditPartCN.VISUAL_ID:
return new InterfaceNameEditPartCN(view);
-
case PrimitiveTypeEditPartCN.VISUAL_ID:
return new PrimitiveTypeEditPartCN(view);
-
case PrimitiveTypeNameEditPartCN.VISUAL_ID:
return new PrimitiveTypeNameEditPartCN(view);
-
case EnumerationEditPartCN.VISUAL_ID:
return new EnumerationEditPartCN(view);
-
case EnumerationNameEditPartCN.VISUAL_ID:
return new EnumerationNameEditPartCN(view);
-
case DataTypeEditPartCN.VISUAL_ID:
return new DataTypeEditPartCN(view);
-
case DataTypeNameEditPartCN.VISUAL_ID:
return new DataTypeNameEditPartCN(view);
-
case ActorEditPartCN.VISUAL_ID:
return new ActorEditPartCN(view);
-
case ActorNameEditPartCN.VISUAL_ID:
return new ActorNameEditPartCN(view);
-
case DeploymentSpecificationEditPartCN.VISUAL_ID:
return new DeploymentSpecificationEditPartCN(view);
-
case DeploymentSpecificationNameEditPartCN.VISUAL_ID:
return new DeploymentSpecificationNameEditPartCN(view);
-
case ArtifactEditPartCN.VISUAL_ID:
return new ArtifactEditPartCN(view);
-
case ArtifactNameEditPartCN.VISUAL_ID:
return new ArtifactNameEditPartCN(view);
-
case InformationItemEditPartCN.VISUAL_ID:
return new InformationItemEditPartCN(view);
-
case InformationItemNameEditPartCN.VISUAL_ID:
return new InformationItemNameEditPartCN(view);
-
case SignalEditPartCN.VISUAL_ID:
return new SignalEditPartCN(view);
-
case SignalNameEditPartCN.VISUAL_ID:
return new SignalNameEditPartCN(view);
-
case UseCaseEditPartCN.VISUAL_ID:
return new UseCaseEditPartCN(view);
-
case UseCaseNameEditPartCN.VISUAL_ID:
return new UseCaseNameEditPartCN(view);
-
case CommentEditPartCN.VISUAL_ID:
return new CommentEditPartCN(view);
-
case CommentBodyEditPartCN.VISUAL_ID:
return new CommentBodyEditPartCN(view);
-
case DurationConstraintEditPartCN.VISUAL_ID:
return new DurationConstraintEditPartCN(view);
-
case DurationConstraintNameEditPartCN.VISUAL_ID:
return new DurationConstraintNameEditPartCN(view);
-
case DurationConstraintSpecificationEditPartCN.VISUAL_ID:
return new DurationConstraintSpecificationEditPartCN(view);
-
case TimeConstraintEditPartCN.VISUAL_ID:
return new TimeConstraintEditPartCN(view);
-
case TimeConstraintNameEditPartCN.VISUAL_ID:
return new TimeConstraintNameEditPartCN(view);
-
case TimeConstraintSpecificationEditPartCN.VISUAL_ID:
return new TimeConstraintSpecificationEditPartCN(view);
-
case IntervalConstraintEditPartCN.VISUAL_ID:
return new IntervalConstraintEditPartCN(view);
-
case IntervalConstraintNameEditPartCN.VISUAL_ID:
return new IntervalConstraintNameEditPartCN(view);
-
case IntervalConstraintSpecificationEditPartCN.VISUAL_ID:
return new IntervalConstraintSpecificationEditPartCN(view);
-
case InteractionConstraintEditPartCN.VISUAL_ID:
return new InteractionConstraintEditPartCN(view);
-
case InteractionConstraintNameEditPartCN.VISUAL_ID:
return new InteractionConstraintNameEditPartCN(view);
-
case InteractionConstraintSpecificationEditPartCN.VISUAL_ID:
return new InteractionConstraintSpecificationEditPartCN(view);
-
case ConstraintEditPartCN.VISUAL_ID:
return new ConstraintEditPartCN(view);
-
case ConstraintNameEditPartCN.VISUAL_ID:
return new ConstraintNameEditPartCN(view);
-
case ConstraintSpecificationEditPartCN.VISUAL_ID:
return new ConstraintSpecificationEditPartCN(view);
-
case PropertyEditPartCLN.VISUAL_ID:
return new PropertyEditPartCLN(view);
-
case OperationEditPartCLN.VISUAL_ID:
return new OperationEditPartCLN(view);
-
case EnumerationLiteralEditPartCLN.VISUAL_ID:
return new EnumerationLiteralEditPartCLN(view);
-
case DataTypeAttributeCompartmentEditPart.VISUAL_ID:
return new DataTypeAttributeCompartmentEditPart(view);
-
case DataTypeOperationCompartmentEditPart.VISUAL_ID:
return new DataTypeOperationCompartmentEditPart(view);
-
case DataTypeAttributeCompartmentEditPartCN.VISUAL_ID:
return new DataTypeAttributeCompartmentEditPartCN(view);
-
case DataTypeOperationCompartmentEditPartCN.VISUAL_ID:
return new DataTypeOperationCompartmentEditPartCN(view);
-
case EnumerationEnumerationLiteralCompartmentEditPart.VISUAL_ID:
return new EnumerationEnumerationLiteralCompartmentEditPart(view);
-
case EnumerationEnumerationLiteralCompartmentEditPartCN.VISUAL_ID:
return new EnumerationEnumerationLiteralCompartmentEditPartCN(view);
-
case ActivityCompositeCompartmentEditPartCN.VISUAL_ID:
return new ActivityCompositeCompartmentEditPartCN(view);
-
case InteractionCompositeCompartmentEditPartCN.VISUAL_ID:
return new InteractionCompositeCompartmentEditPartCN(view);
-
case ProtocolStateMachineCompositeCompartmentEditPartCN.VISUAL_ID:
return new ProtocolStateMachineCompositeCompartmentEditPartCN(view);
-
case StateMachineCompositeCompartmentEditPartCN.VISUAL_ID:
return new StateMachineCompositeCompartmentEditPartCN(view);
-
case FunctionBehaviorCompositeCompartmentEditPartCN.VISUAL_ID:
return new FunctionBehaviorCompositeCompartmentEditPartCN(view);
-
case OpaqueBehaviorCompositeCompartmentEditPartCN.VISUAL_ID:
return new OpaqueBehaviorCompositeCompartmentEditPartCN(view);
-
case ComponentCompositeCompartmentEditPartCN.VISUAL_ID:
return new ComponentCompositeCompartmentEditPartCN(view);
-
case DeviceCompositeCompartmentEditPartCN.VISUAL_ID:
return new DeviceCompositeCompartmentEditPartCN(view);
-
case ExecutionEnvironmentCompositeCompartmentEditPartCN.VISUAL_ID:
return new ExecutionEnvironmentCompositeCompartmentEditPartCN(view);
-
case NodeCompositeCompartmentEditPartCN.VISUAL_ID:
return new NodeCompositeCompartmentEditPartCN(view);
-
case ClassCompositeCompartmentEditPartCN.VISUAL_ID:
return new ClassCompositeCompartmentEditPartCN(view);
-
case CollaborationCompositeCompartmentEditPartCN.VISUAL_ID:
return new CollaborationCompositeCompartmentEditPartCN(view);
-
case ActivityCompositeCompartmentEditPart.VISUAL_ID:
return new ActivityCompositeCompartmentEditPart(view);
-
case InteractionCompositeCompartmentEditPart.VISUAL_ID:
return new InteractionCompositeCompartmentEditPart(view);
-
case ProtocolStateMachineCompositeCompartmentEditPart.VISUAL_ID:
return new ProtocolStateMachineCompositeCompartmentEditPart(view);
-
case StateMachineCompositeCompartmentEditPart.VISUAL_ID:
return new StateMachineCompositeCompartmentEditPart(view);
-
case FunctionBehaviorCompositeCompartmentEditPart.VISUAL_ID:
return new FunctionBehaviorCompositeCompartmentEditPart(view);
-
case OpaqueBehaviorCompositeCompartmentEditPart.VISUAL_ID:
return new OpaqueBehaviorCompositeCompartmentEditPart(view);
-
case ComponentCompositeCompartmentEditPart.VISUAL_ID:
return new ComponentCompositeCompartmentEditPart(view);
-
case DeviceCompositeCompartmentEditPart.VISUAL_ID:
return new DeviceCompositeCompartmentEditPart(view);
-
case ExecutionEnvironmentCompositeCompartmentEditPart.VISUAL_ID:
return new ExecutionEnvironmentCompositeCompartmentEditPart(view);
-
case NodeCompositeCompartmentEditPart.VISUAL_ID:
return new NodeCompositeCompartmentEditPart(view);
-
case ClassCompositeCompartmentEditPart.VISUAL_ID:
return new ClassCompositeCompartmentEditPart(view);
-
case CollaborationCompositeCompartmentEditPart.VISUAL_ID:
return new CollaborationCompositeCompartmentEditPart(view);
-
case PropertyPartCompartmentEditPartCN.VISUAL_ID:
return new PropertyPartCompartmentEditPartCN(view);
-
case BehaviorPortLinkEditPart.VISUAL_ID:
return new BehaviorPortLinkEditPart(view);
-
-
case LinkDescriptorEditPart.VISUAL_ID:
return new LinkDescriptorEditPart(view);
-
-
case CommentAnnotatedElementEditPart.VISUAL_ID:
return new CommentAnnotatedElementEditPart(view);
-
-
case ConstraintConstrainedElementEditPart.VISUAL_ID:
return new ConstraintConstrainedElementEditPart(view);
-
-
case ComponentRealizationEditPart.VISUAL_ID:
return new ComponentRealizationEditPart(view);
-
case ComponentRealizationNameEditPart.VISUAL_ID:
return new ComponentRealizationNameEditPart(view);
-
case ComponentRealizationAppliedStereotypeEditPart.VISUAL_ID:
return new ComponentRealizationAppliedStereotypeEditPart(view);
-
-
case InterfaceRealizationEditPart.VISUAL_ID:
return new InterfaceRealizationEditPart(view);
-
case InterfaceRealizationNameEditPart.VISUAL_ID:
return new InterfaceRealizationNameEditPart(view);
-
case InterfaceRealizationAppliedStereotypeEditPart.VISUAL_ID:
return new InterfaceRealizationAppliedStereotypeEditPart(view);
-
-
case SubstitutionEditPart.VISUAL_ID:
return new SubstitutionEditPart(view);
-
case SubstitutionNameEditPart.VISUAL_ID:
return new SubstitutionNameEditPart(view);
-
case SubstitutionAppliedStereotypeEditPart.VISUAL_ID:
return new SubstitutionAppliedStereotypeEditPart(view);
-
-
case RealizationEditPart.VISUAL_ID:
return new RealizationEditPart(view);
-
case RealizationNameEditPart.VISUAL_ID:
return new RealizationNameEditPart(view);
-
case RealizationAppliedStereotypeEditPart.VISUAL_ID:
return new RealizationAppliedStereotypeEditPart(view);
-
-
case ManifestationEditPart.VISUAL_ID:
return new ManifestationEditPart(view);
-
case ManifestationNameEditPart.VISUAL_ID:
return new ManifestationNameEditPart(view);
-
case ManifestationAppliedStereotypeEditPart.VISUAL_ID:
return new ManifestationAppliedStereotypeEditPart(view);
-
-
case AbstractionEditPart.VISUAL_ID:
return new AbstractionEditPart(view);
-
case AbstractionNameEditPart.VISUAL_ID:
return new AbstractionNameEditPart(view);
-
case AbstractionAppliedStereotypeEditPart.VISUAL_ID:
return new AbstractionAppliedStereotypeEditPart(view);
-
-
case UsageEditPart.VISUAL_ID:
return new UsageEditPart(view);
-
case UsageNameEditPart.VISUAL_ID:
return new UsageNameEditPart(view);
-
case UsageAppliedStereotypeEditPart.VISUAL_ID:
return new UsageAppliedStereotypeEditPart(view);
-
-
case DeploymentEditPart.VISUAL_ID:
return new DeploymentEditPart(view);
-
case DeploymentNameEditPart.VISUAL_ID:
return new DeploymentNameEditPart(view);
-
case DeploymentAppliedStereotypeEditPart.VISUAL_ID:
return new DeploymentAppliedStereotypeEditPart(view);
-
-
case RoleBindingEditPart.VISUAL_ID:
return new RoleBindingEditPart(view);
-
case RoleBindingRoleNameEditPart.VISUAL_ID:
return new RoleBindingRoleNameEditPart(view);
-
case RoleBindingAppliedStereotypeEditPart.VISUAL_ID:
return new RoleBindingAppliedStereotypeEditPart(view);
-
-
case DependencyEditPart.VISUAL_ID:
return new DependencyEditPart(view);
-
case DependencyNameEditPart.VISUAL_ID:
return new DependencyNameEditPart(view);
-
case DependencyAppliedStereotypeEditPart.VISUAL_ID:
return new DependencyAppliedStereotypeEditPart(view);
-
-
case ConnectorEditPart.VISUAL_ID:
return new ConnectorEditPart(view);
-
case ConnectorAppliedStereotypeEditPart.VISUAL_ID:
return new ConnectorAppliedStereotypeEditPart(view);
-
case ConnectorNameEditPart.VISUAL_ID:
return new ConnectorNameEditPart(view);
-
case ConnectorMultiplicitySourceEditPart.VISUAL_ID:
return new ConnectorMultiplicitySourceEditPart(view);
-
case ConnectorMultiplicityTargetEditPart.VISUAL_ID:
return new ConnectorMultiplicityTargetEditPart(view);
-
-
case GeneralizationEditPart.VISUAL_ID:
return new GeneralizationEditPart(view);
-
case GeneralizationAppliedStereotypeEditPart.VISUAL_ID:
return new GeneralizationAppliedStereotypeEditPart(view);
-
-
case TimeObservationEventEditPart.VISUAL_ID:
return new TimeObservationEventEditPart(view);
-
-
case DurationObservationEventEditPart.VISUAL_ID:
return new DurationObservationEventEditPart(view);
-
-
case RepresentationEditPart.VISUAL_ID:
return new RepresentationEditPart(view);
-
case RepresentationTagLabelEditPart.VISUAL_ID:
return new RepresentationTagLabelEditPart(view);
-
-
case InformationFlowEditPart.VISUAL_ID:
return new InformationFlowEditPart(view);
-
case InformationFlowConveyedLabelEditPart.VISUAL_ID:
return new InformationFlowConveyedLabelEditPart(view);
-
case InformationFlowAppliedStereotypeEditPart.VISUAL_ID:
return new InformationFlowAppliedStereotypeEditPart(view);
-
}
}
return createUnrecognizedEditPart(context, model);
@@ -864,7 +582,6 @@ public class UMLEditPartFactory implements EditPartFactory { return new MultilineCellEditorLocator((IMultilineEditableFigure)source.getFigure());
} else {
return CellEditorLocatorAccess.INSTANCE.getTextCellEditorLocator(source);
-
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/UsageAppliedStereotypeEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/UsageAppliedStereotypeEditPart.java index 4570028f32d..8760c0f835c 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/UsageAppliedStereotypeEditPart.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/UsageAppliedStereotypeEditPart.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 UsageAppliedStereotypeEditPart extends PapyrusLabelEditPart impleme ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -406,9 +406,7 @@ public class UsageAppliedStereotypeEditPart extends PapyrusLabelEditPart impleme * @generated
*/
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
@@ -441,7 +439,6 @@ public class UsageAppliedStereotypeEditPart extends PapyrusLabelEditPart impleme 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 UsageAppliedStereotypeEditPart extends PapyrusLabelEditPart impleme @Override
protected void doExecute() {
configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
-
}
};
domain.getCommandStack().execute(command);
@@ -506,8 +502,17 @@ public class UsageAppliedStereotypeEditPart extends PapyrusLabelEditPart impleme 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 UsageAppliedStereotypeEditPart extends PapyrusLabelEditPart impleme }
}
}
-
super.handleNotificationEvent(event);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/UsageNameEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/UsageNameEditPart.java index 62c44dfeb08..0c26f8919b9 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/UsageNameEditPart.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/UsageNameEditPart.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 UsageNameEditPart extends PapyrusLabelEditPart implements ITextAwar ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -406,9 +406,7 @@ public class UsageNameEditPart extends PapyrusLabelEditPart implements ITextAwar * @generated
*/
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
@@ -441,7 +439,6 @@ public class UsageNameEditPart extends PapyrusLabelEditPart implements ITextAwar 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 UsageNameEditPart extends PapyrusLabelEditPart implements ITextAwar @Override
protected void doExecute() {
configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
-
}
};
domain.getCommandStack().execute(command);
@@ -506,8 +502,17 @@ public class UsageNameEditPart extends PapyrusLabelEditPart implements ITextAwar 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) {
@@ -628,7 +633,6 @@ public class UsageNameEditPart extends PapyrusLabelEditPart implements ITextAwar if(checkDefaultEdition()) {
return IDirectEdition.DEFAULT_DIRECT_EDITOR;
}
-
// not a named element. no specific editor => do nothing
return IDirectEdition.NO_DIRECT_EDITION;
}
@@ -746,7 +750,6 @@ public class UsageNameEditPart extends PapyrusLabelEditPart implements ITextAwar }
}
}
-
super.handleNotificationEvent(event);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/UseCaseEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/UseCaseEditPart.java index e4d38119a17..c2afb848906 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/UseCaseEditPart.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/UseCaseEditPart.java @@ -26,6 +26,7 @@ import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure; import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
import org.eclipse.gmf.runtime.notation.View;
import org.eclipse.papyrus.infra.gmfdiag.common.editpart.NodeEditPart;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IPapyrusNodeFigure;
import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.SelectableBorderedNodeFigure;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy;
@@ -126,8 +127,6 @@ public class UseCaseEditPart extends NodeEditPart { ((UseCaseNameEditPart)childEditPart).setLabel(getPrimaryShape().getNameLabel());
return true;
}
-
-
return false;
}
@@ -186,7 +185,6 @@ public class UseCaseEditPart extends NodeEditPart { */
protected NodeFigure createNodeFigure() {
return new SelectableBorderedNodeFigure(createMainFigureWithSVG());
-
}
/**
@@ -236,8 +234,8 @@ public class UseCaseEditPart extends NodeEditPart { * @generated
*/
protected void setLineType(int style) {
- if(primaryShape instanceof NodeFigure) {
- ((NodeFigure)primaryShape).setLineStyle(style);
+ if(primaryShape instanceof IPapyrusNodeFigure) {
+ ((IPapyrusNodeFigure)primaryShape).setLineStyle(style);
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/UseCaseEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/UseCaseEditPartCN.java index 4f852647e3e..9b10197ee0f 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/UseCaseEditPartCN.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/UseCaseEditPartCN.java @@ -26,6 +26,7 @@ import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure; import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
import org.eclipse.gmf.runtime.notation.View;
import org.eclipse.papyrus.infra.gmfdiag.common.editpart.NodeEditPart;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.IPapyrusNodeFigure;
import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.SelectableBorderedNodeFigure;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy;
@@ -126,8 +127,6 @@ public class UseCaseEditPartCN extends NodeEditPart { ((UseCaseNameEditPartCN)childEditPart).setLabel(getPrimaryShape().getNameLabel());
return true;
}
-
-
return false;
}
@@ -186,7 +185,6 @@ public class UseCaseEditPartCN extends NodeEditPart { */
protected NodeFigure createNodeFigure() {
return new SelectableBorderedNodeFigure(createMainFigureWithSVG());
-
}
/**
@@ -236,8 +234,8 @@ public class UseCaseEditPartCN extends NodeEditPart { * @generated
*/
protected void setLineType(int style) {
- if(primaryShape instanceof NodeFigure) {
- ((NodeFigure)primaryShape).setLineStyle(style);
+ if(primaryShape instanceof IPapyrusNodeFigure) {
+ ((IPapyrusNodeFigure)primaryShape).setLineStyle(style);
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/UseCaseNameEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/UseCaseNameEditPart.java index b7f35cf8c46..a31af45ebf5 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/UseCaseNameEditPart.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/UseCaseNameEditPart.java @@ -64,6 +64,7 @@ import org.eclipse.papyrus.infra.emf.appearance.helper.VisualInformationPapyrusC import org.eclipse.papyrus.infra.gmfdiag.common.editpart.IControlParserForDirectEdit;
import org.eclipse.papyrus.infra.gmfdiag.common.editpart.PapyrusCompartmentEditPart;
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;
@@ -320,7 +321,6 @@ public class UseCaseNameEditPart extends PapyrusCompartmentEditPart implements I ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -407,9 +407,7 @@ public class UseCaseNameEditPart extends PapyrusCompartmentEditPart implements I * @generated
*/
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
@@ -442,7 +440,6 @@ public class UseCaseNameEditPart extends PapyrusCompartmentEditPart implements I return;
}
final Dialog finalDialog = dialog;
-
if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@@ -450,7 +447,6 @@ public class UseCaseNameEditPart extends PapyrusCompartmentEditPart implements I @Override
protected void doExecute() {
configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
-
}
};
domain.getCommandStack().execute(command);
@@ -507,8 +503,17 @@ public class UseCaseNameEditPart extends PapyrusCompartmentEditPart implements I 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) {
@@ -629,7 +634,6 @@ public class UseCaseNameEditPart extends PapyrusCompartmentEditPart implements I if(checkDefaultEdition()) {
return IDirectEdition.DEFAULT_DIRECT_EDITOR;
}
-
// not a named element. no specific editor => do nothing
return IDirectEdition.NO_DIRECT_EDITION;
}
@@ -796,7 +800,6 @@ public class UseCaseNameEditPart extends PapyrusCompartmentEditPart implements I */
protected void addOwnerElementListeners() {
addListenerFilter(ADD_PARENT_MODEL, this, ((View)getParent().getModel())); //$NON-NLS-1$
-
}
/**
@@ -805,7 +808,6 @@ public class UseCaseNameEditPart extends PapyrusCompartmentEditPart implements I public void deactivate() {
removeOwnerElementListeners();
super.deactivate();
-
}
/**
@@ -813,6 +815,5 @@ public class UseCaseNameEditPart extends PapyrusCompartmentEditPart implements I */
protected void removeOwnerElementListeners() {
removeListenerFilter(ADD_PARENT_MODEL);
-
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/UseCaseNameEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/UseCaseNameEditPartCN.java index 89f84014f6a..dda416d8043 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/UseCaseNameEditPartCN.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/parts/UseCaseNameEditPartCN.java @@ -64,6 +64,7 @@ import org.eclipse.papyrus.infra.emf.appearance.helper.VisualInformationPapyrusC import org.eclipse.papyrus.infra.gmfdiag.common.editpart.IControlParserForDirectEdit;
import org.eclipse.papyrus.infra.gmfdiag.common.editpart.PapyrusCompartmentEditPart;
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;
@@ -320,7 +321,6 @@ public class UseCaseNameEditPartCN extends PapyrusCompartmentEditPart implements ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -407,9 +407,7 @@ public class UseCaseNameEditPartCN extends PapyrusCompartmentEditPart implements * @generated
*/
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
@@ -442,7 +440,6 @@ public class UseCaseNameEditPartCN extends PapyrusCompartmentEditPart implements return;
}
final Dialog finalDialog = dialog;
-
if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@@ -450,7 +447,6 @@ public class UseCaseNameEditPartCN extends PapyrusCompartmentEditPart implements @Override
protected void doExecute() {
configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
-
}
};
domain.getCommandStack().execute(command);
@@ -507,8 +503,17 @@ public class UseCaseNameEditPartCN extends PapyrusCompartmentEditPart implements 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) {
@@ -629,7 +634,6 @@ public class UseCaseNameEditPartCN extends PapyrusCompartmentEditPart implements if(checkDefaultEdition()) {
return IDirectEdition.DEFAULT_DIRECT_EDITOR;
}
-
// not a named element. no specific editor => do nothing
return IDirectEdition.NO_DIRECT_EDITION;
}
@@ -796,7 +800,6 @@ public class UseCaseNameEditPartCN extends PapyrusCompartmentEditPart implements */
protected void addOwnerElementListeners() {
addListenerFilter(ADD_PARENT_MODEL, this, ((View)getParent().getModel())); //$NON-NLS-1$
-
}
/**
@@ -805,7 +808,6 @@ public class UseCaseNameEditPartCN extends PapyrusCompartmentEditPart implements public void deactivate() {
removeOwnerElementListeners();
super.deactivate();
-
}
/**
@@ -813,6 +815,5 @@ public class UseCaseNameEditPartCN extends PapyrusCompartmentEditPart implements */
protected void removeOwnerElementListeners() {
removeListenerFilter(ADD_PARENT_MODEL);
-
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/AbstractionItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/AbstractionItemSemanticEditPolicy.java index e7029f5d380..50fd6f5989f 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/AbstractionItemSemanticEditPolicy.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/AbstractionItemSemanticEditPolicy.java @@ -83,7 +83,6 @@ public class AbstractionItemSemanticEditPolicy extends UMLBaseItemSemanticEditPo if(provider != null) {
// Retrieve delete command from the Element Edit service
ICommand deleteCommand = provider.getEditCommand(req);
-
if(deleteCommand != null) {
return new ICommandProxy(deleteCommand);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ActivityCompositeCompartmentItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ActivityCompositeCompartmentItemSemanticEditPolicy.java index e7b6f1326eb..0d90db5f45c 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ActivityCompositeCompartmentItemSemanticEditPolicy.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ActivityCompositeCompartmentItemSemanticEditPolicy.java @@ -68,162 +68,98 @@ public class ActivityCompositeCompartmentItemSemanticEditPolicy extends UMLBaseI if(requestElementType == null) {
return super.getCreateCommand(req);
}
-
-
if(UMLElementTypes.Parameter_3088 == requestElementType) {
-
return getGEFWrapper(new ParameterCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Property_3070 == requestElementType) {
-
return getGEFWrapper(new PropertyPartCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.CollaborationUse_3071 == requestElementType) {
-
return getGEFWrapper(new CollaborationUseCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Activity_3072 == requestElementType) {
-
return getGEFWrapper(new ActivityCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Interaction_3073 == requestElementType) {
-
return getGEFWrapper(new InteractionCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.ProtocolStateMachine_3074 == requestElementType) {
-
return getGEFWrapper(new ProtocolStateMachineCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.StateMachine_3075 == requestElementType) {
-
return getGEFWrapper(new StateMachineCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.FunctionBehavior_3076 == requestElementType) {
-
return getGEFWrapper(new FunctionBehaviorCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.OpaqueBehavior_3077 == requestElementType) {
-
return getGEFWrapper(new OpaqueBehaviorCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Component_3081 == requestElementType) {
-
return getGEFWrapper(new ComponentCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Device_3082 == requestElementType) {
-
return getGEFWrapper(new DeviceCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.ExecutionEnvironment_3083 == requestElementType) {
-
return getGEFWrapper(new ExecutionEnvironmentCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Node_3084 == requestElementType) {
-
return getGEFWrapper(new NodeCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Class_3085 == requestElementType) {
-
return getGEFWrapper(new ClassCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Collaboration_3086 == requestElementType) {
-
return getGEFWrapper(new CollaborationCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Interface_3087 == requestElementType) {
-
return getGEFWrapper(new InterfaceCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.PrimitiveType_3078 == requestElementType) {
-
return getGEFWrapper(new PrimitiveTypeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Enumeration_3079 == requestElementType) {
-
return getGEFWrapper(new EnumerationCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.DataType_3080 == requestElementType) {
-
return getGEFWrapper(new DataTypeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Actor_3091 == requestElementType) {
-
return getGEFWrapper(new ActorCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.DeploymentSpecification_3092 == requestElementType) {
-
return getGEFWrapper(new DeploymentSpecificationCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Artifact_3093 == requestElementType) {
-
return getGEFWrapper(new ArtifactCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.InformationItem_3094 == requestElementType) {
-
return getGEFWrapper(new InformationItemCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Signal_3095 == requestElementType) {
-
return getGEFWrapper(new SignalCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.UseCase_3096 == requestElementType) {
-
return getGEFWrapper(new UseCaseCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Comment_3097 == requestElementType) {
-
return getGEFWrapper(new CommentCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.DurationConstraint_3116 == requestElementType) {
-
return getGEFWrapper(new DurationConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.TimeConstraint_3117 == requestElementType) {
-
return getGEFWrapper(new TimeConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.IntervalConstraint_3118 == requestElementType) {
-
return getGEFWrapper(new IntervalConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.InteractionConstraint_3119 == requestElementType) {
-
return getGEFWrapper(new InteractionConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Constraint_3120 == requestElementType) {
-
return getGEFWrapper(new ConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
return super.getCreateCommand(req);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ActivityCompositeCompartmentItemSemanticEditPolicyCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ActivityCompositeCompartmentItemSemanticEditPolicyCN.java index 0a45df31917..ce90f887e8a 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ActivityCompositeCompartmentItemSemanticEditPolicyCN.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ActivityCompositeCompartmentItemSemanticEditPolicyCN.java @@ -68,162 +68,98 @@ public class ActivityCompositeCompartmentItemSemanticEditPolicyCN extends UMLBas if(requestElementType == null) {
return super.getCreateCommand(req);
}
-
-
if(UMLElementTypes.Parameter_3088 == requestElementType) {
-
return getGEFWrapper(new ParameterCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Property_3070 == requestElementType) {
-
return getGEFWrapper(new PropertyPartCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.CollaborationUse_3071 == requestElementType) {
-
return getGEFWrapper(new CollaborationUseCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Activity_3072 == requestElementType) {
-
return getGEFWrapper(new ActivityCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Interaction_3073 == requestElementType) {
-
return getGEFWrapper(new InteractionCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.ProtocolStateMachine_3074 == requestElementType) {
-
return getGEFWrapper(new ProtocolStateMachineCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.StateMachine_3075 == requestElementType) {
-
return getGEFWrapper(new StateMachineCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.FunctionBehavior_3076 == requestElementType) {
-
return getGEFWrapper(new FunctionBehaviorCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.OpaqueBehavior_3077 == requestElementType) {
-
return getGEFWrapper(new OpaqueBehaviorCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Component_3081 == requestElementType) {
-
return getGEFWrapper(new ComponentCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Device_3082 == requestElementType) {
-
return getGEFWrapper(new DeviceCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.ExecutionEnvironment_3083 == requestElementType) {
-
return getGEFWrapper(new ExecutionEnvironmentCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Node_3084 == requestElementType) {
-
return getGEFWrapper(new NodeCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Class_3085 == requestElementType) {
-
return getGEFWrapper(new ClassCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Collaboration_3086 == requestElementType) {
-
return getGEFWrapper(new CollaborationCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Interface_3087 == requestElementType) {
-
return getGEFWrapper(new InterfaceCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.PrimitiveType_3078 == requestElementType) {
-
return getGEFWrapper(new PrimitiveTypeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Enumeration_3079 == requestElementType) {
-
return getGEFWrapper(new EnumerationCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.DataType_3080 == requestElementType) {
-
return getGEFWrapper(new DataTypeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Actor_3091 == requestElementType) {
-
return getGEFWrapper(new ActorCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.DeploymentSpecification_3092 == requestElementType) {
-
return getGEFWrapper(new DeploymentSpecificationCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Artifact_3093 == requestElementType) {
-
return getGEFWrapper(new ArtifactCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.InformationItem_3094 == requestElementType) {
-
return getGEFWrapper(new InformationItemCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Signal_3095 == requestElementType) {
-
return getGEFWrapper(new SignalCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.UseCase_3096 == requestElementType) {
-
return getGEFWrapper(new UseCaseCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Comment_3097 == requestElementType) {
-
return getGEFWrapper(new CommentCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.DurationConstraint_3116 == requestElementType) {
-
return getGEFWrapper(new DurationConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.TimeConstraint_3117 == requestElementType) {
-
return getGEFWrapper(new TimeConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.IntervalConstraint_3118 == requestElementType) {
-
return getGEFWrapper(new IntervalConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.InteractionConstraint_3119 == requestElementType) {
-
return getGEFWrapper(new InteractionConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Constraint_3120 == requestElementType) {
-
return getGEFWrapper(new ConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
return super.getCreateCommand(req);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ActivityCompositeItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ActivityCompositeItemSemanticEditPolicy.java index aabf7f40353..93d31269171 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ActivityCompositeItemSemanticEditPolicy.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ActivityCompositeItemSemanticEditPolicy.java @@ -91,17 +91,11 @@ public class ActivityCompositeItemSemanticEditPolicy extends UMLBaseItemSemantic if(requestElementType == null) {
return super.getCreateCommand(req);
}
-
-
if(UMLElementTypes.Port_3069 == requestElementType) {
-
return getGEFWrapper(new PortCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Parameter_3088 == requestElementType) {
-
return getGEFWrapper(new ParameterCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
return super.getCreateCommand(req);
}
@@ -115,7 +109,6 @@ public class ActivityCompositeItemSemanticEditPolicy extends UMLBaseItemSemantic if(provider != null) {
// Retrieve delete command from the Element Edit service
ICommand deleteCommand = provider.getEditCommand(req);
-
if(deleteCommand != null) {
return new ICommandProxy(deleteCommand);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ActivityCompositeItemSemanticEditPolicyCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ActivityCompositeItemSemanticEditPolicyCN.java index fb46b0c3db9..d367b615b66 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ActivityCompositeItemSemanticEditPolicyCN.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ActivityCompositeItemSemanticEditPolicyCN.java @@ -91,17 +91,11 @@ public class ActivityCompositeItemSemanticEditPolicyCN extends UMLBaseItemSemant if(requestElementType == null) {
return super.getCreateCommand(req);
}
-
-
if(UMLElementTypes.Port_3069 == requestElementType) {
-
return getGEFWrapper(new PortCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Parameter_3088 == requestElementType) {
-
return getGEFWrapper(new ParameterCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
return super.getCreateCommand(req);
}
@@ -115,7 +109,6 @@ public class ActivityCompositeItemSemanticEditPolicyCN extends UMLBaseItemSemant if(provider != null) {
// Retrieve delete command from the Element Edit service
ICommand deleteCommand = provider.getEditCommand(req);
-
if(deleteCommand != null) {
return new ICommandProxy(deleteCommand);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ActorItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ActorItemSemanticEditPolicy.java index d448f12dad1..05b9020ab56 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ActorItemSemanticEditPolicy.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ActorItemSemanticEditPolicy.java @@ -88,7 +88,6 @@ public class ActorItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy { if(provider != null) {
// Retrieve delete command from the Element Edit service
ICommand deleteCommand = provider.getEditCommand(req);
-
if(deleteCommand != null) {
return new ICommandProxy(deleteCommand);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ActorItemSemanticEditPolicyCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ActorItemSemanticEditPolicyCN.java index 953e5501c3f..4dfa69c423e 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ActorItemSemanticEditPolicyCN.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ActorItemSemanticEditPolicyCN.java @@ -88,7 +88,6 @@ public class ActorItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPolicy if(provider != null) {
// Retrieve delete command from the Element Edit service
ICommand deleteCommand = provider.getEditCommand(req);
-
if(deleteCommand != null) {
return new ICommandProxy(deleteCommand);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/AnyReceiveEventItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/AnyReceiveEventItemSemanticEditPolicy.java index 8a5e759e9e3..eab75b661a4 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/AnyReceiveEventItemSemanticEditPolicy.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/AnyReceiveEventItemSemanticEditPolicy.java @@ -83,7 +83,6 @@ public class AnyReceiveEventItemSemanticEditPolicy extends UMLBaseItemSemanticEd if(provider != null) {
// Retrieve delete command from the Element Edit service
ICommand deleteCommand = provider.getEditCommand(req);
-
if(deleteCommand != null) {
return new ICommandProxy(deleteCommand);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ArtifactItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ArtifactItemSemanticEditPolicy.java index 6d51c70f819..15ca60846d7 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ArtifactItemSemanticEditPolicy.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ArtifactItemSemanticEditPolicy.java @@ -88,7 +88,6 @@ public class ArtifactItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolic if(provider != null) {
// Retrieve delete command from the Element Edit service
ICommand deleteCommand = provider.getEditCommand(req);
-
if(deleteCommand != null) {
return new ICommandProxy(deleteCommand);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ArtifactItemSemanticEditPolicyCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ArtifactItemSemanticEditPolicyCN.java index 77fddc2dfbb..e45fa9ea8a5 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ArtifactItemSemanticEditPolicyCN.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ArtifactItemSemanticEditPolicyCN.java @@ -88,7 +88,6 @@ public class ArtifactItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPol if(provider != null) {
// Retrieve delete command from the Element Edit service
ICommand deleteCommand = provider.getEditCommand(req);
-
if(deleteCommand != null) {
return new ICommandProxy(deleteCommand);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/CallEventItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/CallEventItemSemanticEditPolicy.java index 29e0018baca..15ff415f1b0 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/CallEventItemSemanticEditPolicy.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/CallEventItemSemanticEditPolicy.java @@ -83,7 +83,6 @@ public class CallEventItemSemanticEditPolicy extends UMLBaseItemSemanticEditPoli if(provider != null) {
// Retrieve delete command from the Element Edit service
ICommand deleteCommand = provider.getEditCommand(req);
-
if(deleteCommand != null) {
return new ICommandProxy(deleteCommand);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ChangeEventItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ChangeEventItemSemanticEditPolicy.java index c129ad41508..2cbc03ace0c 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ChangeEventItemSemanticEditPolicy.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ChangeEventItemSemanticEditPolicy.java @@ -83,7 +83,6 @@ public class ChangeEventItemSemanticEditPolicy extends UMLBaseItemSemanticEditPo if(provider != null) {
// Retrieve delete command from the Element Edit service
ICommand deleteCommand = provider.getEditCommand(req);
-
if(deleteCommand != null) {
return new ICommandProxy(deleteCommand);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ClassCompositeCompartmentItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ClassCompositeCompartmentItemSemanticEditPolicy.java index ef7e99fbe01..86a1a530260 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ClassCompositeCompartmentItemSemanticEditPolicy.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ClassCompositeCompartmentItemSemanticEditPolicy.java @@ -67,157 +67,95 @@ public class ClassCompositeCompartmentItemSemanticEditPolicy extends UMLBaseItem if(requestElementType == null) {
return super.getCreateCommand(req);
}
-
-
if(UMLElementTypes.Property_3070 == requestElementType) {
-
return getGEFWrapper(new PropertyPartCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.CollaborationUse_3071 == requestElementType) {
-
return getGEFWrapper(new CollaborationUseCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Activity_3072 == requestElementType) {
-
return getGEFWrapper(new ActivityCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Interaction_3073 == requestElementType) {
-
return getGEFWrapper(new InteractionCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.ProtocolStateMachine_3074 == requestElementType) {
-
return getGEFWrapper(new ProtocolStateMachineCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.StateMachine_3075 == requestElementType) {
-
return getGEFWrapper(new StateMachineCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.FunctionBehavior_3076 == requestElementType) {
-
return getGEFWrapper(new FunctionBehaviorCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.OpaqueBehavior_3077 == requestElementType) {
-
return getGEFWrapper(new OpaqueBehaviorCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Component_3081 == requestElementType) {
-
return getGEFWrapper(new ComponentCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Device_3082 == requestElementType) {
-
return getGEFWrapper(new DeviceCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.ExecutionEnvironment_3083 == requestElementType) {
-
return getGEFWrapper(new ExecutionEnvironmentCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Node_3084 == requestElementType) {
-
return getGEFWrapper(new NodeCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Class_3085 == requestElementType) {
-
return getGEFWrapper(new ClassCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Collaboration_3086 == requestElementType) {
-
return getGEFWrapper(new CollaborationCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Interface_3087 == requestElementType) {
-
return getGEFWrapper(new InterfaceCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.PrimitiveType_3078 == requestElementType) {
-
return getGEFWrapper(new PrimitiveTypeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Enumeration_3079 == requestElementType) {
-
return getGEFWrapper(new EnumerationCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.DataType_3080 == requestElementType) {
-
return getGEFWrapper(new DataTypeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Actor_3091 == requestElementType) {
-
return getGEFWrapper(new ActorCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.DeploymentSpecification_3092 == requestElementType) {
-
return getGEFWrapper(new DeploymentSpecificationCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Artifact_3093 == requestElementType) {
-
return getGEFWrapper(new ArtifactCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.InformationItem_3094 == requestElementType) {
-
return getGEFWrapper(new InformationItemCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Signal_3095 == requestElementType) {
-
return getGEFWrapper(new SignalCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.UseCase_3096 == requestElementType) {
-
return getGEFWrapper(new UseCaseCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Comment_3097 == requestElementType) {
-
return getGEFWrapper(new CommentCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Constraint_3120 == requestElementType) {
-
return getGEFWrapper(new ConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.DurationConstraint_3116 == requestElementType) {
-
return getGEFWrapper(new DurationConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.TimeConstraint_3117 == requestElementType) {
-
return getGEFWrapper(new TimeConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.IntervalConstraint_3118 == requestElementType) {
-
return getGEFWrapper(new IntervalConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.InteractionConstraint_3119 == requestElementType) {
-
return getGEFWrapper(new InteractionConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
return super.getCreateCommand(req);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ClassCompositeCompartmentItemSemanticEditPolicyCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ClassCompositeCompartmentItemSemanticEditPolicyCN.java index 27c2a941db7..488ef06131a 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ClassCompositeCompartmentItemSemanticEditPolicyCN.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ClassCompositeCompartmentItemSemanticEditPolicyCN.java @@ -67,157 +67,95 @@ public class ClassCompositeCompartmentItemSemanticEditPolicyCN extends UMLBaseIt if(requestElementType == null) {
return super.getCreateCommand(req);
}
-
-
if(UMLElementTypes.Property_3070 == requestElementType) {
-
return getGEFWrapper(new PropertyPartCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.CollaborationUse_3071 == requestElementType) {
-
return getGEFWrapper(new CollaborationUseCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Activity_3072 == requestElementType) {
-
return getGEFWrapper(new ActivityCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Interaction_3073 == requestElementType) {
-
return getGEFWrapper(new InteractionCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.ProtocolStateMachine_3074 == requestElementType) {
-
return getGEFWrapper(new ProtocolStateMachineCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.StateMachine_3075 == requestElementType) {
-
return getGEFWrapper(new StateMachineCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.FunctionBehavior_3076 == requestElementType) {
-
return getGEFWrapper(new FunctionBehaviorCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.OpaqueBehavior_3077 == requestElementType) {
-
return getGEFWrapper(new OpaqueBehaviorCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Component_3081 == requestElementType) {
-
return getGEFWrapper(new ComponentCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Device_3082 == requestElementType) {
-
return getGEFWrapper(new DeviceCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.ExecutionEnvironment_3083 == requestElementType) {
-
return getGEFWrapper(new ExecutionEnvironmentCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Node_3084 == requestElementType) {
-
return getGEFWrapper(new NodeCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Class_3085 == requestElementType) {
-
return getGEFWrapper(new ClassCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Collaboration_3086 == requestElementType) {
-
return getGEFWrapper(new CollaborationCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Interface_3087 == requestElementType) {
-
return getGEFWrapper(new InterfaceCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.PrimitiveType_3078 == requestElementType) {
-
return getGEFWrapper(new PrimitiveTypeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Enumeration_3079 == requestElementType) {
-
return getGEFWrapper(new EnumerationCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.DataType_3080 == requestElementType) {
-
return getGEFWrapper(new DataTypeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Actor_3091 == requestElementType) {
-
return getGEFWrapper(new ActorCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.DeploymentSpecification_3092 == requestElementType) {
-
return getGEFWrapper(new DeploymentSpecificationCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Artifact_3093 == requestElementType) {
-
return getGEFWrapper(new ArtifactCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.InformationItem_3094 == requestElementType) {
-
return getGEFWrapper(new InformationItemCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Signal_3095 == requestElementType) {
-
return getGEFWrapper(new SignalCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.UseCase_3096 == requestElementType) {
-
return getGEFWrapper(new UseCaseCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Comment_3097 == requestElementType) {
-
return getGEFWrapper(new CommentCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.DurationConstraint_3116 == requestElementType) {
-
return getGEFWrapper(new DurationConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.TimeConstraint_3117 == requestElementType) {
-
return getGEFWrapper(new TimeConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.IntervalConstraint_3118 == requestElementType) {
-
return getGEFWrapper(new IntervalConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.InteractionConstraint_3119 == requestElementType) {
-
return getGEFWrapper(new InteractionConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Constraint_3120 == requestElementType) {
-
return getGEFWrapper(new ConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
return super.getCreateCommand(req);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ClassCompositeItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ClassCompositeItemSemanticEditPolicy.java index 3ebefc1e8e4..560d4bac7ad 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ClassCompositeItemSemanticEditPolicy.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ClassCompositeItemSemanticEditPolicy.java @@ -90,12 +90,8 @@ public class ClassCompositeItemSemanticEditPolicy extends UMLBaseItemSemanticEdi if(requestElementType == null) {
return super.getCreateCommand(req);
}
-
-
if(UMLElementTypes.Port_3069 == requestElementType) {
-
return getGEFWrapper(new PortCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
return super.getCreateCommand(req);
}
@@ -109,7 +105,6 @@ public class ClassCompositeItemSemanticEditPolicy extends UMLBaseItemSemanticEdi if(provider != null) {
// Retrieve delete command from the Element Edit service
ICommand deleteCommand = provider.getEditCommand(req);
-
if(deleteCommand != null) {
return new ICommandProxy(deleteCommand);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ClassCompositeItemSemanticEditPolicyCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ClassCompositeItemSemanticEditPolicyCN.java index 41adf1ebd13..0475487d087 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ClassCompositeItemSemanticEditPolicyCN.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ClassCompositeItemSemanticEditPolicyCN.java @@ -90,12 +90,8 @@ public class ClassCompositeItemSemanticEditPolicyCN extends UMLBaseItemSemanticE if(requestElementType == null) {
return super.getCreateCommand(req);
}
-
-
if(UMLElementTypes.Port_3069 == requestElementType) {
-
return getGEFWrapper(new PortCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
return super.getCreateCommand(req);
}
@@ -109,7 +105,6 @@ public class ClassCompositeItemSemanticEditPolicyCN extends UMLBaseItemSemanticE if(provider != null) {
// Retrieve delete command from the Element Edit service
ICommand deleteCommand = provider.getEditCommand(req);
-
if(deleteCommand != null) {
return new ICommandProxy(deleteCommand);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/CollaborationCompositeCompartmentItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/CollaborationCompositeCompartmentItemSemanticEditPolicy.java index 978a72a7383..dea7e267aaa 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/CollaborationCompositeCompartmentItemSemanticEditPolicy.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/CollaborationCompositeCompartmentItemSemanticEditPolicy.java @@ -46,52 +46,32 @@ public class CollaborationCompositeCompartmentItemSemanticEditPolicy extends UML if(requestElementType == null) {
return super.getCreateCommand(req);
}
-
-
if(UMLElementTypes.Property_3070 == requestElementType) {
-
return getGEFWrapper(new PropertyPartCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.CollaborationUse_3071 == requestElementType) {
-
return getGEFWrapper(new CollaborationUseCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Comment_3097 == requestElementType) {
-
return getGEFWrapper(new CommentCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.ConnectableElement_3115 == requestElementType) {
-
return getGEFWrapper(new CollaborationRoleCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.DurationConstraint_3116 == requestElementType) {
-
return getGEFWrapper(new DurationConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.TimeConstraint_3117 == requestElementType) {
-
return getGEFWrapper(new TimeConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.IntervalConstraint_3118 == requestElementType) {
-
return getGEFWrapper(new IntervalConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.InteractionConstraint_3119 == requestElementType) {
-
return getGEFWrapper(new InteractionConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Constraint_3120 == requestElementType) {
-
return getGEFWrapper(new ConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
return super.getCreateCommand(req);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/CollaborationCompositeCompartmentItemSemanticEditPolicyCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/CollaborationCompositeCompartmentItemSemanticEditPolicyCN.java index 1732e0bac77..c7c5092c8ed 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/CollaborationCompositeCompartmentItemSemanticEditPolicyCN.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/CollaborationCompositeCompartmentItemSemanticEditPolicyCN.java @@ -46,52 +46,32 @@ public class CollaborationCompositeCompartmentItemSemanticEditPolicyCN extends U if(requestElementType == null) {
return super.getCreateCommand(req);
}
-
-
if(UMLElementTypes.Property_3070 == requestElementType) {
-
return getGEFWrapper(new PropertyPartCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.CollaborationUse_3071 == requestElementType) {
-
return getGEFWrapper(new CollaborationUseCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Comment_3097 == requestElementType) {
-
return getGEFWrapper(new CommentCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.ConnectableElement_3115 == requestElementType) {
-
return getGEFWrapper(new CollaborationRoleCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.DurationConstraint_3116 == requestElementType) {
-
return getGEFWrapper(new DurationConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.TimeConstraint_3117 == requestElementType) {
-
return getGEFWrapper(new TimeConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.IntervalConstraint_3118 == requestElementType) {
-
return getGEFWrapper(new IntervalConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.InteractionConstraint_3119 == requestElementType) {
-
return getGEFWrapper(new InteractionConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Constraint_3120 == requestElementType) {
-
return getGEFWrapper(new ConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
return super.getCreateCommand(req);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/CollaborationCompositeItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/CollaborationCompositeItemSemanticEditPolicy.java index ba1b118452e..8d67e24f138 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/CollaborationCompositeItemSemanticEditPolicy.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/CollaborationCompositeItemSemanticEditPolicy.java @@ -88,7 +88,6 @@ public class CollaborationCompositeItemSemanticEditPolicy extends UMLBaseItemSem if(provider != null) {
// Retrieve delete command from the Element Edit service
ICommand deleteCommand = provider.getEditCommand(req);
-
if(deleteCommand != null) {
return new ICommandProxy(deleteCommand);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/CollaborationCompositeItemSemanticEditPolicyCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/CollaborationCompositeItemSemanticEditPolicyCN.java index 0e25839b620..4bd62e49725 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/CollaborationCompositeItemSemanticEditPolicyCN.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/CollaborationCompositeItemSemanticEditPolicyCN.java @@ -88,7 +88,6 @@ public class CollaborationCompositeItemSemanticEditPolicyCN extends UMLBaseItemS if(provider != null) {
// Retrieve delete command from the Element Edit service
ICommand deleteCommand = provider.getEditCommand(req);
-
if(deleteCommand != null) {
return new ICommandProxy(deleteCommand);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/CollaborationRoleItemSemanticEditPolicyCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/CollaborationRoleItemSemanticEditPolicyCN.java index af943d9cc85..e945519a7ff 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/CollaborationRoleItemSemanticEditPolicyCN.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/CollaborationRoleItemSemanticEditPolicyCN.java @@ -83,7 +83,6 @@ public class CollaborationRoleItemSemanticEditPolicyCN extends UMLBaseItemSemant if(provider != null) {
// Retrieve delete command from the Element Edit service
ICommand deleteCommand = provider.getEditCommand(req);
-
if(deleteCommand != null) {
return new ICommandProxy(deleteCommand);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/CollaborationUseItemSemanticEditPolicyCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/CollaborationUseItemSemanticEditPolicyCN.java index b41452a3c73..a00b944408a 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/CollaborationUseItemSemanticEditPolicyCN.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/CollaborationUseItemSemanticEditPolicyCN.java @@ -83,7 +83,6 @@ public class CollaborationUseItemSemanticEditPolicyCN extends UMLBaseItemSemanti if(provider != null) {
// Retrieve delete command from the Element Edit service
ICommand deleteCommand = provider.getEditCommand(req);
-
if(deleteCommand != null) {
return new ICommandProxy(deleteCommand);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/CommentItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/CommentItemSemanticEditPolicy.java index 3ee03c92d68..caad1f9d209 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/CommentItemSemanticEditPolicy.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/CommentItemSemanticEditPolicy.java @@ -53,7 +53,6 @@ public class CommentItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy if(provider != null) {
// Retrieve delete command from the Element Edit service
ICommand deleteCommand = provider.getEditCommand(req);
-
if(deleteCommand != null) {
return new ICommandProxy(deleteCommand);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/CommentItemSemanticEditPolicyCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/CommentItemSemanticEditPolicyCN.java index 51cac0313ec..ba21d5b4e21 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/CommentItemSemanticEditPolicyCN.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/CommentItemSemanticEditPolicyCN.java @@ -53,7 +53,6 @@ public class CommentItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPoli if(provider != null) {
// Retrieve delete command from the Element Edit service
ICommand deleteCommand = provider.getEditCommand(req);
-
if(deleteCommand != null) {
return new ICommandProxy(deleteCommand);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ComponentCompositeCompartmentItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ComponentCompositeCompartmentItemSemanticEditPolicy.java index 7471a2258de..e2633b72665 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ComponentCompositeCompartmentItemSemanticEditPolicy.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ComponentCompositeCompartmentItemSemanticEditPolicy.java @@ -67,157 +67,95 @@ public class ComponentCompositeCompartmentItemSemanticEditPolicy extends UMLBase if(requestElementType == null) {
return super.getCreateCommand(req);
}
-
-
if(UMLElementTypes.Property_3070 == requestElementType) {
-
return getGEFWrapper(new PropertyPartCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.CollaborationUse_3071 == requestElementType) {
-
return getGEFWrapper(new CollaborationUseCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Activity_3072 == requestElementType) {
-
return getGEFWrapper(new ActivityCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Interaction_3073 == requestElementType) {
-
return getGEFWrapper(new InteractionCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.ProtocolStateMachine_3074 == requestElementType) {
-
return getGEFWrapper(new ProtocolStateMachineCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.StateMachine_3075 == requestElementType) {
-
return getGEFWrapper(new StateMachineCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.FunctionBehavior_3076 == requestElementType) {
-
return getGEFWrapper(new FunctionBehaviorCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.OpaqueBehavior_3077 == requestElementType) {
-
return getGEFWrapper(new OpaqueBehaviorCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Component_3081 == requestElementType) {
-
return getGEFWrapper(new ComponentCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Device_3082 == requestElementType) {
-
return getGEFWrapper(new DeviceCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.ExecutionEnvironment_3083 == requestElementType) {
-
return getGEFWrapper(new ExecutionEnvironmentCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Node_3084 == requestElementType) {
-
return getGEFWrapper(new NodeCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Class_3085 == requestElementType) {
-
return getGEFWrapper(new ClassCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Collaboration_3086 == requestElementType) {
-
return getGEFWrapper(new CollaborationCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Interface_3087 == requestElementType) {
-
return getGEFWrapper(new InterfaceCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.PrimitiveType_3078 == requestElementType) {
-
return getGEFWrapper(new PrimitiveTypeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Enumeration_3079 == requestElementType) {
-
return getGEFWrapper(new EnumerationCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.DataType_3080 == requestElementType) {
-
return getGEFWrapper(new DataTypeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Actor_3091 == requestElementType) {
-
return getGEFWrapper(new ActorCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.DeploymentSpecification_3092 == requestElementType) {
-
return getGEFWrapper(new DeploymentSpecificationCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Artifact_3093 == requestElementType) {
-
return getGEFWrapper(new ArtifactCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.InformationItem_3094 == requestElementType) {
-
return getGEFWrapper(new InformationItemCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Signal_3095 == requestElementType) {
-
return getGEFWrapper(new SignalCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.UseCase_3096 == requestElementType) {
-
return getGEFWrapper(new UseCaseCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Comment_3097 == requestElementType) {
-
return getGEFWrapper(new CommentCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.DurationConstraint_3116 == requestElementType) {
-
return getGEFWrapper(new DurationConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.TimeConstraint_3117 == requestElementType) {
-
return getGEFWrapper(new TimeConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.IntervalConstraint_3118 == requestElementType) {
-
return getGEFWrapper(new IntervalConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.InteractionConstraint_3119 == requestElementType) {
-
return getGEFWrapper(new InteractionConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Constraint_3120 == requestElementType) {
-
return getGEFWrapper(new ConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
return super.getCreateCommand(req);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ComponentCompositeCompartmentItemSemanticEditPolicyCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ComponentCompositeCompartmentItemSemanticEditPolicyCN.java index ed4c59e738c..4f67b253c0b 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ComponentCompositeCompartmentItemSemanticEditPolicyCN.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ComponentCompositeCompartmentItemSemanticEditPolicyCN.java @@ -67,157 +67,95 @@ public class ComponentCompositeCompartmentItemSemanticEditPolicyCN extends UMLBa if(requestElementType == null) {
return super.getCreateCommand(req);
}
-
-
if(UMLElementTypes.Property_3070 == requestElementType) {
-
return getGEFWrapper(new PropertyPartCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.CollaborationUse_3071 == requestElementType) {
-
return getGEFWrapper(new CollaborationUseCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Activity_3072 == requestElementType) {
-
return getGEFWrapper(new ActivityCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Interaction_3073 == requestElementType) {
-
return getGEFWrapper(new InteractionCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.ProtocolStateMachine_3074 == requestElementType) {
-
return getGEFWrapper(new ProtocolStateMachineCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.StateMachine_3075 == requestElementType) {
-
return getGEFWrapper(new StateMachineCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.FunctionBehavior_3076 == requestElementType) {
-
return getGEFWrapper(new FunctionBehaviorCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.OpaqueBehavior_3077 == requestElementType) {
-
return getGEFWrapper(new OpaqueBehaviorCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Component_3081 == requestElementType) {
-
return getGEFWrapper(new ComponentCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Device_3082 == requestElementType) {
-
return getGEFWrapper(new DeviceCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.ExecutionEnvironment_3083 == requestElementType) {
-
return getGEFWrapper(new ExecutionEnvironmentCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Node_3084 == requestElementType) {
-
return getGEFWrapper(new NodeCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Class_3085 == requestElementType) {
-
return getGEFWrapper(new ClassCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Collaboration_3086 == requestElementType) {
-
return getGEFWrapper(new CollaborationCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Interface_3087 == requestElementType) {
-
return getGEFWrapper(new InterfaceCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.PrimitiveType_3078 == requestElementType) {
-
return getGEFWrapper(new PrimitiveTypeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Enumeration_3079 == requestElementType) {
-
return getGEFWrapper(new EnumerationCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.DataType_3080 == requestElementType) {
-
return getGEFWrapper(new DataTypeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Actor_3091 == requestElementType) {
-
return getGEFWrapper(new ActorCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.DeploymentSpecification_3092 == requestElementType) {
-
return getGEFWrapper(new DeploymentSpecificationCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Artifact_3093 == requestElementType) {
-
return getGEFWrapper(new ArtifactCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.InformationItem_3094 == requestElementType) {
-
return getGEFWrapper(new InformationItemCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Signal_3095 == requestElementType) {
-
return getGEFWrapper(new SignalCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.UseCase_3096 == requestElementType) {
-
return getGEFWrapper(new UseCaseCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Comment_3097 == requestElementType) {
-
return getGEFWrapper(new CommentCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.DurationConstraint_3116 == requestElementType) {
-
return getGEFWrapper(new DurationConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.TimeConstraint_3117 == requestElementType) {
-
return getGEFWrapper(new TimeConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.IntervalConstraint_3118 == requestElementType) {
-
return getGEFWrapper(new IntervalConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.InteractionConstraint_3119 == requestElementType) {
-
return getGEFWrapper(new InteractionConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Constraint_3120 == requestElementType) {
-
return getGEFWrapper(new ConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
return super.getCreateCommand(req);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ComponentCompositeItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ComponentCompositeItemSemanticEditPolicy.java index 4a4271fb065..07250c0c4db 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ComponentCompositeItemSemanticEditPolicy.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ComponentCompositeItemSemanticEditPolicy.java @@ -90,12 +90,8 @@ public class ComponentCompositeItemSemanticEditPolicy extends UMLBaseItemSemanti if(requestElementType == null) {
return super.getCreateCommand(req);
}
-
-
if(UMLElementTypes.Port_3069 == requestElementType) {
-
return getGEFWrapper(new PortCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
return super.getCreateCommand(req);
}
@@ -109,7 +105,6 @@ public class ComponentCompositeItemSemanticEditPolicy extends UMLBaseItemSemanti if(provider != null) {
// Retrieve delete command from the Element Edit service
ICommand deleteCommand = provider.getEditCommand(req);
-
if(deleteCommand != null) {
return new ICommandProxy(deleteCommand);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ComponentCompositeItemSemanticEditPolicyCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ComponentCompositeItemSemanticEditPolicyCN.java index 6948ebe7020..ea587d2f808 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ComponentCompositeItemSemanticEditPolicyCN.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ComponentCompositeItemSemanticEditPolicyCN.java @@ -90,12 +90,8 @@ public class ComponentCompositeItemSemanticEditPolicyCN extends UMLBaseItemSeman if(requestElementType == null) {
return super.getCreateCommand(req);
}
-
-
if(UMLElementTypes.Port_3069 == requestElementType) {
-
return getGEFWrapper(new PortCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
return super.getCreateCommand(req);
}
@@ -109,7 +105,6 @@ public class ComponentCompositeItemSemanticEditPolicyCN extends UMLBaseItemSeman if(provider != null) {
// Retrieve delete command from the Element Edit service
ICommand deleteCommand = provider.getEditCommand(req);
-
if(deleteCommand != null) {
return new ICommandProxy(deleteCommand);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ComponentRealizationItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ComponentRealizationItemSemanticEditPolicy.java index eb878d88875..fceae34b86d 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ComponentRealizationItemSemanticEditPolicy.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ComponentRealizationItemSemanticEditPolicy.java @@ -83,7 +83,6 @@ public class ComponentRealizationItemSemanticEditPolicy extends UMLBaseItemSeman if(provider != null) {
// Retrieve delete command from the Element Edit service
ICommand deleteCommand = provider.getEditCommand(req);
-
if(deleteCommand != null) {
return new ICommandProxy(deleteCommand);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/CompositeStructureDiagramItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/CompositeStructureDiagramItemSemanticEditPolicy.java index 50eb6d27807..b41d22eab93 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/CompositeStructureDiagramItemSemanticEditPolicy.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/CompositeStructureDiagramItemSemanticEditPolicy.java @@ -90,252 +90,152 @@ public class CompositeStructureDiagramItemSemanticEditPolicy extends UMLBaseItem if(requestElementType == null) {
return super.getCreateCommand(req);
}
-
-
if(UMLElementTypes.Activity_2060 == requestElementType) {
-
return getGEFWrapper(new ActivityCompositeCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Interaction_2061 == requestElementType) {
-
return getGEFWrapper(new InteractionCompositeCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.ProtocolStateMachine_2062 == requestElementType) {
-
return getGEFWrapper(new ProtocolStateMachineCompositeCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.StateMachine_2063 == requestElementType) {
-
return getGEFWrapper(new StateMachineCompositeCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.FunctionBehavior_2064 == requestElementType) {
-
return getGEFWrapper(new FunctionBehaviorCompositeCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.OpaqueBehavior_2065 == requestElementType) {
-
return getGEFWrapper(new OpaqueBehaviorCompositeCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Component_2069 == requestElementType) {
-
return getGEFWrapper(new ComponentCompositeCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Device_2070 == requestElementType) {
-
return getGEFWrapper(new DeviceCompositeCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.ExecutionEnvironment_2071 == requestElementType) {
-
return getGEFWrapper(new ExecutionEnvironmentCompositeCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Node_2072 == requestElementType) {
-
return getGEFWrapper(new NodeCompositeCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Class_2073 == requestElementType) {
-
return getGEFWrapper(new ClassCompositeCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Collaboration_2075 == requestElementType) {
-
return getGEFWrapper(new CollaborationCompositeCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Interface_2076 == requestElementType) {
-
return getGEFWrapper(new InterfaceCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.PrimitiveType_2066 == requestElementType) {
-
return getGEFWrapper(new PrimitiveTypeCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Enumeration_2067 == requestElementType) {
-
return getGEFWrapper(new EnumerationCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.DataType_2068 == requestElementType) {
-
return getGEFWrapper(new DataTypeCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Actor_2077 == requestElementType) {
-
return getGEFWrapper(new ActorCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.DeploymentSpecification_2078 == requestElementType) {
-
return getGEFWrapper(new DeploymentSpecificationCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Artifact_2079 == requestElementType) {
-
return getGEFWrapper(new ArtifactCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.InformationItem_2080 == requestElementType) {
-
return getGEFWrapper(new InformationItemCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Signal_2081 == requestElementType) {
-
return getGEFWrapper(new SignalCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.UseCase_2082 == requestElementType) {
-
return getGEFWrapper(new UseCaseCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.SignalEvent_2083 == requestElementType) {
-
return getGEFWrapper(new SignalEventCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.CallEvent_2084 == requestElementType) {
-
return getGEFWrapper(new CallEventCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.AnyReceiveEvent_2085 == requestElementType) {
-
return getGEFWrapper(new AnyReceiveEventCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.ChangeEvent_2088 == requestElementType) {
-
return getGEFWrapper(new ChangeEventCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.TimeEvent_2089 == requestElementType) {
-
return getGEFWrapper(new TimeEventCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.DurationObservation_2093 == requestElementType) {
-
return getGEFWrapper(new DurationObservationCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.TimeObservation_2094 == requestElementType) {
-
return getGEFWrapper(new TimeObservationCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.LiteralBoolean_2095 == requestElementType) {
-
return getGEFWrapper(new LiteralBooleanCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.LiteralInteger_2096 == requestElementType) {
-
return getGEFWrapper(new LiteralIntegerCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.LiteralNull_2097 == requestElementType) {
-
return getGEFWrapper(new LiteralNullCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.LiteralString_2098 == requestElementType) {
-
return getGEFWrapper(new LiteralStringCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.LiteralUnlimitedNatural_2099 == requestElementType) {
-
return getGEFWrapper(new LiteralUnlimitedNaturalCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.StringExpression_2100 == requestElementType) {
-
return getGEFWrapper(new StringExpressionCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.OpaqueExpression_2101 == requestElementType) {
-
return getGEFWrapper(new OpaqueExpressionCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.TimeExpression_2102 == requestElementType) {
-
return getGEFWrapper(new TimeExpressionCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Expression_2103 == requestElementType) {
-
return getGEFWrapper(new ExpressionCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Duration_2104 == requestElementType) {
-
return getGEFWrapper(new DurationCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.TimeInterval_2105 == requestElementType) {
-
return getGEFWrapper(new TimeIntervalCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.DurationInterval_2106 == requestElementType) {
-
return getGEFWrapper(new DurationIntervalCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Interval_2107 == requestElementType) {
-
return getGEFWrapper(new IntervalCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.InstanceValue_2108 == requestElementType) {
-
return getGEFWrapper(new InstanceValueCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Comment_2109 == requestElementType) {
-
return getGEFWrapper(new CommentCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.DurationConstraint_2110 == requestElementType) {
-
return getGEFWrapper(new DurationConstraintCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.TimeConstraint_2111 == requestElementType) {
-
return getGEFWrapper(new TimeConstraintCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.IntervalConstraint_2112 == requestElementType) {
-
return getGEFWrapper(new IntervalConstraintCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.InteractionConstraint_2113 == requestElementType) {
-
return getGEFWrapper(new InteractionConstraintCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Constraint_2114 == requestElementType) {
-
return getGEFWrapper(new ConstraintCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
return super.getCreateCommand(req);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ConnectorItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ConnectorItemSemanticEditPolicy.java index d40d5ebecc8..69310592edf 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ConnectorItemSemanticEditPolicy.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ConnectorItemSemanticEditPolicy.java @@ -83,7 +83,6 @@ public class ConnectorItemSemanticEditPolicy extends UMLBaseItemSemanticEditPoli if(provider != null) {
// Retrieve delete command from the Element Edit service
ICommand deleteCommand = provider.getEditCommand(req);
-
if(deleteCommand != null) {
return new ICommandProxy(deleteCommand);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ConstraintItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ConstraintItemSemanticEditPolicy.java index c4d8bfc8c7b..a6d2439d3a1 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ConstraintItemSemanticEditPolicy.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ConstraintItemSemanticEditPolicy.java @@ -83,7 +83,6 @@ public class ConstraintItemSemanticEditPolicy extends UMLBaseItemSemanticEditPol if(provider != null) {
// Retrieve delete command from the Element Edit service
ICommand deleteCommand = provider.getEditCommand(req);
-
if(deleteCommand != null) {
return new ICommandProxy(deleteCommand);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ConstraintItemSemanticEditPolicyCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ConstraintItemSemanticEditPolicyCN.java index d1e8cdb6261..1173cfd9915 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ConstraintItemSemanticEditPolicyCN.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ConstraintItemSemanticEditPolicyCN.java @@ -83,7 +83,6 @@ public class ConstraintItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditP if(provider != null) {
// Retrieve delete command from the Element Edit service
ICommand deleteCommand = provider.getEditCommand(req);
-
if(deleteCommand != null) {
return new ICommandProxy(deleteCommand);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/DataTypeAttributeCompartmentItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/DataTypeAttributeCompartmentItemSemanticEditPolicy.java index 01cdab2b13c..cfb28591e01 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/DataTypeAttributeCompartmentItemSemanticEditPolicy.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/DataTypeAttributeCompartmentItemSemanticEditPolicy.java @@ -38,12 +38,8 @@ public class DataTypeAttributeCompartmentItemSemanticEditPolicy extends UMLBaseI if(requestElementType == null) {
return super.getCreateCommand(req);
}
-
-
if(UMLElementTypes.Property_3101 == requestElementType) {
-
return getGEFWrapper(new PropertyCreateCommandCLN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
return super.getCreateCommand(req);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/DataTypeAttributeCompartmentItemSemanticEditPolicyCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/DataTypeAttributeCompartmentItemSemanticEditPolicyCN.java index 79bad967794..f8e31d815da 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/DataTypeAttributeCompartmentItemSemanticEditPolicyCN.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/DataTypeAttributeCompartmentItemSemanticEditPolicyCN.java @@ -38,12 +38,8 @@ public class DataTypeAttributeCompartmentItemSemanticEditPolicyCN extends UMLBas if(requestElementType == null) {
return super.getCreateCommand(req);
}
-
-
if(UMLElementTypes.Property_3101 == requestElementType) {
-
return getGEFWrapper(new PropertyCreateCommandCLN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
return super.getCreateCommand(req);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/DataTypeItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/DataTypeItemSemanticEditPolicy.java index d8e5bf29741..1ab9b9c604e 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/DataTypeItemSemanticEditPolicy.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/DataTypeItemSemanticEditPolicy.java @@ -88,7 +88,6 @@ public class DataTypeItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolic if(provider != null) {
// Retrieve delete command from the Element Edit service
ICommand deleteCommand = provider.getEditCommand(req);
-
if(deleteCommand != null) {
return new ICommandProxy(deleteCommand);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/DataTypeItemSemanticEditPolicyCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/DataTypeItemSemanticEditPolicyCN.java index 3fc73b4bfc5..a61b2bde5a5 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/DataTypeItemSemanticEditPolicyCN.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/DataTypeItemSemanticEditPolicyCN.java @@ -88,7 +88,6 @@ public class DataTypeItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPol if(provider != null) {
// Retrieve delete command from the Element Edit service
ICommand deleteCommand = provider.getEditCommand(req);
-
if(deleteCommand != null) {
return new ICommandProxy(deleteCommand);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/DataTypeOperationCompartmentItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/DataTypeOperationCompartmentItemSemanticEditPolicy.java index 2f863f6a56c..aa363e43cf8 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/DataTypeOperationCompartmentItemSemanticEditPolicy.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/DataTypeOperationCompartmentItemSemanticEditPolicy.java @@ -38,12 +38,8 @@ public class DataTypeOperationCompartmentItemSemanticEditPolicy extends UMLBaseI if(requestElementType == null) {
return super.getCreateCommand(req);
}
-
-
if(UMLElementTypes.Operation_3102 == requestElementType) {
-
return getGEFWrapper(new OperationCreateCommandCLN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
return super.getCreateCommand(req);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/DataTypeOperationCompartmentItemSemanticEditPolicyCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/DataTypeOperationCompartmentItemSemanticEditPolicyCN.java index 29efedd292a..6849e0bb569 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/DataTypeOperationCompartmentItemSemanticEditPolicyCN.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/DataTypeOperationCompartmentItemSemanticEditPolicyCN.java @@ -38,12 +38,8 @@ public class DataTypeOperationCompartmentItemSemanticEditPolicyCN extends UMLBas if(requestElementType == null) {
return super.getCreateCommand(req);
}
-
-
if(UMLElementTypes.Operation_3102 == requestElementType) {
-
return getGEFWrapper(new OperationCreateCommandCLN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
return super.getCreateCommand(req);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/DependencyItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/DependencyItemSemanticEditPolicy.java index d71b331647c..d788f93b3b6 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/DependencyItemSemanticEditPolicy.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/DependencyItemSemanticEditPolicy.java @@ -83,7 +83,6 @@ public class DependencyItemSemanticEditPolicy extends UMLBaseItemSemanticEditPol if(provider != null) {
// Retrieve delete command from the Element Edit service
ICommand deleteCommand = provider.getEditCommand(req);
-
if(deleteCommand != null) {
return new ICommandProxy(deleteCommand);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/DeploymentItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/DeploymentItemSemanticEditPolicy.java index dee4cf30ff7..1c7f7794614 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/DeploymentItemSemanticEditPolicy.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/DeploymentItemSemanticEditPolicy.java @@ -83,7 +83,6 @@ public class DeploymentItemSemanticEditPolicy extends UMLBaseItemSemanticEditPol if(provider != null) {
// Retrieve delete command from the Element Edit service
ICommand deleteCommand = provider.getEditCommand(req);
-
if(deleteCommand != null) {
return new ICommandProxy(deleteCommand);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/DeploymentSpecificationItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/DeploymentSpecificationItemSemanticEditPolicy.java index 16da8800985..7abb87349e9 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/DeploymentSpecificationItemSemanticEditPolicy.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/DeploymentSpecificationItemSemanticEditPolicy.java @@ -88,7 +88,6 @@ public class DeploymentSpecificationItemSemanticEditPolicy extends UMLBaseItemSe if(provider != null) {
// Retrieve delete command from the Element Edit service
ICommand deleteCommand = provider.getEditCommand(req);
-
if(deleteCommand != null) {
return new ICommandProxy(deleteCommand);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/DeploymentSpecificationItemSemanticEditPolicyCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/DeploymentSpecificationItemSemanticEditPolicyCN.java index 7a0f442be9d..11d398ea3d5 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/DeploymentSpecificationItemSemanticEditPolicyCN.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/DeploymentSpecificationItemSemanticEditPolicyCN.java @@ -88,7 +88,6 @@ public class DeploymentSpecificationItemSemanticEditPolicyCN extends UMLBaseItem if(provider != null) {
// Retrieve delete command from the Element Edit service
ICommand deleteCommand = provider.getEditCommand(req);
-
if(deleteCommand != null) {
return new ICommandProxy(deleteCommand);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/DeviceCompositeCompartmentItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/DeviceCompositeCompartmentItemSemanticEditPolicy.java index 43cf1e253c3..0ed429672b6 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/DeviceCompositeCompartmentItemSemanticEditPolicy.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/DeviceCompositeCompartmentItemSemanticEditPolicy.java @@ -67,157 +67,95 @@ public class DeviceCompositeCompartmentItemSemanticEditPolicy extends UMLBaseIte if(requestElementType == null) {
return super.getCreateCommand(req);
}
-
-
if(UMLElementTypes.Property_3070 == requestElementType) {
-
return getGEFWrapper(new PropertyPartCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.CollaborationUse_3071 == requestElementType) {
-
return getGEFWrapper(new CollaborationUseCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Activity_3072 == requestElementType) {
-
return getGEFWrapper(new ActivityCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Interaction_3073 == requestElementType) {
-
return getGEFWrapper(new InteractionCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.ProtocolStateMachine_3074 == requestElementType) {
-
return getGEFWrapper(new ProtocolStateMachineCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.StateMachine_3075 == requestElementType) {
-
return getGEFWrapper(new StateMachineCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.FunctionBehavior_3076 == requestElementType) {
-
return getGEFWrapper(new FunctionBehaviorCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.OpaqueBehavior_3077 == requestElementType) {
-
return getGEFWrapper(new OpaqueBehaviorCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Component_3081 == requestElementType) {
-
return getGEFWrapper(new ComponentCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Device_3082 == requestElementType) {
-
return getGEFWrapper(new DeviceCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.ExecutionEnvironment_3083 == requestElementType) {
-
return getGEFWrapper(new ExecutionEnvironmentCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Node_3084 == requestElementType) {
-
return getGEFWrapper(new NodeCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Class_3085 == requestElementType) {
-
return getGEFWrapper(new ClassCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Collaboration_3086 == requestElementType) {
-
return getGEFWrapper(new CollaborationCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Interface_3087 == requestElementType) {
-
return getGEFWrapper(new InterfaceCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.PrimitiveType_3078 == requestElementType) {
-
return getGEFWrapper(new PrimitiveTypeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Enumeration_3079 == requestElementType) {
-
return getGEFWrapper(new EnumerationCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.DataType_3080 == requestElementType) {
-
return getGEFWrapper(new DataTypeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Actor_3091 == requestElementType) {
-
return getGEFWrapper(new ActorCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.DeploymentSpecification_3092 == requestElementType) {
-
return getGEFWrapper(new DeploymentSpecificationCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Artifact_3093 == requestElementType) {
-
return getGEFWrapper(new ArtifactCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.InformationItem_3094 == requestElementType) {
-
return getGEFWrapper(new InformationItemCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Signal_3095 == requestElementType) {
-
return getGEFWrapper(new SignalCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.UseCase_3096 == requestElementType) {
-
return getGEFWrapper(new UseCaseCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Comment_3097 == requestElementType) {
-
return getGEFWrapper(new CommentCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.DurationConstraint_3116 == requestElementType) {
-
return getGEFWrapper(new DurationConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.TimeConstraint_3117 == requestElementType) {
-
return getGEFWrapper(new TimeConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.IntervalConstraint_3118 == requestElementType) {
-
return getGEFWrapper(new IntervalConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.InteractionConstraint_3119 == requestElementType) {
-
return getGEFWrapper(new InteractionConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Constraint_3120 == requestElementType) {
-
return getGEFWrapper(new ConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
return super.getCreateCommand(req);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/DeviceCompositeCompartmentItemSemanticEditPolicyCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/DeviceCompositeCompartmentItemSemanticEditPolicyCN.java index 34a1568e0b8..beaa0e97361 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/DeviceCompositeCompartmentItemSemanticEditPolicyCN.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/DeviceCompositeCompartmentItemSemanticEditPolicyCN.java @@ -67,157 +67,95 @@ public class DeviceCompositeCompartmentItemSemanticEditPolicyCN extends UMLBaseI if(requestElementType == null) {
return super.getCreateCommand(req);
}
-
-
if(UMLElementTypes.Property_3070 == requestElementType) {
-
return getGEFWrapper(new PropertyPartCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.CollaborationUse_3071 == requestElementType) {
-
return getGEFWrapper(new CollaborationUseCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Activity_3072 == requestElementType) {
-
return getGEFWrapper(new ActivityCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Interaction_3073 == requestElementType) {
-
return getGEFWrapper(new InteractionCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.ProtocolStateMachine_3074 == requestElementType) {
-
return getGEFWrapper(new ProtocolStateMachineCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.StateMachine_3075 == requestElementType) {
-
return getGEFWrapper(new StateMachineCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.FunctionBehavior_3076 == requestElementType) {
-
return getGEFWrapper(new FunctionBehaviorCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.OpaqueBehavior_3077 == requestElementType) {
-
return getGEFWrapper(new OpaqueBehaviorCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Component_3081 == requestElementType) {
-
return getGEFWrapper(new ComponentCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Device_3082 == requestElementType) {
-
return getGEFWrapper(new DeviceCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.ExecutionEnvironment_3083 == requestElementType) {
-
return getGEFWrapper(new ExecutionEnvironmentCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Node_3084 == requestElementType) {
-
return getGEFWrapper(new NodeCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Class_3085 == requestElementType) {
-
return getGEFWrapper(new ClassCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Collaboration_3086 == requestElementType) {
-
return getGEFWrapper(new CollaborationCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Interface_3087 == requestElementType) {
-
return getGEFWrapper(new InterfaceCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.PrimitiveType_3078 == requestElementType) {
-
return getGEFWrapper(new PrimitiveTypeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Enumeration_3079 == requestElementType) {
-
return getGEFWrapper(new EnumerationCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.DataType_3080 == requestElementType) {
-
return getGEFWrapper(new DataTypeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Actor_3091 == requestElementType) {
-
return getGEFWrapper(new ActorCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.DeploymentSpecification_3092 == requestElementType) {
-
return getGEFWrapper(new DeploymentSpecificationCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Artifact_3093 == requestElementType) {
-
return getGEFWrapper(new ArtifactCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.InformationItem_3094 == requestElementType) {
-
return getGEFWrapper(new InformationItemCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Signal_3095 == requestElementType) {
-
return getGEFWrapper(new SignalCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.UseCase_3096 == requestElementType) {
-
return getGEFWrapper(new UseCaseCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Comment_3097 == requestElementType) {
-
return getGEFWrapper(new CommentCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.DurationConstraint_3116 == requestElementType) {
-
return getGEFWrapper(new DurationConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.TimeConstraint_3117 == requestElementType) {
-
return getGEFWrapper(new TimeConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.IntervalConstraint_3118 == requestElementType) {
-
return getGEFWrapper(new IntervalConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.InteractionConstraint_3119 == requestElementType) {
-
return getGEFWrapper(new InteractionConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Constraint_3120 == requestElementType) {
-
return getGEFWrapper(new ConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
return super.getCreateCommand(req);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/DeviceCompositeItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/DeviceCompositeItemSemanticEditPolicy.java index 731cbdb9f96..b24f0139c45 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/DeviceCompositeItemSemanticEditPolicy.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/DeviceCompositeItemSemanticEditPolicy.java @@ -90,12 +90,8 @@ public class DeviceCompositeItemSemanticEditPolicy extends UMLBaseItemSemanticEd if(requestElementType == null) {
return super.getCreateCommand(req);
}
-
-
if(UMLElementTypes.Port_3069 == requestElementType) {
-
return getGEFWrapper(new PortCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
return super.getCreateCommand(req);
}
@@ -109,7 +105,6 @@ public class DeviceCompositeItemSemanticEditPolicy extends UMLBaseItemSemanticEd if(provider != null) {
// Retrieve delete command from the Element Edit service
ICommand deleteCommand = provider.getEditCommand(req);
-
if(deleteCommand != null) {
return new ICommandProxy(deleteCommand);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/DeviceCompositeItemSemanticEditPolicyCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/DeviceCompositeItemSemanticEditPolicyCN.java index 6f54d3d2043..0c4d4c156d2 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/DeviceCompositeItemSemanticEditPolicyCN.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/DeviceCompositeItemSemanticEditPolicyCN.java @@ -90,12 +90,8 @@ public class DeviceCompositeItemSemanticEditPolicyCN extends UMLBaseItemSemantic if(requestElementType == null) {
return super.getCreateCommand(req);
}
-
-
if(UMLElementTypes.Port_3069 == requestElementType) {
-
return getGEFWrapper(new PortCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
return super.getCreateCommand(req);
}
@@ -109,7 +105,6 @@ public class DeviceCompositeItemSemanticEditPolicyCN extends UMLBaseItemSemantic if(provider != null) {
// Retrieve delete command from the Element Edit service
ICommand deleteCommand = provider.getEditCommand(req);
-
if(deleteCommand != null) {
return new ICommandProxy(deleteCommand);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/DurationConstraintItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/DurationConstraintItemSemanticEditPolicy.java index bb2e893eed8..527086c157d 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/DurationConstraintItemSemanticEditPolicy.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/DurationConstraintItemSemanticEditPolicy.java @@ -83,7 +83,6 @@ public class DurationConstraintItemSemanticEditPolicy extends UMLBaseItemSemanti if(provider != null) {
// Retrieve delete command from the Element Edit service
ICommand deleteCommand = provider.getEditCommand(req);
-
if(deleteCommand != null) {
return new ICommandProxy(deleteCommand);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/DurationConstraintItemSemanticEditPolicyCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/DurationConstraintItemSemanticEditPolicyCN.java index 5002b1b5140..3baa0e8d52d 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/DurationConstraintItemSemanticEditPolicyCN.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/DurationConstraintItemSemanticEditPolicyCN.java @@ -83,7 +83,6 @@ public class DurationConstraintItemSemanticEditPolicyCN extends UMLBaseItemSeman if(provider != null) {
// Retrieve delete command from the Element Edit service
ICommand deleteCommand = provider.getEditCommand(req);
-
if(deleteCommand != null) {
return new ICommandProxy(deleteCommand);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/DurationIntervalItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/DurationIntervalItemSemanticEditPolicy.java index e0c9f40ccf8..051a64571cf 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/DurationIntervalItemSemanticEditPolicy.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/DurationIntervalItemSemanticEditPolicy.java @@ -83,7 +83,6 @@ public class DurationIntervalItemSemanticEditPolicy extends UMLBaseItemSemanticE if(provider != null) {
// Retrieve delete command from the Element Edit service
ICommand deleteCommand = provider.getEditCommand(req);
-
if(deleteCommand != null) {
return new ICommandProxy(deleteCommand);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/DurationItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/DurationItemSemanticEditPolicy.java index 19fcefd1fee..13288cdc1ae 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/DurationItemSemanticEditPolicy.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/DurationItemSemanticEditPolicy.java @@ -83,7 +83,6 @@ public class DurationItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolic if(provider != null) {
// Retrieve delete command from the Element Edit service
ICommand deleteCommand = provider.getEditCommand(req);
-
if(deleteCommand != null) {
return new ICommandProxy(deleteCommand);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/DurationObservationItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/DurationObservationItemSemanticEditPolicy.java index d8fc7039098..02e9ce78b89 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/DurationObservationItemSemanticEditPolicy.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/DurationObservationItemSemanticEditPolicy.java @@ -83,7 +83,6 @@ public class DurationObservationItemSemanticEditPolicy extends UMLBaseItemSemant if(provider != null) {
// Retrieve delete command from the Element Edit service
ICommand deleteCommand = provider.getEditCommand(req);
-
if(deleteCommand != null) {
return new ICommandProxy(deleteCommand);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/EnumerationEnumerationLiteralCompartmentItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/EnumerationEnumerationLiteralCompartmentItemSemanticEditPolicy.java index 7e1cd5cd19a..ed0325522c4 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/EnumerationEnumerationLiteralCompartmentItemSemanticEditPolicy.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/EnumerationEnumerationLiteralCompartmentItemSemanticEditPolicy.java @@ -38,12 +38,8 @@ public class EnumerationEnumerationLiteralCompartmentItemSemanticEditPolicy exte if(requestElementType == null) {
return super.getCreateCommand(req);
}
-
-
if(UMLElementTypes.EnumerationLiteral_3066 == requestElementType) {
-
return getGEFWrapper(new EnumerationLiteralCreateCommandCLN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
return super.getCreateCommand(req);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/EnumerationEnumerationLiteralCompartmentItemSemanticEditPolicyCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/EnumerationEnumerationLiteralCompartmentItemSemanticEditPolicyCN.java index 8e9010a5ba0..96b5c5262dc 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/EnumerationEnumerationLiteralCompartmentItemSemanticEditPolicyCN.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/EnumerationEnumerationLiteralCompartmentItemSemanticEditPolicyCN.java @@ -38,12 +38,8 @@ public class EnumerationEnumerationLiteralCompartmentItemSemanticEditPolicyCN ex if(requestElementType == null) {
return super.getCreateCommand(req);
}
-
-
if(UMLElementTypes.EnumerationLiteral_3066 == requestElementType) {
-
return getGEFWrapper(new EnumerationLiteralCreateCommandCLN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
return super.getCreateCommand(req);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/EnumerationItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/EnumerationItemSemanticEditPolicy.java index a372ce93bf6..ee23a5ca382 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/EnumerationItemSemanticEditPolicy.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/EnumerationItemSemanticEditPolicy.java @@ -90,12 +90,8 @@ public class EnumerationItemSemanticEditPolicy extends UMLBaseItemSemanticEditPo if(requestElementType == null) {
return super.getCreateCommand(req);
}
-
-
if(UMLElementTypes.EnumerationLiteral_3066 == requestElementType) {
-
return getGEFWrapper(new EnumerationLiteralCreateCommandCLN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
return super.getCreateCommand(req);
}
@@ -109,7 +105,6 @@ public class EnumerationItemSemanticEditPolicy extends UMLBaseItemSemanticEditPo if(provider != null) {
// Retrieve delete command from the Element Edit service
ICommand deleteCommand = provider.getEditCommand(req);
-
if(deleteCommand != null) {
return new ICommandProxy(deleteCommand);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/EnumerationItemSemanticEditPolicyCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/EnumerationItemSemanticEditPolicyCN.java index 9f1168da2f2..6f45065b19f 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/EnumerationItemSemanticEditPolicyCN.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/EnumerationItemSemanticEditPolicyCN.java @@ -90,12 +90,8 @@ public class EnumerationItemSemanticEditPolicyCN extends UMLBaseItemSemanticEdit if(requestElementType == null) {
return super.getCreateCommand(req);
}
-
-
if(UMLElementTypes.EnumerationLiteral_3066 == requestElementType) {
-
return getGEFWrapper(new EnumerationLiteralCreateCommandCLN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
return super.getCreateCommand(req);
}
@@ -109,7 +105,6 @@ public class EnumerationItemSemanticEditPolicyCN extends UMLBaseItemSemanticEdit if(provider != null) {
// Retrieve delete command from the Element Edit service
ICommand deleteCommand = provider.getEditCommand(req);
-
if(deleteCommand != null) {
return new ICommandProxy(deleteCommand);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ExecutionEnvironmentCompositeCompartmentItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ExecutionEnvironmentCompositeCompartmentItemSemanticEditPolicy.java index e31df8a828d..7c6d8272ce3 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ExecutionEnvironmentCompositeCompartmentItemSemanticEditPolicy.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ExecutionEnvironmentCompositeCompartmentItemSemanticEditPolicy.java @@ -67,157 +67,95 @@ public class ExecutionEnvironmentCompositeCompartmentItemSemanticEditPolicy exte if(requestElementType == null) {
return super.getCreateCommand(req);
}
-
-
if(UMLElementTypes.Property_3070 == requestElementType) {
-
return getGEFWrapper(new PropertyPartCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.CollaborationUse_3071 == requestElementType) {
-
return getGEFWrapper(new CollaborationUseCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Activity_3072 == requestElementType) {
-
return getGEFWrapper(new ActivityCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Interaction_3073 == requestElementType) {
-
return getGEFWrapper(new InteractionCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.ProtocolStateMachine_3074 == requestElementType) {
-
return getGEFWrapper(new ProtocolStateMachineCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.StateMachine_3075 == requestElementType) {
-
return getGEFWrapper(new StateMachineCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.FunctionBehavior_3076 == requestElementType) {
-
return getGEFWrapper(new FunctionBehaviorCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.OpaqueBehavior_3077 == requestElementType) {
-
return getGEFWrapper(new OpaqueBehaviorCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Component_3081 == requestElementType) {
-
return getGEFWrapper(new ComponentCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Device_3082 == requestElementType) {
-
return getGEFWrapper(new DeviceCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.ExecutionEnvironment_3083 == requestElementType) {
-
return getGEFWrapper(new ExecutionEnvironmentCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Node_3084 == requestElementType) {
-
return getGEFWrapper(new NodeCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Class_3085 == requestElementType) {
-
return getGEFWrapper(new ClassCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Collaboration_3086 == requestElementType) {
-
return getGEFWrapper(new CollaborationCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Interface_3087 == requestElementType) {
-
return getGEFWrapper(new InterfaceCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.PrimitiveType_3078 == requestElementType) {
-
return getGEFWrapper(new PrimitiveTypeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Enumeration_3079 == requestElementType) {
-
return getGEFWrapper(new EnumerationCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.DataType_3080 == requestElementType) {
-
return getGEFWrapper(new DataTypeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Actor_3091 == requestElementType) {
-
return getGEFWrapper(new ActorCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.DeploymentSpecification_3092 == requestElementType) {
-
return getGEFWrapper(new DeploymentSpecificationCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Artifact_3093 == requestElementType) {
-
return getGEFWrapper(new ArtifactCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.InformationItem_3094 == requestElementType) {
-
return getGEFWrapper(new InformationItemCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Signal_3095 == requestElementType) {
-
return getGEFWrapper(new SignalCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.UseCase_3096 == requestElementType) {
-
return getGEFWrapper(new UseCaseCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Comment_3097 == requestElementType) {
-
return getGEFWrapper(new CommentCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.DurationConstraint_3116 == requestElementType) {
-
return getGEFWrapper(new DurationConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.TimeConstraint_3117 == requestElementType) {
-
return getGEFWrapper(new TimeConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.IntervalConstraint_3118 == requestElementType) {
-
return getGEFWrapper(new IntervalConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.InteractionConstraint_3119 == requestElementType) {
-
return getGEFWrapper(new InteractionConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Constraint_3120 == requestElementType) {
-
return getGEFWrapper(new ConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
return super.getCreateCommand(req);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ExecutionEnvironmentCompositeCompartmentItemSemanticEditPolicyCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ExecutionEnvironmentCompositeCompartmentItemSemanticEditPolicyCN.java index deda73a4850..c748b2205a5 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ExecutionEnvironmentCompositeCompartmentItemSemanticEditPolicyCN.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ExecutionEnvironmentCompositeCompartmentItemSemanticEditPolicyCN.java @@ -67,157 +67,95 @@ public class ExecutionEnvironmentCompositeCompartmentItemSemanticEditPolicyCN ex if(requestElementType == null) {
return super.getCreateCommand(req);
}
-
-
if(UMLElementTypes.Property_3070 == requestElementType) {
-
return getGEFWrapper(new PropertyPartCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.CollaborationUse_3071 == requestElementType) {
-
return getGEFWrapper(new CollaborationUseCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Activity_3072 == requestElementType) {
-
return getGEFWrapper(new ActivityCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Interaction_3073 == requestElementType) {
-
return getGEFWrapper(new InteractionCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.ProtocolStateMachine_3074 == requestElementType) {
-
return getGEFWrapper(new ProtocolStateMachineCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.StateMachine_3075 == requestElementType) {
-
return getGEFWrapper(new StateMachineCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.FunctionBehavior_3076 == requestElementType) {
-
return getGEFWrapper(new FunctionBehaviorCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.OpaqueBehavior_3077 == requestElementType) {
-
return getGEFWrapper(new OpaqueBehaviorCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Component_3081 == requestElementType) {
-
return getGEFWrapper(new ComponentCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Device_3082 == requestElementType) {
-
return getGEFWrapper(new DeviceCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.ExecutionEnvironment_3083 == requestElementType) {
-
return getGEFWrapper(new ExecutionEnvironmentCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Node_3084 == requestElementType) {
-
return getGEFWrapper(new NodeCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Class_3085 == requestElementType) {
-
return getGEFWrapper(new ClassCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Collaboration_3086 == requestElementType) {
-
return getGEFWrapper(new CollaborationCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Interface_3087 == requestElementType) {
-
return getGEFWrapper(new InterfaceCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.PrimitiveType_3078 == requestElementType) {
-
return getGEFWrapper(new PrimitiveTypeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Enumeration_3079 == requestElementType) {
-
return getGEFWrapper(new EnumerationCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.DataType_3080 == requestElementType) {
-
return getGEFWrapper(new DataTypeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Actor_3091 == requestElementType) {
-
return getGEFWrapper(new ActorCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.DeploymentSpecification_3092 == requestElementType) {
-
return getGEFWrapper(new DeploymentSpecificationCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Artifact_3093 == requestElementType) {
-
return getGEFWrapper(new ArtifactCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.InformationItem_3094 == requestElementType) {
-
return getGEFWrapper(new InformationItemCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Signal_3095 == requestElementType) {
-
return getGEFWrapper(new SignalCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.UseCase_3096 == requestElementType) {
-
return getGEFWrapper(new UseCaseCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Comment_3097 == requestElementType) {
-
return getGEFWrapper(new CommentCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.DurationConstraint_3116 == requestElementType) {
-
return getGEFWrapper(new DurationConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.TimeConstraint_3117 == requestElementType) {
-
return getGEFWrapper(new TimeConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.IntervalConstraint_3118 == requestElementType) {
-
return getGEFWrapper(new IntervalConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.InteractionConstraint_3119 == requestElementType) {
-
return getGEFWrapper(new InteractionConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Constraint_3120 == requestElementType) {
-
return getGEFWrapper(new ConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
return super.getCreateCommand(req);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ExecutionEnvironmentCompositeItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ExecutionEnvironmentCompositeItemSemanticEditPolicy.java index 084fa83e8f4..dcafb12a7f4 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ExecutionEnvironmentCompositeItemSemanticEditPolicy.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ExecutionEnvironmentCompositeItemSemanticEditPolicy.java @@ -90,12 +90,8 @@ public class ExecutionEnvironmentCompositeItemSemanticEditPolicy extends UMLBase if(requestElementType == null) {
return super.getCreateCommand(req);
}
-
-
if(UMLElementTypes.Port_3069 == requestElementType) {
-
return getGEFWrapper(new PortCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
return super.getCreateCommand(req);
}
@@ -109,7 +105,6 @@ public class ExecutionEnvironmentCompositeItemSemanticEditPolicy extends UMLBase if(provider != null) {
// Retrieve delete command from the Element Edit service
ICommand deleteCommand = provider.getEditCommand(req);
-
if(deleteCommand != null) {
return new ICommandProxy(deleteCommand);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ExecutionEnvironmentCompositeItemSemanticEditPolicyCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ExecutionEnvironmentCompositeItemSemanticEditPolicyCN.java index 5d78107a2ac..13d67eb97e9 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ExecutionEnvironmentCompositeItemSemanticEditPolicyCN.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ExecutionEnvironmentCompositeItemSemanticEditPolicyCN.java @@ -90,12 +90,8 @@ public class ExecutionEnvironmentCompositeItemSemanticEditPolicyCN extends UMLBa if(requestElementType == null) {
return super.getCreateCommand(req);
}
-
-
if(UMLElementTypes.Port_3069 == requestElementType) {
-
return getGEFWrapper(new PortCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
return super.getCreateCommand(req);
}
@@ -109,7 +105,6 @@ public class ExecutionEnvironmentCompositeItemSemanticEditPolicyCN extends UMLBa if(provider != null) {
// Retrieve delete command from the Element Edit service
ICommand deleteCommand = provider.getEditCommand(req);
-
if(deleteCommand != null) {
return new ICommandProxy(deleteCommand);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ExpressionItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ExpressionItemSemanticEditPolicy.java index cfcb6391a15..6860b4e6350 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ExpressionItemSemanticEditPolicy.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ExpressionItemSemanticEditPolicy.java @@ -83,7 +83,6 @@ public class ExpressionItemSemanticEditPolicy extends UMLBaseItemSemanticEditPol if(provider != null) {
// Retrieve delete command from the Element Edit service
ICommand deleteCommand = provider.getEditCommand(req);
-
if(deleteCommand != null) {
return new ICommandProxy(deleteCommand);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/FunctionBehaviorCompositeCompartmentItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/FunctionBehaviorCompositeCompartmentItemSemanticEditPolicy.java index 10b3a3c3c2b..b3d8e4eefe2 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/FunctionBehaviorCompositeCompartmentItemSemanticEditPolicy.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/FunctionBehaviorCompositeCompartmentItemSemanticEditPolicy.java @@ -68,162 +68,98 @@ public class FunctionBehaviorCompositeCompartmentItemSemanticEditPolicy extends if(requestElementType == null) {
return super.getCreateCommand(req);
}
-
-
if(UMLElementTypes.Parameter_3088 == requestElementType) {
-
return getGEFWrapper(new ParameterCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Property_3070 == requestElementType) {
-
return getGEFWrapper(new PropertyPartCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.CollaborationUse_3071 == requestElementType) {
-
return getGEFWrapper(new CollaborationUseCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Activity_3072 == requestElementType) {
-
return getGEFWrapper(new ActivityCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Interaction_3073 == requestElementType) {
-
return getGEFWrapper(new InteractionCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.ProtocolStateMachine_3074 == requestElementType) {
-
return getGEFWrapper(new ProtocolStateMachineCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.StateMachine_3075 == requestElementType) {
-
return getGEFWrapper(new StateMachineCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.FunctionBehavior_3076 == requestElementType) {
-
return getGEFWrapper(new FunctionBehaviorCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.OpaqueBehavior_3077 == requestElementType) {
-
return getGEFWrapper(new OpaqueBehaviorCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Component_3081 == requestElementType) {
-
return getGEFWrapper(new ComponentCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Device_3082 == requestElementType) {
-
return getGEFWrapper(new DeviceCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.ExecutionEnvironment_3083 == requestElementType) {
-
return getGEFWrapper(new ExecutionEnvironmentCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Node_3084 == requestElementType) {
-
return getGEFWrapper(new NodeCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Class_3085 == requestElementType) {
-
return getGEFWrapper(new ClassCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Collaboration_3086 == requestElementType) {
-
return getGEFWrapper(new CollaborationCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Interface_3087 == requestElementType) {
-
return getGEFWrapper(new InterfaceCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.PrimitiveType_3078 == requestElementType) {
-
return getGEFWrapper(new PrimitiveTypeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Enumeration_3079 == requestElementType) {
-
return getGEFWrapper(new EnumerationCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.DataType_3080 == requestElementType) {
-
return getGEFWrapper(new DataTypeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Actor_3091 == requestElementType) {
-
return getGEFWrapper(new ActorCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.DeploymentSpecification_3092 == requestElementType) {
-
return getGEFWrapper(new DeploymentSpecificationCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Artifact_3093 == requestElementType) {
-
return getGEFWrapper(new ArtifactCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.InformationItem_3094 == requestElementType) {
-
return getGEFWrapper(new InformationItemCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Signal_3095 == requestElementType) {
-
return getGEFWrapper(new SignalCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.UseCase_3096 == requestElementType) {
-
return getGEFWrapper(new UseCaseCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Comment_3097 == requestElementType) {
-
return getGEFWrapper(new CommentCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.DurationConstraint_3116 == requestElementType) {
-
return getGEFWrapper(new DurationConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.TimeConstraint_3117 == requestElementType) {
-
return getGEFWrapper(new TimeConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.IntervalConstraint_3118 == requestElementType) {
-
return getGEFWrapper(new IntervalConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.InteractionConstraint_3119 == requestElementType) {
-
return getGEFWrapper(new InteractionConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Constraint_3120 == requestElementType) {
-
return getGEFWrapper(new ConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
return super.getCreateCommand(req);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/FunctionBehaviorCompositeCompartmentItemSemanticEditPolicyCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/FunctionBehaviorCompositeCompartmentItemSemanticEditPolicyCN.java index 0d257c5ff26..f6d4f439561 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/FunctionBehaviorCompositeCompartmentItemSemanticEditPolicyCN.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/FunctionBehaviorCompositeCompartmentItemSemanticEditPolicyCN.java @@ -68,162 +68,98 @@ public class FunctionBehaviorCompositeCompartmentItemSemanticEditPolicyCN extend if(requestElementType == null) {
return super.getCreateCommand(req);
}
-
-
if(UMLElementTypes.Parameter_3088 == requestElementType) {
-
return getGEFWrapper(new ParameterCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Property_3070 == requestElementType) {
-
return getGEFWrapper(new PropertyPartCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.CollaborationUse_3071 == requestElementType) {
-
return getGEFWrapper(new CollaborationUseCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Activity_3072 == requestElementType) {
-
return getGEFWrapper(new ActivityCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Interaction_3073 == requestElementType) {
-
return getGEFWrapper(new InteractionCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.ProtocolStateMachine_3074 == requestElementType) {
-
return getGEFWrapper(new ProtocolStateMachineCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.StateMachine_3075 == requestElementType) {
-
return getGEFWrapper(new StateMachineCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.FunctionBehavior_3076 == requestElementType) {
-
return getGEFWrapper(new FunctionBehaviorCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.OpaqueBehavior_3077 == requestElementType) {
-
return getGEFWrapper(new OpaqueBehaviorCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Component_3081 == requestElementType) {
-
return getGEFWrapper(new ComponentCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Device_3082 == requestElementType) {
-
return getGEFWrapper(new DeviceCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.ExecutionEnvironment_3083 == requestElementType) {
-
return getGEFWrapper(new ExecutionEnvironmentCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Node_3084 == requestElementType) {
-
return getGEFWrapper(new NodeCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Class_3085 == requestElementType) {
-
return getGEFWrapper(new ClassCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Collaboration_3086 == requestElementType) {
-
return getGEFWrapper(new CollaborationCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Interface_3087 == requestElementType) {
-
return getGEFWrapper(new InterfaceCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.PrimitiveType_3078 == requestElementType) {
-
return getGEFWrapper(new PrimitiveTypeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Enumeration_3079 == requestElementType) {
-
return getGEFWrapper(new EnumerationCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.DataType_3080 == requestElementType) {
-
return getGEFWrapper(new DataTypeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Actor_3091 == requestElementType) {
-
return getGEFWrapper(new ActorCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.DeploymentSpecification_3092 == requestElementType) {
-
return getGEFWrapper(new DeploymentSpecificationCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Artifact_3093 == requestElementType) {
-
return getGEFWrapper(new ArtifactCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.InformationItem_3094 == requestElementType) {
-
return getGEFWrapper(new InformationItemCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Signal_3095 == requestElementType) {
-
return getGEFWrapper(new SignalCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.UseCase_3096 == requestElementType) {
-
return getGEFWrapper(new UseCaseCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Comment_3097 == requestElementType) {
-
return getGEFWrapper(new CommentCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.DurationConstraint_3116 == requestElementType) {
-
return getGEFWrapper(new DurationConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.TimeConstraint_3117 == requestElementType) {
-
return getGEFWrapper(new TimeConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.IntervalConstraint_3118 == requestElementType) {
-
return getGEFWrapper(new IntervalConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.InteractionConstraint_3119 == requestElementType) {
-
return getGEFWrapper(new InteractionConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Constraint_3120 == requestElementType) {
-
return getGEFWrapper(new ConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
return super.getCreateCommand(req);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/FunctionBehaviorCompositeItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/FunctionBehaviorCompositeItemSemanticEditPolicy.java index fe2e92a12da..1380fd015d1 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/FunctionBehaviorCompositeItemSemanticEditPolicy.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/FunctionBehaviorCompositeItemSemanticEditPolicy.java @@ -91,17 +91,11 @@ public class FunctionBehaviorCompositeItemSemanticEditPolicy extends UMLBaseItem if(requestElementType == null) {
return super.getCreateCommand(req);
}
-
-
if(UMLElementTypes.Port_3069 == requestElementType) {
-
return getGEFWrapper(new PortCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Parameter_3088 == requestElementType) {
-
return getGEFWrapper(new ParameterCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
return super.getCreateCommand(req);
}
@@ -115,7 +109,6 @@ public class FunctionBehaviorCompositeItemSemanticEditPolicy extends UMLBaseItem if(provider != null) {
// Retrieve delete command from the Element Edit service
ICommand deleteCommand = provider.getEditCommand(req);
-
if(deleteCommand != null) {
return new ICommandProxy(deleteCommand);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/FunctionBehaviorCompositeItemSemanticEditPolicyCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/FunctionBehaviorCompositeItemSemanticEditPolicyCN.java index ee627d38177..18b6003bd0d 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/FunctionBehaviorCompositeItemSemanticEditPolicyCN.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/FunctionBehaviorCompositeItemSemanticEditPolicyCN.java @@ -91,17 +91,11 @@ public class FunctionBehaviorCompositeItemSemanticEditPolicyCN extends UMLBaseIt if(requestElementType == null) {
return super.getCreateCommand(req);
}
-
-
if(UMLElementTypes.Port_3069 == requestElementType) {
-
return getGEFWrapper(new PortCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Parameter_3088 == requestElementType) {
-
return getGEFWrapper(new ParameterCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
return super.getCreateCommand(req);
}
@@ -115,7 +109,6 @@ public class FunctionBehaviorCompositeItemSemanticEditPolicyCN extends UMLBaseIt if(provider != null) {
// Retrieve delete command from the Element Edit service
ICommand deleteCommand = provider.getEditCommand(req);
-
if(deleteCommand != null) {
return new ICommandProxy(deleteCommand);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/GeneralizationItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/GeneralizationItemSemanticEditPolicy.java index 7d89bb2a8ff..d1c7a75348d 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/GeneralizationItemSemanticEditPolicy.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/GeneralizationItemSemanticEditPolicy.java @@ -53,7 +53,6 @@ public class GeneralizationItemSemanticEditPolicy extends UMLBaseItemSemanticEdi if(provider != null) {
// Retrieve delete command from the Element Edit service
ICommand deleteCommand = provider.getEditCommand(req);
-
if(deleteCommand != null) {
return new ICommandProxy(deleteCommand);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/InformationFlowItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/InformationFlowItemSemanticEditPolicy.java index 04f022dece1..192d3d209ca 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/InformationFlowItemSemanticEditPolicy.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/InformationFlowItemSemanticEditPolicy.java @@ -83,7 +83,6 @@ public class InformationFlowItemSemanticEditPolicy extends UMLBaseItemSemanticEd if(provider != null) {
// Retrieve delete command from the Element Edit service
ICommand deleteCommand = provider.getEditCommand(req);
-
if(deleteCommand != null) {
return new ICommandProxy(deleteCommand);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/InformationItemItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/InformationItemItemSemanticEditPolicy.java index 6fb901a9ec6..2de6c6dbe7a 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/InformationItemItemSemanticEditPolicy.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/InformationItemItemSemanticEditPolicy.java @@ -88,7 +88,6 @@ public class InformationItemItemSemanticEditPolicy extends UMLBaseItemSemanticEd if(provider != null) {
// Retrieve delete command from the Element Edit service
ICommand deleteCommand = provider.getEditCommand(req);
-
if(deleteCommand != null) {
return new ICommandProxy(deleteCommand);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/InformationItemItemSemanticEditPolicyCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/InformationItemItemSemanticEditPolicyCN.java index 9d60fbefd3f..bbebfa659a7 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/InformationItemItemSemanticEditPolicyCN.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/InformationItemItemSemanticEditPolicyCN.java @@ -88,7 +88,6 @@ public class InformationItemItemSemanticEditPolicyCN extends UMLBaseItemSemantic if(provider != null) {
// Retrieve delete command from the Element Edit service
ICommand deleteCommand = provider.getEditCommand(req);
-
if(deleteCommand != null) {
return new ICommandProxy(deleteCommand);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/InstanceValueItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/InstanceValueItemSemanticEditPolicy.java index 99756b8b659..4a78b4fdaeb 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/InstanceValueItemSemanticEditPolicy.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/InstanceValueItemSemanticEditPolicy.java @@ -83,7 +83,6 @@ public class InstanceValueItemSemanticEditPolicy extends UMLBaseItemSemanticEdit if(provider != null) {
// Retrieve delete command from the Element Edit service
ICommand deleteCommand = provider.getEditCommand(req);
-
if(deleteCommand != null) {
return new ICommandProxy(deleteCommand);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/InteractionCompositeCompartmentItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/InteractionCompositeCompartmentItemSemanticEditPolicy.java index 0355a8a87f9..76b262fd04f 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/InteractionCompositeCompartmentItemSemanticEditPolicy.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/InteractionCompositeCompartmentItemSemanticEditPolicy.java @@ -68,162 +68,98 @@ public class InteractionCompositeCompartmentItemSemanticEditPolicy extends UMLBa if(requestElementType == null) {
return super.getCreateCommand(req);
}
-
-
if(UMLElementTypes.Parameter_3088 == requestElementType) {
-
return getGEFWrapper(new ParameterCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Property_3070 == requestElementType) {
-
return getGEFWrapper(new PropertyPartCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.CollaborationUse_3071 == requestElementType) {
-
return getGEFWrapper(new CollaborationUseCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Activity_3072 == requestElementType) {
-
return getGEFWrapper(new ActivityCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Interaction_3073 == requestElementType) {
-
return getGEFWrapper(new InteractionCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.ProtocolStateMachine_3074 == requestElementType) {
-
return getGEFWrapper(new ProtocolStateMachineCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.StateMachine_3075 == requestElementType) {
-
return getGEFWrapper(new StateMachineCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.FunctionBehavior_3076 == requestElementType) {
-
return getGEFWrapper(new FunctionBehaviorCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.OpaqueBehavior_3077 == requestElementType) {
-
return getGEFWrapper(new OpaqueBehaviorCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Component_3081 == requestElementType) {
-
return getGEFWrapper(new ComponentCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Device_3082 == requestElementType) {
-
return getGEFWrapper(new DeviceCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.ExecutionEnvironment_3083 == requestElementType) {
-
return getGEFWrapper(new ExecutionEnvironmentCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Node_3084 == requestElementType) {
-
return getGEFWrapper(new NodeCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Class_3085 == requestElementType) {
-
return getGEFWrapper(new ClassCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Collaboration_3086 == requestElementType) {
-
return getGEFWrapper(new CollaborationCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Interface_3087 == requestElementType) {
-
return getGEFWrapper(new InterfaceCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.PrimitiveType_3078 == requestElementType) {
-
return getGEFWrapper(new PrimitiveTypeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Enumeration_3079 == requestElementType) {
-
return getGEFWrapper(new EnumerationCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.DataType_3080 == requestElementType) {
-
return getGEFWrapper(new DataTypeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Actor_3091 == requestElementType) {
-
return getGEFWrapper(new ActorCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.DeploymentSpecification_3092 == requestElementType) {
-
return getGEFWrapper(new DeploymentSpecificationCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Artifact_3093 == requestElementType) {
-
return getGEFWrapper(new ArtifactCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.InformationItem_3094 == requestElementType) {
-
return getGEFWrapper(new InformationItemCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Signal_3095 == requestElementType) {
-
return getGEFWrapper(new SignalCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.UseCase_3096 == requestElementType) {
-
return getGEFWrapper(new UseCaseCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Comment_3097 == requestElementType) {
-
return getGEFWrapper(new CommentCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.DurationConstraint_3116 == requestElementType) {
-
return getGEFWrapper(new DurationConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.TimeConstraint_3117 == requestElementType) {
-
return getGEFWrapper(new TimeConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.IntervalConstraint_3118 == requestElementType) {
-
return getGEFWrapper(new IntervalConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.InteractionConstraint_3119 == requestElementType) {
-
return getGEFWrapper(new InteractionConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Constraint_3120 == requestElementType) {
-
return getGEFWrapper(new ConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
return super.getCreateCommand(req);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/InteractionCompositeCompartmentItemSemanticEditPolicyCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/InteractionCompositeCompartmentItemSemanticEditPolicyCN.java index 4a35606054b..263ee03957e 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/InteractionCompositeCompartmentItemSemanticEditPolicyCN.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/InteractionCompositeCompartmentItemSemanticEditPolicyCN.java @@ -68,162 +68,98 @@ public class InteractionCompositeCompartmentItemSemanticEditPolicyCN extends UML if(requestElementType == null) {
return super.getCreateCommand(req);
}
-
-
if(UMLElementTypes.Parameter_3088 == requestElementType) {
-
return getGEFWrapper(new ParameterCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Property_3070 == requestElementType) {
-
return getGEFWrapper(new PropertyPartCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.CollaborationUse_3071 == requestElementType) {
-
return getGEFWrapper(new CollaborationUseCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Activity_3072 == requestElementType) {
-
return getGEFWrapper(new ActivityCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Interaction_3073 == requestElementType) {
-
return getGEFWrapper(new InteractionCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.ProtocolStateMachine_3074 == requestElementType) {
-
return getGEFWrapper(new ProtocolStateMachineCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.StateMachine_3075 == requestElementType) {
-
return getGEFWrapper(new StateMachineCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.FunctionBehavior_3076 == requestElementType) {
-
return getGEFWrapper(new FunctionBehaviorCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.OpaqueBehavior_3077 == requestElementType) {
-
return getGEFWrapper(new OpaqueBehaviorCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Component_3081 == requestElementType) {
-
return getGEFWrapper(new ComponentCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Device_3082 == requestElementType) {
-
return getGEFWrapper(new DeviceCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.ExecutionEnvironment_3083 == requestElementType) {
-
return getGEFWrapper(new ExecutionEnvironmentCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Node_3084 == requestElementType) {
-
return getGEFWrapper(new NodeCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Class_3085 == requestElementType) {
-
return getGEFWrapper(new ClassCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Collaboration_3086 == requestElementType) {
-
return getGEFWrapper(new CollaborationCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Interface_3087 == requestElementType) {
-
return getGEFWrapper(new InterfaceCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.PrimitiveType_3078 == requestElementType) {
-
return getGEFWrapper(new PrimitiveTypeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Enumeration_3079 == requestElementType) {
-
return getGEFWrapper(new EnumerationCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.DataType_3080 == requestElementType) {
-
return getGEFWrapper(new DataTypeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Actor_3091 == requestElementType) {
-
return getGEFWrapper(new ActorCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.DeploymentSpecification_3092 == requestElementType) {
-
return getGEFWrapper(new DeploymentSpecificationCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Artifact_3093 == requestElementType) {
-
return getGEFWrapper(new ArtifactCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.InformationItem_3094 == requestElementType) {
-
return getGEFWrapper(new InformationItemCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Signal_3095 == requestElementType) {
-
return getGEFWrapper(new SignalCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.UseCase_3096 == requestElementType) {
-
return getGEFWrapper(new UseCaseCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Comment_3097 == requestElementType) {
-
return getGEFWrapper(new CommentCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.DurationConstraint_3116 == requestElementType) {
-
return getGEFWrapper(new DurationConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.TimeConstraint_3117 == requestElementType) {
-
return getGEFWrapper(new TimeConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.IntervalConstraint_3118 == requestElementType) {
-
return getGEFWrapper(new IntervalConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.InteractionConstraint_3119 == requestElementType) {
-
return getGEFWrapper(new InteractionConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Constraint_3120 == requestElementType) {
-
return getGEFWrapper(new ConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
return super.getCreateCommand(req);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/InteractionCompositeItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/InteractionCompositeItemSemanticEditPolicy.java index 309a759c0c0..67bdb0066d5 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/InteractionCompositeItemSemanticEditPolicy.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/InteractionCompositeItemSemanticEditPolicy.java @@ -91,17 +91,11 @@ public class InteractionCompositeItemSemanticEditPolicy extends UMLBaseItemSeman if(requestElementType == null) {
return super.getCreateCommand(req);
}
-
-
if(UMLElementTypes.Port_3069 == requestElementType) {
-
return getGEFWrapper(new PortCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Parameter_3088 == requestElementType) {
-
return getGEFWrapper(new ParameterCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
return super.getCreateCommand(req);
}
@@ -115,7 +109,6 @@ public class InteractionCompositeItemSemanticEditPolicy extends UMLBaseItemSeman if(provider != null) {
// Retrieve delete command from the Element Edit service
ICommand deleteCommand = provider.getEditCommand(req);
-
if(deleteCommand != null) {
return new ICommandProxy(deleteCommand);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/InteractionCompositeItemSemanticEditPolicyCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/InteractionCompositeItemSemanticEditPolicyCN.java index cfbed7cb87d..ccdc1ae936a 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/InteractionCompositeItemSemanticEditPolicyCN.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/InteractionCompositeItemSemanticEditPolicyCN.java @@ -91,17 +91,11 @@ public class InteractionCompositeItemSemanticEditPolicyCN extends UMLBaseItemSem if(requestElementType == null) {
return super.getCreateCommand(req);
}
-
-
if(UMLElementTypes.Port_3069 == requestElementType) {
-
return getGEFWrapper(new PortCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Parameter_3088 == requestElementType) {
-
return getGEFWrapper(new ParameterCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
return super.getCreateCommand(req);
}
@@ -115,7 +109,6 @@ public class InteractionCompositeItemSemanticEditPolicyCN extends UMLBaseItemSem if(provider != null) {
// Retrieve delete command from the Element Edit service
ICommand deleteCommand = provider.getEditCommand(req);
-
if(deleteCommand != null) {
return new ICommandProxy(deleteCommand);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/InteractionConstraintItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/InteractionConstraintItemSemanticEditPolicy.java index 798aebfc316..b728c4b9d6a 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/InteractionConstraintItemSemanticEditPolicy.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/InteractionConstraintItemSemanticEditPolicy.java @@ -83,7 +83,6 @@ public class InteractionConstraintItemSemanticEditPolicy extends UMLBaseItemSema if(provider != null) {
// Retrieve delete command from the Element Edit service
ICommand deleteCommand = provider.getEditCommand(req);
-
if(deleteCommand != null) {
return new ICommandProxy(deleteCommand);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/InteractionConstraintItemSemanticEditPolicyCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/InteractionConstraintItemSemanticEditPolicyCN.java index 7e1e219f775..892e729533b 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/InteractionConstraintItemSemanticEditPolicyCN.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/InteractionConstraintItemSemanticEditPolicyCN.java @@ -83,7 +83,6 @@ public class InteractionConstraintItemSemanticEditPolicyCN extends UMLBaseItemSe if(provider != null) {
// Retrieve delete command from the Element Edit service
ICommand deleteCommand = provider.getEditCommand(req);
-
if(deleteCommand != null) {
return new ICommandProxy(deleteCommand);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/InterfaceItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/InterfaceItemSemanticEditPolicy.java index e69939804ec..54ef623c012 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/InterfaceItemSemanticEditPolicy.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/InterfaceItemSemanticEditPolicy.java @@ -88,7 +88,6 @@ public class InterfaceItemSemanticEditPolicy extends UMLBaseItemSemanticEditPoli if(provider != null) {
// Retrieve delete command from the Element Edit service
ICommand deleteCommand = provider.getEditCommand(req);
-
if(deleteCommand != null) {
return new ICommandProxy(deleteCommand);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/InterfaceItemSemanticEditPolicyCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/InterfaceItemSemanticEditPolicyCN.java index bfecfae6e63..2c40f80675f 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/InterfaceItemSemanticEditPolicyCN.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/InterfaceItemSemanticEditPolicyCN.java @@ -88,7 +88,6 @@ public class InterfaceItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPo if(provider != null) {
// Retrieve delete command from the Element Edit service
ICommand deleteCommand = provider.getEditCommand(req);
-
if(deleteCommand != null) {
return new ICommandProxy(deleteCommand);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/InterfaceRealizationItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/InterfaceRealizationItemSemanticEditPolicy.java index 9379ef553cd..c0ce924d72f 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/InterfaceRealizationItemSemanticEditPolicy.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/InterfaceRealizationItemSemanticEditPolicy.java @@ -83,7 +83,6 @@ public class InterfaceRealizationItemSemanticEditPolicy extends UMLBaseItemSeman if(provider != null) {
// Retrieve delete command from the Element Edit service
ICommand deleteCommand = provider.getEditCommand(req);
-
if(deleteCommand != null) {
return new ICommandProxy(deleteCommand);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/IntervalConstraintItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/IntervalConstraintItemSemanticEditPolicy.java index 93d5cd4ee04..56077d58f93 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/IntervalConstraintItemSemanticEditPolicy.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/IntervalConstraintItemSemanticEditPolicy.java @@ -83,7 +83,6 @@ public class IntervalConstraintItemSemanticEditPolicy extends UMLBaseItemSemanti if(provider != null) {
// Retrieve delete command from the Element Edit service
ICommand deleteCommand = provider.getEditCommand(req);
-
if(deleteCommand != null) {
return new ICommandProxy(deleteCommand);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/IntervalConstraintItemSemanticEditPolicyCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/IntervalConstraintItemSemanticEditPolicyCN.java index b6878f0cc92..d17b1351afb 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/IntervalConstraintItemSemanticEditPolicyCN.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/IntervalConstraintItemSemanticEditPolicyCN.java @@ -83,7 +83,6 @@ public class IntervalConstraintItemSemanticEditPolicyCN extends UMLBaseItemSeman if(provider != null) {
// Retrieve delete command from the Element Edit service
ICommand deleteCommand = provider.getEditCommand(req);
-
if(deleteCommand != null) {
return new ICommandProxy(deleteCommand);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/IntervalItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/IntervalItemSemanticEditPolicy.java index af13ce5dd44..f65d0d7203e 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/IntervalItemSemanticEditPolicy.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/IntervalItemSemanticEditPolicy.java @@ -83,7 +83,6 @@ public class IntervalItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolic if(provider != null) {
// Retrieve delete command from the Element Edit service
ICommand deleteCommand = provider.getEditCommand(req);
-
if(deleteCommand != null) {
return new ICommandProxy(deleteCommand);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/LiteralBooleanItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/LiteralBooleanItemSemanticEditPolicy.java index 4276f4b7fc9..5208fa822a2 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/LiteralBooleanItemSemanticEditPolicy.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/LiteralBooleanItemSemanticEditPolicy.java @@ -83,7 +83,6 @@ public class LiteralBooleanItemSemanticEditPolicy extends UMLBaseItemSemanticEdi if(provider != null) {
// Retrieve delete command from the Element Edit service
ICommand deleteCommand = provider.getEditCommand(req);
-
if(deleteCommand != null) {
return new ICommandProxy(deleteCommand);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/LiteralIntegerItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/LiteralIntegerItemSemanticEditPolicy.java index cc49118ecd4..842112d4267 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/LiteralIntegerItemSemanticEditPolicy.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/LiteralIntegerItemSemanticEditPolicy.java @@ -83,7 +83,6 @@ public class LiteralIntegerItemSemanticEditPolicy extends UMLBaseItemSemanticEdi if(provider != null) {
// Retrieve delete command from the Element Edit service
ICommand deleteCommand = provider.getEditCommand(req);
-
if(deleteCommand != null) {
return new ICommandProxy(deleteCommand);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/LiteralNullItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/LiteralNullItemSemanticEditPolicy.java index 0364deb69f4..c4fb9deb967 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/LiteralNullItemSemanticEditPolicy.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/LiteralNullItemSemanticEditPolicy.java @@ -83,7 +83,6 @@ public class LiteralNullItemSemanticEditPolicy extends UMLBaseItemSemanticEditPo if(provider != null) {
// Retrieve delete command from the Element Edit service
ICommand deleteCommand = provider.getEditCommand(req);
-
if(deleteCommand != null) {
return new ICommandProxy(deleteCommand);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/LiteralStringItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/LiteralStringItemSemanticEditPolicy.java index 7403882832a..84614f1974d 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/LiteralStringItemSemanticEditPolicy.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/LiteralStringItemSemanticEditPolicy.java @@ -83,7 +83,6 @@ public class LiteralStringItemSemanticEditPolicy extends UMLBaseItemSemanticEdit if(provider != null) {
// Retrieve delete command from the Element Edit service
ICommand deleteCommand = provider.getEditCommand(req);
-
if(deleteCommand != null) {
return new ICommandProxy(deleteCommand);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/LiteralUnlimitedNaturalItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/LiteralUnlimitedNaturalItemSemanticEditPolicy.java index c3961a6a125..2c35015355f 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/LiteralUnlimitedNaturalItemSemanticEditPolicy.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/LiteralUnlimitedNaturalItemSemanticEditPolicy.java @@ -83,7 +83,6 @@ public class LiteralUnlimitedNaturalItemSemanticEditPolicy extends UMLBaseItemSe if(provider != null) {
// Retrieve delete command from the Element Edit service
ICommand deleteCommand = provider.getEditCommand(req);
-
if(deleteCommand != null) {
return new ICommandProxy(deleteCommand);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ManifestationItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ManifestationItemSemanticEditPolicy.java index e4d6c702626..8fa723ae3bd 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ManifestationItemSemanticEditPolicy.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ManifestationItemSemanticEditPolicy.java @@ -83,7 +83,6 @@ public class ManifestationItemSemanticEditPolicy extends UMLBaseItemSemanticEdit if(provider != null) {
// Retrieve delete command from the Element Edit service
ICommand deleteCommand = provider.getEditCommand(req);
-
if(deleteCommand != null) {
return new ICommandProxy(deleteCommand);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/NodeCompositeCompartmentItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/NodeCompositeCompartmentItemSemanticEditPolicy.java index 4aea8b58a1e..88e275b6721 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/NodeCompositeCompartmentItemSemanticEditPolicy.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/NodeCompositeCompartmentItemSemanticEditPolicy.java @@ -67,157 +67,95 @@ public class NodeCompositeCompartmentItemSemanticEditPolicy extends UMLBaseItemS if(requestElementType == null) {
return super.getCreateCommand(req);
}
-
-
if(UMLElementTypes.Property_3070 == requestElementType) {
-
return getGEFWrapper(new PropertyPartCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.CollaborationUse_3071 == requestElementType) {
-
return getGEFWrapper(new CollaborationUseCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Activity_3072 == requestElementType) {
-
return getGEFWrapper(new ActivityCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Interaction_3073 == requestElementType) {
-
return getGEFWrapper(new InteractionCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.ProtocolStateMachine_3074 == requestElementType) {
-
return getGEFWrapper(new ProtocolStateMachineCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.StateMachine_3075 == requestElementType) {
-
return getGEFWrapper(new StateMachineCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.FunctionBehavior_3076 == requestElementType) {
-
return getGEFWrapper(new FunctionBehaviorCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.OpaqueBehavior_3077 == requestElementType) {
-
return getGEFWrapper(new OpaqueBehaviorCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Component_3081 == requestElementType) {
-
return getGEFWrapper(new ComponentCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Device_3082 == requestElementType) {
-
return getGEFWrapper(new DeviceCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.ExecutionEnvironment_3083 == requestElementType) {
-
return getGEFWrapper(new ExecutionEnvironmentCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Node_3084 == requestElementType) {
-
return getGEFWrapper(new NodeCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Class_3085 == requestElementType) {
-
return getGEFWrapper(new ClassCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Collaboration_3086 == requestElementType) {
-
return getGEFWrapper(new CollaborationCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Interface_3087 == requestElementType) {
-
return getGEFWrapper(new InterfaceCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.PrimitiveType_3078 == requestElementType) {
-
return getGEFWrapper(new PrimitiveTypeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Enumeration_3079 == requestElementType) {
-
return getGEFWrapper(new EnumerationCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.DataType_3080 == requestElementType) {
-
return getGEFWrapper(new DataTypeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Actor_3091 == requestElementType) {
-
return getGEFWrapper(new ActorCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.DeploymentSpecification_3092 == requestElementType) {
-
return getGEFWrapper(new DeploymentSpecificationCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Artifact_3093 == requestElementType) {
-
return getGEFWrapper(new ArtifactCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.InformationItem_3094 == requestElementType) {
-
return getGEFWrapper(new InformationItemCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Signal_3095 == requestElementType) {
-
return getGEFWrapper(new SignalCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.UseCase_3096 == requestElementType) {
-
return getGEFWrapper(new UseCaseCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Comment_3097 == requestElementType) {
-
return getGEFWrapper(new CommentCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.DurationConstraint_3116 == requestElementType) {
-
return getGEFWrapper(new DurationConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.TimeConstraint_3117 == requestElementType) {
-
return getGEFWrapper(new TimeConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.IntervalConstraint_3118 == requestElementType) {
-
return getGEFWrapper(new IntervalConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.InteractionConstraint_3119 == requestElementType) {
-
return getGEFWrapper(new InteractionConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Constraint_3120 == requestElementType) {
-
return getGEFWrapper(new ConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
return super.getCreateCommand(req);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/NodeCompositeCompartmentItemSemanticEditPolicyCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/NodeCompositeCompartmentItemSemanticEditPolicyCN.java index cbe78273550..d9e930f0bdb 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/NodeCompositeCompartmentItemSemanticEditPolicyCN.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/NodeCompositeCompartmentItemSemanticEditPolicyCN.java @@ -67,157 +67,95 @@ public class NodeCompositeCompartmentItemSemanticEditPolicyCN extends UMLBaseIte if(requestElementType == null) {
return super.getCreateCommand(req);
}
-
-
if(UMLElementTypes.Property_3070 == requestElementType) {
-
return getGEFWrapper(new PropertyPartCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.CollaborationUse_3071 == requestElementType) {
-
return getGEFWrapper(new CollaborationUseCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Activity_3072 == requestElementType) {
-
return getGEFWrapper(new ActivityCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Interaction_3073 == requestElementType) {
-
return getGEFWrapper(new InteractionCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.ProtocolStateMachine_3074 == requestElementType) {
-
return getGEFWrapper(new ProtocolStateMachineCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.StateMachine_3075 == requestElementType) {
-
return getGEFWrapper(new StateMachineCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.FunctionBehavior_3076 == requestElementType) {
-
return getGEFWrapper(new FunctionBehaviorCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.OpaqueBehavior_3077 == requestElementType) {
-
return getGEFWrapper(new OpaqueBehaviorCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Component_3081 == requestElementType) {
-
return getGEFWrapper(new ComponentCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Device_3082 == requestElementType) {
-
return getGEFWrapper(new DeviceCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.ExecutionEnvironment_3083 == requestElementType) {
-
return getGEFWrapper(new ExecutionEnvironmentCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Node_3084 == requestElementType) {
-
return getGEFWrapper(new NodeCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Class_3085 == requestElementType) {
-
return getGEFWrapper(new ClassCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Collaboration_3086 == requestElementType) {
-
return getGEFWrapper(new CollaborationCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Interface_3087 == requestElementType) {
-
return getGEFWrapper(new InterfaceCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.PrimitiveType_3078 == requestElementType) {
-
return getGEFWrapper(new PrimitiveTypeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Enumeration_3079 == requestElementType) {
-
return getGEFWrapper(new EnumerationCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.DataType_3080 == requestElementType) {
-
return getGEFWrapper(new DataTypeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Actor_3091 == requestElementType) {
-
return getGEFWrapper(new ActorCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.DeploymentSpecification_3092 == requestElementType) {
-
return getGEFWrapper(new DeploymentSpecificationCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Artifact_3093 == requestElementType) {
-
return getGEFWrapper(new ArtifactCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.InformationItem_3094 == requestElementType) {
-
return getGEFWrapper(new InformationItemCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Signal_3095 == requestElementType) {
-
return getGEFWrapper(new SignalCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.UseCase_3096 == requestElementType) {
-
return getGEFWrapper(new UseCaseCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Comment_3097 == requestElementType) {
-
return getGEFWrapper(new CommentCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.DurationConstraint_3116 == requestElementType) {
-
return getGEFWrapper(new DurationConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.TimeConstraint_3117 == requestElementType) {
-
return getGEFWrapper(new TimeConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.IntervalConstraint_3118 == requestElementType) {
-
return getGEFWrapper(new IntervalConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.InteractionConstraint_3119 == requestElementType) {
-
return getGEFWrapper(new InteractionConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Constraint_3120 == requestElementType) {
-
return getGEFWrapper(new ConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
return super.getCreateCommand(req);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/NodeCompositeItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/NodeCompositeItemSemanticEditPolicy.java index 4f495fd11a7..0bce85a3de6 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/NodeCompositeItemSemanticEditPolicy.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/NodeCompositeItemSemanticEditPolicy.java @@ -90,12 +90,8 @@ public class NodeCompositeItemSemanticEditPolicy extends UMLBaseItemSemanticEdit if(requestElementType == null) {
return super.getCreateCommand(req);
}
-
-
if(UMLElementTypes.Port_3069 == requestElementType) {
-
return getGEFWrapper(new PortCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
return super.getCreateCommand(req);
}
@@ -109,7 +105,6 @@ public class NodeCompositeItemSemanticEditPolicy extends UMLBaseItemSemanticEdit if(provider != null) {
// Retrieve delete command from the Element Edit service
ICommand deleteCommand = provider.getEditCommand(req);
-
if(deleteCommand != null) {
return new ICommandProxy(deleteCommand);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/NodeCompositeItemSemanticEditPolicycN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/NodeCompositeItemSemanticEditPolicycN.java index 78f3d79356d..38f1679a09d 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/NodeCompositeItemSemanticEditPolicycN.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/NodeCompositeItemSemanticEditPolicycN.java @@ -90,12 +90,8 @@ public class NodeCompositeItemSemanticEditPolicycN extends UMLBaseItemSemanticEd if(requestElementType == null) {
return super.getCreateCommand(req);
}
-
-
if(UMLElementTypes.Port_3069 == requestElementType) {
-
return getGEFWrapper(new PortCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
return super.getCreateCommand(req);
}
@@ -109,7 +105,6 @@ public class NodeCompositeItemSemanticEditPolicycN extends UMLBaseItemSemanticEd if(provider != null) {
// Retrieve delete command from the Element Edit service
ICommand deleteCommand = provider.getEditCommand(req);
-
if(deleteCommand != null) {
return new ICommandProxy(deleteCommand);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/OpaqueBehaviorCompositeCompartmentItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/OpaqueBehaviorCompositeCompartmentItemSemanticEditPolicy.java index dab8e20d3fb..521a8ca3822 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/OpaqueBehaviorCompositeCompartmentItemSemanticEditPolicy.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/OpaqueBehaviorCompositeCompartmentItemSemanticEditPolicy.java @@ -68,162 +68,98 @@ public class OpaqueBehaviorCompositeCompartmentItemSemanticEditPolicy extends UM if(requestElementType == null) {
return super.getCreateCommand(req);
}
-
-
if(UMLElementTypes.Parameter_3088 == requestElementType) {
-
return getGEFWrapper(new ParameterCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Property_3070 == requestElementType) {
-
return getGEFWrapper(new PropertyPartCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.CollaborationUse_3071 == requestElementType) {
-
return getGEFWrapper(new CollaborationUseCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Activity_3072 == requestElementType) {
-
return getGEFWrapper(new ActivityCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Interaction_3073 == requestElementType) {
-
return getGEFWrapper(new InteractionCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.ProtocolStateMachine_3074 == requestElementType) {
-
return getGEFWrapper(new ProtocolStateMachineCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.StateMachine_3075 == requestElementType) {
-
return getGEFWrapper(new StateMachineCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.FunctionBehavior_3076 == requestElementType) {
-
return getGEFWrapper(new FunctionBehaviorCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.OpaqueBehavior_3077 == requestElementType) {
-
return getGEFWrapper(new OpaqueBehaviorCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Component_3081 == requestElementType) {
-
return getGEFWrapper(new ComponentCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Device_3082 == requestElementType) {
-
return getGEFWrapper(new DeviceCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.ExecutionEnvironment_3083 == requestElementType) {
-
return getGEFWrapper(new ExecutionEnvironmentCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Node_3084 == requestElementType) {
-
return getGEFWrapper(new NodeCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Class_3085 == requestElementType) {
-
return getGEFWrapper(new ClassCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Collaboration_3086 == requestElementType) {
-
return getGEFWrapper(new CollaborationCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Interface_3087 == requestElementType) {
-
return getGEFWrapper(new InterfaceCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.PrimitiveType_3078 == requestElementType) {
-
return getGEFWrapper(new PrimitiveTypeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Enumeration_3079 == requestElementType) {
-
return getGEFWrapper(new EnumerationCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.DataType_3080 == requestElementType) {
-
return getGEFWrapper(new DataTypeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Actor_3091 == requestElementType) {
-
return getGEFWrapper(new ActorCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.DeploymentSpecification_3092 == requestElementType) {
-
return getGEFWrapper(new DeploymentSpecificationCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Artifact_3093 == requestElementType) {
-
return getGEFWrapper(new ArtifactCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.InformationItem_3094 == requestElementType) {
-
return getGEFWrapper(new InformationItemCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Signal_3095 == requestElementType) {
-
return getGEFWrapper(new SignalCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.UseCase_3096 == requestElementType) {
-
return getGEFWrapper(new UseCaseCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Comment_3097 == requestElementType) {
-
return getGEFWrapper(new CommentCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.DurationConstraint_3116 == requestElementType) {
-
return getGEFWrapper(new DurationConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.TimeConstraint_3117 == requestElementType) {
-
return getGEFWrapper(new TimeConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.IntervalConstraint_3118 == requestElementType) {
-
return getGEFWrapper(new IntervalConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.InteractionConstraint_3119 == requestElementType) {
-
return getGEFWrapper(new InteractionConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Constraint_3120 == requestElementType) {
-
return getGEFWrapper(new ConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
return super.getCreateCommand(req);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/OpaqueBehaviorCompositeCompartmentItemSemanticEditPolicyCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/OpaqueBehaviorCompositeCompartmentItemSemanticEditPolicyCN.java index 326c0b89929..fce962d74d6 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/OpaqueBehaviorCompositeCompartmentItemSemanticEditPolicyCN.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/OpaqueBehaviorCompositeCompartmentItemSemanticEditPolicyCN.java @@ -68,162 +68,98 @@ public class OpaqueBehaviorCompositeCompartmentItemSemanticEditPolicyCN extends if(requestElementType == null) {
return super.getCreateCommand(req);
}
-
-
if(UMLElementTypes.Parameter_3088 == requestElementType) {
-
return getGEFWrapper(new ParameterCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Property_3070 == requestElementType) {
-
return getGEFWrapper(new PropertyPartCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.CollaborationUse_3071 == requestElementType) {
-
return getGEFWrapper(new CollaborationUseCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Activity_3072 == requestElementType) {
-
return getGEFWrapper(new ActivityCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Interaction_3073 == requestElementType) {
-
return getGEFWrapper(new InteractionCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.ProtocolStateMachine_3074 == requestElementType) {
-
return getGEFWrapper(new ProtocolStateMachineCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.StateMachine_3075 == requestElementType) {
-
return getGEFWrapper(new StateMachineCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.FunctionBehavior_3076 == requestElementType) {
-
return getGEFWrapper(new FunctionBehaviorCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.OpaqueBehavior_3077 == requestElementType) {
-
return getGEFWrapper(new OpaqueBehaviorCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Component_3081 == requestElementType) {
-
return getGEFWrapper(new ComponentCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Device_3082 == requestElementType) {
-
return getGEFWrapper(new DeviceCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.ExecutionEnvironment_3083 == requestElementType) {
-
return getGEFWrapper(new ExecutionEnvironmentCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Node_3084 == requestElementType) {
-
return getGEFWrapper(new NodeCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Class_3085 == requestElementType) {
-
return getGEFWrapper(new ClassCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Collaboration_3086 == requestElementType) {
-
return getGEFWrapper(new CollaborationCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Interface_3087 == requestElementType) {
-
return getGEFWrapper(new InterfaceCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.PrimitiveType_3078 == requestElementType) {
-
return getGEFWrapper(new PrimitiveTypeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Enumeration_3079 == requestElementType) {
-
return getGEFWrapper(new EnumerationCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.DataType_3080 == requestElementType) {
-
return getGEFWrapper(new DataTypeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Actor_3091 == requestElementType) {
-
return getGEFWrapper(new ActorCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.DeploymentSpecification_3092 == requestElementType) {
-
return getGEFWrapper(new DeploymentSpecificationCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Artifact_3093 == requestElementType) {
-
return getGEFWrapper(new ArtifactCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.InformationItem_3094 == requestElementType) {
-
return getGEFWrapper(new InformationItemCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Signal_3095 == requestElementType) {
-
return getGEFWrapper(new SignalCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.UseCase_3096 == requestElementType) {
-
return getGEFWrapper(new UseCaseCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Comment_3097 == requestElementType) {
-
return getGEFWrapper(new CommentCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.DurationConstraint_3116 == requestElementType) {
-
return getGEFWrapper(new DurationConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.TimeConstraint_3117 == requestElementType) {
-
return getGEFWrapper(new TimeConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.IntervalConstraint_3118 == requestElementType) {
-
return getGEFWrapper(new IntervalConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.InteractionConstraint_3119 == requestElementType) {
-
return getGEFWrapper(new InteractionConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Constraint_3120 == requestElementType) {
-
return getGEFWrapper(new ConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
return super.getCreateCommand(req);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/OpaqueBehaviorCompositeItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/OpaqueBehaviorCompositeItemSemanticEditPolicy.java index c88fd666c49..f21e709661c 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/OpaqueBehaviorCompositeItemSemanticEditPolicy.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/OpaqueBehaviorCompositeItemSemanticEditPolicy.java @@ -91,17 +91,11 @@ public class OpaqueBehaviorCompositeItemSemanticEditPolicy extends UMLBaseItemSe if(requestElementType == null) {
return super.getCreateCommand(req);
}
-
-
if(UMLElementTypes.Port_3069 == requestElementType) {
-
return getGEFWrapper(new PortCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Parameter_3088 == requestElementType) {
-
return getGEFWrapper(new ParameterCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
return super.getCreateCommand(req);
}
@@ -115,7 +109,6 @@ public class OpaqueBehaviorCompositeItemSemanticEditPolicy extends UMLBaseItemSe if(provider != null) {
// Retrieve delete command from the Element Edit service
ICommand deleteCommand = provider.getEditCommand(req);
-
if(deleteCommand != null) {
return new ICommandProxy(deleteCommand);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/OpaqueBehaviorCompositeItemSemanticEditPolicyCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/OpaqueBehaviorCompositeItemSemanticEditPolicyCN.java index aaf99cd4a76..726b4687a24 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/OpaqueBehaviorCompositeItemSemanticEditPolicyCN.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/OpaqueBehaviorCompositeItemSemanticEditPolicyCN.java @@ -91,17 +91,11 @@ public class OpaqueBehaviorCompositeItemSemanticEditPolicyCN extends UMLBaseItem if(requestElementType == null) {
return super.getCreateCommand(req);
}
-
-
if(UMLElementTypes.Port_3069 == requestElementType) {
-
return getGEFWrapper(new PortCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Parameter_3088 == requestElementType) {
-
return getGEFWrapper(new ParameterCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
return super.getCreateCommand(req);
}
@@ -115,7 +109,6 @@ public class OpaqueBehaviorCompositeItemSemanticEditPolicyCN extends UMLBaseItem if(provider != null) {
// Retrieve delete command from the Element Edit service
ICommand deleteCommand = provider.getEditCommand(req);
-
if(deleteCommand != null) {
return new ICommandProxy(deleteCommand);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/OpaqueExpressionItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/OpaqueExpressionItemSemanticEditPolicy.java index eb1456f9133..24fd387bc59 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/OpaqueExpressionItemSemanticEditPolicy.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/OpaqueExpressionItemSemanticEditPolicy.java @@ -83,7 +83,6 @@ public class OpaqueExpressionItemSemanticEditPolicy extends UMLBaseItemSemanticE if(provider != null) {
// Retrieve delete command from the Element Edit service
ICommand deleteCommand = provider.getEditCommand(req);
-
if(deleteCommand != null) {
return new ICommandProxy(deleteCommand);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ParameterItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ParameterItemSemanticEditPolicy.java index 5abc1ac8b63..a821ac4823c 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ParameterItemSemanticEditPolicy.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ParameterItemSemanticEditPolicy.java @@ -83,7 +83,6 @@ public class ParameterItemSemanticEditPolicy extends UMLBaseItemSemanticEditPoli if(provider != null) {
// Retrieve delete command from the Element Edit service
ICommand deleteCommand = provider.getEditCommand(req);
-
if(deleteCommand != null) {
return new ICommandProxy(deleteCommand);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/PortItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/PortItemSemanticEditPolicy.java index 20bc29c6e44..31577fa9e81 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/PortItemSemanticEditPolicy.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/PortItemSemanticEditPolicy.java @@ -83,7 +83,6 @@ public class PortItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy { if(provider != null) {
// Retrieve delete command from the Element Edit service
ICommand deleteCommand = provider.getEditCommand(req);
-
if(deleteCommand != null) {
return new ICommandProxy(deleteCommand);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/PrimitiveTypeItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/PrimitiveTypeItemSemanticEditPolicy.java index 2dbf5d510ca..54088980a0a 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/PrimitiveTypeItemSemanticEditPolicy.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/PrimitiveTypeItemSemanticEditPolicy.java @@ -88,7 +88,6 @@ public class PrimitiveTypeItemSemanticEditPolicy extends UMLBaseItemSemanticEdit if(provider != null) {
// Retrieve delete command from the Element Edit service
ICommand deleteCommand = provider.getEditCommand(req);
-
if(deleteCommand != null) {
return new ICommandProxy(deleteCommand);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/PrimitiveTypeItemSemanticEditPolicyCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/PrimitiveTypeItemSemanticEditPolicyCN.java index ec104b64b31..4caef5e9cf3 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/PrimitiveTypeItemSemanticEditPolicyCN.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/PrimitiveTypeItemSemanticEditPolicyCN.java @@ -88,7 +88,6 @@ public class PrimitiveTypeItemSemanticEditPolicyCN extends UMLBaseItemSemanticEd if(provider != null) {
// Retrieve delete command from the Element Edit service
ICommand deleteCommand = provider.getEditCommand(req);
-
if(deleteCommand != null) {
return new ICommandProxy(deleteCommand);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/PropertyPartCompartmentItemSemanticEditPolicyCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/PropertyPartCompartmentItemSemanticEditPolicyCN.java index 43fa2279f5e..479452b239f 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/PropertyPartCompartmentItemSemanticEditPolicyCN.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/PropertyPartCompartmentItemSemanticEditPolicyCN.java @@ -39,17 +39,11 @@ public class PropertyPartCompartmentItemSemanticEditPolicyCN extends UMLBaseItem if(requestElementType == null) {
return super.getCreateCommand(req);
}
-
-
if(UMLElementTypes.Property_3070 == requestElementType) {
-
return getGEFWrapper(new PropertyPartCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Comment_3097 == requestElementType) {
-
return getGEFWrapper(new CommentCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
return super.getCreateCommand(req);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/PropertyPartItemSemanticEditPolicyCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/PropertyPartItemSemanticEditPolicyCN.java index 5f275524c1f..d55d1ef0f2f 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/PropertyPartItemSemanticEditPolicyCN.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/PropertyPartItemSemanticEditPolicyCN.java @@ -85,12 +85,8 @@ public class PropertyPartItemSemanticEditPolicyCN extends UMLBaseItemSemanticEdi if(requestElementType == null) {
return super.getCreateCommand(req);
}
-
-
if(UMLElementTypes.Port_3069 == requestElementType) {
-
return getGEFWrapper(new PortCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
return super.getCreateCommand(req);
}
@@ -104,7 +100,6 @@ public class PropertyPartItemSemanticEditPolicyCN extends UMLBaseItemSemanticEdi if(provider != null) {
// Retrieve delete command from the Element Edit service
ICommand deleteCommand = provider.getEditCommand(req);
-
if(deleteCommand != null) {
return new ICommandProxy(deleteCommand);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ProtocolStateMachineCompositeCompartmentItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ProtocolStateMachineCompositeCompartmentItemSemanticEditPolicy.java index c24a4e624e7..ac3c83dbd2d 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ProtocolStateMachineCompositeCompartmentItemSemanticEditPolicy.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ProtocolStateMachineCompositeCompartmentItemSemanticEditPolicy.java @@ -68,162 +68,98 @@ public class ProtocolStateMachineCompositeCompartmentItemSemanticEditPolicy exte if(requestElementType == null) {
return super.getCreateCommand(req);
}
-
-
if(UMLElementTypes.Parameter_3088 == requestElementType) {
-
return getGEFWrapper(new ParameterCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Property_3070 == requestElementType) {
-
return getGEFWrapper(new PropertyPartCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.CollaborationUse_3071 == requestElementType) {
-
return getGEFWrapper(new CollaborationUseCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Activity_3072 == requestElementType) {
-
return getGEFWrapper(new ActivityCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Interaction_3073 == requestElementType) {
-
return getGEFWrapper(new InteractionCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.ProtocolStateMachine_3074 == requestElementType) {
-
return getGEFWrapper(new ProtocolStateMachineCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.StateMachine_3075 == requestElementType) {
-
return getGEFWrapper(new StateMachineCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.FunctionBehavior_3076 == requestElementType) {
-
return getGEFWrapper(new FunctionBehaviorCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.OpaqueBehavior_3077 == requestElementType) {
-
return getGEFWrapper(new OpaqueBehaviorCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Component_3081 == requestElementType) {
-
return getGEFWrapper(new ComponentCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Device_3082 == requestElementType) {
-
return getGEFWrapper(new DeviceCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.ExecutionEnvironment_3083 == requestElementType) {
-
return getGEFWrapper(new ExecutionEnvironmentCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Node_3084 == requestElementType) {
-
return getGEFWrapper(new NodeCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Class_3085 == requestElementType) {
-
return getGEFWrapper(new ClassCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Collaboration_3086 == requestElementType) {
-
return getGEFWrapper(new CollaborationCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Interface_3087 == requestElementType) {
-
return getGEFWrapper(new InterfaceCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.PrimitiveType_3078 == requestElementType) {
-
return getGEFWrapper(new PrimitiveTypeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Enumeration_3079 == requestElementType) {
-
return getGEFWrapper(new EnumerationCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.DataType_3080 == requestElementType) {
-
return getGEFWrapper(new DataTypeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Actor_3091 == requestElementType) {
-
return getGEFWrapper(new ActorCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.DeploymentSpecification_3092 == requestElementType) {
-
return getGEFWrapper(new DeploymentSpecificationCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Artifact_3093 == requestElementType) {
-
return getGEFWrapper(new ArtifactCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.InformationItem_3094 == requestElementType) {
-
return getGEFWrapper(new InformationItemCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Signal_3095 == requestElementType) {
-
return getGEFWrapper(new SignalCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.UseCase_3096 == requestElementType) {
-
return getGEFWrapper(new UseCaseCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Comment_3097 == requestElementType) {
-
return getGEFWrapper(new CommentCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.DurationConstraint_3116 == requestElementType) {
-
return getGEFWrapper(new DurationConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.TimeConstraint_3117 == requestElementType) {
-
return getGEFWrapper(new TimeConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.IntervalConstraint_3118 == requestElementType) {
-
return getGEFWrapper(new IntervalConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.InteractionConstraint_3119 == requestElementType) {
-
return getGEFWrapper(new InteractionConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Constraint_3120 == requestElementType) {
-
return getGEFWrapper(new ConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
return super.getCreateCommand(req);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ProtocolStateMachineCompositeCompartmentItemSemanticEditPolicyCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ProtocolStateMachineCompositeCompartmentItemSemanticEditPolicyCN.java index 87b2fb34493..6c973f02d8a 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ProtocolStateMachineCompositeCompartmentItemSemanticEditPolicyCN.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ProtocolStateMachineCompositeCompartmentItemSemanticEditPolicyCN.java @@ -68,162 +68,98 @@ public class ProtocolStateMachineCompositeCompartmentItemSemanticEditPolicyCN ex if(requestElementType == null) {
return super.getCreateCommand(req);
}
-
-
if(UMLElementTypes.Parameter_3088 == requestElementType) {
-
return getGEFWrapper(new ParameterCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Property_3070 == requestElementType) {
-
return getGEFWrapper(new PropertyPartCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.CollaborationUse_3071 == requestElementType) {
-
return getGEFWrapper(new CollaborationUseCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Activity_3072 == requestElementType) {
-
return getGEFWrapper(new ActivityCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Interaction_3073 == requestElementType) {
-
return getGEFWrapper(new InteractionCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.ProtocolStateMachine_3074 == requestElementType) {
-
return getGEFWrapper(new ProtocolStateMachineCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.StateMachine_3075 == requestElementType) {
-
return getGEFWrapper(new StateMachineCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.FunctionBehavior_3076 == requestElementType) {
-
return getGEFWrapper(new FunctionBehaviorCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.OpaqueBehavior_3077 == requestElementType) {
-
return getGEFWrapper(new OpaqueBehaviorCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Component_3081 == requestElementType) {
-
return getGEFWrapper(new ComponentCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Device_3082 == requestElementType) {
-
return getGEFWrapper(new DeviceCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.ExecutionEnvironment_3083 == requestElementType) {
-
return getGEFWrapper(new ExecutionEnvironmentCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Node_3084 == requestElementType) {
-
return getGEFWrapper(new NodeCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Class_3085 == requestElementType) {
-
return getGEFWrapper(new ClassCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Collaboration_3086 == requestElementType) {
-
return getGEFWrapper(new CollaborationCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Interface_3087 == requestElementType) {
-
return getGEFWrapper(new InterfaceCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.PrimitiveType_3078 == requestElementType) {
-
return getGEFWrapper(new PrimitiveTypeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Enumeration_3079 == requestElementType) {
-
return getGEFWrapper(new EnumerationCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.DataType_3080 == requestElementType) {
-
return getGEFWrapper(new DataTypeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Actor_3091 == requestElementType) {
-
return getGEFWrapper(new ActorCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.DeploymentSpecification_3092 == requestElementType) {
-
return getGEFWrapper(new DeploymentSpecificationCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Artifact_3093 == requestElementType) {
-
return getGEFWrapper(new ArtifactCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.InformationItem_3094 == requestElementType) {
-
return getGEFWrapper(new InformationItemCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Signal_3095 == requestElementType) {
-
return getGEFWrapper(new SignalCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.UseCase_3096 == requestElementType) {
-
return getGEFWrapper(new UseCaseCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Comment_3097 == requestElementType) {
-
return getGEFWrapper(new CommentCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.DurationConstraint_3116 == requestElementType) {
-
return getGEFWrapper(new DurationConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.TimeConstraint_3117 == requestElementType) {
-
return getGEFWrapper(new TimeConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.IntervalConstraint_3118 == requestElementType) {
-
return getGEFWrapper(new IntervalConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.InteractionConstraint_3119 == requestElementType) {
-
return getGEFWrapper(new InteractionConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Constraint_3120 == requestElementType) {
-
return getGEFWrapper(new ConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
return super.getCreateCommand(req);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ProtocolStateMachineCompositeItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ProtocolStateMachineCompositeItemSemanticEditPolicy.java index 36f0e832e52..1a9de00458b 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ProtocolStateMachineCompositeItemSemanticEditPolicy.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ProtocolStateMachineCompositeItemSemanticEditPolicy.java @@ -91,17 +91,11 @@ public class ProtocolStateMachineCompositeItemSemanticEditPolicy extends UMLBase if(requestElementType == null) {
return super.getCreateCommand(req);
}
-
-
if(UMLElementTypes.Port_3069 == requestElementType) {
-
return getGEFWrapper(new PortCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Parameter_3088 == requestElementType) {
-
return getGEFWrapper(new ParameterCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
return super.getCreateCommand(req);
}
@@ -115,7 +109,6 @@ public class ProtocolStateMachineCompositeItemSemanticEditPolicy extends UMLBase if(provider != null) {
// Retrieve delete command from the Element Edit service
ICommand deleteCommand = provider.getEditCommand(req);
-
if(deleteCommand != null) {
return new ICommandProxy(deleteCommand);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ProtocolStateMachineCompositeItemSemanticEditPolicyCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ProtocolStateMachineCompositeItemSemanticEditPolicyCN.java index 88ca9d58747..1ac5b2220e1 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ProtocolStateMachineCompositeItemSemanticEditPolicyCN.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ProtocolStateMachineCompositeItemSemanticEditPolicyCN.java @@ -91,17 +91,11 @@ public class ProtocolStateMachineCompositeItemSemanticEditPolicyCN extends UMLBa if(requestElementType == null) {
return super.getCreateCommand(req);
}
-
-
if(UMLElementTypes.Port_3069 == requestElementType) {
-
return getGEFWrapper(new PortCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Parameter_3088 == requestElementType) {
-
return getGEFWrapper(new ParameterCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
return super.getCreateCommand(req);
}
@@ -115,7 +109,6 @@ public class ProtocolStateMachineCompositeItemSemanticEditPolicyCN extends UMLBa if(provider != null) {
// Retrieve delete command from the Element Edit service
ICommand deleteCommand = provider.getEditCommand(req);
-
if(deleteCommand != null) {
return new ICommandProxy(deleteCommand);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/RealizationItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/RealizationItemSemanticEditPolicy.java index 710012a2334..1c926fb04df 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/RealizationItemSemanticEditPolicy.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/RealizationItemSemanticEditPolicy.java @@ -83,7 +83,6 @@ public class RealizationItemSemanticEditPolicy extends UMLBaseItemSemanticEditPo if(provider != null) {
// Retrieve delete command from the Element Edit service
ICommand deleteCommand = provider.getEditCommand(req);
-
if(deleteCommand != null) {
return new ICommandProxy(deleteCommand);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/RoleBindingItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/RoleBindingItemSemanticEditPolicy.java index 0a1bf4288ee..5c03c7db8b0 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/RoleBindingItemSemanticEditPolicy.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/RoleBindingItemSemanticEditPolicy.java @@ -83,7 +83,6 @@ public class RoleBindingItemSemanticEditPolicy extends UMLBaseItemSemanticEditPo if(provider != null) {
// Retrieve delete command from the Element Edit service
ICommand deleteCommand = provider.getEditCommand(req);
-
if(deleteCommand != null) {
return new ICommandProxy(deleteCommand);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/SignalEventItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/SignalEventItemSemanticEditPolicy.java index 9de70f7a1ba..7e4c07ec9aa 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/SignalEventItemSemanticEditPolicy.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/SignalEventItemSemanticEditPolicy.java @@ -83,7 +83,6 @@ public class SignalEventItemSemanticEditPolicy extends UMLBaseItemSemanticEditPo if(provider != null) {
// Retrieve delete command from the Element Edit service
ICommand deleteCommand = provider.getEditCommand(req);
-
if(deleteCommand != null) {
return new ICommandProxy(deleteCommand);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/SignalItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/SignalItemSemanticEditPolicy.java index 6dd1d989bb7..da1bcc80d2d 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/SignalItemSemanticEditPolicy.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/SignalItemSemanticEditPolicy.java @@ -88,7 +88,6 @@ public class SignalItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy if(provider != null) {
// Retrieve delete command from the Element Edit service
ICommand deleteCommand = provider.getEditCommand(req);
-
if(deleteCommand != null) {
return new ICommandProxy(deleteCommand);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/SignalItemSemanticEditPolicyCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/SignalItemSemanticEditPolicyCN.java index aae5bed57d4..8ef07efe5e8 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/SignalItemSemanticEditPolicyCN.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/SignalItemSemanticEditPolicyCN.java @@ -88,7 +88,6 @@ public class SignalItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPolic if(provider != null) {
// Retrieve delete command from the Element Edit service
ICommand deleteCommand = provider.getEditCommand(req);
-
if(deleteCommand != null) {
return new ICommandProxy(deleteCommand);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/StateMachineCompositeCompartmentItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/StateMachineCompositeCompartmentItemSemanticEditPolicy.java index 34560d5e53c..305f8bd5503 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/StateMachineCompositeCompartmentItemSemanticEditPolicy.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/StateMachineCompositeCompartmentItemSemanticEditPolicy.java @@ -68,162 +68,98 @@ public class StateMachineCompositeCompartmentItemSemanticEditPolicy extends UMLB if(requestElementType == null) {
return super.getCreateCommand(req);
}
-
-
if(UMLElementTypes.Parameter_3088 == requestElementType) {
-
return getGEFWrapper(new ParameterCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Property_3070 == requestElementType) {
-
return getGEFWrapper(new PropertyPartCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.CollaborationUse_3071 == requestElementType) {
-
return getGEFWrapper(new CollaborationUseCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Activity_3072 == requestElementType) {
-
return getGEFWrapper(new ActivityCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Interaction_3073 == requestElementType) {
-
return getGEFWrapper(new InteractionCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.ProtocolStateMachine_3074 == requestElementType) {
-
return getGEFWrapper(new ProtocolStateMachineCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.StateMachine_3075 == requestElementType) {
-
return getGEFWrapper(new StateMachineCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.FunctionBehavior_3076 == requestElementType) {
-
return getGEFWrapper(new FunctionBehaviorCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.OpaqueBehavior_3077 == requestElementType) {
-
return getGEFWrapper(new OpaqueBehaviorCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Component_3081 == requestElementType) {
-
return getGEFWrapper(new ComponentCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Device_3082 == requestElementType) {
-
return getGEFWrapper(new DeviceCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.ExecutionEnvironment_3083 == requestElementType) {
-
return getGEFWrapper(new ExecutionEnvironmentCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Node_3084 == requestElementType) {
-
return getGEFWrapper(new NodeCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Class_3085 == requestElementType) {
-
return getGEFWrapper(new ClassCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Collaboration_3086 == requestElementType) {
-
return getGEFWrapper(new CollaborationCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Interface_3087 == requestElementType) {
-
return getGEFWrapper(new InterfaceCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.PrimitiveType_3078 == requestElementType) {
-
return getGEFWrapper(new PrimitiveTypeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Enumeration_3079 == requestElementType) {
-
return getGEFWrapper(new EnumerationCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.DataType_3080 == requestElementType) {
-
return getGEFWrapper(new DataTypeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Actor_3091 == requestElementType) {
-
return getGEFWrapper(new ActorCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.DeploymentSpecification_3092 == requestElementType) {
-
return getGEFWrapper(new DeploymentSpecificationCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Artifact_3093 == requestElementType) {
-
return getGEFWrapper(new ArtifactCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.InformationItem_3094 == requestElementType) {
-
return getGEFWrapper(new InformationItemCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Signal_3095 == requestElementType) {
-
return getGEFWrapper(new SignalCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.UseCase_3096 == requestElementType) {
-
return getGEFWrapper(new UseCaseCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Comment_3097 == requestElementType) {
-
return getGEFWrapper(new CommentCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.DurationConstraint_3116 == requestElementType) {
-
return getGEFWrapper(new DurationConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.TimeConstraint_3117 == requestElementType) {
-
return getGEFWrapper(new TimeConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.IntervalConstraint_3118 == requestElementType) {
-
return getGEFWrapper(new IntervalConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.InteractionConstraint_3119 == requestElementType) {
-
return getGEFWrapper(new InteractionConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Constraint_3120 == requestElementType) {
-
return getGEFWrapper(new ConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
return super.getCreateCommand(req);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/StateMachineCompositeCompartmentItemSemanticEditPolicyCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/StateMachineCompositeCompartmentItemSemanticEditPolicyCN.java index c1f5abcfc58..2319059d382 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/StateMachineCompositeCompartmentItemSemanticEditPolicyCN.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/StateMachineCompositeCompartmentItemSemanticEditPolicyCN.java @@ -68,162 +68,98 @@ public class StateMachineCompositeCompartmentItemSemanticEditPolicyCN extends UM if(requestElementType == null) {
return super.getCreateCommand(req);
}
-
-
if(UMLElementTypes.Parameter_3088 == requestElementType) {
-
return getGEFWrapper(new ParameterCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Property_3070 == requestElementType) {
-
return getGEFWrapper(new PropertyPartCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.CollaborationUse_3071 == requestElementType) {
-
return getGEFWrapper(new CollaborationUseCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Activity_3072 == requestElementType) {
-
return getGEFWrapper(new ActivityCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Interaction_3073 == requestElementType) {
-
return getGEFWrapper(new InteractionCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.ProtocolStateMachine_3074 == requestElementType) {
-
return getGEFWrapper(new ProtocolStateMachineCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.StateMachine_3075 == requestElementType) {
-
return getGEFWrapper(new StateMachineCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.FunctionBehavior_3076 == requestElementType) {
-
return getGEFWrapper(new FunctionBehaviorCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.OpaqueBehavior_3077 == requestElementType) {
-
return getGEFWrapper(new OpaqueBehaviorCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Component_3081 == requestElementType) {
-
return getGEFWrapper(new ComponentCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Device_3082 == requestElementType) {
-
return getGEFWrapper(new DeviceCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.ExecutionEnvironment_3083 == requestElementType) {
-
return getGEFWrapper(new ExecutionEnvironmentCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Node_3084 == requestElementType) {
-
return getGEFWrapper(new NodeCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Class_3085 == requestElementType) {
-
return getGEFWrapper(new ClassCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Collaboration_3086 == requestElementType) {
-
return getGEFWrapper(new CollaborationCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Interface_3087 == requestElementType) {
-
return getGEFWrapper(new InterfaceCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.PrimitiveType_3078 == requestElementType) {
-
return getGEFWrapper(new PrimitiveTypeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Enumeration_3079 == requestElementType) {
-
return getGEFWrapper(new EnumerationCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.DataType_3080 == requestElementType) {
-
return getGEFWrapper(new DataTypeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Actor_3091 == requestElementType) {
-
return getGEFWrapper(new ActorCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.DeploymentSpecification_3092 == requestElementType) {
-
return getGEFWrapper(new DeploymentSpecificationCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Artifact_3093 == requestElementType) {
-
return getGEFWrapper(new ArtifactCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.InformationItem_3094 == requestElementType) {
-
return getGEFWrapper(new InformationItemCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Signal_3095 == requestElementType) {
-
return getGEFWrapper(new SignalCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.UseCase_3096 == requestElementType) {
-
return getGEFWrapper(new UseCaseCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Comment_3097 == requestElementType) {
-
return getGEFWrapper(new CommentCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.DurationConstraint_3116 == requestElementType) {
-
return getGEFWrapper(new DurationConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.TimeConstraint_3117 == requestElementType) {
-
return getGEFWrapper(new TimeConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.IntervalConstraint_3118 == requestElementType) {
-
return getGEFWrapper(new IntervalConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.InteractionConstraint_3119 == requestElementType) {
-
return getGEFWrapper(new InteractionConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Constraint_3120 == requestElementType) {
-
return getGEFWrapper(new ConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
return super.getCreateCommand(req);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/StateMachineCompositeItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/StateMachineCompositeItemSemanticEditPolicy.java index 71d07b29235..3c44eacdd70 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/StateMachineCompositeItemSemanticEditPolicy.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/StateMachineCompositeItemSemanticEditPolicy.java @@ -91,17 +91,11 @@ public class StateMachineCompositeItemSemanticEditPolicy extends UMLBaseItemSema if(requestElementType == null) {
return super.getCreateCommand(req);
}
-
-
if(UMLElementTypes.Port_3069 == requestElementType) {
-
return getGEFWrapper(new PortCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Parameter_3088 == requestElementType) {
-
return getGEFWrapper(new ParameterCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
return super.getCreateCommand(req);
}
@@ -115,7 +109,6 @@ public class StateMachineCompositeItemSemanticEditPolicy extends UMLBaseItemSema if(provider != null) {
// Retrieve delete command from the Element Edit service
ICommand deleteCommand = provider.getEditCommand(req);
-
if(deleteCommand != null) {
return new ICommandProxy(deleteCommand);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/StateMachineCompositeItemSemanticEditPolicyCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/StateMachineCompositeItemSemanticEditPolicyCN.java index 0303630f0a5..39353d5cf96 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/StateMachineCompositeItemSemanticEditPolicyCN.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/StateMachineCompositeItemSemanticEditPolicyCN.java @@ -91,17 +91,11 @@ public class StateMachineCompositeItemSemanticEditPolicyCN extends UMLBaseItemSe if(requestElementType == null) {
return super.getCreateCommand(req);
}
-
-
if(UMLElementTypes.Port_3069 == requestElementType) {
-
return getGEFWrapper(new PortCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
if(UMLElementTypes.Parameter_3088 == requestElementType) {
-
return getGEFWrapper(new ParameterCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
return super.getCreateCommand(req);
}
@@ -115,7 +109,6 @@ public class StateMachineCompositeItemSemanticEditPolicyCN extends UMLBaseItemSe if(provider != null) {
// Retrieve delete command from the Element Edit service
ICommand deleteCommand = provider.getEditCommand(req);
-
if(deleteCommand != null) {
return new ICommandProxy(deleteCommand);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/StringExpressionItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/StringExpressionItemSemanticEditPolicy.java index 225e90b4cec..01f4b36a21e 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/StringExpressionItemSemanticEditPolicy.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/StringExpressionItemSemanticEditPolicy.java @@ -83,7 +83,6 @@ public class StringExpressionItemSemanticEditPolicy extends UMLBaseItemSemanticE if(provider != null) {
// Retrieve delete command from the Element Edit service
ICommand deleteCommand = provider.getEditCommand(req);
-
if(deleteCommand != null) {
return new ICommandProxy(deleteCommand);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/SubstitutionItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/SubstitutionItemSemanticEditPolicy.java index 7472ff4ab29..265439b5fe8 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/SubstitutionItemSemanticEditPolicy.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/SubstitutionItemSemanticEditPolicy.java @@ -83,7 +83,6 @@ public class SubstitutionItemSemanticEditPolicy extends UMLBaseItemSemanticEditP if(provider != null) {
// Retrieve delete command from the Element Edit service
ICommand deleteCommand = provider.getEditCommand(req);
-
if(deleteCommand != null) {
return new ICommandProxy(deleteCommand);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/TimeConstraintItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/TimeConstraintItemSemanticEditPolicy.java index 034e8c11bde..38651eb53f5 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/TimeConstraintItemSemanticEditPolicy.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/TimeConstraintItemSemanticEditPolicy.java @@ -83,7 +83,6 @@ public class TimeConstraintItemSemanticEditPolicy extends UMLBaseItemSemanticEdi if(provider != null) {
// Retrieve delete command from the Element Edit service
ICommand deleteCommand = provider.getEditCommand(req);
-
if(deleteCommand != null) {
return new ICommandProxy(deleteCommand);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/TimeConstraintItemSemanticEditPolicyCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/TimeConstraintItemSemanticEditPolicyCN.java index c53f6c96596..ca0cc856983 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/TimeConstraintItemSemanticEditPolicyCN.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/TimeConstraintItemSemanticEditPolicyCN.java @@ -83,7 +83,6 @@ public class TimeConstraintItemSemanticEditPolicyCN extends UMLBaseItemSemanticE if(provider != null) {
// Retrieve delete command from the Element Edit service
ICommand deleteCommand = provider.getEditCommand(req);
-
if(deleteCommand != null) {
return new ICommandProxy(deleteCommand);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/TimeEventItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/TimeEventItemSemanticEditPolicy.java index 97e3635acc5..efde2f6e7ed 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/TimeEventItemSemanticEditPolicy.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/TimeEventItemSemanticEditPolicy.java @@ -83,7 +83,6 @@ public class TimeEventItemSemanticEditPolicy extends UMLBaseItemSemanticEditPoli if(provider != null) {
// Retrieve delete command from the Element Edit service
ICommand deleteCommand = provider.getEditCommand(req);
-
if(deleteCommand != null) {
return new ICommandProxy(deleteCommand);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/TimeExpressionItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/TimeExpressionItemSemanticEditPolicy.java index bc760961df3..6adcbee5ee7 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/TimeExpressionItemSemanticEditPolicy.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/TimeExpressionItemSemanticEditPolicy.java @@ -83,7 +83,6 @@ public class TimeExpressionItemSemanticEditPolicy extends UMLBaseItemSemanticEdi if(provider != null) {
// Retrieve delete command from the Element Edit service
ICommand deleteCommand = provider.getEditCommand(req);
-
if(deleteCommand != null) {
return new ICommandProxy(deleteCommand);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/TimeIntervalItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/TimeIntervalItemSemanticEditPolicy.java index c8b16899a02..714fadaeb29 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/TimeIntervalItemSemanticEditPolicy.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/TimeIntervalItemSemanticEditPolicy.java @@ -83,7 +83,6 @@ public class TimeIntervalItemSemanticEditPolicy extends UMLBaseItemSemanticEditP if(provider != null) {
// Retrieve delete command from the Element Edit service
ICommand deleteCommand = provider.getEditCommand(req);
-
if(deleteCommand != null) {
return new ICommandProxy(deleteCommand);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/TimeObservationItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/TimeObservationItemSemanticEditPolicy.java index 890bdbc50b6..dfa942336eb 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/TimeObservationItemSemanticEditPolicy.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/TimeObservationItemSemanticEditPolicy.java @@ -83,7 +83,6 @@ public class TimeObservationItemSemanticEditPolicy extends UMLBaseItemSemanticEd if(provider != null) {
// Retrieve delete command from the Element Edit service
ICommand deleteCommand = provider.getEditCommand(req);
-
if(deleteCommand != null) {
return new ICommandProxy(deleteCommand);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/UMLBaseItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/UMLBaseItemSemanticEditPolicy.java index 88e3f50d3fe..59a77967443 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/UMLBaseItemSemanticEditPolicy.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/UMLBaseItemSemanticEditPolicy.java @@ -364,7 +364,6 @@ public class UMLBaseItemSemanticEditPolicy extends SemanticEditPolicy { } else {
return getGEFWrapper(new MoveElementsCommand(req));
}
-
}
/**
@@ -458,7 +457,6 @@ public class UMLBaseItemSemanticEditPolicy extends SemanticEditPolicy { return false;
}
}
-
return canExistCommentAnnotatedElement_4002(source, target);
}
@@ -471,7 +469,6 @@ public class UMLBaseItemSemanticEditPolicy extends SemanticEditPolicy { return false;
}
}
-
return canExistConstraintConstrainedElement_4003(source, target);
}
@@ -568,7 +565,6 @@ public class UMLBaseItemSemanticEditPolicy extends SemanticEditPolicy { return false;
}
}
-
return canExistTimeObservationEvent_4018(source, target);
}
@@ -581,7 +577,6 @@ public class UMLBaseItemSemanticEditPolicy extends SemanticEditPolicy { return false;
}
}
-
return canExistDurationObservationEvent_4019(source, target);
}
@@ -594,7 +589,6 @@ public class UMLBaseItemSemanticEditPolicy extends SemanticEditPolicy { return false;
}
}
-
return canExistInformationItemRepresented_4020(source, target);
}
@@ -778,9 +772,7 @@ public class UMLBaseItemSemanticEditPolicy extends SemanticEditPolicy { //Information Flow source constraint
if(source != null) {
if(!((source instanceof Actor) || (source instanceof Node) || (source instanceof UseCase) || (source instanceof Artifact) || (source instanceof Class) || (source instanceof Component) || (source instanceof Port) || (source instanceof Property) || (source instanceof Interface) || (source instanceof Package) || (source instanceof ActivityNode) || (source instanceof ActivityPartition) || (source instanceof InstanceSpecification))) {
-
return false;
-
}
if(source instanceof InstanceSpecification) {
EList<Classifier> classes = ((InstanceSpecification)source).getClassifiers();
@@ -794,9 +786,7 @@ public class UMLBaseItemSemanticEditPolicy extends SemanticEditPolicy { //Information Flow target constraint
if(target != null) {
if(!((target instanceof Actor) || (target instanceof Node) || (target instanceof UseCase) || (target instanceof Artifact) || (target instanceof Class) || (target instanceof Component) || (target instanceof Port) || (target instanceof Property) || (target instanceof Interface) || (target instanceof Package) || (target instanceof ActivityNode) || (target instanceof ActivityPartition) || (target instanceof InstanceSpecification))) {
-
return false;
-
}
if(target instanceof InstanceSpecification) {
EList<Classifier> classes = ((InstanceSpecification)target).getClassifiers();
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/UsageItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/UsageItemSemanticEditPolicy.java index ab1916da443..676150fd42c 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/UsageItemSemanticEditPolicy.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/UsageItemSemanticEditPolicy.java @@ -83,7 +83,6 @@ public class UsageItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy { if(provider != null) {
// Retrieve delete command from the Element Edit service
ICommand deleteCommand = provider.getEditCommand(req);
-
if(deleteCommand != null) {
return new ICommandProxy(deleteCommand);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/UseCaseItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/UseCaseItemSemanticEditPolicy.java index a15f17fa1b8..0ee050297c8 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/UseCaseItemSemanticEditPolicy.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/UseCaseItemSemanticEditPolicy.java @@ -88,7 +88,6 @@ public class UseCaseItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy if(provider != null) {
// Retrieve delete command from the Element Edit service
ICommand deleteCommand = provider.getEditCommand(req);
-
if(deleteCommand != null) {
return new ICommandProxy(deleteCommand);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/UseCaseItemSemanticEditPolicyCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/UseCaseItemSemanticEditPolicyCN.java index 4dd2c144021..6d5ae7865d2 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/UseCaseItemSemanticEditPolicyCN.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/UseCaseItemSemanticEditPolicyCN.java @@ -88,7 +88,6 @@ public class UseCaseItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPoli if(provider != null) {
// Retrieve delete command from the Element Edit service
ICommand deleteCommand = provider.getEditCommand(req);
-
if(deleteCommand != null) {
return new ICommandProxy(deleteCommand);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/part/UMLCreationWizard.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/part/UMLCreationWizard.java index 9ae6b8516b1..3e9e8124dd6 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/part/UMLCreationWizard.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/part/UMLCreationWizard.java @@ -114,7 +114,6 @@ public class UMLCreationWizard extends Wizard implements INewWizard { diagramModelFilePage.setTitle(Messages.UMLCreationWizard_DiagramModelFilePageTitle);
diagramModelFilePage.setDescription(Messages.UMLCreationWizard_DiagramModelFilePageDescription);
addPage(diagramModelFilePage);
-
domainModelFilePage = new UMLCreationWizardPage("DomainModelFile", getSelection(), "uml") { //$NON-NLS-1$ //$NON-NLS-2$
public void setVisible(boolean visible) {
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/part/UMLDiagramEditor.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/part/UMLDiagramEditor.java index bf1fe6f5fa3..8dd8463cecb 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/part/UMLDiagramEditor.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/part/UMLDiagramEditor.java @@ -102,17 +102,13 @@ public class UMLDiagramEditor extends UmlGmfDiagramEditor implements IProviderCh */
public UMLDiagramEditor(ServicesRegistry servicesRegistry, Diagram diagram) throws ServiceException {
super(servicesRegistry, diagram);
-
// adds a listener to the palette service, which reacts to palette customizations
PapyrusPaletteService.getInstance().addProviderChangeListener(this);
-
// Share the same editing provider
editingDomain = servicesRegistry.getService(TransactionalEditingDomain.class);
documentProvider = new GmfMultiDiagramDocumentProvider(editingDomain);
-
// overrides editing domain created by super constructor
setDocumentProvider(documentProvider);
-
}
/**
@@ -264,7 +260,6 @@ public class UMLDiagramEditor extends UmlGmfDiagramEditor implements IProviderCh dirtyState.dispose();
dirtyState = null;
}
-
super.setUndoContext(context);
}
@@ -292,12 +287,10 @@ public class UMLDiagramEditor extends UmlGmfDiagramEditor implements IProviderCh // remove palette service listener
// remove preference listener
PapyrusPaletteService.getInstance().removeProviderChangeListener(this);
-
if(dirtyState != null) {
dirtyState.dispose();
dirtyState = null;
}
-
super.dispose();
}
@@ -331,13 +324,10 @@ public class UMLDiagramEditor extends UmlGmfDiagramEditor implements IProviderCh */
protected void configurePaletteViewer(PaletteViewer viewer) {
super.configurePaletteViewer(viewer);
-
// customize menu...
viewer.setContextMenu(new PapyrusPaletteContextMenuProvider(viewer));
-
viewer.getKeyHandler().setParent(getPaletteKeyHandler());
viewer.getControl().addMouseListener(getPaletteMouseListener());
-
// Add a transfer drag target listener that is supported on
// palette template entries whose template is a creation tool.
// This will enable drag and drop of the palette shape creation
@@ -358,9 +348,7 @@ public class UMLDiagramEditor extends UmlGmfDiagramEditor implements IProviderCh * @return Palette Key Handler for the palette
*/
private KeyHandler getPaletteKeyHandler() {
-
if(paletteKeyHandler == null) {
-
paletteKeyHandler = new KeyHandler() {
/**
@@ -374,27 +362,18 @@ public class UMLDiagramEditor extends UmlGmfDiagramEditor implements IProviderCh * @return <code>true</code> if KeyEvent was handled in some way
*/
public boolean keyReleased(KeyEvent event) {
-
if(event.keyCode == SWT.Selection) {
-
Tool tool = getPaletteViewer().getActiveTool().createTool();
-
if(toolSupportsAccessibility(tool)) {
-
tool.keyUp(event, getDiagramGraphicalViewer());
-
// deactivate current selection
getPaletteViewer().setActiveTool(null);
-
return true;
}
-
}
return super.keyReleased(event);
}
-
};
-
}
return paletteKeyHandler;
}
@@ -403,9 +382,7 @@ public class UMLDiagramEditor extends UmlGmfDiagramEditor implements IProviderCh * @return Palette Mouse listener for the palette
*/
private MouseListener getPaletteMouseListener() {
-
if(paletteMouseListener == null) {
-
paletteMouseListener = new MouseListener() {
/**
@@ -422,13 +399,10 @@ public class UMLDiagramEditor extends UmlGmfDiagramEditor implements IProviderCh */
public void mouseDoubleClick(MouseEvent e) {
Tool tool = getPaletteViewer().getActiveTool().createTool();
-
if(toolSupportsAccessibility(tool)) {
-
tool.setViewer(getDiagramGraphicalViewer());
tool.setEditDomain(getDiagramGraphicalViewer().getEditDomain());
tool.mouseDoubleClick(e, getDiagramGraphicalViewer());
-
// Current active tool should be deactivated,
// but if it is down here it will get
// reactivated deep in GEF palette code after
@@ -448,14 +422,11 @@ public class UMLDiagramEditor extends UmlGmfDiagramEditor implements IProviderCh getPaletteViewer().setActiveTool(null);
clearActiveTool = false;
}
-
}
};
-
}
return paletteMouseListener;
}
-
};
}
@@ -473,7 +444,6 @@ public class UMLDiagramEditor extends UmlGmfDiagramEditor implements IProviderCh @Override
protected void initializeGraphicalViewer() {
super.initializeGraphicalViewer();
-
// Enable Drop
getDiagramGraphicalViewer().addDropTargetListener(new DropTargetListener(getDiagramGraphicalViewer(), LocalSelectionTransfer.getTransfer()) {
@@ -488,7 +458,6 @@ public class UMLDiagramEditor extends UmlGmfDiagramEditor implements IProviderCh return getEditingDomain();
}
});
-
}
/**
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/part/UMLDiagramEditorPlugin.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/part/UMLDiagramEditorPlugin.java index 1a9ba6f06df..2d6492143f5 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/part/UMLDiagramEditorPlugin.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/part/UMLDiagramEditorPlugin.java @@ -99,7 +99,6 @@ public class UMLDiagramEditorPlugin extends AbstractUIPlugin { adapterFactory = createAdapterFactory();
DiagramPreferenceInitializer diagramPreferenceInitializer = new DiagramPreferenceInitializer();
diagramPreferenceInitializer.initializeDefaultPreferences();
-
}
/**
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/part/UMLDiagramEditorUtil.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/part/UMLDiagramEditorUtil.java index a6f865f3ae9..9e9be8ff5f5 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/part/UMLDiagramEditorUtil.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/part/UMLDiagramEditorUtil.java @@ -147,19 +147,16 @@ public class UMLDiagramEditorUtil { protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
Package model = createInitialModel();
attachModelToResource(model, modelResource);
-
Diagram diagram = ViewService.createDiagram(model, CompositeStructureDiagramEditPart.MODEL_ID, UMLDiagramEditorPlugin.DIAGRAM_PREFERENCES_HINT);
if(diagram != null) {
diagramResource.getContents().add(diagram);
diagram.setName(diagramName);
diagram.setElement(model);
}
-
try {
modelResource.save(org.eclipse.papyrus.uml.diagram.composite.part.UMLDiagramEditorUtil.getSaveOptions());
diagramResource.save(org.eclipse.papyrus.uml.diagram.composite.part.UMLDiagramEditorUtil.getSaveOptions());
} catch (IOException e) {
-
UMLDiagramEditorPlugin.getInstance().logError("Unable to store model and diagram resources", e); //$NON-NLS-1$
}
return CommandResult.newOKCommandResult();
@@ -202,7 +199,6 @@ public class UMLDiagramEditorUtil { */
public static void selectElementsInDiagram(IDiagramWorkbenchPart diagramPart, List<EditPart> editParts) {
diagramPart.getDiagramGraphicalViewer().deselectAll();
-
EditPart firstPrimary = null;
for(EditPart nextPart : editParts) {
diagramPart.getDiagramGraphicalViewer().appendSelection(nextPart);
@@ -210,7 +206,6 @@ public class UMLDiagramEditorUtil { firstPrimary = nextPart;
}
}
-
if(!editParts.isEmpty()) {
diagramPart.getDiagramGraphicalViewer().reveal(firstPrimary != null ? firstPrimary : (EditPart)editParts.get(0));
}
@@ -222,7 +217,6 @@ public class UMLDiagramEditorUtil { private static int findElementsInDiagramByID(DiagramEditPart diagramPart, EObject element, List<EditPart> editPartCollector) {
IDiagramGraphicalViewer viewer = (IDiagramGraphicalViewer)diagramPart.getViewer();
final int intialNumOfEditParts = editPartCollector.size();
-
if(element instanceof View) { // support notation element lookup
EditPart editPart = (EditPart)viewer.getEditPartRegistry().get(element);
if(editPart != null) {
@@ -230,7 +224,6 @@ public class UMLDiagramEditorUtil { return 1;
}
}
-
String elementID = EMFCoreUtil.getProxyID(element);
@SuppressWarnings("unchecked")
List<EditPart> associatedParts = viewer.findEditPartsForElement(elementID, IGraphicalEditPart.class);
@@ -244,7 +237,6 @@ public class UMLDiagramEditorUtil { editPartCollector.add(nextPart);
}
}
-
if(intialNumOfEditParts == editPartCollector.size()) {
if(!associatedParts.isEmpty()) {
editPartCollector.add(associatedParts.get(0));
@@ -265,7 +257,6 @@ public class UMLDiagramEditorUtil { if(targetElement.eResource() instanceof XMLResource) {
hasStructuralURI = ((XMLResource)targetElement.eResource()).getID(targetElement) == null;
}
-
View view = null;
LinkedList<EditPart> editPartHolder = new LinkedList<EditPart>();
if(hasStructuralURI && !lazyElement2ViewMap.getElement2ViewMap().isEmpty()) {
@@ -274,7 +265,6 @@ public class UMLDiagramEditorUtil { EditPart editPart = editPartHolder.get(0);
view = editPart.getModel() instanceof View ? (View)editPart.getModel() : null;
}
-
return (view == null) ? diagramEditPart.getDiagramView() : view;
}
@@ -323,7 +313,6 @@ public class UMLDiagramEditorUtil { }
}
}
-
buildElement2ViewMap(scope, element2ViewMap, elementSet);
}
return element2ViewMap;
@@ -336,7 +325,6 @@ public class UMLDiagramEditorUtil { if(elements.size() == element2ViewMap.size()) {
return true;
}
-
if(parentView.isSetElement() && !element2ViewMap.containsKey(parentView.getElement()) && elements.contains(parentView.getElement())) {
element2ViewMap.put(parentView.getElement(), parentView);
if(elements.size() == element2ViewMap.size()) {
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/part/UMLDiagramUpdateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/part/UMLDiagramUpdateCommand.java index 13c59e9fc42..d2eabb91eab 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/part/UMLDiagramUpdateCommand.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/part/UMLDiagramUpdateCommand.java @@ -60,7 +60,6 @@ public class UMLDiagramUpdateCommand implements IHandler { CanonicalEditPolicy nextEditPolicy = (CanonicalEditPolicy)it.next();
nextEditPolicy.refresh();
}
-
}
}
return null;
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/part/UMLDocumentProvider.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/part/UMLDocumentProvider.java index f61555e0244..b648d9ae36e 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/part/UMLDocumentProvider.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/part/UMLDocumentProvider.java @@ -80,7 +80,6 @@ public class UMLDocumentProvider extends AbstractDocumentProvider implements IDi }
IEditorInput editorInput = (IEditorInput)element;
IDiagramDocument document = (IDiagramDocument)createDocument(editorInput);
-
ResourceSetInfo info = new ResourceSetInfo(document, editorInput);
info.setModificationStamp(computeModificationStamp(info));
info.fStatus = null;
@@ -175,9 +174,7 @@ public class UMLDocumentProvider extends AbstractDocumentProvider implements IDi public void setTarget(Notifier newTarget) {
myTarger = newTarget;
}
-
});
-
return editingDomain;
}
@@ -303,7 +300,6 @@ public class UMLDocumentProvider extends AbstractDocumentProvider implements IDi }
ResourcesPlugin.getWorkspace().validateEdit((IFile[])files2Validate.toArray(new IFile[files2Validate.size()]), computationContext);
}
-
super.doValidateState(element, computationContext);
}
@@ -475,7 +471,6 @@ public class UMLDocumentProvider extends AbstractDocumentProvider implements IDi private ISchedulingRule computeSchedulingRule(IResource toCreateOrModify) {
if(toCreateOrModify.exists())
return ResourcesPlugin.getWorkspace().getRuleFactory().modifyRule(toCreateOrModify);
-
IResource parent = toCreateOrModify;
do {
/*
@@ -487,7 +482,6 @@ public class UMLDocumentProvider extends AbstractDocumentProvider implements IDi toCreateOrModify = parent;
parent = toCreateOrModify.getParent();
} while(parent != null && !parent.exists());
-
return ResourcesPlugin.getWorkspace().getRuleFactory().createRule(toCreateOrModify);
}
@@ -595,7 +589,6 @@ public class UMLDocumentProvider extends AbstractDocumentProvider implements IDi }
}
changedResource.unload();
-
fireElementContentAboutToBeReplaced(info.getEditorInput());
removeUnchangedElementListeners(info.getEditorInput(), info);
info.fStatus = null;
@@ -971,7 +964,6 @@ public class UMLDocumentProvider extends AbstractDocumentProvider implements IDi }
if(dirtyStateChanged) {
fireElementDirtyStateChanged(myInfo.getEditorInput(), modified);
-
if(!modified) {
myInfo.setModificationStamp(computeModificationStamp(myInfo));
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/part/UMLMatchingStrategy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/part/UMLMatchingStrategy.java index 965a5ee1f59..ce6a3fc41fa 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/part/UMLMatchingStrategy.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/part/UMLMatchingStrategy.java @@ -32,7 +32,6 @@ public class UMLMatchingStrategy implements IEditorMatchingStrategy { } catch (PartInitException e) {
return false;
}
-
if(editorInput.equals(input)) {
return true;
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/part/UMLNewDiagramFileWizard.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/part/UMLNewDiagramFileWizard.java index 9d89c443296..5a174a2a19c 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/part/UMLNewDiagramFileWizard.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/part/UMLNewDiagramFileWizard.java @@ -67,7 +67,6 @@ public class UMLNewDiagramFileWizard extends Wizard { assert domainModelURI != null : "Domain model uri must be specified"; //$NON-NLS-1$
assert diagramRoot != null : "Doagram root element must be specified"; //$NON-NLS-1$
assert editingDomain != null : "Editing domain must be specified"; //$NON-NLS-1$
-
myFileCreationPage = new WizardNewFileCreationPage(Messages.UMLNewDiagramFileWizard_CreationPageName, StructuredSelection.EMPTY);
myFileCreationPage.setTitle(Messages.UMLNewDiagramFileWizard_CreationPageTitle);
myFileCreationPage.setDescription(NLS.bind(Messages.UMLNewDiagramFileWizard_CreationPageDescription, CompositeStructureDiagramEditPart.MODEL_ID));
@@ -83,12 +82,10 @@ public class UMLNewDiagramFileWizard extends Wizard { }
myFileCreationPage.setContainerFullPath(filePath);
myFileCreationPage.setFileName(UMLDiagramEditorUtil.getUniqueFileName(filePath, fileName, "uml_csd")); //$NON-NLS-1$
-
diagramRootElementSelectionPage = new DiagramRootElementSelectionPage(Messages.UMLNewDiagramFileWizard_RootSelectionPageName);
diagramRootElementSelectionPage.setTitle(Messages.UMLNewDiagramFileWizard_RootSelectionPageTitle);
diagramRootElementSelectionPage.setDescription(Messages.UMLNewDiagramFileWizard_RootSelectionPageDescription);
diagramRootElementSelectionPage.setModelElement(diagramRoot);
-
myEditingDomain = editingDomain;
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/part/UMLPaletteFactory.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/part/UMLPaletteFactory.java index 948a2653ed6..250eae88b5f 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/part/UMLPaletteFactory.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/part/UMLPaletteFactory.java @@ -178,7 +178,6 @@ public class UMLPaletteFactory extends PaletteFactory.Adapter { * @generated
*/
public UMLPaletteFactory() {
-
}
/**
@@ -280,7 +279,6 @@ public class UMLPaletteFactory extends PaletteFactory.Adapter { * @generated
*/
public Object getTemplate(String templateId) {
-
// default return: null
return null;
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/part/UMLVisualIDRegistry.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/part/UMLVisualIDRegistry.java index 8e92a5d06cf..14c5c472304 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/part/UMLVisualIDRegistry.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/part/UMLVisualIDRegistry.java @@ -5765,7 +5765,6 @@ public class UMLVisualIDRegistry { return false;
}
}
-
// General case : no restriction
return true;
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/part/ValidateAction.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/part/ValidateAction.java index b41ae002964..ceab5f45e52 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/part/ValidateAction.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/part/ValidateAction.java @@ -114,7 +114,6 @@ public class ValidateAction extends Action { if(shell == null) {
shell = new Shell();
}
-
DiagramEditPart diagramEditPart = OffscreenEditPartFactory.getInstance().createDiagramEditPart(view.getDiagram(), shell);
runValidation(diagramEditPart, view);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/preferences/DiagramPreferenceInitializer.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/preferences/DiagramPreferenceInitializer.java index b10346d696c..c1212cb14e4 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/preferences/DiagramPreferenceInitializer.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/preferences/DiagramPreferenceInitializer.java @@ -30,7 +30,6 @@ public class DiagramPreferenceInitializer extends AbstractPreferenceInitializer DiagramConnectionsPreferencePage.initDefaults(store);
DiagramPrintingPreferencePage.initDefaults(store);
DiagramRulersAndGridPreferencePage.initDefaults(store);
-
}
/**
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/providers/ElementInitializers.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/providers/ElementInitializers.java index ff1510cd686..f122c670198 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/providers/ElementInitializers.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/providers/ElementInitializers.java @@ -701,7 +701,6 @@ public class ElementInitializers { Object value_0 = name_Port_3069(instance);
instance.setName((String)value_0);
instance.setAggregation(AggregationKind.COMPOSITE_LITERAL);
-
} catch (RuntimeException e) {
UMLDiagramEditorPlugin.getInstance().logError("Element initialization failed", e); //$NON-NLS-1$
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/providers/UMLElementTypes.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/providers/UMLElementTypes.java index e675866ed0f..d5c0902f761 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/providers/UMLElementTypes.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/providers/UMLElementTypes.java @@ -626,311 +626,109 @@ public class UMLElementTypes { Object type = hint.getAdapter(IElementType.class);
if(elements == null) {
elements = new IdentityHashMap<IElementType, ENamedElement>();
-
elements.put(Package_1000, UMLPackage.eINSTANCE.getPackage());
-
-
elements.put(Activity_2060, UMLPackage.eINSTANCE.getActivity());
-
-
elements.put(Interaction_2061, UMLPackage.eINSTANCE.getInteraction());
-
-
elements.put(ProtocolStateMachine_2062, UMLPackage.eINSTANCE.getProtocolStateMachine());
-
-
elements.put(StateMachine_2063, UMLPackage.eINSTANCE.getStateMachine());
-
-
elements.put(FunctionBehavior_2064, UMLPackage.eINSTANCE.getFunctionBehavior());
-
-
elements.put(OpaqueBehavior_2065, UMLPackage.eINSTANCE.getOpaqueBehavior());
-
-
elements.put(Component_2069, UMLPackage.eINSTANCE.getComponent());
-
-
elements.put(Device_2070, UMLPackage.eINSTANCE.getDevice());
-
-
elements.put(ExecutionEnvironment_2071, UMLPackage.eINSTANCE.getExecutionEnvironment());
-
-
elements.put(Node_2072, UMLPackage.eINSTANCE.getNode());
-
-
elements.put(Class_2073, UMLPackage.eINSTANCE.getClass_());
-
-
elements.put(Collaboration_2075, UMLPackage.eINSTANCE.getCollaboration());
-
-
elements.put(Interface_2076, UMLPackage.eINSTANCE.getInterface());
-
-
elements.put(PrimitiveType_2066, UMLPackage.eINSTANCE.getPrimitiveType());
-
-
elements.put(Enumeration_2067, UMLPackage.eINSTANCE.getEnumeration());
-
-
elements.put(DataType_2068, UMLPackage.eINSTANCE.getDataType());
-
-
elements.put(Actor_2077, UMLPackage.eINSTANCE.getActor());
-
-
elements.put(DeploymentSpecification_2078, UMLPackage.eINSTANCE.getDeploymentSpecification());
-
-
elements.put(Artifact_2079, UMLPackage.eINSTANCE.getArtifact());
-
-
elements.put(InformationItem_2080, UMLPackage.eINSTANCE.getInformationItem());
-
-
elements.put(Signal_2081, UMLPackage.eINSTANCE.getSignal());
-
-
elements.put(UseCase_2082, UMLPackage.eINSTANCE.getUseCase());
-
-
elements.put(SignalEvent_2083, UMLPackage.eINSTANCE.getSignalEvent());
-
-
elements.put(CallEvent_2084, UMLPackage.eINSTANCE.getCallEvent());
-
-
elements.put(AnyReceiveEvent_2085, UMLPackage.eINSTANCE.getAnyReceiveEvent());
-
-
elements.put(ChangeEvent_2088, UMLPackage.eINSTANCE.getChangeEvent());
-
-
elements.put(TimeEvent_2089, UMLPackage.eINSTANCE.getTimeEvent());
-
-
elements.put(DurationObservation_2093, UMLPackage.eINSTANCE.getDurationObservation());
-
-
elements.put(TimeObservation_2094, UMLPackage.eINSTANCE.getTimeObservation());
-
-
elements.put(LiteralBoolean_2095, UMLPackage.eINSTANCE.getLiteralBoolean());
-
-
elements.put(LiteralInteger_2096, UMLPackage.eINSTANCE.getLiteralInteger());
-
-
elements.put(LiteralNull_2097, UMLPackage.eINSTANCE.getLiteralNull());
-
-
elements.put(LiteralString_2098, UMLPackage.eINSTANCE.getLiteralString());
-
-
elements.put(LiteralUnlimitedNatural_2099, UMLPackage.eINSTANCE.getLiteralUnlimitedNatural());
-
-
elements.put(StringExpression_2100, UMLPackage.eINSTANCE.getStringExpression());
-
-
elements.put(OpaqueExpression_2101, UMLPackage.eINSTANCE.getOpaqueExpression());
-
-
elements.put(TimeExpression_2102, UMLPackage.eINSTANCE.getTimeExpression());
-
-
elements.put(Expression_2103, UMLPackage.eINSTANCE.getExpression());
-
-
elements.put(Duration_2104, UMLPackage.eINSTANCE.getDuration());
-
-
elements.put(TimeInterval_2105, UMLPackage.eINSTANCE.getTimeInterval());
-
-
elements.put(DurationInterval_2106, UMLPackage.eINSTANCE.getDurationInterval());
-
-
elements.put(Interval_2107, UMLPackage.eINSTANCE.getInterval());
-
-
elements.put(InstanceValue_2108, UMLPackage.eINSTANCE.getInstanceValue());
-
-
elements.put(Comment_2109, UMLPackage.eINSTANCE.getComment());
-
-
elements.put(DurationConstraint_2110, UMLPackage.eINSTANCE.getDurationConstraint());
-
-
elements.put(TimeConstraint_2111, UMLPackage.eINSTANCE.getTimeConstraint());
-
-
elements.put(IntervalConstraint_2112, UMLPackage.eINSTANCE.getIntervalConstraint());
-
-
elements.put(InteractionConstraint_2113, UMLPackage.eINSTANCE.getInteractionConstraint());
-
-
elements.put(Constraint_2114, UMLPackage.eINSTANCE.getConstraint());
-
-
elements.put(Port_3069, UMLPackage.eINSTANCE.getPort());
-
-
elements.put(Parameter_3088, UMLPackage.eINSTANCE.getParameter());
-
-
elements.put(Property_3070, UMLPackage.eINSTANCE.getProperty());
-
-
elements.put(ConnectableElement_3115, UMLPackage.eINSTANCE.getConnectableElement());
-
-
elements.put(CollaborationUse_3071, UMLPackage.eINSTANCE.getCollaborationUse());
-
-
elements.put(Activity_3072, UMLPackage.eINSTANCE.getActivity());
-
-
elements.put(Interaction_3073, UMLPackage.eINSTANCE.getInteraction());
-
-
elements.put(ProtocolStateMachine_3074, UMLPackage.eINSTANCE.getProtocolStateMachine());
-
-
elements.put(StateMachine_3075, UMLPackage.eINSTANCE.getStateMachine());
-
-
elements.put(FunctionBehavior_3076, UMLPackage.eINSTANCE.getFunctionBehavior());
-
-
elements.put(OpaqueBehavior_3077, UMLPackage.eINSTANCE.getOpaqueBehavior());
-
-
elements.put(Component_3081, UMLPackage.eINSTANCE.getComponent());
-
-
elements.put(Device_3082, UMLPackage.eINSTANCE.getDevice());
-
-
elements.put(ExecutionEnvironment_3083, UMLPackage.eINSTANCE.getExecutionEnvironment());
-
-
elements.put(Node_3084, UMLPackage.eINSTANCE.getNode());
-
-
elements.put(Class_3085, UMLPackage.eINSTANCE.getClass_());
-
-
elements.put(Collaboration_3086, UMLPackage.eINSTANCE.getCollaboration());
-
-
elements.put(Interface_3087, UMLPackage.eINSTANCE.getInterface());
-
-
elements.put(PrimitiveType_3078, UMLPackage.eINSTANCE.getPrimitiveType());
-
-
elements.put(Enumeration_3079, UMLPackage.eINSTANCE.getEnumeration());
-
-
elements.put(DataType_3080, UMLPackage.eINSTANCE.getDataType());
-
-
elements.put(Actor_3091, UMLPackage.eINSTANCE.getActor());
-
-
elements.put(DeploymentSpecification_3092, UMLPackage.eINSTANCE.getDeploymentSpecification());
-
-
elements.put(Artifact_3093, UMLPackage.eINSTANCE.getArtifact());
-
-
elements.put(InformationItem_3094, UMLPackage.eINSTANCE.getInformationItem());
-
-
elements.put(Signal_3095, UMLPackage.eINSTANCE.getSignal());
-
-
elements.put(UseCase_3096, UMLPackage.eINSTANCE.getUseCase());
-
-
elements.put(Comment_3097, UMLPackage.eINSTANCE.getComment());
-
-
elements.put(DurationConstraint_3116, UMLPackage.eINSTANCE.getDurationConstraint());
-
-
elements.put(TimeConstraint_3117, UMLPackage.eINSTANCE.getTimeConstraint());
-
-
elements.put(IntervalConstraint_3118, UMLPackage.eINSTANCE.getIntervalConstraint());
-
-
elements.put(InteractionConstraint_3119, UMLPackage.eINSTANCE.getInteractionConstraint());
-
-
elements.put(Constraint_3120, UMLPackage.eINSTANCE.getConstraint());
-
-
elements.put(Property_3101, UMLPackage.eINSTANCE.getProperty());
-
-
elements.put(Operation_3102, UMLPackage.eINSTANCE.getOperation());
-
-
elements.put(EnumerationLiteral_3066, UMLPackage.eINSTANCE.getEnumerationLiteral());
-
elements.put(CommentAnnotatedElement_4002, UMLPackage.eINSTANCE.getComment_AnnotatedElement());
-
elements.put(ConstraintConstrainedElement_4003, UMLPackage.eINSTANCE.getConstraint_ConstrainedElement());
-
-
elements.put(ComponentRealization_4004, UMLPackage.eINSTANCE.getComponentRealization());
-
-
elements.put(InterfaceRealization_4005, UMLPackage.eINSTANCE.getInterfaceRealization());
-
-
elements.put(Substitution_4011, UMLPackage.eINSTANCE.getSubstitution());
-
-
elements.put(Realization_4006, UMLPackage.eINSTANCE.getRealization());
-
-
elements.put(Manifestation_4012, UMLPackage.eINSTANCE.getManifestation());
-
-
elements.put(Abstraction_4007, UMLPackage.eINSTANCE.getAbstraction());
-
-
elements.put(Usage_4008, UMLPackage.eINSTANCE.getUsage());
-
-
elements.put(Deployment_4009, UMLPackage.eINSTANCE.getDeployment());
-
-
elements.put(Dependency_4017, UMLPackage.eINSTANCE.getDependency());
-
-
elements.put(Dependency_4010, UMLPackage.eINSTANCE.getDependency());
-
-
elements.put(Connector_4013, UMLPackage.eINSTANCE.getConnector());
-
-
elements.put(Generalization_4015, UMLPackage.eINSTANCE.getGeneralization());
-
elements.put(TimeObservationEvent_4018, UMLPackage.eINSTANCE.getTimeObservation_Event());
-
elements.put(DurationObservationEvent_4019, UMLPackage.eINSTANCE.getDurationObservation_Event());
-
elements.put(InformationItemRepresented_4020, UMLPackage.eINSTANCE.getInformationItem_Represented());
-
-
elements.put(InformationFlow_4021, UMLPackage.eINSTANCE.getInformationFlow());
}
return (ENamedElement)elements.get(type);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/providers/UMLParserProvider.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/providers/UMLParserProvider.java index 9dbc227afcc..f82b5bcd700 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/providers/UMLParserProvider.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/providers/UMLParserProvider.java @@ -2316,339 +2316,242 @@ public class UMLParserProvider extends AbstractProvider implements IParserProvid switch(visualID) {
case ActivityCompositeNameEditPart.VISUAL_ID:
return getActivityName_5112Parser();
-
case InteractionCompositeNameEditPart.VISUAL_ID:
return getInteractionName_5113Parser();
-
case ProtocolStateMachineCompositeNameEditPart.VISUAL_ID:
return getProtocolStateMachineName_5114Parser();
-
case StateMachineCompositeNameEditPart.VISUAL_ID:
return getStateMachineName_5115Parser();
-
case FunctionBehaviorCompositeNameEditPart.VISUAL_ID:
return getFunctionBehaviorName_5116Parser();
-
case OpaqueBehaviorCompositeNameEditPart.VISUAL_ID:
return getOpaqueBehaviorName_5117Parser();
-
case ComponentCompositeNameEditPart.VISUAL_ID:
return getComponentName_5121Parser();
-
case DeviceCompositeNameEditPart.VISUAL_ID:
return getDeviceName_5122Parser();
-
case ExecutionEnvironmentCompositeNameEditPart.VISUAL_ID:
return getExecutionEnvironmentName_5123Parser();
-
case NodeCompositeNameEditPart.VISUAL_ID:
return getNodeName_5124Parser();
-
case ClassCompositeNameEditPart.VISUAL_ID:
return getClassName_5156Parser();
-
case CollaborationCompositeNameEditPart.VISUAL_ID:
return getCollaborationName_5158Parser();
-
case InterfaceNameEditPart.VISUAL_ID:
return getInterfaceName_5159Parser();
-
case PrimitiveTypeNameEditPart.VISUAL_ID:
return getPrimitiveTypeName_5118Parser();
-
case EnumerationNameEditPart.VISUAL_ID:
return getEnumerationName_5119Parser();
-
case DataTypeNameEditPart.VISUAL_ID:
return getDataTypeName_5120Parser();
-
case ActorNameEditPart.VISUAL_ID:
return getActorName_5160Parser();
-
case DeploymentSpecificationNameEditPart.VISUAL_ID:
return getDeploymentSpecificationName_5161Parser();
-
case ArtifactNameEditPart.VISUAL_ID:
return getArtifactName_5162Parser();
-
case InformationItemNameEditPart.VISUAL_ID:
return getInformationItemName_5163Parser();
-
case SignalNameEditPart.VISUAL_ID:
return getSignalName_5164Parser();
-
case UseCaseNameEditPart.VISUAL_ID:
return getUseCaseName_5165Parser();
-
case SignalEventNameEditPart.VISUAL_ID:
return getSignalEventName_5166Parser();
-
case CallEventNameEditPart.VISUAL_ID:
return getCallEventName_5167Parser();
-
case AnyReceiveEventNameEditPart.VISUAL_ID:
return getAnyReceiveEventName_5168Parser();
-
case ChangeEventNameEditPart.VISUAL_ID:
return getChangeEventName_5171Parser();
-
case TimeEventNameEditPart.VISUAL_ID:
return getTimeEventName_5172Parser();
-
case DurationObservationNameEditPart.VISUAL_ID:
return getDurationObservationName_5151Parser();
case DurationObservationStereotypeLabelEditPart.VISUAL_ID:
return getDurationObservationName_5152Parser();
-
case TimeObservationNameEditPart.VISUAL_ID:
return getTimeObservationName_5142Parser();
case TimeObservationStereotypeLabelEditPart.VISUAL_ID:
return getTimeObservationName_5143Parser();
-
case LiteralBooleanNameEditPart.VISUAL_ID:
return getLiteralBooleanName_5178Parser();
-
case LiteralIntegerNameEditPart.VISUAL_ID:
return getLiteralIntegerName_5179Parser();
-
case LiteralNullNameEditPart.VISUAL_ID:
return getLiteralNullName_5180Parser();
-
case LiteralStringNameEditPart.VISUAL_ID:
return getLiteralStringName_5181Parser();
-
case LiteralUnlimitedNaturalNameEditPart.VISUAL_ID:
return getLiteralUnlimitedNaturalName_5182Parser();
-
case StringExpressionNameEditPart.VISUAL_ID:
return getStringExpressionName_5183Parser();
-
case OpaqueExpressionNameEditPart.VISUAL_ID:
return getOpaqueExpressionName_5184Parser();
-
case TimeExpressionNameEditPart.VISUAL_ID:
return getTimeExpressionName_5185Parser();
-
case ExpressionNameEditPart.VISUAL_ID:
return getExpressionName_5186Parser();
-
case DurationNameEditPart.VISUAL_ID:
return getDurationName_5187Parser();
-
case TimeIntervalNameEditPart.VISUAL_ID:
return getTimeIntervalName_5188Parser();
-
case DurationIntervalNameEditPart.VISUAL_ID:
return getDurationIntervalName_5189Parser();
-
case IntervalNameEditPart.VISUAL_ID:
return getIntervalName_5190Parser();
-
case InstanceValueNameEditPart.VISUAL_ID:
return getInstanceValueName_5191Parser();
-
case CommentBodyEditPart.VISUAL_ID:
return getCommentBody_5192Parser();
-
case DurationConstraintNameEditPart.VISUAL_ID:
return getDurationConstraintName_5193Parser();
case DurationConstraintSpecificationEditPart.VISUAL_ID:
return getDurationConstraintSpecification_6035Parser();
-
case TimeConstraintNameEditPart.VISUAL_ID:
return getTimeConstraintName_5194Parser();
case TimeConstraintSpecificationEditPart.VISUAL_ID:
return getTimeConstraintSpecification_6036Parser();
-
case IntervalConstraintNameEditPart.VISUAL_ID:
return getIntervalConstraintName_5195Parser();
case IntervalConstraintSpecificationEditPart.VISUAL_ID:
return getIntervalConstraintSpecification_6037Parser();
-
case InteractionConstraintNameEditPart.VISUAL_ID:
return getInteractionConstraintName_5196Parser();
case InteractionConstraintSpecificationEditPart.VISUAL_ID:
return getInteractionConstraintSpecification_6038Parser();
-
case ConstraintNameEditPart.VISUAL_ID:
return getConstraintName_5197Parser();
case ConstraintSpecificationEditPart.VISUAL_ID:
return getConstraintSpecification_6039Parser();
-
-
case PortNameEditPart.VISUAL_ID:
return getPortName_5125Parser();
case PortAppliedStereotypeEditPart.VISUAL_ID:
return getPortName_6029Parser();
-
case ParameterNameEditPart.VISUAL_ID:
return getParameterName_6033Parser();
case ParameterAppliedStereotypeEditPart.VISUAL_ID:
return getParameterName_6034Parser();
-
case PropertyPartNameEditPartCN.VISUAL_ID:
return getPropertyName_5126Parser();
-
case CollaborationRoleNameEditPartCN.VISUAL_ID:
return getConnectableElementName_5198Parser();
-
case CollaborationUseNameEditPart.VISUAL_ID:
return getCollaborationUseName_5127Parser();
-
case ActivityCompositeNameEditPartCN.VISUAL_ID:
return getActivityName_5128Parser();
-
case InteractionCompositeNameEditPartCN.VISUAL_ID:
return getInteractionName_5129Parser();
-
case ProtocolStateMachineCompositeNameEditPartCN.VISUAL_ID:
return getProtocolStateMachineName_5130Parser();
-
case StateMachineCompositeNameEditPartCN.VISUAL_ID:
return getStateMachineName_5131Parser();
-
case FunctionBehaviorCompositeNameEditPartCN.VISUAL_ID:
return getFunctionBehaviorName_5132Parser();
-
case OpaqueBehaviorCompositeNameEditPartCN.VISUAL_ID:
return getOpaqueBehaviorName_5133Parser();
-
case ComponentCompositeNameEditPartCN.VISUAL_ID:
return getComponentName_5137Parser();
-
case DeviceCompositeNameEditPartCN.VISUAL_ID:
return getDeviceName_5138Parser();
-
case ExecutionEnvironmentCompositeNameEditPartCN.VISUAL_ID:
return getExecutionEnvironmentName_5139Parser();
-
case NodeCompositeNameEditPartCN.VISUAL_ID:
return getNodeName_5140Parser();
-
case ClassCompositeNameEditPartCN.VISUAL_ID:
return getClassName_5155Parser();
-
case CollaborationCompositeNameEditPartCN.VISUAL_ID:
return getCollaborationName_5141Parser();
-
case InterfaceNameEditPartCN.VISUAL_ID:
return getInterfaceName_5154Parser();
-
case PrimitiveTypeNameEditPartCN.VISUAL_ID:
return getPrimitiveTypeName_5134Parser();
-
case EnumerationNameEditPartCN.VISUAL_ID:
return getEnumerationName_5135Parser();
-
case DataTypeNameEditPartCN.VISUAL_ID:
return getDataTypeName_5136Parser();
-
case ActorNameEditPartCN.VISUAL_ID:
return getActorName_5144Parser();
-
case DeploymentSpecificationNameEditPartCN.VISUAL_ID:
return getDeploymentSpecificationName_5145Parser();
-
case ArtifactNameEditPartCN.VISUAL_ID:
return getArtifactName_5146Parser();
-
case InformationItemNameEditPartCN.VISUAL_ID:
return getInformationItemName_5147Parser();
-
case SignalNameEditPartCN.VISUAL_ID:
return getSignalName_5148Parser();
-
case UseCaseNameEditPartCN.VISUAL_ID:
return getUseCaseName_5149Parser();
-
case CommentBodyEditPartCN.VISUAL_ID:
return getCommentBody_5150Parser();
-
case DurationConstraintNameEditPartCN.VISUAL_ID:
return getDurationConstraintName_6040Parser();
case DurationConstraintSpecificationEditPartCN.VISUAL_ID:
return getDurationConstraintSpecification_6041Parser();
-
case TimeConstraintNameEditPartCN.VISUAL_ID:
return getTimeConstraintName_6042Parser();
case TimeConstraintSpecificationEditPartCN.VISUAL_ID:
return getTimeConstraintSpecification_6043Parser();
-
case IntervalConstraintNameEditPartCN.VISUAL_ID:
return getIntervalConstraintName_6044Parser();
case IntervalConstraintSpecificationEditPartCN.VISUAL_ID:
return getIntervalConstraintSpecification_6045Parser();
-
case InteractionConstraintNameEditPartCN.VISUAL_ID:
return getInteractionConstraintName_6046Parser();
case InteractionConstraintSpecificationEditPartCN.VISUAL_ID:
return getInteractionConstraintSpecification_6047Parser();
-
case ConstraintNameEditPartCN.VISUAL_ID:
return getConstraintName_6048Parser();
case ConstraintSpecificationEditPartCN.VISUAL_ID:
return getConstraintSpecification_6049Parser();
-
case PropertyEditPartCLN.VISUAL_ID:
return getProperty_3101Parser();
case OperationEditPartCLN.VISUAL_ID:
return getOperation_3102Parser();
case EnumerationLiteralEditPartCLN.VISUAL_ID:
return getEnumerationLiteral_3066Parser();
-
-
-
-
case ComponentRealizationNameEditPart.VISUAL_ID:
return getComponentRealizationName_6001Parser();
case ComponentRealizationAppliedStereotypeEditPart.VISUAL_ID:
return getComponentRealizationName_6015Parser();
-
case InterfaceRealizationNameEditPart.VISUAL_ID:
return getInterfaceRealizationName_6002Parser();
case InterfaceRealizationAppliedStereotypeEditPart.VISUAL_ID:
return getInterfaceRealizationName_6016Parser();
-
case SubstitutionNameEditPart.VISUAL_ID:
return getSubstitutionName_6003Parser();
case SubstitutionAppliedStereotypeEditPart.VISUAL_ID:
return getSubstitutionName_6017Parser();
-
case RealizationNameEditPart.VISUAL_ID:
return getRealizationName_6004Parser();
case RealizationAppliedStereotypeEditPart.VISUAL_ID:
return getRealizationName_6018Parser();
-
case ManifestationNameEditPart.VISUAL_ID:
return getManifestationName_6005Parser();
case ManifestationAppliedStereotypeEditPart.VISUAL_ID:
return getManifestationName_6019Parser();
-
case AbstractionNameEditPart.VISUAL_ID:
return getAbstractionName_6006Parser();
case AbstractionAppliedStereotypeEditPart.VISUAL_ID:
return getAbstractionName_6020Parser();
-
case UsageNameEditPart.VISUAL_ID:
return getUsageName_6007Parser();
case UsageAppliedStereotypeEditPart.VISUAL_ID:
return getUsageName_6021Parser();
-
case DeploymentNameEditPart.VISUAL_ID:
return getDeploymentName_6008Parser();
case DeploymentAppliedStereotypeEditPart.VISUAL_ID:
return getDeploymentName_6022Parser();
-
case RoleBindingRoleNameEditPart.VISUAL_ID:
return getDependencyName_6027Parser();
case RoleBindingAppliedStereotypeEditPart.VISUAL_ID:
return getDependencyName_6028Parser();
-
case DependencyNameEditPart.VISUAL_ID:
return getDependencyName_6009Parser();
case DependencyAppliedStereotypeEditPart.VISUAL_ID:
return getDependencyName_6023Parser();
-
case ConnectorAppliedStereotypeEditPart.VISUAL_ID:
return getConnectorName_6025Parser();
case ConnectorNameEditPart.VISUAL_ID:
@@ -2657,16 +2560,10 @@ public class UMLParserProvider extends AbstractProvider implements IParserProvid return getConnectorName_6051Parser();
case ConnectorMultiplicityTargetEditPart.VISUAL_ID:
return getConnectorName_6052Parser();
-
case GeneralizationAppliedStereotypeEditPart.VISUAL_ID:
return getGeneralizationIsSubstitutable_6024Parser();
-
-
-
-
case InformationFlowAppliedStereotypeEditPart.VISUAL_ID:
return getInformationFlowName_6032Parser();
-
}
return null;
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/providers/UMLViewProvider.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/providers/UMLViewProvider.java index f52afa85303..674622411c0 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/providers/UMLViewProvider.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/providers/UMLViewProvider.java @@ -95,18 +95,15 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider { * if (op.getViewKind() == Edge.class)
* return getEdgeViewClass(op.getSemanticAdapter(), op.getContainerView(), op.getSemanticHint()) != null;
*/
-
// check Diagram Type should be the class diagram
String modelID = UMLVisualIDRegistry.getModelID(op.getContainerView());
if(!getDiagramProvidedId().equals(modelID)) {
return false;
}
-
int visualID = UMLVisualIDRegistry.getVisualID(op.getSemanticHint());
if(Node.class.isAssignableFrom(op.getViewKind())) {
return UMLVisualIDRegistry.canCreateNode(op.getContainerView(), visualID);
}
-
return true;
}
@@ -273,8 +270,6 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider { }
}
return ActivityCompositeEditPart.VISUAL_ID == visualID || InteractionCompositeEditPart.VISUAL_ID == visualID || ProtocolStateMachineCompositeEditPart.VISUAL_ID == visualID || StateMachineCompositeEditPart.VISUAL_ID == visualID || FunctionBehaviorCompositeEditPart.VISUAL_ID == visualID || OpaqueBehaviorCompositeEditPart.VISUAL_ID == visualID || ComponentCompositeEditPart.VISUAL_ID == visualID || DeviceCompositeEditPart.VISUAL_ID == visualID || ExecutionEnvironmentCompositeEditPart.VISUAL_ID == visualID || NodeCompositeEditPart.VISUAL_ID == visualID || ClassCompositeEditPart.VISUAL_ID == visualID || CollaborationCompositeEditPart.VISUAL_ID == visualID || InterfaceEditPart.VISUAL_ID == visualID || PrimitiveTypeEditPart.VISUAL_ID == visualID || EnumerationEditPart.VISUAL_ID == visualID || DataTypeEditPart.VISUAL_ID == visualID || ActorEditPart.VISUAL_ID == visualID || DeploymentSpecificationEditPart.VISUAL_ID == visualID || ArtifactEditPart.VISUAL_ID == visualID || InformationItemEditPart.VISUAL_ID == visualID || SignalEditPart.VISUAL_ID == visualID || UseCaseEditPart.VISUAL_ID == visualID || SignalEventEditPart.VISUAL_ID == visualID || CallEventEditPart.VISUAL_ID == visualID || AnyReceiveEventEditPart.VISUAL_ID == visualID || ChangeEventEditPart.VISUAL_ID == visualID || TimeEventEditPart.VISUAL_ID == visualID || DurationObservationEditPart.VISUAL_ID == visualID || TimeObservationEditPart.VISUAL_ID == visualID || LiteralBooleanEditPart.VISUAL_ID == visualID || LiteralIntegerEditPart.VISUAL_ID == visualID || LiteralNullEditPart.VISUAL_ID == visualID || LiteralStringEditPart.VISUAL_ID == visualID || LiteralUnlimitedNaturalEditPart.VISUAL_ID == visualID || StringExpressionEditPart.VISUAL_ID == visualID || OpaqueExpressionEditPart.VISUAL_ID == visualID || TimeExpressionEditPart.VISUAL_ID == visualID || ExpressionEditPart.VISUAL_ID == visualID || DurationEditPart.VISUAL_ID == visualID || TimeIntervalEditPart.VISUAL_ID == visualID || DurationIntervalEditPart.VISUAL_ID == visualID || IntervalEditPart.VISUAL_ID == visualID || InstanceValueEditPart.VISUAL_ID == visualID || CommentEditPart.VISUAL_ID == visualID || DurationConstraintEditPart.VISUAL_ID == visualID || TimeConstraintEditPart.VISUAL_ID == visualID || IntervalConstraintEditPart.VISUAL_ID == visualID || InteractionConstraintEditPart.VISUAL_ID == visualID || ConstraintEditPart.VISUAL_ID == visualID || BehaviorPortEditPart.VISUAL_ID == visualID || PortEditPart.VISUAL_ID == visualID || ParameterEditPart.VISUAL_ID == visualID || PropertyPartEditPartCN.VISUAL_ID == visualID || CollaborationRoleEditPartCN.VISUAL_ID == visualID || CollaborationUseEditPartCN.VISUAL_ID == visualID || ActivityCompositeEditPartCN.VISUAL_ID == visualID || InteractionCompositeEditPartCN.VISUAL_ID == visualID || ProtocolStateMachineCompositeEditPartCN.VISUAL_ID == visualID || StateMachineCompositeEditPartCN.VISUAL_ID == visualID || FunctionBehaviorCompositeEditPartCN.VISUAL_ID == visualID || OpaqueBehaviorCompositeEditPartCN.VISUAL_ID == visualID || ComponentCompositeEditPartCN.VISUAL_ID == visualID || DeviceCompositeEditPartCN.VISUAL_ID == visualID || ExecutionEnvironmentCompositeEditPartCN.VISUAL_ID == visualID || NodeCompositeEditPartCN.VISUAL_ID == visualID || ClassCompositeEditPartCN.VISUAL_ID == visualID || CollaborationCompositeEditPartCN.VISUAL_ID == visualID || InterfaceEditPartCN.VISUAL_ID == visualID || PrimitiveTypeEditPartCN.VISUAL_ID == visualID || EnumerationEditPartCN.VISUAL_ID == visualID || DataTypeEditPartCN.VISUAL_ID == visualID || ActorEditPartCN.VISUAL_ID == visualID || DeploymentSpecificationEditPartCN.VISUAL_ID == visualID || ArtifactEditPartCN.VISUAL_ID == visualID || InformationItemEditPartCN.VISUAL_ID == visualID || SignalEditPartCN.VISUAL_ID == visualID || UseCaseEditPartCN.VISUAL_ID == visualID || CommentEditPartCN.VISUAL_ID == visualID || DurationConstraintEditPartCN.VISUAL_ID == visualID || TimeConstraintEditPartCN.VISUAL_ID == visualID || IntervalConstraintEditPartCN.VISUAL_ID == visualID || InteractionConstraintEditPartCN.VISUAL_ID == visualID || ConstraintEditPartCN.VISUAL_ID == visualID || PropertyEditPartCLN.VISUAL_ID == visualID || OperationEditPartCLN.VISUAL_ID == visualID || EnumerationLiteralEditPartCLN.VISUAL_ID == visualID;
-
-
}
/**
@@ -575,7 +570,6 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider { stampShortcut(containerView, node);
// initializeFromPreferences
final IPreferenceStore prefStore = (IPreferenceStore)preferencesHint.getPreferenceStore();
-
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "Activity");
Node label5112 = createLabel(node, UMLVisualIDRegistry.getType(ActivityCompositeNameEditPart.VISUAL_ID));
createCompartment(node, UMLVisualIDRegistry.getType(ActivityCompositeCompartmentEditPart.VISUAL_ID), true, true, false, false);
@@ -595,7 +589,6 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider { stampShortcut(containerView, node);
// initializeFromPreferences
final IPreferenceStore prefStore = (IPreferenceStore)preferencesHint.getPreferenceStore();
-
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "Interaction");
Node label5113 = createLabel(node, UMLVisualIDRegistry.getType(InteractionCompositeNameEditPart.VISUAL_ID));
createCompartment(node, UMLVisualIDRegistry.getType(InteractionCompositeCompartmentEditPart.VISUAL_ID), true, true, false, false);
@@ -615,7 +608,6 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider { stampShortcut(containerView, node);
// initializeFromPreferences
final IPreferenceStore prefStore = (IPreferenceStore)preferencesHint.getPreferenceStore();
-
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "ProtocolStateMachine");
Node label5114 = createLabel(node, UMLVisualIDRegistry.getType(ProtocolStateMachineCompositeNameEditPart.VISUAL_ID));
createCompartment(node, UMLVisualIDRegistry.getType(ProtocolStateMachineCompositeCompartmentEditPart.VISUAL_ID), true, true, false, false);
@@ -635,7 +627,6 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider { stampShortcut(containerView, node);
// initializeFromPreferences
final IPreferenceStore prefStore = (IPreferenceStore)preferencesHint.getPreferenceStore();
-
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "StateMachine");
Node label5115 = createLabel(node, UMLVisualIDRegistry.getType(StateMachineCompositeNameEditPart.VISUAL_ID));
createCompartment(node, UMLVisualIDRegistry.getType(StateMachineCompositeCompartmentEditPart.VISUAL_ID), true, true, false, false);
@@ -655,7 +646,6 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider { stampShortcut(containerView, node);
// initializeFromPreferences
final IPreferenceStore prefStore = (IPreferenceStore)preferencesHint.getPreferenceStore();
-
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "FunctionBehavior");
Node label5116 = createLabel(node, UMLVisualIDRegistry.getType(FunctionBehaviorCompositeNameEditPart.VISUAL_ID));
createCompartment(node, UMLVisualIDRegistry.getType(FunctionBehaviorCompositeCompartmentEditPart.VISUAL_ID), true, true, false, false);
@@ -675,7 +665,6 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider { stampShortcut(containerView, node);
// initializeFromPreferences
final IPreferenceStore prefStore = (IPreferenceStore)preferencesHint.getPreferenceStore();
-
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "OpaqueBehavior");
Node label5117 = createLabel(node, UMLVisualIDRegistry.getType(OpaqueBehaviorCompositeNameEditPart.VISUAL_ID));
createCompartment(node, UMLVisualIDRegistry.getType(OpaqueBehaviorCompositeCompartmentEditPart.VISUAL_ID), true, true, false, false);
@@ -695,7 +684,6 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider { stampShortcut(containerView, node);
// initializeFromPreferences
final IPreferenceStore prefStore = (IPreferenceStore)preferencesHint.getPreferenceStore();
-
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "Component");
Node label5121 = createLabel(node, UMLVisualIDRegistry.getType(ComponentCompositeNameEditPart.VISUAL_ID));
createCompartment(node, UMLVisualIDRegistry.getType(ComponentCompositeCompartmentEditPart.VISUAL_ID), true, true, false, false);
@@ -715,7 +703,6 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider { stampShortcut(containerView, node);
// initializeFromPreferences
final IPreferenceStore prefStore = (IPreferenceStore)preferencesHint.getPreferenceStore();
-
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "Device");
Node label5122 = createLabel(node, UMLVisualIDRegistry.getType(DeviceCompositeNameEditPart.VISUAL_ID));
createCompartment(node, UMLVisualIDRegistry.getType(DeviceCompositeCompartmentEditPart.VISUAL_ID), true, true, false, false);
@@ -735,7 +722,6 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider { stampShortcut(containerView, node);
// initializeFromPreferences
final IPreferenceStore prefStore = (IPreferenceStore)preferencesHint.getPreferenceStore();
-
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "ExecutionEnvironment");
Node label5123 = createLabel(node, UMLVisualIDRegistry.getType(ExecutionEnvironmentCompositeNameEditPart.VISUAL_ID));
createCompartment(node, UMLVisualIDRegistry.getType(ExecutionEnvironmentCompositeCompartmentEditPart.VISUAL_ID), true, true, false, false);
@@ -755,7 +741,6 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider { stampShortcut(containerView, node);
// initializeFromPreferences
final IPreferenceStore prefStore = (IPreferenceStore)preferencesHint.getPreferenceStore();
-
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "Node");
Node label5124 = createLabel(node, UMLVisualIDRegistry.getType(NodeCompositeNameEditPart.VISUAL_ID));
createCompartment(node, UMLVisualIDRegistry.getType(NodeCompositeCompartmentEditPart.VISUAL_ID), true, true, false, false);
@@ -775,7 +760,6 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider { stampShortcut(containerView, node);
// initializeFromPreferences
final IPreferenceStore prefStore = (IPreferenceStore)preferencesHint.getPreferenceStore();
-
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "Class");
Node label5156 = createLabel(node, UMLVisualIDRegistry.getType(ClassCompositeNameEditPart.VISUAL_ID));
createCompartment(node, UMLVisualIDRegistry.getType(ClassCompositeCompartmentEditPart.VISUAL_ID), true, true, false, false);
@@ -795,7 +779,6 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider { stampShortcut(containerView, node);
// initializeFromPreferences
final IPreferenceStore prefStore = (IPreferenceStore)preferencesHint.getPreferenceStore();
-
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "Collaboration");
Node label5158 = createLabel(node, UMLVisualIDRegistry.getType(CollaborationCompositeNameEditPart.VISUAL_ID));
createCompartment(node, UMLVisualIDRegistry.getType(CollaborationCompositeCompartmentEditPart.VISUAL_ID), true, true, false, false);
@@ -815,7 +798,6 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider { stampShortcut(containerView, node);
// initializeFromPreferences
final IPreferenceStore prefStore = (IPreferenceStore)preferencesHint.getPreferenceStore();
-
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "Interface");
Node label5159 = createLabel(node, UMLVisualIDRegistry.getType(InterfaceNameEditPart.VISUAL_ID));
return node;
@@ -833,7 +815,6 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider { stampShortcut(containerView, node);
// initializeFromPreferences
final IPreferenceStore prefStore = (IPreferenceStore)preferencesHint.getPreferenceStore();
-
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "PrimitiveType");
Node label5118 = createLabel(node, UMLVisualIDRegistry.getType(PrimitiveTypeNameEditPart.VISUAL_ID));
return node;
@@ -851,7 +832,6 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider { stampShortcut(containerView, node);
// initializeFromPreferences
final IPreferenceStore prefStore = (IPreferenceStore)preferencesHint.getPreferenceStore();
-
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "Enumeration");
Node label5119 = createLabel(node, UMLVisualIDRegistry.getType(EnumerationNameEditPart.VISUAL_ID));
createCompartment(node, UMLVisualIDRegistry.getType(EnumerationEnumerationLiteralCompartmentEditPart.VISUAL_ID), true, true, true, true);
@@ -871,7 +851,6 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider { stampShortcut(containerView, node);
// initializeFromPreferences
final IPreferenceStore prefStore = (IPreferenceStore)preferencesHint.getPreferenceStore();
-
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "DataType");
Node label5120 = createLabel(node, UMLVisualIDRegistry.getType(DataTypeNameEditPart.VISUAL_ID));
createCompartment(node, UMLVisualIDRegistry.getType(DataTypeAttributeCompartmentEditPart.VISUAL_ID), true, true, true, true);
@@ -892,7 +871,6 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider { stampShortcut(containerView, node);
// initializeFromPreferences
final IPreferenceStore prefStore = (IPreferenceStore)preferencesHint.getPreferenceStore();
-
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "Actor");
Node label5160 = createLabel(node, UMLVisualIDRegistry.getType(ActorNameEditPart.VISUAL_ID));
return node;
@@ -910,7 +888,6 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider { stampShortcut(containerView, node);
// initializeFromPreferences
final IPreferenceStore prefStore = (IPreferenceStore)preferencesHint.getPreferenceStore();
-
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "DeploymentSpecification");
Node label5161 = createLabel(node, UMLVisualIDRegistry.getType(DeploymentSpecificationNameEditPart.VISUAL_ID));
return node;
@@ -928,7 +905,6 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider { stampShortcut(containerView, node);
// initializeFromPreferences
final IPreferenceStore prefStore = (IPreferenceStore)preferencesHint.getPreferenceStore();
-
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "Artifact");
Node label5162 = createLabel(node, UMLVisualIDRegistry.getType(ArtifactNameEditPart.VISUAL_ID));
return node;
@@ -946,7 +922,6 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider { stampShortcut(containerView, node);
// initializeFromPreferences
final IPreferenceStore prefStore = (IPreferenceStore)preferencesHint.getPreferenceStore();
-
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "InformationItem");
Node label5163 = createLabel(node, UMLVisualIDRegistry.getType(InformationItemNameEditPart.VISUAL_ID));
return node;
@@ -964,7 +939,6 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider { stampShortcut(containerView, node);
// initializeFromPreferences
final IPreferenceStore prefStore = (IPreferenceStore)preferencesHint.getPreferenceStore();
-
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "Signal");
Node label5164 = createLabel(node, UMLVisualIDRegistry.getType(SignalNameEditPart.VISUAL_ID));
return node;
@@ -982,7 +956,6 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider { stampShortcut(containerView, node);
// initializeFromPreferences
final IPreferenceStore prefStore = (IPreferenceStore)preferencesHint.getPreferenceStore();
-
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "UseCase");
Node label5165 = createLabel(node, UMLVisualIDRegistry.getType(UseCaseNameEditPart.VISUAL_ID));
return node;
@@ -1000,7 +973,6 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider { stampShortcut(containerView, node);
// initializeFromPreferences
final IPreferenceStore prefStore = (IPreferenceStore)preferencesHint.getPreferenceStore();
-
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "SignalEvent");
Node label5166 = createLabel(node, UMLVisualIDRegistry.getType(SignalEventNameEditPart.VISUAL_ID));
return node;
@@ -1018,7 +990,6 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider { stampShortcut(containerView, node);
// initializeFromPreferences
final IPreferenceStore prefStore = (IPreferenceStore)preferencesHint.getPreferenceStore();
-
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "CallEvent");
Node label5167 = createLabel(node, UMLVisualIDRegistry.getType(CallEventNameEditPart.VISUAL_ID));
return node;
@@ -1036,7 +1007,6 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider { stampShortcut(containerView, node);
// initializeFromPreferences
final IPreferenceStore prefStore = (IPreferenceStore)preferencesHint.getPreferenceStore();
-
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "AnyReceiveEvent");
Node label5168 = createLabel(node, UMLVisualIDRegistry.getType(AnyReceiveEventNameEditPart.VISUAL_ID));
return node;
@@ -1054,7 +1024,6 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider { stampShortcut(containerView, node);
// initializeFromPreferences
final IPreferenceStore prefStore = (IPreferenceStore)preferencesHint.getPreferenceStore();
-
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "ChangeEvent");
Node label5171 = createLabel(node, UMLVisualIDRegistry.getType(ChangeEventNameEditPart.VISUAL_ID));
return node;
@@ -1072,7 +1041,6 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider { stampShortcut(containerView, node);
// initializeFromPreferences
final IPreferenceStore prefStore = (IPreferenceStore)preferencesHint.getPreferenceStore();
-
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "TimeEvent");
Node label5172 = createLabel(node, UMLVisualIDRegistry.getType(TimeEventNameEditPart.VISUAL_ID));
return node;
@@ -1090,7 +1058,6 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider { stampShortcut(containerView, node);
// initializeFromPreferences
final IPreferenceStore prefStore = (IPreferenceStore)preferencesHint.getPreferenceStore();
-
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "DurationObservation");
Node label5151 = createLabel(node, UMLVisualIDRegistry.getType(DurationObservationNameEditPart.VISUAL_ID));
label5151.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
@@ -1117,7 +1084,6 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider { stampShortcut(containerView, node);
// initializeFromPreferences
final IPreferenceStore prefStore = (IPreferenceStore)preferencesHint.getPreferenceStore();
-
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "TimeObservation");
Node label5142 = createLabel(node, UMLVisualIDRegistry.getType(TimeObservationNameEditPart.VISUAL_ID));
label5142.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
@@ -1144,7 +1110,6 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider { stampShortcut(containerView, node);
// initializeFromPreferences
final IPreferenceStore prefStore = (IPreferenceStore)preferencesHint.getPreferenceStore();
-
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "LiteralBoolean");
Node label5178 = createLabel(node, UMLVisualIDRegistry.getType(LiteralBooleanNameEditPart.VISUAL_ID));
return node;
@@ -1162,7 +1127,6 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider { stampShortcut(containerView, node);
// initializeFromPreferences
final IPreferenceStore prefStore = (IPreferenceStore)preferencesHint.getPreferenceStore();
-
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "LiteralInteger");
Node label5179 = createLabel(node, UMLVisualIDRegistry.getType(LiteralIntegerNameEditPart.VISUAL_ID));
return node;
@@ -1180,7 +1144,6 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider { stampShortcut(containerView, node);
// initializeFromPreferences
final IPreferenceStore prefStore = (IPreferenceStore)preferencesHint.getPreferenceStore();
-
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "LiteralNull");
Node label5180 = createLabel(node, UMLVisualIDRegistry.getType(LiteralNullNameEditPart.VISUAL_ID));
return node;
@@ -1198,7 +1161,6 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider { stampShortcut(containerView, node);
// initializeFromPreferences
final IPreferenceStore prefStore = (IPreferenceStore)preferencesHint.getPreferenceStore();
-
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "LiteralString");
Node label5181 = createLabel(node, UMLVisualIDRegistry.getType(LiteralStringNameEditPart.VISUAL_ID));
return node;
@@ -1216,7 +1178,6 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider { stampShortcut(containerView, node);
// initializeFromPreferences
final IPreferenceStore prefStore = (IPreferenceStore)preferencesHint.getPreferenceStore();
-
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "LiteralUnlimitedNatural");
Node label5182 = createLabel(node, UMLVisualIDRegistry.getType(LiteralUnlimitedNaturalNameEditPart.VISUAL_ID));
return node;
@@ -1234,7 +1195,6 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider { stampShortcut(containerView, node);
// initializeFromPreferences
final IPreferenceStore prefStore = (IPreferenceStore)preferencesHint.getPreferenceStore();
-
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "StringExpression");
Node label5183 = createLabel(node, UMLVisualIDRegistry.getType(StringExpressionNameEditPart.VISUAL_ID));
return node;
@@ -1252,7 +1212,6 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider { stampShortcut(containerView, node);
// initializeFromPreferences
final IPreferenceStore prefStore = (IPreferenceStore)preferencesHint.getPreferenceStore();
-
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "OpaqueExpression");
Node label5184 = createLabel(node, UMLVisualIDRegistry.getType(OpaqueExpressionNameEditPart.VISUAL_ID));
return node;
@@ -1270,7 +1229,6 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider { stampShortcut(containerView, node);
// initializeFromPreferences
final IPreferenceStore prefStore = (IPreferenceStore)preferencesHint.getPreferenceStore();
-
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "TimeExpression");
Node label5185 = createLabel(node, UMLVisualIDRegistry.getType(TimeExpressionNameEditPart.VISUAL_ID));
return node;
@@ -1288,7 +1246,6 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider { stampShortcut(containerView, node);
// initializeFromPreferences
final IPreferenceStore prefStore = (IPreferenceStore)preferencesHint.getPreferenceStore();
-
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "Expression");
Node label5186 = createLabel(node, UMLVisualIDRegistry.getType(ExpressionNameEditPart.VISUAL_ID));
return node;
@@ -1306,7 +1263,6 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider { stampShortcut(containerView, node);
// initializeFromPreferences
final IPreferenceStore prefStore = (IPreferenceStore)preferencesHint.getPreferenceStore();
-
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "Duration");
Node label5187 = createLabel(node, UMLVisualIDRegistry.getType(DurationNameEditPart.VISUAL_ID));
return node;
@@ -1324,7 +1280,6 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider { stampShortcut(containerView, node);
// initializeFromPreferences
final IPreferenceStore prefStore = (IPreferenceStore)preferencesHint.getPreferenceStore();
-
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "TimeInterval");
Node label5188 = createLabel(node, UMLVisualIDRegistry.getType(TimeIntervalNameEditPart.VISUAL_ID));
return node;
@@ -1342,7 +1297,6 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider { stampShortcut(containerView, node);
// initializeFromPreferences
final IPreferenceStore prefStore = (IPreferenceStore)preferencesHint.getPreferenceStore();
-
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "DurationInterval");
Node label5189 = createLabel(node, UMLVisualIDRegistry.getType(DurationIntervalNameEditPart.VISUAL_ID));
return node;
@@ -1360,7 +1314,6 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider { stampShortcut(containerView, node);
// initializeFromPreferences
final IPreferenceStore prefStore = (IPreferenceStore)preferencesHint.getPreferenceStore();
-
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "Interval");
Node label5190 = createLabel(node, UMLVisualIDRegistry.getType(IntervalNameEditPart.VISUAL_ID));
return node;
@@ -1378,7 +1331,6 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider { stampShortcut(containerView, node);
// initializeFromPreferences
final IPreferenceStore prefStore = (IPreferenceStore)preferencesHint.getPreferenceStore();
-
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "InstanceValue");
Node label5191 = createLabel(node, UMLVisualIDRegistry.getType(InstanceValueNameEditPart.VISUAL_ID));
return node;
@@ -1396,7 +1348,6 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider { stampShortcut(containerView, node);
// initializeFromPreferences
final IPreferenceStore prefStore = (IPreferenceStore)preferencesHint.getPreferenceStore();
-
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "Comment");
Node label5192 = createLabel(node, UMLVisualIDRegistry.getType(CommentBodyEditPart.VISUAL_ID));
return node;
@@ -1414,7 +1365,6 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider { stampShortcut(containerView, node);
// initializeFromPreferences
final IPreferenceStore prefStore = (IPreferenceStore)preferencesHint.getPreferenceStore();
-
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "DurationConstraint");
Node label5193 = createLabel(node, UMLVisualIDRegistry.getType(DurationConstraintNameEditPart.VISUAL_ID));
Node label6035 = createLabel(node, UMLVisualIDRegistry.getType(DurationConstraintSpecificationEditPart.VISUAL_ID));
@@ -1433,7 +1383,6 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider { stampShortcut(containerView, node);
// initializeFromPreferences
final IPreferenceStore prefStore = (IPreferenceStore)preferencesHint.getPreferenceStore();
-
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "TimeConstraint");
Node label5194 = createLabel(node, UMLVisualIDRegistry.getType(TimeConstraintNameEditPart.VISUAL_ID));
Node label6036 = createLabel(node, UMLVisualIDRegistry.getType(TimeConstraintSpecificationEditPart.VISUAL_ID));
@@ -1452,7 +1401,6 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider { stampShortcut(containerView, node);
// initializeFromPreferences
final IPreferenceStore prefStore = (IPreferenceStore)preferencesHint.getPreferenceStore();
-
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "IntervalConstraint");
Node label5195 = createLabel(node, UMLVisualIDRegistry.getType(IntervalConstraintNameEditPart.VISUAL_ID));
Node label6037 = createLabel(node, UMLVisualIDRegistry.getType(IntervalConstraintSpecificationEditPart.VISUAL_ID));
@@ -1471,7 +1419,6 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider { stampShortcut(containerView, node);
// initializeFromPreferences
final IPreferenceStore prefStore = (IPreferenceStore)preferencesHint.getPreferenceStore();
-
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "InteractionConstraint");
Node label5196 = createLabel(node, UMLVisualIDRegistry.getType(InteractionConstraintNameEditPart.VISUAL_ID));
Node label6038 = createLabel(node, UMLVisualIDRegistry.getType(InteractionConstraintSpecificationEditPart.VISUAL_ID));
@@ -1490,7 +1437,6 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider { stampShortcut(containerView, node);
// initializeFromPreferences
final IPreferenceStore prefStore = (IPreferenceStore)preferencesHint.getPreferenceStore();
-
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "Constraint");
Node label5197 = createLabel(node, UMLVisualIDRegistry.getType(ConstraintNameEditPart.VISUAL_ID));
Node label6039 = createLabel(node, UMLVisualIDRegistry.getType(ConstraintSpecificationEditPart.VISUAL_ID));
@@ -1508,7 +1454,6 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider { node.setElement(domainElement);
// initializeFromPreferences
final IPreferenceStore prefStore = (IPreferenceStore)preferencesHint.getPreferenceStore();
-
return node;
}
@@ -1523,7 +1468,6 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider { node.setElement(domainElement);
// initializeFromPreferences
final IPreferenceStore prefStore = (IPreferenceStore)preferencesHint.getPreferenceStore();
-
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "Port");
Node label5125 = createLabel(node, UMLVisualIDRegistry.getType(PortNameEditPart.VISUAL_ID));
label5125.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
@@ -1549,7 +1493,6 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider { node.setElement(domainElement);
// initializeFromPreferences
final IPreferenceStore prefStore = (IPreferenceStore)preferencesHint.getPreferenceStore();
-
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "Parameter");
Node label6033 = createLabel(node, UMLVisualIDRegistry.getType(ParameterNameEditPart.VISUAL_ID));
label6033.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
@@ -1575,7 +1518,6 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider { node.setElement(domainElement);
// initializeFromPreferences
final IPreferenceStore prefStore = (IPreferenceStore)preferencesHint.getPreferenceStore();
-
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "Property");
Node label5126 = createLabel(node, UMLVisualIDRegistry.getType(PropertyPartNameEditPartCN.VISUAL_ID));
createCompartment(node, UMLVisualIDRegistry.getType(PropertyPartCompartmentEditPartCN.VISUAL_ID), true, true, false, false);
@@ -1594,7 +1536,6 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider { node.setElement(domainElement);
// initializeFromPreferences
final IPreferenceStore prefStore = (IPreferenceStore)preferencesHint.getPreferenceStore();
-
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "CollaborationRole");
Node label5198 = createLabel(node, UMLVisualIDRegistry.getType(CollaborationRoleNameEditPartCN.VISUAL_ID));
return node;
@@ -1611,7 +1552,6 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider { node.setElement(domainElement);
// initializeFromPreferences
final IPreferenceStore prefStore = (IPreferenceStore)preferencesHint.getPreferenceStore();
-
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "CollaborationUse");
Node label5127 = createLabel(node, UMLVisualIDRegistry.getType(CollaborationUseNameEditPart.VISUAL_ID));
return node;
@@ -1628,7 +1568,6 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider { node.setElement(domainElement);
// initializeFromPreferences
final IPreferenceStore prefStore = (IPreferenceStore)preferencesHint.getPreferenceStore();
-
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "Activity");
Node label5128 = createLabel(node, UMLVisualIDRegistry.getType(ActivityCompositeNameEditPartCN.VISUAL_ID));
createCompartment(node, UMLVisualIDRegistry.getType(ActivityCompositeCompartmentEditPartCN.VISUAL_ID), true, true, false, false);
@@ -1647,7 +1586,6 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider { node.setElement(domainElement);
// initializeFromPreferences
final IPreferenceStore prefStore = (IPreferenceStore)preferencesHint.getPreferenceStore();
-
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "Interaction");
Node label5129 = createLabel(node, UMLVisualIDRegistry.getType(InteractionCompositeNameEditPartCN.VISUAL_ID));
createCompartment(node, UMLVisualIDRegistry.getType(InteractionCompositeCompartmentEditPartCN.VISUAL_ID), true, true, false, false);
@@ -1666,7 +1604,6 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider { node.setElement(domainElement);
// initializeFromPreferences
final IPreferenceStore prefStore = (IPreferenceStore)preferencesHint.getPreferenceStore();
-
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "ProtocolStateMachine");
Node label5130 = createLabel(node, UMLVisualIDRegistry.getType(ProtocolStateMachineCompositeNameEditPartCN.VISUAL_ID));
createCompartment(node, UMLVisualIDRegistry.getType(ProtocolStateMachineCompositeCompartmentEditPartCN.VISUAL_ID), true, true, false, false);
@@ -1685,7 +1622,6 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider { node.setElement(domainElement);
// initializeFromPreferences
final IPreferenceStore prefStore = (IPreferenceStore)preferencesHint.getPreferenceStore();
-
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "StateMachine");
Node label5131 = createLabel(node, UMLVisualIDRegistry.getType(StateMachineCompositeNameEditPartCN.VISUAL_ID));
createCompartment(node, UMLVisualIDRegistry.getType(StateMachineCompositeCompartmentEditPartCN.VISUAL_ID), true, true, false, false);
@@ -1704,7 +1640,6 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider { node.setElement(domainElement);
// initializeFromPreferences
final IPreferenceStore prefStore = (IPreferenceStore)preferencesHint.getPreferenceStore();
-
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "FunctionBehavior");
Node label5132 = createLabel(node, UMLVisualIDRegistry.getType(FunctionBehaviorCompositeNameEditPartCN.VISUAL_ID));
createCompartment(node, UMLVisualIDRegistry.getType(FunctionBehaviorCompositeCompartmentEditPartCN.VISUAL_ID), true, true, false, false);
@@ -1723,7 +1658,6 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider { node.setElement(domainElement);
// initializeFromPreferences
final IPreferenceStore prefStore = (IPreferenceStore)preferencesHint.getPreferenceStore();
-
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "OpaqueBehavior");
Node label5133 = createLabel(node, UMLVisualIDRegistry.getType(OpaqueBehaviorCompositeNameEditPartCN.VISUAL_ID));
createCompartment(node, UMLVisualIDRegistry.getType(OpaqueBehaviorCompositeCompartmentEditPartCN.VISUAL_ID), true, true, false, false);
@@ -1742,7 +1676,6 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider { node.setElement(domainElement);
// initializeFromPreferences
final IPreferenceStore prefStore = (IPreferenceStore)preferencesHint.getPreferenceStore();
-
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "Component");
Node label5137 = createLabel(node, UMLVisualIDRegistry.getType(ComponentCompositeNameEditPartCN.VISUAL_ID));
createCompartment(node, UMLVisualIDRegistry.getType(ComponentCompositeCompartmentEditPartCN.VISUAL_ID), true, true, false, false);
@@ -1761,7 +1694,6 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider { node.setElement(domainElement);
// initializeFromPreferences
final IPreferenceStore prefStore = (IPreferenceStore)preferencesHint.getPreferenceStore();
-
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "Device");
Node label5138 = createLabel(node, UMLVisualIDRegistry.getType(DeviceCompositeNameEditPartCN.VISUAL_ID));
createCompartment(node, UMLVisualIDRegistry.getType(DeviceCompositeCompartmentEditPartCN.VISUAL_ID), true, true, false, false);
@@ -1780,7 +1712,6 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider { node.setElement(domainElement);
// initializeFromPreferences
final IPreferenceStore prefStore = (IPreferenceStore)preferencesHint.getPreferenceStore();
-
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "ExecutionEnvironment");
Node label5139 = createLabel(node, UMLVisualIDRegistry.getType(ExecutionEnvironmentCompositeNameEditPartCN.VISUAL_ID));
createCompartment(node, UMLVisualIDRegistry.getType(ExecutionEnvironmentCompositeCompartmentEditPartCN.VISUAL_ID), true, true, false, false);
@@ -1799,7 +1730,6 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider { node.setElement(domainElement);
// initializeFromPreferences
final IPreferenceStore prefStore = (IPreferenceStore)preferencesHint.getPreferenceStore();
-
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "Node");
Node label5140 = createLabel(node, UMLVisualIDRegistry.getType(NodeCompositeNameEditPartCN.VISUAL_ID));
createCompartment(node, UMLVisualIDRegistry.getType(NodeCompositeCompartmentEditPartCN.VISUAL_ID), true, true, false, false);
@@ -1818,7 +1748,6 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider { node.setElement(domainElement);
// initializeFromPreferences
final IPreferenceStore prefStore = (IPreferenceStore)preferencesHint.getPreferenceStore();
-
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "Class");
Node label5155 = createLabel(node, UMLVisualIDRegistry.getType(ClassCompositeNameEditPartCN.VISUAL_ID));
createCompartment(node, UMLVisualIDRegistry.getType(ClassCompositeCompartmentEditPartCN.VISUAL_ID), true, true, false, false);
@@ -1837,7 +1766,6 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider { node.setElement(domainElement);
// initializeFromPreferences
final IPreferenceStore prefStore = (IPreferenceStore)preferencesHint.getPreferenceStore();
-
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "Collaboration");
Node label5141 = createLabel(node, UMLVisualIDRegistry.getType(CollaborationCompositeNameEditPartCN.VISUAL_ID));
createCompartment(node, UMLVisualIDRegistry.getType(CollaborationCompositeCompartmentEditPartCN.VISUAL_ID), true, true, false, false);
@@ -1856,7 +1784,6 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider { node.setElement(domainElement);
// initializeFromPreferences
final IPreferenceStore prefStore = (IPreferenceStore)preferencesHint.getPreferenceStore();
-
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "Interface");
Node label5154 = createLabel(node, UMLVisualIDRegistry.getType(InterfaceNameEditPartCN.VISUAL_ID));
return node;
@@ -1873,7 +1800,6 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider { node.setElement(domainElement);
// initializeFromPreferences
final IPreferenceStore prefStore = (IPreferenceStore)preferencesHint.getPreferenceStore();
-
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "PrimitiveType");
Node label5134 = createLabel(node, UMLVisualIDRegistry.getType(PrimitiveTypeNameEditPartCN.VISUAL_ID));
return node;
@@ -1890,7 +1816,6 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider { node.setElement(domainElement);
// initializeFromPreferences
final IPreferenceStore prefStore = (IPreferenceStore)preferencesHint.getPreferenceStore();
-
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "Enumeration");
Node label5135 = createLabel(node, UMLVisualIDRegistry.getType(EnumerationNameEditPartCN.VISUAL_ID));
createCompartment(node, UMLVisualIDRegistry.getType(EnumerationEnumerationLiteralCompartmentEditPartCN.VISUAL_ID), true, true, true, true);
@@ -1909,7 +1834,6 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider { node.setElement(domainElement);
// initializeFromPreferences
final IPreferenceStore prefStore = (IPreferenceStore)preferencesHint.getPreferenceStore();
-
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "DataType");
Node label5136 = createLabel(node, UMLVisualIDRegistry.getType(DataTypeNameEditPartCN.VISUAL_ID));
createCompartment(node, UMLVisualIDRegistry.getType(DataTypeAttributeCompartmentEditPartCN.VISUAL_ID), true, true, true, true);
@@ -1929,7 +1853,6 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider { node.setElement(domainElement);
// initializeFromPreferences
final IPreferenceStore prefStore = (IPreferenceStore)preferencesHint.getPreferenceStore();
-
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "Actor");
Node label5144 = createLabel(node, UMLVisualIDRegistry.getType(ActorNameEditPartCN.VISUAL_ID));
return node;
@@ -1946,7 +1869,6 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider { node.setElement(domainElement);
// initializeFromPreferences
final IPreferenceStore prefStore = (IPreferenceStore)preferencesHint.getPreferenceStore();
-
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "DeploymentSpecification");
Node label5145 = createLabel(node, UMLVisualIDRegistry.getType(DeploymentSpecificationNameEditPartCN.VISUAL_ID));
return node;
@@ -1963,7 +1885,6 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider { node.setElement(domainElement);
// initializeFromPreferences
final IPreferenceStore prefStore = (IPreferenceStore)preferencesHint.getPreferenceStore();
-
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "Artifact");
Node label5146 = createLabel(node, UMLVisualIDRegistry.getType(ArtifactNameEditPartCN.VISUAL_ID));
return node;
@@ -1980,7 +1901,6 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider { node.setElement(domainElement);
// initializeFromPreferences
final IPreferenceStore prefStore = (IPreferenceStore)preferencesHint.getPreferenceStore();
-
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "InformationItem");
Node label5147 = createLabel(node, UMLVisualIDRegistry.getType(InformationItemNameEditPartCN.VISUAL_ID));
return node;
@@ -1997,7 +1917,6 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider { node.setElement(domainElement);
// initializeFromPreferences
final IPreferenceStore prefStore = (IPreferenceStore)preferencesHint.getPreferenceStore();
-
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "Signal");
Node label5148 = createLabel(node, UMLVisualIDRegistry.getType(SignalNameEditPartCN.VISUAL_ID));
return node;
@@ -2014,7 +1933,6 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider { node.setElement(domainElement);
// initializeFromPreferences
final IPreferenceStore prefStore = (IPreferenceStore)preferencesHint.getPreferenceStore();
-
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "UseCase");
Node label5149 = createLabel(node, UMLVisualIDRegistry.getType(UseCaseNameEditPartCN.VISUAL_ID));
return node;
@@ -2031,7 +1949,6 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider { node.setElement(domainElement);
// initializeFromPreferences
final IPreferenceStore prefStore = (IPreferenceStore)preferencesHint.getPreferenceStore();
-
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "Comment");
Node label5150 = createLabel(node, UMLVisualIDRegistry.getType(CommentBodyEditPartCN.VISUAL_ID));
return node;
@@ -2048,7 +1965,6 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider { node.setElement(domainElement);
// initializeFromPreferences
final IPreferenceStore prefStore = (IPreferenceStore)preferencesHint.getPreferenceStore();
-
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "DurationConstraint");
Node label6040 = createLabel(node, UMLVisualIDRegistry.getType(DurationConstraintNameEditPartCN.VISUAL_ID));
Node label6041 = createLabel(node, UMLVisualIDRegistry.getType(DurationConstraintSpecificationEditPartCN.VISUAL_ID));
@@ -2066,7 +1982,6 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider { node.setElement(domainElement);
// initializeFromPreferences
final IPreferenceStore prefStore = (IPreferenceStore)preferencesHint.getPreferenceStore();
-
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "TimeConstraint");
Node label6042 = createLabel(node, UMLVisualIDRegistry.getType(TimeConstraintNameEditPartCN.VISUAL_ID));
Node label6043 = createLabel(node, UMLVisualIDRegistry.getType(TimeConstraintSpecificationEditPartCN.VISUAL_ID));
@@ -2084,7 +1999,6 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider { node.setElement(domainElement);
// initializeFromPreferences
final IPreferenceStore prefStore = (IPreferenceStore)preferencesHint.getPreferenceStore();
-
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "IntervalConstraint");
Node label6044 = createLabel(node, UMLVisualIDRegistry.getType(IntervalConstraintNameEditPartCN.VISUAL_ID));
Node label6045 = createLabel(node, UMLVisualIDRegistry.getType(IntervalConstraintSpecificationEditPartCN.VISUAL_ID));
@@ -2102,7 +2016,6 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider { node.setElement(domainElement);
// initializeFromPreferences
final IPreferenceStore prefStore = (IPreferenceStore)preferencesHint.getPreferenceStore();
-
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "InteractionConstraint");
Node label6046 = createLabel(node, UMLVisualIDRegistry.getType(InteractionConstraintNameEditPartCN.VISUAL_ID));
Node label6047 = createLabel(node, UMLVisualIDRegistry.getType(InteractionConstraintSpecificationEditPartCN.VISUAL_ID));
@@ -2120,7 +2033,6 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider { node.setElement(domainElement);
// initializeFromPreferences
final IPreferenceStore prefStore = (IPreferenceStore)preferencesHint.getPreferenceStore();
-
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "Constraint");
Node label6048 = createLabel(node, UMLVisualIDRegistry.getType(ConstraintNameEditPartCN.VISUAL_ID));
Node label6049 = createLabel(node, UMLVisualIDRegistry.getType(ConstraintSpecificationEditPartCN.VISUAL_ID));
@@ -2131,12 +2043,11 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider { * @generated
*/
public Node createProperty_3101(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
- Node node = NotationFactory.eINSTANCE.createNode();
+ Node node = NotationFactory.eINSTANCE.createShape();
node.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
node.setType(UMLVisualIDRegistry.getType(PropertyEditPartCLN.VISUAL_ID));
ViewUtil.insertChildView(containerView, node, index, persisted);
node.setElement(domainElement);
-
final IPreferenceStore prefStore = (IPreferenceStore)preferencesHint.getPreferenceStore();
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "Property");
return node;
@@ -2146,12 +2057,11 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider { * @generated
*/
public Node createOperation_3102(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
- Node node = NotationFactory.eINSTANCE.createNode();
+ Node node = NotationFactory.eINSTANCE.createShape();
node.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
node.setType(UMLVisualIDRegistry.getType(OperationEditPartCLN.VISUAL_ID));
ViewUtil.insertChildView(containerView, node, index, persisted);
node.setElement(domainElement);
-
final IPreferenceStore prefStore = (IPreferenceStore)preferencesHint.getPreferenceStore();
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "Operation");
return node;
@@ -2161,12 +2071,11 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider { * @generated
*/
public Node createEnumerationLiteral_3066(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
- Node node = NotationFactory.eINSTANCE.createNode();
+ Node node = NotationFactory.eINSTANCE.createShape();
node.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
node.setType(UMLVisualIDRegistry.getType(EnumerationLiteralEditPartCLN.VISUAL_ID));
ViewUtil.insertChildView(containerView, node, index, persisted);
node.setElement(domainElement);
-
final IPreferenceStore prefStore = (IPreferenceStore)preferencesHint.getPreferenceStore();
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "EnumerationLiteral");
return node;
@@ -2189,12 +2098,10 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider { edge.setElement(null);
// initializePreferences
final IPreferenceStore prefStore = (IPreferenceStore)preferencesHint.getPreferenceStore();
-
//org.eclipse.gmf.runtime.notation.Routing routing = org.eclipse.gmf.runtime.notation.Routing.get(prefStore.getInt(org.eclipse.gmf.runtime.diagram.ui.preferences.IPreferenceConstants.PREF_LINE_STYLE));
//if (routing != null) {
// org.eclipse.gmf.runtime.diagram.core.util.ViewUtil.setStructuralFeatureValue(edge, org.eclipse.gmf.runtime.notation.NotationPackage.eINSTANCE.getRoutingStyle_Routing(), routing);
//}
-
return edge;
}
@@ -2215,12 +2122,10 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider { edge.setElement(null);
// initializePreferences
final IPreferenceStore prefStore = (IPreferenceStore)preferencesHint.getPreferenceStore();
-
//org.eclipse.gmf.runtime.notation.Routing routing = org.eclipse.gmf.runtime.notation.Routing.get(prefStore.getInt(org.eclipse.gmf.runtime.diagram.ui.preferences.IPreferenceConstants.PREF_LINE_STYLE));
//if (routing != null) {
// org.eclipse.gmf.runtime.diagram.core.util.ViewUtil.setStructuralFeatureValue(edge, org.eclipse.gmf.runtime.notation.NotationPackage.eINSTANCE.getRoutingStyle_Routing(), routing);
//}
-
return edge;
}
@@ -2241,13 +2146,11 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider { edge.setElement(null);
// initializePreferences
final IPreferenceStore prefStore = (IPreferenceStore)preferencesHint.getPreferenceStore();
-
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(edge, prefStore, "CommentAnnotatedElement");
//org.eclipse.gmf.runtime.notation.Routing routing = org.eclipse.gmf.runtime.notation.Routing.get(prefStore.getInt(org.eclipse.gmf.runtime.diagram.ui.preferences.IPreferenceConstants.PREF_LINE_STYLE));
//if (routing != null) {
// org.eclipse.gmf.runtime.diagram.core.util.ViewUtil.setStructuralFeatureValue(edge, org.eclipse.gmf.runtime.notation.NotationPackage.eINSTANCE.getRoutingStyle_Routing(), routing);
//}
-
return edge;
}
@@ -2268,13 +2171,11 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider { edge.setElement(null);
// initializePreferences
final IPreferenceStore prefStore = (IPreferenceStore)preferencesHint.getPreferenceStore();
-
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(edge, prefStore, "ConstraintConstrainedElement");
//org.eclipse.gmf.runtime.notation.Routing routing = org.eclipse.gmf.runtime.notation.Routing.get(prefStore.getInt(org.eclipse.gmf.runtime.diagram.ui.preferences.IPreferenceConstants.PREF_LINE_STYLE));
//if (routing != null) {
// org.eclipse.gmf.runtime.diagram.core.util.ViewUtil.setStructuralFeatureValue(edge, org.eclipse.gmf.runtime.notation.NotationPackage.eINSTANCE.getRoutingStyle_Routing(), routing);
//}
-
return edge;
}
@@ -2295,7 +2196,6 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider { edge.setElement(domainElement);
// initializePreferences
final IPreferenceStore prefStore = (IPreferenceStore)preferencesHint.getPreferenceStore();
-
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(edge, prefStore, "ComponentRealization");
//org.eclipse.gmf.runtime.notation.Routing routing = org.eclipse.gmf.runtime.notation.Routing.get(prefStore.getInt(org.eclipse.gmf.runtime.diagram.ui.preferences.IPreferenceConstants.PREF_LINE_STYLE));
//if (routing != null) {
@@ -2311,7 +2211,6 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider { Location location6015 = (Location)label6015.getLayoutConstraint();
location6015.setX(0);
location6015.setY(30);
-
return edge;
}
@@ -2332,7 +2231,6 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider { edge.setElement(domainElement);
// initializePreferences
final IPreferenceStore prefStore = (IPreferenceStore)preferencesHint.getPreferenceStore();
-
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(edge, prefStore, "InterfaceRealization");
//org.eclipse.gmf.runtime.notation.Routing routing = org.eclipse.gmf.runtime.notation.Routing.get(prefStore.getInt(org.eclipse.gmf.runtime.diagram.ui.preferences.IPreferenceConstants.PREF_LINE_STYLE));
//if (routing != null) {
@@ -2348,7 +2246,6 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider { Location location6016 = (Location)label6016.getLayoutConstraint();
location6016.setX(0);
location6016.setY(30);
-
return edge;
}
@@ -2369,7 +2266,6 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider { edge.setElement(domainElement);
// initializePreferences
final IPreferenceStore prefStore = (IPreferenceStore)preferencesHint.getPreferenceStore();
-
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(edge, prefStore, "Substitution");
//org.eclipse.gmf.runtime.notation.Routing routing = org.eclipse.gmf.runtime.notation.Routing.get(prefStore.getInt(org.eclipse.gmf.runtime.diagram.ui.preferences.IPreferenceConstants.PREF_LINE_STYLE));
//if (routing != null) {
@@ -2385,7 +2281,6 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider { Location location6017 = (Location)label6017.getLayoutConstraint();
location6017.setX(0);
location6017.setY(30);
-
return edge;
}
@@ -2406,7 +2301,6 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider { edge.setElement(domainElement);
// initializePreferences
final IPreferenceStore prefStore = (IPreferenceStore)preferencesHint.getPreferenceStore();
-
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(edge, prefStore, "Realization");
//org.eclipse.gmf.runtime.notation.Routing routing = org.eclipse.gmf.runtime.notation.Routing.get(prefStore.getInt(org.eclipse.gmf.runtime.diagram.ui.preferences.IPreferenceConstants.PREF_LINE_STYLE));
//if (routing != null) {
@@ -2422,7 +2316,6 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider { Location location6018 = (Location)label6018.getLayoutConstraint();
location6018.setX(0);
location6018.setY(30);
-
return edge;
}
@@ -2443,7 +2336,6 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider { edge.setElement(domainElement);
// initializePreferences
final IPreferenceStore prefStore = (IPreferenceStore)preferencesHint.getPreferenceStore();
-
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(edge, prefStore, "Manifestation");
//org.eclipse.gmf.runtime.notation.Routing routing = org.eclipse.gmf.runtime.notation.Routing.get(prefStore.getInt(org.eclipse.gmf.runtime.diagram.ui.preferences.IPreferenceConstants.PREF_LINE_STYLE));
//if (routing != null) {
@@ -2459,7 +2351,6 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider { Location location6019 = (Location)label6019.getLayoutConstraint();
location6019.setX(0);
location6019.setY(30);
-
return edge;
}
@@ -2480,7 +2371,6 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider { edge.setElement(domainElement);
// initializePreferences
final IPreferenceStore prefStore = (IPreferenceStore)preferencesHint.getPreferenceStore();
-
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(edge, prefStore, "Abstraction");
//org.eclipse.gmf.runtime.notation.Routing routing = org.eclipse.gmf.runtime.notation.Routing.get(prefStore.getInt(org.eclipse.gmf.runtime.diagram.ui.preferences.IPreferenceConstants.PREF_LINE_STYLE));
//if (routing != null) {
@@ -2496,7 +2386,6 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider { Location location6020 = (Location)label6020.getLayoutConstraint();
location6020.setX(0);
location6020.setY(30);
-
return edge;
}
@@ -2517,7 +2406,6 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider { edge.setElement(domainElement);
// initializePreferences
final IPreferenceStore prefStore = (IPreferenceStore)preferencesHint.getPreferenceStore();
-
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(edge, prefStore, "Usage");
//org.eclipse.gmf.runtime.notation.Routing routing = org.eclipse.gmf.runtime.notation.Routing.get(prefStore.getInt(org.eclipse.gmf.runtime.diagram.ui.preferences.IPreferenceConstants.PREF_LINE_STYLE));
//if (routing != null) {
@@ -2533,7 +2421,6 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider { Location location6021 = (Location)label6021.getLayoutConstraint();
location6021.setX(0);
location6021.setY(30);
-
return edge;
}
@@ -2554,7 +2441,6 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider { edge.setElement(domainElement);
// initializePreferences
final IPreferenceStore prefStore = (IPreferenceStore)preferencesHint.getPreferenceStore();
-
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(edge, prefStore, "Deployment");
//org.eclipse.gmf.runtime.notation.Routing routing = org.eclipse.gmf.runtime.notation.Routing.get(prefStore.getInt(org.eclipse.gmf.runtime.diagram.ui.preferences.IPreferenceConstants.PREF_LINE_STYLE));
//if (routing != null) {
@@ -2570,7 +2456,6 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider { Location location6022 = (Location)label6022.getLayoutConstraint();
location6022.setX(0);
location6022.setY(30);
-
return edge;
}
@@ -2591,7 +2476,6 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider { edge.setElement(domainElement);
// initializePreferences
final IPreferenceStore prefStore = (IPreferenceStore)preferencesHint.getPreferenceStore();
-
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(edge, prefStore, "RoleBinding");
//org.eclipse.gmf.runtime.notation.Routing routing = org.eclipse.gmf.runtime.notation.Routing.get(prefStore.getInt(org.eclipse.gmf.runtime.diagram.ui.preferences.IPreferenceConstants.PREF_LINE_STYLE));
//if (routing != null) {
@@ -2607,7 +2491,6 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider { Location location6028 = (Location)label6028.getLayoutConstraint();
location6028.setX(0);
location6028.setY(60);
-
return edge;
}
@@ -2628,7 +2511,6 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider { edge.setElement(domainElement);
// initializePreferences
final IPreferenceStore prefStore = (IPreferenceStore)preferencesHint.getPreferenceStore();
-
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(edge, prefStore, "Dependency");
//org.eclipse.gmf.runtime.notation.Routing routing = org.eclipse.gmf.runtime.notation.Routing.get(prefStore.getInt(org.eclipse.gmf.runtime.diagram.ui.preferences.IPreferenceConstants.PREF_LINE_STYLE));
//if (routing != null) {
@@ -2644,7 +2526,6 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider { Location location6023 = (Location)label6023.getLayoutConstraint();
location6023.setX(0);
location6023.setY(60);
-
return edge;
}
@@ -2665,7 +2546,6 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider { edge.setElement(domainElement);
// initializePreferences
final IPreferenceStore prefStore = (IPreferenceStore)preferencesHint.getPreferenceStore();
-
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(edge, prefStore, "Connector");
//org.eclipse.gmf.runtime.notation.Routing routing = org.eclipse.gmf.runtime.notation.Routing.get(prefStore.getInt(org.eclipse.gmf.runtime.diagram.ui.preferences.IPreferenceConstants.PREF_LINE_STYLE));
//if (routing != null) {
@@ -2691,7 +2571,6 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider { Location location6052 = (Location)label6052.getLayoutConstraint();
location6052.setX(0);
location6052.setY(20);
-
return edge;
}
@@ -2712,7 +2591,6 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider { edge.setElement(domainElement);
// initializePreferences
final IPreferenceStore prefStore = (IPreferenceStore)preferencesHint.getPreferenceStore();
-
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(edge, prefStore, "Generalization");
//org.eclipse.gmf.runtime.notation.Routing routing = org.eclipse.gmf.runtime.notation.Routing.get(prefStore.getInt(org.eclipse.gmf.runtime.diagram.ui.preferences.IPreferenceConstants.PREF_LINE_STYLE));
//if (routing != null) {
@@ -2723,7 +2601,6 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider { Location location6024 = (Location)label6024.getLayoutConstraint();
location6024.setX(0);
location6024.setY(60);
-
return edge;
}
@@ -2744,13 +2621,11 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider { edge.setElement(null);
// initializePreferences
final IPreferenceStore prefStore = (IPreferenceStore)preferencesHint.getPreferenceStore();
-
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(edge, prefStore, "TimeObservationEvent");
//org.eclipse.gmf.runtime.notation.Routing routing = org.eclipse.gmf.runtime.notation.Routing.get(prefStore.getInt(org.eclipse.gmf.runtime.diagram.ui.preferences.IPreferenceConstants.PREF_LINE_STYLE));
//if (routing != null) {
// org.eclipse.gmf.runtime.diagram.core.util.ViewUtil.setStructuralFeatureValue(edge, org.eclipse.gmf.runtime.notation.NotationPackage.eINSTANCE.getRoutingStyle_Routing(), routing);
//}
-
return edge;
}
@@ -2771,13 +2646,11 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider { edge.setElement(null);
// initializePreferences
final IPreferenceStore prefStore = (IPreferenceStore)preferencesHint.getPreferenceStore();
-
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(edge, prefStore, "DurationObservationEvent");
//org.eclipse.gmf.runtime.notation.Routing routing = org.eclipse.gmf.runtime.notation.Routing.get(prefStore.getInt(org.eclipse.gmf.runtime.diagram.ui.preferences.IPreferenceConstants.PREF_LINE_STYLE));
//if (routing != null) {
// org.eclipse.gmf.runtime.diagram.core.util.ViewUtil.setStructuralFeatureValue(edge, org.eclipse.gmf.runtime.notation.NotationPackage.eINSTANCE.getRoutingStyle_Routing(), routing);
//}
-
return edge;
}
@@ -2798,7 +2671,6 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider { edge.setElement(null);
// initializePreferences
final IPreferenceStore prefStore = (IPreferenceStore)preferencesHint.getPreferenceStore();
-
ViewUtil.setStructuralFeatureValue(edge, NotationPackage.eINSTANCE.getLineStyle_LineColor(), FigureUtilities.colorToInteger(ColorConstants.black));
//org.eclipse.gmf.runtime.notation.Routing routing = org.eclipse.gmf.runtime.notation.Routing.get(prefStore.getInt(org.eclipse.gmf.runtime.diagram.ui.preferences.IPreferenceConstants.PREF_LINE_STYLE));
//if (routing != null) {
@@ -2809,7 +2681,6 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider { Location location6030 = (Location)label6030.getLayoutConstraint();
location6030.setX(0);
location6030.setY(15);
-
return edge;
}
@@ -2830,7 +2701,6 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider { edge.setElement(domainElement);
// initializePreferences
final IPreferenceStore prefStore = (IPreferenceStore)preferencesHint.getPreferenceStore();
-
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(edge, prefStore, "InformationFlow");
//org.eclipse.gmf.runtime.notation.Routing routing = org.eclipse.gmf.runtime.notation.Routing.get(prefStore.getInt(org.eclipse.gmf.runtime.diagram.ui.preferences.IPreferenceConstants.PREF_LINE_STYLE));
//if (routing != null) {
@@ -2846,7 +2716,6 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider { Location location6032 = (Location)label6032.getLayoutConstraint();
location6032.setX(0);
location6032.setY(15);
-
return edge;
}
@@ -2885,9 +2754,7 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider { } else {
rv = NotationFactory.eINSTANCE.createDecorationNode();
}
-
rv.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
-
if(hasTitle) {
TitleStyle ts = NotationFactory.eINSTANCE.createTitleStyle();
rv.getStyles().add(ts);
@@ -2933,7 +2800,6 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider { private void initFontStyleFromPrefs(View view, final IPreferenceStore store, String elementName) {
String fontConstant = PreferencesConstantsHelper.getElementConstant(elementName, PreferencesConstantsHelper.FONT);
String fontColorConstant = PreferencesConstantsHelper.getElementConstant(elementName, PreferencesConstantsHelper.COLOR_FONT);
-
FontStyle viewFontStyle = (FontStyle)view.getStyle(NotationPackage.Literals.FONT_STYLE);
if(viewFontStyle != null) {
FontData fontData = PreferenceConverter.getFontData(store, fontConstant);
@@ -2941,7 +2807,6 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider { viewFontStyle.setFontHeight(fontData.getHeight());
viewFontStyle.setBold((fontData.getStyle() & SWT.BOLD) != 0);
viewFontStyle.setItalic((fontData.getStyle() & SWT.ITALIC) != 0);
-
org.eclipse.swt.graphics.RGB fontRGB = PreferenceConverter.getColor(store, fontColorConstant);
viewFontStyle.setFontColor(FigureUtilities.RGBToInteger(fontRGB).intValue());
}
@@ -2963,16 +2828,10 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider { String fillColorConstant = PreferencesConstantsHelper.getElementConstant(elementName, PreferencesConstantsHelper.COLOR_FILL);
String gradientColorConstant = PreferencesConstantsHelper.getElementConstant(elementName, PreferencesConstantsHelper.COLOR_GRADIENT);
String gradientPolicyConstant = PreferencesConstantsHelper.getElementConstant(elementName, PreferencesConstantsHelper.GRADIENT_POLICY);
-
-
org.eclipse.swt.graphics.RGB fillRGB = PreferenceConverter.getColor(store, fillColorConstant);
ViewUtil.setStructuralFeatureValue(view, NotationPackage.eINSTANCE.getFillStyle_FillColor(), FigureUtilities.RGBToInteger(fillRGB));
-
-
FillStyle fillStyle = (FillStyle)view.getStyle(NotationPackage.Literals.FILL_STYLE);
- fillStyle.setFillColor(FigureUtilities.RGBToInteger(fillRGB).intValue());
-
- ;
+ fillStyle.setFillColor(FigureUtilities.RGBToInteger(fillRGB).intValue());;
if(store.getBoolean(gradientPolicyConstant)) {
GradientPreferenceConverter gradientPreferenceConverter = new GradientPreferenceConverter(store.getString(gradientColorConstant));
fillStyle.setGradient(gradientPreferenceConverter.getGradientData());
|