本文整理汇总了Java中com.intellij.xdebugger.frame.presentation.XValuePresentation类的典型用法代码示例。如果您正苦于以下问题:Java XValuePresentation类的具体用法?Java XValuePresentation怎么用?Java XValuePresentation使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
XValuePresentation类属于com.intellij.xdebugger.frame.presentation包,在下文中一共展示了XValuePresentation类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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);
}
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:20,代码来源:XValueNodeImpl.java
示例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);
}
}
}
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:24,代码来源:XValueNodePresentationConfigurator.java
示例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);
}
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:19,代码来源:SetValueInplaceEditor.java
示例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);
}
开发者ID:consulo,项目名称:consulo,代码行数:18,代码来源:XValueNodeImpl.java
示例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());
}
开发者ID:consulo,项目名称:consulo,代码行数:18,代码来源:SetValueInplaceEditor.java
示例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);
}
开发者ID:consulo,项目名称:consulo-java,代码行数:20,代码来源:JavaStackFrame.java
示例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);
}
开发者ID:internetisalie,项目名称:lua-for-idea,代码行数:16,代码来源:LuaDebugValue.java
示例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);
}
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:16,代码来源:JavaStackFrame.java
示例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);
}
}
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:41,代码来源:JavaReferringObjectsValue.java
示例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;
}
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:13,代码来源:XDebuggerTreeRestorer.java
示例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));
}
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:11,代码来源:XValueNodeImpl.java
示例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();
}
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:11,代码来源:XTestValueNode.java
示例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
);
}
开发者ID:ktisha,项目名称:TheRPlugin,代码行数:15,代码来源:TheRXPresentationUtils.java
示例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());
}
开发者ID:ktisha,项目名称:TheRPlugin,代码行数:13,代码来源:MockXValueNode.java
示例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;
}
}
开发者ID:consulo,项目名称:consulo-dotnet,代码行数:37,代码来源:DotNetValueTextRendererProxy.java
示例16: buildText
import com.intellij.xdebugger.frame.presentation.XValuePresentation; //导入依赖的package包/类
public static void buildText(@Nonnull XValuePresentation valuePresenter, @Nonnull 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));
}
开发者ID:consulo,项目名称:consulo,代码行数:11,代码来源:XValueNodeImpl.java
示例17: doSetPresentation
import com.intellij.xdebugger.frame.presentation.XValuePresentation; //导入依赖的package包/类
private static void doSetPresentation(@Nullable final Icon icon,
@Nonnull final XValuePresentation presentation,
final boolean hasChildren,
final ConfigurableXValueNode node) {
if (DebuggerUIUtil.isObsolete(node)) {
return;
}
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);
}
}
}
开发者ID:consulo,项目名称:consulo,代码行数:28,代码来源:XValueNodePresentationConfigurator.java
示例18: applyPresentation
import com.intellij.xdebugger.frame.presentation.XValuePresentation; //导入依赖的package包/类
@Override
public void applyPresentation(@Nullable Icon icon,
@Nonnull XValuePresentation valuePresentation,
boolean hasChildren) {
myType = valuePresentation.getType();
myValue = XValuePresentationUtil.computeValueText(valuePresentation);
myHasChildren = hasChildren;
myFinished.release();
}
开发者ID:consulo,项目名称:consulo,代码行数:11,代码来源:XTestValueNode.java
示例19: computePresentation
import com.intellij.xdebugger.frame.presentation.XValuePresentation; //导入依赖的package包/类
@Override
public void computePresentation(@NotNull XValueNode node, @NotNull XValuePlace place) {
XValuePresentation presentation = getPresentation();
node.setPresentation(myIcon, presentation, isTable());
}
开发者ID:internetisalie,项目名称:lua-for-idea,代码行数:6,代码来源:LuaDebugValue.java
示例20: computePresentation
import com.intellij.xdebugger.frame.presentation.XValuePresentation; //导入依赖的package包/类
@Override
public void computePresentation(@NotNull final XValueNode node, @NotNull XValuePlace place) {
final SuspendContextImpl suspendContext = myEvaluationContext.getSuspendContext();
myEvaluationContext.getManagerThread().schedule(new SuspendContextCommandImpl(suspendContext) {
@Override
public Priority getPriority() {
return Priority.NORMAL;
}
@Override
protected void commandCancelled() {
node.setPresentation(null, new XErrorValuePresentation(DebuggerBundle.message("error.context.has.changed")), false);
}
@Override
public void contextAction() throws Exception {
if (!myContextSet) {
myValueDescriptor.setContext(myEvaluationContext);
}
myValueDescriptor.updateRepresentation(myEvaluationContext, new DescriptorLabelListener() {
@Override
public void labelChanged() {
Icon nodeIcon = DebuggerTreeRenderer.getValueIcon(myValueDescriptor);
final String value = getValueString();
XValuePresentation presentation;
@SuppressWarnings("ThrowableResultOfMethodCallIgnored")
EvaluateException exception = myValueDescriptor.getEvaluateException();
presentation = new JavaValuePresentation(value, myValueDescriptor.getIdLabel(), exception != null ? exception.getMessage() : null, myValueDescriptor);
if (myValueDescriptor.getLastRenderer() instanceof FullValueEvaluatorProvider) {
XFullValueEvaluator evaluator = ((FullValueEvaluatorProvider)myValueDescriptor.getLastRenderer())
.getFullValueEvaluator(myEvaluationContext, myValueDescriptor);
if (evaluator != null) {
node.setFullValueEvaluator(evaluator);
}
}
else if (value.length() > XValueNode.MAX_VALUE_LENGTH) {
node.setFullValueEvaluator(new JavaFullValueEvaluator(myEvaluationContext) {
@Override
public void evaluate(@NotNull final XFullValueEvaluationCallback callback) throws Exception {
final ValueDescriptorImpl fullValueDescriptor = myValueDescriptor.getFullValueDescriptor();
fullValueDescriptor.updateRepresentation(myEvaluationContext, new DescriptorLabelListener() {
@Override
public void labelChanged() {
callback.evaluated(fullValueDescriptor.getValueText());
}
});
}
});
}
node.setPresentation(nodeIcon, presentation, myValueDescriptor.isExpandable());
}
});
}
});
}
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:57,代码来源:JavaValue.java
注:本文中的com.intellij.xdebugger.frame.presentation.XValuePresentation类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论