ant-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hi...@apache.org
Subject svn commit: r988507 - in /ant/ivy/ivyde/trunk: CHANGES.txt org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/cpcontainer/IvyClasspathContainerConfAdapter.java
Date Tue, 24 Aug 2010 12:29:47 GMT
Author: hibou
Date: Tue Aug 24 12:29:46 2010
New Revision: 988507

URL: http://svn.apache.org/viewvc?rev=988507&view=rev
Log:
IVYDE-248:
 * do less magic conversion when reading old configuration

Modified:
    ant/ivy/ivyde/trunk/CHANGES.txt
    ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/cpcontainer/IvyClasspathContainerConfAdapter.java

Modified: ant/ivy/ivyde/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/ant/ivy/ivyde/trunk/CHANGES.txt?rev=988507&r1=988506&r2=988507&view=diff
==============================================================================
--- ant/ivy/ivyde/trunk/CHANGES.txt (original)
+++ ant/ivy/ivyde/trunk/CHANGES.txt Tue Aug 24 12:29:46 2010
@@ -15,6 +15,7 @@
 
 - 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)
+- FIX: Missing ivysettings.xml can make the classpath container config to change (IVYDE-248)
 
   version 2.1.0
 ==========================

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=988507&r1=988506&r2=988507&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
Tue Aug 24 12:29:46 2010
@@ -298,26 +298,15 @@ public final class IvyClasspathContainer
             }
             return "${workspace_loc:" + path + "}";
         }
-        URL url;
-        try {
-            url = new URL(value);
-        } catch (MalformedURLException e) {
-            return value;
-        }
-        if (url.getProtocol() != null && !url.getProtocol().equals("file")) {
-            return value;
-        }
-        File file = new File(url.getPath());
-        if (file.exists()) {
-            return value;
-        }
-        // the file doesn't exist, it is a relative path to the project.
-        String urlpath = url.getPath();
-        if (urlpath != null && urlpath.startsWith("./")) {
-            urlpath = urlpath.substring(1);
+        if (value.startsWith("file://./") || value.startsWith("file:./")) {
+            if (value.charAt(5) == '/') {
+                value = value.substring(8);
+            } else {
+                value = value.substring(6);
+            }
+            return "${workspace_loc:" + conf.getJavaProject().getProject().getName() + value
+ "}";
         }
-        conf.getJavaProject().getProject().getName();
-        return "${workspace_loc:" + conf.getJavaProject().getProject().getName() + urlpath
+ "}";
+        return value;
     }
 
     private static void checkNonNullConf(IvyClasspathContainerConfiguration conf) {



Mime
View raw message