本文整理汇总了Java中org.intellij.plugins.xsltDebugger.VMPausedException类的典型用法代码示例。如果您正苦于以下问题:Java VMPausedException类的具体用法?Java VMPausedException怎么用?Java VMPausedException使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
VMPausedException类属于org.intellij.plugins.xsltDebugger包,在下文中一共展示了VMPausedException类的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: computeStackFrames
import org.intellij.plugins.xsltDebugger.VMPausedException; //导入依赖的package包/类
@Override
public void computeStackFrames(int firstFrameIndex, XStackFrameContainer container) {
try {
if (myDebuggerSession.getCurrentState() == Debugger.State.SUSPENDED) {
Debugger.Frame frame = myTopFrame.getFrame();
final List<XStackFrame> frames = new ArrayList<XStackFrame>();
frames.add(myTopFrame);
while (frame != null) {
frame = frame.getPrevious();
if (frame != null) {
frames.add(new XsltStackFrame(frame, myDebuggerSession));
}
}
if (firstFrameIndex <= frames.size()) {
container.addStackFrames(frames.subList(firstFrameIndex, frames.size()), true);
} else {
container.addStackFrames(Collections.<XStackFrame>emptyList(), true);
}
}
} catch (VMPausedException e) {
container.errorOccurred(VMPausedException.MESSAGE);
}
}
示例2: computeChildren
import org.intellij.plugins.xsltDebugger.VMPausedException; //导入依赖的package包/类
@Override
public void computeChildren(@NotNull XCompositeNode node) {
try {
if (myFrame instanceof Debugger.StyleFrame) {
final List<Debugger.Variable> variables = ((Debugger.StyleFrame)myFrame).getVariables();
final XValueChildrenList list = new XValueChildrenList();
for (final Debugger.Variable variable : variables) {
list.add(variable.getName(), new MyValue(variable));
}
node.addChildren(list, true);
} else {
super.computeChildren(node);
}
} catch (VMPausedException ignored) {
node.setErrorMessage(VMPausedException.MESSAGE);
}
}
示例3: computeStackFrames
import org.intellij.plugins.xsltDebugger.VMPausedException; //导入依赖的package包/类
@Override
public void computeStackFrames(int firstFrameIndex, XStackFrameContainer container) {
try {
if (myDebuggerSession.getCurrentState() == Debugger.State.SUSPENDED) {
Debugger.Frame frame = myTopFrame.getFrame();
final List<XStackFrame> frames = new ArrayList<XStackFrame>();
while (frame != null) {
frame = frame.getPrevious();
if (frame != null) {
frames.add(new XsltStackFrame(frame, myDebuggerSession));
}
}
if (firstFrameIndex <= frames.size()) {
container.addStackFrames(frames.subList(firstFrameIndex - 1, frames.size()), true);
} else {
container.addStackFrames(Collections.<XStackFrame>emptyList(), true);
}
}
} catch (VMPausedException e) {
container.errorOccurred(VMPausedException.MESSAGE);
}
}
示例4: computeChildren
import org.intellij.plugins.xsltDebugger.VMPausedException; //导入依赖的package包/类
@Override
public void computeChildren(@NotNull XCompositeNode node)
{
try
{
if(myFrame instanceof Debugger.StyleFrame)
{
final List<Debugger.Variable> variables = ((Debugger.StyleFrame) myFrame).getVariables();
final XValueChildrenList list = new XValueChildrenList();
for(final Debugger.Variable variable : variables)
{
list.add(variable.getName(), new MyValue(variable));
}
node.addChildren(list, true);
}
else
{
super.computeChildren(node);
}
}
catch(VMPausedException e)
{
node.setErrorMessage(VMPausedException.MESSAGE);
}
}
示例5: checkCanPerformCommands
import org.intellij.plugins.xsltDebugger.VMPausedException; //导入依赖的package包/类
@Override
public boolean checkCanPerformCommands() {
if (myDebuggerSession == null) return super.checkCanPerformCommands();
try {
return myDebuggerSession.getClient().ping();
} catch (VMPausedException e) {
getSession().reportMessage(VMPausedException.MESSAGE, MessageType.WARNING);
return false;
}
}
示例6: unregisterBreakpoint
import org.intellij.plugins.xsltDebugger.VMPausedException; //导入依赖的package包/类
@Override
public void unregisterBreakpoint(@NotNull XLineBreakpoint<XBreakpointProperties> breakpoint, final boolean temporary) {
final XSourcePosition sourcePosition = breakpoint.getSourcePosition();
if (sourcePosition == null || !sourcePosition.getFile().exists() || !sourcePosition.getFile().isValid()) {
// ???
return;
}
final VirtualFile file = sourcePosition.getFile();
final Project project = myXsltDebugProcess.getSession().getProject();
final String fileURL = getFileURL(file);
final int lineNumber = getActualLineNumber(breakpoint, project);
try {
final BreakpointManager manager = myXsltDebugProcess.getBreakpointManager();
if (temporary) {
final Breakpoint bp = manager.getBreakpoint(fileURL, lineNumber);
if (bp != null) {
bp.setEnabled(false);
}
} else {
manager.removeBreakpoint(fileURL, lineNumber);
}
} catch (DebuggerStoppedException ignore) {
} catch (VMPausedException e) {
myXsltDebugProcess.getSession().reportMessage("Target VM is not responding. Breakpoint can not be removed", MessageType.ERROR);
}
}
示例7: evaluate
import org.intellij.plugins.xsltDebugger.VMPausedException; //导入依赖的package包/类
@Override
public void evaluate(@NotNull String expression, @NotNull XEvaluationCallback callback, @Nullable XSourcePosition expressionPosition) {
try {
final Value eval = myFrame.eval(expression);
callback.evaluated(new MyValue(new ExpressionResult(eval)));
} catch (VMPausedException ignored) {
callback.errorOccurred(VMPausedException.MESSAGE);
} catch (Debugger.EvaluationException e) {
callback.errorOccurred(e.getMessage() != null ? e.getMessage() : e.toString());
}
}
示例8: computeStackFrames
import org.intellij.plugins.xsltDebugger.VMPausedException; //导入依赖的package包/类
@Override
public void computeStackFrames(XStackFrameContainer container)
{
try
{
if(myDebuggerSession.getCurrentState() == Debugger.State.SUSPENDED)
{
Debugger.Frame frame = myTopFrame.getFrame();
final List<XStackFrame> frames = new ArrayList<XStackFrame>();
while(frame != null)
{
frame = frame.getPrevious();
if(frame != null)
{
frames.add(new XsltStackFrame(frame, myDebuggerSession));
}
}
int firstFrameIndex = 0;
if(firstFrameIndex <= frames.size())
{
container.addStackFrames(frames.subList(firstFrameIndex - 1, frames.size()), true);
}
else
{
container.addStackFrames(Collections.<XStackFrame>emptyList(), true);
}
}
}
catch(VMPausedException e)
{
container.errorOccurred(VMPausedException.MESSAGE);
}
}