use of com.liferay.ide.portal.ui.debug.IDebugEditor in project liferay-ide by liferay.
the class FMBreakpointProvider method addBreakpoint.
public IStatus addBreakpoint(IDocument document, IEditorInput input, int lineNumber, int offset) throws CoreException {
IStatus retval = Status.OK_STATUS;
if (fSourceEditingTextTools instanceof IDebugEditor) {
IDebugEditor debugEditor = (IDebugEditor) fSourceEditingTextTools;
IStatus status = debugEditor.validateBreakpointPosition(lineNumber, offset);
if (status.isOK()) {
if (input instanceof IFileEditorInput) {
final IFileEditorInput fileEditorInput = (IFileEditorInput) input;
final IFile file = fileEditorInput.getFile();
final FMLineBreakpoint bp = new FMLineBreakpoint(file, lineNumber);
DebugPlugin.getDefault().getBreakpointManager().addBreakpoint(bp);
}
} else {
retval = status;
}
}
return retval;
}
Aggregations