Search in sources :

Example 1 with LightClass

use of com.intellij.psi.impl.light.LightClass in project intellij-community by JetBrains.

the class MoveJavaClassesInFileHandler method processMoveAllClassesInFile.

@Override
public void processMoveAllClassesInFile(@NotNull Map<PsiClass, Boolean> allClasses, PsiClass psiClass, PsiElement... elementsToMove) {
    if (psiClass instanceof LightClass)
        return;
    final PsiClassOwner containingFile = (PsiClassOwner) psiClass.getContainingFile();
    final PsiClass[] classes = containingFile.getClasses();
    boolean all = true;
    for (PsiClass aClass : classes) {
        if (ArrayUtil.find(elementsToMove, aClass) == -1) {
            all = false;
            break;
        }
    }
    for (PsiClass aClass : classes) {
        allClasses.put(aClass, all);
    }
}
Also used : PsiClassOwner(com.intellij.psi.PsiClassOwner) LightClass(com.intellij.psi.impl.light.LightClass) PsiClass(com.intellij.psi.PsiClass)

Aggregations

PsiClass (com.intellij.psi.PsiClass)1 PsiClassOwner (com.intellij.psi.PsiClassOwner)1 LightClass (com.intellij.psi.impl.light.LightClass)1