mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-23 22:52:11 +02:00
build console improvements
This commit is contained in:
parent
22b835c277
commit
83d878c511
2 changed files with 29 additions and 13 deletions
|
@ -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
|
||||
|
||||
* src/.../internal/ui/editor/CEditor.java (createCSourceViewer):
|
||||
|
|
|
@ -70,20 +70,25 @@ public class BuildConsoleManager implements IBuildConsoleManager, IResourceChang
|
|||
return fDocument;
|
||||
}
|
||||
|
||||
public synchronized void flush() throws IOException {
|
||||
super.flush();
|
||||
Display.getDefault().asyncExec(new Runnable() {
|
||||
public void run() {
|
||||
if (CPluginPreferencePage.isConsoleOnTop())
|
||||
bringConsoleOnTop();
|
||||
try {
|
||||
int len = fDocument.getLength();
|
||||
fDocument.replace(len, 0, readBuffer());
|
||||
public void flush() throws IOException {
|
||||
flush(false);
|
||||
}
|
||||
|
||||
public void flush(boolean force) throws IOException {
|
||||
if ( force || fBuffer.length() > 512) {
|
||||
Display.getDefault().syncExec(new Runnable() {
|
||||
public void run() {
|
||||
if (CPluginPreferencePage.isConsoleOnTop())
|
||||
bringConsoleOnTop();
|
||||
try {
|
||||
int len = fDocument.getLength();
|
||||
fDocument.replace(len, 0, readBuffer());
|
||||
}
|
||||
catch (BadLocationException x) {
|
||||
}
|
||||
}
|
||||
catch (BadLocationException x) {
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
void bringConsoleOnTop() {
|
||||
|
@ -111,6 +116,11 @@ public class BuildConsoleManager implements IBuildConsoleManager, IResourceChang
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void close() throws IOException {
|
||||
flush(true);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public BuildConsoleManager() {
|
||||
|
|
Loading…
Add table
Reference in a new issue