diff options
author | Andrey Loskutov | 2019-02-04 15:28:20 +0000 |
---|---|---|
committer | Andrey Loskutov | 2019-02-05 20:21:21 +0000 |
commit | b5e59dfae33aa090da6d5e963015e1d59cd4e8b9 (patch) | |
tree | 3c2911a5fc09e16376d1a01f9acdca5133cc8a7c | |
parent | f17dee82bcbd41cf701a6feab0a052b1fb4b1143 (diff) | |
download | eclipse.jdt.debug-b5e59dfae33aa090da6d5e963015e1d59cd4e8b9.tar.gz eclipse.jdt.debug-b5e59dfae33aa090da6d5e963015e1d59cd4e8b9.tar.xz eclipse.jdt.debug-b5e59dfae33aa090da6d5e963015e1d59cd4e8b9.zip |
Bug 532557 - BadLocationException below ConsoleDocument.getLineOfOffsetI20190205-1800
Small workaround to avoid setting console text at same time console is
shown.
Change-Id: Icf1215219cf713112ffd94192456b2b978a85817
Signed-off-by: Andrey Loskutov <loskutov@gmx.de>
-rw-r--r-- | org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/debug/ui/console/JavaStackTraceConsoleFactory.java | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/debug/ui/console/JavaStackTraceConsoleFactory.java b/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/debug/ui/console/JavaStackTraceConsoleFactory.java index 3a8e3d604..15aee2a02 100644 --- a/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/debug/ui/console/JavaStackTraceConsoleFactory.java +++ b/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/debug/ui/console/JavaStackTraceConsoleFactory.java @@ -68,10 +68,13 @@ public class JavaStackTraceConsoleFactory implements IConsoleFactory { public void openConsole(String initialText) { if (fConsole == null) { fConsole = new JavaStackTraceConsole(); - fConsole.initializeDocument(); + if (initialText != null) { + fConsole.getDocument().set(initialText); + } else { + fConsole.initializeDocument(); + } fConsoleManager.addConsoles(new IConsole[] { fConsole }); - } - if (initialText != null) { + } else if (initialText != null) { fConsole.getDocument().set(initialText); } fConsoleManager.showConsoleView(fConsole); |