Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Platform - User Assistance (UA) » Re: [User Assistance] Help weird content
Re: [User Assistance] Help weird content [message #605433] Tue, 18 December 2007 14:13
Eric Rizzo is currently offline Eric RizzoFriend
Messages: 3063
Registered: July 2009
Senior Member
This question might get more response on the eclipse.platform.ua group.
I've copied it to this response.

Eric


Guillaume wrote:
> Hi,
>
> I'm having troubles using the help contexts with my custom editor.
> This editor is a SharedHeaderFormEditor, and I have included this piece
> of code in its header initialization :
> -------------------------------------
> // Create help action.
> Action helpAction = new Action() {
> /**
> * @see org.eclipse.jface.action.Action#run()
> */
> @Override
> public void run() {
> BusyIndicator.showWhile(form.getDisplay(), new Runnable() {
> public void run() {
> // Set help context.
> AbstractPatternPage activePage = (AbstractPatternPage)
> getActivePageInstance();
> PlatformUI.getWorkbench().getHelpSystem().displayHelp(active Page.getHelpContextId());
>
> }
> });
> }
> };
> helpAction.setToolTipText(Messages.PatternEditor_HelpButtonT oolTip);
> helpAction.setImageDescriptor(JavaPlugin.getDefault().getIma geRegistry().getDescriptor(JavaPluginImages.IMG_OBJS_HELP));
>
> // Declare actions to the tool bar.
> form.getToolBarManager().add(helpAction);
> -------------------------------------
>
> So each page is returning its contextId, that is then invoked through
> the displayHelp() process. I've got my contexts.xml and extension right
> (so I think).
>
> This results in a new help view being displayed at the right side of my
> editor.
> The main section is correct (About Pattern Editor), but the content is
> varying from time to time.
>
> Sometimes, this is the expected content, as specified by my contexts.xml
> file :
> -------------------------------------
> <contexts>
> <context id="mdsofa_patternoverviewpage">
> <description>The overview page is responsible for the general
> information of the pattern.</description>
> <topic label="Pattern Editor Overview"
> href="html/editor/page/overview.html"/>
> </context>
> </contexts>
> -------------------------------------
>
> But many times, that is just not right, something like :
> -------------------------------------
> Each workbench window contains one or more perspectives, which are made
> up of various views and editors.
> See also:
> Workbench
> Perspectives
> Customizing the Workbench
> -------------------------------------
>
> This always happens the first time the help content is invoked, while
> indexing is happening (triggered by DefaultHelpUI.displayContext(...)).
> If I put a breakpoint in this very same method, at the first of those
> lines (DefaultHelpUI line 278 as of Eclipse 3.3.1) :
> -------------------------------------
> IViewPart part = page.showView(HELP_VIEW_ID, null,
> IWorkbenchPage.VIEW_VISIBLE);
> if (part != null) {
> HelpView view = (HelpView) part;
> view.displayContext(context, activePart, c);
> }
> -------------------------------------
> and wait for the indexing to complete, before running again, then the
> displayed help content is as expected again.
> Worst, if it has failed once in executing workbench, then the displayed
> help is always missing the point for this workbench.
>
> Is there a bug with the indexing while displaying such a help view ?
> What am I missing ?
>
> Thanks in advance,
> Guillaume Brocard.
>
>
Previous Topic:Question about standalone help
Next Topic:Is there an external method to get the randomly chosen port number when standalone help is launched
Goto Forum:
  


Current Time: Sun Jan 21 09:04:12 GMT 2018

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

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