Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Valenta2004-04-23 11:05:57 -0400
committerMichael Valenta2004-04-23 11:05:57 -0400
commitf3c35f4f307ba2f3918f17461bdbbd5969576ab7 (patch)
tree6380b81d61f6657481b011c4d005955cd4780b2d
parentd69767b8fbd387390d97421ecc8822e6d3597c3e (diff)
downloadeclipse.platform.team-f3c35f4f307ba2f3918f17461bdbbd5969576ab7.tar.gz
eclipse.platform.team-f3c35f4f307ba2f3918f17461bdbbd5969576ab7.tar.xz
eclipse.platform.team-f3c35f4f307ba2f3918f17461bdbbd5969576ab7.zip
59781: syncExec on startup causes slow (blocked?) startup
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/console/CVSOutputConsole.java44
1 files changed, 23 insertions, 21 deletions
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/console/CVSOutputConsole.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/console/CVSOutputConsole.java
index cc1cf8622..41b9f1d9b 100644
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/console/CVSOutputConsole.java
+++ b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/console/CVSOutputConsole.java
@@ -86,29 +86,30 @@ public class CVSOutputConsole extends MessageConsole implements IConsoleListener
showOnMessage = CVSUIPlugin.getPlugin().getPreferenceStore().getBoolean(ICVSUIConstants.PREF_CONSOLE_SHOW_ON_MESSAGE);
showOnError = CVSUIPlugin.getPlugin().getPreferenceStore().getBoolean(ICVSUIConstants.PREF_CONSOLE_SHOW_ON_ERROR);
document = new ConsoleDocument();
-
- // Ensure that initialization occurs in the ui thread
- CVSUIPlugin.getStandardDisplay().syncExec(new Runnable() {
- public void run() {
- commandStream = newMessageStream();
- errorStream = newMessageStream();
- messageStream = newMessageStream();
- // install colors
- commandColor = createColor(CVSUIPlugin.getStandardDisplay(), ICVSUIConstants.PREF_CONSOLE_COMMAND_COLOR);
- commandStream.setColor(commandColor);
- messageColor = createColor(CVSUIPlugin.getStandardDisplay(), ICVSUIConstants.PREF_CONSOLE_MESSAGE_COLOR);
- messageStream.setColor(messageColor);
- errorColor = createColor(CVSUIPlugin.getStandardDisplay(), ICVSUIConstants.PREF_CONSOLE_ERROR_COLOR);
- errorStream.setColor(errorColor);
- // install font
- setFont(JFaceResources.getFontRegistry().get(ICVSUIConstants.PREF_CONSOLE_FONT));
- CVSProviderPlugin.getPlugin().setConsoleListener(CVSOutputConsole.this);
- CVSUIPlugin.getPlugin().getPreferenceStore().addPropertyChangeListener(CVSOutputConsole.this);
- }
- });
+ CVSProviderPlugin.getPlugin().setConsoleListener(CVSOutputConsole.this);
+ CVSUIPlugin.getPlugin().getPreferenceStore().addPropertyChangeListener(CVSOutputConsole.this);
showConsole();
}
+ /*
+ * Initialize thre streams of the console. Must be
+ * called from the UI thread.
+ */
+ private void initializeStreams() {
+ commandStream = newMessageStream();
+ errorStream = newMessageStream();
+ messageStream = newMessageStream();
+ // install colors
+ commandColor = createColor(CVSUIPlugin.getStandardDisplay(), ICVSUIConstants.PREF_CONSOLE_COMMAND_COLOR);
+ commandStream.setColor(commandColor);
+ messageColor = createColor(CVSUIPlugin.getStandardDisplay(), ICVSUIConstants.PREF_CONSOLE_MESSAGE_COLOR);
+ messageStream.setColor(messageColor);
+ errorColor = createColor(CVSUIPlugin.getStandardDisplay(), ICVSUIConstants.PREF_CONSOLE_ERROR_COLOR);
+ errorStream.setColor(errorColor);
+ // install font
+ setFont(JFaceResources.getFontRegistry().get(ICVSUIConstants.PREF_CONSOLE_FONT));
+ }
+
/* (non-Javadoc)
* @see org.eclipse.ui.console.AbstractConsole#init()
*/
@@ -118,7 +119,8 @@ public class CVSOutputConsole extends MessageConsole implements IConsoleListener
// Ensure that initialization occurs in the ui thread
CVSUIPlugin.getStandardDisplay().asyncExec(new Runnable() {
public void run() {
- JFaceResources.getFontRegistry().addListener(CVSOutputConsole.this);
+ JFaceResources.getFontRegistry().addListener(CVSOutputConsole.this);
+ initializeStreams();
dump();
}
});

Back to the top