public PsiElementVisitor buildVisitor(@NotNull final ProblemsHolder holder, boolean isOnTheFly) {
return new JavaElementVisitor() {
@Override
public void visitClass(PsiClass psiClass) {
if (!psiClass.hasModifierProperty(PsiModifier.ABSTRACT)) {
OsmorcFacet facet = OsmorcFacet.getInstance(psiClass);
if (facet != null) {
Project project = psiClass.getProject();
PsiClass activator = JavaPsiFacade.getInstance(project).findClass(ACTIVATOR_CLASS, ProjectScope.getLibrariesScope(project));
if (activator != null && psiClass.isInheritor(activator, true)) {
String className = psiClass.getQualifiedName();
if (className != null) {
LocalQuickFix fix = null;
OsmorcFacetConfiguration configuration = facet.getConfiguration();
if (configuration.isManifestManuallyEdited()) {
BundleManifest manifest = BundleManager.getInstance(project).getManifestByObject(facet.getModule());
if (manifest == null || !className.equals(manifest.getBundleActivator())) {
fix = new RegisterInManifestQuickfix(className);
}
}
else {