Skip to main content



      Home
Home » Eclipse Projects » Platform - User Assistance (UA) » How to add anchor to href in a call to displayHelpResource
How to add anchor to href in a call to displayHelpResource [message #474298] Wed, 27 August 2008 09:39 Go to next message
Eclipse UserFriend
Hello,

I want to show help in help window (not in help view) when user presses
certain button on a view in my plug-in.

I figured out that this is possible with the help of the method :
PlatformUI.getWorkbench().getHelpSystem().displayHelpResourc e( "href");

The location of help file is : html/abc.html

The api says href should be wrt to plug-in so the href will look like :
"/myPlug-in/html/abc.html"

When I run this I get the help file coming up in help window without any
problem.

Now, I want the html file to scroll down to a certain part of it.
When the user presses the button I know which part of the html file to be
displayed. As in, I know the anchor to it.

If I add the anchor to the href as : "/myPlug-in/html/abc.html#" +
"anchor", the help page does not scroll down to the place of the html file
where I want.

Question : How do I add an anchor to the href in the call to method :
PlatformUI.getWorkbench().getHelpSystem().displayHelpResourc e( "href");

Thaks.
Re: How to add anchor to href in a call to displayHelpResource [message #474299 is a reply to message #474298] Wed, 27 August 2008 12:07 Go to previous messageGo to next message
Eclipse UserFriend
I would have expected that to work. It may be that the help system is
parsing the URL and losing the anchor part. Can you try replacing the #
with %23 and see if it works any better.


kaprasi wrote:
> Hello,
>
> I want to show help in help window (not in help view) when user presses
> certain button on a view in my plug-in.
>
> I figured out that this is possible with the help of the method :
> PlatformUI.getWorkbench().getHelpSystem().displayHelpResourc e( "href");
>
> The location of help file is : html/abc.html
>
> The api says href should be wrt to plug-in so the href will look like :
> "/myPlug-in/html/abc.html"
>
> When I run this I get the help file coming up in help window without any
> problem.
>
> Now, I want the html file to scroll down to a certain part of it.
> When the user presses the button I know which part of the html file to
> be displayed. As in, I know the anchor to it.
>
> If I add the anchor to the href as : "/myPlug-in/html/abc.html#" +
> "anchor", the help page does not scroll down to the place of the html
> file where I want.
>
> Question : How do I add an anchor to the href in the call to method :
> PlatformUI.getWorkbench().getHelpSystem().displayHelpResourc e( "href");
>
> Thaks.
>
>
>
Re: How to add anchor to href in a call to displayHelpResource [message #474300 is a reply to message #474299] Thu, 28 August 2008 03:06 Go to previous messageGo to next message
Eclipse UserFriend
Chris Goldthorpe wrote:

> Can you try replacing the #
> with %23 and see if it works any better.


Chris,

It doesn't work with %23.
How do I add the anchor to href? I feel this should not be that difficult.

Thanks.
Re: How to add anchor to href in a call to displayHelpResource [message #474301 is a reply to message #474298] Thu, 28 August 2008 08:43 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: nospam_kowalskilee.gmail.com

Are you trying this format?:
PlatformUI.getWorkbench().getHelpSystem().displayHelpResourc e( "/myPlug-in/html/abc.html#anchor")

From your email, I wasn't sure how you were adding the anchor into the
href.

Sincerely,
Lee Anne


kaprasi wrote:
> Hello,
>
> I want to show help in help window (not in help view) when user presses
> certain button on a view in my plug-in.
>
> I figured out that this is possible with the help of the method :
> PlatformUI.getWorkbench().getHelpSystem().displayHelpResourc e( "href");
>
> The location of help file is : html/abc.html
>
> The api says href should be wrt to plug-in so the href will look like :
> "/myPlug-in/html/abc.html"
>
> When I run this I get the help file coming up in help window without any
> problem.
>
> Now, I want the html file to scroll down to a certain part of it.
> When the user presses the button I know which part of the html file to
> be displayed. As in, I know the anchor to it.
>
> If I add the anchor to the href as : "/myPlug-in/html/abc.html#" +
> "anchor", the help page does not scroll down to the place of the html
> file where I want.
>
> Question : How do I add an anchor to the href in the call to method :
> PlatformUI.getWorkbench().getHelpSystem().displayHelpResourc e( "href");
>
> Thaks.
>
>
>
Re: How to add anchor to href in a call to displayHelpResource [message #474304 is a reply to message #474301] Fri, 29 August 2008 03:26 Go to previous message
Eclipse UserFriend
Lee Anne wrote:

> Are you trying this format?:
>
PlatformUI.getWorkbench().getHelpSystem().displayHelpResourc e( "/myPlug-in/html/abc.html#anchor")

> From your email, I wasn't sure how you were adding the anchor into the
> href.

> Sincerely,
> Lee Anne


Yes, I have tried the format you have mentioned and it doesn't work. I
thought this would be the easiest part. I'd appreciate if you could find
some solution to this asap.

Thanks.
Re: How to add anchor to href in a call to displayHelpResource [message #619446 is a reply to message #474298] Wed, 27 August 2008 12:07 Go to previous message
Eclipse UserFriend
I would have expected that to work. It may be that the help system is
parsing the URL and losing the anchor part. Can you try replacing the #
with %23 and see if it works any better.


kaprasi wrote:
> Hello,
>
> I want to show help in help window (not in help view) when user presses
> certain button on a view in my plug-in.
>
> I figured out that this is possible with the help of the method :
> PlatformUI.getWorkbench().getHelpSystem().displayHelpResourc e( "href");
>
> The location of help file is : html/abc.html
>
> The api says href should be wrt to plug-in so the href will look like :
> "/myPlug-in/html/abc.html"
>
> When I run this I get the help file coming up in help window without any
> problem.
>
> Now, I want the html file to scroll down to a certain part of it.
> When the user presses the button I know which part of the html file to
> be displayed. As in, I know the anchor to it.
>
> If I add the anchor to the href as : "/myPlug-in/html/abc.html#" +
> "anchor", the help page does not scroll down to the place of the html
> file where I want.
>
> Question : How do I add an anchor to the href in the call to method :
> PlatformUI.getWorkbench().getHelpSystem().displayHelpResourc e( "href");
>
> Thaks.
>
>
>
Re: How to add anchor to href in a call to displayHelpResource [message #619448 is a reply to message #474299] Thu, 28 August 2008 03:06 Go to previous message
Eclipse UserFriend
Chris Goldthorpe wrote:

> Can you try replacing the #
> with %23 and see if it works any better.


Chris,

It doesn't work with %23.
How do I add the anchor to href? I feel this should not be that difficult.

Thanks.
Re: How to add anchor to href in a call to displayHelpResource [message #619451 is a reply to message #474298] Thu, 28 August 2008 08:43 Go to previous message
Eclipse UserFriend
Originally posted by: nospam_kowalskilee.gmail.com

Are you trying this format?:
PlatformUI.getWorkbench().getHelpSystem().displayHelpResourc e( "/myPlug-in/html/abc.html#anchor")

From your email, I wasn't sure how you were adding the anchor into the
href.

Sincerely,
Lee Anne


kaprasi wrote:
> Hello,
>
> I want to show help in help window (not in help view) when user presses
> certain button on a view in my plug-in.
>
> I figured out that this is possible with the help of the method :
> PlatformUI.getWorkbench().getHelpSystem().displayHelpResourc e( "href");
>
> The location of help file is : html/abc.html
>
> The api says href should be wrt to plug-in so the href will look like :
> "/myPlug-in/html/abc.html"
>
> When I run this I get the help file coming up in help window without any
> problem.
>
> Now, I want the html file to scroll down to a certain part of it.
> When the user presses the button I know which part of the html file to
> be displayed. As in, I know the anchor to it.
>
> If I add the anchor to the href as : "/myPlug-in/html/abc.html#" +
> "anchor", the help page does not scroll down to the place of the html
> file where I want.
>
> Question : How do I add an anchor to the href in the call to method :
> PlatformUI.getWorkbench().getHelpSystem().displayHelpResourc e( "href");
>
> Thaks.
>
>
>
Re: How to add anchor to href in a call to displayHelpResource [message #619456 is a reply to message #474301] Fri, 29 August 2008 03:26 Go to previous message
Eclipse UserFriend
Lee Anne wrote:

> Are you trying this format?:
>
PlatformUI.getWorkbench().getHelpSystem().displayHelpResourc e( "/myPlug-in/html/abc.html#anchor")

> From your email, I wasn't sure how you were adding the anchor into the
> href.

> Sincerely,
> Lee Anne


Yes, I have tried the format you have mentioned and it doesn't work. I
thought this would be the easiest part. I'd appreciate if you could find
some solution to this asap.

Thanks.
Previous Topic:Context sensitive help not working.
Next Topic:Re: InfoCenter Exception
Goto Forum:
  


Current Time: Fri Jun 13 04:16:25 EDT 2025

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

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

Back to the top