You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ant.apache.org by hi...@apache.org on 2010/08/23 11:41:18 UTC

svn commit: r988046 - in /ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse: ./ cpcontainer/ retrieve/ ui/ ui/preferences/

Author: hibou
Date: Mon Aug 23 09:41:17 2010
New Revision: 988046

URL: http://svn.apache.org/viewvc?rev=988046&view=rev
Log:
IVYDE-56: ...work still in progress...
 * add configuration conversion for backward compatibility
 * remove the retrieve from classpath container config

Added:
    ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/retrieve/RetrieveSetup.java
      - copied, changed from r988035, ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/cpcontainer/RetrieveSetup.java
Removed:
    ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/cpcontainer/RetrieveSetup.java
    ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/ui/preferences/RetrievePreferencePage.java
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/cpcontainer/IvyClasspathContainerConfAdapter.java
    ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/cpcontainer/IvyClasspathContainerConfiguration.java
    ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/cpcontainer/IvyResolveJobThread.java
    ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/cpcontainer/IvydeContainerPage.java
    ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/retrieve/RetrieveSetupManager.java
    ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/retrieve/StandaloneRetrieveSerializer.java
    ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/retrieve/StandaloneRetrieveSetup.java
    ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/ui/RetrieveComposite.java
    ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/ui/preferences/IvyDEPreferenceStoreHelper.java
    ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/ui/preferences/IvyDEProjectPreferences.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=988046&r1=988045&r2=988046&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 Mon Aug 23 09:41:17 2010
@@ -80,8 +80,6 @@ public class IvyPlugin extends AbstractU
 
     private IvyDEPreferenceStoreHelper prefStoreHelper;
 
-    private IJavaModel javaModel;
-
     private BundleContext bundleContext;
 
     private ColorManager colorManager;
@@ -90,6 +88,12 @@ public class IvyPlugin extends AbstractU
 
     private RetrieveSetupManager retrieveSetupManager;
 
+    private WorkspaceResourceChangeListener workspaceListener;
+
+    private IvyFileResourceListener ivyFileListener;
+
+    private IPropertyChangeListener propertyListener;
+
     /**
      * The constructor.
      */
@@ -106,17 +110,18 @@ public class IvyPlugin extends AbstractU
         this.bundleContext = context;
         log(IStatus.INFO, "starting IvyDE plugin", null);
         ivyResolveJob = new IvyResolveJob();
-        
+
         retrieveSetupManager = new RetrieveSetupManager();
 
-        javaModel = JavaCore.create(ResourcesPlugin.getWorkspace().getRoot());
-        
+        IWorkspace workspace = ResourcesPlugin.getWorkspace();
+        workspace.addSaveParticipant(this, retrieveSetupManager);
+
         colorManager = new ColorManager();
         colorManager.refreshFromStore(getPreferenceStore());
 
         prefStoreHelper = new IvyDEPreferenceStoreHelper(getPreferenceStore());
 
-        getPreferenceStore().addPropertyChangeListener(new IPropertyChangeListener() {
+        propertyListener = new IPropertyChangeListener() {
             public void propertyChange(PropertyChangeEvent event) {
                 try {
                     if (event.getProperty() == PreferenceConstants.IVYSETTINGS_PATH
@@ -126,7 +131,7 @@ public class IvyPlugin extends AbstractU
                             || event.getProperty() == PreferenceConstants.SOURCES_SUFFIXES
                             || event.getProperty() == PreferenceConstants.JAVADOC_SUFFIXES
                             || event.getProperty() == PreferenceConstants.DO_RETRIEVE_DEPRECATED
-                           || event.getProperty() == PreferenceConstants.RETRIEVE_PATTERN_DEPRECATED
+                            || event.getProperty() == PreferenceConstants.RETRIEVE_PATTERN_DEPRECATED
                             || event.getProperty() == PreferenceConstants.DO_RETRIEVE
                             || event.getProperty() == PreferenceConstants.RETRIEVE_PATTERN
                             || event.getProperty() == PreferenceConstants.RETRIEVE_SYNC
@@ -141,7 +146,8 @@ public class IvyPlugin extends AbstractU
                                 .getMessage());
                 }
             }
-        });
+        };
+        getPreferenceStore().addPropertyChangeListener(propertyListener);
 
         try {
             console = new IvyConsole();
@@ -151,11 +157,10 @@ public class IvyPlugin extends AbstractU
         }
 
         // Listen for project open/close events to auto-update inter-project dependencies
-        IWorkspace workspace = ResourcesPlugin.getWorkspace();
-
-        workspace.addResourceChangeListener(new WorkspaceResourceChangeListener());
-        workspace.addResourceChangeListener(new IvyFileResourceListener(),
-            IResourceChangeEvent.PRE_BUILD);
+        workspaceListener = new WorkspaceResourceChangeListener();
+        workspace.addResourceChangeListener(workspaceListener);
+        ivyFileListener = new IvyFileResourceListener();
+        workspace.addResourceChangeListener(ivyFileListener, IResourceChangeEvent.PRE_BUILD);
 
         log(IStatus.INFO, "IvyDE plugin started", null);
     }
@@ -167,15 +172,28 @@ public class IvyPlugin extends AbstractU
         super.stop(context);
         plugin = null;
         resourceBundle = null;
+        IWorkspace workspace = ResourcesPlugin.getWorkspace();
+        workspace.removeSaveParticipant(this);
         colorManager = null;
         ivyResolveJob = null;
         retrieveSetupManager = null;
