本文整理汇总了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();
}
示例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;
}
示例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();
}
示例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);
}
示例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;
}
示例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();
}