Search in sources :

Example 11 with RefactoringActionHandler

use of com.intellij.refactoring.RefactoringActionHandler in project intellij-community by JetBrains.

the class InlineAction method getHandler.

@Override
protected RefactoringActionHandler getHandler(@NotNull Language language, PsiElement element) {
    RefactoringActionHandler handler = super.getHandler(language, element);
    if (handler != null)
        return handler;
    List<InlineHandler> handlers = InlineHandlers.getInlineHandlers(language);
    return handlers.isEmpty() ? null : new InlineRefactoringActionHandler();
}
Also used : InlineRefactoringActionHandler(com.intellij.refactoring.inline.InlineRefactoringActionHandler) RefactoringActionHandler(com.intellij.refactoring.RefactoringActionHandler) InlineRefactoringActionHandler(com.intellij.refactoring.inline.InlineRefactoringActionHandler) InlineHandler(com.intellij.lang.refactoring.InlineHandler)

Aggregations

RefactoringActionHandler (com.intellij.refactoring.RefactoringActionHandler)11 DataContext (com.intellij.openapi.actionSystem.DataContext)4 Editor (com.intellij.openapi.editor.Editor)4 Project (com.intellij.openapi.project.Project)3 PsiElement (com.intellij.psi.PsiElement)3 DataManager (com.intellij.ide.DataManager)2 ContextAwareActionHandler (com.intellij.lang.ContextAwareActionHandler)2 Language (com.intellij.lang.Language)2 PsiFile (com.intellij.psi.PsiFile)2 Consumer (com.intellij.util.Consumer)2 NotNull (org.jetbrains.annotations.NotNull)2 AddImportAction (com.intellij.codeInsight.daemon.impl.actions.AddImportAction)1 QuestionAction (com.intellij.codeInsight.hint.QuestionAction)1 LookupEx (com.intellij.codeInsight.lookup.LookupEx)1 LookupImpl (com.intellij.codeInsight.lookup.impl.LookupImpl)1 TitledHandler (com.intellij.ide.TitledHandler)1 InlineHandler (com.intellij.lang.refactoring.InlineHandler)1 RefactoringSupportProvider (com.intellij.lang.refactoring.RefactoringSupportProvider)1 SimpleDataContext (com.intellij.openapi.actionSystem.impl.SimpleDataContext)1 Document (com.intellij.openapi.editor.Document)1