Log View freezes Eclipse on open when log server not found [was #7453]
{color:red}
reported by [~vitt] at 2008-05-28
previously known as [trac#66|http://www.textgrid.de/trac/ticket/66] {color}
To reproduce:
- Open a fresh TextGridLab
- Unplug network cable (or equivalent)
- Open Log View (Window / Show View / Log View or Ctrl+3 Log View)
The whole TextGridLab freezes for some minutes until the request to the log server times out.
To fix, fill Log View with a "Loading ..." message on open and move network interaction to a separate Job, pseudocode
{code}
view.show("Connecting ...");
new Job("Connecting to Log server", monitor) {
public IStatus run(monitor) {
final LogContent logContent = connectToLogServer();
new UIJob() {
public IStatus runWithUIThread() {
view.show(logContent);
return Status.OK_STATUS;
}.schedule();
return Status.OK_STATUS;
} {code}