本文整理汇总了Java中com.intellij.xdebugger.frame.XSuspendContext类的典型用法代码示例。如果您正苦于以下问题:Java XSuspendContext类的具体用法?Java XSuspendContext怎么用?Java XSuspendContext使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
XSuspendContext类属于com.intellij.xdebugger.frame包,在下文中一共展示了XSuspendContext类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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: clearExecutionStack
import com.intellij.xdebugger.frame.XSuspendContext; //导入依赖的package包/类
/**
* Clears out the current execution stack while keeping the debug session alive. Useful for
* breakpoint delete operations which result in no selected snapshots, requiring us to display an
* empty stack in the UI, while keeping the debug session alive.
*/
public void clearExecutionStack() {
SwingUtilities.invokeLater(
new Runnable() {
@Override
public void run() {
if (!getXDebugSession().isStopped()) {
// Since there is no equivalent metaphor in traditional debug sessions, this simulates
// the desired behavior of clearing the current context by setting the current
// position
// to an empty context
getXDebugSession().positionReached(new XSuspendContext() {});
}
}
});
}
示例3: runToPosition
import com.intellij.xdebugger.frame.XSuspendContext; //导入依赖的package包/类
@Override
public void runToPosition(@NotNull final XSourcePosition position, @Nullable XSuspendContext context)
{
if(myPausedEventSet == null)
{
return;
}
myDebugThread.addCommand(virtualMachine ->
{
virtualMachine.stopStepRequests();
DebugInformationResult debugOffset = virtualMachine.getDelegate().findDebugOffset(position.getFile().getPath(), position.getLine() + 1, -1);
if(debugOffset != null)
{
EventRequestManager eventRequestManager = virtualMachine.eventRequestManager();
BreakpointRequest breakpointRequest = eventRequestManager.createBreakpointRequest(debugOffset);
breakpointRequest.putProperty(RUN_TO_CURSOR, Boolean.TRUE);
breakpointRequest.enable();
}
return true;
});
}
示例4: doResume
import com.intellij.xdebugger.frame.XSuspendContext; //导入依赖的package包/类
@Nullable
private XSuspendContext doResume() {
if (!myPaused.getAndSet(false)) {
return null;
}
myDispatcher.getMulticaster().beforeSessionResume();
XSuspendContext context = mySuspendContext;
mySuspendContext = null;
myCurrentExecutionStack = null;
myCurrentStackFrame = null;
myTopFramePosition = null;
myActiveNonLineBreakpoint = null;
updateExecutionPosition();
UIUtil.invokeLaterIfNeeded(() -> {
if (mySessionTab != null) {
mySessionTab.getUi().clearAttractionBy(XDebuggerUIConstants.LAYOUT_VIEW_BREAKPOINT_CONDITION);
}
});
myDispatcher.getMulticaster().sessionResumed();
return context;
}
示例5: 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;
}
示例6: getSuspendContext
import com.intellij.xdebugger.frame.XSuspendContext; //导入依赖的package包/类
@NotNull
public XSuspendContext getSuspendContext() {
if (mySuspendContext == null || myStack == null) {
throw new IllegalStateException("GetSuspendContext could be called only after update");
}
return mySuspendContext;
}
示例7: showDebugInformation
import com.intellij.xdebugger.frame.XSuspendContext; //导入依赖的package包/类
private void showDebugInformation() {
final XSourcePositionWrapper wrapper = new XSourcePositionWrapper(getCurrentPosition());
final XLineBreakpoint<XBreakpointProperties> breakpoint = myBreakpoints.get(wrapper);
final XDebugSession session = getSession();
final XSuspendContext suspendContext = myStack.getSuspendContext();
if (breakpoint != null) {
final XDebuggerEvaluator evaluator = getActiveEvaluator();
final XExpression conditionExpression = breakpoint.getConditionExpression();
if (evaluator != null && conditionExpression != null) {
evaluator.evaluate(
conditionExpression,
new EvaluationCallback(breakpoint, suspendContext),
null
);
}
else if (!session.breakpointReached(breakpoint, null, suspendContext)) { // 2nd arg is printed to console when breakpoint is reached
resume();
}
}
else {
session.positionReached(suspendContext);
myTempBreakpoints.remove(wrapper);
}
TheRGraphicsUtils.getGraphicsState(session.getProject()).refresh(true);
}
示例8: 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();
}
示例9: runToPosition
import com.intellij.xdebugger.frame.XSuspendContext; //导入依赖的package包/类
@Override
public void runToPosition(@NotNull XSourcePosition position, XSuspendContext context) {
String fileURL = XQueryBreakpointHandler.getFileUrl(position);
int lineNumber = XQueryBreakpointHandler.getActualLineNumber(position.getLine());
dbgpIde.breakpointSet(aLineBreakpoint(fileURL, lineNumber).withTemporary(true).build());
dbgpIde.run();
}
示例10: resume
import com.intellij.xdebugger.frame.XSuspendContext; //导入依赖的package包/类
@Override
public void resume(@Nullable XSuspendContext context)
{
myPausedEventSet = null;
myDebugThread.addCommand(virtualMachine ->
{
virtualMachine.stopStepRequests();
return true;
});
}
示例11: runToPosition
import com.intellij.xdebugger.frame.XSuspendContext; //导入依赖的package包/类
@Override
@RequiredReadAction
public void runToPosition(@NotNull final XSourcePosition position, @Nullable XSuspendContext context)
{
if(myPausedEventSet == null)
{
return;
}
myDebugThread.addCommand(virtualMachine ->
{
virtualMachine.stopStepRequests();
try
{
final MonoBreakpointUtil.FindLocationResult result = MonoBreakpointUtil.findLocationsImpl(getSession().getProject(), virtualMachine, position.getFile(),
position.getLine(), null, null);
// no target for execution
final Collection<Location> locations = result.getLocations();
if(locations.isEmpty())
{
return true;
}
for(Location location : locations)
{
EventRequestManager eventRequestManager = virtualMachine.eventRequestManager();
BreakpointRequest breakpointRequest = eventRequestManager.createBreakpointRequest(location);
breakpointRequest.putProperty(RUN_TO_CURSOR, Boolean.TRUE);
breakpointRequest.setEnabled(true);
}
}
catch(TypeMirrorUnloadedException ignored)
{
}
return true;
});
}
示例12: smartStepInto
import com.intellij.xdebugger.frame.XSuspendContext; //导入依赖的package包/类
@Override
public <V extends XSmartStepIntoVariant> void smartStepInto(XSmartStepIntoHandler<V> handler, V variant) {
if (!myDebugProcess.checkCanPerformCommands()) return;
final XSuspendContext context = doResume();
handler.startStepInto(variant, context);
}
示例13: breakpointReached
import com.intellij.xdebugger.frame.XSuspendContext; //导入依赖的package包/类
private boolean breakpointReached(@Nonnull final XBreakpoint<?> breakpoint, @Nullable String evaluatedLogExpression,
@Nonnull XSuspendContext suspendContext, boolean doProcessing) {
if (doProcessing) {
if (breakpoint.isLogMessage()) {
XSourcePosition position = breakpoint.getSourcePosition();
OpenFileHyperlinkInfo hyperlinkInfo =
position != null ? new OpenFileHyperlinkInfo(myProject, position.getFile(), position.getLine()) : null;
printMessage(XDebuggerBundle.message("xbreakpoint.reached.text") + " ", XBreakpointUtil.getShortText(breakpoint), hyperlinkInfo);
}
if (evaluatedLogExpression != null) {
printMessage(evaluatedLogExpression, null, null);
}
processDependencies(breakpoint);
if (breakpoint.getSuspendPolicy() == SuspendPolicy.NONE) {
return false;
}
}
myActiveNonLineBreakpoint =
(!(breakpoint instanceof XLineBreakpoint) || ((XLineBreakpoint)breakpoint).getType().canBeHitInOtherPlaces()) ? breakpoint : null;
// set this session active on breakpoint, update execution position will be called inside positionReached
myDebuggerManager.setCurrentSession(this);
positionReachedInternal(suspendContext, true);
if (doProcessing && breakpoint instanceof XLineBreakpoint<?> && ((XLineBreakpoint)breakpoint).isTemporary()) {
handleTemporaryBreakpointHit(breakpoint);
}
return true;
}
示例14: startStepOver
import com.intellij.xdebugger.frame.XSuspendContext; //导入依赖的package包/类
@Override
public void startStepOver(@Nullable XSuspendContext context) {
muleDebuggerSession.nextStep();
}
示例15: startStepInto
import com.intellij.xdebugger.frame.XSuspendContext; //导入依赖的package包/类
@Override
public void startStepInto(@Nullable XSuspendContext context) {
muleDebuggerSession.nextStep();
}