Contributing Refactorings

TODO org.eclipse.rephraserengine.ui.refactoring.refactorings extension point

Examples

  <extension
        point="org.eclipse.rephraserengine.ui.refactoring.refactorings">
 
     <!-- The resource filter determines what must be selected for these refactorings to be visible -->
     <resourceFilter class="org.eclipse.rephraserengine.examples.text.TextFileResourceFilter" />
 
     <!-- Each group defines a new (separated) section in the Refactor menu -->
     <group>
 
        <!-- A resource refactoring which uses an auto-generated user interface -->
        <resourceRefactoring
           class="org.eclipse.rephraserengine.examples.text.ConvertTabsToSpacesRefactoring" />
 
        <!-- An editor refactoring which uses an auto-generated user interface -->
        <editorRefactoring
            class="org.eclipse.photran.internal.core.refactoring.MakePrivateEntityPublicRefactoring" />
 
        <!-- Same as previous, except the given label ("Increase Visibility") will appear in the menu;
             when the label attribute is absent, the label will be whatever is returned by the refactoring&apos;s
             #getName method -->
        <editorRefactoring
            label="Increase Visibility"
            class="org.eclipse.photran.internal.core.refactoring.MakePrivateEntityPublicRefactoring" />
 
        <!-- An editor refactoring which uses a custom user interface -->
        <editorRefactoring
            class="org.eclipse.photran.internal.core.refactoring.AddOnlyToUseStmtRefactoring"
            inputPage="org.eclipse.photran.internal.refactoring.ui.AddOnlyToUseStmtInputPage" />
 
        <!-- A command which is contributed as an editor refactoring -->
        <!-- Note that this is the only way to give a refactoring a key binding -->
        <editorRefactoring command="org.eclipse.photran.ui.RenameRefactoringCommand" />
 
        <!-- An editor refactoring which only appears in the menu when the
             PHOTRAN_INCLUDE_TEST_REFACTORINGS environment variable is set to a non-null value -->
        <editorRefactoring
            require_env="PHOTRAN_INCLUDE_TEST_REFACTORINGS"
            class="org.eclipse.photran.internal.core.refactoring.AddEmptySubprogramRefactoring" />
 
     </group>
  </extension>