Java 类com.intellij.lang.annotation.ProblemGroup 实例源码

项目:intellij-ce-playground    文件:GlobalInspectionUtil.java   
public static void createProblem(@NotNull PsiElement elt,
                                 @NotNull HighlightInfo info,
                                 TextRange range,
                                 @Nullable ProblemGroup problemGroup,
                                 @NotNull InspectionManager manager,
                                 @NotNull ProblemDescriptionsProcessor problemDescriptionsProcessor,
                                 @NotNull GlobalInspectionContext globalContext) {
  List<LocalQuickFix> fixes = new ArrayList<LocalQuickFix>();
  if (info.quickFixActionRanges != null) {
    for (Pair<HighlightInfo.IntentionActionDescriptor, TextRange> actionRange : info.quickFixActionRanges) {
      final IntentionAction action = actionRange.getFirst().getAction();
      if (action instanceof LocalQuickFix) {
        fixes.add((LocalQuickFix)action);
      }
    }
  }
  ProblemDescriptor descriptor = manager.createProblemDescriptor(elt, range, createInspectionMessage(StringUtil.notNullize(info.getDescription())),
                                                                 HighlightInfo.convertType(info.type), false,
                                                                 fixes.isEmpty() ? null : fixes.toArray(new LocalQuickFix[fixes.size()]));
  descriptor.setProblemGroup(problemGroup);
  problemDescriptionsProcessor.addProblemElement(
    GlobalInspectionContextUtil.retrieveRefElement(elt, globalContext),
    descriptor
  );
}
项目:tools-idea    文件:GlobalInspectionUtil.java   
public static void createProblem(PsiElement elt,
                                 @NotNull HighlightInfo info,
                                 TextRange range,
                                 @Nullable ProblemGroup problemGroup,
                                 @NotNull InspectionManager manager,
                                 @NotNull ProblemDescriptionsProcessor problemDescriptionsProcessor,
                                 @NotNull GlobalInspectionContext globalContext) {
  List<LocalQuickFix> fixes = new ArrayList<LocalQuickFix>();
  if (info.quickFixActionRanges != null) {
    for (Pair<HighlightInfo.IntentionActionDescriptor, TextRange> actionRange : info.quickFixActionRanges) {
      final IntentionAction action = actionRange.getFirst().getAction();
      if (action instanceof LocalQuickFix) {
        fixes.add((LocalQuickFix)action);
      }
    }
  }
  ProblemDescriptor descriptor = manager.createProblemDescriptor(elt, range, createInspectionMessage(StringUtil.notNullize(info.getDescription())),
                                                                 HighlightInfo.convertType(info.type), false,
                                                                 fixes.isEmpty() ? null : fixes.toArray(new LocalQuickFix[fixes.size()]));
  descriptor.setProblemGroup(problemGroup);
  problemDescriptionsProcessor.addProblemElement(
    GlobalInspectionContextUtil.retrieveRefElement(elt, globalContext),
    descriptor
  );
}
项目:consulo    文件:GlobalInspectionUtil.java   
public static void createProblem(@Nonnull PsiElement elt,
                                 @Nonnull HighlightInfo info,
                                 TextRange range,
                                 @Nullable ProblemGroup problemGroup,
                                 @Nonnull InspectionManager manager,
                                 @Nonnull ProblemDescriptionsProcessor problemDescriptionsProcessor,
                                 @Nonnull GlobalInspectionContext globalContext) {
  List<LocalQuickFix> fixes = new ArrayList<LocalQuickFix>();
  if (info.quickFixActionRanges != null) {
    for (Pair<HighlightInfo.IntentionActionDescriptor, TextRange> actionRange : info.quickFixActionRanges) {
      final IntentionAction action = actionRange.getFirst().getAction();
      if (action instanceof LocalQuickFix) {
        fixes.add((LocalQuickFix)action);
      }
    }
  }
  ProblemDescriptor descriptor = manager.createProblemDescriptor(elt, range, createInspectionMessage(StringUtil.notNullize(info.getDescription())),
                                                                 HighlightInfo.convertType(info.type), false,
                                                                 fixes.isEmpty() ? null : fixes.toArray(new LocalQuickFix[fixes.size()]));
  descriptor.setProblemGroup(problemGroup);
  problemDescriptionsProcessor.addProblemElement(
          GlobalInspectionContextUtil.retrieveRefElement(elt, globalContext),
          descriptor
  );
}
项目:intellij-ce-playground    文件:HighlightInfo.java   
HighlightInfo(@Nullable TextAttributes forcedTextAttributes,
              @Nullable TextAttributesKey forcedTextAttributesKey,
              @NotNull HighlightInfoType type,
              int startOffset,
              int endOffset,
              @Nullable String escapedDescription,
              @Nullable String escapedToolTip,
              @NotNull HighlightSeverity severity,
              boolean afterEndOfLine,
              @Nullable Boolean needsUpdateOnTyping,
              boolean isFileLevelAnnotation,
              int navigationShift,
              ProblemGroup problemGroup,
              GutterMark gutterIconRenderer) {
  if (startOffset < 0 || startOffset > endOffset) {
    LOG.error("Incorrect highlightInfo bounds. description="+escapedDescription+"; startOffset="+startOffset+"; endOffset="+endOffset+";type="+type);
  }
  this.forcedTextAttributes = forcedTextAttributes;
  this.forcedTextAttributesKey = forcedTextAttributesKey;
  this.type = type;
  this.startOffset = startOffset;
  this.endOffset = endOffset;
  fixStartOffset = startOffset;
  fixEndOffset = endOffset;
  description = escapedDescription;
  // optimisation: do not retain extra memory if can recompute
  toolTip = encodeTooltip(escapedToolTip, escapedDescription);
  this.severity = severity;
  setFlag(AFTER_END_OF_LINE_MASK, afterEndOfLine);
  setFlag(NEEDS_UPDATE_ON_TYPING_MASK, calcNeedUpdateOnTyping(needsUpdateOnTyping, type));
  setFlag(FILE_LEVEL_ANNOTATION_MASK, isFileLevelAnnotation);
  this.navigationShift = navigationShift;
  myProblemGroup = problemGroup;
  this.gutterIconRenderer = gutterIconRenderer;
}
项目:intellij-ce-playground    文件:HighlightInfo.java   
private IntentionActionDescriptor(@NotNull IntentionAction action,
                                  @Nullable final List<IntentionAction> options,
                                  @Nullable final String displayName,
                                  @Nullable Icon icon,
                                  @Nullable HighlightDisplayKey key,
                                  @Nullable ProblemGroup problemGroup,
                                  @Nullable HighlightSeverity severity) {
  myAction = action;
  myOptions = options;
  myDisplayName = displayName;
  myIcon = icon;
  myKey = key;
  myProblemGroup = problemGroup;
  mySeverity = severity;
}
项目:tools-idea    文件:HighlightInfo.java   
public IntentionActionDescriptor(@NotNull IntentionAction action,
                                 @Nullable final List<IntentionAction> options,
                                 @Nullable final String displayName,
                                 @Nullable Icon icon,
                                 @Nullable HighlightDisplayKey key,
                                 @Nullable ProblemGroup problemGroup) {
  myAction = action;
  myOptions = options;
  myDisplayName = displayName;
  myIcon = icon;
  myKey = key;
  myProblemGroup = problemGroup;
}
项目:consulo    文件:HighlightInfo.java   
HighlightInfo(@Nullable TextAttributes forcedTextAttributes,
              @Nullable TextAttributesKey forcedTextAttributesKey,
              @Nonnull HighlightInfoType type,
              int startOffset,
              int endOffset,
              @Nullable String escapedDescription,
              @Nullable String escapedToolTip,
              @Nonnull HighlightSeverity severity,
              boolean afterEndOfLine,
              @Nullable Boolean needsUpdateOnTyping,
              boolean isFileLevelAnnotation,
              int navigationShift,
              ProblemGroup problemGroup,
              GutterMark gutterIconRenderer) {
  if (startOffset < 0 || startOffset > endOffset) {
    LOG.error("Incorrect highlightInfo bounds. description="+escapedDescription+"; startOffset="+startOffset+"; endOffset="+endOffset+";type="+type);
  }
  this.forcedTextAttributes = forcedTextAttributes;
  this.forcedTextAttributesKey = forcedTextAttributesKey;
  this.type = type;
  this.startOffset = startOffset;
  this.endOffset = endOffset;
  fixStartOffset = startOffset;
  fixEndOffset = endOffset;
  description = escapedDescription;
  // optimisation: do not retain extra memory if can recompute
  toolTip = encodeTooltip(escapedToolTip, escapedDescription);
  this.severity = severity;
  setFlag(AFTER_END_OF_LINE_MASK, afterEndOfLine);
  setFlag(NEEDS_UPDATE_ON_TYPING_MASK, calcNeedUpdateOnTyping(needsUpdateOnTyping, type));
  setFlag(FILE_LEVEL_ANNOTATION_MASK, isFileLevelAnnotation);
  this.navigationShift = navigationShift;
  myProblemGroup = problemGroup;
  this.gutterIconRenderer = gutterIconRenderer;
}
项目:consulo    文件:HighlightInfo.java   
public IntentionActionDescriptor(@Nonnull IntentionAction action,
                                 @Nullable final List<IntentionAction> options,
                                 @Nullable final String displayName,
                                 @Nullable Icon icon,
                                 @Nullable HighlightDisplayKey key,
                                 @Nullable ProblemGroup problemGroup,
                                 @Nullable HighlightSeverity severity) {
  myAction = action;
  myOptions = options;
  myDisplayName = displayName;
  myIcon = icon;
  myKey = key;
  myProblemGroup = problemGroup;
  mySeverity = severity;
}
项目:intellij-ce-playground    文件:ProblemDescriptorBase.java   
@Override
@Nullable
public ProblemGroup getProblemGroup() {
  return myProblemGroup;
}
项目:intellij-ce-playground    文件:ProblemDescriptorBase.java   
@Override
public void setProblemGroup(@Nullable ProblemGroup problemGroup) {
  myProblemGroup = problemGroup;
}
项目:intellij-ce-playground    文件:HighlightInfo.java   
@Nullable
public ProblemGroup getProblemGroup() {
  return myProblemGroup;
}
项目:intellij-ce-playground    文件:AndroidLintInspectionBase.java   
@Nullable
@Override
public ProblemGroup getProblemGroup() {
  return myGroup;
}
项目:intellij-ce-playground    文件:AndroidLintInspectionBase.java   
@Override
public void setProblemGroup(@Nullable ProblemGroup problemGroup) {
  myGroup = problemGroup;
}
项目:tools-idea    文件:ProblemDescriptorBase.java   
@Override
@Nullable
public ProblemGroup getProblemGroup() {
  return myProblemGroup;
}
项目:tools-idea    文件:ProblemDescriptorBase.java   
@Override
public void setProblemGroup(@Nullable ProblemGroup problemGroup) {
  myProblemGroup = problemGroup;
}
项目:tools-idea    文件:HighlightInfo.java   
@Nullable
public ProblemGroup getProblemGroup() {
  return myProblemGroup;
}
项目:tools-idea    文件:HighlightInfo.java   
public void setProblemGroup(@Nullable ProblemGroup problemGroup) {
  myProblemGroup = problemGroup;
}
项目:consulo    文件:ProblemDescriptorBase.java   
@Override
@Nullable
public ProblemGroup getProblemGroup() {
  return myProblemGroup;
}
项目:consulo    文件:ProblemDescriptorBase.java   
@Override
public void setProblemGroup(@Nullable ProblemGroup problemGroup) {
  myProblemGroup = problemGroup;
}
项目:consulo    文件:HighlightInfo.java   
@Nullable
public ProblemGroup getProblemGroup() {
  return myProblemGroup;
}
项目:intellij-ce-playground    文件:ProblemDescriptor.java   
/**
 * Gets the unique object, which has the same {@link com.intellij.lang.annotation.ProblemGroup#getProblemName()} for all of the problems of this group
 *
 * @return the problem group
 */
