Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordstadnik2005-11-10 10:15:27 -0500
committerdstadnik2005-11-10 10:15:27 -0500
commite23a1e88801524d5ac82d65dcfa27fe9c4175fc7 (patch)
tree975729758c5d41ac8255893fac2afdf185dbaaac /devtools
parent2ee1126ca06e1b2d06bb3dbf22a28051940a6dc1 (diff)
downloadorg.eclipse.gmf-tooling-e23a1e88801524d5ac82d65dcfa27fe9c4175fc7.tar.gz
org.eclipse.gmf-tooling-e23a1e88801524d5ac82d65dcfa27fe9c4175fc7.tar.xz
org.eclipse.gmf-tooling-e23a1e88801524d5ac82d65dcfa27fe9c4175fc7.zip
initial
Diffstat (limited to 'devtools')
-rw-r--r--devtools/org.eclipse.gmf.dev.hook/eptracer.PNGbin0 -> 57406 bytes
-rw-r--r--devtools/org.eclipse.gmf.dev.hook/oeg.runtime.diagram.ui.txt241
-rw-r--r--devtools/org.eclipse.gmf.dev.hook/oeg.runtime.emf.type.core.txt49
3 files changed, 290 insertions, 0 deletions
diff --git a/devtools/org.eclipse.gmf.dev.hook/eptracer.PNG b/devtools/org.eclipse.gmf.dev.hook/eptracer.PNG
new file mode 100644
index 000000000..e40e3abe6
--- /dev/null
+++ b/devtools/org.eclipse.gmf.dev.hook/eptracer.PNG
Binary files differ
diff --git a/devtools/org.eclipse.gmf.dev.hook/oeg.runtime.diagram.ui.txt b/devtools/org.eclipse.gmf.dev.hook/oeg.runtime.diagram.ui.txt
new file mode 100644
index 000000000..d8fcb84ad
--- /dev/null
+++ b/devtools/org.eclipse.gmf.dev.hook/oeg.runtime.diagram.ui.txt
@@ -0,0 +1,241 @@
+Index: META-INF/MANIFEST.MF
+===================================================================
+RCS file: /cvsroot/technology/org.eclipse.gmf/plugins/org.eclipse.gmf.runtime.diagram.ui/META-INF/MANIFEST.MF,v
+retrieving revision 1.5
+diff -u -r1.5 MANIFEST.MF
+--- META-INF/MANIFEST.MF 8 Sep 2005 18:58:40 -0000 1.5
++++ META-INF/MANIFEST.MF 10 Nov 2005 15:13:06 -0000
+@@ -42,7 +42,6 @@
+ org.eclipse.gmf.runtime.diagram.ui.internal.tools,
+ org.eclipse.gmf.runtime.diagram.ui.internal.type,
+ org.eclipse.gmf.runtime.diagram.ui.internal.util,
+- org.eclipse.gmf.runtime.diagram.ui.internal.view,
+ org.eclipse.gmf.runtime.diagram.ui.internal.view.factories,
+ org.eclipse.gmf.runtime.diagram.ui.l10n,
+ org.eclipse.gmf.runtime.diagram.ui.menus,
+@@ -75,5 +74,6 @@
+ org.eclipse.gmf.runtime.notation;visibility:=reexport,
+ org.eclipse.emf.common,
+ org.eclipse.emf.ecore,
+- org.eclipse.gmf.runtime.diagram.core;visibility:=reexport
++ org.eclipse.gmf.runtime.diagram.core;visibility:=reexport,
++ org.eclipse.gmf.dev.hook
+ Eclipse-AutoStart: true
+Index: src/org/eclipse/gmf/runtime/diagram/ui/editpolicies/SemanticEditPolicy.java
+===================================================================
+RCS file: /cvsroot/technology/org.eclipse.gmf/plugins/org.eclipse.gmf.runtime.diagram.ui/src/org/eclipse/gmf/runtime/diagram/ui/editpolicies/SemanticEditPolicy.java,v
+retrieving revision 1.4
+diff -u -r1.4 SemanticEditPolicy.java
+--- src/org/eclipse/gmf/runtime/diagram/ui/editpolicies/SemanticEditPolicy.java 2 Nov 2005 23:30:16 -0000 1.4
++++ src/org/eclipse/gmf/runtime/diagram/ui/editpolicies/SemanticEditPolicy.java 10 Nov 2005 15:13:10 -0000
+@@ -11,6 +11,8 @@
+
+ package org.eclipse.gmf.runtime.diagram.ui.editpolicies;
+
++import java.util.Map;
++
+ import org.eclipse.emf.ecore.EObject;
+ import org.eclipse.gef.EditPart;
+ import org.eclipse.gef.Request;
+@@ -68,9 +70,25 @@
+ * @see org.eclipse.gef.EditPolicy#getCommand(Request)
+ */
+ public Command getCommand(Request request) {
++ Command cmd = getCommandX(request);
++ Map sources = (Map) request.getExtendedData().get("org.eclipse.gmf.dev.sources");
++ if (cmd != null && sources != null) {
++ sources.put(cmd, this);
++ }
++ return cmd;
++ }
++
++ /**
++ * @see org.eclipse.gef.EditPolicy#getCommand(Request)
++ */
++ public Command getCommandX(Request request) {
++ Map sources = (Map) request.getExtendedData().get("org.eclipse.gmf.dev.sources");
+ if (RequestConstants.REQ_SEMANTIC_WRAPPER.equals(request.getType())) {
+- return getSemanticCommand(((EditCommandRequestWrapper) request)
+- .getEditCommandRequest());
++ IEditCommandRequest semRequest = ((EditCommandRequestWrapper) request).getEditCommandRequest();
++ if (sources != null) {
++ semRequest.setParameter("org.eclipse.gmf.dev.sources", sources);
++ }
++ return getSemanticCommand(semRequest);
+ } else if (REQ_RECONNECT_SOURCE.equals(request.getType())
+ && relationshipSourceHasChanged((ReconnectRequest) request)) {
+ EditPart connectionEP = ((ReconnectRequest) request)
+@@ -128,7 +146,11 @@
+ */
+ protected Command getSemanticCommand(IEditCommandRequest request) {
+
++ Map sources = (Map) request.getParameter("org.eclipse.gmf.dev.sources");
+ IEditCommandRequest completedRequest = completeRequest(request);
++ if (sources != null) {
++ completedRequest.setParameter("org.eclipse.gmf.dev.sources", sources);
++ }
+
+ IElementType elementType = ElementTypeRegistry.getInstance()
+ .getElementType(completedRequest.getEditHelperContext());
+Index: src/org/eclipse/gmf/runtime/diagram/ui/editparts/GraphicalEditPart.java
+===================================================================
+RCS file: /cvsroot/technology/org.eclipse.gmf/plugins/org.eclipse.gmf.runtime.diagram.ui/src/org/eclipse/gmf/runtime/diagram/ui/editparts/GraphicalEditPart.java,v
+retrieving revision 1.17
+diff -u -r1.17 GraphicalEditPart.java
+--- src/org/eclipse/gmf/runtime/diagram/ui/editparts/GraphicalEditPart.java 8 Nov 2005 19:38:16 -0000 1.17
++++ src/org/eclipse/gmf/runtime/diagram/ui/editparts/GraphicalEditPart.java 10 Nov 2005 15:13:10 -0000
+@@ -17,6 +17,7 @@
+ import java.util.HashMap;
+ import java.util.HashSet;
+ import java.util.Hashtable;
++import java.util.IdentityHashMap;
+ import java.util.Iterator;
+ import java.util.List;
+ import java.util.ListIterator;
+@@ -45,6 +46,7 @@
+ import org.eclipse.gef.requests.DropRequest;
+ import org.eclipse.gef.requests.GroupRequest;
+ import org.eclipse.gef.requests.TargetRequest;
++import org.eclipse.gmf.dev.hook.EditPartTracer;
+ import org.eclipse.gmf.runtime.common.core.util.IAdaptableSelection;
+ import org.eclipse.gmf.runtime.common.ui.services.action.filter.ActionFilterService;
+ import org.eclipse.gmf.runtime.common.ui.services.parser.CommonParserHint;
+@@ -89,6 +91,7 @@
+ import org.eclipse.swt.widgets.Display;
+ import org.eclipse.ui.IActionFilter;
+
++
+ /**
+ * @author melaasar,mmostafa
+ *
+@@ -331,18 +334,29 @@
+ return UnexecutableCommand.INSTANCE;
+ }
+ }
+-
++
+ Command cmd = null;
+ try {
+ GETCOMMAND_RECURSIVE_COUNT++;
+ final Request request = _request;
++
++ final Map sources = new IdentityHashMap();
++ request.getExtendedData().put("org.eclipse.gmf.dev.sources", sources);
++ traceCommandRequested(_request);
++ try {
++
+ cmd = (Command) MEditingDomainGetter.getMEditingDomain((View)getModel()).runAsRead(new MRunnable() {
+
+ public Object run() {
+- return GraphicalEditPart.super.getCommand(request);
++ //return GraphicalEditPart.super.getCommand(request);
++ return EditPartTracer.Insider.getCommand(
++ getEditPolicyIterator(), request, sources);
+ }
+ });
+
++ } finally {
++ traceCommandCreated(_request, cmd, sources);
++ }
+
+ if ( cmd != null ) {
+ _disableCanonicalEditPolicyList.addAll(disableCanonicalFor(_request));
+@@ -369,8 +383,25 @@
+ GETCOMMAND_RECURSIVE_COUNT = 0;
+ throw t;
+ }
+- return cmd;
+
++ return cmd;
++ }
++
++ protected final void traceCommandRequested(Request request) {
++ EditPartTracer tracer = EditPartTracer.getInstance(getViewer());
++ if (tracer == null) {
++ return;
++ }
++ tracer.fireCommandRequested(this, request);
++ }
++
++ protected final void traceCommandCreated(Request request, Command command,
++ Map sources) {
++ EditPartTracer tracer = EditPartTracer.getInstance(getViewer());
++ if (tracer == null) {
++ return;
++ }
++ tracer.fireCommandCreated(this, request, command, sources);
+ }
+
+ /**
+Index: src/org/eclipse/gmf/runtime/diagram/ui/editparts/ConnectionEditPart.java
+===================================================================
+RCS file: /cvsroot/technology/org.eclipse.gmf/plugins/org.eclipse.gmf.runtime.diagram.ui/src/org/eclipse/gmf/runtime/diagram/ui/editparts/ConnectionEditPart.java,v
+retrieving revision 1.14
+diff -u -r1.14 ConnectionEditPart.java
+--- src/org/eclipse/gmf/runtime/diagram/ui/editparts/ConnectionEditPart.java 8 Nov 2005 18:50:25 -0000 1.14
++++ src/org/eclipse/gmf/runtime/diagram/ui/editparts/ConnectionEditPart.java 10 Nov 2005 15:13:09 -0000
+@@ -17,6 +17,7 @@
+ import java.util.Dictionary;
+ import java.util.HashMap;
+ import java.util.Hashtable;
++import java.util.IdentityHashMap;
+ import java.util.Iterator;
+ import java.util.List;
+ import java.util.ListIterator;
+@@ -51,6 +52,7 @@
+ import org.eclipse.gef.editparts.AbstractConnectionEditPart;
+ import org.eclipse.gef.editpolicies.SnapFeedbackPolicy;
+ import org.eclipse.gef.rulers.RulerProvider;
++import org.eclipse.gmf.dev.hook.EditPartTracer;
+ import org.eclipse.gmf.runtime.common.ui.services.action.filter.ActionFilterService;
+ import org.eclipse.gmf.runtime.diagram.core.internal.util.MEditingDomainGetter;
+ import org.eclipse.gmf.runtime.diagram.core.listener.DiagramEventBroker;
+@@ -507,17 +509,46 @@
+ return UnexecutableCommand.INSTANCE;
+ }
+
++ Command cmd = null;
++ final Map sources = new IdentityHashMap();
++ _request.getExtendedData().put("org.eclipse.gmf.dev.sources", sources);
++ traceCommandRequested(_request);
++
++ try {
+ final Request request = _request;
+- Command cmd = (Command) MEditingDomainGetter.getMEditingDomain(
++ cmd = (Command) MEditingDomainGetter.getMEditingDomain(
+ (View) getModel()).runAsRead(new MRunnable() {
+
+ public Object run() {
+- return ConnectionEditPart.super.getCommand(request);
++ //return ConnectionEditPart.super.getCommand(request);
++ return EditPartTracer.Insider.getCommand(
++ getEditPolicyIterator(), request, sources);
+ }
+ });
++ } finally {
++ traceCommandCreated(_request, cmd, sources);
++ }
++
+ return cmd;
+ }
+
++ protected final void traceCommandRequested(Request request) {
++ EditPartTracer tracer = EditPartTracer.getInstance(getViewer());
++ if (tracer == null) {
++ return;
++ }
++ tracer.fireCommandRequested(this, request);
++ }
++
++ protected final void traceCommandCreated(Request request, Command command,
++ Map sources) {
++ EditPartTracer tracer = EditPartTracer.getInstance(getViewer());
++ if (tracer == null) {
++ return;
++ }
++ tracer.fireCommandCreated(this, request, command, sources);
++ }
++
+ /**
+ * Convenience method returning the editpart's Diagram, the Diagam that owns
+ * the edit part
diff --git a/devtools/org.eclipse.gmf.dev.hook/oeg.runtime.emf.type.core.txt b/devtools/org.eclipse.gmf.dev.hook/oeg.runtime.emf.type.core.txt
new file mode 100644
index 000000000..0106c5c40
--- /dev/null
+++ b/devtools/org.eclipse.gmf.dev.hook/oeg.runtime.emf.type.core.txt
@@ -0,0 +1,49 @@
+Index: src/org/eclipse/gmf/runtime/emf/type/core/edithelper/AbstractEditHelper.java
+===================================================================
+RCS file: /cvsroot/technology/org.eclipse.gmf/plugins/org.eclipse.gmf.runtime.emf.type.core/src/org/eclipse/gmf/runtime/emf/type/core/edithelper/AbstractEditHelper.java,v
+retrieving revision 1.2
+diff -u -r1.2 AbstractEditHelper.java
+--- src/org/eclipse/gmf/runtime/emf/type/core/edithelper/AbstractEditHelper.java 12 Sep 2005 21:26:55 -0000 1.2
++++ src/org/eclipse/gmf/runtime/emf/type/core/edithelper/AbstractEditHelper.java 10 Nov 2005 15:13:49 -0000
+@@ -91,6 +91,11 @@
+
+ CompositeCommand command = createCompositeCommand(req);
+
++ Map sources = (Map) req.getParameter("org.eclipse.gmf.dev.sources");
++ if (sources != null) {
++ sources.put(command, this);
++ }
++
+ // Get 'before' commands from matching element type
+ // specializations
+ IEditHelperAdvice[] advice = getEditHelperAdvice(req);
+@@ -104,6 +109,9 @@
+
+ if (beforeAdvice != null) {
+ command.compose(beforeAdvice);
++ if (sources != null) {
++ sources.put(beforeAdvice, nextAdvice);
++ }
+ }
+ }
+ }
+@@ -117,6 +125,9 @@
+
+ } else if (insteadCommand != null) {
+ command.compose(insteadCommand);
++ if (sources != null) {
++ sources.put(insteadCommand, this);
++ }
+ }
+
+ // Get 'after' commands from matching element type
+@@ -130,6 +141,9 @@
+
+ if (afterAdvice != null) {
+ command.compose(afterAdvice);
++ if (sources != null) {
++ sources.put(afterAdvice, nextAdvice);
++ }
+ }
+ }
+ }

Back to the top