]> git.uio.no Git - ifi-stolz-refaktor.git/blobdiff - software/no.uio.ifi.refaktor/plugin.xml
Some talks, mostly identical.
[ifi-stolz-refaktor.git] / software / no.uio.ifi.refaktor / plugin.xml
index 81b0d56bffb15d4a94549f78574cd1d6554012f9..5c902893c92bf8352a2f13105fd8951feade2801 100644 (file)
@@ -9,27 +9,33 @@
             id="no.uio.ifi.refaktor.commands.category">
       </category>
       <command
-            name="Test Refactoring"
-            categoryId="no.uio.ifi.refaktor.commands.category"
-            id="no.uio.ifi.refaktor.commands.testRefactoring">
+            id="no.uio.ifi.refaktor.commands.extractAndMoveMethod"
+            name="1 Extract and move method">
       </command>
       <command
-            categoryId="no.uio.ifi.refaktor.commands.category"
-            id="no.uio.ifi.refaktor.commands.saferRefactoring"
-            name="Safer Refactoring">
+            id="no.uio.ifi.refaktor.commands.projectWideSearchBasedExtractAndMoveMethodChanger"
+            name="2 Execute Search Based Extract And Move Method">
       </command>
       <command
-            id="no.uio.ifi.refaktor.commands.textSelectionInformation"
-            name="Text Selection Information">
+            id="no.uio.ifi.refaktor.commands.searchBasedExtractAndMoveMethodChanger"
+            name="3 Execute Search Based Extract And Move Method">
       </command>
       <command
-            id="no.uio.ifi.refaktor.commands.testPropertyExtractor"
-            name="Test Property Extractor">
+            id="no.uio.ifi.refaktor.commands.compilationUnitWideSearchBasedExtractAndMoveMethodChanger"
+            name="4 Compilation Unit Wide Search Based Extract And Move Method Change">
       </command>
+         <command
+            id="no.uio.ifi.refaktor.commands.packageWideSearchBasedExtractAndMoveMethodChanger"
+            name="Search Based Extract And Move Method Change">
+      </command> 
       <command
-            id="no.uio.ifi.refaktor.commands.extractAndMoveMethod"
-            name="Extract and move method">
+            id="no.uio.ifi.refaktor.commands.searchBasedExtractLocalVariableWithAssertsChanger"
+            name="5 Extract Local Variable">
       </command>
+      <command
+               id="no.uio.ifi.refaktor.extractLocalVariableWithAsserts"
+               name="6 Extract Local Variable">
+         </command>
    </extension>
    <extension
          point="org.eclipse.ui.handlers">
             class="no.uio.ifi.refaktor.handlers.TestRefactoringHandler">
       </handler>
       <handler
