Bug 90021 - [resolve] Javadoc help not showing for HashMap(Map)
Summary: [resolve] Javadoc help not showing for HashMap(Map)
Status: VERIFIED DUPLICATE of bug 299384
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.1   Edit
Hardware: PC Windows 2000
: P5 normal (vote)
Target Milestone: 3.7 M4   Edit
Assignee: Srikanth Sankaran CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 101756 (view as bug list)
Depends on:
Blocks:
 
Reported: 2005-04-01 14:46 EST by Brad Clarke CLA
Modified: 2010-12-07 03:52 EST (History)
7 users (show)

See Also:


Attachments
works for me (14.77 KB, image/png)
2005-06-02 15:45 EDT, Dani Megert CLA
no flags Details
tested with 1.4 and 5.0 SDK (6.85 KB, image/png)
2005-06-02 16:02 EDT, Dani Megert CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Brad Clarke CLA 2005-04-01 14:46:56 EST
Since installing M5a when I press F1 I no longer see context sensitive Javadoc
links, only pages of stuff about the IDE. For example, if I have my cursor on
the word "HashMap" in this line:

            this.fieldMap = new HashMap(pageIDs);

pressing F1 would give me a link such as "HashMap(Map)" that linked to something
like this:

http://java.sun.com/j2se/1.5.0/docs/api/java/util/HashMap.html#HashMap(java.util.Map)


The first part of the link came from the Javadoc URL part of the installed JRE
but it also worked for jars that I had set the Javadoc URL for.

Am I missing something? Has this functionality moved somewhere else? Is it
possible to turn off the IDE help and completely replace it with this method of
Javadoc help? Can I just change things back to how they were before the new help
system since I really don't need IDE help?
Comment 1 Dejan Glozic CLA 2005-04-01 14:51:45 EST
You should still get that link in the upper portion of the 'Related Topics' 
view. We didn't loose any info - just repackaged it in a different way.
Comment 2 Dejan Glozic CLA 2005-04-01 15:01:49 EST
However you will need a more recent build (M6 should be available today).
Comment 3 Brad Clarke CLA 2005-04-01 15:07:13 EST
ok, I see it for some things like on "RuntimeException" in this line:

    throw new RuntimeException("TO field map not set!");

or even with HashMap if I remove the parameter, but the previous example with
HashMap seems broken. More context here:

    protected void setFieldMap(Map pageIDs) {
        if (pageIDs == null) {
            this.fieldMap = pageIDs;
        } else {
            this.fieldMap = new HashMap(pageIDs);
        }
        this.fieldsWereSet = true;
    }


Might be a problem with generics? I have a 5.0 JDK but I'm not using 5.0
features yet. I'd verify that 1.4 is still selected in the compiler settings but
the GUI for that config page is borked. I do know I'm not seeing the warnings
that were present the last time I tested 5.0 compiling so I'm pretty sure it's
still off. 


If M6 is coming shortly I'll get it ASAP.
Comment 4 Dejan Glozic CLA 2005-05-20 13:06:42 EDT
Can you check this problem with M7?
Comment 5 Brad Clarke CLA 2005-05-23 11:37:40 EDT
Just downloaded M7 and I don't think it's completely working. With this line of
code:

HashMap map = new HashMap(new HashMap());

putting the the cursor on the first or third "HashMap" shows the help link but
the second one does not.
Comment 6 Dejan Glozic CLA 2005-06-02 14:02:17 EDT
Dani, from Brad's description there is something special about HashMap 
constructor. Can you reproduce Brad's problem?
Comment 7 Dani Megert CLA 2005-06-02 15:45:05 EDT
Created attachment 22263 [details]
works for me
Comment 8 Dejan Glozic CLA 2005-06-02 15:49:12 EDT
Resolving as such.
Comment 9 Brad Clarke CLA 2005-06-02 15:56:00 EDT
You didn't use the code I provided. The int constructor is fine, it's the Map
constructor that shows the problem:

HashMap map = new HashMap(new HashMap());

Comment 10 Dani Megert CLA 2005-06-02 16:02:14 EDT
Please do not reopen until you see this bug using 3.1 RC1 or newer.
Comment 11 Dani Megert CLA 2005-06-02 16:02:47 EDT
Created attachment 22265 [details]
tested with 1.4 and 5.0 SDK
Comment 12 Brad Clarke CLA 2005-06-02 16:25:28 EDT
OK, narrowed it down a little more:

Using Eclipse 3.1 RC1
JDK 1.5.0_02 on Win2k3 Server

The problem still exists when my compiler compliance is set to 1.4 but if I
change it to 5.0 the help link shows up properly.

Path to setting:
Window->Preferences...
Java->Compiler->Compiler compliance level
Comment 13 Dejan Glozic CLA 2005-06-02 16:27:59 EDT
This does not look like a help problem. Dani, please reassign back if I was 
mistaken.
Comment 14 Dani Megert CLA 2005-06-02 16:33:27 EDT
>compliance is set to 1.4
what level the JRE?
Comment 15 Brad Clarke CLA 2005-06-02 16:47:33 EDT
I'm not exactly sure what you're asking so I'll just give you all I can think of

>JDK 1.5.0_02 on Win2k3 Server

I installed to c:\java\jdk1.5.0_02
My "Installed JREs" lists only 1 which has it's "JRE home directory" set to
"C:\java\jdk1.5.0_02" (I changed this long ago from the default of the installed
JRE so I could debug into the JDK).

The JRE installed (windows installer for JDK runs a second installer for a JRE)
was installed to "C:\java\jre1.5.0_02" and I -think- this is what eclipse itself
is using to run since this directory, and not "C:\java\jdk1.5.0_02", is being
accessed by my only running javaw.exe according to the "handle" tool:
http://www.sysinternals.com/ntw2k/freeware/handle.shtml

Please let me know if there's something else you need to know that wasn't in
that mess :)
Comment 16 Dirk Baeumer CLA 2005-06-07 10:27:36 EDT
Was able to reproduce this under N20050607-0010 with the following setup:

- Compiler compliance level 1.4
- JRE 1.5

The problem is that code resolve doesn't return anything for the second has map.
Open declaration (F3) doesn't work either.

Moving to JDT/Core to comment why code resolve doesn't work here ?
Comment 17 David Audel CLA 2005-06-08 09:49:55 EDT
Code resolve doesn't work because SelectionEngine try to find the JavaElement
corresponding to HashMap(java.util.Map) but this method doesn't exist in JRE
1.5. The existing method is HashMap(java.util.Map<? extends K, ? extends V> m).
Comment 18 David Audel CLA 2007-06-21 04:48:34 EDT
*** Bug 101756 has been marked as a duplicate of this bug. ***
Comment 19 Srikanth Sankaran CLA 2010-11-03 01:24:03 EDT
Verified that both javadoc hover and visit declaration (F3)
are broken with I20101025-1800 and are fixed at HEAD.

Closing as duplicate of 299384

*** This bug has been marked as a duplicate of bug 299384 ***
Comment 20 Ayushman Jain CLA 2010-12-07 03:52:03 EST
Verified for 3.7M4 using build 20101205-2000.