當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。