Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Platform - User Assistance (UA) » Computing help URLs
Computing help URLs [message #474763] Mon, 03 November 2008 22:47 Go to next message
Amit Mookerjee is currently offline Amit MookerjeeFriend
Messages: 47
Registered: July 2009
Member
Hi,
I have made an eclipse plugin and facing the following issues in computing
the URL:

1. URL for documents relative paths : I have a help plugin that appears to
work when the document I refer to is located below the plug-in directory.
So when I compute the 'href' argument in
PlatformUI.getWorkbench().getHelpSystem().displayHelpResourc e(href);

in the following way:

href = "/org.eclipse.rtsc.xdctools.help/" + "cdoc/" +
elemName.replace('.', '/') + "/package.html";

help shows the document located in the 'cdoc' sub-directory located in the
plugin directory.

However, if the documents are kept at a level higher, the document does
not showup.

In other words computing 'href' in the following way

href = "/org.eclipse.rtsc.xdctools.help/" + "../docs/cdoc/" +
elemName.replace('.', '/') + "/package.html";

does not work. How do I compute 'href' when my docs are located above the
plugin directory?

2. URL for documents in zipped files: If I have the sub-directory 'cdoc'
mentioned in part 1 zipped up, then the following computation of 'href'
does not work

href = "/org.eclipse.rtsc.xdctools.help/" + "docs.zip!/cdoc/" +
elemName.replace('.', '/') + "/package.html";

What would be the right way to compute the URL for documents residing
within a zipped file?
Re: Computing help URLs [message #474769 is a reply to message #474763] Wed, 12 November 2008 00:38 Go to previous message
Chris Goldthorpe is currently offline Chris GoldthorpeFriend
Messages: 815
Registered: July 2009
Senior Member
The help server will only serve documents that are located in plugins.
Partly this is for security reasons, we don't want users to be able to
access our entire disks through the web server.

If the server sees an address like
http://127.0.0.1:3477/help/topic/org.eclipse.jdt.doc.user/co ncepts/concept-java-search.htm

it will interpret it as a file in the plugin org.eclipse.jdt.doc.user.
When you use ".." it does not cause you to navigate relative to the file
structure on disc, rather it affects the url so if from that page you
opened "../../foo.html" it would try to open

http://127.0.0.1:3477/help/topic/foo.html

which would not be found.

Amit Mookerjee wrote:
> Hi,
> I have made an eclipse plugin and facing the following issues in
> computing the URL:
>
> 1. URL for documents relative paths : I have a help plugin that appears
> to work when the document I refer to is located below the plug-in
> directory. So when I compute the 'href' argument in
> PlatformUI.getWorkbench().getHelpSystem().displayHelpResourc e(href);
> in the following way:
>
> href = "/org.eclipse.rtsc.xdctools.help/" + "cdoc/" +
> elemName.replace('.', '/') + "/package.html";
>
> help shows the document located in the 'cdoc' sub-directory located in
> the plugin directory.
>
> However, if the documents are kept at a level higher, the document does
> not showup.
>
> In other words computing 'href' in the following way
>
> href = "/org.eclipse.rtsc.xdctools.help/" + "../docs/cdoc/" +
> elemName.replace('.', '/') + "/package.html";
>
> does not work. How do I compute 'href' when my docs are located above
> the plugin directory?
>
> 2. URL for documents in zipped files: If I have the sub-directory 'cdoc'
> mentioned in part 1 zipped up, then the following computation of 'href'
> does not work
>
> href = "/org.eclipse.rtsc.xdctools.help/" + "docs.zip!/cdoc/" +
> elemName.replace('.', '/') + "/package.html";
>
> What would be the right way to compute the URL for documents residing
> within a zipped file?
>
>
Re: Computing help URLs [message #621806 is a reply to message #474763] Wed, 12 November 2008 00:38 Go to previous message
Chris Goldthorpe is currently offline Chris GoldthorpeFriend
Messages: 815
Registered: July 2009
Senior Member
The help server will only serve documents that are located in plugins.
Partly this is for security reasons, we don't want users to be able to
access our entire disks through the web server.

If the server sees an address like
http://127.0.0.1:3477/help/topic/org.eclipse.jdt.doc.user/co ncepts/concept-java-search.htm

it will interpret it as a file in the plugin org.eclipse.jdt.doc.user.
When you use ".." it does not cause you to navigate relative to the file
structure on disc, rather it affects the url so if from that page you
opened "../../foo.html" it would try to open

http://127.0.0.1:3477/help/topic/foo.html

which would not be found.

Amit Mookerjee wrote:
> Hi,
> I have made an eclipse plugin and facing the following issues in
> computing the URL:
>
> 1. URL for documents relative paths : I have a help plugin that appears
> to work when the document I refer to is located below the plug-in
> directory. So when I compute the 'href' argument in
> PlatformUI.getWorkbench().getHelpSystem().displayHelpResourc e(href);
> in the following way:
>
> href = "/org.eclipse.rtsc.xdctools.help/" + "cdoc/" +
> elemName.replace('.', '/') + "/package.html";
>
> help shows the document located in the 'cdoc' sub-directory located in
> the plugin directory.
>
> However, if the documents are kept at a level higher, the document does
> not showup.
>
> In other words computing 'href' in the following way
>
> href = "/org.eclipse.rtsc.xdctools.help/" + "../docs/cdoc/" +
> elemName.replace('.', '/') + "/package.html";
>
> does not work. How do I compute 'href' when my docs are located above
> the plugin directory?
>
> 2. URL for documents in zipped files: If I have the sub-directory 'cdoc'
> mentioned in part 1 zipped up, then the following computation of 'href'
> does not work
>
> href = "/org.eclipse.rtsc.xdctools.help/" + "docs.zip!/cdoc/" +
> elemName.replace('.', '/') + "/package.html";
>
> What would be the right way to compute the URL for documents residing
> within a zipped file?
>
>
Previous Topic:add files that do not lay in project folder
Next Topic:Error searching in remote infocenter
Goto Forum:
  


Current Time: Fri Dec 06 20:23:06 GMT 2024

Powered by FUDForum. Page generated in 0.02766 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top