Author: xavier
Date: Tue Nov 20 01:56:56 2007
New Revision: 596590

URL: http://svn.apache.org/viewvc?rev=596590&view=rev
Log:
FIX: On startup IvyIDE can freeze eclipse (thanks to Nicolas Lalevée)

Modified:
    incubator/ivy/ivyde/trunk/plugin.xml
    
incubator/ivy/ivyde/trunk/src/java/org/apache/ivyde/eclipse/cpcontainer/IvyClasspathContainer.java
    
incubator/ivy/ivyde/trunk/src/java/org/apache/ivyde/eclipse/cpcontainer/IvyClasspathInitializer.java

Modified: incubator/ivy/ivyde/trunk/plugin.xml
URL: 
http://svn.apache.org/viewvc/incubator/ivy/ivyde/trunk/plugin.xml?rev=596590&r1=596589&r2=596590&view=diff
==============================================================================
--- incubator/ivy/ivyde/trunk/plugin.xml (original)
+++ incubator/ivy/ivyde/trunk/plugin.xml Tue Nov 20 01:56:56 2007
@@ -3,7 +3,7 @@
 <plugin
    id="org.apache.ivyde.eclipse"
    name="IvyDE Eclipse Plug-in"
-   version="1.3.0.20070710103400"
+   version="1.3.0.20071119103400"
    provider-name="Apache"
    class="org.apache.ivyde.eclipse.IvyPlugin">
 

Modified: 
incubator/ivy/ivyde/trunk/src/java/org/apache/ivyde/eclipse/cpcontainer/IvyClasspathContainer.java
URL: 
http://svn.apache.org/viewvc/incubator/ivy/ivyde/trunk/src/java/org/apache/ivyde/eclipse/cpcontainer/IvyClasspathContainer.java?rev=596590&r1=596589&r2=596590&view=diff
==============================================================================
--- 
incubator/ivy/ivyde/trunk/src/java/org/apache/ivyde/eclipse/cpcontainer/IvyClasspathContainer.java
 (original)
+++ 
incubator/ivy/ivyde/trunk/src/java/org/apache/ivyde/eclipse/cpcontainer/IvyClasspathContainer.java
 Tue Nov 20 01:56:56 2007
@@ -531,7 +531,7 @@
     /* (non-Javadoc)
      * @see org.eclipse.jdt.core.IClasspathContainer#getClasspathEntries()
      */
-    private IvyResolveJob computeClasspathEntries(final boolean 
usePreviousResolveIfExist, boolean notify) {
+    private IvyResolveJob computeClasspathEntries(final boolean 
usePreviousResolveIfExist, boolean notify, boolean isUser) {
         try {
                Ivy ivy = IvyPlugin.getIvy(_javaProject);
 
@@ -541,7 +541,7 @@
                                return _job;
                        }
                        _job = new IvyResolveJob(ivy, 
usePreviousResolveIfExist, notify);
-                       _job.setUser(true);
+                       _job.setUser(isUser);
                        _job.setRule(RESOLVE_EVENT_RULE);
                        return _job;
                }
@@ -557,14 +557,17 @@
      * @param monitor
      */
     public void resolve(IProgressMonitor monitor) {
-        computeClasspathEntries(false, true).run(monitor);
+        computeClasspathEntries(false, true, true).run(monitor);
     }
     
     public void resolve() {
-        computeClasspathEntries(false, true).schedule();
+        computeClasspathEntries(false, true, true).schedule();
+    }
+    public void refresh(boolean isUser) {
+        computeClasspathEntries(true, true, isUser).schedule();
     }
     public void refresh() {
-        computeClasspathEntries(true, true).schedule();
+        refresh(true);
     }
 
 

Modified: 
incubator/ivy/ivyde/trunk/src/java/org/apache/ivyde/eclipse/cpcontainer/IvyClasspathInitializer.java
URL: 
http://svn.apache.org/viewvc/incubator/ivy/ivyde/trunk/src/java/org/apache/ivyde/eclipse/cpcontainer/IvyClasspathInitializer.java?rev=596590&r1=596589&r2=596590&view=diff
==============================================================================
--- 
incubator/ivy/ivyde/trunk/src/java/org/apache/ivyde/eclipse/cpcontainer/IvyClasspathInitializer.java
 (original)
+++ 
incubator/ivy/ivyde/trunk/src/java/org/apache/ivyde/eclipse/cpcontainer/IvyClasspathInitializer.java
 Tue Nov 20 01:56:56 2007
@@ -16,10 +16,8 @@
 import org.eclipse.swt.widgets.Display;
 
 /**
- * Initializer the ivy class path container.
- * 
- * TODO : start the dependency resolving in the background, with the errors
- * popuping more than getting silently logged
+ * Initializer the ivy class path container. It will create a container from 
the persisted class
+ * path entries, and then schedule the refresh of the container.
  */
 public class IvyClasspathInitializer extends ClasspathContainerInitializer {
 
@@ -60,7 +58,7 @@
             }
 
             // now refresh the container to be synchronized with the ivy.xml
-            ((IvyClasspathContainer) container).refresh();
+            ((IvyClasspathContainer) container).refresh(false);
         }
     }
 


Reply via email to