summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJonathan GEOFFROY2014-08-04 05:53:36 (EDT)
committerJonathan GEOFFROY2014-08-04 05:53:36 (EDT)
commit7a18610908dee624ad3d13a38ce54884316d7ed5 (patch)
tree6a6de99ba3c31157dec52d1dcddaa5e21aec706a
parent04ca537a4f7f85fd2f86a2b7ca31d5ed1f89934d (diff)
downloadorg.eclipse.papyrus-7a18610908dee624ad3d13a38ce54884316d7ed5.zip
org.eclipse.papyrus-7a18610908dee624ad3d13a38ce54884316d7ed5.tar.gz
org.eclipse.papyrus-7a18610908dee624ad3d13a38ce54884316d7ed5.tar.bz2
Bug 437904 - Papyrus should have a menu on Package Explorer to run therefs/changes/95/29095/5
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>
-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 533d193..6e744e2 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">