ant-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From xav...@apache.org
Subject svn commit: r679854 - in /ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde: common/ivysettings/IvySettingsFile.java common/ivysettings/IvySettingsModel.java eclipse/ui/editors/IvySettingsEditor.java
Date Fri, 25 Jul 2008 16:34:41 GMT
Author: xavier
Date: Fri Jul 25 09:34:41 2008
New Revision: 679854

URL: http://svn.apache.org/viewvc?rev=679854&view=rev
Log:
remove ivyde.common dependency on eclipse API

Modified:
    ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/common/ivysettings/IvySettingsFile.java
    ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/common/ivysettings/IvySettingsModel.java
    ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/ui/editors/IvySettingsEditor.java

Modified: ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/common/ivysettings/IvySettingsFile.java
URL: http://svn.apache.org/viewvc/ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/common/ivysettings/IvySettingsFile.java?rev=679854&r1=679853&r2=679854&view=diff
==============================================================================
--- ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/common/ivysettings/IvySettingsFile.java
(original)
+++ ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/common/ivysettings/IvySettingsFile.java
Fri Jul 25 09:34:41 2008
@@ -34,7 +34,6 @@
 import org.apache.ivy.core.settings.XmlSettingsParser;
 import org.apache.ivyde.common.model.IvyFile;
 import org.apache.ivyde.common.model.IvyModelSettings;
-import org.eclipse.core.resources.IFile;
 
 public class IvySettingsFile extends IvyFile {
     private static final Pattern CLASSPATH_URL_PATTERN = Pattern.compile("<[\\s]*classpath[^>]+url=\"([^\"]+)");
@@ -43,10 +42,10 @@
     private static final Pattern TYPEDEF_PATTERN = Pattern.compile(
         "<[\\s]*typedef[^>]+name=\"([^\"]+)\"[^>]+classname=\"([^\"]+)");
     
-    private IFile file;
+    private File file;
 
 
-    public IvySettingsFile(IvyModelSettings settings, IFile file, String projectName, String
doc,
+    public IvySettingsFile(IvyModelSettings settings, File file, String projectName, String
doc,
             int currentOffset) {
         super(settings, projectName, doc, currentOffset);
         this.file = file;
@@ -79,8 +78,8 @@
 
     private String substitute(String str) {
         Map variables = new HashMap();
-        URI settingsDirUri = file.getParent().getLocationURI();
-        if (settingsDirUri != null) {
+        if (file.getParentFile() != null) {
+            URI settingsDirUri = file.getParentFile().toURI();
             variables.put("ivy.settings.dir", settingsDirUri.toString());
         }
         return IvyPatternHelper.substituteVariables(str, variables);

Modified: ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/common/ivysettings/IvySettingsModel.java
URL: http://svn.apache.org/viewvc/ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/common/ivysettings/IvySettingsModel.java?rev=679854&r1=679853&r2=679854&view=diff
==============================================================================
--- ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/common/ivysettings/IvySettingsModel.java
(original)
+++ ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/common/ivysettings/IvySettingsModel.java
Fri Jul 25 09:34:41 2008
@@ -17,6 +17,7 @@
  */
 package org.apache.ivyde.common.ivysettings;
 
+import java.io.File;
 import java.lang.reflect.Method;
 import java.net.URLClassLoader;
 import java.util.Arrays;
@@ -44,15 +45,14 @@
 import org.apache.ivyde.common.model.IvyReferenceTag;
 import org.apache.ivyde.common.model.IvyTag;
 import org.apache.ivyde.common.model.IvyTagAttribute;
-import org.eclipse.core.resources.IFile;
 
 public class IvySettingsModel extends IvyModel {
     private String loaded = null;
-    private IFile file;
+    private File file;
     private ClassLoader cl;
     private Map typedefClasses;
 
-    public IvySettingsModel(IvyModelSettings settings, IFile file) {
+    public IvySettingsModel(IvyModelSettings settings, File file) {
         super(settings);
         this.file = file;
     }

Modified: ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/ui/editors/IvySettingsEditor.java
URL: http://svn.apache.org/viewvc/ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/ui/editors/IvySettingsEditor.java?rev=679854&r1=679853&r2=679854&view=diff
==============================================================================
--- ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/ui/editors/IvySettingsEditor.java
(original)
+++ ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/ui/editors/IvySettingsEditor.java
Fri Jul 25 09:34:41 2008
@@ -85,7 +85,7 @@
                 protected IvyModel newCompletionModel(IFile file) {
                     return new IvySettingsModel(
                         new EclipseIvyModelSettings(getJavaProject()),
-                        file);
+                        file.getFullPath().toFile());
                 }
             });
             xmlEditor.setFile(((IvyFileEditorInput) getEditorInput()).getFile());



Mime
View raw message