本文整理汇总了Java中com.intellij.xdebugger.impl.frame.XVariablesView类的典型用法代码示例。如果您正苦于以下问题:Java XVariablesView类的具体用法?Java XVariablesView怎么用?Java XVariablesView使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
XVariablesView类属于com.intellij.xdebugger.impl.frame包,在下文中一共展示了XVariablesView类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: createVariablesContent
import com.intellij.xdebugger.impl.frame.XVariablesView; //导入依赖的package包/类
private Content createVariablesContent(final XDebugSession session) {
final XVariablesView variablesView = new XVariablesView(session, this);
myViews.add(variablesView);
Content result = myUi.createContent(DebuggerContentInfo.VARIABLES_CONTENT, variablesView.getPanel(),
XDebuggerBundle.message("debugger.session.tab.variables.title"),
AllIcons.Debugger.Value, null);
result.setCloseable(false);
ActionGroup group = getCustomizedActionGroup(XDebuggerActions.VARIABLES_TREE_TOOLBAR_GROUP);
result.setActions(group, ActionPlaces.DEBUGGER_TOOLBAR, variablesView.getTree());
return result;
}
示例2: updateInlineDebuggerData
import com.intellij.xdebugger.impl.frame.XVariablesView; //导入依赖的package包/类
public void updateInlineDebuggerData() {
try {
XDebugSession session = XDebugView.getSession(getTree());
final XSourcePosition debuggerPosition = session == null ? null : session.getCurrentPosition();
if (debuggerPosition == null) {
return;
}
final XInlineDebuggerDataCallback callback = new XInlineDebuggerDataCallback() {
@Override
public void computed(XSourcePosition position) {
if (isObsolete() || position == null) return;
VirtualFile file = position.getFile();
// filter out values from other files
if (!Comparing.equal(debuggerPosition.getFile(), file)) {
return;
}
final Document document = FileDocumentManager.getInstance().getDocument(file);
if (document == null) return;
XVariablesView.InlineVariablesInfo data = myTree.getProject().getUserData(XVariablesView.DEBUG_VARIABLES);
if (data == null) {
return;
}
if (!showAsInlay(file, position, debuggerPosition)) {
data.put(file, position, XValueNodeImpl.this, document.getModificationStamp());
myTree.updateEditor();
}
}
};
if (getValueContainer().computeInlineDebuggerData(callback) == ThreeState.UNSURE) {
getValueContainer().computeSourcePosition(callback::computed);
}
}
catch (Exception ignore) {
}
}
示例3: updateInlineDebuggerData
import com.intellij.xdebugger.impl.frame.XVariablesView; //导入依赖的package包/类
public void updateInlineDebuggerData() {
try {
XDebugSession session = XDebugView.getSession(getTree());
final XSourcePosition debuggerPosition = session == null ? null : session.getCurrentPosition();
if (debuggerPosition == null) {
return;
}
final XInlineDebuggerDataCallback callback = new XInlineDebuggerDataCallback() {
@Override
public void computed(XSourcePosition position) {
if (position == null) return;
VirtualFile file = position.getFile();
final Document document = FileDocumentManager.getInstance().getDocument(file);
if (document == null) return;
XVariablesView.InlineVariablesInfo data = myTree.getProject().getUserData(XVariablesView.DEBUG_VARIABLES);
final TObjectLongHashMap<VirtualFile> timestamps = myTree.getProject().getUserData(XVariablesView.DEBUG_VARIABLES_TIMESTAMPS);
if (data == null || timestamps == null) {
return;
}
data.put(file, position, XValueNodeImpl.this);
timestamps.put(file, document.getModificationStamp());
myTree.updateEditor();
}
};
if (getValueContainer().computeInlineDebuggerData(callback) == ThreeState.UNSURE) {
class ValueDeclaration implements XInlineSourcePosition {
@Override
public void setSourcePosition(@Nullable XSourcePosition sourcePosition) {
callback.computed(sourcePosition);
}
}
class NearestValuePosition extends ValueDeclaration implements XNearestSourcePosition {}
getValueContainer().computeSourcePosition(new ValueDeclaration());
getValueContainer().computeSourcePosition(new NearestValuePosition());
}
}
catch (Exception ignore) {
}
}