-            class="no.uio.ifi.refaktor.handlers.SaferRefactoringHandler"
-            commandId="no.uio.ifi.refaktor.commands.saferRefactoring">
+               commandId="no.uio.ifi.refaktor.extractLocalVariableWithAsserts"
+               class="no.uio.ifi.refaktor.handlers.entrypoints.ExtractLocalVariableWithAssertsHandler">
+             <enabledWhen>
+                   <with
+                         variable="selection">
+                      <instanceof
+                            value="org.eclipse.jface.text.TextSelection">
+                      </instanceof>
+                   </with>
+                </enabledWhen>
+         </handler>
+      <!--handler
+            class="no.uio.ifi.refaktor.handlers.ExtractAndMoveMethodHandler"
+            commandId="no.uio.ifi.refaktor.commands.extractAndMoveMethod">
+      </handler-->
+      <!--handler
+            class="no.uio.ifi.refaktor.handlers.TreeSelectionInfoHandler"
+            commandId="no.uio.ifi.refaktor.commands.treeSelectionInfo">
+      </handler-->
+      <!--handler
+            class="no.uio.ifi.refaktor.handlers.SearchBasedExtractAndMoveMethodAnalysisHandler"
+            commandId="no.uio.ifi.refaktor.commands.searchBasedExtractAndMoveMethodAnalysis">
+      </handler-->
+      <!--handler
+            class="no.uio.ifi.refaktor.handlers.TypeWideSearchBasedExtractAndMoveMethodAnalysisHandler"
+            commandId="no.uio.ifi.refaktor.commands.typeWideSearchBasedExtractAndMoveMethodAnalysis">
+      </handler-->
+      <!--handler
+            class="no.uio.ifi.refaktor.handlers.CompilationUnitWideSearchBasedExtractAndMoveMethodAnalysisHandler"
+            commandId="no.uio.ifi.refaktor.commands.compilationUnitWideSearchBasedExtractAndMoveMethodAnalysis">
+      </handler-->
+      <!--handler
+            class="no.uio.ifi.refaktor.handlers.PackageWideSearchBasedExtractAndMoveMethodAnalysisHandler"
+            commandId="no.uio.ifi.refaktor.commands.packageWideSearchBasedExtractAndMoveMethodAnalysis">
+      </handler-->
+      <!--handler
+            class="no.uio.ifi.refaktor.handlers.ProjectWideSearchBasedExtractAndMoveMethodAnalysisHandler"
+            commandId="no.uio.ifi.refaktor.commands.projectWideSearchBasedExtractAndMoveMethodAnalysis">
+      </handler-->
+      <!--handler
+            class="no.uio.ifi.refaktor.handlers.PackageFragmentRootWideSearchBasedExtractAndMoveMethodAnalysisHandler"
+            commandId="no.uio.ifi.refaktor.commands.packageFragmentRootWideSearchBasedExtractAndMoveMethodAnalysis">
+      </handler-->
+      <handler
+            class="no.uio.ifi.refaktor.handlers.entrypoints.SearchBasedExtractAndMoveMethodChangerHandler"
+            commandId="no.uio.ifi.refaktor.commands.projectWideSearchBasedExtractAndMoveMethodChanger">
       </handler>
       <handler
-            class="no.uio.ifi.refaktor.handlers.TextSelectionInformationHandler"
-            commandId="no.uio.ifi.refaktor.commands.textSelectionInformation">
-         <enabledWhen>
-            <with
-                  variable="selection">
-               <instanceof
-                     value="org.eclipse.jface.text.TextSelection">
-               </instanceof>
-            </with>
-         </enabledWhen>
+            class="no.uio.ifi.refaktor.handlers.entrypoints.SearchBasedExtractAndMoveMethodChangerHandler"
+            commandId="no.uio.ifi.refaktor.commands.searchBasedExtractAndMoveMethodChanger">
       </handler>
+      <!--handler
+            class="no.uio.ifi.refaktor.handlers.CompilationUnitWideSearchBasedExtractAndMoveMethodChangerHandler"
+            commandId="no.uio.ifi.refaktor.commands.compilationUnitWideSearchBasedExtractAndMoveMethodChanger">
+      </handler-->
+      <!--handler
+            class="no.uio.ifi.refaktor.handlers.PackageWideSearchBasedExtractAndMoveMethodChangerHandler"
+            commandId="no.uio.ifi.refaktor.commands.packageWideSearchBasedExtractAndMoveMethodChanger">
+      </handler-->
       <handler
-            class="no.uio.ifi.refaktor.handlers.TestPropertyExtractorHandler"
-            commandId="no.uio.ifi.refaktor.commands.testPropertyExtractor">
+            class="no.uio.ifi.refaktor.handlers.entrypoints.SearchBasedExtractLocalVariableWithAssertsHandler"
+            commandId="no.uio.ifi.refaktor.commands.searchBasedExtractLocalVariableWithAssertsChanger">
       </handler>
       <handler
-            class="no.uio.ifi.refaktor.handlers.ExtractAndMoveMethodHandler"
-            commandId="no.uio.ifi.refaktor.commands.extractAndMoveMethod">
+            class="no.uio.ifi.refaktor.handlers.entrypoints.SearchBasedExtractLocalVariableWithoutAssertsHandler"
+            commandId="no.uio.ifi.refaktor.commands.searchBasedExtractLocalVariableWithoutAssertsChanger">
       </handler>
    </extension>
    <extension
          point="org.eclipse.ui.menus">
