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


Java XDebugSessionImpl类代码示例

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


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


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