Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Platform - User Assistance (UA) » Test whether content is displayed in a help view?
Test whether content is displayed in a help view? [message #472326] Fri, 15 February 2008 18:29 Go to next message
Douglas Dirks is currently offline Douglas DirksFriend
Messages: 26
Registered: July 2009
Junior Member
I would like to be able to determine, from within an xhtml file,
whether the file is being displayed in the Eclipse help view or
if it is in a browser. I believe something like the following
ought to work, if placed in the xhtml file:

<div>
Some content...

<enablement>
<with variable="workbench">
<test property="i.am.a.help.view" value="yes.i.am"/>
</with>
</enablement>
</div>

What I have been unable to determine, despite a fair amount of
searching through the docs, are the values I would plug in for
"i.am.a.help.view" and "yes.i.am".

Is this a case where I need a custom property tester, or is there
some way to determine whether I'm in the help view using existing
properties and values?

Thanks for any help,
Doug Dirks
Re: Test whether content is displayed in a help view? [message #472328 is a reply to message #472326] Mon, 18 February 2008 19:58 Go to previous messageGo to next message
Chris Goldthorpe is currently offline Chris GoldthorpeFriend
Messages: 815
Registered: July 2009
Senior Member
Anything displayed in the help view will have a path like this:

help/ntopic/org.eclipse.jdt.doc.user/gettingStarted/qs-6.htm

Note the "ntopic" in the path which stands for narrow topic.
Re: Test whether content is displayed in a help view? [message #472335 is a reply to message #472328] Wed, 20 February 2008 00:19 Go to previous messageGo to next message
Douglas Dirks is currently offline Douglas DirksFriend
Messages: 26
Registered: July 2009
Junior Member
Thanks, Chris. With that insight I can solve my current problem
using some JavaScript (to detect whether I'm in the Help View)
and CSS (to control what's displayed).

I can't tell whether it would be generally useful to have a
<enablement> test for this. That would certainly make it easier
to control the displayed content based on the view type, but
maybe that's a fringe case. Do you (or anyone else out there)
think it would be worth filing as a feature request?

Thanks again,
Doug
Re: Test whether content is displayed in a help view? [message #472336 is a reply to message #472335] Wed, 20 February 2008 16:50 Go to previous message
Chris Goldthorpe is currently offline Chris GoldthorpeFriend
Messages: 815
Registered: July 2009
Senior Member
It depends on what you are looking to do. It's already possible in
Eclipse 3.4 to specify different CSS to be included in narrow pages and
you could use that to specify sections which would be hidden or
formatted differently when displayed in the help view.
Re: Test whether content is displayed in a help view? [message #609932 is a reply to message #472326] Mon, 18 February 2008 19:58 Go to previous message
Chris Goldthorpe is currently offline Chris GoldthorpeFriend
Messages: 815
Registered: July 2009
Senior Member
Anything displayed in the help view will have a path like this:

help/ntopic/org.eclipse.jdt.doc.user/gettingStarted/qs-6.htm

Note the "ntopic" in the path which stands for narrow topic.
Re: Test whether content is displayed in a help view? [message #609944 is a reply to message #472328] Wed, 20 February 2008 00:19 Go to previous message
Eclipse UserFriend
Originally posted by: ddirks.ittvis.com

Thanks, Chris. With that insight I can solve my current problem
using some JavaScript (to detect whether I'm in the Help View)
and CSS (to control what's displayed).

I can't tell whether it would be generally useful to have a
<enablement> test for this. That would certainly make it easier
to control the displayed content based on the view type, but
maybe that's a fringe case. Do you (or anyone else out there)
think it would be worth filing as a feature request?

Thanks again,
Doug
Re: Test whether content is displayed in a help view? [message #609945 is a reply to message #472335] Wed, 20 February 2008 16:50 Go to previous message
Chris Goldthorpe is currently offline Chris GoldthorpeFriend
Messages: 815
Registered: July 2009
Senior Member
It depends on what you are looking to do. It's already possible in
Eclipse 3.4 to specify different CSS to be included in narrow pages and
you could use that to specify sections which would be hidden or
formatted differently when displayed in the help view.
Previous Topic:running an infocenter on different servers: where can I find the documentation
Next Topic:running help in RCP without a workbench and not standalone
Goto Forum:
  


Current Time: Fri Mar 29 02:11:28 GMT 2024

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

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

Back to the top