From a17b51bec37c42f0bf29df5bc454aff948bc6105 Mon Sep 17 00:00:00 2001 From: mkersten Date: Tue, 27 Apr 2004 18:55:41 +0000 Subject: [PATCH] Fix for 54238: Restore build cancelling to Swing-based IDEs --- .../src/org/aspectj/tools/ajbrowser/BasicEditor.java | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/ajbrowser/src/org/aspectj/tools/ajbrowser/BasicEditor.java b/ajbrowser/src/org/aspectj/tools/ajbrowser/BasicEditor.java index 95d5c9135..720ed65fd 100644 --- a/ajbrowser/src/org/aspectj/tools/ajbrowser/BasicEditor.java +++ b/ajbrowser/src/org/aspectj/tools/ajbrowser/BasicEditor.java @@ -72,9 +72,13 @@ public class BasicEditor implements EditorAdapter { } public void showSourceLine(ISourceLocation sourceLocation, boolean highlight) { - showSourceLine(sourceLocation.getSourceFile().getAbsolutePath(), sourceLocation.getLine(), highlight); - } - + try { + showSourceLine(sourceLocation.getSourceFile().getAbsolutePath(), sourceLocation.getLine(), highlight); + } catch (NullPointerException npe) { + Ajde.getDefault().getIdeUIAdapter().displayStatusInformation(" no corresponding source line to seek to"); + } + } + public void showSourceLine(int lineNumber, boolean highlight) { showSourceLine(filePath, lineNumber, highlight); } -- 2.39.5