mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
show "native" description for node objects
This commit is contained in:
+1
-1
@@ -23,7 +23,7 @@ import org.jetbrains.annotations.NotNull;
|
||||
public class XKeywordValuePresentation extends XValuePresentation {
|
||||
private final String myValue;
|
||||
|
||||
public XKeywordValuePresentation(String value) {
|
||||
public XKeywordValuePresentation(@NotNull String value) {
|
||||
myValue = value;
|
||||
}
|
||||
|
||||
|
||||
+3
@@ -15,6 +15,7 @@
|
||||
*/
|
||||
package com.intellij.xdebugger.frame.presentation;
|
||||
|
||||
import com.intellij.ui.SimpleTextAttributes;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
@@ -71,6 +72,8 @@ public abstract class XValuePresentation {
|
||||
*/
|
||||
void renderKeywordValue(@NotNull String value);
|
||||
|
||||
void renderValue(@NotNull String value, @Nullable SimpleTextAttributes attributes);
|
||||
|
||||
/**
|
||||
* Appends {@code value} surrounded by quotes to the node text colored as a string
|
||||
* @param value value to be shown
|
||||
|
||||
+5
@@ -124,6 +124,11 @@ public class XValuePresentationUtil {
|
||||
myBuilder.append(symbol);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void renderValue(@NotNull String value, @Nullable SimpleTextAttributes attributes) {
|
||||
renderValue(value);
|
||||
}
|
||||
|
||||
public String getText() {
|
||||
return myBuilder.toString();
|
||||
}
|
||||
|
||||
+6
@@ -21,6 +21,7 @@ import com.intellij.openapi.editor.colors.TextAttributesKey;
|
||||
import com.intellij.openapi.editor.markup.TextAttributes;
|
||||
import com.intellij.ui.ColoredTextContainer;
|
||||
import com.intellij.ui.SimpleTextAttributes;
|
||||
import com.intellij.util.ObjectUtils;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
@@ -39,6 +40,11 @@ class XValueTextRendererImpl extends XValueTextRendererBase {
|
||||
XValuePresentationUtil.renderValue(value, myText, SimpleTextAttributes.REGULAR_ATTRIBUTES, -1, null);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void renderValue(@NotNull String value, @Nullable SimpleTextAttributes attributes) {
|
||||
myText.append(value, ObjectUtils.notNull(attributes, SimpleTextAttributes.REGULAR_ATTRIBUTES));
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void renderRawValue(@NotNull String value, @NotNull TextAttributesKey key) {
|
||||
TextAttributes textAttributes = EditorColorsManager.getInstance().getGlobalScheme().getAttributes(key);
|
||||
|
||||
Reference in New Issue
Block a user