AI 144940: ADT #1722971: Fix refactoring menu contribution for Eclipse 3.3/3.4 on Linux/Mac.

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.
  BUG=1722971

Automated import of CL 144940
This commit is contained in:
Raphael Moll
2009-04-07 16:30:57 -07:00
committed by The Android Open Source Project
parent 6778fc22a4
commit 7bfaaa8c46

View File

@@ -245,6 +245,7 @@
label="Fix Project Properties"
menubarPath="com.android.ide.eclipse.adt.AndroidTools/group3"/>
</objectContribution>
</extension>
<extension
point="org.eclipse.ui.preferencePages">
@@ -497,15 +498,45 @@
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