当前位置: 首页>>代码示例>>Java>>正文


Java SuppressManager类代码示例

本文整理汇总了Java中com.intellij.codeInspection.SuppressManager的典型用法代码示例。如果您正苦于以下问题:Java SuppressManager类的具体用法?Java SuppressManager怎么用?Java SuppressManager使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


SuppressManager类属于com.intellij.codeInspection包,在下文中一共展示了SuppressManager类的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: getTokenizer

import com.intellij.codeInspection.SuppressManager; //导入依赖的package包/类
@NotNull
@Override
public Tokenizer getTokenizer(PsiElement element) {
  if (element instanceof PsiMethod) {
    return myMethodNameTokenizer;
  }
  if (element instanceof PsiDocComment) {
    return myDocCommentTokenizer;
  }
  if (element instanceof PsiLiteralExpression) {
    if (SuppressManager.isSuppressedInspectionName((PsiLiteralExpression)element)) {
      return EMPTY_TOKENIZER;
    }
    return myLiteralExpressionTokenizer;
  }
  if (element instanceof PsiNamedElement) {
    return myNamedElementTokenizer;
  }

  return super.getTokenizer(element);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:22,代码来源:JavaSpellcheckingStrategy.java

示例2: shouldCheck

import com.intellij.codeInspection.SuppressManager; //导入依赖的package包/类
private boolean shouldCheck(@NotNull Project project, @NotNull PsiLiteralExpression expression)
{
	if(IGNORE_PROPERTY_KEYS && JavaI18nUtil.mustBePropertyKey(project, expression, new THashMap<String, Object>()))
	{
		return false;
	}
	return !SuppressManager.isSuppressedInspectionName(expression);
}
 
开发者ID:consulo,项目名称:consulo-java,代码行数:9,代码来源:DuplicateStringLiteralInspection.java

示例3: visitAnnotation

import com.intellij.codeInspection.SuppressManager; //导入依赖的package包/类
@Override
public void visitAnnotation(PsiAnnotation annotation) {
  super.visitAnnotation(annotation);
  final PsiJavaCodeReferenceElement reference =
    annotation.getNameReferenceElement();
  if (reference == null) {
    return;
  }
  @NonNls final String text = reference.getText();
  if ("SuppressWarnings".equals(text) ||
      SuppressManager.SUPPRESS_INSPECTIONS_ANNOTATION_NAME.equals(text)) {
    registerError(annotation);
  }
}
 
开发者ID:consulo,项目名称:consulo-java,代码行数:15,代码来源:SuppressionAnnotationInspection.java

示例4: isToCheckMember

import com.intellij.codeInspection.SuppressManager; //导入依赖的package包/类
@Override
public boolean isToCheckMember(@NotNull final PsiElement element, @NotNull final String id) {
  return SuppressManager.getInstance().getElementToolSuppressedIn(element, id) == null;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:5,代码来源:JavaInspectionExtensionsFactory.java

示例5: getSuppressedInspectionIdsIn

import com.intellij.codeInspection.SuppressManager; //导入依赖的package包/类
@Override
@Nullable
public String getSuppressedInspectionIdsIn(@NotNull final PsiElement element) {
  return SuppressManager.getInstance().getSuppressedInspectionIdsIn(element);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:6,代码来源:JavaInspectionExtensionsFactory.java

示例6: isToCheckMember

import com.intellij.codeInspection.SuppressManager; //导入依赖的package包/类
@Override
public boolean isToCheckMember(final PsiElement element, final String id) {
  return SuppressManager.getInstance().getElementToolSuppressedIn(element, id) == null;
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:5,代码来源:JavaInspectionExtensionsFactory.java

示例7: getSuppressedInspectionIdsIn

import com.intellij.codeInspection.SuppressManager; //导入依赖的package包/类
@Override
@Nullable
public String getSuppressedInspectionIdsIn(final PsiElement element) {
  return SuppressManager.getInstance().getSuppressedInspectionIdsIn(element);
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:6,代码来源:JavaInspectionExtensionsFactory.java

示例8: isSuppressedFor

import com.intellij.codeInspection.SuppressManager; //导入依赖的package包/类
@Override
public boolean isSuppressedFor(@NotNull PsiElement element, @NotNull String name) {
  return SuppressManager.getInstance().isSuppressedFor(element, name);
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:5,代码来源:JavaSpellcheckingStrategy.java


注:本文中的com.intellij.codeInspection.SuppressManager类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。