Community
Participate
Working Groups
If I refereces a priavte field from a other class in JavaDoc the Eclipse editor does not find the field. JavaDoc does this. Example: class A { /** * {@link Particle#spinDir} */ } class Particle { priavte int spinDir; }
(In reply to Thomas Schmiereck from comment #0) > If I refereces a priavte field from a other class in JavaDoc the Eclipse > editor does not find the field. > JavaDoc does this. > > Example: > class A > { > /** > * {@link Particle#spinDir} > */ > } > class Particle > { > priavte int spinDir; > } @Thomas: Thank you for your report. This is not an issue with Eclipse Code Recommenders, however, but with the Eclipse Java Development Tools (which Code Recommenders builds upon). I have assigned this bug to the correct project. @JDT Team: After fixing the typo (priavte) and "attaching" the Javadoc comment to a method, I was able to confirm this problem using the Eclipse SDK 4.7 M4. Navigate > Open Hyperlink doesn't work, but as soon as I change the modifier to something other than private, it works again. Hope this helps.
ICodeAssist.codeComplete(int offset, CompletionRequestor requestor, IProgressMonitor monitor) does not provide this proposal at JavaCompletionProposalComputer#internalComputeCompletionProposals. Moving to JDT/Core.
My 'guess' is we don't seem to be ignoring the Javadoc as it is not attached to any program element. Need to check the JLS on where the Javadoc belongs in this particular case. Interestingly in case of an error in the field being referenced (as in the reported code in comment #0 where private is spelt wrongly), the navigation does work fine. This needs more investigation.
(In reply to Jay Arthanareeswaran from comment #3) > My 'guess' is we don't seem to be ignoring the Javadoc as it is not attached > to any program element. Need to check the JLS on where the Javadoc belongs > in this particular case. Note that I tried this with a correctly "attached" Javadoc as well (see my comment 2) and still couldn't get Ctrl+click hyperlinking on "spinDir" to work. Here's the complete compilation unit (a fixed variant of the compilation unit in comment 0): public class A { /** * {@link Particle#spinDir} */ public static void main(String[] args) { } } class Particle { private int spinDir; } Hope this helps.
(In reply to Andreas Sewe from comment #4) > (In reply to Jay Arthanareeswaran from comment #3) > > My 'guess' is we don't seem to be ignoring the Javadoc as it is not attached > > to any program element. Need to check the JLS on where the Javadoc belongs > > in this particular case. > > Note that I tried this with a correctly "attached" Javadoc as well (see my > comment 2) and still couldn't get Ctrl+click hyperlinking on "spinDir" to > work. I see it now, thanks. But this is even more straight forward case of visibility or lack of it of a private field. When you said Javadoc does it, what did you mean? The generated javadoc does seem to have the referenced field, but not a clickable link.
(In reply to Jay Arthanareeswaran from comment #5) > I see it now, thanks. But this is even more straight forward case of > visibility or lack of it of a private field. > > When you said Javadoc does it, what did you mean? The generated javadoc does > seem to have the referenced field, but not a clickable link. I didn't run the standalone Javadoc (I just checked hyperlinking within Eclipse), but I read comment 0 as if Thomas Schmiereck did. Anyway, I just checks this and the following produces a clickable link in Javadoc: Compilation unit A.java: public class A { /** * {@link Particle#spinDir} */ public static void main(String[] args) { } } Separate(!) compilation unit Particle.java public class Particle { private int spinDir; } Javadoc generated using Project > Generate Javadoc...
(In reply to Noopur Gupta from comment #2) > ICodeAssist.codeComplete(int offset, CompletionRequestor requestor, > IProgressMonitor monitor) does not provide this proposal at > JavaCompletionProposalComputer#internalComputeCompletionProposals. Sorry, this code location was for another bug. Here, ICodeAssist.codeSelect(int offset, int length) returns no result in JavaElementHyperlinkDetector#detectHyperlinks.