• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java XDebugSessionImpl类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中com.intellij.xdebugger.impl.XDebugSessionImpl的典型用法代码示例。如果您正苦于以下问题:Java XDebugSessionImpl类的具体用法?Java XDebugSessionImpl怎么用?Java XDebugSessionImpl使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



XDebugSessionImpl类属于com.intellij.xdebugger.impl包,在下文中一共展示了XDebugSessionImpl类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: onThreadBlocked

import com.intellij.xdebugger.impl.XDebugSessionImpl; //导入依赖的package包/类
private void onThreadBlocked(@NotNull final ThreadReference blockedThread,
                             @NotNull final ThreadReference blockingThread,
                             final DebugProcessImpl process) {
  XDebugSessionImpl.NOTIFICATION_GROUP.createNotification(
    DebuggerBundle.message("status.thread.blocked.by", blockedThread.name(), blockingThread.name()),
    DebuggerBundle.message("status.thread.blocked.by.resume", blockingThread.name()),
    NotificationType.INFORMATION, new NotificationListener() {
      @Override
      public void hyperlinkUpdate(@NotNull Notification notification, @NotNull HyperlinkEvent event) {
        if (event.getEventType() == HyperlinkEvent.EventType.ACTIVATED) {
          notification.expire();
          process.getManagerThread().schedule(new DebuggerCommandImpl() {
            @Override
            protected void action() throws Exception {
              ThreadReferenceProxyImpl threadProxy = process.getVirtualMachineProxy().getThreadReferenceProxy(blockingThread);
              SuspendContextImpl suspendingContext = SuspendManagerUtil.getSuspendingContext(process.getSuspendManager(), threadProxy);
              process.getManagerThread()
                .invoke(process.createResumeThreadCommand(suspendingContext, threadProxy));
            }
          });
        }
      }
    }).notify(process.getProject());
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:25,代码来源:ThreadBlockedMonitor.java


示例2: getValueMarkup

import com.intellij.xdebugger.impl.XDebugSessionImpl; //导入依赖的package包/类
@Nullable
public ValueMarkup getValueMarkup() {
  if (myThisObject != null) {
    DebugProcess process = myFrame.getVirtualMachine().getDebugProcess();
    if (process instanceof DebugProcessImpl) {
      XDebugSession session = ((DebugProcessImpl)process).getSession().getXDebugSession();
      if (session instanceof XDebugSessionImpl) {
        XValueMarkers<?, ?> markers = ((XDebugSessionImpl)session).getValueMarkers();
        if (markers != null) {
          return markers.getAllMarkers().get(myThisObject);
        }
      }
    }
  }
  return null;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:17,代码来源:StackFrameDescriptorImpl.java


示例3: startComputingChildren

import com.intellij.xdebugger.impl.XDebugSessionImpl; //导入依赖的package包/类
@Override
public void startComputingChildren() {
  if (Registry.is("debugger.watches.in.variables")) {
    XDebugSession session = XDebugView.getSession(getTree());
    XDebuggerEvaluator evaluator = getValueContainer().getEvaluator();
    if (session != null && evaluator != null) {
      XDebugSessionData data = ((XDebugSessionImpl)session).getSessionData();
      XExpression[] expressions = data.getWatchExpressions();
      for (final XExpression expression : expressions) {
        evaluator.evaluate(expression, new XDebuggerEvaluator.XEvaluationCallback() {
          @Override
          public void evaluated(@NotNull XValue result) {
            addChildren(XValueChildrenList.singleton(expression.getExpression(), result), false);
          }

          @Override
          public void errorOccurred(@NotNull String errorMessage) {
            // do not add anything
          }
        }, getValueContainer().getSourcePosition());
      }
    }
  }
  super.startComputingChildren();
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:26,代码来源:XStackFrameNode.java


示例4: create

import com.intellij.xdebugger.impl.XDebugSessionImpl; //导入依赖的package包/类
@NotNull
public static XDebugSessionTab create(@NotNull XDebugSessionImpl session,
                                      @Nullable Icon icon,
                                      @Nullable ExecutionEnvironment environment,
                                      @Nullable RunContentDescriptor contentToReuse) {
  if (contentToReuse != null && SystemProperties.getBooleanProperty("xdebugger.reuse.session.tab", false)) {
    JComponent component = contentToReuse.getComponent();
    if (component != null) {
      XDebugSessionTab oldTab = TAB_KEY.getData(DataManager.getInstance().getDataContext(component));
      if (oldTab != null) {
        oldTab.setSession(session, environment, icon);
        oldTab.attachToSession(session);
        return oldTab;
      }
    }
  }
  return new XDebugSessionTab(session, icon, environment);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:19,代码来源:XDebugSessionTab.java


示例5: setSession

import com.intellij.xdebugger.impl.XDebugSessionImpl; //导入依赖的package包/类
private void setSession(@NotNull XDebugSessionImpl session, @Nullable ExecutionEnvironment environment, @Nullable Icon icon) {
  myEnvironment = environment;
  mySession = session;
  mySessionData = session.getSessionData();
  myConsole = session.getConsoleView();

  AnAction[] restartActions;
  List<AnAction> restartActionsList = session.getRestartActions();
  if (ContainerUtil.isEmpty(restartActionsList)) {
    restartActions = AnAction.EMPTY_ARRAY;
  }
  else {
    restartActions = restartActionsList.toArray(new AnAction[restartActionsList.size()]);
  }

  myRunContentDescriptor = new RunContentDescriptor(myConsole, session.getDebugProcess().getProcessHandler(),
                                                    myUi.getComponent(), session.getSessionName(), icon, myRebuildWatchesRunnable, restartActions);
  Disposer.register(myRunContentDescriptor, this);
  Disposer.register(myProject, myRunContentDescriptor);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:21,代码来源:XDebugSessionTab.java


示例6: updateSessionData

import com.intellij.xdebugger.impl.XDebugSessionImpl; //导入依赖的package包/类
public void updateSessionData() {
  List<XExpression> watchExpressions = new ArrayList<XExpression>();
  final List<? extends WatchNode> children = myRootNode.getAllChildren();
  if (children != null) {
    for (WatchNode child : children) {
      watchExpressions.add(child.getExpression());
    }
  }

  XDebugSession session = getSession(getTree());
  XExpression[] expressions = watchExpressions.toArray(new XExpression[watchExpressions.size()]);
  if (session != null) {
    ((XDebugSessionImpl)session).setWatchExpressions(expressions);
  }
  else {
    XDebugSessionData data = getData(XDebugSessionData.DATA_KEY, getTree());
    if (data != null) {
      data.setWatchExpressions(expressions);
    }
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:22,代码来源:XWatchesViewImpl.java


示例7: initSession

import com.intellij.xdebugger.impl.XDebugSessionImpl; //导入依赖的package包/类
@Override
protected void initSession(XDebugSession session, RunProfileState state, Executor executor) {
  XDebugSessionTab tab = ((XDebugSessionImpl)session).getSessionTab();
  if (tab != null) {
    RunnerLayoutUi ui = tab.getUi();
    ContentManager contentManager = ui.getContentManager();
    Content content = findContent(contentManager, XDebuggerBundle.message("debugger.session.tab.watches.title"));
    if (content != null) {
      contentManager.removeContent(content, true);
    }
    content = findContent(contentManager, XDebuggerBundle.message("debugger.session.tab.console.content.name"));
    if (content != null) {
      contentManager.removeContent(content, true);
    }
    initEduConsole(session, ui);
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:18,代码来源:PyEduDebugRunner.java


示例8: findHotSwappableBlazeDebuggerSession

import com.intellij.xdebugger.impl.XDebugSessionImpl; //导入依赖的package包/类
@Nullable
static HotSwappableDebugSession findHotSwappableBlazeDebuggerSession(Project project) {
  DebuggerManagerEx debuggerManager = DebuggerManagerEx.getInstanceEx(project);
  DebuggerSession session = debuggerManager.getContext().getDebuggerSession();
  if (session == null || !session.isAttached()) {
    return null;
  }
  JavaDebugProcess process = session.getProcess().getXdebugProcess();
  if (process == null) {
    return null;
  }
  ExecutionEnvironment env = ((XDebugSessionImpl) process.getSession()).getExecutionEnvironment();
  if (env == null || ClassFileManifestBuilder.getManifest(env) == null) {
    return null;
  }
  RunProfile runProfile = env.getRunProfile();
  if (!(runProfile instanceof BlazeCommandRunConfiguration)) {
    return null;
  }
  return new HotSwappableDebugSession(session, env, (BlazeCommandRunConfiguration) runProfile);
}
 
开发者ID:bazelbuild,项目名称:intellij,代码行数:22,代码来源:BlazeHotSwapManager.java


示例9: perform

import com.intellij.xdebugger.impl.XDebugSessionImpl; //导入依赖的package包/类
@Override
public void perform(@NotNull Project project, AnActionEvent event) {
  XDebugSession session = XDebuggerManager.getInstance(project).getCurrentSession();
  if (session == null) return;

  XValueMarkers<?, ?> markers = ((XDebugSessionImpl)session).getValueMarkers();
  XValueNodeImpl node = XDebuggerTreeActionBase.getSelectedNode(event.getDataContext());
  if (markers == null || node == null) return;
  XValue value = node.getValueContainer();

  ValueMarkup existing = markers.getMarkup(value);
  if (existing != null) {
    markers.unmarkValue(value);
  }
  else {
    ValueMarkerPresentationDialog dialog = new ValueMarkerPresentationDialog(node.getName());
    dialog.show();
    ValueMarkup markup = dialog.getConfiguredMarkup();
    if (dialog.isOK() && markup != null) {
      markers.markValue(value, markup);
    }
  }
  session.rebuildViews();
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:25,代码来源:XMarkObjectActionHandler.java


示例10: updateText

import com.intellij.xdebugger.impl.XDebugSessionImpl; //导入依赖的package包/类
private void updateText() {
  myText.clear();
  XValueMarkers<?,?> markers = ((XDebugSessionImpl)myTree.getSession()).getValueMarkers();
  if (markers != null) {
    ValueMarkup markup = markers.getMarkup(myValueContainer);
    if (markup != null) {
      myText.append("[" + markup.getText() + "] ", new SimpleTextAttributes(SimpleTextAttributes.STYLE_BOLD, markup.getColor()));
    }
  }
  myText.append(myName, XDebuggerUIConstants.VALUE_NAME_ATTRIBUTES);
  if (!StringUtil.isEmpty(mySeparator)) {
    myText.append(mySeparator, SimpleTextAttributes.REGULAR_ATTRIBUTES);
  }
  if (myType != null) {
    myText.append("{" + myType + "} ", XDebuggerUIConstants.TYPE_ATTRIBUTES);
  }
  if (myValue != null) {
    myValuePresenter.append(myValue, myText, myChanged);
  }
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:21,代码来源:XValueNodeImpl.java


示例11: initComponent

import com.intellij.xdebugger.impl.XDebugSessionImpl; //导入依赖的package包/类
@Override
public void initComponent()
{
	XBreakpointManager breakpointManager = XDebuggerManager.getInstance(myProject).getBreakpointManager();

	breakpointManager.addBreakpointListener(DotNetMethodBreakpointType.getInstance(), new XBreakpointListener<XLineBreakpoint<DotNetMethodBreakpointProperties>>()
	{
		@Override
		public void breakpointAdded(@NotNull XLineBreakpoint<DotNetMethodBreakpointProperties> breakpoint)
		{
			XDebugSessionImpl.NOTIFICATION_GROUP.createNotification("Method breakpoints may dramatically slow down debugging", MessageType.WARNING).notify((myProject));
		}
	});
}
 
开发者ID:consulo,项目名称:consulo-dotnet,代码行数:15,代码来源:DotNetBreakpointListenerComponent.java


示例12: perform

import com.intellij.xdebugger.impl.XDebugSessionImpl; //导入依赖的package包/类
@Override
public void perform(@Nonnull Project project, AnActionEvent event) {
  XDebugSession session = XDebuggerManager.getInstance(project).getCurrentSession();
  if (session == null) return;

  XValueMarkers<?, ?> markers = ((XDebugSessionImpl)session).getValueMarkers();
  XValueNodeImpl node = XDebuggerTreeActionBase.getSelectedNode(event.getDataContext());
  if (markers == null || node == null) return;
  XValue value = node.getValueContainer();

  ValueMarkup existing = markers.getMarkup(value);
  if (existing != null) {
    markers.unmarkValue(value);
  }
  else {
    ValueMarkerPresentationDialog dialog = new ValueMarkerPresentationDialog(node.getName());
    dialog.show();
    ValueMarkup markup = dialog.getConfiguredMarkup();
    if (dialog.isOK() && markup != null) {
      markers.markValue(value, markup);
    }
  }
  session.rebuildViews();
}
 
开发者ID:consulo,项目名称:consulo,代码行数:25,代码来源:XMarkObjectActionHandler.java


示例13: create

import com.intellij.xdebugger.impl.XDebugSessionImpl; //导入依赖的package包/类
@Nonnull
public static XDebugSessionTab create(@Nonnull XDebugSessionImpl session,
                                      @Nullable Icon icon,
                                      @Nullable ExecutionEnvironment environment,
                                      @Nullable RunContentDescriptor contentToReuse) {
  if (contentToReuse != null && SystemProperties.getBooleanProperty("xdebugger.reuse.session.tab", false)) {
    JComponent component = contentToReuse.getComponent();
    if (component != null) {
      XDebugSessionTab oldTab = DataManager.getInstance().getDataContext(component).getData(TAB_KEY);
      if (oldTab != null) {
        oldTab.setSession(session, environment, icon);
        oldTab.attachToSession(session);
        return oldTab;
      }
    }
  }
  XDebugSessionTab tab = new XDebugSessionTab(session, icon, environment);
  tab.myRunContentDescriptor.setActivateToolWindowWhenAdded(contentToReuse == null || contentToReuse.isActivateToolWindowWhenAdded());
  return tab;
}
 
开发者ID:consulo,项目名称:consulo,代码行数:21,代码来源:XDebugSessionTab.java


示例14: XDebugSessionTab

import com.intellij.xdebugger.impl.XDebugSessionImpl; //导入依赖的package包/类
private XDebugSessionTab(@Nonnull XDebugSessionImpl session, @Nullable Icon icon, @Nullable ExecutionEnvironment environment) {
  super(session.getProject(), "Debug", session.getSessionName(), GlobalSearchScope.allScope(session.getProject()));

  setSession(session, environment, icon);

  myUi.addContent(createFramesContent(), 0, PlaceInGrid.left, false);
  addVariablesAndWatches(session);

  attachToSession(session);

  DefaultActionGroup focus = new DefaultActionGroup();
  focus.add(ActionManager.getInstance().getAction(XDebuggerActions.FOCUS_ON_BREAKPOINT));
  myUi.getOptions().setAdditionalFocusActions(focus);

  myUi.addListener(new ContentManagerAdapter() {
    @Override
    public void selectionChanged(ContentManagerEvent event) {
      Content content = event.getContent();
      if (mySession != null && content.isSelected() && getWatchesContentId().equals(ViewImpl.ID.get(content))) {
        myRebuildWatchesRunnable.run();
      }
    }
  }, myRunContentDescriptor);

  rebuildViews();
}
 
开发者ID:consulo,项目名称:consulo,代码行数:27,代码来源:XDebugSessionTab.java


示例15: setSession

import com.intellij.xdebugger.impl.XDebugSessionImpl; //导入依赖的package包/类
private void setSession(@Nonnull XDebugSessionImpl session, @Nullable ExecutionEnvironment environment, @Nullable Icon icon) {
  myEnvironment = environment;
  mySession = session;
  mySessionData = session.getSessionData();
  myConsole = session.getConsoleView();

  AnAction[] restartActions;
  List<AnAction> restartActionsList = session.getRestartActions();
  if (ContainerUtil.isEmpty(restartActionsList)) {
    restartActions = AnAction.EMPTY_ARRAY;
  }
  else {
    restartActions = restartActionsList.toArray(new AnAction[restartActionsList.size()]);
  }

  myRunContentDescriptor =
          new RunContentDescriptor(myConsole, session.getDebugProcess().getProcessHandler(), myUi.getComponent(), session.getSessionName(), icon,
                                   myRebuildWatchesRunnable, restartActions);
  Disposer.register(myRunContentDescriptor, this);
  Disposer.register(myProject, myRunContentDescriptor);
}
 
开发者ID:consulo,项目名称:consulo,代码行数:22,代码来源:XDebugSessionTab.java


示例16: createVariablesContent

import com.intellij.xdebugger.impl.XDebugSessionImpl; //导入依赖的package包/类
private Content createVariablesContent(@Nonnull XDebugSessionImpl session) {
  XVariablesView variablesView;
  if (myWatchesInVariables) {
    variablesView = myWatchesView = new XWatchesViewImpl(session, myWatchesInVariables);
  }
  else {
    variablesView = new XVariablesView(session);
  }
  registerView(DebuggerContentInfo.VARIABLES_CONTENT, 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:consulo,项目名称:consulo,代码行数:19,代码来源:XDebugSessionTab.java


示例17: showView

import com.intellij.xdebugger.impl.XDebugSessionImpl; //导入依赖的package包/类
private static void showView(@Nonnull XDebugSessionImpl session, String viewId) {
  XDebugSessionTab tab = session.getSessionTab();
  if (tab != null) {
    tab.toFront(false, null);
    // restore watches tab if minimized
    tab.restoreContent(viewId);

    JComponent component = tab.getUi().getComponent();
    if (component instanceof DataProvider) {
      RunnerContentUi ui = ((DataProvider)component).getDataUnchecked(RunnerContentUi.KEY);
      if (ui != null) {
        Content content = ui.findContent(viewId);

        // if the view is not visible (e.g. Console tab is selected, while Debugger tab is not)
        // make sure we make it visible to the user
        if (content != null) {
          ui.select(content, false);
        }
      }
    }
  }
}
 
开发者ID:consulo,项目名称:consulo,代码行数:23,代码来源:XDebugSessionTab.java


示例18: getExpressions

import com.intellij.xdebugger.impl.XDebugSessionImpl; //导入依赖的package包/类
@Nonnull
private XExpression[] getExpressions() {
  XDebuggerTree tree = getTree();
  XDebugSession session = getSession(tree);
  XExpression[] expressions;
  if (session != null) {
    expressions = ((XDebugSessionImpl)session).getSessionData().getWatchExpressions();
  }
  else {
    XDebuggerTreeNode root = tree.getRoot();
    List<? extends WatchNode> current = root instanceof WatchesRootNode
                                        ? ((WatchesRootNode)tree.getRoot()).getWatchChildren() : Collections.emptyList();
    List<XExpression> list = ContainerUtil.newArrayList();
    for (WatchNode child : current) {
      list.add(child.getExpression());
    }
    expressions = list.toArray(new XExpression[list.size()]);
  }
  return expressions;
}
 
开发者ID:consulo,项目名称:consulo,代码行数:21,代码来源:XWatchesViewImpl.java


示例19: updateSessionData

import com.intellij.xdebugger.impl.XDebugSessionImpl; //导入依赖的package包/类
public void updateSessionData() {
  List<XExpression> watchExpressions = ContainerUtil.newArrayList();
  List<? extends WatchNode> children = myRootNode.getWatchChildren();
  for (WatchNode child : children) {
    watchExpressions.add(child.getExpression());
  }
  XDebugSession session = getSession(getTree());
  XExpression[] expressions = watchExpressions.toArray(new XExpression[watchExpressions.size()]);
  if (session != null) {
    ((XDebugSessionImpl)session).setWatchExpressions(expressions);
  }
  else {
    XDebugSessionData data = getData(XDebugSessionData.DATA_KEY, getTree());
    if (data != null) {
      data.setWatchExpressions(expressions);
    }
  }
}
 
开发者ID:consulo,项目名称:consulo,代码行数:19,代码来源:XWatchesViewImpl.java


示例20: onThreadBlocked

import com.intellij.xdebugger.impl.XDebugSessionImpl; //导入依赖的package包/类
private static void onThreadBlocked(@NotNull final ThreadReference blockedThread, @NotNull final ThreadReference blockingThread, final DebugProcessImpl process)
{
	XDebugSessionImpl.NOTIFICATION_GROUP.createNotification(DebuggerBundle.message("status.thread.blocked.by", blockedThread.name(), blockingThread.name()), DebuggerBundle.message("status" + ""
			+ ".thread" + ".blocked.by.resume", blockingThread.name()), NotificationType.INFORMATION, new NotificationListener()
	{
		@Override
		public void hyperlinkUpdate(@NotNull Notification notification, @NotNull HyperlinkEvent event)
		{
			if(event.getEventType() == HyperlinkEvent.EventType.ACTIVATED)
			{
				notification.expire();
				process.getManagerThread().schedule(new DebuggerCommandImpl()
				{
					@Override
					protected void action() throws Exception
					{
						ThreadReferenceProxyImpl threadProxy = process.getVirtualMachineProxy().getThreadReferenceProxy(blockingThread);
						SuspendContextImpl suspendingContext = SuspendManagerUtil.getSuspendingContext(process.getSuspendManager(), threadProxy);
						process.getManagerThread().invoke(process.createResumeThreadCommand(suspendingContext, threadProxy));
					}
				});
			}
		}
	}).notify(process.getProject());
}
 
开发者ID:consulo,项目名称:consulo-java,代码行数:26,代码来源:ThreadBlockedMonitor.java



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java GetSnapshotsResponse类代码示例发布时间:2022-05-23
下一篇:
Java DecodeThread类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap