From ebd5809581875b8c12cb622ae81c8067d668b945 Mon Sep 17 00:00:00 2001
From: aradermache
Date: Mon, 28 Jan 2013 13:37:38 +0000
Subject: Initial version for migration of Qompass designer from 0.9.2 to the
trunk (0.10)
---
.../.classpath | 7 +
.../.project | 28 +
.../META-INF/MANIFEST.MF | 29 +
.../about.html | 28 +
.../build.properties | 13 +
.../icons/etool16/brkp_16x16.gif | Bin 0 -> 197 bytes
.../icons/etool16/brkp_9x9.gif | Bin 0 -> 179 bytes
.../icons/etool16/brkp_grp.gif | Bin 0 -> 361 bytes
.../icons/etool16/brkp_grp_disabled.gif | Bin 0 -> 173 bytes
.../icons/etool16/brkpd_16x16.gif | Bin 0 -> 139 bytes
.../icons/etool16/brkpd_9x9.gif | Bin 0 -> 123 bytes
.../icons/etool16/debug.gif | Bin 0 -> 348 bytes
.../icons/etool16/properties.gif | Bin 0 -> 577 bytes
.../icons/etool16/trcp_11x12.gif | Bin 0 -> 313 bytes
.../icons/etool16/trcp_16x16.gif | Bin 0 -> 348 bytes
.../icons/etool16/trcpd_11x12.gif | Bin 0 -> 302 bytes
.../icons/etool16/trcpd_16x16.gif | Bin 0 -> 316 bytes
.../plugin.properties | 12 +
.../plugin.xml | 193 +++
.../schema/traceMechanism.exsd | 109 ++
.../infra/services/tracepoints/Activator.java | 90 ++
.../services/tracepoints/ITraceMechanism.java | 74 ++
.../infra/services/tracepoints/MarkerUtils.java | 84 ++
.../infra/services/tracepoints/TraceActions.java | 206 +++
.../infra/services/tracepoints/TraceFunctions.java | 112 ++
.../infra/services/tracepoints/TraceMechanism.java | 88 ++
.../infra/services/tracepoints/TraceState.java | 20 +
.../services/tracepoints/TracepointConstants.java | 32 +
.../commands/AbstractTracepointCommand.java | 168 +++
.../ToggleBreakpointActivationCommand.java | 40 +
.../commands/ToggleBreakpointCommand.java | 41 +
.../ToggleTracepointActivationCommand.java | 41 +
.../commands/ToggleTracepointCommand.java | 52 +
.../commands/TracepointPropertiesCommand.java | 81 ++
.../tracepoints/dialogs/TraceActionSelection.java | 293 +++++
.../handler/AbstractCommandHandler.java | 165 +++
.../handler/ToggleBreakpointActivationHandler.java | 33 +
.../handler/ToggleBreakpointHandler.java | 33 +
.../handler/ToggleTracepointActivationHandler.java | 33 +
.../handler/ToggleTracepointHandler.java | 33 +
.../handler/TracepointPropertiesHandler.java | 33 +
.../BinaryEncodedMChoiceFieldEditor.java | 132 ++
.../preferences/MultipleChoiceFieldEditor.java | 234 ++++
.../preferences/TPPreferenceConstants.java | 51 +
.../preferences/TPPreferenceInitializer.java | 53 +
.../tracepoints/preferences/TPPreferencePage.java | 106 ++
.../.classpath | 7 +
.../.project | 34 +
.../META-INF/MANIFEST.MF | 19 +
.../about.html | 28 +
.../build.acceleo | 26 +
.../build.properties | 13 +
.../help/tocconcepts.xml | 7 +
.../html/images/image001.gif | Bin 0 -> 2182 bytes
.../html/images/image002.gif | Bin 0 -> 2123 bytes
.../html/images/image003.gif | Bin 0 -> 1323 bytes
.../html/images/image004.jpg | Bin 0 -> 3340 bytes
.../html/images/image005.jpg | Bin 0 -> 36908 bytes
.../html/images/image006.jpg | Bin 0 -> 4937 bytes
.../html/images/image007.gif | Bin 0 -> 21539 bytes
.../html/images/image008.jpg | Bin 0 -> 44181 bytes
.../html/images/image009.jpg | Bin 0 -> 43754 bytes
.../html/userguide.htm | 213 ++++
.../models/examples/ClientServerTraceTest.di | 76 ++
.../models/examples/ClientServerTraceTest.notation | 1315 ++++++++++++++++++++
.../models/examples/ClientServerTraceTest.uml | 428 +++++++
.../models/examples/ProducerConsumer.di | 53 +
.../models/examples/ProducerConsumer.notation | 1090 ++++++++++++++++
.../models/examples/ProducerConsumer.uml | 457 +++++++
.../models/library/tracing.di | 52 +
.../models/library/tracing.notation | 1078 ++++++++++++++++
.../models/library/tracing.uml | 771 ++++++++++++
.../plugin.properties | 12 +
.../plugin.xml | 54 +
.../qompass/modellibs/tracing/Activator.java | 51 +
.../tracing/ClientServerTraceTestModelWizard.java | 11 +
.../modellibs/tracing/IConfiguratorOTF.java | 53 +
.../modellibs/tracing/IConfiguratorTrace.java | 40 +
.../modellibs/tracing/QompassTraceMechanism.java | 181 +++
.../modellibs/tracing/acceleo/TraceUtils.java | 45 +
.../modellibs/tracing/acceleo/traceCout.mtl | 14 +
.../modellibs/tracing/acceleo/traceLTTng.mtl | 172 +++
.../qompass/modellibs/tracing/acceleo/traceOTF.mtl | 28 +
.../.classpath | 7 +
.../org.eclipse.papyrus.views.tracepoints/.project | 28 +
.../META-INF/MANIFEST.MF | 22 +
.../about.html | 28 +
.../build.properties | 10 +
.../contexts.xml | 13 +
.../icons/breakpoint_view.gif | Bin 0 -> 204 bytes
.../icons/gotoobj_tsk.gif | Bin 0 -> 372 bytes
.../icons/skip_brkp.gif | Bin 0 -> 204 bytes
.../plugin.properties | 12 +
.../plugin.xml | 34 +
.../papyrus/views/tracepoints/Activator.java | 78 ++
.../views/tracepoints/views/TraceViewImages.java | 44 +
.../views/tracepoints/views/TracepointView.java | 521 ++++++++
97 files changed, 9872 insertions(+)
create mode 100644 extraplugins/qompass-designer/tracing/org.eclipse.papyrus.infra.services.tracepoints/.classpath
create mode 100644 extraplugins/qompass-designer/tracing/org.eclipse.papyrus.infra.services.tracepoints/.project
create mode 100644 extraplugins/qompass-designer/tracing/org.eclipse.papyrus.infra.services.tracepoints/META-INF/MANIFEST.MF
create mode 100644 extraplugins/qompass-designer/tracing/org.eclipse.papyrus.infra.services.tracepoints/about.html
create mode 100644 extraplugins/qompass-designer/tracing/org.eclipse.papyrus.infra.services.tracepoints/build.properties
create mode 100644 extraplugins/qompass-designer/tracing/org.eclipse.papyrus.infra.services.tracepoints/icons/etool16/brkp_16x16.gif
create mode 100644 extraplugins/qompass-designer/tracing/org.eclipse.papyrus.infra.services.tracepoints/icons/etool16/brkp_9x9.gif
create mode 100644 extraplugins/qompass-designer/tracing/org.eclipse.papyrus.infra.services.tracepoints/icons/etool16/brkp_grp.gif
create mode 100644 extraplugins/qompass-designer/tracing/org.eclipse.papyrus.infra.services.tracepoints/icons/etool16/brkp_grp_disabled.gif
create mode 100644 extraplugins/qompass-designer/tracing/org.eclipse.papyrus.infra.services.tracepoints/icons/etool16/brkpd_16x16.gif
create mode 100644 extraplugins/qompass-designer/tracing/org.eclipse.papyrus.infra.services.tracepoints/icons/etool16/brkpd_9x9.gif
create mode 100644 extraplugins/qompass-designer/tracing/org.eclipse.papyrus.infra.services.tracepoints/icons/etool16/debug.gif
create mode 100644 extraplugins/qompass-designer/tracing/org.eclipse.papyrus.infra.services.tracepoints/icons/etool16/properties.gif
create mode 100644 extraplugins/qompass-designer/tracing/org.eclipse.papyrus.infra.services.tracepoints/icons/etool16/trcp_11x12.gif
create mode 100644 extraplugins/qompass-designer/tracing/org.eclipse.papyrus.infra.services.tracepoints/icons/etool16/trcp_16x16.gif
create mode 100644 extraplugins/qompass-designer/tracing/org.eclipse.papyrus.infra.services.tracepoints/icons/etool16/trcpd_11x12.gif
create mode 100644 extraplugins/qompass-designer/tracing/org.eclipse.papyrus.infra.services.tracepoints/icons/etool16/trcpd_16x16.gif
create mode 100644 extraplugins/qompass-designer/tracing/org.eclipse.papyrus.infra.services.tracepoints/plugin.properties
create mode 100644 extraplugins/qompass-designer/tracing/org.eclipse.papyrus.infra.services.tracepoints/plugin.xml
create mode 100644 extraplugins/qompass-designer/tracing/org.eclipse.papyrus.infra.services.tracepoints/schema/traceMechanism.exsd
create mode 100644 extraplugins/qompass-designer/tracing/org.eclipse.papyrus.infra.services.tracepoints/src/org/eclipse/papyrus/infra/services/tracepoints/Activator.java
create mode 100644 extraplugins/qompass-designer/tracing/org.eclipse.papyrus.infra.services.tracepoints/src/org/eclipse/papyrus/infra/services/tracepoints/ITraceMechanism.java
create mode 100644 extraplugins/qompass-designer/tracing/org.eclipse.papyrus.infra.services.tracepoints/src/org/eclipse/papyrus/infra/services/tracepoints/MarkerUtils.java
create mode 100644 extraplugins/qompass-designer/tracing/org.eclipse.papyrus.infra.services.tracepoints/src/org/eclipse/papyrus/infra/services/tracepoints/TraceActions.java
create mode 100644 extraplugins/qompass-designer/tracing/org.eclipse.papyrus.infra.services.tracepoints/src/org/eclipse/papyrus/infra/services/tracepoints/TraceFunctions.java
create mode 100644 extraplugins/qompass-designer/tracing/org.eclipse.papyrus.infra.services.tracepoints/src/org/eclipse/papyrus/infra/services/tracepoints/TraceMechanism.java
create mode 100644 extraplugins/qompass-designer/tracing/org.eclipse.papyrus.infra.services.tracepoints/src/org/eclipse/papyrus/infra/services/tracepoints/TraceState.java
create mode 100644 extraplugins/qompass-designer/tracing/org.eclipse.papyrus.infra.services.tracepoints/src/org/eclipse/papyrus/infra/services/tracepoints/TracepointConstants.java
create mode 100644 extraplugins/qompass-designer/tracing/org.eclipse.papyrus.infra.services.tracepoints/src/org/eclipse/papyrus/infra/services/tracepoints/commands/AbstractTracepointCommand.java
create mode 100644 extraplugins/qompass-designer/tracing/org.eclipse.papyrus.infra.services.tracepoints/src/org/eclipse/papyrus/infra/services/tracepoints/commands/ToggleBreakpointActivationCommand.java
create mode 100644 extraplugins/qompass-designer/tracing/org.eclipse.papyrus.infra.services.tracepoints/src/org/eclipse/papyrus/infra/services/tracepoints/commands/ToggleBreakpointCommand.java
create mode 100644 extraplugins/qompass-designer/tracing/org.eclipse.papyrus.infra.services.tracepoints/src/org/eclipse/papyrus/infra/services/tracepoints/commands/ToggleTracepointActivationCommand.java
create mode 100644 extraplugins/qompass-designer/tracing/org.eclipse.papyrus.infra.services.tracepoints/src/org/eclipse/papyrus/infra/services/tracepoints/commands/ToggleTracepointCommand.java
create mode 100644 extraplugins/qompass-designer/tracing/org.eclipse.papyrus.infra.services.tracepoints/src/org/eclipse/papyrus/infra/services/tracepoints/commands/TracepointPropertiesCommand.java
create mode 100644 extraplugins/qompass-designer/tracing/org.eclipse.papyrus.infra.services.tracepoints/src/org/eclipse/papyrus/infra/services/tracepoints/dialogs/TraceActionSelection.java
create mode 100644 extraplugins/qompass-designer/tracing/org.eclipse.papyrus.infra.services.tracepoints/src/org/eclipse/papyrus/infra/services/tracepoints/handler/AbstractCommandHandler.java
create mode 100644 extraplugins/qompass-designer/tracing/org.eclipse.papyrus.infra.services.tracepoints/src/org/eclipse/papyrus/infra/services/tracepoints/handler/ToggleBreakpointActivationHandler.java
create mode 100644 extraplugins/qompass-designer/tracing/org.eclipse.papyrus.infra.services.tracepoints/src/org/eclipse/papyrus/infra/services/tracepoints/handler/ToggleBreakpointHandler.java
create mode 100644 extraplugins/qompass-designer/tracing/org.eclipse.papyrus.infra.services.tracepoints/src/org/eclipse/papyrus/infra/services/tracepoints/handler/ToggleTracepointActivationHandler.java
create mode 100644 extraplugins/qompass-designer/tracing/org.eclipse.papyrus.infra.services.tracepoints/src/org/eclipse/papyrus/infra/services/tracepoints/handler/ToggleTracepointHandler.java
create mode 100644 extraplugins/qompass-designer/tracing/org.eclipse.papyrus.infra.services.tracepoints/src/org/eclipse/papyrus/infra/services/tracepoints/handler/TracepointPropertiesHandler.java
create mode 100644 extraplugins/qompass-designer/tracing/org.eclipse.papyrus.infra.services.tracepoints/src/org/eclipse/papyrus/infra/services/tracepoints/preferences/BinaryEncodedMChoiceFieldEditor.java
create mode 100644 extraplugins/qompass-designer/tracing/org.eclipse.papyrus.infra.services.tracepoints/src/org/eclipse/papyrus/infra/services/tracepoints/preferences/MultipleChoiceFieldEditor.java
create mode 100644 extraplugins/qompass-designer/tracing/org.eclipse.papyrus.infra.services.tracepoints/src/org/eclipse/papyrus/infra/services/tracepoints/preferences/TPPreferenceConstants.java
create mode 100644 extraplugins/qompass-designer/tracing/org.eclipse.papyrus.infra.services.tracepoints/src/org/eclipse/papyrus/infra/services/tracepoints/preferences/TPPreferenceInitializer.java
create mode 100644 extraplugins/qompass-designer/tracing/org.eclipse.papyrus.infra.services.tracepoints/src/org/eclipse/papyrus/infra/services/tracepoints/preferences/TPPreferencePage.java
create mode 100644 extraplugins/qompass-designer/tracing/org.eclipse.papyrus.qompass.modellibs.tracing/.classpath
create mode 100644 extraplugins/qompass-designer/tracing/org.eclipse.papyrus.qompass.modellibs.tracing/.project
create mode 100644 extraplugins/qompass-designer/tracing/org.eclipse.papyrus.qompass.modellibs.tracing/META-INF/MANIFEST.MF
create mode 100644 extraplugins/qompass-designer/tracing/org.eclipse.papyrus.qompass.modellibs.tracing/about.html
create mode 100644 extraplugins/qompass-designer/tracing/org.eclipse.papyrus.qompass.modellibs.tracing/build.acceleo
create mode 100644 extraplugins/qompass-designer/tracing/org.eclipse.papyrus.qompass.modellibs.tracing/build.properties
create mode 100644 extraplugins/qompass-designer/tracing/org.eclipse.papyrus.qompass.modellibs.tracing/help/tocconcepts.xml
create mode 100755 extraplugins/qompass-designer/tracing/org.eclipse.papyrus.qompass.modellibs.tracing/html/images/image001.gif
create mode 100755 extraplugins/qompass-designer/tracing/org.eclipse.papyrus.qompass.modellibs.tracing/html/images/image002.gif
create mode 100755 extraplugins/qompass-designer/tracing/org.eclipse.papyrus.qompass.modellibs.tracing/html/images/image003.gif
create mode 100755 extraplugins/qompass-designer/tracing/org.eclipse.papyrus.qompass.modellibs.tracing/html/images/image004.jpg
create mode 100755 extraplugins/qompass-designer/tracing/org.eclipse.papyrus.qompass.modellibs.tracing/html/images/image005.jpg
create mode 100755 extraplugins/qompass-designer/tracing/org.eclipse.papyrus.qompass.modellibs.tracing/html/images/image006.jpg
create mode 100755 extraplugins/qompass-designer/tracing/org.eclipse.papyrus.qompass.modellibs.tracing/html/images/image007.gif
create mode 100755 extraplugins/qompass-designer/tracing/org.eclipse.papyrus.qompass.modellibs.tracing/html/images/image008.jpg
create mode 100755 extraplugins/qompass-designer/tracing/org.eclipse.papyrus.qompass.modellibs.tracing/html/images/image009.jpg
create mode 100644 extraplugins/qompass-designer/tracing/org.eclipse.papyrus.qompass.modellibs.tracing/html/userguide.htm
create mode 100644 extraplugins/qompass-designer/tracing/org.eclipse.papyrus.qompass.modellibs.tracing/models/examples/ClientServerTraceTest.di
create mode 100644 extraplugins/qompass-designer/tracing/org.eclipse.papyrus.qompass.modellibs.tracing/models/examples/ClientServerTraceTest.notation
create mode 100644 extraplugins/qompass-designer/tracing/org.eclipse.papyrus.qompass.modellibs.tracing/models/examples/ClientServerTraceTest.uml
create mode 100644 extraplugins/qompass-designer/tracing/org.eclipse.papyrus.qompass.modellibs.tracing/models/examples/ProducerConsumer.di
create mode 100644 extraplugins/qompass-designer/tracing/org.eclipse.papyrus.qompass.modellibs.tracing/models/examples/ProducerConsumer.notation
create mode 100644 extraplugins/qompass-designer/tracing/org.eclipse.papyrus.qompass.modellibs.tracing/models/examples/ProducerConsumer.uml
create mode 100644 extraplugins/qompass-designer/tracing/org.eclipse.papyrus.qompass.modellibs.tracing/models/library/tracing.di
create mode 100644 extraplugins/qompass-designer/tracing/org.eclipse.papyrus.qompass.modellibs.tracing/models/library/tracing.notation
create mode 100644 extraplugins/qompass-designer/tracing/org.eclipse.papyrus.qompass.modellibs.tracing/models/library/tracing.uml
create mode 100644 extraplugins/qompass-designer/tracing/org.eclipse.papyrus.qompass.modellibs.tracing/plugin.properties
create mode 100644 extraplugins/qompass-designer/tracing/org.eclipse.papyrus.qompass.modellibs.tracing/plugin.xml
create mode 100644 extraplugins/qompass-designer/tracing/org.eclipse.papyrus.qompass.modellibs.tracing/src/org/eclipse/papyrus/qompass/modellibs/tracing/Activator.java
create mode 100644 extraplugins/qompass-designer/tracing/org.eclipse.papyrus.qompass.modellibs.tracing/src/org/eclipse/papyrus/qompass/modellibs/tracing/ClientServerTraceTestModelWizard.java
create mode 100644 extraplugins/qompass-designer/tracing/org.eclipse.papyrus.qompass.modellibs.tracing/src/org/eclipse/papyrus/qompass/modellibs/tracing/IConfiguratorOTF.java
create mode 100644 extraplugins/qompass-designer/tracing/org.eclipse.papyrus.qompass.modellibs.tracing/src/org/eclipse/papyrus/qompass/modellibs/tracing/IConfiguratorTrace.java
create mode 100644 extraplugins/qompass-designer/tracing/org.eclipse.papyrus.qompass.modellibs.tracing/src/org/eclipse/papyrus/qompass/modellibs/tracing/QompassTraceMechanism.java
create mode 100644 extraplugins/qompass-designer/tracing/org.eclipse.papyrus.qompass.modellibs.tracing/src/org/eclipse/papyrus/qompass/modellibs/tracing/acceleo/TraceUtils.java
create mode 100644 extraplugins/qompass-designer/tracing/org.eclipse.papyrus.qompass.modellibs.tracing/src/org/eclipse/papyrus/qompass/modellibs/tracing/acceleo/traceCout.mtl
create mode 100644 extraplugins/qompass-designer/tracing/org.eclipse.papyrus.qompass.modellibs.tracing/src/org/eclipse/papyrus/qompass/modellibs/tracing/acceleo/traceLTTng.mtl
create mode 100644 extraplugins/qompass-designer/tracing/org.eclipse.papyrus.qompass.modellibs.tracing/src/org/eclipse/papyrus/qompass/modellibs/tracing/acceleo/traceOTF.mtl
create mode 100644 extraplugins/qompass-designer/tracing/org.eclipse.papyrus.views.tracepoints/.classpath
create mode 100644 extraplugins/qompass-designer/tracing/org.eclipse.papyrus.views.tracepoints/.project
create mode 100644 extraplugins/qompass-designer/tracing/org.eclipse.papyrus.views.tracepoints/META-INF/MANIFEST.MF
create mode 100644 extraplugins/qompass-designer/tracing/org.eclipse.papyrus.views.tracepoints/about.html
create mode 100644 extraplugins/qompass-designer/tracing/org.eclipse.papyrus.views.tracepoints/build.properties
create mode 100644 extraplugins/qompass-designer/tracing/org.eclipse.papyrus.views.tracepoints/contexts.xml
create mode 100644 extraplugins/qompass-designer/tracing/org.eclipse.papyrus.views.tracepoints/icons/breakpoint_view.gif
create mode 100644 extraplugins/qompass-designer/tracing/org.eclipse.papyrus.views.tracepoints/icons/gotoobj_tsk.gif
create mode 100644 extraplugins/qompass-designer/tracing/org.eclipse.papyrus.views.tracepoints/icons/skip_brkp.gif
create mode 100644 extraplugins/qompass-designer/tracing/org.eclipse.papyrus.views.tracepoints/plugin.properties
create mode 100644 extraplugins/qompass-designer/tracing/org.eclipse.papyrus.views.tracepoints/plugin.xml
create mode 100644 extraplugins/qompass-designer/tracing/org.eclipse.papyrus.views.tracepoints/src/org/eclipse/papyrus/views/tracepoints/Activator.java
create mode 100644 extraplugins/qompass-designer/tracing/org.eclipse.papyrus.views.tracepoints/src/org/eclipse/papyrus/views/tracepoints/views/TraceViewImages.java
create mode 100644 extraplugins/qompass-designer/tracing/org.eclipse.papyrus.views.tracepoints/src/org/eclipse/papyrus/views/tracepoints/views/TracepointView.java
(limited to 'extraplugins/qompass-designer/tracing')
diff --git a/extraplugins/qompass-designer/tracing/org.eclipse.papyrus.infra.services.tracepoints/.classpath b/extraplugins/qompass-designer/tracing/org.eclipse.papyrus.infra.services.tracepoints/.classpath
new file mode 100644
index 00000000000..9d5026e8ffd
--- /dev/null
+++ b/extraplugins/qompass-designer/tracing/org.eclipse.papyrus.infra.services.tracepoints/.classpath
@@ -0,0 +1,7 @@
+
+
November 14, 2008
+The Eclipse Foundation makes available all content in this plug-in ("Content"). Unless otherwise +indicated below, the Content is provided to you under the terms and conditions of the +Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is available +at http://www.eclipse.org/legal/epl-v10.html. +For purposes of the EPL, "Program" will mean the Content.
+ +If you did not receive this Content directly from the Eclipse Foundation, the Content is +being redistributed by another party ("Redistributor") and different terms and conditions may +apply to your use of any object code in the Content. Check the Redistributor's license that was +provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise +indicated below, the terms and conditions of the EPL still apply to any source code in the Content +and such source code may be obtained at http://www.eclipse.org.
+ + + \ No newline at end of file diff --git a/extraplugins/qompass-designer/tracing/org.eclipse.papyrus.infra.services.tracepoints/build.properties b/extraplugins/qompass-designer/tracing/org.eclipse.papyrus.infra.services.tracepoints/build.properties new file mode 100644 index 00000000000..8e1f07ccf86 --- /dev/null +++ b/extraplugins/qompass-designer/tracing/org.eclipse.papyrus.infra.services.tracepoints/build.properties @@ -0,0 +1,13 @@ +# +#Mon Sep 12 09:30:24 CEST 2011 +bin.includes = META-INF/,\ + .,\ + about.html,\ + plugin.properties,\ + plugin.xml,\ + icons/,\ + schema/ +output..=bin/ +src.includes = about.html +source..=src/ +bin..=bin/ diff --git a/extraplugins/qompass-designer/tracing/org.eclipse.papyrus.infra.services.tracepoints/icons/etool16/brkp_16x16.gif b/extraplugins/qompass-designer/tracing/org.eclipse.papyrus.infra.services.tracepoints/icons/etool16/brkp_16x16.gif new file mode 100644 index 00000000000..a831fe72782 Binary files /dev/null and b/extraplugins/qompass-designer/tracing/org.eclipse.papyrus.infra.services.tracepoints/icons/etool16/brkp_16x16.gif differ diff --git a/extraplugins/qompass-designer/tracing/org.eclipse.papyrus.infra.services.tracepoints/icons/etool16/brkp_9x9.gif b/extraplugins/qompass-designer/tracing/org.eclipse.papyrus.infra.services.tracepoints/icons/etool16/brkp_9x9.gif new file mode 100644 index 00000000000..3678b09c6bf Binary files /dev/null and b/extraplugins/qompass-designer/tracing/org.eclipse.papyrus.infra.services.tracepoints/icons/etool16/brkp_9x9.gif differ diff --git a/extraplugins/qompass-designer/tracing/org.eclipse.papyrus.infra.services.tracepoints/icons/etool16/brkp_grp.gif b/extraplugins/qompass-designer/tracing/org.eclipse.papyrus.infra.services.tracepoints/icons/etool16/brkp_grp.gif new file mode 100644 index 00000000000..173661c5df7 Binary files /dev/null and b/extraplugins/qompass-designer/tracing/org.eclipse.papyrus.infra.services.tracepoints/icons/etool16/brkp_grp.gif differ diff --git a/extraplugins/qompass-designer/tracing/org.eclipse.papyrus.infra.services.tracepoints/icons/etool16/brkp_grp_disabled.gif b/extraplugins/qompass-designer/tracing/org.eclipse.papyrus.infra.services.tracepoints/icons/etool16/brkp_grp_disabled.gif new file mode 100644 index 00000000000..5ea466bcb2a Binary files /dev/null and b/extraplugins/qompass-designer/tracing/org.eclipse.papyrus.infra.services.tracepoints/icons/etool16/brkp_grp_disabled.gif differ diff --git a/extraplugins/qompass-designer/tracing/org.eclipse.papyrus.infra.services.tracepoints/icons/etool16/brkpd_16x16.gif b/extraplugins/qompass-designer/tracing/org.eclipse.papyrus.infra.services.tracepoints/icons/etool16/brkpd_16x16.gif new file mode 100644 index 00000000000..74b26c31a4d Binary files /dev/null and b/extraplugins/qompass-designer/tracing/org.eclipse.papyrus.infra.services.tracepoints/icons/etool16/brkpd_16x16.gif differ diff --git a/extraplugins/qompass-designer/tracing/org.eclipse.papyrus.infra.services.tracepoints/icons/etool16/brkpd_9x9.gif b/extraplugins/qompass-designer/tracing/org.eclipse.papyrus.infra.services.tracepoints/icons/etool16/brkpd_9x9.gif new file mode 100644 index 00000000000..d6d8d31b06f Binary files /dev/null and b/extraplugins/qompass-designer/tracing/org.eclipse.papyrus.infra.services.tracepoints/icons/etool16/brkpd_9x9.gif differ diff --git a/extraplugins/qompass-designer/tracing/org.eclipse.papyrus.infra.services.tracepoints/icons/etool16/debug.gif b/extraplugins/qompass-designer/tracing/org.eclipse.papyrus.infra.services.tracepoints/icons/etool16/debug.gif new file mode 100644 index 00000000000..d90a29fead8 Binary files /dev/null and b/extraplugins/qompass-designer/tracing/org.eclipse.papyrus.infra.services.tracepoints/icons/etool16/debug.gif differ diff --git a/extraplugins/qompass-designer/tracing/org.eclipse.papyrus.infra.services.tracepoints/icons/etool16/properties.gif b/extraplugins/qompass-designer/tracing/org.eclipse.papyrus.infra.services.tracepoints/icons/etool16/properties.gif new file mode 100644 index 00000000000..1dc19a31a0f Binary files /dev/null and b/extraplugins/qompass-designer/tracing/org.eclipse.papyrus.infra.services.tracepoints/icons/etool16/properties.gif differ diff --git a/extraplugins/qompass-designer/tracing/org.eclipse.papyrus.infra.services.tracepoints/icons/etool16/trcp_11x12.gif b/extraplugins/qompass-designer/tracing/org.eclipse.papyrus.infra.services.tracepoints/icons/etool16/trcp_11x12.gif new file mode 100644 index 00000000000..c04edf8e83e Binary files /dev/null and b/extraplugins/qompass-designer/tracing/org.eclipse.papyrus.infra.services.tracepoints/icons/etool16/trcp_11x12.gif differ diff --git a/extraplugins/qompass-designer/tracing/org.eclipse.papyrus.infra.services.tracepoints/icons/etool16/trcp_16x16.gif b/extraplugins/qompass-designer/tracing/org.eclipse.papyrus.infra.services.tracepoints/icons/etool16/trcp_16x16.gif new file mode 100644 index 00000000000..29ec606076f Binary files /dev/null and b/extraplugins/qompass-designer/tracing/org.eclipse.papyrus.infra.services.tracepoints/icons/etool16/trcp_16x16.gif differ diff --git a/extraplugins/qompass-designer/tracing/org.eclipse.papyrus.infra.services.tracepoints/icons/etool16/trcpd_11x12.gif b/extraplugins/qompass-designer/tracing/org.eclipse.papyrus.infra.services.tracepoints/icons/etool16/trcpd_11x12.gif new file mode 100644 index 00000000000..f3e7b3d6791 Binary files /dev/null and b/extraplugins/qompass-designer/tracing/org.eclipse.papyrus.infra.services.tracepoints/icons/etool16/trcpd_11x12.gif differ diff --git a/extraplugins/qompass-designer/tracing/org.eclipse.papyrus.infra.services.tracepoints/icons/etool16/trcpd_16x16.gif b/extraplugins/qompass-designer/tracing/org.eclipse.papyrus.infra.services.tracepoints/icons/etool16/trcpd_16x16.gif new file mode 100644 index 00000000000..76c65b6196f Binary files /dev/null and b/extraplugins/qompass-designer/tracing/org.eclipse.papyrus.infra.services.tracepoints/icons/etool16/trcpd_16x16.gif differ diff --git a/extraplugins/qompass-designer/tracing/org.eclipse.papyrus.infra.services.tracepoints/plugin.properties b/extraplugins/qompass-designer/tracing/org.eclipse.papyrus.infra.services.tracepoints/plugin.properties new file mode 100644 index 00000000000..3cabfa42274 --- /dev/null +++ b/extraplugins/qompass-designer/tracing/org.eclipse.papyrus.infra.services.tracepoints/plugin.properties @@ -0,0 +1,12 @@ +############################################################################### +# Copyright (c) 2010 CEA LIST. +# 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: +# CEA LIST - initial API and implementation +############################################################################### +pluginName=Papyrus Tracepoint Integration (Incubation) +pluginProvider=Eclipse Modeling Project diff --git a/extraplugins/qompass-designer/tracing/org.eclipse.papyrus.infra.services.tracepoints/plugin.xml b/extraplugins/qompass-designer/tracing/org.eclipse.papyrus.infra.services.tracepoints/plugin.xml new file mode 100644 index 00000000000..80dceda93de --- /dev/null +++ b/extraplugins/qompass-designer/tracing/org.eclipse.papyrus.infra.services.tracepoints/plugin.xml @@ -0,0 +1,193 @@ + + + ++ * + * This abstract command handler manages: + * - current selection in order to build a list of the selected {@link EObject} + * - execute the command (returned by children) in Papyrus {@link TransactionalEditingDomain} + * - calculate the command enablement and visibility regarding the command executability + * (the command is now shown in menu if not executable). + * + *+ */ +public abstract class AbstractCommandHandler extends AbstractHandler { + + /** + *
+ * + * Returns the command to execute (to be implemented + * in children implementing this class) + * + * @return the command to execute + * + *+ */ + protected abstract Command getCommand(); + + /** + *
+ * Get the selected element, the first selected element if several are selected or null + * if no selection or the selection is not an {@link EObject}. + * + * @return selected {@link EObject} or null + *+ * + */ + protected EObject getSelectedElement() { + EObject eObject = null; + Object selection = null; + + // Get current selection + selection = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getSelectionService().getSelection(); + + // Get first element if the selection is an IStructuredSelection + if(selection instanceof IStructuredSelection) { + IStructuredSelection structuredSelection = (IStructuredSelection)selection; + selection = structuredSelection.getFirstElement(); + } + + // Treat non-null selected object (try to adapt and return EObject) + if(selection != null) { + Object businessObject = BusinessModelResolver.getInstance().getBusinessModel(selection); + if(businessObject instanceof EObject) { + eObject = (EObject)businessObject; + } + } + return eObject; + } + + /** + *
+ * Parse current selection and extract the list of {@link EObject} from + * this selection. + * + * This also tries to adapt selected element into {@link EObject} + * (for example to get the {@link EObject} from a selection in the ModelExplorer). + * + * @return a list of currently selected {@link EObject} + *+ * + */ + protected List
+ * This page is used to modify preferences only. They are stored in the preference store that belongs to the main plug-in class. That way, preferences
+ * can be accessed directly via the preference store.
+ */
+
+public class TPPreferencePage
+ extends FieldEditorPreferencePage
+ implements IWorkbenchPreferencePage {
+
+ public TPPreferencePage() {
+ super(GRID);
+ setPreferenceStore(Activator.getDefault().getPreferenceStore());
+ setDescription("Trace options");
+ }
+
+ /**
+ * Creates the field editors. Field editors are abstractions of
+ * the common GUI blocks needed to manipulate various types
+ * of preferences. Each field editor knows how to save and
+ * restore itself.
+ */
+ public void createFieldEditors() {
+ EList November 14, 2008 The Eclipse Foundation makes available all content in this plug-in ("Content"). Unless otherwise
+indicated below, the Content is provided to you under the terms and conditions of the
+Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is available
+at http://www.eclipse.org/legal/epl-v10.html.
+For purposes of the EPL, "Program" will mean the Content. If you did not receive this Content directly from the Eclipse Foundation, the Content is
+being redistributed by another party ("Redistributor") and different terms and conditions may
+apply to your use of any object code in the Content. Check the Redistributor's license that was
+provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
+indicated below, the terms and conditions of the EPL still apply to any source code in the Content
+and such source code may be obtained at http://www.eclipse.org.
+The Papyrus Trace Framework allows
+annotating UML model elements with a trace annotation. Different kind of model
+elements can be annotated, such as operations or ports. These annotations are
+shown by means of a decoration icon. When the code of the application is
+generated, the trace declaration must lead to an instrumentation of the
+generated code for a specific trace implementation, in our case primarily
+LTTng. Several model elements can be annotated
+with trace information. In the sequel, we list these and outline the different
+trace options. 1. Class/component itself. When a class is annotated, by default its
+creation and destruction is traced. In addition, a class has several features
+(such as operations and attributes). These can be traced without having to
+place a tracepoint on the feature itself. The user can choose whether he wants
+to trace in addition all attributes, all operations or all states. This choice
+is available in the tracing context menu, after the tracepoint has been
+applied. 2. Port of a component
+If a port of a component is traced, an interceptor is placed within the components container. The
+interceptor traces the operations that are associated with a port. For
+instance, a data-flow port is associated with push or pull operations that take
+the concerned data type as parameter. 3. Operation of a class A tracepoint may
+be placed on an operation of a class. This means that an interceptor (on class
+level) will create a trace event before and/or after the operation has been
+called. In addition, there is the option to add the operation name and the
+model reference into the trace point, or ' in addition ' all of the operations
+parameters. If the trace event is produced before the application invocation,
+out parameters and return values are not part of the trace event. 4. Property of a class Properties
+(attributes) of a class can be traced, if the attribute's type is itself a
+class. In this case, the tracepoint is interpreted as a trace on the instance.
+It implies activating tracing on the attributes type, but restricting the
+production of a trace to the role (instance) that the type plays within the class
+declaring the attribute. This mechanism can be realized within the framework,
+but is not implemented at the moment. 5.
+Trace
+an instance specification Putting a trace
+point on an instance specification is quite similar to putting a trace point to
+an attribute: the classifier referenced by the instance specification will have
+trace support but actual tracing is restricted to concrete instance. Not implemented (planned for 2013) 6.
+State
+(within a statechart) If a class defines a state-chart, the
+states can be annotated with a trace marker. A trace event is produced, if the
+state is entered and/or left (configurable via option). Not implemented
+(planned for 2013) 7.
+Transition:
+A transition can be annotated. A trace event is produced, when the transition
+is fired. In LTTng, a trace events need to have a
+declaration. We distinguish events that have a generic declaration and those
+requiring a specific declaration. For instance, a call event for an operation
+has a generic declaration, if parameters are not included: all that is needed
+is the operation name (or identifier). Although we could always use a generic
+declaration with the operation name as parameter, we declare the name (and URI
+reference) in the events declaration, i.e. in its meta-data. Thus, an event
+instance does not include the model URI and is therefore quite lcompact on the
+expense of a potentially large number of different events. In general, the event declaration includes
+a model reference, e.g. ref. to port or operation and event data. In case of an
+operation call, the event data corresponds to the values of parameter and an
+identification of the associated instance. The following code fragment shows,
+how a tracepoint is declared in case of a port interception. Here, the port 'p',
+typed with interface ICompute is traced, these are the actual of a package
+template with the two formal parameters interface and port. We use a canonical name for the event type
+which is composed of the model name, the name of a package template and the
+actual variables for the template. In our example, the model is called
+ClientServerTraceTest, the package methodCall_port_ICompute_p (the underlying package
+template is called methodCall_port, the actual for the two formals Interface
+and port are 'ICompute' and 'p', respectively). The second parameter for the
+event declaration is the elements name, e.g. the operation name ('add' in the
+example) in case of a traced operation. TRACEPOINT_EVENT(ClientServerTraceTest_methodCall_port_ICompute_p,
+add,
+TP_ARGS(const char *, instanceName, int, a, int, b),
+TP_FIELDS(
+ctf_string(instanceName, instanceName)
+ctf_integer(int, a, a)
+ctf_integer(int, b, b) ) ) TRACEPOINT_MODEL_EMF_URI(ClientServerTraceTest_methodCall_port_ICompute_p,
+add, "platform:/resource/org.eclipse.papyrus.qompass.designer.examples/model/ClientServerTraceTest.uml#_4KiE8DLbEd2qeKRLMdIx_A") For each trace event, the added
+instrumentation code with invoke the tracepoint, in case of the example above
+by tracepoint(ClientServerTraceTest_methodCall_port_ICompute_p, add, instanceName, a, b); Note that instanceName is an attribute of the interception
+class, i.e. not a fixed string, a and b are the actual parameters of an
+operation. This section demonstrates the use of the trace
+mechanism by means of a very simple application, called client/server trace
+test. The model is available via the 'new example' menu. Select the example
+from the 'Qompass examples' folder. Figure 1: Tracepoint on operation, shown in model
+explorer, diagram and trace view Figure 1 shows a
+small test application. A tracepoint is placed on an operation testOp. The
+tracepoint is also visible in the tracepoint view (first selected entry) and in
+the model explorer and the left. The tracepoint view is an additional view that
+can be shown via the Eclipse standard 'show view' dialog, appearing in the
+Papyrus category. Figure 2: Set trace points via context menu Figure 2 shows a
+part of the context menu of a model element in the model explorer or a diagram.
+It contains a sub-menu called 'Tracing' that contains trace related functions.
+In particular, it is possible to toggle a tracepoint, i.e. add or remove a
+tracepoint. A tracepoint can be active or inactive. While the instrumentation
+is always added, i.e. also when the tracepoint is inactive, trace events should
+only be produced for an active tracepoint. This sould be done via the LTTng
+runtime control mechanisms. Figure 4: Preference dialog for tracing Figure 4 shows the
+preference dialog for tracing within the Papyrus category. The dialog captures
+the different options how a tracepoint of a class, a state and on an operation
+should be interpreted, e.g. whether an operation is be trace with or without
+parameter values. In addition to these options, the
+instrumentation has a modular realization mechanism and the default
+implementation among available implementations can be chosen. The Qompass model
+library contains for instance not only an LTTng based trace implementation, but
+also one based on OTF (open trace format).
+ Figure 5: Trace event view via TMF Once the tracepoints are set, an
+application can be compiled and executed. Currently, the runtime trace options
+must be set manually (e.g. enable all events). The generated trace can be
+imported by means of the TMF (trace monitoring framework) which is part of the
+LTTng linux-tools. Figure 5
+shows the event view of this framework (note that the view will be replaced by
+an editor from version 2.0 on) displaying the trace of the client/server trace
+test model. The screenshot shows the event timestamp, type and content. It
+depicts that the type corresponds to a qualified name in the model element and
+that the contents contains parameter values.
+
+ Figure 6: Trace event view, filtered (only 'testOp'
+is shown) In Figure 6, the event view has been restricted
+to the operation 'testOp' by means of a context operation of an element in the
+model explorer or diagram. In this case, only events for the operation testOp
+are shown. November 14, 2008 The Eclipse Foundation makes available all content in this plug-in ("Content"). Unless otherwise
+indicated below, the Content is provided to you under the terms and conditions of the
+Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is available
+at http://www.eclipse.org/legal/epl-v10.html.
+For purposes of the EPL, "Program" will mean the Content. If you did not receive this Content directly from the Eclipse Foundation, the Content is
+being redistributed by another party ("Redistributor") and different terms and conditions may
+apply to your use of any object code in the Content. Check the Redistributor's license that was
+provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
+indicated below, the terms and conditions of the EPL still apply to any source code in the Content
+and such source code may be obtained at http://www.eclipse.org.
+ * The view uses a label provider to define how model objects should be presented in the view. Each view can present the same model objects using
+ * different labels and icons, if needed. Alternatively, a single label provider can be shared between views in order to ensure that objects of the
+ * same type are presented in the same way everywhere.
+ *
+ */
+
+public class TracepointView extends ViewPart implements ISelectionListener {
+
+ /**
+ * The ID of the view as specified by the extension.
+ */
+ public static final String ID = "org.eclipse.papyrus.views.tracepoints.views.Tracepoints";
+
+
+ private CheckboxTableViewer viewer;
+
+ protected Action actionDelete;
+
+ protected Action actionDeleteAll;
+
+ protected Action actionGoto;
+
+ protected Action actionSkip;
+
+ protected Action actionTraceSelect;
+
+ private Action doubleClickAction;
+
+ private IFileObserver fileObserver = null;
+
+ protected TraceActionSelection tas;
+
+ /**
+ * The content provider class is responsible for
+ * providing objects to the view. It can wrap
+ * existing objects in adapters or simply return
+ * objects as-is. These objects may be sensitive
+ * to the current input of the view, or ignore
+ * it and always show the same content
+ * (like Task List, for example).
+ */
+ class ViewContentProvider implements IStructuredContentProvider {
+
+ public void inputChanged(Viewer v, Object oldInput, Object newInput) {
+ }
+
+ public void dispose() {
+ }
+
+ public Object[] getElements(Object parent) {
+ try {
+ IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot();
+ if(root != null) {
+ return root.findMarkers(TracepointConstants.tpOrbpMarker, true, IResource.DEPTH_INFINITE);
+ }
+ } catch (CoreException e) {
+ }
+ return new String[]{};
+ }
+ }
+
+
+
+ class ViewLabelProvider extends LabelProvider implements ITableLabelProvider {
+
+ public ViewLabelProvider() {
+ this.traceImage = new TraceFunctions();
+ }
+
+ public String getColumnText(Object obj, int index) {
+ if(obj instanceof IMarker) {
+ EObject eobj = MarkerUtils.getEObjectOfMarker((IMarker)obj);
+ if(eobj instanceof NamedElement) {
+ return ((NamedElement)eobj).getQualifiedName();
+ } else if(eobj != null) {
+ return eobj.toString();
+ }
+ }
+ return getText(obj);
+
+ }
+
+ public Image getColumnImage(Object obj, int index) {
+ if(TraceState.skipAllTracepoints) {
+ return TraceViewImages.getSkipAllImage();
+ }
+ if(obj instanceof IMarker) {
+ IMarker marker = (IMarker)obj;
+ ImageDescriptor id = traceImage.getImageDescriptorForGE(marker);
+ if(id != null) {
+ // TODO: leaks!
+ return id.createImage();
+ }
+ }
+ return null;
+ }
+
+ private TraceFunctions traceImage;
+ }
+
+ class NameSorter extends ViewerSorter {
+ }
+
+ /**
+ * The constructor.
+ */
+ public TracepointView() {
+ }
+
+ /**
+ * This is a callback that will allow us
+ * to create the viewer and initialize it.
+ */
+ @Override
+ public void createPartControl(Composite parent) {
+ viewer = CheckboxTableViewer.newCheckList(parent, SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL);
+ viewer.setContentProvider(new ViewContentProvider());
+ viewer.setLabelProvider(new ViewLabelProvider());
+ viewer.setCheckStateProvider(new ICheckStateProvider() {
+
+ public boolean isGrayed(Object element) {
+ return false;
+ }
+
+ public boolean isChecked(Object element) {
+ if(element instanceof IMarker) {
+ IMarker marker = (IMarker)element;
+ return marker.getAttribute(TracepointConstants.isActive, false);
+ }
+ return false;
+ }
+ });
+
+ viewer.setSorter(new NameSorter());
+ viewer.setInput(getViewSite());
+
+ getViewSite().getPage().addSelectionListener(this);
+
+
+ // Create the help context id for the viewer's control
+ PlatformUI.getWorkbench().getHelpSystem().setHelp(viewer.getControl(), "org.eclipse.papyrus.views.tracepoints.viewer");
+ makeActions();
+ hookContextMenu();
+ hookDoubleClickAction();
+ contributeToActionBars();
+ viewer.addCheckStateListener(new ICheckStateListener() {
+
+ public void checkStateChanged(CheckStateChangedEvent event) {
+ Object element = event.getElement();
+ boolean isChecked = event.getChecked();
+ if(element instanceof IMarker) {
+ IMarker marker = (IMarker)element;
+ try {
+ marker.setAttribute(TracepointConstants.isActive, isChecked);
+ switchUI();
+ } catch (CoreException e) {
+ }
+ }
+ }
+ });
+
+ fileObserver = new IFileObserver() {
+
+ public void handleMarkerDeleted(IMarker marker, @SuppressWarnings("rawtypes") Map attributes) {
+ switchUI();
+ }
+
+ public void handleMarkerChanged(IMarker marker) {
+ switchUI();
+ }
+
+ public void handleMarkerAdded(IMarker marker) {
+ switchUI();
+ }
+
+ // TODO need to handle?
+ public void handleFileRenamed(IFile oldFile, IFile file) {
+ }
+
+ public void handleFileMoved(IFile oldFile, IFile file) {
+ }
+
+ public void handleFileDeleted(IFile file) {
+ }
+
+ public void handleFileChanged(IFile file) {
+ }
+ };
+
+ FileChangeManager.getInstance().addFileObserver(fileObserver);
+ }
+
+ @Override
+ public void dispose() {
+ if(fileObserver != null) {
+ FileChangeManager.getInstance().addFileObserver(fileObserver);
+ }
+ super.dispose();
+ }
+
+ public void switchUI() {
+ Display.getDefault().asyncExec(new Runnable() {
+
+ public void run() {
+ // ... do any work that updates the screen ...
+ viewer.refresh();
+ }
+ });
+ }
+
+ private void hookContextMenu() {
+ MenuManager menuMgr = new MenuManager("#PopupMenu");
+ menuMgr.setRemoveAllWhenShown(true);
+ menuMgr.addMenuListener(new IMenuListener() {
+
+ public void menuAboutToShow(IMenuManager manager) {
+ TracepointView.this.fillContextMenu(manager);
+ }
+ });
+ Menu menu = menuMgr.createContextMenu(viewer.getControl());
+ viewer.getControl().setMenu(menu);
+ getSite().registerContextMenu(menuMgr, viewer);
+ }
+
+ private void contributeToActionBars() {
+ IActionBars bars = getViewSite().getActionBars();
+ fillLocalPullDown(bars.getMenuManager());
+ fillLocalToolBar(bars.getToolBarManager());
+ }
+
+ protected void fillLocalPullDown(IMenuManager manager) {
+ manager.add(actionDelete);
+ manager.add(new Separator());
+ manager.add(actionGoto);
+ }
+
+ protected void fillContextMenu(IMenuManager manager) {
+ manager.add(actionDelete);
+ manager.add(actionGoto);
+ // Other plug-ins can contribute there actions here
+ manager.add(new Separator(IWorkbenchActionConstants.MB_ADDITIONS));
+ }
+
+ protected void fillLocalToolBar(IToolBarManager manager) {
+ manager.add(actionDelete);
+ manager.add(actionDeleteAll);
+ manager.add(actionGoto);
+ manager.add(actionSkip);
+ manager.add(actionTraceSelect);
+ }
+
+ protected void makeActions() {
+ actionSkip = new Action("Skip all", Action.AS_CHECK_BOX) {
+
+ @Override
+ public void run() {
+ TraceState.skipAllTracepoints = !TraceState.skipAllTracepoints;
+ switchUI();
+ }
+ };
+ actionSkip.setChecked(TraceState.skipAllTracepoints);
+
+ actionSkip.setImageDescriptor(TraceViewImages.getSkipAllID());
+ actionSkip.setToolTipText("Toggle skipping all trace/break points");
+
+ actionDelete = new Action("Delete") {
+
+ @Override
+ public void run() {
+ ISelection selection = viewer.getSelection();
+ Object obj = ((IStructuredSelection)selection).getFirstElement();
+ if(obj instanceof IMarker) {
+ IMarker marker = (IMarker)obj;
+ try {
+ marker.delete();
+ } catch (CoreException e) {
+ }
+ }
+ }
+ };
+ actionDelete.setToolTipText("Delete trace/breakpoint");
+ actionDelete.setImageDescriptor(PlatformUI.getWorkbench().getSharedImages().getImageDescriptor(ISharedImages.IMG_ELCL_REMOVE));
+
+ actionDeleteAll = new Action() {
+
+ @Override
+ public void run() {
+
+ IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot();
+ if(root != null) {
+ try {
+ root.deleteMarkers(TracepointConstants.tpOrbpMarker, true, 0);
+ } catch (CoreException e) {
+ }
+ }
+ }
+ };
+ actionDeleteAll.setText("Delete all");
+ actionDeleteAll.setToolTipText("Delete all trace/breakpoint");
+ actionDeleteAll.setImageDescriptor(PlatformUI.getWorkbench().getSharedImages().getImageDescriptor(ISharedImages.IMG_ELCL_REMOVEALL));
+
+ actionGoto = new Action() {
+
+ @Override
+ public void run() {
+ ISelection selection = viewer.getSelection();
+ Object obj = ((IStructuredSelection)selection).getFirstElement();
+ if(obj instanceof IMarker) {
+ IMarker marker = (IMarker)obj;
+ boolean onlyNavigatoToActiveEditor = false;
+ IWorkbenchPage activePage = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
+ if(onlyNavigatoToActiveEditor) {
+ IEditorPart part = activePage.getActiveEditor();
+ if(part instanceof IGotoMarker) {
+ ((IGotoMarker)part).gotoMarker(marker);
+ }
+ } else {
+ try {
+ IDE.openEditor(activePage, marker, OpenStrategy.activateOnOpen());
+ } catch (PartInitException e) {
+
+ }
+ }
+ }
+ }
+ };
+ actionGoto.setText("Goto");
+ actionGoto.setToolTipText("Navigate to trace/breakpoint");
+ actionGoto.setImageDescriptor(TraceViewImages.getGotoObjID());
+ doubleClickAction = actionGoto;
+
+ actionTraceSelect = new Action() {
+
+ @Override
+ public void run() {
+ ISelection selection = viewer.getSelection();
+ Object obj = ((IStructuredSelection)selection).getFirstElement();
+ if(obj instanceof IMarker) {
+ // EditorPart part = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().openEditor(input, null);
+ IMarker marker = (IMarker)obj;
+ EObject eobj = MarkerUtils.getEObjectOfMarker(marker);
+ if(eobj instanceof Element) {
+ TraceActionSelection tad = new TraceActionSelection(new Shell(), (IMarker)obj, (Element)eobj);
+ tad.open();
+ if(tad.getReturnCode() == IDialogConstants.OK_ID) {
+ Object[] result = tad.getResult();
+ int traceAction = (Integer)result[0];
+ String traceMechanism = (String)result[1];
+ try {
+ marker.setAttribute(TracepointConstants.traceAction, traceAction);
+ marker.setAttribute(TracepointConstants.traceMechanism, traceMechanism);
+ } catch (CoreException e) {
+ }
+ }
+ }
+ }
+ }
+
+ };
+ actionTraceSelect.setText("trace action");
+ actionTraceSelect.setToolTipText("Select trace action");
+ actionTraceSelect.setImageDescriptor(PlatformUI.getWorkbench().getSharedImages().getImageDescriptor(ISharedImages.IMG_TOOL_NEW_WIZARD));
+ }
+
+ protected void hookDoubleClickAction() {
+ viewer.addDoubleClickListener(new IDoubleClickListener() {
+
+ public void doubleClick(DoubleClickEvent event) {
+ doubleClickAction.run();
+ }
+ });
+ }
+
+ /**
+ * Passing the focus request to the viewer's control.
+ */
+ @Override
+ public void setFocus() {
+ viewer.getControl().setFocus();
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.ui.ISelectionListener#selectionChanged(org.eclipse.ui.IWorkbenchPart,
+ * org.eclipse.jface.viewers.ISelection)
+ */
+ // TODO: function not used currently
+ public void selectionChanged(IWorkbenchPart part, ISelection selection) {
+
+ IStructuredSelection sSelection = null;
+ if(selection instanceof IStructuredSelection) {
+ sSelection = (IStructuredSelection)selection;
+ }
+
+ // exclude case of an empty selection which is not a Tree selection, since changing views provokes an
+ // empty selection (selection gets lost, although same element remains selected)
+ if((selection != null) && (sSelection != null) && sSelection.isEmpty()) {
+ return;
+ }
+ currentElement = null;
+
+ // No available selection: switch to default panel
+ if((sSelection == null) || (sSelection.size() != 1)) {
+ switchUI();
+ return;
+ }
+
+ // Retrieve selected object
+ Object currentObject = sSelection.getFirstElement();
+ // If the object is an edit part, try to get semantic bridge
+ if(currentObject instanceof GraphicalEditPart) {
+ GraphicalEditPart editPart = (GraphicalEditPart)currentObject;
+ if(editPart.getModel() instanceof View) {
+ View view = (View)editPart.getModel();
+ if(view.getElement() instanceof Element) {
+ currentObject = view.getElement();
+ }
+ }
+ } else if(currentObject instanceof IAdaptable) {
+ // modisco ModelElementItem supports IAdaptable (cleaner than cast / dependency with modisco)
+ currentObject = ((IAdaptable)currentObject).getAdapter(EObject.class);
+ }
+
+ if(currentObject instanceof Element) {
+ currentElement = (Element)currentObject;
+ // switchUI();
+ }
+ }
+
+ protected Element currentElement;
+}
--
cgit v1.2.3
About This Content
+
+License
+
+Model-Based Tracing of UML models in Papyrus
+
+1. Introduction
+2. Annotating Model elements
+Code produced for a trace
+annotation
+2.1
+Trace declaration
+3. Example
+About This Content
+
+License
+
+