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/10/11 12:03:54 UTC
svn commit: r1021295 - in /ant/ivy/ivyde/trunk: CHANGES.txt
org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/cpcontainer/IvySettingsSetup.java
org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/cpcontainer/IvydeContainerPage.java
Author: hibou
Date: Mon Oct 11 10:03:54 2010
New Revision: 1021295
URL: http://svn.apache.org/viewvc?rev=1021295&view=rev
Log:
IVYDE-258 : now when creating an IvyDE container and an ivysettings exit at the root of the project, it get automatically configured
Modified:
ant/ivy/ivyde/trunk/CHANGES.txt
ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/cpcontainer/IvySettingsSetup.java
ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/cpcontainer/IvydeContainerPage.java
Modified: ant/ivy/ivyde/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/ant/ivy/ivyde/trunk/CHANGES.txt?rev=1021295&r1=1021294&r2=1021295&view=diff
==============================================================================
--- ant/ivy/ivyde/trunk/CHANGES.txt (original)
+++ ant/ivy/ivyde/trunk/CHANGES.txt Mon Oct 11 10:03:54 2010
@@ -8,6 +8,7 @@
- NEW: support for retrieve configuration in non Java project
- NEW: an IvyDE classpath can now be retrieved (IVYDE-56)
- NEW: Add branch comparison to workspace resolver (IVYDE-234) (thanks to Jeffrey M. Metcalf)
+- NEW: Look for ivysettings.xml file in project root copying the behavior of ivy ant task (IVYDE-258)
- IMPROVE: let IvyDE refresh workspace after a resolve (IVYDE-27) (thanks to Clint Burghduff)
- IMPROVE: IvyDE now resolve by batch, then preventing too many workspace build (IVYDE-177)
Modified: ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/cpcontainer/IvySettingsSetup.java
URL: http://svn.apache.org/viewvc/ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/cpcontainer/IvySettingsSetup.java?rev=1021295&r1=1021294&r2=1021295&view=diff
==============================================================================
--- ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/cpcontainer/IvySettingsSetup.java (original)
+++ ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/cpcontainer/IvySettingsSetup.java Mon Oct 11 10:03:54 2010
@@ -38,7 +38,7 @@ public class IvySettingsSetup {
private String ivySettingsPath;
- private List/* <String> */propertyFiles;
+ private List/* <String> */propertyFiles = new ArrayList();
private boolean loadSettingsOnDemand = false;
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=1021295&r1=1021294&r2=1021295&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 Oct 11 10:03:54 2010
@@ -37,8 +37,10 @@ import org.apache.ivyde.eclipse.ui.IvySe
import org.apache.ivyde.eclipse.ui.preferences.ClasspathPreferencePage;
import org.apache.ivyde.eclipse.ui.preferences.IvyDEPreferenceStoreHelper;
import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IResource;
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.jdt.core.IClasspathContainer;
import org.eclipse.jdt.core.IClasspathEntry;
@@ -203,9 +205,7 @@ public class IvydeContainerPage extends
if (advancedProjectSpecificButton.getSelection()) {
conf.setAdvancedProjectSpecific(true);
- conf
- .setContainerMappingSetup(acceptedSuffixesTypesComposite
- .getContainerMappingSetup());
+ conf.setContainerMappingSetup(acceptedSuffixesTypesComposite.getContainerMappingSetup());
conf.setAlphaOrder(alphaOrderCheck.getSelectionIndex() == 1);
conf.setResolveInWorkspace(resolveInWorkspaceCheck.getSelection());
conf.setResolveBeforeLaunch(resolveBeforeLaunchCheck.getSelection());
@@ -254,8 +254,8 @@ public class IvydeContainerPage extends
if (entry == null) {
conf = new IvyClasspathContainerConfiguration(project, "ivy.xml", true);
} else {
- conf = new IvyClasspathContainerConfiguration(project, entry.getPath(), true, entry
- .getExtraAttributes());
+ conf = new IvyClasspathContainerConfiguration(project, entry.getPath(), true,
+ entry.getExtraAttributes());
exported = entry.isExported();
}
state = new IvyClasspathContainerState(conf);
@@ -267,6 +267,18 @@ public class IvydeContainerPage extends
checkProject();
conf = new IvyClasspathContainerConfiguration(project, ivyfile.getProjectRelativePath()
.toString(), true);
+ // if there is an ivysettings.xml file at the root of the project, configure the container
+ // to use it
+ if (!FakeProjectManager.isFake(project)) {
+ IResource settings = project.getProject().findMember(new Path("ivysettings.xml"));
+ if (settings != null) {
+ conf.setSettingsProjectSpecific(true);
+ IvySettingsSetup setup = new IvySettingsSetup();
+ setup.setIvySettingsPath("${workspace_loc:" + project.getElementName()
+ + "/ivysettings.xml}");
+ conf.setIvySettingsSetup(setup);
+ }
+ }
state = new IvyClasspathContainerState(conf);
}
@@ -464,16 +476,16 @@ public class IvydeContainerPage extends
alphaOrderCheck.select(conf.isAlphaOrder() ? 1 : 0);
resolveInWorkspaceCheck.setSelection(conf.isResolveInWorkspace());
resolveBeforeLaunchCheck.setSelection(conf.isResolveBeforeLaunch());
- classpathTypeComposite.init(conf.isRetrievedClasspath(), conf
- .getRetrievedClasspathSetup());
+ classpathTypeComposite.init(conf.isRetrievedClasspath(),
+ conf.getRetrievedClasspathSetup());
} else {
advancedProjectSpecificButton.setSelection(false);
acceptedSuffixesTypesComposite.init(helper.getContainerMappingSetup());
alphaOrderCheck.select(helper.isAlphOrder() ? 1 : 0);
resolveInWorkspaceCheck.setSelection(helper.isResolveInWorkspace());
resolveBeforeLaunchCheck.setSelection(helper.isResolveBeforeLaunch());
- classpathTypeComposite.init(helper.isRetrievedClasspath(), helper
- .getRetrievedClasspathSetup());
+ classpathTypeComposite.init(helper.isRetrievedClasspath(),
+ helper.getRetrievedClasspathSetup());
}
settingsTab.updateFieldsStatusSettings();