-        // if (console != null)
-        // console.shutdown();
+        workspace.removeResourceChangeListener(workspaceListener);
+        workspaceListener = null;
+        workspace.removeResourceChangeListener(ivyFileListener);
+        ivyFileListener = null;
+
+        getPreferenceStore().removePropertyChangeListener(propertyListener);
+        propertyListener = null;
+
+        if (console != null) {
+            console.destroy();
+        }
     }
 
     void prefStoreChanged() throws JavaModelException {
-        IJavaProject[] projects = plugin.javaModel.getJavaProjects();
+        IWorkspace workspace = ResourcesPlugin.getWorkspace();
+        IJavaModel javaModel = JavaCore.create(workspace.getRoot());
+        IJavaProject[] projects = javaModel.getJavaProjects();
         for (int i = 0; i < projects.length; i++) {
             List/* <IvyClasspathContainer> */containers = IvyClasspathUtil
                     .getIvyClasspathContainers(projects[i]);
@@ -283,13 +301,13 @@ public class IvyPlugin extends AbstractU
      * @return the adapted object
      */
 
-    public static /*<T> T*/ Object adapt(Object object, Class/*<T>*/ type) {
+    public static/* <T> T */Object adapt(Object object, Class/* <T> */type) {
         if (type.isInstance(object)) {
-            return /*(T)*/ object;
+            return /* (T) */object;
         } else if (object instanceof IAdaptable) {
-            return /*(T)*/ ((IAdaptable) object).getAdapter(type);
+            return /* (T) */((IAdaptable) object).getAdapter(type);
         }
-        return /*(T)*/ Platform.getAdapterManager().getAdapter(object, type);
+        return /* (T) */Platform.getAdapterManager().getAdapter(object, type);
     }
 
     /**

Modified: ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/cpcontainer/IvyClasspathContainerConfAdapter.java
URL: http://svn.apache.org/viewvc/ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/cpcontainer/IvyClasspathContainerConfAdapter.java?rev=988046&r1=988045&r2=988046&view=diff
==============================================================================
--- ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/cpcontainer/IvyClasspathContainerConfAdapter.java (original)
+++ ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/cpcontainer/IvyClasspathContainerConfAdapter.java Mon Aug 23 09:41:17 2010
@@ -18,6 +18,7 @@
 package org.apache.ivyde.eclipse.cpcontainer;
 
 import java.io.File;
+import java.io.IOException;
 import java.io.UnsupportedEncodingException;
 import java.net.MalformedURLException;
 import java.net.URL;
@@ -29,10 +30,16 @@ import java.util.List;
 import org.apache.ivyde.eclipse.FakeProjectManager;
 import org.apache.ivyde.eclipse.IvyNature;
 import org.apache.ivyde.eclipse.IvyPlugin;
+import org.apache.ivyde.eclipse.retrieve.RetrieveSetup;
+import org.apache.ivyde.eclipse.retrieve.RetrieveSetupManager;
+import org.apache.ivyde.eclipse.retrieve.StandaloneRetrieveSetup;
+import org.apache.ivyde.eclipse.ui.preferences.PreferenceConstants;
+import org.eclipse.core.resources.IProject;
 import org.eclipse.core.runtime.IPath;
 import org.eclipse.core.runtime.IStatus;
 import org.eclipse.core.runtime.Path;
 import org.eclipse.jdt.core.IClasspathAttribute;
+import org.eclipse.jface.preference.IPreferenceStore;
 
 /**
  * This class maps the IvyDE classpath container configuration into Eclipse objects representing
@@ -90,14 +97,18 @@ public final class IvyClasspathContainer
      */
     private static void loadV1(IvyClasspathContainerConfiguration conf, IPath path) {
         ContainerMappingSetup mappingSetup = conf.getContainerMappingSetup();
-        RetrieveSetup retrieveSetup = conf.getRetrieveSetup();
         IvySettingsSetup settingsSetup = conf.getIvySettingsSetup();
 
         String url = path.segment(1).substring(1);
         String[] parameters = url.split("&");
         conf.setAdvancedProjectSpecific(false);
-        conf.setRetrieveProjectSpecific(false);
         conf.setSettingsProjectSpecific(false);
+
+        String ivyXmlPath = "ivy.xml";
+        boolean doStandaloneRetrieve = false;
+        boolean isRetrieveProjectSpecific = false;
+        RetrieveSetup retrieveSetup = new RetrieveSetup();
+
         for (int i = 0; i < parameters.length; i++) {
             String[] parameter = parameters[i].split("=");
             if (parameter == null || parameter.length == 0) {
@@ -112,6 +123,7 @@ public final class IvyClasspathContainer
                 throw new RuntimeException(UTF8_ERROR, e);
             }
             if (parameter[0].equals("ivyXmlPath")) {
+                ivyXmlPath = value;
                 conf.setIvyXmlPath(value);
             } else if (parameter[0].equals("confs")) {
                 List confs = IvyClasspathUtil.split(value);
@@ -128,23 +140,6 @@ public final class IvyClasspathContainer
             } else if (parameter[0].equals("propertyFiles")) {
                 settingsSetup.setPropertyFiles(IvyClasspathUtil.split(value));
                 conf.setSettingsProjectSpecific(true);
-            } else if (parameter[0].equals("doRetrieve")) {
-                // if the value is not actually "true" or "false", the Boolean class ensure to
-                // return false, so it is fine
-                retrieveSetup.setDoRetrieve(Boolean.valueOf(value).booleanValue());
-                conf.setRetrieveProjectSpecific(true);
-            } else if (parameter[0].equals("retrievePattern")) {
-                retrieveSetup.setRetrievePattern(value);
-                conf.setRetrieveProjectSpecific(true);
-            } else if (parameter[0].equals("retrieveSync")) {
-                retrieveSetup.setRetrieveSync(Boolean.valueOf(value).booleanValue());
-                conf.setRetrieveProjectSpecific(true);
-            } else if (parameter[0].equals("retrieveConfs")) {
-                retrieveSetup.setRetrieveConfs(value);
-                conf.setRetrieveProjectSpecific(true);
-            } else if (parameter[0].equals("retrieveTypes")) {
-                retrieveSetup.setRetrieveTypes(value);
-                conf.setRetrieveProjectSpecific(true);
             } else if (parameter[0].equals("acceptedTypes")) {
                 mappingSetup.setAcceptedTypes(IvyClasspathUtil.split(value));
                 conf.setAdvancedProjectSpecific(true);
@@ -171,17 +166,94 @@ public final class IvyClasspathContainer
             } else if (parameter[0].equals("resolveBeforeLaunch")) {
                 conf.setResolveBeforeLaunch(Boolean.valueOf(value).booleanValue());
                 conf.setAdvancedProjectSpecific(true);
+
+                // the following is the retrieve conf pre -IVYDE-56
+                // from this conf should be build StandaloneRetrieveSetup
+
+            } else if (parameter[0].equals("doRetrieve")) {
+                // if the value is not actually "true" or "false", the Boolean class ensure to
+                // return false, so it is fine
+                doStandaloneRetrieve = Boolean.valueOf(value).booleanValue();
+                isRetrieveProjectSpecific = true;
+            } else if (parameter[0].equals("retrievePattern")) {
+                retrieveSetup.setRetrievePattern(value);
+                isRetrieveProjectSpecific = true;
+            } else if (parameter[0].equals("retrieveSync")) {
+                retrieveSetup.setRetrieveSync(Boolean.valueOf(value).booleanValue());
+                isRetrieveProjectSpecific = true;
+            } else if (parameter[0].equals("retrieveConfs")) {
+                retrieveSetup.setRetrieveConfs(value);
+                isRetrieveProjectSpecific = true;
+            } else if (parameter[0].equals("retrieveTypes")) {
+                retrieveSetup.setRetrieveTypes(value);
+                isRetrieveProjectSpecific = true;
             }
         }
         if (conf.isAdvancedProjectSpecific()) {
             // in this V1 version, it is just some paranoid check
             checkNonNullConf(conf);
         }
-        if (conf.isRetrieveProjectSpecific()) {
-            if (retrieveSetup.getRetrievePattern() == null) {
-                retrieveSetup.setRetrievePattern(IvyPlugin.getPreferenceStoreHelper()
-                        .getRetrieveSetup().getRetrievePattern());
+
+        // convert pre IVYDE-56 conf
+        convertOldRetrieveConf(conf, isRetrieveProjectSpecific, doStandaloneRetrieve,
+            retrieveSetup, settingsSetup, ivyXmlPath);
+    }
+
+    private static void convertOldRetrieveConf(IvyClasspathContainerConfiguration conf,
+            boolean isRetrieveProjectSpecific, boolean doStandaloneRetrieve,
+            RetrieveSetup retrieveSetup, IvySettingsSetup settingsSetup, String ivyXmlPath) {
+        if (conf.getJavaProject() == null) {
+            // no project means no retrieve possible
+            return;
+        }
+
+        StandaloneRetrieveSetup setup = new StandaloneRetrieveSetup();
+        setup.setName("dependencies");
+        setup.setIvySettingsSetup(settingsSetup);
+        setup.setIvyXmlPath(ivyXmlPath);
+        setup.setSettingsProjectSpecific(conf.isSettingsProjectSpecific());
+
+        IPreferenceStore prefStore = IvyPlugin.getDefault().getPreferenceStore();
+
+        if (isRetrieveProjectSpecific) {
+            if (!doStandaloneRetrieve) {
+                return;
+            }
+        } else {
+            if (!prefStore.getBoolean(PreferenceConstants.DO_RETRIEVE)) {
+                return;
             }
+            retrieveSetup = new RetrieveSetup();
+            retrieveSetup.setRetrieveConfs(prefStore.getString(PreferenceConstants.RETRIEVE_CONFS));
+            retrieveSetup.setRetrievePattern(prefStore
+                    .getString(PreferenceConstants.RETRIEVE_PATTERN));
+            retrieveSetup.setRetrieveSync(prefStore.getBoolean(PreferenceConstants.RETRIEVE_SYNC));
+            retrieveSetup.setRetrieveTypes(prefStore.getString(PreferenceConstants.RETRIEVE_TYPES));
+        }
+
+        if (retrieveSetup.getRetrievePattern() == null) {
+            retrieveSetup.setRetrievePattern(prefStore
+                    .getString(PreferenceConstants.RETRIEVE_PATTERN));
+        }
+
+        setup.setRetrieveSetup(retrieveSetup);
+
+        RetrieveSetupManager manager = IvyPlugin.getDefault().getRetrieveSetupManager();
+        IProject project = conf.getJavaProject().getProject();
+        List retrieveSetups;
+        try {
+            retrieveSetups = manager.getSetup(project);
+        } catch (IOException e) {
+            // TODO Auto-generated catch block
+            e.printStackTrace();
+            return;
+        }
+        retrieveSetups.add(setup);
+        try {
+            manager.save(project, retrieveSetups);
+        } catch (Exception e) {
+            // TODO Auto-generated catch block
+            e.printStackTrace();
         }
     }
 
@@ -267,14 +339,6 @@ public final class IvyClasspathContainer
                 append(path, "loadSettingsOnDemand", setup.isLoadSettingsOnDemand());
                 append(path, "propertyFiles", setup.getRawPropertyFiles());
             }
-            if (conf.isRetrieveProjectSpecific()) {
-                RetrieveSetup setup = conf.getRetrieveSetup();
-                append(path, "doRetrieve", setup.isDoRetrieve());
-                append(path, "retrievePattern", setup.getRetrievePattern());
-                append(path, "retrieveSync", setup.isRetrieveSync());
-                append(path, "retrieveConfs", setup.getRetrieveConfs());
-                append(path, "retrieveTypes", setup.getRetrieveTypes());
-            }
             if (conf.isAdvancedProjectSpecific()) {
                 ContainerMappingSetup setup = conf.getContainerMappingSetup();
                 append(path, "acceptedTypes", setup.getAcceptedTypes());

Modified: ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/cpcontainer/IvyClasspathContainerConfiguration.java
URL: http://svn.apache.org/viewvc/ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/cpcontainer/IvyClasspathContainerConfiguration.java?rev=988046&r1=988045&r2=988046&view=diff
==============================================================================
--- ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/cpcontainer/IvyClasspathContainerConfiguration.java (original)
+++ ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/cpcontainer/IvyClasspathContainerConfiguration.java Mon Aug 23 09:41:17 2010
@@ -39,8 +39,6 @@ public class IvyClasspathContainerConfig
 
     private ContainerMappingSetup containerMappingSetup = new ContainerMappingSetup();
 
-    private RetrieveSetup retrieveSetup = new RetrieveSetup();
-
     private String ivyXmlPath;
 
     private List/* <String> */confs = Arrays.asList(new String[] {"*"});
@@ -51,8 +49,6 @@ public class IvyClasspathContainerConfig
 
     private boolean isAdvancedProjectSpecific;
 
-    private boolean isRetrieveProjectSpecific;
-
     private boolean isSettingsProjectSpecific;
 
     private boolean resolveBeforeLaunch;
@@ -133,14 +129,6 @@ public class IvyClasspathContainerConfig
         this.containerMappingSetup = containerMappingSetup;
     }
 
-    public RetrieveSetup getRetrieveSetup() {
-        return retrieveSetup;
-    }
-
-    public void setRetrieveSetup(RetrieveSetup retrieveSetup) {
-        this.retrieveSetup = retrieveSetup;
-    }
-
     public boolean isAlphaOrder() {
         return alphaOrder;
     }
@@ -165,14 +153,6 @@ public class IvyClasspathContainerConfig
         this.isAdvancedProjectSpecific = isAdvancedProjectSpecific;
     }
 
-    public boolean isRetrieveProjectSpecific() {
-        return isRetrieveProjectSpecific;
-    }
-
-    public void setRetrieveProjectSpecific(boolean isRetrieveProjectSpecific) {
-        this.isRetrieveProjectSpecific = isRetrieveProjectSpecific;
-    }
-
     public boolean isSettingsProjectSpecific() {
         return isSettingsProjectSpecific;
     }
@@ -230,45 +210,6 @@ public class IvyClasspathContainerConfig
         }
     }
 
-    public boolean getInheritedDoRetrieve() {
-        if (javaProject == null) {
-            // no project means no retrieve possible
-            return false;
-        }
-        if (!isRetrieveProjectSpecific) {
-            return IvyPlugin.getPreferenceStoreHelper().getRetrieveSetup().isDoRetrieve();
-        }
-        return retrieveSetup.isDoRetrieve();
-    }
-
-    public String getInheritedRetrievePattern() {
-        if (!isRetrieveProjectSpecific) {
-            return IvyPlugin.getPreferenceStoreHelper().getRetrieveSetup().getRetrievePattern();
-        }
-        return retrieveSetup.getRetrievePattern();
-    }
-
-    public String getInheritedRetrieveConfs() {
-        if (!isRetrieveProjectSpecific) {
-            return IvyPlugin.getPreferenceStoreHelper().getRetrieveSetup().getRetrieveConfs();
-        }
-        return retrieveSetup.getRetrieveConfs();
-    }
-
-    public String getInheritedRetrieveTypes() {
-        if (!isRetrieveProjectSpecific) {
-            return IvyPlugin.getPreferenceStoreHelper().getRetrieveSetup().getRetrieveTypes();
-        }
-        return retrieveSetup.getRetrieveTypes();
-    }
-
-    public boolean getInheritedRetrieveSync() {
-        if (!isRetrieveProjectSpecific) {
-            return IvyPlugin.getPreferenceStoreHelper().getRetrieveSetup().isRetrieveSync();
-        }
-        return retrieveSetup.isRetrieveSync();
-    }
-
     public Collection getInheritedAcceptedTypes() {
         if (!isAdvancedProjectSpecific) {
             return IvyPlugin.getPreferenceStoreHelper().getContainerMappingSetup()

Modified: ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/cpcontainer/IvyResolveJobThread.java
URL: http://svn.apache.org/viewvc/ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/cpcontainer/IvyResolveJobThread.java?rev=988046&r1=988045&r2=988046&view=diff
==============================================================================
--- ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/cpcontainer/IvyResolveJobThread.java (original)
+++ ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/cpcontainer/IvyResolveJobThread.java Mon Aug 23 09:41:17 2010
@@ -42,12 +42,9 @@ import org.apache.ivy.core.resolve.IvyNo
 import org.apache.ivy.core.resolve.ResolveData;
 import org.apache.ivy.core.resolve.ResolveOptions;
 import org.apache.ivy.core.resolve.ResolvedModuleRevision;
-import org.apache.ivy.core.retrieve.RetrieveOptions;
 import org.apache.ivy.plugins.report.XmlReportParser;
 import org.apache.ivy.plugins.resolver.DependencyResolver;
 import org.apache.ivy.util.Message;
-import org.apache.ivy.util.filter.ArtifactTypeFilter;
-import org.apache.ivyde.eclipse.FakeProjectManager;
 import org.apache.ivyde.eclipse.IvyPlugin;
 import org.eclipse.core.resources.IFolder;
 import org.eclipse.core.resources.IResource;
@@ -179,9 +176,6 @@ public class IvyResolveJobThread extends
     private void computeConfs() {
         Set configurations = new HashSet();
         configurations.addAll(conf.getConfs());
-        if (conf.getInheritedDoRetrieve()) {
-            configurations.addAll(Arrays.asList(conf.getInheritedRetrieveConfs().split(",")));
-        }
 
         if (configurations.contains("*")) {
             confs = md.getConfigurationsNames();
@@ -246,7 +240,6 @@ public class IvyResolveJobThread extends
             status = Status.CANCEL_STATUS;
             return false;
         }
-        maybeRetrieve();
         return true;
     }
 
@@ -324,34 +317,6 @@ public class IvyResolveJobThread extends
         ivy.getLoggerEngine().log(buffer.toString(), Message.MSG_WARN);
     }
 
-    private void maybeRetrieve() throws IOException {
-        if (!conf.getInheritedDoRetrieve()) {
-            return;
-        }
-        if (FakeProjectManager.isFake(conf.getJavaProject())) {
-            return;
-        }
-        String pattern = conf.getJavaProject().getProject().getLocation().toPortableString() + "/"
-                + conf.getInheritedRetrievePattern();
-        monitor.setTaskName("retrieving dependencies in " + pattern);
-        RetrieveOptions c = new RetrieveOptions();
-        c.setSync(conf.getInheritedRetrieveSync());
-        c.setConfs(conf.getInheritedRetrieveConfs().split(","));
-        String inheritedRetrieveTypes = conf.getInheritedRetrieveTypes();
-        if (inheritedRetrieveTypes != null && !inheritedRetrieveTypes.equals("*")) {
-            c.setArtifactFilter(new ArtifactTypeFilter(IvyClasspathUtil
-                    .split(inheritedRetrieveTypes)));
-        }
-        int numberOfItemsRetrieved = ivy.retrieve(md.getModuleRevisionId(), pattern, c);
-        if (numberOfItemsRetrieved > 0) {
-            // Only refresh if we actually retrieved a file.
-            String refreshPath = IvyPatternHelper.getTokenRoot(conf.getInheritedRetrievePattern());
-            IFolder folder = conf.getJavaProject().getProject().getFolder(refreshPath);
-            RefreshFolderJob refreshFolderJob = new RefreshFolderJob(folder);
-            refreshFolderJob.schedule();
-        }
-    }
-
     private Map/* <ModuleRevisionId, Artifact[]> */getArtifactsByDependency(ResolveReport r) {
         Map result = new HashMap();
         for (Iterator it = r.getDependencies().iterator(); it.hasNext();) {

Modified: ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/cpcontainer/IvydeContainerPage.java
URL: http://svn.apache.org/viewvc/ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/cpcontainer/IvydeContainerPage.java?rev=988046&r1=988045&r2=988046&view=diff
==============================================================================
--- ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/cpcontainer/IvydeContainerPage.java (original)
+++ ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/cpcontainer/IvydeContainerPage.java Mon Aug 23 09:41:17 2010
@@ -30,12 +30,10 @@ import org.apache.ivyde.eclipse.ui.Accep
 import org.apache.ivyde.eclipse.ui.ConfTableViewer;
 import org.apache.ivyde.eclipse.ui.IvyFilePathText;
 import org.apache.ivyde.eclipse.ui.IvySettingsTab;
-import org.apache.ivyde.eclipse.ui.RetrieveComposite;
 import org.apache.ivyde.eclipse.ui.ConfTableViewer.ConfTableListener;
 import org.apache.ivyde.eclipse.ui.IvyFilePathText.IvyXmlPathListener;
 import org.apache.ivyde.eclipse.ui.preferences.ClasspathPreferencePage;
 import org.apache.ivyde.eclipse.ui.preferences.IvyDEPreferenceStoreHelper;
-import org.apache.ivyde.eclipse.ui.preferences.RetrievePreferencePage;
 import org.eclipse.core.resources.IFile;
 import org.eclipse.core.runtime.IPath;
 import org.eclipse.core.runtime.IStatus;
@@ -92,14 +90,8 @@ public class IvydeContainerPage extends 
 
     private TabFolder tabs;
 
-    private RetrieveComposite retrieveComposite;
-
     private AcceptedSuffixesTypesComposite acceptedSuffixesTypesComposite;
 
-    private Button retrieveProjectSpecificButton;
-
-    private Link retrieveGeneralSettingsLink;
-
     private boolean exported = false;
 
     private String oldIvyFile = null;
@@ -205,12 +197,6 @@ public class IvydeContainerPage extends 
             conf.setSettingsProjectSpecific(false);
         }
 
-        if (retrieveProjectSpecificButton.getSelection()) {
-            conf.setRetrieveProjectSpecific(true);
-            conf.setRetrieveSetup(retrieveComposite.getRetrieveSetup());
-        } else {
-            conf.setRetrieveProjectSpecific(false);
-        }
         if (advancedProjectSpecificButton.getSelection()) {
             conf.setAdvancedProjectSpecific(true);
             conf
@@ -302,10 +288,6 @@ public class IvydeContainerPage extends 
             }
         };
 
-        TabItem retrieveTab = new TabItem(tabs, SWT.NONE);
-        retrieveTab.setText("Retrieve");
-        retrieveTab.setControl(createRetrieveTab(tabs));
-
         TabItem advancedTab = new TabItem(tabs, SWT.NONE);
         advancedTab.setText("Advanced");
         advancedTab.setControl(createAdvancedTab(tabs));
@@ -382,48 +364,6 @@ public class IvydeContainerPage extends 
         return composite;
     }
 
-    private Control createRetrieveTab(Composite parent) {
-        Composite composite = new Composite(parent, SWT.NONE);
-        composite.setLayout(new GridLayout());
-        composite.setLayoutData(new GridData(GridData.FILL, GridData.FILL, true, true));
-
-        Composite headerComposite = new Composite(composite, SWT.NONE);
-        headerComposite.setLayout(new GridLayout(2, false));
-        headerComposite.setLayoutData(new GridData(GridData.FILL, GridData.FILL, true, false));
-
-        retrieveProjectSpecificButton = new Button(headerComposite, SWT.CHECK);
-        retrieveProjectSpecificButton.setText("Enable project specific settings");
-        retrieveProjectSpecificButton.addSelectionListener(new SelectionAdapter() {
-            public void widgetSelected(SelectionEvent e) {
-                updateFieldsStatusRetrieve();
-            }
-        });
-
-        retrieveGeneralSettingsLink = new Link(headerComposite, SWT.NONE);
-        retrieveGeneralSettingsLink.setFont(composite.getFont());
-        retrieveGeneralSettingsLink.setText("<A>Configure Workspace Settings...</A>");
-        retrieveGeneralSettingsLink.addSelectionListener(new SelectionAdapter() {
-            public void widgetSelected(SelectionEvent e) {
-                PreferenceDialog dialog = PreferencesUtil.createPreferenceDialogOn(getShell(),
-                    RetrievePreferencePage.PEREFERENCE_PAGE_ID, null, null);
-                dialog.open();
-            }
-        });
-        retrieveGeneralSettingsLink.setLayoutData(new GridData(SWT.END, SWT.CENTER, false, false));
-
-        Label horizontalLine = new Label(headerComposite, SWT.SEPARATOR | SWT.HORIZONTAL);
-        horizontalLine.setLayoutData(new GridData(GridData.FILL, GridData.FILL, true, false, 2, 1));
-
-        Composite configComposite = new Composite(composite, SWT.NONE);
-        configComposite.setLayout(new GridLayout());
-        configComposite.setLayoutData(new GridData(GridData.FILL, GridData.FILL, true, false));
-
-        retrieveComposite = new RetrieveComposite(configComposite, SWT.NONE);
-        retrieveComposite.setLayoutData(new GridData(GridData.FILL, GridData.FILL, true, false));
-
-        return composite;
-    }
-
     private Control createAdvancedTab(Composite parent) {
         Composite composite = new Composite(parent, SWT.NONE);
         composite.setLayout(new GridLayout());
@@ -500,14 +440,6 @@ public class IvydeContainerPage extends 
 
         settingsTab.init(conf.isSettingsProjectSpecific(), conf.getIvySettingsSetup());
 
-        if (conf.isRetrieveProjectSpecific()) {
-            retrieveProjectSpecificButton.setSelection(true);
-            retrieveComposite.init(conf.getRetrieveSetup());
-        } else {
-            retrieveProjectSpecificButton.setSelection(false);
-            retrieveComposite.init(helper.getRetrieveSetup());
-        }
-
         if (conf.isAdvancedProjectSpecific()) {
             advancedProjectSpecificButton.setSelection(true);
             acceptedSuffixesTypesComposite.init(conf.getContainerMappingSetup());
@@ -523,17 +455,9 @@ public class IvydeContainerPage extends 
         }
 
         settingsTab.updateFieldsStatusSettings();
-        updateFieldsStatusRetrieve();
         updateFieldsStatusAdvanced();
     }
 
-    void updateFieldsStatusRetrieve() {
-        boolean projectSpecific = retrieveProjectSpecificButton.getSelection();
-        conf.setRetrieveProjectSpecific(projectSpecific);
-        retrieveGeneralSettingsLink.setEnabled(!projectSpecific);
-        retrieveComposite.setEnabled(projectSpecific);
-    }
-
     void updateFieldsStatusAdvanced() {
         boolean projectSpecific = advancedProjectSpecificButton.getSelection();
         conf.setAdvancedProjectSpecific(projectSpecific);

Copied: ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/retrieve/RetrieveSetup.java (from r988035, ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/cpcontainer/RetrieveSetup.java)
URL: http://svn.apache.org/viewvc/ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/retrieve/RetrieveSetup.java?p2=ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/retrieve/RetrieveSetup.java&p1=ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/cpcontainer/RetrieveSetup.java&r1=988035&r2=988046&rev=988046&view=diff
==============================================================================
--- ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/cpcontainer/RetrieveSetup.java (original)
+++ ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/retrieve/RetrieveSetup.java Mon Aug 23 09:41:17 2010
@@ -15,7 +15,7 @@
  *  limitations under the License.
  *
  */
-package org.apache.ivyde.eclipse.cpcontainer;
+package org.apache.ivyde.eclipse.retrieve;
 
 /**
  * This class is just a simple bean defining the properties which configure an IvyDE classpath
@@ -23,8 +23,6 @@ package org.apache.ivyde.eclipse.cpconta
  */
 public class RetrieveSetup {
 
-    private boolean doRetrieve;
-
     private String retrievePattern = "lib/[artifact]-[revision].[ext]";
 
     private boolean retrieveSync = false;
@@ -41,20 +39,11 @@ public class RetrieveSetup {
     }
 
     public void set(RetrieveSetup setup) {
-        this.doRetrieve = setup.doRetrieve;
         this.retrievePattern = setup.retrievePattern;
         this.retrieveConfs = setup.retrieveConfs;
         this.retrieveTypes = setup.retrieveTypes;
     }
 
-    public boolean isDoRetrieve() {
-        return doRetrieve;
-    }
-
-    public void setDoRetrieve(boolean doRetrieve) {
-        this.doRetrieve = doRetrieve;
-    }
-
     public String getRetrievePattern() {
         return retrievePattern;
     }

Modified: ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/retrieve/RetrieveSetupManager.java
URL: http://svn.apache.org/viewvc/ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/retrieve/RetrieveSetupManager.java?rev=988046&r1=988045&r2=988046&view=diff
==============================================================================
--- ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/retrieve/RetrieveSetupManager.java (original)
+++ ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/retrieve/RetrieveSetupManager.java Mon Aug 23 09:41:17 2010
@@ -21,23 +21,40 @@ import java.io.ByteArrayInputStream;
 import java.io.ByteArrayOutputStream;
 import java.io.IOException;
 import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.Iterator;
 import java.util.List;
+import java.util.Map;
+import java.util.Map.Entry;
 
 import org.apache.ivyde.eclipse.IvyPlugin;
 import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.ISaveContext;
+import org.eclipse.core.resources.ISaveParticipant;
 import org.eclipse.core.resources.ProjectScope;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IStatus;
 import org.eclipse.core.runtime.preferences.IEclipsePreferences;
 import org.eclipse.core.runtime.preferences.IScopeContext;
 import org.osgi.service.prefs.BackingStoreException;
 
-public class RetrieveSetupManager {
+public class RetrieveSetupManager implements ISaveParticipant {
 
     private static final String PREF_ID = "org.apache.ivyde.eclipse.standlaoneretrieve";
 
+    private Map/* <IProject, IEclipsePreferences> */projectPrefs = new HashMap();
+
     public List/* <StandaloneRetrieveSetup> */getSetup(IProject project) throws IOException {
-        IScopeContext projectScope = new ProjectScope(project);
-        IEclipsePreferences projectNode = projectScope.getNode(IvyPlugin.ID);
-        String retrieveSetup = projectNode.get(PREF_ID, null);
+
+        IEclipsePreferences pref;
+        synchronized (projectPrefs) {
+            pref = (IEclipsePreferences) projectPrefs.get(project);
+        }
+        if (pref == null) {
+            IScopeContext projectScope = new ProjectScope(project);
+            pref = projectScope.getNode(IvyPlugin.ID);
+        }
+        String retrieveSetup = pref.get(PREF_ID, null);
         if (retrieveSetup == null) {
             return new ArrayList();
         }
@@ -57,8 +74,8 @@ public class RetrieveSetupManager {
         return retrieveSetups;
     }
 
-    public void save(IProject project, List/* <StandaloneRetrieveSetup> */retrieveSetups)
-            throws IOException, BackingStoreException {
+    public void save(final IProject project, List/* <StandaloneRetrieveSetup> */retrieveSetups)
+            throws IOException {
         StandaloneRetrieveSerializer serializer = new StandaloneRetrieveSerializer();
         ByteArrayOutputStream out = new ByteArrayOutputStream();
         try {
@@ -71,11 +88,47 @@ public class RetrieveSetupManager {
             }
         }
 
-        String retrieveSetup = new String(out.toByteArray());
+        final String retrieveSetup = new String(out.toByteArray());
+
+        synchronized (projectPrefs) {
+            IEclipsePreferences pref = (IEclipsePreferences) projectPrefs.get(project);
+            if (pref == null) {
+                IScopeContext projectScope = new ProjectScope(project);
+                pref = projectScope.getNode(IvyPlugin.ID);
+                projectPrefs.put(project, pref);
+            }
+            pref.put(PREF_ID, retrieveSetup);
+        }
+    }
 
-        IScopeContext projectScope = new ProjectScope(project);
-        IEclipsePreferences projectNode = projectScope.getNode(IvyPlugin.ID);
-        projectNode.put("StandaloneRetrieveSetup", retrieveSetup);
-        projectNode.flush();
+    public void prepareToSave(ISaveContext context) throws CoreException {
+        // nothing to do
     }
+
+    public void saving(ISaveContext context) throws CoreException {
+        Map toFlush = new HashMap();
+        synchronized (projectPrefs) {
+            toFlush.putAll(projectPrefs);
+            projectPrefs.clear();
+        }
+        Iterator itPrefs = toFlush.entrySet().iterator();
+        while (itPrefs.hasNext()) {
+            Entry entry = (Entry) itPrefs.next();
+            try {
+                ((IEclipsePreferences) entry.getValue()).flush();
+            } catch (BackingStoreException e) {
+                IvyPlugin.log(IStatus.ERROR, "Failed to save the state of the Ivy preferences of "
+                        + ((IProject) entry.getKey()).getName(), e);
+            }
+        }
+    }
+
+    public void rollback(ISaveContext context) {
+        // nothing to do
+    }
+
+    public void doneSaving(ISaveContext context) {
+        // nothing to do
+    }
+
 }

Modified: ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/retrieve/StandaloneRetrieveSerializer.java
URL: http://svn.apache.org/viewvc/ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/retrieve/StandaloneRetrieveSerializer.java?rev=988046&r1=988045&r2=988046&view=diff
==============================================================================
--- ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/retrieve/StandaloneRetrieveSerializer.java (original)
+++ ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/retrieve/StandaloneRetrieveSerializer.java Mon Aug 23 09:41:17 2010
@@ -35,7 +35,6 @@ import javax.xml.transform.dom.DOMSource
 import javax.xml.transform.stream.StreamResult;
 
 import org.apache.ivyde.eclipse.cpcontainer.IvySettingsSetup;
-import org.apache.ivyde.eclipse.cpcontainer.RetrieveSetup;
 import org.w3c.dom.Attr;
 import org.w3c.dom.Document;
 import org.w3c.dom.NamedNodeMap;

Modified: ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/retrieve/StandaloneRetrieveSetup.java
URL: http://svn.apache.org/viewvc/ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/retrieve/StandaloneRetrieveSetup.java?rev=988046&r1=988045&r2=988046&view=diff
==============================================================================
--- ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/retrieve/StandaloneRetrieveSetup.java (original)
+++ ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/retrieve/StandaloneRetrieveSetup.java Mon Aug 23 09:41:17 2010
@@ -18,7 +18,6 @@
 package org.apache.ivyde.eclipse.retrieve;
 
 import org.apache.ivyde.eclipse.cpcontainer.IvySettingsSetup;
-import org.apache.ivyde.eclipse.cpcontainer.RetrieveSetup;
 
 public class StandaloneRetrieveSetup {
 

Modified: ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/ui/RetrieveComposite.java
URL: http://svn.apache.org/viewvc/ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/ui/RetrieveComposite.java?rev=988046&r1=988045&r2=988046&view=diff
==============================================================================
--- ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/ui/RetrieveComposite.java (original)
+++ ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/ui/RetrieveComposite.java Mon Aug 23 09:41:17 2010
@@ -17,10 +17,8 @@
  */
 package org.apache.ivyde.eclipse.ui;
 
-import org.apache.ivyde.eclipse.cpcontainer.RetrieveSetup;
+import org.apache.ivyde.eclipse.retrieve.RetrieveSetup;
 import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.SelectionAdapter;
-import org.eclipse.swt.events.SelectionEvent;
 import org.eclipse.swt.layout.GridData;
 import org.eclipse.swt.layout.GridLayout;
 import org.eclipse.swt.widgets.Button;
@@ -40,8 +38,6 @@ public class RetrieveComposite extends C
     public static final String TOOLTIP_RETRIEVE_TYPES = "Comma separated list of types to retrieve"
             + "\nExemple: '*' or 'jar,source'";
 
-    private Button doRetrieveButton;
-
     private Text retrievePatternText;
 
     private Button retrieveSyncButton;
@@ -57,31 +53,23 @@ public class RetrieveComposite extends C
         layout.marginWidth = 0;
         setLayout(layout);
 
-        doRetrieveButton = new Button(this, SWT.CHECK);
-        doRetrieveButton.setText("Do retrieve after resolve");
-        doRetrieveButton.setLayoutData(new GridData(GridData.FILL, GridData.FILL, false, false, 2,
-                1));
-
         Label label = new Label(this, SWT.NONE);
         label.setText("Retrieve pattern:");
 
         retrievePatternText = new Text(this, SWT.SINGLE | SWT.BORDER);
         retrievePatternText.setLayoutData(new GridData(GridData.FILL, GridData.FILL, true, false));
-        retrievePatternText.setEnabled(doRetrieveButton.getSelection());
         retrievePatternText.setToolTipText(TOOLTIP_RETRIEVE_PATTERN);
 
         retrieveSyncButton = new Button(this, SWT.CHECK);
         retrieveSyncButton.setText("Delete old retrieved artifacts");
         retrieveSyncButton.setLayoutData(new GridData(GridData.FILL, GridData.FILL, false, false,
                 2, 1));
-        retrieveSyncButton.setEnabled(doRetrieveButton.getSelection());
 
         label = new Label(this, SWT.NONE);
         label.setText("Configurations:");
 
         confsText = new Text(this, SWT.SINGLE | SWT.BORDER);
         confsText.setLayoutData(new GridData(GridData.FILL, GridData.FILL, true, false));
-        confsText.setEnabled(doRetrieveButton.getSelection());
         confsText.setToolTipText(TOOLTIP_RETRIEVE_CONFS);
 
         label = new Label(this, SWT.NONE);
@@ -89,22 +77,12 @@ public class RetrieveComposite extends C
 
         typesText = new Text(this, SWT.SINGLE | SWT.BORDER);
         typesText.setLayoutData(new GridData(GridData.FILL, GridData.FILL, true, false));
-        typesText.setEnabled(doRetrieveButton.getSelection());
         typesText.setToolTipText(TOOLTIP_RETRIEVE_TYPES);
 
-        doRetrieveButton.addSelectionListener(new SelectionAdapter() {
-            public void widgetSelected(SelectionEvent e) {
-                retrievePatternText.setEnabled(doRetrieveButton.getSelection());
-                retrieveSyncButton.setEnabled(doRetrieveButton.getSelection());
-                confsText.setEnabled(doRetrieveButton.getSelection());
-                typesText.setEnabled(doRetrieveButton.getSelection());
-            }
-        });
     }
 
     public RetrieveSetup getRetrieveSetup() {
         RetrieveSetup setup = new RetrieveSetup();
-        setup.setDoRetrieve(doRetrieveButton.getSelection());
         setup.setRetrieveSync(retrieveSyncButton.getSelection());
         setup.setRetrievePattern(retrievePatternText.getText());
         setup.setRetrieveConfs(confsText.getText());
@@ -113,7 +91,6 @@ public class RetrieveComposite extends C
     }
 
     public void init(RetrieveSetup setup) {
-        doRetrieveButton.setSelection(setup.isDoRetrieve());
         retrievePatternText.setText(setup.getRetrievePattern());
         retrieveSyncButton.setSelection(setup.isRetrieveSync());
         confsText.setText(setup.getRetrieveConfs());
@@ -123,10 +100,9 @@ public class RetrieveComposite extends C
 
     public void setEnabled(boolean enabled) {
         super.setEnabled(enabled);
-        doRetrieveButton.setEnabled(enabled);
-        retrievePatternText.setEnabled(enabled && doRetrieveButton.getSelection());
-        retrieveSyncButton.setEnabled(enabled && doRetrieveButton.getSelection());
-        confsText.setEnabled(enabled && doRetrieveButton.getSelection());
-        typesText.setEnabled(enabled && doRetrieveButton.getSelection());
+        retrievePatternText.setEnabled(enabled);
+        retrieveSyncButton.setEnabled(enabled);
+        confsText.setEnabled(enabled);
+        typesText.setEnabled(enabled);
     }
 }

Modified: ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/ui/preferences/IvyDEPreferenceStoreHelper.java
URL: http://svn.apache.org/viewvc/ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/ui/preferences/IvyDEPreferenceStoreHelper.java?rev=988046&r1=988045&r2=988046&view=diff
==============================================================================
--- ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/ui/preferences/IvyDEPreferenceStoreHelper.java (original)
+++ ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/ui/preferences/IvyDEPreferenceStoreHelper.java Mon Aug 23 09:41:17 2010
@@ -20,7 +20,6 @@ package org.apache.ivyde.eclipse.ui.pref
 import org.apache.ivyde.eclipse.cpcontainer.ContainerMappingSetup;
 import org.apache.ivyde.eclipse.cpcontainer.IvyClasspathUtil;
 import org.apache.ivyde.eclipse.cpcontainer.IvySettingsSetup;
-import org.apache.ivyde.eclipse.cpcontainer.RetrieveSetup;
 import org.eclipse.jface.preference.IPreferenceStore;
 import org.eclipse.jface.preference.PreferenceConverter;
 import org.eclipse.swt.graphics.RGB;
@@ -95,24 +94,6 @@ public class IvyDEPreferenceStoreHelper 
                 .getJavadocSuffixes()));
     }
 
-    public RetrieveSetup getRetrieveSetup() {
-        RetrieveSetup setup = new RetrieveSetup();
-        setup.setDoRetrieve(prefStore.getBoolean(PreferenceConstants.DO_RETRIEVE));
-        setup.setRetrieveConfs(prefStore.getString(PreferenceConstants.RETRIEVE_CONFS));
-        setup.setRetrievePattern(prefStore.getString(PreferenceConstants.RETRIEVE_PATTERN));
-        setup.setRetrieveSync(prefStore.getBoolean(PreferenceConstants.RETRIEVE_SYNC));
-        setup.setRetrieveTypes(prefStore.getString(PreferenceConstants.RETRIEVE_TYPES));
-        return setup;
-    }
-
-    public void setRetrieveSetup(RetrieveSetup setup) {
-        prefStore.setValue(PreferenceConstants.DO_RETRIEVE, setup.isDoRetrieve());
-        prefStore.setValue(PreferenceConstants.RETRIEVE_PATTERN, setup.getRetrievePattern());
-        prefStore.setValue(PreferenceConstants.RETRIEVE_SYNC, setup.isRetrieveSync());
-        prefStore.setValue(PreferenceConstants.RETRIEVE_CONFS, setup.getRetrieveConfs());
-        prefStore.setValue(PreferenceConstants.RETRIEVE_TYPES, setup.getRetrieveTypes());
-    }
-
     public boolean isAlphOrder() {
         return prefStore.getBoolean(PreferenceConstants.ALPHABETICAL_ORDER);
     }

Modified: ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/ui/preferences/IvyDEProjectPreferences.java
URL: http://svn.apache.org/viewvc/ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/ui/preferences/IvyDEProjectPreferences.java?rev=988046&r1=988045&r2=988046&view=diff
==============================================================================
--- ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/ui/preferences/IvyDEProjectPreferences.java (original)
+++ ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/ui/preferences/IvyDEProjectPreferences.java Mon Aug 23 09:41:17 2010
@@ -50,7 +50,6 @@ import org.eclipse.swt.widgets.TableColu
 import org.eclipse.ui.IWorkbench;
 import org.eclipse.ui.IWorkbenchPropertyPage;
 import org.eclipse.ui.dialogs.PropertyPage;
-import org.osgi.service.prefs.BackingStoreException;
 
 public class IvyDEProjectPreferences extends PropertyPage implements IWorkbenchPropertyPage {
 
@@ -207,12 +206,10 @@ public class IvyDEProjectPreferences ext
 
         try {
             retrieveSetupManager.save(project, retrieveSetups);
-        } catch (IOException e) {
-            IvyPlugin.log(IStatus.ERROR, "Enable to write the retrieve setup", e);
-            return false;
-        } catch (BackingStoreException e) {
-            IvyPlugin.log(IStatus.ERROR, "Failed to store the project preference of "
-                    + project.getName(), e);
+        } catch (Exception e) {
+            IvyPlugin.log(IStatus.ERROR,
+                "Enable to write the retrieve setup into the project preference of "
+                        + project.getName(), e);
             return false;
         }
 

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=988046&r1=988045&r2=988046&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 Mon Aug 23 09:41:17 2010
@@ -22,7 +22,6 @@ import org.apache.ivyde.eclipse.IvyPlugi
 import org.apache.ivyde.eclipse.cpcontainer.ContainerMappingSetup;
 import org.apache.ivyde.eclipse.cpcontainer.IvyClasspathUtil;
 import org.apache.ivyde.eclipse.cpcontainer.IvySettingsSetup;
-import org.apache.ivyde.eclipse.cpcontainer.RetrieveSetup;
 import org.apache.ivyde.eclipse.ui.editors.xml.IXMLColorConstants;
 import org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer;
 import org.eclipse.jface.preference.IPreferenceStore;
@@ -79,26 +78,6 @@ public class PreferenceInitializer exten
                 .split(DEFAULT_JAVADOC_SUFFIXES));
     }
 
-    public static final boolean DEFAULT_DO_RETRIEVE = false;
-
-    public static final String DEFAULT_RETRIEVE_PATTERN = "lib/[conf]/[artifact].[ext]";
-
-    public static final boolean DEFAULT_RETRIEVE_SYNC = false;
-
-    public static final String DEFAULT_RETRIEVE_CONFS = "*";
-
-    public static final String DEFAULT_RETRIEVE_TYPES = "*";
-
-    public static final RetrieveSetup DEFAULT_RETRIEVE_SETUP = new RetrieveSetup();
-
-    static {
-        DEFAULT_RETRIEVE_SETUP.setDoRetrieve(DEFAULT_DO_RETRIEVE);
-        DEFAULT_RETRIEVE_SETUP.setRetrievePattern(DEFAULT_RETRIEVE_PATTERN);
-        DEFAULT_RETRIEVE_SETUP.setRetrieveSync(DEFAULT_RETRIEVE_SYNC);
-        DEFAULT_RETRIEVE_SETUP.setRetrieveConfs(DEFAULT_RETRIEVE_CONFS);
-        DEFAULT_RETRIEVE_SETUP.setRetrieveTypes(DEFAULT_RETRIEVE_TYPES);
-    }
-
     public static final boolean DEFAULT_ALPHABETICAL_ORDER = false;
 
     public static final boolean DEFAULT_RESOLVE_IN_WORKSPACE = false;
@@ -130,27 +109,6 @@ public class PreferenceInitializer exten
         store.setDefault(PreferenceConstants.SOURCES_SUFFIXES, DEFAULT_SOURCES_SUFFIXES);
         store.setDefault(PreferenceConstants.JAVADOC_SUFFIXES, DEFAULT_JAVADOC_SUFFIXES);
 
-        store.setDefault(PreferenceConstants.DO_RETRIEVE, DEFAULT_DO_RETRIEVE);
-        boolean b = store.getBoolean(PreferenceConstants.DO_RETRIEVE_DEPRECATED);
-        if (b) {
-            // not the default value, so it has been set
-            // erase the deprecated preference and store the new one
-            store.setValue(PreferenceConstants.DO_RETRIEVE_DEPRECATED, "");
-            store.setValue(PreferenceConstants.DO_RETRIEVE, b);
-        }
-
-        store.setDefault(PreferenceConstants.RETRIEVE_PATTERN, DEFAULT_RETRIEVE_PATTERN);
-        store.setDefault(PreferenceConstants.RETRIEVE_CONFS, DEFAULT_RETRIEVE_CONFS);
-        store.setDefault(PreferenceConstants.RETRIEVE_TYPES, DEFAULT_RETRIEVE_TYPES);
-        String s = store.getString(PreferenceConstants.RETRIEVE_PATTERN_DEPRECATED);
-        if (s != null && s.length() != 0) {
-            // not the default value, so it has been set
-            // erase the deprecated preference and store the new one
-            store.setValue(PreferenceConstants.RETRIEVE_PATTERN_DEPRECATED, "");
-            store.setValue(PreferenceConstants.RETRIEVE_PATTERN, s);
-        }
-
-        store.setDefault(PreferenceConstants.RETRIEVE_SYNC, DEFAULT_RETRIEVE_SYNC);
         store.setDefault(PreferenceConstants.ALPHABETICAL_ORDER, DEFAULT_ALPHABETICAL_ORDER);
         store.setDefault(PreferenceConstants.RESOLVE_IN_WORKSPACE, DEFAULT_RESOLVE_IN_WORKSPACE);
         store.setDefault(PreferenceConstants.RESOLVE_BEFORE_LAUNCH, DEFAULT_RESOLVE_BEFORE_LAUNCH);