Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » How to assign help context id to HelpView?
How to assign help context id to HelpView? [message #742415] Thu, 20 October 2011 13:22 Go to next message
Daniel Krügler is currently offline Daniel Krügler
Messages: 853
Registered: July 2009
Senior Member
In our RCP program we use the Eclipse "Help View" to present the
context-sensitive help. But in contrast to other views this view seems
not to assign a help context id to its own view (Typically done via
PlatformUI.getWorkbench().getHelpSystem().setHelp()).

Does there exist a way to assign a user-defined help context id to this
view in a non-intrisive way (I don't want to modify the source code or
bundle that provides this view)?

I can think of a possible way to realize that (untested), but would
prefer a simpler version, if possible: One could add a workbench part
listener and could listen to the activation of the Help View. When this
happens one could call setHelp to the control of this view.

Is someone aware whether the adapter pattern or any similar extension
mechanism can be used to realize this?

Thanks in advance and Greetings from Bremen,

Daniel Krügler
Re: How to assign help context id to HelpView? [message #742442 is a reply to message #742415] Thu, 20 October 2011 13:51 Go to previous messageGo to next message
Daniel Krügler is currently offline Daniel Krügler
Messages: 853
Registered: July 2009
Senior Member
On 2011-10-20 15:22, Daniel Krügler wrote:
> In our RCP program we use the Eclipse "Help View" to present the
> context-sensitive help. But in contrast to other views this view seems
> not to assign a help context id to its own view (Typically done via
> PlatformUI.getWorkbench().getHelpSystem().setHelp()).
>
> Does there exist a way to assign a user-defined help context id to this
> view in a non-intrisive way (I don't want to modify the source code or
> bundle that provides this view)?
>
> I can think of a possible way to realize that (untested), but would
> prefer a simpler version, if possible: One could add a workbench part
> listener and could listen to the activation of the Help View. When this
> happens one could call setHelp to the control of this view.
>
> Is someone aware whether the adapter pattern or any similar extension
> mechanism can be used to realize this?

I just realize that this could possibly be solved by providing an
IContextProvider to this view via the adapter manager. I'm giving
feedback, whether this approach works for us.

Greetings from Bremen,

Daniel Krügler
Re: How to assign help context id to HelpView? [message #743177 is a reply to message #742442] Fri, 21 October 2011 07:41 Go to previous message
Daniel Krügler is currently offline Daniel Krügler
Messages: 853
Registered: July 2009
Senior Member
On 2011-10-20 15:51, Daniel Krügler wrote:
> On 2011-10-20 15:22, Daniel Krügler wrote:
>> In our RCP program we use the Eclipse "Help View" to present the
>> context-sensitive help. But in contrast to other views this view seems
>> not to assign a help context id to its own view (Typically done via
>> PlatformUI.getWorkbench().getHelpSystem().setHelp()).
>>
>> Does there exist a way to assign a user-defined help context id to this
>> view in a non-intrisive way (I don't want to modify the source code or
>> bundle that provides this view)?
>>
>> I can think of a possible way to realize that (untested), but would
>> prefer a simpler version, if possible: One could add a workbench part
>> listener and could listen to the activation of the Help View. When this
>> happens one could call setHelp to the control of this view.

It is quite probable, that this approach wouldn't work, because
effectively the HelpView does use exactly the same strategy.

>> Is someone aware whether the adapter pattern or any similar extension
>> mechanism can be used to realize this?
>
> I just realize that this could possibly be solved by providing an
> IContextProvider to this view via the adapter manager. I'm giving
> feedback, whether this approach works for us.

It seems that providing an IContextProvider via the adapter manager
resolves this issue. Alas, I still think that it would make sense that
the help view would also register a help context for it's view.

HTH & Greetings from Bremen,

Daniel Krügler
Previous Topic:Rebroadcast selection after TableViewer row changed
Next Topic:bad experience with data binding for TableViewer.
Goto Forum:
  


Current Time: Wed Oct 01 10:32:47 GMT 2014

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

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