Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJonathan GEOFFROY2014-08-04 09:53:36 +0000
committerJonathan GEOFFROY2014-08-04 09:53:36 +0000
commit7a18610908dee624ad3d13a38ce54884316d7ed5 (patch)
tree6a6de99ba3c31157dec52d1dcddaa5e21aec706a /extraplugins
parent04ca537a4f7f85fd2f86a2b7ca31d5ed1f89934d (diff)
downloadorg.eclipse.papyrus-7a18610908dee624ad3d13a38ce54884316d7ed5.tar.gz
org.eclipse.papyrus-7a18610908dee624ad3d13a38ce54884316d7ed5.tar.xz
org.eclipse.papyrus-7a18610908dee624ad3d13a38ce54884316d7ed5.zip
Bug 437904 - Papyrus should have a menu on Package Explorer to run the
reverse. Allow a new popup menu for reverse classes/interface, packages, source folder. Commands (button, popup menu) are disabled when the active editor is not a papyrus diagram. Change-Id: I4a3b7634fa80d650726cbc6d0a265303910d4d73 Signed-off-by: Jonathan GEOFFROY <geoffroy.jonathan@gmail.com>
Diffstat (limited to 'extraplugins')
-rw-r--r--extraplugins/java/org.eclipse.papyrus.java.reverse.ui/plugin.xml40
1 files changed, 40 insertions, 0 deletions
diff --git a/extraplugins/java/org.eclipse.papyrus.java.reverse.ui/plugin.xml b/extraplugins/java/org.eclipse.papyrus.java.reverse.ui/plugin.xml
index 533d193db0d..6e744e206e8 100644
--- a/extraplugins/java/org.eclipse.papyrus.java.reverse.ui/plugin.xml
+++ b/extraplugins/java/org.eclipse.papyrus.java.reverse.ui/plugin.xml
@@ -6,6 +6,14 @@
<handler
class="org.eclipse.papyrus.java.reverse.ui.ReverseCodeHandler"
commandId="org.eclipse.papyrus.java.reverse.ui.reverseCodeCommand">
+ <enabledWhen>
+ <with
+ variable="activeEditorId">
+ <equals
+ value="org.eclipse.papyrus.infra.core.papyrusEditor">
+ </equals>
+ </with>
+ </enabledWhen>
</handler>
<handler
class="org.eclipse.papyrus.java.reverse.ui.handlers.CreateAssociationFromPropertyHandler"
@@ -91,6 +99,38 @@
</command>
</menu>
</menuContribution>
+ <menuContribution
+ allPopups="false"
+ locationURI="popup:org.eclipse.ui.popup.any">
+ <menu
+ id="org.eclipse.papyrus.java.reverse.ui.javaMenu"
+ label="Java">
+ <command
+ commandId="org.eclipse.papyrus.java.reverse.ui.reverseCodeCommand"
+ style="push">
+ <visibleWhen
+ checkEnabled="false">
+ <with
+ variable="activeMenuSelection">
+ <iterate
+ ifEmpty="false"
+ operator="or">
+ <adapt
+ type="org.eclipse.jdt.core.IJavaElement">
+ <and>
+ <not>
+ <adapt
+ type="org.eclipse.jdt.core.IJavaProject">
+ </adapt>
+ </not>
+ </and>
+ </adapt>
+ </iterate>
+ </with>
+ </visibleWhen>
+ </command>
+ </menu>
+ </menuContribution>
</extension>
<extension
point="org.eclipse.ui.commands">

Back to the top