@Nullable
ProblemGroup getProblemGroup();
项目:intellij-ce-playground    文件:ProblemDescriptor.java   
/**
 * Sets the unique object, which has the same {@link com.intellij.lang.annotation.ProblemGroup#getProblemName()} for all of the problems of this group
 *
 * @param problemGroup the problemGroup
 */
void setProblemGroup(@Nullable ProblemGroup problemGroup);
项目:tools-idea    文件:ProblemDescriptor.java   
/**
 * Gets the unique object, which is the same for all of the problems of this group
 *
 * @return the problem group
 */
@Nullable
ProblemGroup getProblemGroup();
项目:tools-idea    文件:ProblemDescriptor.java   
/**
 * Sets the unique object, which is the same for all of the problems of this group
 *
 * @param problemGroup the problemGroup
 */
void setProblemGroup(@Nullable ProblemGroup problemGroup);
项目:consulo    文件:ProblemDescriptor.java   
/**
 * Gets the unique object, which is the same for all of the problems of this group
 *
 * @return the problem group
 */
@Nullable
ProblemGroup getProblemGroup();
项目:consulo    文件:ProblemDescriptor.java   
/**
 * Sets the unique object, which is the same for all of the problems of this group
 *
 * @param problemGroup the problemGroup
 */
void setProblemGroup(@Nullable ProblemGroup problemGroup);