use of com.intellij.psi.PsiModifierList in project android by JetBrains.
the class AndroidClassBrowserBase method showDialog.
@Override
protected String showDialog() {
Project project = getProject();
final JavaPsiFacade facade = JavaPsiFacade.getInstance(project);
Module module = myModuleSelector.getModule();
if (module == null) {
Messages.showErrorDialog(project, ExecutionBundle.message("module.not.specified.error.text"), CommonBundle.getErrorTitle());
return null;
}
GlobalSearchScope scope = myIncludeLibraryClasses ? module.getModuleWithDependenciesAndLibrariesScope(true) : module.getModuleWithDependenciesScope();
PsiClass initialSelection = facade.findClass(getText(), scope);
TreeClassChooser chooser = createTreeClassChooser(project, scope, initialSelection, new ClassFilter() {
@Override
public boolean isAccepted(PsiClass aClass) {
if (aClass.isInterface())
return false;
final PsiModifierList modifierList = aClass.getModifierList();
return modifierList == null || !modifierList.hasModifierProperty(PsiModifier.ABSTRACT);
}
});
if (chooser == null)
return null;
chooser.showDialog();
PsiClass selClass = chooser.getSelected();
return selClass != null ? selClass.getQualifiedName() : null;
}
Aggregations