ant-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hi...@apache.org
Subject svn commit: r655331 - /ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/cpcontainer/IvyClasspathContainerConfiguration.java
Date Sun, 11 May 2008 16:05:48 GMT
Author: hibou
Date: Sun May 11 09:05:48 2008
New Revision: 655331

URL: http://svn.apache.org/viewvc?rev=655331&view=rev
Log:
Reenable the feature from IVYDE-25 which has been just removed in the last commit

Modified:
    ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/cpcontainer/IvyClasspathContainerConfiguration.java

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=655331&r1=655330&r2=655331&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
Sun May 11 09:05:48 2008
@@ -239,9 +239,25 @@
         if (javaProject == null) {
             return ivySettingsPath;
         }
+        URL url;
+        try {
+            url = new URL(ivySettingsPath);
+        } catch (MalformedURLException e) {
+            throw new RuntimeException(e);
+        }
+        File file = new File(url.getPath());
+        if (file.exists()) {
+            return ivySettingsPath;
+        }
+        // the file doesn't exist, so try to find out if it is a relative path to the project.
         IProject project = javaProject.getProject();
         File loc = project.getLocation().toFile();
-        return new File(loc, ivySettingsPath).getAbsolutePath();
+        file = new File(loc, url.getPath());
+        try {
+            return file.toURL().toString();
+        } catch (MalformedURLException e) {
+            throw new RuntimeException(e);
+        }
     }
 
     public Collection getInheritedAcceptedTypes() {



Mime
View raw message