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


Java SpecialAnnotationsUtil类代码示例

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


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

示例1: configureAnnotations

import com.intellij.codeInspection.util.SpecialAnnotationsUtil; //导入依赖的package包/类
@Override
public void configureAnnotations() {
  final List<String> list = new ArrayList<String>(ADDITIONAL_ANNOTATIONS);
  final JPanel listPanel = SpecialAnnotationsUtil.createSpecialAnnotationsListControl(list, "Do not check if annotated by", true);
  new DialogWrapper(myProject) {
    {
      init();
      setTitle("Configure Annotations");
    }

    @Override
    protected JComponent createCenterPanel() {
      return listPanel;
    }

    @Override
    protected void doOKAction() {
      ADDITIONAL_ANNOTATIONS.clear();
      ADDITIONAL_ANNOTATIONS.addAll(list);
      DaemonCodeAnalyzer.getInstance(myProject).restart();
      super.doOKAction();
    }
  }.show();
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:25,代码来源:EntryPointsManagerImpl.java

示例2: createOptionsPanel

import com.intellij.codeInspection.util.SpecialAnnotationsUtil; //导入依赖的package包/类
@Override
public JComponent createOptionsPanel() {
  final JPanel panel = new JPanel(new GridBagLayout());
  final JPanel annotationsListControl = SpecialAnnotationsUtil.createSpecialAnnotationsListControl(
    ignorableAnnotations, InspectionGadgetsBundle.message("ignore.if.annotated.by"));
  final GridBagConstraints constraints = new GridBagConstraints();
  constraints.gridx = 0;
  constraints.gridy = 0;
  constraints.weightx = 1.0;
  constraints.weighty = 1.0;
  constraints.anchor = GridBagConstraints.WEST;
  constraints.fill = GridBagConstraints.BOTH;
  panel.add(annotationsListControl, constraints);
  constraints.gridy++;
  constraints.weighty = 0.0;
  constraints.fill = GridBagConstraints.HORIZONTAL;
  final CheckBox checkBox1 = new CheckBox(InspectionGadgetsBundle.message("empty.class.ignore.parameterization.option"),
                                                 this, "ignoreClassWithParameterization");
  panel.add(checkBox1, constraints);
  constraints.gridy++;
  final CheckBox checkBox2 = new CheckBox("Ignore subclasses of java.lang.Throwable", this, "ignoreThrowables");
  panel.add(checkBox2, constraints);
  return panel;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:25,代码来源:EmptyClassInspection.java

示例3: createOptionsPanel

import com.intellij.codeInspection.util.SpecialAnnotationsUtil; //导入依赖的package包/类
@Override
public JComponent createOptionsPanel() {
  final JComponent panel = new JPanel(new GridBagLayout());

  final JPanel annotationsPanel = SpecialAnnotationsUtil.createSpecialAnnotationsListControl(
    annotationNames, InspectionGadgetsBundle.message("ignore.if.annotated.by"));
  final CheckBox checkBox = new CheckBox(InspectionGadgetsBundle.message("primitive.fields.ignore.option"), this, "m_ignorePrimitives");

  final GridBagConstraints constraints = new GridBagConstraints();
  constraints.gridx = 0;
  constraints.gridy = 0;
  constraints.weightx = 1.0;
  constraints.weighty = 1.0;
  constraints.fill = GridBagConstraints.BOTH;
  panel.add(annotationsPanel, constraints);

  constraints.gridy = 1;
  constraints.weighty = 0.0;
  constraints.fill = GridBagConstraints.HORIZONTAL;
  panel.add(checkBox, constraints);

  return panel;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:24,代码来源:InstanceVariableUninitializedUseInspection.java

示例4: createOptionsPanel

import com.intellij.codeInspection.util.SpecialAnnotationsUtil; //导入依赖的package包/类
@Override
public JComponent createOptionsPanel() {
  final JPanel panel = new JPanel(new GridBagLayout());
  final JPanel annotationsListControl = SpecialAnnotationsUtil.createSpecialAnnotationsListControl(
      ignorableAnnotations, InspectionGadgetsBundle.message("ignore.if.annotated.by"));
  final GridBagConstraints constraints = new GridBagConstraints();
  constraints.gridx = 0;
  constraints.gridy = 0;
  constraints.weighty = 1.0;
  constraints.weightx = 1.0;
  constraints.anchor = GridBagConstraints.CENTER;
  constraints.fill = GridBagConstraints.BOTH;
  panel.add(annotationsListControl, constraints);
  final CheckBox checkBox = new CheckBox(InspectionGadgetsBundle.message(
    "public.method.not.in.interface.option"), this, "onlyWarnIfContainingClassImplementsAnInterface");
  constraints.gridy = 1;
  constraints.weighty = 0.0;
  constraints.anchor = GridBagConstraints.WEST;
  constraints.fill = GridBagConstraints.HORIZONTAL;
  panel.add(checkBox, constraints);
  return panel;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:23,代码来源:PublicMethodNotExposedInInterfaceInspection.java

示例5: configureAnnotations

import com.intellij.codeInspection.util.SpecialAnnotationsUtil; //导入依赖的package包/类
@Override
public void configureAnnotations() {
  final List<String> list = new ArrayList<String>(ADDITIONAL_ANNOTATIONS);
  final JPanel listPanel = SpecialAnnotationsUtil.createSpecialAnnotationsListControl(list, "Do not check if annotated by", true);
  new DialogWrapper(myProject) {
    {
      init();
      setTitle("Configure annotations");
    }

    @Override
    protected JComponent createCenterPanel() {
      return listPanel;
    }

    @Override
    protected void doOKAction() {
      ADDITIONAL_ANNOTATIONS.clear();
      ADDITIONAL_ANNOTATIONS.addAll(list);
      DaemonCodeAnalyzer.getInstance(myProject).restart();
      super.doOKAction();
    }
  }.show();
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:25,代码来源:EntryPointsManagerImpl.java

示例6: createOptionsPanel

import com.intellij.codeInspection.util.SpecialAnnotationsUtil; //导入依赖的package包/类
@Override
@Nullable
public JComponent createOptionsPanel() {
  final JPanel listPanel = SpecialAnnotationsUtil
    .createSpecialAnnotationsListControl(EXCLUDE_ANNOS, InspectionsBundle.message("special.annotations.annotations.list"));

  final JPanel panel = new JPanel(new BorderLayout(2, 2));
  panel.add(listPanel, BorderLayout.CENTER);
  return panel;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:11,代码来源:EmptyMethodInspection.java

示例7: createOptionsPanel

import com.intellij.codeInspection.util.SpecialAnnotationsUtil; //导入依赖的package包/类
@Nullable
@Override
public JComponent createOptionsPanel() {
  final JPanel listPanel = SpecialAnnotationsUtil
    .createSpecialAnnotationsListControl(EXCLUDE_ANNOS, InspectionsBundle.message("special.annotations.annotations.list"));

  final JPanel panel = new JPanel(new BorderLayout(2, 2));
  panel.add(new SingleCheckboxOptionsPanel("Ignore fields used in multiple methods", this, "IGNORE_FIELDS_USED_IN_MULTIPLE_METHODS"), BorderLayout.NORTH);
  panel.add(listPanel, BorderLayout.CENTER);
  return panel;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:12,代码来源:FieldCanBeLocalInspection.java

示例8: createAddToDependencyInjectionAnnotationsFix

import com.intellij.codeInspection.util.SpecialAnnotationsUtil; //导入依赖的package包/类
@NotNull
@Override
public IntentionAction createAddToDependencyInjectionAnnotationsFix(@NotNull Project project,
                                                                    @NotNull String qualifiedName,
                                                                    @NotNull String element) {
  final EntryPointsManagerBase entryPointsManager = EntryPointsManagerBase.getInstance(project);
  return SpecialAnnotationsUtil.createAddToSpecialAnnotationsListIntentionAction(
    QuickFixBundle.message("fix.unused.symbol.injection.text", element, qualifiedName),
    QuickFixBundle.message("fix.unused.symbol.injection.family"),
    entryPointsManager.ADDITIONAL_ANNOTATIONS, qualifiedName);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:12,代码来源:QuickFixFactoryImpl.java

示例9: createOptionsPanel

import com.intellij.codeInspection.util.SpecialAnnotationsUtil; //导入依赖的package包/类
@Override
public JComponent createOptionsPanel() {
  final JPanel panel = new JPanel(new BorderLayout());
  final JPanel annotationsListControl = SpecialAnnotationsUtil.createSpecialAnnotationsListControl(annotations, null);
  final JCheckBox checkBox1 = new CheckBox("Only report when super method is annotated by:", this, "onlyReportWhenAnnotated");
  final CheckBox checkBox2 = new CheckBox(InspectionGadgetsBundle.message("refused.bequest.ignore.empty.super.methods.option"),
                                          this, "ignoreEmptySuperMethods");

  panel.add(checkBox1, BorderLayout.NORTH);
  panel.add(annotationsListControl, BorderLayout.CENTER);
  panel.add(checkBox2, BorderLayout.SOUTH);

  return panel;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:15,代码来源:RefusedBequestInspection.java

示例10: createOptionsPanel

import com.intellij.codeInspection.util.SpecialAnnotationsUtil; //导入依赖的package包/类
@Override
@Nullable
public JComponent createOptionsPanel() {
  final JPanel panel = new JPanel(new BorderLayout());
  final JPanel annotationsPanel = SpecialAnnotationsUtil.createSpecialAnnotationsListControl(
    ignorableAnnotations, InspectionGadgetsBundle.message("ignore.if.annotated.by"));
  panel.add(annotationsPanel, BorderLayout.CENTER);
  final CheckBox checkBox = new CheckBox(InspectionGadgetsBundle.message("utility.class.without.private.constructor.option"),
                                         this, "ignoreClassesWithOnlyMain");
  panel.add(checkBox, BorderLayout.SOUTH);
  return panel;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:13,代码来源:UtilityClassWithoutPrivateConstructorInspection.java

示例11: createOptionsPanel

import com.intellij.codeInspection.util.SpecialAnnotationsUtil; //导入依赖的package包/类
@Override
@Nullable
public JComponent createOptionsPanel() {
  final JPanel panel = new JPanel(new BorderLayout());
  final JPanel annotationsListControl = SpecialAnnotationsUtil.createSpecialAnnotationsListControl(
    ignorableAnnotations, InspectionGadgetsBundle.message("ignore.if.annotated.by"));
  panel.add(annotationsListControl, BorderLayout.CENTER);
  final CheckBox checkBox = new CheckBox(InspectionGadgetsBundle.message(
    "public.field.ignore.enum.type.fields.option"), this, "ignoreEnums");
  panel.add(checkBox, BorderLayout.SOUTH);
  return panel;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:13,代码来源:PublicFieldInspection.java

示例12: createQuickFix

import com.intellij.codeInspection.util.SpecialAnnotationsUtil; //导入依赖的package包/类
public static IntentionAction createQuickFix(@NonNls String qualifiedName, @Nls String element, Project project) {
  final EntryPointsManagerBase entryPointsManager = EntryPointsManagerBase.getInstance(project);
  return SpecialAnnotationsUtil.createAddToSpecialAnnotationsListIntentionAction(
    QuickFixBundle.message("fix.unused.symbol.injection.text", element, qualifiedName),
    QuickFixBundle.message("fix.unused.symbol.injection.family"),
    entryPointsManager.ADDITIONAL_ANNOTATIONS, qualifiedName);
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:8,代码来源:UnusedSymbolLocalInspection.java

示例13: configureAnnotations

import com.intellij.codeInspection.util.SpecialAnnotationsUtil; //导入依赖的package包/类
@Override
public void configureAnnotations()
{
	final List<String> list = new ArrayList<String>(ADDITIONAL_ANNOTATIONS);
	final JPanel listPanel = SpecialAnnotationsUtil.createSpecialAnnotationsListControl(list,
			"Do not check if annotated by", true);
	new DialogWrapper(myProject)
	{
		{
			init();
			setTitle("Configure Annotations");
		}

		@Override
		protected JComponent createCenterPanel()
		{
			return listPanel;
		}

		@Override
		protected void doOKAction()
		{
			ADDITIONAL_ANNOTATIONS.clear();
			ADDITIONAL_ANNOTATIONS.addAll(list);
			DaemonCodeAnalyzer.getInstance(myProject).restart();
			super.doOKAction();
		}
	}.show();
}
 
开发者ID:consulo,项目名称:consulo-java,代码行数:30,代码来源:EntryPointsManagerImpl.java

示例14: createOptionsPanel

import com.intellij.codeInspection.util.SpecialAnnotationsUtil; //导入依赖的package包/类
@Nullable
@Override
public JComponent createOptionsPanel() {
  final JPanel listPanel = SpecialAnnotationsUtil
    .createSpecialAnnotationsListControl(EXCLUDE_ANNOS, InspectionsBundle.message("special.annotations.annotations.list"));

  final JPanel panel = new JPanel(new BorderLayout(2, 2));
  panel.add(listPanel, BorderLayout.CENTER);
  return panel;
}
 
开发者ID:consulo,项目名称:consulo-java,代码行数:11,代码来源:FieldCanBeLocalInspection.java

示例15: createAddToDependencyInjectionAnnotationsFix

import com.intellij.codeInspection.util.SpecialAnnotationsUtil; //导入依赖的package包/类
@NotNull
@Override
public IntentionAction createAddToDependencyInjectionAnnotationsFix(@NotNull Project project, @NotNull String qualifiedName, @NotNull String element)
{
	final EntryPointsManagerBase entryPointsManager = EntryPointsManagerBase.getInstance(project);
	return SpecialAnnotationsUtil.createAddToSpecialAnnotationsListIntentionAction(JavaQuickFixBundle.message("fix.unused.symbol.injection.text", element, qualifiedName), JavaQuickFixBundle.message
			("fix" +
			".unused.symbol.injection.family"), entryPointsManager.ADDITIONAL_ANNOTATIONS, qualifiedName);
}
 
开发者ID:consulo,项目名称:consulo-java,代码行数:10,代码来源:QuickFixFactoryImpl.java


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