Package com.intellij.codeInspection

Examples of com.intellij.codeInspection.ProblemDescriptor


            String message = message(
                "injections.structure.annotation.declared.correctly.error.invalid.injection.type",
                psiVariable.getType().getCanonicalText()
            );
            AbstractFix removeStructureAnnotationFix = createRemoveAnnotationFix( structureAnnotation );
            ProblemDescriptor problemDescriptor = manager.createProblemDescriptor(
                structureAnnotation, message, removeStructureAnnotationFix, GENERIC_ERROR_OR_WARNING
            );
            return new ProblemDescriptor[]{ problemDescriptor };
        }
View Full Code Here


      } while (result);
    }
  }

  private static void registerHighlighting(TextAttributesKey attributesKey, GherkinStep step, TextRange range, ProblemsHolder holder) {
    final ProblemDescriptor descriptor = new ProblemDescriptorImpl(step, step, "", LocalQuickFix.EMPTY_ARRAY,
                                                                   ProblemHighlightType.INFORMATION, false, range, false, null,
                                                                   holder.isOnTheFly());
    descriptor.setTextAttributes(attributesKey);
    holder.registerProblem(descriptor);
  }
View Full Code Here

        PsiElement element = file.findElementAt(editor.getSelectionModel().getSelectionStart());
        GoLiteralIdentifier identifier = findParentOfType(element, GoLiteralIdentifier.class);
        assertNotNull(identifier);
        InspectionManager im = InspectionManager.getInstance(project);
        LocalQuickFix fix = null;
        ProblemDescriptor pd = im.createProblemDescriptor(identifier, "", fix, ProblemHighlightType.ERROR, true);
        new ConvertToAssignmentFix().applyFix(project, pd);
    }
View Full Code Here

        assertTrue(element instanceof GoLiteralIdentifier);

//        System.out.println(DebugUtil.psiToString(file, false, true));
        InspectionManager im = InspectionManager.getInstance(project);
        LocalQuickFix fix = null;
        ProblemDescriptor pd = im.createProblemDescriptor(element, "", fix,
                                                          ProblemHighlightType.ERROR,
                                                          true);
        new RemoveVariableFix().applyFix(project, pd);
    }
View Full Code Here

        assertNotNull(element);
        //System.out.println(DebugUtil.psiToString(file, false, true));
        InspectionManager im = InspectionManager.getInstance(project);
        LocalQuickFix fix = null;
        ProblemDescriptor pd = im.createProblemDescriptor(element, "", fix, ProblemHighlightType.ERROR, true);
        new RemoveImportFix(element).applyFix(project, pd);
    }
View Full Code Here

            if (victim == null) {
                LOG.warn("Couldn't find victim for error: " + event.getFileName() + "("
                        + event.getLine() + ":" + event.getColumn() + ") " + event.getMessage());
            } else {
                try {
                    final ProblemDescriptor problem = manager.createProblemDescriptor(
                            victim, messageFor(event), null, problemHighlightTypeFor(event.getSeverityLevel()),
                            false, afterEndOfLine);

                    if (usingExtendedDescriptors) {
                        addProblem(psiFile, extendDescriptor(event, problem));
View Full Code Here

TOP

Related Classes of com.intellij.codeInspection.ProblemDescriptor

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.