Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordstadnik2006-05-15 08:47:19 -0400
committerdstadnik2006-05-15 08:47:19 -0400
commit2117c435988d208de80d0fcb96982fbc267cabb7 (patch)
tree8e3f6f7664a2cca2a481e54a177e42762a575f67 /devtools
parent243588e5f13619b1c71fc70b5bf5fd75428f4e0e (diff)
downloadorg.eclipse.gmf-tooling-2117c435988d208de80d0fcb96982fbc267cabb7.tar.gz
org.eclipse.gmf-tooling-2117c435988d208de80d0fcb96982fbc267cabb7.tar.xz
org.eclipse.gmf-tooling-2117c435988d208de80d0fcb96982fbc267cabb7.zip
initial
Diffstat (limited to 'devtools')
-rw-r--r--devtools/org.eclipse.gmf.dev/ExtEditPartTracer.aj44
1 files changed, 44 insertions, 0 deletions
diff --git a/devtools/org.eclipse.gmf.dev/ExtEditPartTracer.aj b/devtools/org.eclipse.gmf.dev/ExtEditPartTracer.aj
new file mode 100644
index 000000000..ea330f61d
--- /dev/null
+++ b/devtools/org.eclipse.gmf.dev/ExtEditPartTracer.aj
@@ -0,0 +1,44 @@
+/*
+ * Copyright (c) 2005 Borland Software Corporation
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Dmitri Stadnik (Borland) - initial API and implementation
+ */
+package org.eclipse.gmf.runtime.emf.type.core;
+
+import org.eclipse.gmf.dev.EditPartTraceUtil;
+import org.eclipse.gmf.runtime.common.core.command.ICommand;
+import org.eclipse.gmf.runtime.emf.type.core.edithelper.IEditHelper;
+import org.eclipse.gmf.runtime.emf.type.core.edithelper.IEditHelperAdvice;
+import org.eclipse.gmf.runtime.emf.type.core.requests.IEditCommandRequest;
+
+/**
+ * @author dstadnik
+ */
+public aspect ExtEditPartTracer {
+
+ pointcut makingCommandInEditHelper(IEditHelper editHelper, IEditCommandRequest request) : execution(ICommand IEditHelper.getEditCommand(IEditCommandRequest)) && target(editHelper) && args(request);
+
+ ICommand around(IEditHelper editHelper, IEditCommandRequest request) : makingCommandInEditHelper(editHelper, request) {
+ ICommand command = proceed(editHelper, request);
+ if (command != null) {
+ EditPartTraceUtil.addSource(command, editHelper);
+ }
+ return command;
+ }
+
+ pointcut makingCommandInEditHelperAdvice(IEditHelperAdvice advice, IEditCommandRequest request) : (execution(ICommand IEditHelperAdvice.getBeforeEditCommand(IEditCommandRequest)) || execution(ICommand IEditHelperAdvice.getAfterEditCommand(IEditCommandRequest))) && target(advice) && args(request);
+
+ ICommand around(IEditHelperAdvice advice, IEditCommandRequest request) : makingCommandInEditHelperAdvice(advice, request) {
+ ICommand command = proceed(advice, request);
+ if (command != null) {
+ EditPartTraceUtil.addSource(command, advice);
+ }
+ return command;
+ }
+}

Back to the top