Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Kurtakov2017-05-19 08:46:42 -0400
committerAlexander Kurtakov2017-05-19 16:25:04 -0400
commitbf10b404d3e38a1d3fefbc7ae17f088cfc23d1aa (patch)
tree8ea9abaa054835a7911b06d9edbaaff8a5295840
parent55f534ecea8b8147248e38e7be911043b7886dc1 (diff)
downloadorg.eclipse.linuxtools-bf10b404d3e38a1d3fefbc7ae17f088cfc23d1aa.tar.gz
org.eclipse.linuxtools-bf10b404d3e38a1d3fefbc7ae17f088cfc23d1aa.tar.xz
org.eclipse.linuxtools-bf10b404d3e38a1d3fefbc7ae17f088cfc23d1aa.zip
systemtap: Bind Run script command to editor content type.
Make it work so launch command appear for generic editor. Change-Id: I4e19a850ce88250dad995e0afd2ad2356479758d Signed-off-by: Alexander Kurtakov <akurtako@redhat.com> Reviewed-on: https://git.eclipse.org/r/97562 Tested-by: Hudson CI
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/plugin.xml46
1 files changed, 10 insertions, 36 deletions
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/plugin.xml b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/plugin.xml
index f12f067d2e..a7aa854107 100644
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/plugin.xml
+++ b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/plugin.xml
@@ -456,12 +456,11 @@
class="org.eclipse.linuxtools.internal.systemtap.ui.ide.handlers.RunScriptHandler"
commandId="org.eclipse.linuxtools.systemtap.ui.ide.RunScriptCommand">
<activeWhen>
- <with
- variable="activeEditor">
- <instanceof
- value="org.eclipse.linuxtools.internal.systemtap.ui.ide.editors.stp.STPEditor">
- </instanceof>
- </with>
+ <with variable="activeEditorInput">
+ <adapt type="org.eclipse.core.resources.IFile">
+ <test property="org.eclipse.core.resources.contentTypeId" value="org.eclipse.linuxtools.stap.content-type" />
+ </adapt>
+ </with>
</activeWhen>
</handler>
<handler
@@ -558,36 +557,11 @@
modes="run">
<contextualLaunch>
<enablement>
- <with
- variable="selection">
- <count
- value="1">
- </count>
- <iterate>
- <or>
- <and>
- <instanceof
- value="org.eclipse.core.resources.IResource">
- </instanceof>
- <test
- property="org.eclipse.core.resources.name"
- value="*.stp">
- </test>
- </and>
- <and>
- <instanceof
- value="org.eclipse.ui.IPathEditorInput">
- </instanceof>
- <with
- variable="activeEditorId">
- <equals
- value="org.eclipse.linuxtools.internal.systemtap.ui.ide.editors.stp.STPEditor">
- </equals>
- </with>
- </and>
- </or>
- </iterate>
- </with>
+ <with variable="activeEditorInput">
+ <adapt type="org.eclipse.core.resources.IFile">
+ <test property="org.eclipse.core.resources.contentTypeId" value="org.eclipse.linuxtools.stap.content-type" />
+ </adapt>
+ </with>
</enablement>
</contextualLaunch>
</shortcut>

Back to the top