ant-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hi...@apache.org
Subject svn commit: r1465388 - in /ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse: IvyPlugin.java ui/preferences/PreferenceInitializer.java
Date Sun, 07 Apr 2013 13:04:35 GMT
Author: hibou
Date: Sun Apr  7 13:04:35 2013
New Revision: 1465388

URL: http://svn.apache.org/r1465388
Log:
IVYDE-341: the UI thread issue was in IvyPlugin, not in the PreferenceInitializer

Modified:
    ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/IvyPlugin.java
    ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/ui/preferences/PreferenceInitializer.java

Modified: ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/IvyPlugin.java
URL: http://svn.apache.org/viewvc/ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/IvyPlugin.java?rev=1465388&r1=1465387&r2=1465388&view=diff
==============================================================================
--- ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/IvyPlugin.java
(original)
+++ ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/IvyPlugin.java
Sun Apr  7 13:04:35 2013
@@ -152,15 +152,19 @@ public class IvyPlugin extends AbstractU
         };
         getPreferenceStore().addPropertyChangeListener(propertyListener);
 
-        try {
-            console = new IvyConsole();
-            if (prefStoreHelper.isOpenIvyConsoleOnStartup()) {
-                IvyConsoleFactory.showConsole();
+        Display.getDefault().asyncExec(new Runnable() {
+            public void run() {
+                try {
+                    console = new IvyConsole();
+                    if (prefStoreHelper.isOpenIvyConsoleOnStartup()) {
+                        IvyConsoleFactory.showConsole();
+                    }
+                } catch (RuntimeException e) {
+                    // Don't let the console bring down the IvyDE UI
+                    logError("Errors occurred starting the Ivy console", e);
+                }
             }
-        } catch (RuntimeException e) {
-            // Don't let the console bring down the IvyDE UI
-            logError("Errors occurred starting the Ivy console", e);
-        }
+        });
 
         // Listen for project open/close events to auto-update inter-project dependencies
         workspaceListener = new WorkspaceResourceChangeListener();

Modified: ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/ui/preferences/PreferenceInitializer.java
URL: http://svn.apache.org/viewvc/ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/ui/preferences/PreferenceInitializer.java?rev=1465388&r1=1465387&r2=1465388&view=diff
==============================================================================
--- ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/ui/preferences/PreferenceInitializer.java
(original)
+++ ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/ui/preferences/PreferenceInitializer.java
Sun Apr  7 13:04:35 2013
@@ -150,14 +150,6 @@ public class PreferenceInitializer exten
     public static final boolean DEFAULT_ERROR_POPUP = true;
 
     public void initializeDefaultPreferences() {
-        Display.getDefault().syncExec(new Runnable() {
-            public void run() {
-                doInitializeDefaultPreferences();
-            }
-        });
-    }
-
-    private void doInitializeDefaultPreferences() {
         IPreferenceStore store = IvyPlugin.getDefault().getPreferenceStore();
         store.setDefault(PreferenceConstants.P_BOOLEAN, true);
         store.setDefault(PreferenceConstants.P_CHOICE, "choice2");



Mime
View raw message