Community
Participate
Working Groups
When extracting eclipse help from mediawiki, anchors that are specified by means of absolute paths are not properly extracted. E.g., when generating eclipse help from http://wiki.eclipse.org/GEF/GEF4/Common, a local anchor specified by 'GEF/GEF4/Common#IActivatable' is generated as follows: <a href="IActivatable" title="GEF/GEF4/Common#IActivatable">IActivatable</a> It can thus not be navigated within the generated help. If I specify the local anchor by '#IActivatable', the link is properly generated.
Thanks for the bug Alexander. Can you attach or comment with details of how you generated the Eclipse help content? (e.g. the relevant Ant script)
(In reply to David Green from comment #1) > Thanks for the bug Alexander. Can you attach or comment with details of how > you generated the Eclipse help content? (e.g. the relevant Ant script) I use the following script to generate: http://git.eclipse.org/c/gef/org.eclipse.gef4.git/tree/org.eclipse.gef4.releng/scripts/generateWikitext.xml It is executed from within our pom.xml: http://git.eclipse.org/c/gef/org.eclipse.gef4.git/tree/org.eclipse.gef4.releng/pom.xml
(In reply to Alexander Nyßen from comment #2) > (In reply to David Green from comment #1) > > Thanks for the bug Alexander. Can you attach or comment with details of how > > you generated the Eclipse help content? (e.g. the relevant Ant script) > > I use the following script to generate: > > http://git.eclipse.org/c/gef/org.eclipse.gef4.git/tree/org.eclipse.gef4. > releng/scripts/generateWikitext.xml > > It is executed from within our pom.xml: > > http://git.eclipse.org/c/gef/org.eclipse.gef4.git/tree/org.eclipse.gef4. > releng/pom.xml The wiki.path and wiki.title variables used in the script are defined in a wikitextOptions.txt file in each of our doc bundles, e.g: http://git.eclipse.org/c/gef/org.eclipse.gef4.git/tree/org.eclipse.gef4.common.doc/wikitextOptions.txt
Alexander, is this a problem for the gef4 release? It looks like the references have been updated in the wiki to avoid the problematic syntax.
(In reply to David Green from comment #4) > Alexander, is this a problem for the gef4 release? It looks like the > references have been updated in the wiki to avoid the problematic syntax. We have indeed done this as a workaround, so this is no blocker to us.
Ok great, I'm glad there's a workaround for you.
I think I have found the error: In WikiToDocTask.PathPageMapping.mapPageNameToHref(String) on line 828 [1] when there is a link pointing to the page that is currently processed, the result should always start with a #. If hashId is not null, this is not the case. Current line: > return hashId == null ? "#" : hashId; It should be: > return "#" + (hashId == null ? "" : hashId); //$NON-NLS-1$ //$NON-NLS-2$ I propose this patch : https://git.eclipse.org/r/51357 I also wanted to be able to unit test this change. In WikiToDocTask, I have moved the code calling the server into a protected method "createInputReader(URL)". I have also changed some method from "private" to "protected". In the WikiToDocTaskTest, I test with a subclass of WikiToDocTask where the calls to the server are overridden. Please let me know what you think. [1] http://git.eclipse.org/c/mylyn/org.eclipse.mylyn.docs.git/tree/org.eclipse.mylyn.wikitext.mediawiki.core/src/org/eclipse/mylyn/internal/wikitext/mediawiki/core/tasks/WikiToDocTask.java?id=2aed50a755fe7fa63c37a3d977d5bfecefa54786#n828
Gerrit change https://git.eclipse.org/r/51357 was merged to [master]. Commit: http://git.eclipse.org/c/mylyn/org.eclipse.mylyn.docs.git/commit/?id=3b2b24cd351bf191776570d5af8ca94dab02a9f1
*** Bug 444459 has been marked as a duplicate of this bug. ***
Thanks for the contribution Jeremie.