summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrew Ferrazzutti2014-05-06 18:04:06 (EDT)
committerJeff Johnston2014-05-08 18:18:57 (EDT)
commitfdfa6fe4b88a15fd83418b958d647dd4ec9d80d9 (patch)
tree8b9598e5487e1c8459efb6483af45e87f8511953
parent80ea8de8d4129b843886faf3036eb49bd03b0f77 (diff)
downloadorg.eclipse.cdt-fdfa6fe4b88a15fd83418b958d647dd4ec9d80d9.zip
org.eclipse.cdt-fdfa6fe4b88a15fd83418b958d647dd4ec9d80d9.tar.gz
org.eclipse.cdt-fdfa6fe4b88a15fd83418b958d647dd4ec9d80d9.tar.xz
Bug 433014 - Autotools UI plugin is using deprecated extensionsrefs/changes/34/26134/4
Replace usage of popupMenus with command/handler/menu framework. Change-Id: I89b4bc611572fafbf63e27b68573f105da4d2698 Signed-off-by: Andrew Ferrazzutti <aferrazz@redhat.com> Reviewed-on: https://git.eclipse.org/r/26134 Tested-by: Hudson CI Reviewed-by: Jeff Johnston <jjohnstn@redhat.com> Tested-by: Jeff Johnston <jjohnstn@redhat.com>
-rw-r--r--build/org.eclipse.cdt.autotools.ui/plugin.xml532
1 files changed, 110 insertions, 422 deletions
diff --git a/build/org.eclipse.cdt.autotools.ui/plugin.xml b/build/org.eclipse.cdt.autotools.ui/plugin.xml
index ded42d6..fe9a7c9 100644
--- a/build/org.eclipse.cdt.autotools.ui/plugin.xml
+++ b/build/org.eclipse.cdt.autotools.ui/plugin.xml
@@ -18,123 +18,6 @@
<selection class="org.eclipse.core.resources.IProject"/>
</wizard>
</extension>
- <!--
- <extension
- point="org.eclipse.ui.navigator.navigatorContent">
- <commonWizard
- associatedExtensionId="org.eclipse.cdt.ui.navigator.content"
- menuGroupId="org.eclipse.cdt.ui.newProject"
- type="new"
- wizardId="org.eclipse.linuxtools.cdt.autotools.ui.wizards.conversionWizard">
- <enablement>
- <and>
- <adapt type="org.eclipse.core.resources.IProject" />
- <not>
- <adapt type="org.eclipse.core.resources.IProject" >
- <test
- property="org.eclipse.core.resources.projectNature"
- value="org.eclipse.cdt.autotools.core.autotoolsNatureV2"/>
- </adapt>
- </not>
- </and>
- </enablement>
- </commonWizard>
- </extension>
- <extension
- point="org.eclipse.ui.navigator.viewer">
- <viewerContentBinding viewerId="org.eclipse.ui.navigator.ProjectExplorer">
- <includes>
- <contentExtension pattern="org.eclipse.linuxtools.cdt.autotools.ui.wizards.*"/>
- </includes>
- </viewerContentBinding>
- </extension>
- -->
- <extension
- point="org.eclipse.ui.menus">
- <menuContribution
- locationURI="popup:org.eclipse.ui.popup.any?before=additions">
- <separator
- name="autotoolsGroup"
- visible="true">
- </separator>
- </menuContribution>
- </extension>
- <extension
- id="org.eclipse.cdt.autotools.ui.popup1"
- point="org.eclipse.ui.popupMenus">
- <objectContribution
- objectClass="org.eclipse.core.resources.IResource"
- adaptable="true"
- id="org.eclipse.cdt.autotools.ui.popupMenu.NavigatorContribution">
- <action
- class="org.eclipse.cdt.internal.autotools.ui.actions.InvokeLibtoolizeAction"
- enablesFor="1"
- id="org.eclipse.cdt.autotools.ui.action.libtoolize1"
- label="%InvokeLibtoolize.label"
- menubarPath="org.eclipse.cdt.autotools.ui.invokeAutotools1/gm1">
- </action>
- <action
- class="org.eclipse.cdt.internal.autotools.ui.actions.InvokeAutoheaderAction"
- enablesFor="1"
- id="org.eclipse.cdt.autotools.ui.action.autoheader1"
- label="%InvokeAutoheader.label"
- menubarPath="org.eclipse.cdt.autotools.ui.invokeAutotools1/gm1">
- </action>
- <action
- class="org.eclipse.cdt.internal.autotools.ui.actions.InvokeAutoreconfAction"
- enablesFor="1"
- id="org.eclipse.cdt.autotools.ui.action.autoreconf1"
- label="%InvokeAutoreconf.label"
- menubarPath="org.eclipse.cdt.autotools.ui.invokeAutotools1/gm1">
- </action>
- <action
- class="org.eclipse.cdt.internal.autotools.ui.actions.InvokeAutomakeAction"
- enablesFor="1"
- id="org.eclipse.cdt.autotools.ui.action.automake1"
- label="%InvokeAutomake.label"
- menubarPath="org.eclipse.cdt.autotools.ui.invokeAutotools1/gm1">
- </action>
- <action
- class="org.eclipse.cdt.internal.autotools.ui.actions.InvokeAutoconfAction"
- enablesFor="1"
- id="org.eclipse.cdt.autotools.ui.action.autoconf1"
- label="%InvokeAutoconf.label"
- menubarPath="org.eclipse.cdt.autotools.ui.invokeAutotools1/gm1">
- </action>
- <action
- class="org.eclipse.cdt.internal.autotools.ui.actions.InvokeAclocalAction"
- enablesFor="1"
- id="org.eclipse.cdt.autotools.ui.action.aclocal1"
- label="%InvokeAclocal.label"
- menubarPath="org.eclipse.cdt.autotools.ui.invokeAutotools1/gm1">
- </action>
- <menu
- id="org.eclipse.cdt.autotools.ui.invokeAutotools1"
- label="%InvokeAutotools.label"
- path="autotoolsGroup">
- <groupMarker
- name="gm1">
- </groupMarker>
- </menu>
- <action
- class="org.eclipse.cdt.internal.autotools.ui.actions.ReconfigureAction"
- definitionId="org.eclipse.cdt.autotools.ui.command.reconfigure"
- id="org.eclipse.cdt.autotools.ui.action.autoreconf1"
- label="%Reconfigure.label"
- menubarPath="autotoolsGroup">
- </action>
- <visibility>
- <or>
- <objectState
- name="projectNature"
- value="org.eclipse.cdt.autotools.core.autotoolsNatureV2"/>
- <objectState
- name="projectNature"
- value="org.eclipse.linuxtools.cdt.autotools.core.autotoolsNatureV2"/>
- </or>
- </visibility>
- </objectContribution>
- </extension>
<extension
point="org.eclipse.cdt.core.CBuildConsole">
<CBuildConsole
@@ -151,12 +34,12 @@
</extension>
<extension point="org.eclipse.core.contenttype.contentTypes">
<!-- declares a content type for automake files -->
- <content-type id="org.eclipse.cdt.autotools.ui.automake" name="%Automake.name"
+ <content-type id="org.eclipse.cdt.autotools.ui.automake" name="%Automake.name"
base-type="org.eclipse.core.runtime.text"
priority="high"/>
</extension>
- <extension point="org.eclipse.core.contenttype.contentTypes">
- <file-association
+ <extension point="org.eclipse.core.contenttype.contentTypes">
+ <file-association
content-type="org.eclipse.cdt.autotools.ui.automake"
file-names="Makefile.am"
file-extensions="am"/>
@@ -293,8 +176,7 @@
<page
class="org.eclipse.cdt.internal.autotools.ui.properties.AutotoolsHeadPropertyPage"
id="org.eclipse.cdt.autotools.ui.propertypage"
- name="%PropertyAutotools.name"
- >
+ name="%PropertyAutotools.name">
<filter
name="projectNature"
value="org.eclipse.cdt.autotools.core.autotoolsNatureV2">
@@ -303,13 +185,13 @@
<or>
<instanceof value="org.eclipse.core.resources.IProject"/>
<instanceof value="org.eclipse.cdt.core.model.ICProject"/>
-
+
<instanceof value="org.eclipse.core.resources.IFolder"/>
<instanceof value="org.eclipse.cdt.core.model.ICContainer"/>
<instanceof value="org.eclipse.cdt.core.model.ITranslationUnit"/>
<instanceof value="org.eclipse.core.resources.IFile"/>
- </or>
+ </or>
</enabledWhen>
</page>
<page
@@ -325,13 +207,13 @@
<or>
<instanceof value="org.eclipse.core.resources.IProject"/>
<instanceof value="org.eclipse.cdt.core.model.ICProject"/>
-
+
<instanceof value="org.eclipse.core.resources.IFolder"/>
<instanceof value="org.eclipse.cdt.core.model.ICContainer"/>
<instanceof value="org.eclipse.cdt.core.model.ITranslationUnit"/>
<instanceof value="org.eclipse.core.resources.IFile"/>
- </or>
+ </or>
</enabledWhen>
</page>
<page
@@ -347,7 +229,7 @@
<or>
<instanceof value="org.eclipse.core.resources.IProject"/>
<instanceof value="org.eclipse.cdt.core.model.ICProject"/>
- </or>
+ </or>
</enabledWhen>
</page>
<page
@@ -363,7 +245,7 @@
<or>
<instanceof value="org.eclipse.core.resources.IProject"/>
<instanceof value="org.eclipse.cdt.core.model.ICProject"/>
-
+
<instanceof value="org.eclipse.core.resources.IFolder"/>
<instanceof value="org.eclipse.cdt.core.model.ICContainer"/>
@@ -385,7 +267,7 @@
<or>
<instanceof value="org.eclipse.core.resources.IProject"/>
<instanceof value="org.eclipse.cdt.core.model.ICProject"/>
-
+
<instanceof value="org.eclipse.core.resources.IFolder"/>
<instanceof value="org.eclipse.cdt.core.model.ICContainer"/>
@@ -411,116 +293,80 @@
</enabledWhen>
</page>
</extension>
- <!-- <extension
+ <extension
point="org.eclipse.ui.menus">
<menuContribution
- locationURI="menu:project?after=additions">
- <menu
- id="invokeAutotools"
- label="%InvokeAutotools.label"
- mnemonic="%InvokeAutotools.mnemonic">
- <visibleWhen
- checkEnabled="false">
- <and>
- <count
- value="1">
- </count>
- <iterate
- ifEmpty="false"
- operator="and">
- <adapt
- type="org.eclipse.core.resources.IResource">
- <test
- property="org.eclipse.core.resources.projectNature"
- value="org.eclipse.linuxtools.cdt.autotools.core.autotoolsNatureV2">
- </test>
- </adapt>
- </iterate>
- </and>
- </visibleWhen>
- </menu>
+ locationURI="popup:org.eclipse.ui.popup.any?before=additions">
+ <separator
+ name="autotoolsGroup"
+ visible="true">
+ </separator>
</menuContribution>
- </extension>
- <extension
- point="org.eclipse.ui.menus">
<menuContribution
- locationURI="menu:project?after=additions">
+ locationURI="popup:org.eclipse.ui.popup.any?after=autotoolsGroup">
<command
commandId="org.eclipse.cdt.autotools.ui.command.reconfigure"
- id="reconfigure"
+ id="autotools"
label="%Reconfigure.label"
mnemonic="%Reconfigure.mnemonic"
style="push">
- <visibleWhen
- checkEnabled="false">
- <and>
- <count
- value="1">
- </count>
- <iterate
- ifEmpty="false"
- operator="and">
- <adapt
- type="org.eclipse.core.resources.IResource">
- <test
- property="org.eclipse.core.resources.projectNature"
- value="org.eclipse.linuxtools.cdt.autotools.core.autotoolsNatureV2">
- </test>
- </adapt>
- </iterate>
- </and>
- </visibleWhen>
- </command>
- </menuContribution>
- </extension>
- <extension
- point="org.eclipse.ui.menus">
- <menuContribution
- locationURI="menu:invokeAutotools">
- <command
- commandId="org.eclipse.cdt.autotools.ui.command.autoconf"
- id="autoconf"
- label="%InvokeAutoconf.label"
- mnemonic="%InvokeAutoconf.mnemonic"
- style="push">
- </command>
- <command
- commandId="org.eclipse.cdt.autotools.ui.command.autoheader"
- id="autoheader"
- label="%InvokeAutoheader.label"
- mnemonic="%InvokeAutoheader.mnemonic"
- style="push">
- </command>
- <command
- commandId="org.eclipse.cdt.autotools.ui.command.automake"
- id="automake"
- label="%InvokeAutomake.label"
- mnemonic="%InvokeAutomake.mnemonic"
- style="push">
- </command>
- <command
- commandId="org.eclipse.cdt.autotools.ui.command.autoreconf"
- id="autoreconf"
- label="%InvokeAutoreconf.label"
- mnemonic="%InvokeAutoreconf.mnemonic"
- style="push">
- </command>
- <command
- commandId="org.eclipse.cdt.autotools.ui.command.aclocal"
- id="aclocal"
- label="%InvokeAclocal.label"
- mnemonic="%InvokeAclocal.mnemonic"
- style="push">
- </command>
- <command
- commandId="org.eclipse.cdt.autotools.ui.command.libtoolize"
- id="libtoolize"
- label="%InvokeLibtoolize.label"
- mnemonic="%InvokeLibtoolize.mnemonic"
- style="push">
+ <visibleWhen checkEnabled="true"/>
</command>
+ <menu
+ id="autotools"
+ label="%InvokeAutotools.label"
+ mnemonic="%InvokeAutotools.mnemonic">
+ <command
+ commandId="org.eclipse.cdt.autotools.ui.command.autoconf"
+ id="autoconf"
+ label="%InvokeAutoconf.label"
+ mnemonic="%InvokeAutoconf.mnemonic"
+ style="push">
+ <visibleWhen checkEnabled="true"/>
+ </command>
+ <command
+ commandId="org.eclipse.cdt.autotools.ui.command.autoheader"
+ id="autoheader"
+ label="%InvokeAutoheader.label"
+ mnemonic="%InvokeAutoheader.mnemonic"
+ style="push">
+ <visibleWhen checkEnabled="true"/>
+ </command>
+ <command
+ commandId="org.eclipse.cdt.autotools.ui.command.automake"
+ id="automake"
+ label="%InvokeAutomake.label"
+ mnemonic="%InvokeAutomake.mnemonic"
+ style="push">
+ <visibleWhen checkEnabled="true"/>
+ </command>
+ <command
+ commandId="org.eclipse.cdt.autotools.ui.command.autoreconf"
+ id="autoreconf"
+ label="%InvokeAutoreconf.label"
+ mnemonic="%InvokeAutoreconf.mnemonic"
+ style="push">
+ <visibleWhen checkEnabled="true"/>
+ </command>
+ <command
+ commandId="org.eclipse.cdt.autotools.ui.command.aclocal"
+ id="aclocal"
+ label="%InvokeAclocal.label"
+ mnemonic="%InvokeAclocal.mnemonic"
+ style="push">
+ <visibleWhen checkEnabled="true"/>
+ </command>
+ <command
+ commandId="org.eclipse.cdt.autotools.ui.command.libtoolize"
+ id="libtoolize"
+ label="%InvokeLibtoolize.label"
+ mnemonic="%InvokeLibtoolize.mnemonic"
+ style="push">
+ <visibleWhen checkEnabled="true"/>
+ </command>
+ </menu>
</menuContribution>
- </extension> -->
+ </extension>
<extension
id="org.eclipse.cdt.autotools.ui.commands"
name="Autoconf"
@@ -577,237 +423,50 @@
<handler
class="org.eclipse.cdt.internal.autotools.ui.actions.AutoconfHandler"
commandId="org.eclipse.cdt.autotools.ui.command.autoconf">
- <activeWhen>
- <with
- variable="selection">
- <count
- value="1">
- </count>
- <iterate
- operator="and">
- <adapt
- type="org.eclipse.core.resources.IResource">
- </adapt>
- </iterate>
- </with>
- </activeWhen>
<enabledWhen>
- <with
- variable="selection">
- <count
- value="1">
- </count>
- <iterate
- operator="and">
- <adapt
- type="org.eclipse.core.resources.IResource">
- </adapt>
- </iterate>
- </with>
+ <reference definitionId="org.eclipse.cdt.autotools.ui.handlerEnablement"/>
</enabledWhen>
</handler>
<handler
class="org.eclipse.cdt.internal.autotools.ui.actions.AutoheaderHandler"
commandId="org.eclipse.cdt.autotools.ui.command.autoheader">
- <activeWhen>
- <with
- variable="selection">
- <count
- value="1">
- </count>
- <iterate
- ifEmpty="false"
- operator="and">
- <adapt
- type="org.eclipse.core.resources.IResource">
- </adapt>
- </iterate>
- </with>
- </activeWhen>
<enabledWhen>
- <with
- variable="selection">
- <count
- value="1">
- </count>
- <iterate
- ifEmpty="false"
- operator="and">
- <adapt
- type="org.eclipse.core.resources.IResource">
- </adapt>
- </iterate>
- </with>
+ <reference definitionId="org.eclipse.cdt.autotools.ui.handlerEnablement"/>
</enabledWhen>
</handler>
<handler
class="org.eclipse.cdt.internal.autotools.ui.actions.AutomakeHandler"
commandId="org.eclipse.cdt.autotools.ui.command.automake">
- <activeWhen>
- <with
- variable="selection">
- <count
- value="1">
- </count>
- <iterate
- ifEmpty="false"
- operator="and">
- <adapt
- type="org.eclipse.core.resources.IResource">
- </adapt>
- </iterate>
- </with>
- </activeWhen>
<enabledWhen>
- <with
- variable="selection">
- <count
- value="1">
- </count>
- <iterate
- ifEmpty="false"
- operator="and">
- <adapt
- type="org.eclipse.core.resources.IResource">
- </adapt>
- </iterate>
- </with>
+ <reference definitionId="org.eclipse.cdt.autotools.ui.handlerEnablement"/>
</enabledWhen>
</handler>
<handler
class="org.eclipse.cdt.internal.autotools.ui.actions.AutoreconfHandler"
commandId="org.eclipse.cdt.autotools.ui.command.autoreconf">
- <activeWhen>
- <with
- variable="selection">
- <count
- value="1">
- </count>
- <iterate
- ifEmpty="false"
- operator="and">
- <adapt
- type="org.eclipse.core.resources.IResource">
- </adapt>
- </iterate>
- </with>
- </activeWhen>
<enabledWhen>
- <with
- variable="selection">
- <count
- value="1">
- </count>
- <iterate
- ifEmpty="false"
- operator="and">
- <adapt
- type="org.eclipse.core.resources.IResource">
- </adapt>
- </iterate>
- </with>
+ <reference definitionId="org.eclipse.cdt.autotools.ui.handlerEnablement"/>
</enabledWhen>
</handler>
<handler
class="org.eclipse.cdt.internal.autotools.ui.actions.AclocalHandler"
commandId="org.eclipse.cdt.autotools.ui.command.aclocal">
- <activeWhen>
- <with
- variable="selection">
- <count
- value="1">
- </count>
- <iterate
- ifEmpty="false"
- operator="and">
- <adapt
- type="org.eclipse.core.resources.IResource">
- </adapt>
- </iterate>
- </with>
- </activeWhen>
<enabledWhen>
- <with
- variable="selection">
- <count
- value="1">
- </count>
- <iterate
- ifEmpty="false"
- operator="and">
- <adapt
- type="org.eclipse.core.resources.IResource">
- </adapt>
- </iterate>
- </with>
+ <reference definitionId="org.eclipse.cdt.autotools.ui.handlerEnablement"/>
</enabledWhen>
</handler>
<handler
class="org.eclipse.cdt.internal.autotools.ui.actions.LibtoolizeHandler"
commandId="org.eclipse.cdt.autotools.ui.command.libtoolize">
- <activeWhen>
- <with
- variable="selection">
- <count
- value="1">
- </count>
- <iterate
- ifEmpty="false"
- operator="and">
- <adapt
- type="org.eclipse.core.resources.IResource">
- </adapt>
- </iterate>
- </with>
- </activeWhen>
<enabledWhen>
- <with
- variable="selection">
- <count
- value="1">
- </count>
- <iterate
- ifEmpty="false"
- operator="and">
- <adapt
- type="org.eclipse.core.resources.IResource">
- </adapt>
- </iterate>
- </with>
+ <reference definitionId="org.eclipse.cdt.autotools.ui.handlerEnablement"/>
</enabledWhen>
</handler>
<handler
class="org.eclipse.cdt.internal.autotools.ui.actions.ReconfigureHandler"
commandId="org.eclipse.cdt.autotools.ui.command.reconfigure">
- <activeWhen>
- <with
- variable="selection">
- <count
- value="1">
- </count>
- <iterate
- ifEmpty="false"
- operator="and">
- <adapt
- type="org.eclipse.core.resources.IResource">
- </adapt>
- </iterate>
- </with>
- </activeWhen>
<enabledWhen>
- <with
- variable="selection">
- <count
- value="1">
- </count>
- <iterate
- ifEmpty="false"
- operator="and">
- <adapt
- type="org.eclipse.core.resources.IResource">
- </adapt>
- </iterate>
- </with>
+ <reference definitionId="org.eclipse.cdt.autotools.ui.handlerEnablement"/>
</enabledWhen>
</handler>
</extension>
@@ -843,4 +502,33 @@
name="%Autotools.wizard.name">
</wizard>
</extension>
+ <extension
+ point="org.eclipse.core.expressions.definitions">
+ <definition
+ id="org.eclipse.cdt.autotools.ui.handlerEnablement">
+ <with
+ variable="selection">
+ <count
+ value="1">
+ </count>
+ <iterate
+ ifEmpty="false"
+ operator="and">
+ <adapt
+ type="org.eclipse.core.resources.IResource">
+ <or>
+ <test
+ property="org.eclipse.core.resources.projectNature"
+ value="org.eclipse.cdt.autotools.core.autotoolsNatureV2">
+ </test>
+ <test
+ property="org.eclipse.core.resources.projectNature"
+ value="org.eclipse.linuxtools.cdt.autotools.core.autotoolsNatureV2">
+ </test>
+ </or>
+ </adapt>
+ </iterate>
+ </with>
+ </definition>
+ </extension>
</plugin>