diff options
author | Alexander Kurtakov | 2010-08-31 11:26:48 +0000 |
---|---|---|
committer | Alexander Kurtakov | 2010-08-31 11:26:48 +0000 |
commit | 29b26c05c594be4255ede9fa9be6ed19bb249a30 (patch) | |
tree | 79e617e36bd58bb83f6bd736717aa68e1ecb62f9 /rpmstubby/org.eclipse.linuxtools.rpmstubby/plugin.xml | |
parent | fd4788ad3ec66834902b951228ddf1d817f6e77e (diff) | |
download | org.eclipse.linuxtools-29b26c05c594be4255ede9fa9be6ed19bb249a30.tar.gz org.eclipse.linuxtools-29b26c05c594be4255ede9fa9be6ed19bb249a30.tar.xz org.eclipse.linuxtools-29b26c05c594be4255ede9fa9be6ed19bb249a30.zip |
2010-08-31 Alexander Kurtakov <akurtako@redhat.com>
* META-INF/MANIFEST.MF: Move to using commands framework.
* plugin.xml: Likewise.
* src/org/eclipse/linuxtools/rpmstubby/popup/actions/StubifyAction.java: Make actions command handlers.
* src/org/eclipse/linuxtools/rpmstubby/popup/actions/StubifyFeatureAction.java (execute): Likewise.
* src/org/eclipse/linuxtools/rpmstubby/popup/actions/StubifyPomAction.java (execute): Likewise.
Diffstat (limited to 'rpmstubby/org.eclipse.linuxtools.rpmstubby/plugin.xml')
-rw-r--r-- | rpmstubby/org.eclipse.linuxtools.rpmstubby/plugin.xml | 108 |
1 files changed, 75 insertions, 33 deletions
diff --git a/rpmstubby/org.eclipse.linuxtools.rpmstubby/plugin.xml b/rpmstubby/org.eclipse.linuxtools.rpmstubby/plugin.xml index 4cd44647ce..d539287b88 100644 --- a/rpmstubby/org.eclipse.linuxtools.rpmstubby/plugin.xml +++ b/rpmstubby/org.eclipse.linuxtools.rpmstubby/plugin.xml @@ -11,38 +11,6 @@ <plugin> - <extension point="org.eclipse.ui.popupMenus"> - <objectContribution objectClass="org.eclipse.core.resources.IFile" - nameFilter="feature.xml" id="org.eclipse.linuxtools.rpmstubby.contribution1"> - <menu label="%menu.label" path="additions" - id="org.eclipse.linuxtools.rpmstubby.menu1" /> - <action label="%action.label" - class="org.eclipse.linuxtools.rpmstubby.popup.actions.StubifyFeatureAction" - menubarPath="org.eclipse.linuxtools.rpmstubby.menu1/group1" - enablesFor="+" id="org.eclipse.linuxtools.rpmstubby.newAction" /> - </objectContribution> - <objectContribution objectClass="org.eclipse.core.resources.IProject" - adaptable="true" id="org.eclipse.linuxtools.rpmstubby.contribution2"> - <menu label="%menu.label" path="additions" - id="org.eclipse.linuxtools.rpmstubby.menu1" /> - <action label="%action.label" - class="org.eclipse.linuxtools.rpmstubby.popup.actions.StubifyFeatureAction" - menubarPath="org.eclipse.linuxtools.rpmstubby.menu1/group1" - enablesFor="+" id="org.eclipse.linuxtools.rpmstubby.newAction" /> - <visibility> - <objectState name="projectNature" value="org.eclipse.pde.FeatureNature" /> - </visibility> - </objectContribution> - <objectContribution objectClass="org.eclipse.core.resources.IFile" - nameFilter="pom.xml" id="org.eclipse.linuxtools.rpmstubby.contribution3"> - <menu label="%menu.label" path="additions" - id="org.eclipse.linuxtools.rpmstubby.menu1" /> - <action label="%action.label" - class="org.eclipse.linuxtools.rpmstubby.popup.actions.StubifyPomAction" - menubarPath="org.eclipse.linuxtools.rpmstubby.menu1/group1" - enablesFor="+" id="org.eclipse.linuxtools.rpmstubby.newAction" /> - </objectContribution> - </extension> <extension point="org.eclipse.ui.preferencePages"> <page category="org.eclipse.linuxtools.rpm.ui.editor.mainpage" class="org.eclipse.linuxtools.rpmstubby.preferences.StubbyPreferencePage" @@ -54,5 +22,79 @@ class="org.eclipse.linuxtools.rpmstubby.preferences.PreferenceInitializer"> </initializer> </extension> - + <extension + point="org.eclipse.ui.commands"> + <category + name="RPMStubby Commands" + description="Commands for the RPM Stubby plugin" + id="rpmstubby.commands"> + </category> + + <command + categoryId="rpmstubby.commands" + id="rpmstubby.stubifyFeature" + description="%action.label" + name="%action.label"> + </command> + <command + categoryId="rpmstubby.commands" + id="rpmstubby.stubifyPom" + description="%action.label" + name="%action.label"> + </command> + + </extension> + <extension + point="org.eclipse.ui.handlers"> + <handler + class="org.eclipse.linuxtools.rpmstubby.popup.actions.StubifyFeatureAction" + commandId="rpmstubby.stubifyFeature"> + </handler> + <handler + class="org.eclipse.linuxtools.rpmstubby.popup.actions.StubifyPomAction" + commandId="rpmstubby.stubifyPom"> + </handler> + </extension> + <extension + point="org.eclipse.ui.menus"> + <menuContribution + locationURI="popup:org.eclipse.ui.popup.any?after=additions"> + <command + commandId="rpmstubby.stubifyFeature"> + <visibleWhen> + <or> + <with variable="selection"> + <iterate ifEmpty="false"> + <adapt type="org.eclipse.core.resources.IResource"> + <test property="org.eclipse.core.resources.name" + value="feature.xml"/> + </adapt> + </iterate> + </with> + <with variable="selection"> + <iterate ifEmpty="false"> + <adapt type="org.eclipse.core.resources.IResource"> + <test property="org.eclipse.core.resources.projectNature" + value="org.eclipse.pde.FeatureNature"/> + </adapt> + </iterate> + </with> + </or> + </visibleWhen> + </command> + <command + commandId="rpmstubby.stubifyPom"> + <visibleWhen> + <with variable="selection"> + <iterate ifEmpty="false"> + <adapt type="org.eclipse.core.resources.IResource"> + <test property="org.eclipse.core.resources.name" + value="pom.xml"/> + </adapt> + </iterate> + </with> + </visibleWhen> + </command> + </menuContribution> + </extension> </plugin> |