Search in sources :

Example 1 with ElementsHandler

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

the class BasePlatformRefactoringAction method isEnabledOnElements.

@Override
protected boolean isEnabledOnElements(@NotNull PsiElement[] elements) {
    if (elements.length > 0) {
        Language language = elements[0].getLanguage();
        RefactoringActionHandler handler = getHandler(language, elements[0]);
        return handler instanceof ElementsHandler && ((ElementsHandler) handler).isEnabledOnElements(elements);
    }
    return false;
}
Also used : ElementsHandler(com.intellij.refactoring.lang.ElementsHandler) Language(com.intellij.lang.Language) RefactoringActionHandler(com.intellij.refactoring.RefactoringActionHandler)

Aggregations

Language (com.intellij.lang.Language)1 RefactoringActionHandler (com.intellij.refactoring.RefactoringActionHandler)1 ElementsHandler (com.intellij.refactoring.lang.ElementsHandler)1