void (ActionEvent e) { final DomElement domElement = control.getDomElement(); ExtendClass extend = domElement.getAnnotation(ExtendClass.class); PsiClass baseClass = null; ClassFilter filter = null; if (extend != null) { if (extend.value().length == 1) baseClass = JavaPsiFacade.getInstance(control.getProject()).findClass(extend.value()[0], resolveScope); if (extend.instantiatable()) { filter = ClassFilter.INSTANTIABLE; } } PsiClass initialClass = null; if (domElement instanceof GenericDomValue) { final Object value = ((GenericDomValue<?>)domElement).getValue(); if (value instanceof PsiClass) initialClass = (PsiClass)value; } TreeClassChooser chooser = TreeClassChooserFactory.getInstance(control.getProject()) .createInheritanceClassChooser(JavaBundle.message("choose.class"), resolveScope, baseClass, initialClass, filter); chooser.showDialog(); final PsiClass psiClass = chooser.getSelected(); if (psiClass != null) { control.setValue(psiClass.getQualifiedName()); } }