1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-28 19:35:36 +02:00

build console improvements

This commit is contained in:
David Inglis 2002-11-20 14:16:00 +00:00
parent 22b835c277
commit 83d878c511
2 changed files with 29 additions and 13 deletions

View file

@ -1,3 +1,9 @@
2002-11-20 David Inglis
* src/.../internal/ui/BuildConsoleManager.java
Only flush the console when buffer > 512 instead of every line.
Plus do the console update synchronously as a async update can
cause problems if the update happen faster then the drawing.
2002-11-18 Alain Magloire 2002-11-18 Alain Magloire
* src/.../internal/ui/editor/CEditor.java (createCSourceViewer): * src/.../internal/ui/editor/CEditor.java (createCSourceViewer):

View file

@ -70,9 +70,13 @@ public class BuildConsoleManager implements IBuildConsoleManager, IResourceChang
return fDocument; return fDocument;
} }
public synchronized void flush() throws IOException { public void flush() throws IOException {
super.flush(); flush(false);
Display.getDefault().asyncExec(new Runnable() { }
public void flush(boolean force) throws IOException {
if ( force || fBuffer.length() > 512) {
Display.getDefault().syncExec(new Runnable() {
public void run() { public void run() {
if (CPluginPreferencePage.isConsoleOnTop()) if (CPluginPreferencePage.isConsoleOnTop())
bringConsoleOnTop(); bringConsoleOnTop();
@ -85,6 +89,7 @@ public class BuildConsoleManager implements IBuildConsoleManager, IResourceChang
} }
}); });
} }
}
void bringConsoleOnTop() { void bringConsoleOnTop() {
IWorkbenchWindow window = CUIPlugin.getActiveWorkbenchWindow(); IWorkbenchWindow window = CUIPlugin.getActiveWorkbenchWindow();
@ -111,6 +116,11 @@ public class BuildConsoleManager implements IBuildConsoleManager, IResourceChang
} }
} }
} }
public void close() throws IOException {
flush(true);
}
} }
public BuildConsoleManager() { public BuildConsoleManager() {