Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Platform - User Assistance (UA) » JavaScript to tell if ActiveHelp is available?
JavaScript to tell if ActiveHelp is available? [message #605441] Fri, 21 December 2007 22:21
Eclipse UserFriend
Originally posted by: ddirks.ittvis.com

Hi all,

I have help content that includes ActiveHelp links that call some custom
actions. Since the same content may be running in a workbench, in the
stand-alone help, or in an Infocenter. I'm looking for a way to tell
*in JavaScript* whether the ActiveHelp is available, so I can make the
links behave as I want them to in all situations.

I have tried several variations of the following JavaScript function:

//---------------------------------------------------------- -
function activeHelpIsAvailable() {
var available = 0;
if (liveAction(
"org.eclipse.help.ui",
"org.eclipse.help.ui.internal.ExecuteCommandAction",
"org.eclipse.ui.PlatformUI.isWorkbenchRunning()")
//"org.eclipse.core.runtime.Platform.isRunning()")
//"org.eclipse.ui.PlatformUI.getWorkbench()")
!= null) {
available = 1;
}
return available;
}
//---------------------------------------------------------- -

but none of the functions I've tried calling to determine whether
the workbench is running:

* org.eclipse.ui.PlatformUI.isWorkbenchRunning()
* org.eclipse.core.runtime.Platform.isRunning()
* org.eclipse.ui.PlatformUI.getWorkbench()

returns anything but null.

Am I way off the track here? Is there some obvious way to do this
that I'm missing? Or some non-obvious way?

This needs to work in Eclipse 3.3.

Thanks for any help,

Doug Dirks
Previous Topic:Is there an external method to get the randomly chosen port number when standalone help is launched
Next Topic:Re: Welcome Framework
Goto Forum:
  


Current Time: Thu Apr 25 23:55:45 GMT 2024

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

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

Back to the top