Author: hibou
Date: Sat Nov 10 15:10:22 2012
New Revision: 1407829
URL: http://svn.apache.org/viewvc?rev=1407829&view=rev
Log:
add a bit of documentation to explain why IVYDE-328 will break source lookup
Modified:
ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/cpcontainer/IvyClasspathContainerConfAdapter.java
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=1407829&r1=1407828&r2=1407829&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
Sat Nov 10 15:10:22 2012
@@ -367,6 +367,27 @@ public final class IvyClasspathContainer
path.append('?');
IJavaProject javaProject = conf.getJavaProject();
try {
+ /*
+ * Implementation note about why the project is serialized in the
path. This is related
+ * to https://issues.apache.org/jira/browse/IVYDE-237
+ *
+ * For some reason, when we add a project to the source path of a
launch configuration,
+ * any IvyDE container involved of that project lose its reference
to its project. Then
+ * when the JDT call the IvyDERuntimeClasspathEntryResolver to
resolve the source of
+ * that container, the IRuntimeClasspathEntry doesn't reference a
Java project. In most
+ * case, an IvyDE classpath container reference an ivy.xml
relatively to the project. So
+ * in that context, the classpath cannot be resolved without a
reference to the project
+ * in the path of the container.
+ *
+ * Another reason for having the project in the path of the
container, is to make the
+ * path unique. Again the source path in a launch configuration
would consider two
+ * containers with exactly the configurations the same, even if the
+ * IRuntimeClasspathEntry reference different projects.
+ *
+ * To reproduce the issue, some test project is available and
configured accordingly.
+ * See in the test folder of the IvyDE project, check out the
project 'jetty' and
+ * 'jetty-webapp'.
+ */
path.append("project=");
if (javaProject != null) {
path.append(URLEncoder.encode(javaProject.getElementName(),
"UTF-8"));