Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorcletavernie2013-03-14 13:52:33 +0000
committercletavernie2013-03-14 13:52:33 +0000
commit6bbcfa953a9a46064de16298d76ba84c8993a1fa (patch)
treef06172f47e5f48750d4a37e980d4c8097a882473 /plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.navigation/src
parent75fe502335e79ab0831dcaeb540be8364e77c6f1 (diff)
downloadorg.eclipse.papyrus-6bbcfa953a9a46064de16298d76ba84c8993a1fa.tar.gz
org.eclipse.papyrus-6bbcfa953a9a46064de16298d76ba84c8993a1fa.tar.xz
org.eclipse.papyrus-6bbcfa953a9a46064de16298d76ba84c8993a1fa.zip
402947: [Diagrams - Navigation] The diagrams shall use the Navigation service
https://bugs.eclipse.org/bugs/show_bug.cgi?id=402947 Minor fixes
Diffstat (limited to 'plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.navigation/src')
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.navigation/src/org/eclipse/papyrus/infra/gmfdiag/navigation/editpolicy/NavigationEditPolicy.java29
1 files changed, 6 insertions, 23 deletions
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.navigation/src/org/eclipse/papyrus/infra/gmfdiag/navigation/editpolicy/NavigationEditPolicy.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.navigation/src/org/eclipse/papyrus/infra/gmfdiag/navigation/editpolicy/NavigationEditPolicy.java
index 829aedf6876..aaf260dfd7a 100644
--- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.navigation/src/org/eclipse/papyrus/infra/gmfdiag/navigation/editpolicy/NavigationEditPolicy.java
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.navigation/src/org/eclipse/papyrus/infra/gmfdiag/navigation/editpolicy/NavigationEditPolicy.java
@@ -40,7 +40,12 @@ import org.eclipse.papyrus.infra.widgets.util.IRevealSemanticElement;
import org.eclipse.papyrus.views.modelexplorer.Activator;
import org.eclipse.ui.IEditorPart;
-
+/**
+ * An edit policy to use the {@link NavigationService} on GMF Diagrams
+ *
+ * @author Camille Letavernier
+ *
+ */
public class NavigationEditPolicy extends GraphicalEditPolicy {
public static final String EDIT_POLICY_ID = "org.eclipse.papyrus.infra.gmfdiag.navigation.NavigationEditPolicy";
@@ -70,22 +75,6 @@ public class NavigationEditPolicy extends GraphicalEditPolicy {
}
@Override
- public EditPart getTargetEditPart(Request request) {
- if(request instanceof SelectionRequest) {
- if(((SelectionRequest)request).isAltKeyPressed()) {
- return getHost();
- }
- }
- return null;
- }
-
- @Override
- public boolean understandsRequest(Request req) {
- System.out.println("Understands?");
- return super.understandsRequest(req);
- }
-
- @Override
public void showTargetFeedback(Request request) {
super.showTargetFeedback(request);
@@ -103,7 +92,6 @@ public class NavigationEditPolicy extends GraphicalEditPolicy {
@Override
public Command getCommand(Request request) {
if(request instanceof SelectionRequest) {
- System.out.println("GetSelectionCommand");
return viewerContext.navigate((SelectionRequest)request);
}
return super.getCommand(request);
@@ -114,11 +102,6 @@ public class NavigationEditPolicy extends GraphicalEditPolicy {
return rootEditPart.getContents();
}
- @Override
- public void deactivate() {
- super.deactivate();
- }
-
//A Single ViewerContext for each diagram (Root EditPartViewer)
private class ViewerContext {

Back to the top