Author: hibou
Date: Wed Sep 16 10:09:45 2009
New Revision: 815707

URL: http://svn.apache.org/viewvc?rev=815707&view=rev
Log:
As discussed here : https://bugs.eclipse.org/bugs/show_bug.cgi?id=284150
- it is not an Eclipse bug but a feature, let's rename the class
- make the resolve only in the detached containers

Added:
    
ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/IvyDERuntimeClasspathEntryResolver.java
   (contents, props changed)
      - copied, changed from r815651, 
ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/FixedRuntimeClasspathEntryResolver.java
Removed:
    
ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/FixedRuntimeClasspathEntryResolver.java
Modified:
    ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/plugin.xml

Modified: ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/plugin.xml
URL: 
http://svn.apache.org/viewvc/ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/plugin.xml?rev=815707&r1=815706&r2=815707&view=diff
==============================================================================
--- ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/plugin.xml (original)
+++ ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/plugin.xml Wed Sep 16 10:09:45 
2009
@@ -287,7 +287,7 @@
    <extension
          point="org.eclipse.jdt.launching.runtimeClasspathEntryResolvers">
       <runtimeClasspathEntryResolver
-            class="org.apache.ivyde.eclipse.FixedRuntimeClasspathEntryResolver"
+            class="org.apache.ivyde.eclipse.IvyDERuntimeClasspathEntryResolver"
             container="org.apache.ivyde.eclipse.cpcontainer.IVYDE_CONTAINER"
             id="org.apache.ivyde.eclipse.runtimeClasspathEntryResolver"
             variable="org.apache.ivyde.eclipse.cpcontainer.IVYDE_CONTAINER">

Copied: 
ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/IvyDERuntimeClasspathEntryResolver.java
 (from r815651, 
ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/FixedRuntimeClasspathEntryResolver.java)
URL: 
http://svn.apache.org/viewvc/ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/IvyDERuntimeClasspathEntryResolver.java?p2=ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/IvyDERuntimeClasspathEntryResolver.java&p1=ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/FixedRuntimeClasspathEntryResolver.java&r1=815651&r2=815707&rev=815707&view=diff
==============================================================================
--- 
ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/FixedRuntimeClasspathEntryResolver.java
 (original)
+++ 
ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/IvyDERuntimeClasspathEntryResolver.java
 Wed Sep 16 10:09:45 2009
@@ -39,7 +39,13 @@
 import org.eclipse.jdt.launching.IVMInstall;
 import org.eclipse.jdt.launching.JavaRuntime;
 
-public class FixedRuntimeClasspathEntryResolver implements 
IRuntimeClasspathEntryResolver {
+/**
+ * Resolver that doesn't include the non exported library of the imported 
project in the IvyDE
+ * container, contrary to the default behavior.
+ * <p>
+ * See also https://bugs.eclipse.org/bugs/show_bug.cgi?id=284150
+ */
+public class IvyDERuntimeClasspathEntryResolver implements 
IRuntimeClasspathEntryResolver {
 
     public IRuntimeClasspathEntry[] 
resolveRuntimeClasspathEntry(IRuntimeClasspathEntry entry,
             ILaunchConfiguration configuration) throws CoreException {
@@ -63,7 +69,11 @@
                     IJavaLaunchConfigurationConstants.ERR_INTERNAL_ERROR, 
message, null));
             // execution will not reach here - exception will be thrown
         }
-        ((IvyClasspathContainer) container).launchResolve(false, false, new 
NullProgressMonitor());
+        IvyClasspathContainer ivycp = (IvyClasspathContainer) container;
+        if (FakeProjectManager.isFake(ivycp.getConf().getJavaProject())) {
+            // only launch a resolve if the container is standalone in a 
launch configuration
+            ivycp.launchResolve(false, false, new NullProgressMonitor());
+        }
         IClasspathEntry[] cpes = container.getClasspathEntries();
         int property = -1;
         switch (container.getKind()) {

Propchange: 
ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/IvyDERuntimeClasspathEntryResolver.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: 
ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/IvyDERuntimeClasspathEntryResolver.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision Author HeadURL Id

Propchange: 
ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/IvyDERuntimeClasspathEntryResolver.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain


Reply via email to