本文整理汇总了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));
}
}
}
示例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;
}
示例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),
};
}
示例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));
}
示例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));
}
}
}
示例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;
}
示例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];
}
示例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),
};
}
示例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;
}
示例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;
}
示例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> ";
}
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);
}
}
示例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),
};
}
示例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());
}
}
示例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)
};
}
示例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),
};
}