Bug 96854 - user library javadoc locations not being saved in org.eclipse.jdt.core.prefs
Summary: user library javadoc locations not being saved in org.eclipse.jdt.core.prefs
Status: RESOLVED DUPLICATE of bug 88719
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.1   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.1 RC1   Edit
Assignee: Frederic Fusier CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-05-26 15:23 EDT by Michael King CLA
Modified: 2005-05-27 03:35 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Michael King CLA 2005-05-26 15:23:25 EDT
After adding a User Library and exiting Eclipse, I am unable to add the JavaDoc
location for any of the jars in that library.

In particular, the
$WORKSPACE/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.jdt.core.prefs
file does not seem to be updating or at a minimum, converting "empty tag"
<classpathentry> tags into container tags.

For example, adding the JUnit jar as a library results in the following entry:

//org.eclipse.jdt.core.classpathContainer.MyProject|org.eclipse.jdt.USER_LIBRARY/JUnit-3.8.1=<?xml
version\="1.0" encoding\="UTF-8"?>\r\n<classpath>\r\n<classpathentry
sourcepath\="C\:/junit3.8.1/src.jar" kind\="lib"
path\="C\:/junit3.8.1/junit.jar"/>\r\n</classpath>\r\n

I can later add the proper location for the javadocs, but they only exist for
the duration of my current session. When I exit and restart Eclipse, the javadoc
location setting is not preserved, and the core.prefs file remains as above.
What should be being saved is the following:

//org.eclipse.jdt.core.classpathContainer.MyProject|org.eclipse.jdt.USER_LIBRARY/JUnit-3.8.1=<?xml
version\="1.0" encoding\="UTF-8"?>\r\n<classpath>\r\n<classpathentry
sourcepath\="C\:/junit3.8.1/src.jar" kind\="lib"
path\="C\:/junit3.8.1/junit.jar">\r\n<attributes>\r\n<attribute
value\="file\:/C\:/junit3.8.1/javadoc/"
name\="javadoc_location"/>\r\n</attributes>\r\n</classpathentry>\r\n</classpath>\r\n

What appears to be failing is either the persistence of the prefs file on exit,
or somehow the <classpathentry/> (empty) tag is unable to be "converted" into a
container with an <attributes> container and <attribute> tags when it is being
persisted back out the filesystem on exit.

This started sometime in the integration builds after M6, but I've completely
re-installed Eclipse M7 and the problem remains. This behavior is also present
in the current I20050513-1415 integration build.

In summary, the current workaround is to add back each user library's javadoc
location for each Eclipse session. This solution is having the obvious negative
impact on our productivity. I am hopeful someone can duplicate the problem and
develop a solution that restores the original and expected behavior.
Comment 1 Michael King CLA 2005-05-26 15:48:05 EDT
I've also noticed that the main definition for the User Library is not saved
with the JavaDoc location. The following entry for JUnit does not reflect the
javadoc location I've added in an Eclipse session. It remains unchanged after
adding it and exiting Eclipse.

org.eclipse.jdt.core.userLibrary.JUnit-3.8.1=<?xml version\="1.0"
encoding\="UTF-8"?>\r\n<userlibrary systemlibrary\="false"
version\="1">\r\n\t<archive sourceattachment\="C\:/junit3.8.1/src.jar"
path\="C\:/junit3.8.1/junit.jar"/>\r\n</userlibrary>\r\n

It now appears that the javadoc value is not persisted. Could someone document
the syntax for manually editing the prefs file to add them?
Comment 2 Jerome Lanneluc CLA 2005-05-26 17:42:38 EDT
Note in 3.1 RC1, the prefs won't contain this information any longer. It is in
the jdt.core plugin area. However I don't know if the problem still exits in
I20050526.
Comment 3 Frederic Fusier CLA 2005-05-27 03:35:25 EDT

*** This bug has been marked as a duplicate of 88719 ***