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


Java XSuspendContext.getActiveExecutionStack方法代码示例

本文整理汇总了Java中com.intellij.xdebugger.frame.XSuspendContext.getActiveExecutionStack方法的典型用法代码示例。如果您正苦于以下问题:Java XSuspendContext.getActiveExecutionStack方法的具体用法?Java XSuspendContext.getActiveExecutionStack怎么用?Java XSuspendContext.getActiveExecutionStack使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.intellij.xdebugger.frame.XSuspendContext的用法示例。


在下文中一共展示了XSuspendContext.getActiveExecutionStack方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: positionReached

import com.intellij.xdebugger.frame.XSuspendContext; //导入方法依赖的package包/类
@Override
public void positionReached(@NotNull final XSuspendContext suspendContext) {
  enableBreakpoints();
  mySuspendContext = suspendContext;
  myCurrentExecutionStack = suspendContext.getActiveExecutionStack();
  myCurrentStackFrame = myCurrentExecutionStack != null ? myCurrentExecutionStack.getTopFrame() : null;
  myIsTopFrame = true;
  myTopFramePosition = myCurrentStackFrame != null ? myCurrentStackFrame.getSourcePosition() : null;

  myPaused.set(true);

  updateExecutionPosition();

  if (myShowTabOnSuspend.compareAndSet(true, false)) {
    UIUtil.invokeLaterIfNeeded(new Runnable() {
      @Override
      public void run() {
        initSessionTab(null);
        showSessionTab();
      }
    });
  }

  myDispatcher.getMulticaster().sessionPaused();
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:26,代码来源:XDebugSessionImpl.java

示例2: getEvaluator

import com.intellij.xdebugger.frame.XSuspendContext; //导入方法依赖的package包/类
@Nullable
public static XDebuggerEvaluator getEvaluator(final XSuspendContext suspendContext) {
  XExecutionStack executionStack = suspendContext.getActiveExecutionStack();
  if (executionStack != null) {
    XStackFrame stackFrame = executionStack.getTopFrame();
    if (stackFrame != null) {
      return stackFrame.getEvaluator();
    }
  }
  return null;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:12,代码来源:XDebuggerUtilImpl.java

示例3: positionReached

import com.intellij.xdebugger.frame.XSuspendContext; //导入方法依赖的package包/类
@Override
public void positionReached(@NotNull final XSuspendContext suspendContext) {
  enableBreakpoints();
  mySuspendContext = suspendContext;
  myCurrentExecutionStack = suspendContext.getActiveExecutionStack();
  myCurrentStackFrame = myCurrentExecutionStack != null ? myCurrentExecutionStack.getTopFrame() : null;
  myCurrentPosition = myCurrentStackFrame != null ? myCurrentStackFrame.getSourcePosition() : null;

  myPaused.set(true);

  if (myCurrentPosition != null) {
    myDebuggerManager.setActiveSession(this, myCurrentPosition, false, getPositionIconRenderer(true));
  }
  UIUtil.invokeLaterIfNeeded(new Runnable() {
    @Override
    public void run() {
      if (myShowTabOnSuspend) {
        myShowTabOnSuspend = false;
        initSessionTab();
        showSessionTab();
      }
      mySessionTab.toFront();
      mySessionTab.getUi().attractBy(XDebuggerUIConstants.LAYOUT_VIEW_BREAKPOINT_CONDITION);
    }
  });
  myDispatcher.getMulticaster().sessionPaused();
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:28,代码来源:XDebugSessionImpl.java

示例4: processSessionEvent

import com.intellij.xdebugger.frame.XSuspendContext; //导入方法依赖的package包/类
@Override
public void processSessionEvent(@NotNull final SessionEvent event) {
  myRefresh = event == SessionEvent.SETTINGS_CHANGED;

  if (event == SessionEvent.BEFORE_RESUME) {
    return;
  }

  XDebugSession session = getSession(getMainPanel());

  if (event == SessionEvent.FRAME_CHANGED) {
    XStackFrame currentStackFrame = session == null ? null : session.getCurrentStackFrame();
    if (currentStackFrame != null) {
      myFramesList.setSelectedValue(currentStackFrame, true);
      mySelectedFrameIndex = myFramesList.getSelectedIndex();
    }
    return;
  }

  if (event != SessionEvent.SETTINGS_CHANGED) {
    mySelectedFrameIndex = 0;
    mySelectedStack = null;
    myVisibleRect = null;
  }
  else {
    myVisibleRect = myFramesList.getVisibleRect();
  }

  myListenersEnabled = false;
  for (StackFramesListBuilder builder : myBuilders.values()) {
    builder.dispose();
  }
  myBuilders.clear();
  XSuspendContext suspendContext = session == null ? null : session.getSuspendContext();
  if (suspendContext == null) {
    requestClear();
    return;
  }

  if (event == SessionEvent.PAUSED) {
    // clear immediately
    cancelClear();
    clear();
  }

  XExecutionStack[] executionStacks = suspendContext.getExecutionStacks();
  addExecutionStacks(Arrays.asList(executionStacks));

  XExecutionStack activeExecutionStack = mySelectedStack != null ? mySelectedStack : suspendContext.getActiveExecutionStack();
  myThreadComboBox.setSelectedItem(activeExecutionStack);
  myThreadsPanel.removeAll();
  myThreadsPanel.add(myToolbar.getComponent(), BorderLayout.EAST);
  final boolean invisible = executionStacks.length == 1 && StringUtil.isEmpty(executionStacks[0].getDisplayName());
  if (!invisible) {
    myThreadsPanel.add(myThreadComboBox, BorderLayout.CENTER);
  }
  myToolbar.setAddSeparatorFirst(!invisible);
  updateFrames(activeExecutionStack, session);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:60,代码来源:XFramesView.java

示例5: rebuildView

import com.intellij.xdebugger.frame.XSuspendContext; //导入方法依赖的package包/类
@Override
protected void rebuildView(final SessionEvent event) {
  if (event == SessionEvent.BEFORE_RESUME) return;
  if (event == SessionEvent.FRAME_CHANGED) {
    XStackFrame currentStackFrame = mySession.getCurrentStackFrame();
    if (currentStackFrame != null) {
      myFramesList.setSelectedValue(currentStackFrame, true);
    }
    return;
  }

  myListenersEnabled = false;
  for (StackFramesListBuilder builder : myBuilders.values()) {
    builder.dispose();
  }
  myBuilders.clear();
  mySelectedStack = null;
  XSuspendContext suspendContext = mySession.getSuspendContext();
  if (suspendContext == null) {
    myThreadComboBox.removeAllItems();
    myFramesList.clear();
    myExecutionStacks.clear();
    return;
  }

  XExecutionStack[] executionStacks = suspendContext.getExecutionStacks();
  for (XExecutionStack executionStack : executionStacks) {
    if (!myExecutionStacks.contains(executionStack)) {
      //noinspection unchecked
      myThreadComboBox.addItem(executionStack);
      myExecutionStacks.add(executionStack);
    }
  }
  XExecutionStack activeExecutionStack = suspendContext.getActiveExecutionStack();
  myThreadComboBox.setSelectedItem(activeExecutionStack);
  myThreadsPanel.removeAll();
  myThreadsPanel.add(myToolbar.getComponent(), BorderLayout.EAST);
  final boolean invisible = executionStacks.length == 1 && StringUtil.isEmpty(executionStacks[0].getDisplayName());
  if (!invisible) {
    myThreadsPanel.add(myThreadComboBox, BorderLayout.CENTER);
  }
  myToolbar.setAddSeparatorFirst(!invisible);
  updateFrames(activeExecutionStack);
  myListenersEnabled = true;
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:46,代码来源:XFramesView.java

示例6: positionReachedInternal

import com.intellij.xdebugger.frame.XSuspendContext; //导入方法依赖的package包/类
private void positionReachedInternal(@Nonnull final XSuspendContext suspendContext, boolean attract) {
  enableBreakpoints();
  mySuspendContext = suspendContext;
  myCurrentExecutionStack = suspendContext.getActiveExecutionStack();
  myCurrentStackFrame = myCurrentExecutionStack != null ? myCurrentExecutionStack.getTopFrame() : null;
  myIsTopFrame = true;
  myTopFramePosition = myCurrentStackFrame != null ? myCurrentStackFrame.getSourcePosition() : null;

  myPaused.set(true);

  updateExecutionPosition();

  final boolean showOnSuspend = myShowTabOnSuspend.compareAndSet(true, false);
  if (showOnSuspend || attract) {
    AppUIUtil.invokeLaterIfProjectAlive(myProject, () -> {
      if (showOnSuspend) {
        initSessionTab(null);
        showSessionTab();
      }

      // user attractions should only be made if event happens independently (e.g. program paused/suspended)
      // and should not be made when user steps in the code
      if (attract) {
        if (mySessionTab == null) {
          LOG.debug("Cannot request focus because Session Tab is not initialized yet");
          return;
        }

        if (XDebuggerSettingManagerImpl.getInstanceImpl().getGeneralSettings().isShowDebuggerOnBreakpoint()) {
          mySessionTab.toFront(true, this::updateExecutionPosition);
        }

        if (myTopFramePosition == null) {
          // if there is no source position available, we should somehow tell the user that session is stopped.
          // the best way is to show the stack frames.
          XDebugSessionTab.showFramesView(this);
        }

        mySessionTab.getUi().attractBy(XDebuggerUIConstants.LAYOUT_VIEW_BREAKPOINT_CONDITION);
      }
    });
  }

  myDispatcher.getMulticaster().sessionPaused();
}
 
开发者ID:consulo,项目名称:consulo,代码行数:46,代码来源:XDebugSessionImpl.java


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