Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCamille Letavernier2013-10-23 12:19:26 -0400
committerCamille Letavernier2013-10-24 05:07:40 -0400
commitc0df7d9867b66c24cb633abb5e29d110263a3794 (patch)
tree8d40121fa4df1b43139b07618f26693d048d2fe6 /plugins
parentae9501417b07a3cd98d27763ecb15b2dba19e280 (diff)
downloadorg.eclipse.papyrus-c0df7d9867b66c24cb633abb5e29d110263a3794.tar.gz
org.eclipse.papyrus-c0df7d9867b66c24cb633abb5e29d110263a3794.tar.xz
org.eclipse.papyrus-c0df7d9867b66c24cb633abb5e29d110263a3794.zip
420196: [All diagrams - Usability] It should not be possible to select
compartments https://bugs.eclipse.org/bugs/show_bug.cgi?id=420196
Diffstat (limited to 'plugins')
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/editpart/PapyrusCompartmentEditPart.java5
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/editpart/ResizeableListCompartmentEditPart.java5
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/editpart/ShapeDisplayCompartmentEditPart.java5
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/policies/AbstractPackageableElementCompartmentEditPart.java18
4 files changed, 30 insertions, 3 deletions
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/editpart/PapyrusCompartmentEditPart.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/editpart/PapyrusCompartmentEditPart.java
index bd547615efc..725c5945883 100644
--- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/editpart/PapyrusCompartmentEditPart.java
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/editpart/PapyrusCompartmentEditPart.java
@@ -21,4 +21,9 @@ public abstract class PapyrusCompartmentEditPart extends CompartmentEditPart {
super(model);
}
+ @Override
+ public boolean isSelectable() {
+ return false;
+ }
+
}
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/editpart/ResizeableListCompartmentEditPart.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/editpart/ResizeableListCompartmentEditPart.java
index 66ca08a2f50..99a3a617d58 100644
--- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/editpart/ResizeableListCompartmentEditPart.java
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/editpart/ResizeableListCompartmentEditPart.java
@@ -64,4 +64,9 @@ public abstract class ResizeableListCompartmentEditPart extends ListCompartmentE
super.handleNotificationEvent(notification);
}
+ @Override
+ public boolean isSelectable() {
+ return false;
+ }
+
}
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/editpart/ShapeDisplayCompartmentEditPart.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/editpart/ShapeDisplayCompartmentEditPart.java
index 60dd6486ea5..2115cb36863 100644
--- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/editpart/ShapeDisplayCompartmentEditPart.java
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/editpart/ShapeDisplayCompartmentEditPart.java
@@ -382,4 +382,9 @@ public class ShapeDisplayCompartmentEditPart extends ResizableCompartmentEditPar
protected BooleanValueStyle getMaintainSymbolRatioStyle(View currentView) {
return (BooleanValueStyle)currentView.getNamedStyle(NotationPackage.eINSTANCE.getBooleanValueStyle(), MaintainSymbolRatioEditPolicy.MAINTAIN_SYMBOL_RATIO);
}
+
+ @Override
+ public boolean isSelectable() {
+ return false;
+ }
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/policies/AbstractPackageableElementCompartmentEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/policies/AbstractPackageableElementCompartmentEditPart.java
index e1376131860..55c60cf63ca 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/policies/AbstractPackageableElementCompartmentEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/policies/AbstractPackageableElementCompartmentEditPart.java
@@ -38,17 +38,21 @@ public abstract class AbstractPackageableElementCompartmentEditPart extends Shap
* @see org.eclipse.gmf.runtime.diagram.ui.editparts.ShapeCompartmentEditPart#getDragTracker(org.eclipse.gef.Request)
*
*/
+ @Override
public DragTracker getDragTracker(Request req) {
- if(!supportsDragSelection())
+ if(!supportsDragSelection()) {
return super.getDragTracker(req);
- if(req instanceof SelectionRequest && ((SelectionRequest)req).getLastButtonPressed() == 3)
+ }
+ if(req instanceof SelectionRequest && ((SelectionRequest)req).getLastButtonPressed() == 3) {
return new DeselectAllTracker(this) {
+ @Override
protected boolean handleButtonDown(int button) {
getCurrentViewer().select(AbstractPackageableElementCompartmentEditPart.this);
return true;
}
};
+ }
return new RubberbandDragTracker() {
/*
@@ -56,6 +60,7 @@ public abstract class AbstractPackageableElementCompartmentEditPart extends Shap
* on the compartment.
* hence it allows the navigation by double click
*/
+ @Override
protected boolean handleDoubleClick(int button) {
SelectionRequest request = new SelectionRequest();
request.setLocation(getLocation());
@@ -64,10 +69,17 @@ public abstract class AbstractPackageableElementCompartmentEditPart extends Shap
return true;
}
+ @Override
protected void handleFinished() {
- if(getViewer().getSelectedEditParts().isEmpty())
+ if(getViewer().getSelectedEditParts().isEmpty()) {
getViewer().select(AbstractPackageableElementCompartmentEditPart.this);
+ }
}
};
}
+
+ @Override
+ public boolean isSelectable() {
+ return false;
+ }
}

Back to the top