当前位置: 首页>>代码示例>>Java>>正文


Java XVariablesView类代码示例

本文整理汇总了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;
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:14,代码来源:XDebugSessionTab.java

示例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) {
  }
}
 
开发者ID:consulo,项目名称:consulo,代码行数:41,代码来源:XValueNodeImpl.java

示例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) {
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:45,代码来源:XValueNodeImpl.java


注:本文中的com.intellij.xdebugger.impl.frame.XVariablesView类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。