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/24 21:10:11 UTC

svn commit: r988673 - in /ant/ivy/ivyde/trunk: ./ org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/ org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/cpcontainer/ org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/handlers/ o...

Author: hibou
Date: Tue Aug 24 19:10:10 2010
New Revision: 988673

URL: http://svn.apache.org/viewvc?rev=988673&view=rev
Log:
IVYDE-233:
 * better handle the markers : one for each error
 * add some cleanup of the markers
 * in the reported errors, try to remove the duplicates

Added:
    ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/IvyMarkerManager.java   (with props)
Modified:
    ant/ivy/ivyde/trunk/CHANGES.txt
    ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/CachedIvy.java
    ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/IvyNature.java
    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/IvyResolver.java
    ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/cpcontainer/IvyResolveJob.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/handlers/RemoveIvyNatureHandler.java
    ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/ui/menu/RetrieveAction.java

Modified: ant/ivy/ivyde/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/ant/ivy/ivyde/trunk/CHANGES.txt?rev=988673&r1=988672&r2=988673&view=diff
==============================================================================
--- ant/ivy/ivyde/trunk/CHANGES.txt (original)
+++ ant/ivy/ivyde/trunk/CHANGES.txt Tue Aug 24 19:10:10 2010
@@ -12,6 +12,7 @@
 - IMPROVE: IvyDE now resolve by batch, then preventing too many workspace build (IVYDE-177)
 - IMPROVE: Shared Javadoc/Source attachments (IVYDE-230) (thanks to Gregory Fernandez)
 - IMPROVE: WorkspaceResolver: deal with self-dependencies (IVYDE-240)
+- IMPROVE: Impossible to resolve dependencies: missing diagnostics (IVYDE-233)
 
 - FIX: Variable based path for ivysettings doesn't work it there are some spaces in the path (IVYDE-253)
 - FIX: Triggers are not called (IVYDE-244)

Modified: ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/CachedIvy.java
URL: http://svn.apache.org/viewvc/ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/CachedIvy.java?rev=988673&r1=988672&r2=988673&view=diff
==============================================================================
--- ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/CachedIvy.java (original)
+++ ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/CachedIvy.java Tue Aug 24 19:10:10 2010
@@ -39,10 +39,7 @@ import org.apache.ivy.util.Message;
 import org.apache.ivyde.eclipse.workspaceresolver.WorkspaceIvySettings;
 import org.apache.ivyde.eclipse.workspaceresolver.WorkspaceResolver;
 import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IMarker;
 import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.CoreException;
 import org.eclipse.core.runtime.IPath;
 import org.eclipse.core.runtime.IStatus;
 import org.eclipse.core.runtime.Path;
