All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.intellij.refactoring.JavaRefactoringActionHandlerFactory Maven / Gradle / Ivy

Go to download

A packaging of the IntelliJ Community Edition openapi library. This is release number 1 of trunk branch 142.

The newest version!
/*
 * Copyright 2000-2009 JetBrains s.r.o.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.intellij.refactoring;

import com.intellij.openapi.components.ServiceManager;

public abstract class JavaRefactoringActionHandlerFactory {
  public static JavaRefactoringActionHandlerFactory getInstance() {
    return ServiceManager.getService(JavaRefactoringActionHandlerFactory.class);
  }

  /**
   * Creates handler for Anonymous To Inner refactoring.

* * {@link RefactoringActionHandler#invoke(com.intellij.openapi.project.Project, com.intellij.psi.PsiElement[], com.intellij.openapi.actionSystem.DataContext)} * is not implemented. * @return */ public abstract RefactoringActionHandler createAnonymousToInnerHandler(); /** * Creates handler for Pull Members Up refactoring.

* * {@link RefactoringActionHandler#invoke(com.intellij.openapi.project.Project, com.intellij.psi.PsiElement[], com.intellij.openapi.actionSystem.DataContext)} * accepts either a {@link com.intellij.psi.PsiClass}, {@link com.intellij.psi.PsiField} or {@link com.intellij.psi.PsiMethod}. * In latter two cases, elements[0] is a member that will be preselected. */ public abstract RefactoringActionHandler createPullUpHandler(); /** * Creates handler for Push Members Down refactoring.

* * {@link RefactoringActionHandler#invoke(com.intellij.openapi.project.Project, com.intellij.psi.PsiElement[], com.intellij.openapi.actionSystem.DataContext)} * accepts either a {@link com.intellij.psi.PsiClass}, {@link com.intellij.psi.PsiField} or {@link com.intellij.psi.PsiMethod}. * In latter two cases, elements[0] is a member that will be preselected. */ public abstract RefactoringActionHandler createPushDownHandler(); /** * Creates handler for Use Interface Where Possible refactoring.

* * {@link RefactoringActionHandler#invoke(com.intellij.openapi.project.Project, com.intellij.psi.PsiElement[], com.intellij.openapi.actionSystem.DataContext)} * accepts 1 PsiClass. * @return */ public abstract RefactoringActionHandler createTurnRefsToSuperHandler(); /** * Creates handler for Replace Temp With Query refactoring.

* * {@link RefactoringActionHandler#invoke(com.intellij.openapi.project.Project, com.intellij.psi.PsiElement[], com.intellij.openapi.actionSystem.DataContext)} * is not implemented. */ public abstract RefactoringActionHandler createTempWithQueryHandler(); /** * Creates handler for Introduce Parameter refactoring.

* * {@link RefactoringActionHandler#invoke(com.intellij.openapi.project.Project, com.intellij.psi.PsiElement[], com.intellij.openapi.actionSystem.DataContext)} * accepts either 1 PsiExpression, that will be an initialzier for introduced parameter, * or 1 PsiLocalVariable, that will be replaced with introduced parameter. */ public abstract RefactoringActionHandler createIntroduceParameterHandler(); /** * Creates handler for Make Method Static refactoring.

* * {@link RefactoringActionHandler#invoke(com.intellij.openapi.project.Project, com.intellij.psi.PsiElement[], com.intellij.openapi.actionSystem.DataContext)} * accepts 1 PsiMethod. */ public abstract RefactoringActionHandler createMakeMethodStaticHandler(); /** * Creates handler for Convert To Instance Method refactoring.

* * {@link RefactoringActionHandler#invoke(com.intellij.openapi.project.Project, com.intellij.psi.PsiElement[], com.intellij.openapi.actionSystem.DataContext)} * accepts 1 PsiMethod. */ public abstract RefactoringActionHandler createConvertToInstanceMethodHandler(); /** * Creates handler for Replace Constructor With Factory Method refactoring.

* * {@link RefactoringActionHandler#invoke(com.intellij.openapi.project.Project, com.intellij.psi.PsiElement[], com.intellij.openapi.actionSystem.DataContext)} * accepts either a PsiMethod that is a constructor, or a PsiClass * with implicit default constructor. */ public abstract RefactoringActionHandler createReplaceConstructorWithFactoryHandler(); /** * Creates handler for Replace Constructor With Factory Method refactoring.

* * {@link RefactoringActionHandler#invoke(com.intellij.openapi.project.Project, com.intellij.psi.PsiElement[], com.intellij.openapi.actionSystem.DataContext)} * accepts either a PsiClass or any number of PsiFields. */ public abstract RefactoringActionHandler createEncapsulateFieldsHandler(); /** * Creates handler for Replace Method Code Duplicates refactoring.

* * {@link RefactoringActionHandler#invoke(com.intellij.openapi.project.Project, com.intellij.psi.PsiElement[], com.intellij.openapi.actionSystem.DataContext)} * accepts one PsiMethod. */ public abstract RefactoringActionHandler createMethodDuplicatesHandler(); /** * Creates handler for Change Method/Class Signature refactoring.

* * {@link RefactoringActionHandler#invoke(com.intellij.openapi.project.Project, com.intellij.psi.PsiElement[], com.intellij.openapi.actionSystem.DataContext)} * accepts either 1 PsiMethod or 1 PsiClass */ public abstract RefactoringActionHandler createChangeSignatureHandler(); /** * Creates handler for Extract Superclass refactoring.

* * {@link RefactoringActionHandler#invoke(com.intellij.openapi.project.Project, com.intellij.psi.PsiElement[], com.intellij.openapi.actionSystem.DataContext)} * accepts 1 PsiClass. */ public abstract RefactoringActionHandler createExtractSuperclassHandler(); /** * Creates handler for Generify (aka Type Cook) refactoring.

* * {@link RefactoringActionHandler#invoke(com.intellij.openapi.project.Project, com.intellij.psi.PsiElement[], com.intellij.openapi.actionSystem.DataContext)} * accepts any number of arbitrary PsiElements. All code inside these elements will be generified. */ public abstract RefactoringActionHandler createTypeCookHandler(); /** * Creates handler for Inline refactoring.

* * {@link RefactoringActionHandler#invoke(com.intellij.openapi.project.Project, com.intellij.psi.PsiElement[], com.intellij.openapi.actionSystem.DataContext)} * accepts 1 inlinable PsiElement (method, local variable or constant). */ public abstract RefactoringActionHandler createInlineHandler(); /** * Creates handler for Extract Method refactoring.

* * {@link RefactoringActionHandler#invoke(com.intellij.openapi.project.Project, com.intellij.psi.PsiElement[], com.intellij.openapi.actionSystem.DataContext)} * is not implemented. */ public abstract RefactoringActionHandler createExtractMethodHandler(); public abstract RefactoringActionHandler createInheritanceToDelegationHandler(); /** * Creates handler for Extract Interface refactoring.

* * {@link RefactoringActionHandler#invoke(com.intellij.openapi.project.Project, com.intellij.psi.PsiElement[], com.intellij.openapi.actionSystem.DataContext)} * accepts 1 PsiClass. */ public abstract RefactoringActionHandler createExtractInterfaceHandler(); /** * Creates handler for Introduce Field refactoring.

* * {@link RefactoringActionHandler#invoke(com.intellij.openapi.project.Project, com.intellij.psi.PsiElement[], com.intellij.openapi.actionSystem.DataContext)} * accepts either 1 PsiExpression, that will be an initialzier for introduced field, * or 1 PsiLocalVariable, that will be replaced with introduced field. */ public abstract RefactoringActionHandler createIntroduceFieldHandler(); /** * Creates handler for Introduce Variable refactoring.

* * {@link RefactoringActionHandler#invoke(com.intellij.openapi.project.Project, com.intellij.psi.PsiElement[], com.intellij.openapi.actionSystem.DataContext)} * accepts 1 PsiExpression, that will be an initialzier for introduced variable. */ public abstract RefactoringActionHandler createIntroduceVariableHandler(); /** * Creates handler for Introduce Constant refactoring.

* * {@link RefactoringActionHandler#invoke(com.intellij.openapi.project.Project, com.intellij.psi.PsiElement[], com.intellij.openapi.actionSystem.DataContext)} * accepts either 1 PsiExpression, that will be an initialzier for introduced constant, * or 1 PsiLocalVariable, that will be replaced with introduced constant. */ public abstract RefactoringActionHandler createIntroduceConstantHandler(); /** * Creates handler for Invert Boolean refactoring.

* * {@link RefactoringActionHandler#invoke(com.intellij.openapi.project.Project, com.intellij.psi.PsiElement[], com.intellij.openapi.actionSystem.DataContext)} * accepts 1 PsiMethod, that will be inverted */ public abstract RefactoringActionHandler createInvertBooleanHandler(); }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy