Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 105767

Summary: Javadoc missing from IRuntimeClasspathEntry entries
Product: [Eclipse Project] JDT Reporter: Martin Aeschlimann <martinae>
Component: DebugAssignee: Kevin Barnes <cocoakevin>
Status: VERIFIED FIXED QA Contact:
Severity: normal    
Priority: P2 CC: bradley.wagner
Version: 3.1   
Target Milestone: 3.2 RC1   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Martin Aeschlimann CLA 2005-08-02 06:20:07 EDT
3.1

The Javadoc wizard works with the runtime classpath entries using
JavaRuntime.computeUnresolvedRuntimeClasspath.

To access the javadoc location,
IRuntimeClasspathEntry.getClasspathEntry().getExtraAttributes... is used,
but it seems that the attributes of the returned IClasspathEntry are not
complete, and the Javadoc attribute is missing.
Comment 1 Darin Wright CLA 2005-08-02 12:31:06 EDT
The runtime classpath entries (IRuntimeClasspathEntry) only store equivalent 
classpath entries (IClasspathEntry) in terms of the location they point to 
for .class files. The rest of the attributes/rules, etc., are not included in 
the classpath entries. Looking at our use of the IClasspathEntry for an 
IRuntimeClasspathEntry, it appears we only use it to allow re-use of the JUI 
source attachment dialogs (which talk in terms of IClasspathEntry).

Not sure what we should do about this.
Comment 2 Martin Aeschlimann CLA 2005-08-02 12:41:51 EDT
Aren't the entries normally created from entries acquired with getRawClasspath?
It would be nice if you can just copy all the extra attributes there as well.
One of the ideas of extra attributes is that users might add them. One of the
motivations could be to do something with them when launching (e.g. similar to
what the native library attibute does).


Comment 3 Darin Wright CLA 2005-08-02 12:49:28 EDT
They may be initially created from the runtime classpath, but users can add 
additional entries, and we persist/restore them ourselves. Thus, we don't 
persist extra attributes.
Comment 4 Martin Aeschlimann CLA 2005-08-15 05:36:12 EDT
It's no problem it the user added entries won't have a javadoc location added.
In my case of the Javadoc wizard, the lauchconfig is always created right away,
persisting is not important here.

So a quick solution would be to keep the extra attributes when creating the
entries from classpath entries, but don't persist them. However I think the
right thing to do is to also persist them. As said, users might want to store
launch relevant information in the extra attributes.
Comment 5 Darin Wright CLA 2005-09-09 09:38:40 EDT
The other issue is updating a runtime classpath entry. Currently, if you 
change the source attachement, etc., on a runtime classpath entry, the change 
is not propogated to the associated buildpath entry. There are two reasons for 
this:

1) there may be no associated buildpath entry (users can add extra runtime 
entries)
2) the user may want to have a different runtime classpath than buildtime 
classpath

This is just to say that making changes to the runtime classpath will not be 
reflected in the buildpath.
Comment 6 Darin Wright CLA 2005-09-13 11:28:28 EDT
Will investigate maintaining/initializing attributes on runtime entries when 
created form/with a project context. Will not persist.
Comment 7 Darin Wright CLA 2005-10-25 11:31:39 EDT
Moving to M4.
Comment 8 Martin Aeschlimann CLA 2006-03-01 05:25:06 EST
*** Bug 129498 has been marked as a duplicate of this bug. ***
Comment 9 Darin Wright CLA 2006-04-10 17:09:00 EDT
Martin, the javadoc attributes are on the entries in a container, not the container itself. I might be able to add the entries to the "entries" in the container, but I'm not sure you are using them?
Comment 10 Martin Aeschlimann CLA 2006-04-11 03:35:17 EDT
Yes, on the entries inside of the container.
To see how we use it, look at JavadocStandardWizardPage.collectReferencedElements (line 295).
A JavadocLinkRef then gets the javadoc location from the IClasspathEntry.

Comment 11 Darin Wright CLA 2006-04-12 16:05:37 EDT
Fixed in JRERuntimeClasspathEntryResolver and RuntimeClasspathEntry.
Comment 12 Darin Wright CLA 2006-04-12 16:06:11 EDT
The javadoc locations are now propogated to the underlying IClasspathEntry in the IRuntimeClasspathEntry.
Comment 13 Kevin Barnes CLA 2006-04-13 13:36:17 EDT
verified