OSDN Git Service

AI 145170: am: CL 145099 am: CL 144940 ADT #1722971: Fix refactoring menu contributio...
authorRaphael Moll <>
Thu, 9 Apr 2009 02:07:04 +0000 (19:07 -0700)
committerThe Android Open Source Project <initial-contribution@android.com>
Thu, 9 Apr 2009 02:07:04 +0000 (19:07 -0700)
  The fix is that a menu contribution should redefine the menu that it is
  contributing too. In this case it seems the JDT is not yet loaded or at
  least hasn't defined the menu that we're contributing too, so we need to
  define it. This definition is extracted from the jdt.ui/plugin.xml from
  3.4 in order to define the same group names in the same order.
  Original author: raphael
  Merged from: //branches/cupcake/...
  Original author: android-build

Automated import of CL 145170

eclipse/plugins/com.android.ide.eclipse.adt/plugin.xml

index 35ceba7..6022a20 100644 (file)
                label="Fix Project Properties"
                menubarPath="com.android.ide.eclipse.adt.AndroidTools/group3"/>
       </objectContribution>
+
    </extension>
    <extension
          point="org.eclipse.ui.preferencePages">
             id="adt.actionSet.refactorings"
             label="Android Refactorings"
             visible="true">
+         <!-- This duplicates the Refactoring Menu definition from the jdt.ui plugin.xml,
+              which allows us to insert our contribution even if the JDT is not loaded. 
+              We overload the definition with our new group.-->
+         <menu
+               label="Refactor"
+               path="edit"
+               id="org.eclipse.jdt.ui.refactoring.menu">
+            <separator name="undoRedoGroup"/>
+            <separator name="reorgGroup"/>
+            <separator name="androidGroup"/>
+            <separator name="codingGroup"/>
+            <separator name="reorgGroup2"/>
+            <separator name="typeGroup"/>
+            <separator name="typeGroup2"/>
+            <separator name="codingGroup2"/>
+            <separator name="typeGroup3"/>
+            <separator name="scriptGroup"/>
+         </menu>
+
+         <menu 
+               label="Android" 
+               path="org.eclipse.jdt.ui.refactoring.menu/androidGroup" 
+               id="com.android.ide.eclipse.adt.refactoring.menu"> 
+              <separator name="android"/> 
+         </menu> 
          <action
                class="com.android.ide.eclipse.adt.refactorings.extractstring.ExtractStringAction"
                definitionId="com.android.ide.eclipse.adt.refactoring.extract.string"
                id="com.android.ide.eclipse.adt.actions.ExtractString"
                label="Extract Android String..."
-               menubarPath="org.eclipse.jdt.ui.refactoring.menu/codingGroup"
+               menubarPath="org.eclipse.jdt.ui.refactoring.menu/com.android.ide.eclipse.adt.refactoring.menu/android"
                style="push"
                tooltip="Extracts a string into Android resource string">
          </action>
+         <menu
+               id="org.eclipse.jdt.ui.refactoring.menu"
+               label="Refactor">
+         </menu>
       </actionSet>
    </extension>
    <extension