-      <menuContribution
+      <!--menuContribution
             locationURI="menu:org.eclipse.ui.main.menu?after=additions">
          <menu
                label="Refaktor"
                   mnemonic="S"
                   id="no.uio.ifi.refaktor.menus.testRefactoring">
             </command>
-            <command
-                  commandId="no.uio.ifi.refaktor.commands.saferRefactoring"
-                  id="no.uio.ifi.refaktor.menus.saferRefactoring"
-                  mnemonic="S">
-            </command>
          </menu>
-      </menuContribution>
+      </menuContribution-->
       <menuContribution
             allPopups="true"
             locationURI="popup:org.eclipse.ui.popup.any?after=additions">
          <menu
                id="no.uio.ifi.refaktor.menus.refaktorSelectionPopup"
-               label="IFI Refaktor Selection"
+               label="Safer Refactor Selection"
                mnemonic="M">
             <command
                   commandId="no.uio.ifi.refaktor.commands.textSelectionInformation"
                   label="Extract and Move Method"
                   style="push">
             </command>
+            <command
+                   commandId="no.uio.ifi.refaktor.extractLocalVariableWithAsserts"
+                   label="Extract Local Variable"
+                   style="push">
+               </command>
+         </menu>
+         <menu
+               id="no.uio.ifi.refaktor.menus.refaktorTreeSelectionPopup"
+               label="Safer Refactor Element"
+               mnemonic="M">
+            <visibleWhen
+                  checkEnabled="false">
+               <with
+                     variable="selection">
+                  <instanceof
+                        value="org.eclipse.jface.viewers.ITreeSelection">
+                  </instanceof>
+               </with>
+            </visibleWhen>
+            <command
+                  commandId="no.uio.ifi.refaktor.commands.treeSelectionInfo"
+                  label="Tree Selection Info"
+                  style="push">
+            </command>
+            <command
+                  commandId="no.uio.ifi.refaktor.commands.projectWideSearchBasedExtractAndMoveMethodChanger"
+                  label="Extract And Move Method"
+                  style="push">
+               <visibleWhen
+                     checkEnabled="false">
+                  <with
+                        variable="selection">
+                     <test
+                           forcePluginActivation="true"
+                           property="no.uio.ifi.refaktor.propertyTesters.treeSelectionPropertyTester.elementType"
+                           value="org.eclipse.core.resources.IProject">
+                     </test>
+                  </with>
+               </visibleWhen>
+            </command>
+            <command
+                  commandId="no.uio.ifi.refaktor.commands.searchBasedExtractAndMoveMethodChanger"
+                  label="Extract And Move Method"
+                  style="push">
+               <visibleWhen
+                     checkEnabled="false">
+                  <with
+                        variable="selection">
+                     <test
+                           forcePluginActivation="true"
+                           property="no.uio.ifi.refaktor.propertyTesters.treeSelectionPropertyTester.elementType"
+                           value="org.eclipse.jdt.core.IMethod">
+                     </test>
+                  </with>
+               </visibleWhen>
+            </command>
+            <command
+                  commandId="no.uio.ifi.refaktor.commands.compilationUnitWideSearchBasedExtractAndMoveMethodChanger"
+                  label="Compilation Unit Wide Search Based Extract And Move Method Changer"
+                  style="push">
+               <visibleWhen
+                     checkEnabled="false">
+                  <with
+                        variable="selection">
+                     <test
+                           forcePluginActivation="true"
+                           property="no.uio.ifi.refaktor.propertyTesters.treeSelectionPropertyTester.elementType"
+                           value="org.eclipse.jdt.core.ICompilationUnit">
+                     </test>
+                  </with>
+               </visibleWhen>
+            </command>
+            <command
+                  commandId="no.uio.ifi.refaktor.commands.projectWideSearchBasedExtractAndMoveMethodChanger"
+                  label="Search Based Extract And Move Method"
+                  style="push">
+               <visibleWhen
+                     checkEnabled="false">
+                  <with
+                        variable="selection">
+                     <test
+                           forcePluginActivation="true"
+                           property="no.uio.ifi.refaktor.propertyTesters.treeSelectionPropertyTester.elementType"
+                           value="org.eclipse.jdt.core.IJavaProject">
+                     </test>
+                  </with>
+               </visibleWhen>
+            </command>
+            <command
+                  commandId="no.uio.ifi.refaktor.commands.packageWideSearchBasedExtractAndMoveMethodChanger"
+                  label="Package Wide Search Based Extract And Move Method Changer"
+                  style="push">
+               <visibleWhen
+                     checkEnabled="false">
+                  <with
+                        variable="selection">
+                     <test
+                           forcePluginActivation="true"
+                           property="no.uio.ifi.refaktor.propertyTesters.treeSelectionPropertyTester.elementType"
+                           value="org.eclipse.jdt.core.IPackageFragment">
+                     </test>
+                  </with>
+               </visibleWhen>
+            </command>
+            <command
+                commandId="no.uio.ifi.refaktor.commands.searchBasedExtractLocalVariableWithAssertsChanger"
+                label="Extract Local Variable">
+               style="push">
+            </command>
          </menu>
       </menuContribution>
    </extension>
             objectClass="org.eclipse.jdt.core.IMethod">
          <menu
                id="no.uio.ifi.refaktor.menu1"
