mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-18 09:34:34 +07:00
IDEA-CR-13656: JavaStackFrame reverted; JSR45PositionManager: toList() used
This commit is contained in:
@@ -31,6 +31,7 @@ import com.intellij.debugger.jdi.LocalVariablesUtil;
|
||||
import com.intellij.debugger.jdi.StackFrameProxyImpl;
|
||||
import com.intellij.debugger.settings.DebuggerSettings;
|
||||
import com.intellij.debugger.settings.NodeRendererSettings;
|
||||
import com.intellij.debugger.ui.breakpoints.Breakpoint;
|
||||
import com.intellij.debugger.ui.impl.watch.*;
|
||||
import com.intellij.debugger.ui.tree.render.DescriptorLabelListener;
|
||||
import com.intellij.lang.java.JavaLanguage;
|
||||
@@ -54,6 +55,7 @@ import com.intellij.xdebugger.frame.presentation.XValuePresentation;
|
||||
import com.intellij.xdebugger.impl.ui.XDebuggerUIConstants;
|
||||
import com.intellij.xdebugger.settings.XDebuggerSettingsManager;
|
||||
import com.sun.jdi.*;
|
||||
import com.sun.jdi.event.Event;
|
||||
import com.sun.jdi.event.ExceptionEvent;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
@@ -199,13 +201,18 @@ public class JavaStackFrame extends XStackFrame {
|
||||
children.add(JavaValue.create(returnValueDescriptor, evaluationContext, myNodeManager));
|
||||
}
|
||||
// add context exceptions
|
||||
|
||||
DebuggerUtilsEx.getEventDescriptors(debuggerContext.getSuspendContext()).stream()
|
||||
.map(pair -> pair.getSecond())
|
||||
.filter(debugEvent -> debugEvent instanceof ExceptionEvent).map(debugEvent -> ((ExceptionEvent)debugEvent).exception())
|
||||
.filter(Objects::nonNull).distinct()
|
||||
.forEach(e -> children.add(
|
||||
JavaValue.create(myNodeManager.getThrownExceptionObjectDescriptor(myDescriptor, e), evaluationContext, myNodeManager)));
|
||||
Set<ObjectReference> exceptions = new HashSet<>();
|
||||
for (Pair<Breakpoint, Event> pair : DebuggerUtilsEx.getEventDescriptors(debuggerContext.getSuspendContext())) {
|
||||
Event debugEvent = pair.getSecond();
|
||||
if (debugEvent instanceof ExceptionEvent) {
|
||||
ObjectReference exception = ((ExceptionEvent)debugEvent).exception();
|
||||
if (exception != null) {
|
||||
exceptions.add(exception);
|
||||
}
|
||||
}
|
||||
}
|
||||
exceptions.forEach(e -> children.add(
|
||||
JavaValue.create(myNodeManager.getThrownExceptionObjectDescriptor(myDescriptor, e), evaluationContext, myNodeManager)));
|
||||
|
||||
try {
|
||||
buildVariables(debuggerContext, evaluationContext, debugProcess, children, thisObjectReference, location);
|
||||
|
||||
@@ -196,8 +196,7 @@ public abstract class JSR45PositionManager<Scope> implements PositionManager {
|
||||
}
|
||||
|
||||
protected List<String> getRelativeSourePathsByType(final ReferenceType type) throws AbsentInformationException {
|
||||
final List<String> paths = type.sourcePaths(myStratumId);
|
||||
return paths.stream().map(this::getRelativePath).collect(Collectors.toCollection(ArrayList::new));
|
||||
return type.sourcePaths(myStratumId).stream().map(this::getRelativePath).collect(Collectors.toList());
|
||||
}
|
||||
|
||||
protected List<Location> getLocationsOfLine(final ReferenceType type, final String fileName,
|
||||
|
||||
Reference in New Issue
Block a user