Extract superclass, part II

This commit is contained in:
Alexander Kirillin
2012-10-03 23:15:58 +04:00
parent c58c2d2441
commit 2340672546
@@ -82,6 +82,14 @@ public abstract class BasePlatformRefactoringAction extends BaseRefactoringActio
}
}
PsiElement[] psiElements = LangDataKeys.PSI_ELEMENT_ARRAY.getData(dataContext);
if (psiElements != null && psiElements.length > 1) {
RefactoringActionHandler handler = getHandler(psiElements[0].getLanguage(), psiElements[0]);
if (handler != null && isEnabledOnElements(psiElements)) {
return handler;
}
}
if (element == null) {
element = referenced;
}