-               label="IFI Refaktor"
+               label="Safer Refactor"
                path="additions">
             <separator
                   name="group1">
                   name="group2">
             </separator>
          </menu>
-         <action
-               class="no.uio.ifi.refaktor.popup.actions.SaferAction"
-               enablesFor="1"
-               id="no.uio.ifi.refaktor.saferAction"
-               label="Safer Refactoring"
-               menubarPath="no.uio.ifi.refaktor.menu1/group1">
-         </action>
-         <action
-               class="no.uio.ifi.refaktor.popup.actions.CyclomaticComplexityAction"
-               enablesFor="1"
-               id="no.uio.ifi.refaktor.cyclomaticComplexityAction"
-               label="Compute Cyclomatic Complexity"
-               menubarPath="no.uio.ifi.refaktor.menu1/group2">
-         </action>
-         <action
-               class="no.uio.ifi.refaktor.popup.actions.SearchBasedExtractAndMoveMethodAnalysisAction"
-               enablesFor="1"
-               id="no.uio.ifi.refaktor.searchBasedExtractAndMoveMethodAnalysis"
-               label="Search Based Extract and Move Method Analysis"
-               menubarPath="no.uio.ifi.refaktor.menu1/group2">
-         </action>
       </objectContribution>
    </extension>
-   <extension
+   <!--extension
          point="org.eclipse.ui.views">
       <category
             id="no.uio.ifi.refaktor.views"
             id="no.uio.ifi.refaktor.views.PrefixView"
             name="Prefix View">
       </view>
-   </extension>
-   <extension
+   </extension-->
+   <!--extension
          point="org.eclipse.ui.perspectiveExtensions">
       <perspectiveExtension
             targetID="org.eclipse.jdt.ui.JavaPerspective">
                visible="true">
          </view>
       </perspectiveExtension>
+   </extension-->
+   <extension
+         point="org.eclipse.core.expressions.propertyTesters">
+      <propertyTester
+            class="no.uio.ifi.refaktor.propertyTesters.TreeSelectionPropertyTester"
+            id="no.uio.ifi.refaktor.propertyTesters.treeSelectionPropertyTester"
+            namespace="no.uio.ifi.refaktor.propertyTesters.treeSelectionPropertyTester"
+            properties="elementType"
+            type="org.eclipse.jface.viewers.ITreeSelection">
+      </propertyTester>
+   </extension>
+   <extension
+         point="org.eclipse.ui.bindings">
+      <key
+            commandId="no.uio.ifi.refaktor.commands.textSelectionInformation"
+            contextId="org.eclipse.ui.contexts.window"
+            schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
+            sequence="M1+R M1+S">
+      </key>
    </extension>
 
 </plugin>