@@ -62,7 +59,6 @@ public abstract class CachedIvy {
 
     private ModuleDescriptor md;
 
-
     public void reset() {
         md = null;
         ivy = null;
@@ -74,12 +70,15 @@ public abstract class CachedIvy {
     }
 
     private void setConfStatus(IvyDEException ex) {
+        IvyMarkerManager ivyMarkerManager = IvyPlugin.getDefault().getIvyMarkerManager();
+        IStatus status;
         if (ex != null) {
-            setResolveStatus(new Status(IStatus.ERROR, IvyPlugin.ID, IStatus.ERROR,
-                    ex.getMessage(), ex.getCause()));
+            status = new Status(IStatus.ERROR, IvyPlugin.ID, IStatus.ERROR, ex.getMessage(),
+                    ex.getCause());
         } else {
-            setResolveStatus(Status.OK_STATUS);
+            status = Status.OK_STATUS;
         }
+        ivyMarkerManager.setResolveStatus(status, getProject(), getIvyXmlPath());
     }
 
     protected abstract IProject getProject();
@@ -96,41 +95,6 @@ public abstract class CachedIvy {
 
     protected abstract boolean isResolveInWorkspace();
 
-    public void setResolveStatus(IStatus status) {
-        if (FakeProjectManager.isFake(getProject())) {
-            return;
-        }
-        IProject p = getProject().getProject();
-        try {
-            p.deleteMarkers(IvyPlugin.MARKER_ID, true, IResource.DEPTH_INFINITE);
-            if (status == Status.OK_STATUS) {
-                return;
-            }
-            IResource r = getProject().getFile(getIvyXmlPath());
-            if (!r.exists()) {
-                r = p;
-            }
-            IMarker marker = r.createMarker(IvyPlugin.MARKER_ID);
-            marker.setAttribute(IMarker.MESSAGE, status.getMessage());
-            switch (status.getSeverity()) {
-                case IStatus.ERROR:
-                    marker.setAttribute(IMarker.SEVERITY, IMarker.SEVERITY_ERROR);
-                    break;
-                case IStatus.WARNING:
-                    marker.setAttribute(IMarker.SEVERITY, IMarker.SEVERITY_WARNING);
-                    break;
-                case IStatus.INFO:
-                    marker.setAttribute(IMarker.SEVERITY, IMarker.SEVERITY_INFO);
-                    break;
-                default:
-                    IvyPlugin.log(IStatus.WARNING, "Unsupported resolve status: "
-                            + status.getSeverity(), null);
-            }
-        } catch (CoreException e) {
-            IvyPlugin.log(e);
-        }
-    }
-
     public Ivy getCachedIvy() throws IvyDEException {
         if (ivy != null) {
             return ivy;
@@ -168,8 +132,7 @@ public abstract class CachedIvy {
                     ivy = null;
                     IvyDEException ex = new IvyDEException(
                             "Read error of the default Ivy settings",
-                            "The default Ivy settings file could not be read: "
-                            + e.getMessage(), e);
+                            "The default Ivy settings file could not be read: " + e.getMessage(), e);
                     setConfStatus(ex);
                     throw ex;
                 }
@@ -237,8 +200,7 @@ public abstract class CachedIvy {
             throw ex;
         }
 
-        if (file.lastModified() != ivySettingsLastModified
-                || !isLoadSettingsOnDemandPath()) {
+        if (file.lastModified() != ivySettingsLastModified || !isLoadSettingsOnDemandPath()) {
             IvySettings ivySettings = createIvySettings();
             if (ivySettingsLastModified == -1) {
                 Message.info("\n\n");
@@ -295,8 +257,7 @@ public abstract class CachedIvy {
                 Path p = new Path(file);
                 if (getProject() != null && !p.isAbsolute()) {
                     try {
-                        is = new FileInputStream(getProject().getLocation()
-                                .append(file).toFile());
+                        is = new FileInputStream(getProject().getLocation().append(file).toFile());
                     } catch (FileNotFoundException e) {
                         IvyDEException ex = new IvyDEException("Property file not found",
                                 "The property file '" + file + "' could not be found", e);
@@ -380,8 +341,7 @@ public abstract class CachedIvy {
             return md;
         } catch (MalformedURLException e) {
             IvyDEException ex = new IvyDEException("Incorrect URL of the Ivy file",
-                    "The URL to the ivy.xml file is incorrect: '" + file.getAbsolutePath()
-                    + "'", e);
+                    "The URL to the ivy.xml file is incorrect: '" + file.getAbsolutePath() + "'", e);
             setConfStatus(ex);
             throw ex;
         } catch (ParseException e) {

Added: ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/IvyMarkerManager.java
URL: http://svn.apache.org/viewvc/ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/IvyMarkerManager.java?rev=988673&view=auto
==============================================================================
--- ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/IvyMarkerManager.java (added)
+++ ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/IvyMarkerManager.java Tue Aug 24 19:10:10 2010
@@ -0,0 +1,99 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You under the Apache License, Version 2.0
+ *  (the "License"); you may not use this file except in compliance with
+ *  the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.ivyde.eclipse;
+
+import org.eclipse.core.resources.IMarker;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.MultiStatus;
+import org.eclipse.core.runtime.Status;
+
+public class IvyMarkerManager {
+
+    private IResource findResource(IProject project, String ivyXmlFile) {
+        if (FakeProjectManager.isFake(project)) {
+            return null;
+        }
+        IResource r = project.getFile(ivyXmlFile);
+        if (!r.exists()) {
+            r = project;
+        }
+        return r;
+    }
+
+    public void removeMarkers(IProject project, String ivyXmlFile) {
+        IResource r = findResource(project, ivyXmlFile);
+        if (r == null) {
+            return;
+        }
+        removeMarkers(r);
+    }
+
+    public void removeMarkers(IResource r) {
+        try {
+            r.deleteMarkers(IvyPlugin.MARKER_ID, true, IResource.DEPTH_INFINITE);
+        } catch (CoreException e) {
+            IvyPlugin.log(e);
+        }
+    }
+
+    public void setResolveStatus(IStatus status, IProject project, String ivyXmlFile) {
+        try {
+            IResource r = findResource(project, ivyXmlFile);
+            if (r == null) {
+                return;
+            }
+            removeMarkers(r);
+            if (status == Status.OK_STATUS) {
+                return;
+            }
+            if (status.isMultiStatus()) {
+                IStatus[] allStatus = ((MultiStatus) status).getChildren();
+                for (int i = 0; i < allStatus.length; i++) {
+                    addMarker(r, allStatus[i]);
+                }
+            } else {
+                addMarker(r, status);
+            }
+        } catch (CoreException e) {
+            IvyPlugin.log(e);
+        }
+    }
+
+    private void addMarker(IResource r, IStatus status) throws CoreException {
+        IMarker marker = r.createMarker(IvyPlugin.MARKER_ID);
+        marker.setAttribute(IMarker.MESSAGE, status.getMessage());
+        switch (status.getSeverity()) {
+            case IStatus.ERROR:
+                marker.setAttribute(IMarker.SEVERITY, IMarker.SEVERITY_ERROR);
+                break;
+            case IStatus.WARNING:
+                marker.setAttribute(IMarker.SEVERITY, IMarker.SEVERITY_WARNING);
+                break;
+            case IStatus.INFO:
+                marker.setAttribute(IMarker.SEVERITY, IMarker.SEVERITY_INFO);
+                break;
+            default:
+                IvyPlugin.log(IStatus.WARNING,
+                    "Unsupported resolve status: " + status.getSeverity(), null);
+        }
+    }
+
+}

Propchange: ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/IvyMarkerManager.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/IvyMarkerManager.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision Author HeadURL Id

Propchange: ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/IvyMarkerManager.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Modified: ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/IvyNature.java
URL: http://svn.apache.org/viewvc/ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/IvyNature.java?rev=988673&r1=988672&r2=988673&view=diff
==============================================================================
--- ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/IvyNature.java (original)
+++ ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/IvyNature.java Tue Aug 24 19:10:10 2010
@@ -46,7 +46,7 @@ public class IvyNature implements IProje
     }
 
     public void configure() throws CoreException {
-        // nothin to do
+        // nothing to do
     }
 
     public void deconfigure() throws CoreException {
@@ -68,6 +68,9 @@ public class IvyNature implements IProje
                     .toArray(new IClasspathEntry[newEntries.size()]);
             javaProject.setRawClasspath(newClasspathEntries, null);
         }
+
+        IvyMarkerManager ivyMarkerManager = IvyPlugin.getDefault().getIvyMarkerManager();
+        ivyMarkerManager.removeMarkers(project);
     }
 
     public static boolean hasNature(IProject project) {

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=988673&r1=988672&r2=988673&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 Tue Aug 24 19:10:10 2010
@@ -94,6 +94,8 @@ public class IvyPlugin extends AbstractU
 
     private IPropertyChangeListener propertyListener;
 
+    private IvyMarkerManager ivyMarkerManager;
+
     /**
      * The constructor.
      */
@@ -162,6 +164,8 @@ public class IvyPlugin extends AbstractU
         ivyFileListener = new IvyFileResourceListener();
         workspace.addResourceChangeListener(ivyFileListener, IResourceChangeEvent.PRE_BUILD);
 
+        ivyMarkerManager = new IvyMarkerManager();
+
         log(IStatus.INFO, "IvyDE plugin started", null);
     }
 
@@ -175,6 +179,7 @@ public class IvyPlugin extends AbstractU
         IWorkspace workspace = ResourcesPlugin.getWorkspace();
         workspace.removeSaveParticipant(this);
         colorManager = null;
+        ivyMarkerManager = null;
         ivyResolveJob = null;
         retrieveSetupManager = null;
         workspace.removeResourceChangeListener(workspaceListener);
@@ -373,6 +378,10 @@ public class IvyPlugin extends AbstractU
         return colorManager;
     }
 
+    public IvyMarkerManager getIvyMarkerManager() {
+        return ivyMarkerManager;
+    }
+
     public IvyResolveJob getIvyResolveJob() {
         return ivyResolveJob;
     }

Modified: ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/IvyResolver.java
URL: http://svn.apache.org/viewvc/ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/IvyResolver.java?rev=988673&r1=988672&r2=988673&view=diff
==============================================================================
--- ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/IvyResolver.java (original)
+++ ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/IvyResolver.java Tue Aug 24 19:10:10 2010
@@ -68,7 +68,7 @@ public class IvyResolver {
 
     protected LinkedHashSet/* <ArtifactDownloadReport> */all;
 
-    private List problemMessages;
+    private Set problemMessages;
 
     protected String[] confs;
 
@@ -172,7 +172,7 @@ public class IvyResolver {
 
     private IStatus resolveWithPrevious() throws ParseException, IOException {
         all = new LinkedHashSet();
-        problemMessages = new ArrayList();
+        problemMessages = new HashSet();
         // we check if all required configurations have been
         // resolved
         boolean parsingOk = true;
@@ -206,7 +206,7 @@ public class IvyResolver {
         ResolveOptions resolveOption = new ResolveOptions().setConfs(confs);
         resolveOption.setValidate(ivy.getSettings().doValidate());
         ResolveReport report = ivy.resolve(md, resolveOption);
-        problemMessages = report.getAllProblemMessages();
+        problemMessages = new HashSet(report.getAllProblemMessages());
 
         all = new LinkedHashSet();
         for (int i = 0; i < confs.length; i++) {

Modified: ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/cpcontainer/IvyResolveJob.java
URL: http://svn.apache.org/viewvc/ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/cpcontainer/IvyResolveJob.java?rev=988673&r1=988672&r2=988673&view=diff
==============================================================================
--- ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/cpcontainer/IvyResolveJob.java (original)
+++ ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/cpcontainer/IvyResolveJob.java Tue Aug 24 19:10:10 2010
@@ -31,14 +31,10 @@ import org.apache.ivy.plugins.circular.C
 import org.apache.ivy.plugins.circular.WarnCircularDependencyStrategy;
 import org.apache.ivy.plugins.version.LatestVersionMatcher;
 import org.apache.ivy.plugins.version.VersionMatcher;
-import org.apache.ivyde.eclipse.FakeProjectManager;
 import org.apache.ivyde.eclipse.IvyDEException;
+import org.apache.ivyde.eclipse.IvyMarkerManager;
 import org.apache.ivyde.eclipse.IvyPlugin;
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IMarker;
-import org.eclipse.core.resources.IResource;
 import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.CoreException;
 import org.eclipse.core.runtime.IProgressMonitor;
 import org.eclipse.core.runtime.IStatus;
 import org.eclipse.core.runtime.MultiStatus;
@@ -225,43 +221,11 @@ public class IvyResolveJob extends Job {
         if (status[0] == Status.OK_STATUS) {
             request.getContainer().updateClasspathEntries(resolver.getClasspathEntries());
         }
-        setResolveStatus(conf, status[0]);
+        IvyMarkerManager ivyMarkerManager = IvyPlugin.getDefault().getIvyMarkerManager();
+        ivyMarkerManager.setResolveStatus(status[0], conf.getJavaProject().getProject(),
+            conf.getIvyXmlPath());
         return status[0];
 
     }
 
-    private void setResolveStatus(IvyClasspathContainerConfiguration conf, IStatus status) {
-        if (FakeProjectManager.isFake(conf.getJavaProject())) {
-            return;
-        }
-        IFile ivyFile = conf.getJavaProject().getProject().getFile(conf.getIvyXmlPath());
-        if (!ivyFile.exists()) {
-            return;
-        }
-        try {
-            ivyFile.deleteMarkers(IMarker.PROBLEM, true, IResource.DEPTH_INFINITE);
-            if (status == Status.OK_STATUS) {
-                return;
-            }
-            IMarker marker = ivyFile.createMarker(IMarker.PROBLEM);
-            marker.setAttribute(IMarker.MESSAGE, status.getMessage());
-            switch (status.getSeverity()) {
-                case IStatus.ERROR:
-                    marker.setAttribute(IMarker.SEVERITY, IMarker.SEVERITY_ERROR);
-                    break;
-                case IStatus.WARNING:
-                    marker.setAttribute(IMarker.SEVERITY, IMarker.SEVERITY_WARNING);
-                    break;
-                case IStatus.INFO:
-                    marker.setAttribute(IMarker.SEVERITY, IMarker.SEVERITY_INFO);
-                    break;
-                default:
-                    IvyPlugin.log(IStatus.WARNING,
-                        "Unsupported resolve status: " + status.getSeverity(), null);
-            }
-        } catch (CoreException e) {
-            IvyPlugin.log(e);
-        }
-    }
-
 }

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=988673&r1=988672&r2=988673&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 Tue Aug 24 19:10:10 2010
@@ -25,6 +25,7 @@ import java.util.List;
 import org.apache.ivy.core.module.descriptor.ModuleDescriptor;
 import org.apache.ivyde.eclipse.FakeProjectManager;
 import org.apache.ivyde.eclipse.IvyDEException;
+import org.apache.ivyde.eclipse.IvyMarkerManager;
 import org.apache.ivyde.eclipse.IvyPlugin;
 import org.apache.ivyde.eclipse.ui.AcceptedSuffixesTypesComposite;
 import org.apache.ivyde.eclipse.ui.ClasspathTypeComposite;
@@ -231,6 +232,12 @@ public class IvydeContainerPage extends 
             IvyPlugin.log(e);
         }
 
+        if (oldIvyFile != null && !oldIvyFile.equals(conf.getIvyXmlPath())) {
+            // changing the ivy.xml, remove old marker on the old file, if any
+            IvyMarkerManager ivyMarkerManager = IvyPlugin.getDefault().getIvyMarkerManager();
+            ivyMarkerManager.removeMarkers(conf.getJavaProject().getProject(), oldIvyFile);
+        }
+
         return true;
     }
 

Modified: ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/handlers/RemoveIvyNatureHandler.java
URL: http://svn.apache.org/viewvc/ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/handlers/RemoveIvyNatureHandler.java?rev=988673&r1=988672&r2=988673&view=diff
==============================================================================
--- ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/handlers/RemoveIvyNatureHandler.java (original)
+++ ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/handlers/RemoveIvyNatureHandler.java Tue Aug 24 19:10:10 2010
@@ -21,6 +21,7 @@ import java.util.Iterator;
 import java.util.LinkedList;
 import java.util.List;
 
+import org.apache.ivyde.eclipse.IvyMarkerManager;
 import org.apache.ivyde.eclipse.IvyNature;
 import org.apache.ivyde.eclipse.IvyPlugin;
 import org.eclipse.core.commands.AbstractHandler;

Modified: ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/ui/menu/RetrieveAction.java
URL: http://svn.apache.org/viewvc/ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/ui/menu/RetrieveAction.java?rev=988673&r1=988672&r2=988673&view=diff
==============================================================================
--- ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/ui/menu/RetrieveAction.java (original)
+++ ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/ui/menu/RetrieveAction.java Tue Aug 24 19:10:10 2010
@@ -20,6 +20,7 @@ package org.apache.ivyde.eclipse.ui.menu
 import org.apache.ivy.Ivy;
 import org.apache.ivy.core.module.descriptor.ModuleDescriptor;
 import org.apache.ivyde.eclipse.IvyDEException;
+import org.apache.ivyde.eclipse.IvyMarkerManager;
 import org.apache.ivyde.eclipse.IvyPlugin;
 import org.apache.ivyde.eclipse.retrieve.IvyRetriever;
 import org.apache.ivyde.eclipse.retrieve.StandaloneRetrieveSetup;
@@ -48,6 +49,9 @@ public class RetrieveAction extends Acti
         IvyRetriever retriever = new IvyRetriever(ivy, md, false, new NullProgressMonitor(),
                 retrieveSetup);
         IStatus status = retriever.resolve();
+        IvyMarkerManager ivyMarkerManager = IvyPlugin.getDefault().getIvyMarkerManager();
+        ivyMarkerManager.setResolveStatus(status, retrieveSetup.getProject(),
+            retrieveSetup.getIvyXmlPath());
         if (status.isOK() || status.getCode() == IStatus.CANCEL) {
             IvyPlugin.log(IStatus.INFO, "Successful retrieve of '" + retrieveSetup.getName()
                     + "' in " + retrieveSetup.getProject().getName(), null);