use of com.perl5.lang.perl.idea.run.debugger.breakpoints.PerlLineBreakpointProperties in project Perl5-IDEA by Camelcade.
the class PerlDebugProcess method stop.
@Override
public void stop() {
myDebugThread.setStop();
ApplicationManager.getApplication().runReadAction(() -> {
XBreakpointManager breakpointManager = XDebuggerManager.getInstance(getSession().getProject()).getBreakpointManager();
Collection<? extends XLineBreakpoint<PerlLineBreakpointProperties>> breakpoints = breakpointManager.getBreakpoints(PerlLineBreakpointType.class);
for (XLineBreakpoint<PerlLineBreakpointProperties> breakpoint : breakpoints) {
breakpointManager.updateBreakpointPresentation(breakpoint, null, null);
}
});
}
use of com.perl5.lang.perl.idea.run.debugger.breakpoints.PerlLineBreakpointProperties in project Perl5-IDEA by Camelcade.
the class PerlDebugUtil method findBreakpoint.
@Nullable
public static XLineBreakpoint findBreakpoint(final Project project, final PerlDebuggingEventBreakpoint breakpointBase) {
final XLineBreakpoint[] result = new XLineBreakpoint[] { null };
ApplicationManager.getApplication().runReadAction(() -> {
String path = breakpointBase.getPath();
VirtualFile virtualFile;
String virtualFileUrl;
virtualFile = VfsUtil.findFileByIoFile(new File(breakpointBase.getDebugThread().getDebugProfileState().mapPathToLocal(path)), true);
if (virtualFile == null) {
virtualFileUrl = PerlRemoteFileSystem.PROTOCOL_PREFIX + path;
} else {
virtualFileUrl = virtualFile.getUrl();
}
Collection<? extends XLineBreakpoint<PerlLineBreakpointProperties>> breakpoints = XDebuggerManager.getInstance(project).getBreakpointManager().getBreakpoints(PerlLineBreakpointType.class);
for (XLineBreakpoint<PerlLineBreakpointProperties> breakpoint : breakpoints) {
if (StringUtil.equals(breakpoint.getFileUrl(), virtualFileUrl) && breakpoint.getLine() == breakpointBase.getLine()) {
result[0] = breakpoint;
return;
}
}
});
return result[0];
}
Aggregations