Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordstadnik2006-07-05 07:01:03 -0400
committerdstadnik2006-07-05 07:01:03 -0400
commit4e190664904e7db593be322832e28185a2a97c5d (patch)
tree219745837d54eebbe968fbd645f467321649ba3e /devtools
parent2bdf78dab3009edc4cbe412780a67f3a801c9733 (diff)
downloadorg.eclipse.gmf-tooling-4e190664904e7db593be322832e28185a2a97c5d.tar.gz
org.eclipse.gmf-tooling-4e190664904e7db593be322832e28185a2a97c5d.tar.xz
org.eclipse.gmf-tooling-4e190664904e7db593be322832e28185a2a97c5d.zip
add element type
Diffstat (limited to 'devtools')
-rw-r--r--devtools/org.eclipse.gmf.dev.runtime/src/org/eclipse/gmf/dev/runtime/ExtEditPartTraceContributor.java16
1 files changed, 16 insertions, 0 deletions
diff --git a/devtools/org.eclipse.gmf.dev.runtime/src/org/eclipse/gmf/dev/runtime/ExtEditPartTraceContributor.java b/devtools/org.eclipse.gmf.dev.runtime/src/org/eclipse/gmf/dev/runtime/ExtEditPartTraceContributor.java
index c722a44bf..b7d57ee99 100644
--- a/devtools/org.eclipse.gmf.dev.runtime/src/org/eclipse/gmf/dev/runtime/ExtEditPartTraceContributor.java
+++ b/devtools/org.eclipse.gmf.dev.runtime/src/org/eclipse/gmf/dev/runtime/ExtEditPartTraceContributor.java
@@ -28,10 +28,13 @@ import org.eclipse.gmf.dev.EditPartTraceContributor;
import org.eclipse.gmf.dev.EditPartTraceRecord;
import org.eclipse.gmf.runtime.common.core.command.ICommand;
import org.eclipse.gmf.runtime.common.core.command.ICompositeCommand;
+import org.eclipse.gmf.runtime.diagram.core.edithelpers.CreateElementRequestAdapter;
import org.eclipse.gmf.runtime.diagram.ui.commands.CommandProxy;
import org.eclipse.gmf.runtime.diagram.ui.commands.ICommandProxy;
import org.eclipse.gmf.runtime.diagram.ui.commands.SemanticCreateCommand;
+import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewAndElementRequest;
import org.eclipse.gmf.runtime.diagram.ui.requests.EditCommandRequestWrapper;
+import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.IEditCommandRequest;
/**
@@ -49,11 +52,24 @@ public class ExtEditPartTraceContributor implements EditPartTraceContributor {
kids.add(createRequestNode(realRequest));
}
}
+ if (request instanceof CreateViewAndElementRequest) {
+ CreateViewAndElementRequest cveRequest = (CreateViewAndElementRequest) request;
+ CreateElementRequestAdapter ceAdapter = cveRequest.getViewAndElementDescriptor().getCreateElementRequestAdapter();
+ if (ceAdapter != null) {
+ CreateElementRequest ceRequest = (CreateElementRequest) ceAdapter.getAdapter(CreateElementRequest.class);
+ if (ceRequest != null) {
+ kids.add(createRequestNode(ceRequest));
+ }
+ }
+ }
}
public static EditPartTraceRecord createRequestNode(IEditCommandRequest request) {
List<EditPartTraceRecord> kids = new ArrayList<EditPartTraceRecord>();
// kids.add(new EditPartTraceRecord("edit helper context " + request.getEditHelperContext()));
+ if (request instanceof CreateElementRequest) {
+ kids.add(new EditPartTraceRecord("element type " + ((CreateElementRequest) request).getElementType(), DevPlugin.INFO_IMAGE));
+ }
List elementsToEdit = request.getElementsToEdit();
if (elementsToEdit != null) {
for (Object elementToEdit : elementsToEdit) {

Back to the top