本文整理汇总了Java中com.intellij.xdebugger.frame.presentation.XValuePresentation类的典型用法代码示例。如果您正苦于以下问题:Java XValuePresentation类的具体用法?Java XValuePresentation怎么用?Java XValuePresentation使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
XValuePresentation类属于com.intellij.xdebugger.frame.presentation包,在下文中一共展示了XValuePresentation类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: applyPresentation
import com.intellij.xdebugger.frame.presentation.XValuePresentation; //导入依赖的package包/类
@Override
public void applyPresentation(@Nullable Icon icon, @NotNull XValuePresentation valuePresentation, boolean hasChildren) {
// extra check for obsolete nodes - tree root was changed
// too dangerous to put this into isObsolete - it is called from anywhere, not only EDT
if (isObsolete()) return;
XDebuggerTreeNode root = getTree().getRoot();
if (root != null && !TreeUtil.isAncestor(root, this)) return;
setIcon(icon);
myValuePresentation = valuePresentation;
myRawValue = XValuePresentationUtil.computeValueText(valuePresentation);
if (Registry.is("ide.debugger.inline")) {
updateInlineDebuggerData();
}
updateText();
setLeaf(!hasChildren);
fireNodeChanged();
myTree.nodeLoaded(this, myName);
}
示例2: doSetPresentation
import com.intellij.xdebugger.frame.presentation.XValuePresentation; //导入依赖的package包/类
private static void doSetPresentation(@Nullable final Icon icon,
@NotNull final XValuePresentation presentation,
final boolean hasChildren,
final ConfigurableXValueNode node) {
Application application = ApplicationManager.getApplication();
if (application.isDispatchThread()) {
node.applyPresentation(icon, presentation, hasChildren);
}
else {
Runnable updater = new Runnable() {
@Override
public void run() {
node.applyPresentation(icon, presentation, hasChildren);
}
};
if (node instanceof XDebuggerTreeNode) {
((XDebuggerTreeNode)node).invokeNodeUpdate(updater);
}
else {
application.invokeLater(updater);
}
}
}
示例3: SetValueInplaceEditor
import com.intellij.xdebugger.frame.presentation.XValuePresentation; //导入依赖的package包/类
private SetValueInplaceEditor(final XValueNodeImpl node, @NotNull final String nodeName) {
super(node, "setValue");
myValueNode = node;
myModifier = myValueNode.getValueContainer().getModifier();
myEditorPanel = new JPanel();
myEditorPanel.setLayout(new BorderLayout(0, 0));
SimpleColoredComponent nameLabel = new SimpleColoredComponent();
nameLabel.setIcon(getNode().getIcon());
nameLabel.append(nodeName, XDebuggerUIConstants.VALUE_NAME_ATTRIBUTES);
XValuePresentation presentation = node.getValuePresentation();
if (presentation != null) {
XValuePresentationUtil.appendSeparator(nameLabel, presentation.getSeparator());
}
myEditorPanel.add(nameLabel, BorderLayout.WEST);
myEditorPanel.add(myExpressionEditor.getComponent(), BorderLayout.CENTER);
}
示例4: applyPresentation
import com.intellij.xdebugger.frame.presentation.XValuePresentation; //导入依赖的package包/类
@Override
public void applyPresentation(@Nullable Icon icon, @Nonnull XValuePresentation valuePresentation, boolean hasChildren) {
// extra check for obsolete nodes - tree root was changed
// too dangerous to put this into isObsolete - it is called from anywhere, not only EDT
if (isObsolete()) return;
setIcon(icon);
myValuePresentation = valuePresentation;
myRawValue = XValuePresentationUtil.computeValueText(valuePresentation);
if (XDebuggerSettingsManager.getInstance().getDataViewSettings().isShowValuesInline()) {
updateInlineDebuggerData();
}
updateText();
setLeaf(!hasChildren);
fireNodeChanged();
myTree.nodeLoaded(this, myName);
}
示例5: SetValueInplaceEditor
import com.intellij.xdebugger.frame.presentation.XValuePresentation; //导入依赖的package包/类
private SetValueInplaceEditor(final XValueNodeImpl node, @Nonnull final String nodeName) {
super(node, "setValue");
myValueNode = node;
myModifier = myValueNode.getValueContainer().getModifier();
SimpleColoredComponent nameLabel = new SimpleColoredComponent();
nameLabel.getIpad().right = 0;
nameLabel.getIpad().left = 0;
nameLabel.setIcon(myNode.getIcon());
nameLabel.append(nodeName, XDebuggerUIConstants.VALUE_NAME_ATTRIBUTES);
XValuePresentation presentation = node.getValuePresentation();
if (presentation != null) {
XValuePresentationUtil.appendSeparator(nameLabel, presentation.getSeparator());
}
myNameOffset = nameLabel.getPreferredSize().width;
myEditorPanel = JBUI.Panels.simplePanel(myExpressionEditor.getComponent());
}
示例6: computePresentation
import com.intellij.xdebugger.frame.presentation.XValuePresentation; //导入依赖的package包/类
@Override
public void computePresentation(@NotNull XValueNode node, @NotNull XValuePlace place)
{
node.setPresentation(myIcon, new XValuePresentation()
{
@NotNull
@Override
public String getSeparator()
{
return "";
}
@Override
public void renderValue(@NotNull XValueTextRenderer renderer)
{
renderer.renderValue(myMessage);
}
}, false);
}
示例7: getPresentation
import com.intellij.xdebugger.frame.presentation.XValuePresentation; //导入依赖的package包/类
@NotNull
private XValuePresentation getPresentation() {
final String stringValue = myValueAsString;
if (isNumber()) return new XNumericValuePresentation(stringValue);
if (isString()) return new XStringValuePresentation(stringValue);
if (isBool()) {
return new XValuePresentation() {
@Override
public void renderValue(@NotNull XValueTextRenderer renderer) {
renderer.renderValue(stringValue);
}
};
}
return new XRegularValuePresentation(ObjectUtils.notNull(ObjectUtils.coalesce(Arrays.asList(stringValue, identityValue, ""))), myTypeName);
}
示例8: computePresentation
import com.intellij.xdebugger.frame.presentation.XValuePresentation; //导入依赖的package包/类
@Override
public void computePresentation(@NotNull XValueNode node, @NotNull XValuePlace place) {
node.setPresentation(myIcon, new XValuePresentation() {
@NotNull
@Override
public String getSeparator() {
return "";
}
@Override
public void renderValue(@NotNull XValueTextRenderer renderer) {
renderer.renderValue(myMessage);
}
}, false);
}
示例9: computePresentation
import com.intellij.xdebugger.frame.presentation.XValuePresentation; //导入依赖的package包/类
@Override
public void computePresentation(@NotNull final XValueNode node, @NotNull final XValuePlace place) {
if (!myIsField) {
super.computePresentation(node, place);
}
else {
super.computePresentation(new XValueNodePresentationConfigurator.ConfigurableXValueNodeImpl() {
@Override
public void applyPresentation(@Nullable Icon icon, @NotNull final XValuePresentation valuePresenter, boolean hasChildren) {
node.setPresentation(icon, new XValuePresentation() {
@NotNull
@Override
public String getSeparator() {
return " in ";
}
@Nullable
@Override
public String getType() {
return valuePresenter.getType();
}
@Override
public void renderValue(@NotNull XValueTextRenderer renderer) {
valuePresenter.renderValue(renderer);
}
}, hasChildren);
}
@Override
public void setFullValueEvaluator(@NotNull XFullValueEvaluator fullValueEvaluator) {
}
@Override
public boolean isObsolete() {
return false;
}
}, place);
}
}
示例10: checkExtendedModified
import com.intellij.xdebugger.frame.presentation.XValuePresentation; //导入依赖的package包/类
private static boolean checkExtendedModified(RestorableStateNode treeNode) {
if (treeNode instanceof XValueNodeImpl) {
XValuePresentation presentation = ((XValueNodeImpl)treeNode).getValuePresentation();
if (presentation instanceof XValueExtendedPresentation) {
if (((XValueExtendedPresentation)presentation).isModified()) {
treeNode.markChanged();
}
return true;
}
}
return false;
}
示例11: buildText
import com.intellij.xdebugger.frame.presentation.XValuePresentation; //导入依赖的package包/类
public static void buildText(@NotNull XValuePresentation valuePresenter, @NotNull ColoredTextContainer text, boolean appendSeparator) {
if (appendSeparator) {
XValuePresentationUtil.appendSeparator(text, valuePresenter.getSeparator());
}
String type = valuePresenter.getType();
if (type != null) {
text.append("{" + type + "} ", XDebuggerUIConstants.TYPE_ATTRIBUTES);
}
valuePresenter.renderValue(new XValueTextRendererImpl(text));
}
示例12: applyPresentation
import com.intellij.xdebugger.frame.presentation.XValuePresentation; //导入依赖的package包/类
@Override
public void applyPresentation(@Nullable Icon icon,
@NotNull XValuePresentation valuePresentation,
boolean hasChildren) {
myType = valuePresentation.getType();
myValue = XValuePresentationUtil.computeValueText(valuePresentation);
myHasChildren = hasChildren;
myFinished.release();
}
示例13: setPresentation
import com.intellij.xdebugger.frame.presentation.XValuePresentation; //导入依赖的package包/类
private static void setPresentation(@NotNull final XValueNode node, @NotNull final String value) {
final XValuePresentation presentation = new XValuePresentation() {
@Override
public void renderValue(@NotNull final XValueTextRenderer renderer) {
renderer.renderValue(value);
}
};
node.setPresentation(
AllIcons.Debugger.Value,
presentation,
false
);
}
示例14: setPresentation
import com.intellij.xdebugger.frame.presentation.XValuePresentation; //导入依赖的package包/类
@Override
public void setPresentation(@Nullable final Icon icon, @NotNull final XValuePresentation presentation, final boolean hasChildren) {
myPres++;
assertEquals(AllIcons.Debugger.Value, icon);
assertFalse(hasChildren);
final MockXValueTextRenderer renderer = new MockXValueTextRenderer(myShortValue);
presentation.renderValue(renderer);
assertEquals(1, renderer.getCounter());
}
示例15: renderBack
import com.intellij.xdebugger.frame.presentation.XValuePresentation; //导入依赖的package包/类
public void renderBack(@NotNull XValuePresentation.XValueTextRenderer renderer)
{
// not rendered
if(myType == null)
{
return;
}
switch(myType)
{
case value:
renderer.renderValue(myValue);
break;
case stringValue:
renderer.renderStringValue(myValue);
break;
case numericValue:
renderer.renderNumericValue(myValue);
break;
case charValue:
renderer.renderCharValue(myValue);
break;
case keywordValue:
renderer.renderKeywordValue(myValue);
break;
case comment:
renderer.renderComment(myValue);
break;
case specialSymbol:
renderer.renderSpecialSymbol(myValue);
break;
case error:
renderer.renderError(myValue);
break;
}
}