This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
E.g. after core-main #b7adb449ed59, Ant task completion items will show a page which may have HTML hyperlinks. But these do nothing when clicked. The reason (I suppose) is that XMLResultItem.Docum.resolveLink is a no-op. Fix might require an API enhancement in GrammarResult so that it could specify a URL rather than raw description; or specify a base URL for resolving links.
(In reply to comment #0) > core-main #b7adb449ed59 Make that core-main #fa02d609943d.
Created attachment 112241 [details] Proposed patch
Please review the proposed patch to XML Core APIs
[JG01] spec.version.base must end in .0 for it to function properly: http://wiki.netbeans.org/DevFaqImplementationDependency Anyway it is not clear from the patch why you added OpenIDE-Module-Implementation-Version to xml.text; you do not appear to be adding an implementation dependency on it from anywhere else. (And please avoid doing so anyway; we want to be removing impl deps, not adding fresh ones!) [JG02] @NullAllowed need not be commented out. Just add a dep on Common Anno API. [JG03] It seems like getDescription in the modified section of AntGrammar could just return null (or not be overridden at all), at least according to DescriptionSource Javadoc. I.e.: list.add(new MyElement(element) { @Override public URL getContentURL() { ClassLoader cl = ...; URL manpage = ...; return manpage; } }); [JG04] Tip: <code>null</code> can be written more easily {@code null}. [JG05] {@link #resolveLink(java.net.URI)} does not match the actual signature of the method. (Vote for bug #194324.)
Created attachment 112296 [details] Proposed patch #2 Applied JG-x comments
JG05 still outstanding. [JG06] Javadoc for GrammarResult.getDescription might mention that it can be useful to use DescriptionSource.getContentURL even if you are not expecting links, simply because it can be easier to implement in case the content is kept in a separate file/resource. BTW stray whitespace added at the end of XMLResultItem.java patch; make sure you have Remove Trailing Whitespace set (to From Modified Lines Only).
Created attachment 112367 [details] Proposed patch, #3 Adapted to comment #6
Y01 I see no unit test in patch #3.
Any movement on this? [JG07] Missing apichanges.xml entry.
Created attachment 113076 [details] Revised patch, unit test added Was temporarily on hold; please see revised patch: unit tests to cover just the documentation feature were added, but the CC feature as a whole remains largely untested.
Created attachment 113077 [details] apichanges corrected Updated+corrected apichanges in XML core module; the original version did not include the actual changelist.
Integrated into 'main-golden' Changeset: http://hg.netbeans.org/main-golden/rev/dc1a8c54520e User: Svata Dedic <sdedic@netbeans.org> Log: #199742: added mixing API interface to resolve link and provide base URL of documentation to XML completion core