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 2012/07/15 21:29:44 UTC

svn commit: r1361765 - in /ant/ivy/ivyde/trunk: doc/preferences.html doc/release-notes.html org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/cpcontainer/IvyClasspathContainerMapper.java

Author: hibou
Date: Sun Jul 15 19:29:44 2012
New Revision: 1361765

URL: http://svn.apache.org/viewvc?rev=1361765&view=rev
Log:
IVYDE-306: Support Accepted Types: *

Modified:
    ant/ivy/ivyde/trunk/doc/preferences.html
    ant/ivy/ivyde/trunk/doc/release-notes.html
    ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/cpcontainer/IvyClasspathContainerMapper.java

Modified: ant/ivy/ivyde/trunk/doc/preferences.html
URL: http://svn.apache.org/viewvc/ant/ivy/ivyde/trunk/doc/preferences.html?rev=1361765&r1=1361764&r2=1361765&view=diff
==============================================================================
--- ant/ivy/ivyde/trunk/doc/preferences.html (original)
+++ ant/ivy/ivyde/trunk/doc/preferences.html Sun Jul 15 19:29:44 2012
@@ -62,7 +62,7 @@ The global configuration can be found in
 <h4>Resolve dependencies in workpace:</h4>
 <p>Apache IvyDE allows Ivy dependencies between projects in the workspace to be realized through project references rather than jars from the repository.  See the <a href="cpc/workspace.html">documentation</a> for further information on this feature.</p>
 <h4>Accepted types:</h4>
-<p>A comma separated list of extensions which will make IvyDE add the artifact to the classpath</p>
+<p>A comma separated list of extensions which will make IvyDE add the artifact to the classpath. Setting <tt>*</tt> will make very kind of type accepted. Note that a type specified as a <a href="#mapping">source or javadoc type</a> won't be accepted in any manner.</p>
 <h4>Order of the classpath entries:</h4>
 <p>By default, the classpath container entries are ordered by order of declaration in the ivy.xml. When there are many entries, it can be useful to have them ordered lexically for enhanced readability.</p>
 <h4>Build the classpath with:</h4>

Modified: ant/ivy/ivyde/trunk/doc/release-notes.html
URL: http://svn.apache.org/viewvc/ant/ivy/ivyde/trunk/doc/release-notes.html?rev=1361765&r1=1361764&r2=1361765&view=diff
==============================================================================
--- ant/ivy/ivyde/trunk/doc/release-notes.html (original)
+++ ant/ivy/ivyde/trunk/doc/release-notes.html Sun Jul 15 19:29:44 2012
@@ -120,7 +120,7 @@ List of changes since <a href="/ivy/ivyd
 <ul>
     <li>FIX: org.eclipse.swt.SWTException: Invalid thread access with Eclipse Juno (IVYDE-313)</li>
     <li>FIX: Divide by zero during IvyDE resolve (IVYDE-312) (thanks to Joe Sortelli)</li>
-    
+    <li>NEW: Support Accepted Types: * (IVYDE-306)</li>
     <!-- samples
     <li>NEW: new new new (IVYDE-XXX) (thanks to XXX)</li>
     <li>IMPROVE: new new new (IVYDE-XXX) (thanks to XXX)</li>

Modified: ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/cpcontainer/IvyClasspathContainerMapper.java
URL: http://svn.apache.org/viewvc/ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/cpcontainer/IvyClasspathContainerMapper.java?rev=1361765&r1=1361764&r2=1361765&view=diff
==============================================================================
--- ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/cpcontainer/IvyClasspathContainerMapper.java (original)
+++ ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/cpcontainer/IvyClasspathContainerMapper.java Sun Jul 15 19:29:44 2012
@@ -295,8 +295,12 @@ public class IvyClasspathContainerMapper
      * @return <code>true</code> if the artifact can be added
      */
     public boolean accept(Artifact artifact) {
-        return classpathSetup.getAcceptedTypes().contains(artifact.getType())
-                && !mapping.getSourceTypes().contains(artifact.getType())
+        boolean accepted = classpathSetup.getAcceptedTypes().contains(artifact.getType());
+        if (!accepted && classpathSetup.getAcceptedTypes().size() == 1
+                && classpathSetup.getAcceptedTypes().get(0).equals("*")) {
+            accepted = true;
+        }
+        return accepted && !mapping.getSourceTypes().contains(artifact.getType())
                 && !mapping.getJavadocTypes().contains(artifact.getType());
     }