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


Java AttributesDescriptor类代码示例

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


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

示例1: addInspectionSeverityAttributes

import com.intellij.openapi.options.colors.AttributesDescriptor; //导入依赖的package包/类
private static void addInspectionSeverityAttributes(List<AttributesDescriptor> descriptors) {
  descriptors.add(new AttributesDescriptor(OptionsBundle.message("options.java.attribute.descriptor.unknown.symbol"), CodeInsightColors.WRONG_REFERENCES_ATTRIBUTES));
  descriptors.add(new AttributesDescriptor(OptionsBundle.message("options.java.attribute.descriptor.deprecated.symbol"), CodeInsightColors.DEPRECATED_ATTRIBUTES));
  descriptors.add(new AttributesDescriptor(OptionsBundle.message("options.java.attribute.descriptor.unused.symbol"), CodeInsightColors.NOT_USED_ELEMENT_ATTRIBUTES));
  descriptors.add(new AttributesDescriptor(OptionsBundle.message("options.java.attribute.descriptor.error"), CodeInsightColors.ERRORS_ATTRIBUTES));
  descriptors.add(new AttributesDescriptor(OptionsBundle.message("options.java.attribute.descriptor.warning"), CodeInsightColors.WARNINGS_ATTRIBUTES));
  descriptors.add(new AttributesDescriptor(OptionsBundle.message("options.java.attribute.descriptor.weak.warning"), CodeInsightColors.WEAK_WARNING_ATTRIBUTES));
  descriptors.add(new AttributesDescriptor(OptionsBundle.message("options.java.attribute.descriptor.server.problems"), CodeInsightColors.GENERIC_SERVER_ERROR_OR_WARNING));
  descriptors.add(new AttributesDescriptor(OptionsBundle.message("options.java.attribute.descriptor.server.duplicate"), CodeInsightColors.DUPLICATE_FROM_SERVER));

  for (SeveritiesProvider provider : Extensions.getExtensions(SeveritiesProvider.EP_NAME)) {
    for (HighlightInfoType highlightInfoType : provider.getSeveritiesHighlightInfoTypes()) {
      final TextAttributesKey attributesKey = highlightInfoType.getAttributesKey();
      descriptors.add(new AttributesDescriptor(toDisplayName(attributesKey), attributesKey));
    }
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:18,代码来源:ColorSettingsUtil.java

示例2: getAttributeDescriptor

import com.intellij.openapi.options.colors.AttributesDescriptor; //导入依赖的package包/类
@Override
@Nullable
public Pair<ColorSettingsPage,AttributesDescriptor> getAttributeDescriptor(TextAttributesKey key) {
  if (myKeyToDescriptorMap.containsKey(key)) {
    return myKeyToDescriptorMap.get(key);
  }
  else {
    for (ColorSettingsPage page : getRegisteredPages()) {
      for (AttributesDescriptor descriptor : page.getAttributeDescriptors()) {
        if (descriptor.getKey() == key) {
          Pair<ColorSettingsPage,AttributesDescriptor> result = Pair.create(page, descriptor);
          myKeyToDescriptorMap.put(key, result);
          return result;
        }
      }
    }
    myKeyToDescriptorMap.put(key, null);
  }
  return null;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:21,代码来源:ColorSettingsPagesImpl.java

示例3: getAttributeDescriptors

import com.intellij.openapi.options.colors.AttributesDescriptor; //导入依赖的package包/类
@NotNull
public AttributesDescriptor[] getAttributeDescriptors() {
    return new AttributesDescriptor[]{
            new AttributesDescriptor("Keyword", XPathHighlighter.XPATH_KEYWORD),
            new AttributesDescriptor("Name", XPathHighlighter.XPATH_NAME),
            new AttributesDescriptor("Number", XPathHighlighter.XPATH_NUMBER),
            new AttributesDescriptor("String", XPathHighlighter.XPATH_STRING),
            new AttributesDescriptor("Operator", XPathHighlighter.XPATH_OPERATION_SIGN),
            new AttributesDescriptor("Parentheses", XPathHighlighter.XPATH_PARENTH),
            new AttributesDescriptor("Brackets", XPathHighlighter.XPATH_BRACKET),
            new AttributesDescriptor("Function", XPathHighlighter.XPATH_FUNCTION),
            new AttributesDescriptor("Variable", XPathHighlighter.XPATH_VARIABLE),
            new AttributesDescriptor("Extension Prefix", XPathHighlighter.XPATH_PREFIX),
            new AttributesDescriptor("Other", XPathHighlighter.XPATH_TEXT),
    };
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:17,代码来源:XPathColorSettingsPage.java

示例4: JFlexColorPage

import com.intellij.openapi.options.colors.AttributesDescriptor; //导入依赖的package包/类
public JFlexColorPage() {
    attributeDescriptors.add(new AttributesDescriptor("Angle brackets", JFlexHighlighterColors.ANGLE_BRACKETS));
    attributeDescriptors.add(new AttributesDescriptor("Brackets", JFlexHighlighterColors.BRACKETS));
    attributeDescriptors.add(new AttributesDescriptor("Comma", JFlexHighlighterColors.COMMA));
    attributeDescriptors.add(new AttributesDescriptor("Braces", JFlexHighlighterColors.BRACES));
    attributeDescriptors.add(new AttributesDescriptor("Parenths", JFlexHighlighterColors.PARENTHS));
    attributeDescriptors.add(new AttributesDescriptor("Comment", JFlexHighlighterColors.COMMENT));
    attributeDescriptors.add(new AttributesDescriptor("Java code", JFlexHighlighterColors.JAVA_CODE));
    attributeDescriptors.add(new AttributesDescriptor("Macros", JFlexHighlighterColors.MACROS));
    attributeDescriptors.add(new AttributesDescriptor("Macros reference", JFlexHighlighterColors.MACROS_REF));
    attributeDescriptors.add(new AttributesDescriptor("Operator", JFlexHighlighterColors.OPERATION_SIGN));
    attributeDescriptors.add(new AttributesDescriptor("Option", JFlexHighlighterColors.OPTION_BACKGROUND));
    attributeDescriptors.add(new AttributesDescriptor("Option keyword", JFlexHighlighterColors.OPTION_KEYWORD));
    attributeDescriptors.add(new AttributesDescriptor("Option parameter", JFlexHighlighterColors.OPTION_PARAMETER));
    attributeDescriptors.add(new AttributesDescriptor("Option sign", JFlexHighlighterColors.OPTION_SIGN));
    attributeDescriptors.add(new AttributesDescriptor("RegExp", JFlexHighlighterColors.REGEXP_BACKGROUND));
    attributeDescriptors.add(new AttributesDescriptor("RegExp class symbol", JFlexHighlighterColors.REGEXP_CLASS_SYMBOL));
    attributeDescriptors.add(new AttributesDescriptor("RegExp symbol", JFlexHighlighterColors.REGEXP_SYMBOL));
    attributeDescriptors.add(new AttributesDescriptor("Section sign", JFlexHighlighterColors.SECTION_SIGN));
    attributeDescriptors.add(new AttributesDescriptor("State reference", JFlexHighlighterColors.STATE_REF));
    attributeDescriptors.add(new AttributesDescriptor("String", JFlexHighlighterColors.STRING));
}
 
开发者ID:jflex-de,项目名称:idea-jflex,代码行数:23,代码来源:JFlexColorPage.java

示例5: addInspectionSeverityAttributes

import com.intellij.openapi.options.colors.AttributesDescriptor; //导入依赖的package包/类
private static void addInspectionSeverityAttributes(List<AttributesDescriptor> descriptors) {
  descriptors.add(new AttributesDescriptor(OptionsBundle.message("options.java.attribute.descriptor.unknown.symbol"), CodeInsightColors.WRONG_REFERENCES_ATTRIBUTES));
  descriptors.add(new AttributesDescriptor(OptionsBundle.message("options.java.attribute.descriptor.deprecated.symbol"), CodeInsightColors.DEPRECATED_ATTRIBUTES));
  descriptors.add(new AttributesDescriptor(OptionsBundle.message("options.java.attribute.descriptor.unused.symbol"), CodeInsightColors.NOT_USED_ELEMENT_ATTRIBUTES));
  descriptors.add(new AttributesDescriptor(OptionsBundle.message("options.java.attribute.descriptor.error"), CodeInsightColors.ERRORS_ATTRIBUTES));
  descriptors.add(new AttributesDescriptor(OptionsBundle.message("options.java.attribute.descriptor.warning"), CodeInsightColors.WARNINGS_ATTRIBUTES));
  descriptors.add(new AttributesDescriptor(OptionsBundle.message("options.java.attribute.descriptor.weak.warning"), CodeInsightColors.WEAK_WARNING_ATTRIBUTES));
  descriptors.add(new AttributesDescriptor(OptionsBundle.message("options.java.attribute.descriptor.server.problems"), CodeInsightColors.GENERIC_SERVER_ERROR_OR_WARNING));
  descriptors.add(new AttributesDescriptor(OptionsBundle.message("options.java.attribute.descriptor.server.duplicate"), CodeInsightColors.DUPLICATE_FROM_SERVER));

  for (SeveritiesProvider provider : Extensions.getExtensions(SeveritiesProvider.EP_NAME)) {
    for (HighlightInfoType highlightInfoType : provider.getSeveritiesHighlightInfoTypes()) {
      final TextAttributesKey attributesKey = highlightInfoType.getAttributesKey();
      descriptors.add(new AttributesDescriptor(attributesKey.myExternalName, attributesKey));
    }
  }
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:18,代码来源:ColorSettingsUtil.java

示例6: getAttributeDescriptor

import com.intellij.openapi.options.colors.AttributesDescriptor; //导入依赖的package包/类
@Override
@Nullable
public Pair<ColorSettingsPage,AttributesDescriptor> getAttributeDescriptor(TextAttributesKey key) {
  if (myKeyToDescriptorMap.containsKey(key)) {
    return myKeyToDescriptorMap.get(key);
  }
  else {
    for (ColorSettingsPage page : getRegisteredPages()) {
      for (AttributesDescriptor descriptor : page.getAttributeDescriptors()) {
        if (descriptor.getKey() == key) {
          Pair<ColorSettingsPage,AttributesDescriptor> result = new Pair<ColorSettingsPage, AttributesDescriptor>(page, descriptor);
          myKeyToDescriptorMap.put(key, result);
          return result;
        }
      }
    }
    myKeyToDescriptorMap.put(key, null);
  }
  return null;
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:21,代码来源:ColorSettingsPagesImpl.java

示例7: getAttributeDescriptors

import com.intellij.openapi.options.colors.AttributesDescriptor; //导入依赖的package包/类
@NotNull
@Override
public AttributesDescriptor[] getAttributeDescriptors() {

    log.info("Returning Sutr Attribute descriptors");

    if(_descriptors != null){
        return _descriptors;
    }

    return new AttributesDescriptor[0];
}
 
开发者ID:SlalomConsulting,项目名称:sutr-io,代码行数:13,代码来源:SutrColorSettingsPage.java

示例8: getAttributeDescriptors

import com.intellij.openapi.options.colors.AttributesDescriptor; //导入依赖的package包/类
@NotNull
public AttributesDescriptor[] getAttributeDescriptors() {
  return new AttributesDescriptor[] {
    new AttributesDescriptor(OptionsBundle.message("options.java.attribute.descriptor.breakpoint.line"), DebuggerColors.BREAKPOINT_ATTRIBUTES),
    new AttributesDescriptor(OptionsBundle.message("options.java.attribute.descriptor.execution.point"), DebuggerColors.EXECUTIONPOINT_ATTRIBUTES),
    new AttributesDescriptor(OptionsBundle.message("options.java.attribute.descriptor.not.top.frame"), DebuggerColors.NOT_TOP_FRAME_ATTRIBUTES),
    new AttributesDescriptor(OptionsBundle.message("options.java.attribute.descriptor.inlined.values"), DebuggerColors.INLINED_VALUES),
    new AttributesDescriptor(OptionsBundle.message("options.java.attribute.descriptor.inlined.values.modified"), DebuggerColors.INLINED_VALUES_MODIFIED),
    new AttributesDescriptor(OptionsBundle.message("options.java.attribute.descriptor.inlined.values.execution.line"), DebuggerColors.INLINED_VALUES_EXECUTION_LINE),
  };
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:12,代码来源:DebuggerColorsPage.java

示例9: keyToDisplayTextMap

import com.intellij.openapi.options.colors.AttributesDescriptor; //导入依赖的package包/类
public static Map<TextAttributesKey, String> keyToDisplayTextMap(final ColorSettingsPage page) {
  final List<AttributesDescriptor> attributeDescriptors = getAllAttributeDescriptors(page);
  final Map<TextAttributesKey, String> displayText = new HashMap<TextAttributesKey, String>();
  for (AttributesDescriptor attributeDescriptor : attributeDescriptors) {
    final TextAttributesKey key = attributeDescriptor.getKey();
    displayText.put(key, attributeDescriptor.getDisplayName());
  }
  return displayText;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:10,代码来源:ColorSettingsUtil.java

示例10: getAllAttributeDescriptors

import com.intellij.openapi.options.colors.AttributesDescriptor; //导入依赖的package包/类
public static List<AttributesDescriptor> getAllAttributeDescriptors(ColorAndFontDescriptorsProvider provider) {
  List<AttributesDescriptor> result = new ArrayList<AttributesDescriptor>();
  Collections.addAll(result, provider.getAttributeDescriptors());
  if (isInspectionColorsPage(provider)) {
    addInspectionSeverityAttributes(result);
  }
  return result;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:9,代码来源:ColorSettingsUtil.java

示例11: setInheritanceInfo

import com.intellij.openapi.options.colors.AttributesDescriptor; //导入依赖的package包/类
private void setInheritanceInfo(ColorAndFontDescription description) {
  Pair<ColorSettingsPage, AttributesDescriptor> baseDescriptor = description.getBaseAttributeDescriptor();
  if (baseDescriptor != null && baseDescriptor.second.getDisplayName() != null) {
    String attrName = baseDescriptor.second.getDisplayName();
    String attrLabel = attrName.replaceAll(ColorOptionsTree.NAME_SEPARATOR, FontUtil.rightArrow(UIUtil.getLabelFont()));
    ColorSettingsPage settingsPage = baseDescriptor.first;
    String style = "<div style=\"text-align:right\" vertical-align=\"top\">";
    String tooltipText;
    String labelText;
    if (settingsPage != null) {
      String pageName = settingsPage.getDisplayName();
      tooltipText = "'" + attrLabel + "' from<br>'" + pageName + "' section";
      labelText = style + "'" + attrLabel + "'<br>of <a href=\"" + attrName + "\">" + pageName;
    }
    else {
      tooltipText = attrLabel;
      labelText = style + attrLabel + "<br>&nbsp;";
    }

    myInheritanceLabel.setVisible(true);
    myInheritanceLabel.setText(labelText);
    myInheritanceLabel.setToolTipText(tooltipText);
    myInheritanceLabel.setEnabled(true);
    myInheritAttributesBox.setVisible(true);
    myInheritAttributesBox.setEnabled(true);
    myInheritAttributesBox.setSelected(description.isInherited());
    setEditEnabled(!description.isInherited(), description);
  }
  else {
    myInheritanceLabel.setVisible(false);
    myInheritAttributesBox.setSelected(false);
    myInheritAttributesBox.setVisible(false);
    setEditEnabled(true, description);
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:36,代码来源:ColorAndFontDescriptionPanel.java

示例12: getAttributeDescriptors

import com.intellij.openapi.options.colors.AttributesDescriptor; //导入依赖的package包/类
@NotNull
public AttributesDescriptor[] getAttributeDescriptors() {
  return new AttributesDescriptor[] {
    new AttributesDescriptor(OptionsBundle.message("options.java.attribute.descriptor.breakpoint.line"), DebuggerColors.BREAKPOINT_ATTRIBUTES),
    new AttributesDescriptor(OptionsBundle.message("options.java.attribute.descriptor.execution.point"), DebuggerColors.EXECUTIONPOINT_ATTRIBUTES),
  };
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:8,代码来源:DebuggerColorsPage.java

示例13: setInheritanceLabel

import com.intellij.openapi.options.colors.AttributesDescriptor; //导入依赖的package包/类
private void setInheritanceLabel(ColorAndFontDescription description) {
  Pair<ColorSettingsPage, AttributesDescriptor> baseDescriptor = description.getBaseAttributeDescriptor();
  if (baseDescriptor != null && baseDescriptor.second.getDisplayName() != null) {
    String attrName = baseDescriptor.second.getDisplayName();
    ColorSettingsPage settingsPage = baseDescriptor.first;
    String pageName = "?";
    if (settingsPage != null) {
      pageName = settingsPage.getDisplayName();
    }
    String tooltipText = attrName + " (" + pageName + ")";
    String labelText = tooltipText;
    if (labelText.length() > 30 && pageName.length() >= 4) {
      labelText = attrName + " (" + pageName.substring(0, 4) + "...)";
    }
    if (description.isInherited()) {
      myInheritanceLabel.setIcon(INHERITED_ICON);
    }
    else {
      myInheritanceLabel.setDisabledIcon(INHERITED_ICON);
    }
    myInheritanceLabel.setText(labelText);
    myInheritanceLabel.setToolTipText(tooltipText);
    myInheritanceLabel.setForeground(myLabelFont.getForeground());
    myInheritanceLabel.setEnabled(description.isInherited());
  }
  else {
    myInheritanceLabel.setText("X");
    myInheritanceLabel.setIcon(null);
    myInheritanceLabel.setDisabledIcon(null);
    myInheritanceLabel.setEnabled(true);
    myInheritanceLabel.setForeground(myLabelFont.getBackground());
  }
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:34,代码来源:ColorAndFontDescriptionPanel.java

示例14: getAttributeDescriptors

import com.intellij.openapi.options.colors.AttributesDescriptor; //导入依赖的package包/类
@NotNull
@Override
public AttributesDescriptor[] getAttributeDescriptors()
{
	return new AttributesDescriptor[]
	{
			new AttributesDescriptor("Play tag start", PlayJavaColors.TEMPLATE_ELEMENTS),
			new AttributesDescriptor("Play tag name", PlayJavaColors.PLAY_TAG_NAME),
			new AttributesDescriptor("Route method", PlayJavaColors.ROUTE_METHOD)
	};
}
 
开发者ID:consulo,项目名称:consulo-play,代码行数:12,代码来源:PlayJavaColorSettingsPage.java

示例15: getAttributeDescriptors

import com.intellij.openapi.options.colors.AttributesDescriptor; //导入依赖的package包/类
@Override
@Nonnull
public AttributesDescriptor[] getAttributeDescriptors() {
  return new AttributesDescriptor[] {
          new AttributesDescriptor(OptionsBundle.message("options.java.attribute.descriptor.breakpoint.line"), DebuggerColors.BREAKPOINT_ATTRIBUTES),
          new AttributesDescriptor(OptionsBundle.message("options.java.attribute.descriptor.execution.point"), DebuggerColors.EXECUTIONPOINT_ATTRIBUTES),
          new AttributesDescriptor(OptionsBundle.message("options.java.attribute.descriptor.not.top.frame"), DebuggerColors.NOT_TOP_FRAME_ATTRIBUTES),
          new AttributesDescriptor(OptionsBundle.message("options.java.attribute.descriptor.inlined.values"), DebuggerColors.INLINED_VALUES),
          new AttributesDescriptor(OptionsBundle.message("options.java.attribute.descriptor.inlined.values.modified"), DebuggerColors.INLINED_VALUES_MODIFIED),
          new AttributesDescriptor(OptionsBundle.message("options.java.attribute.descriptor.inlined.values.execution.line"), DebuggerColors.INLINED_VALUES_EXECUTION_LINE),
  };
}
 
开发者ID:consulo,项目名称:consulo,代码行数:13,代码来源:DebuggerColorsPage.java


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