Skip to main content


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 #471298] Tue, 18 December 2007 14:13 Go to next message
Eric Rizzo is currently offline Eric RizzoFriend
Messages: 3070
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.
>
>
Re: [User Assistance] Help weird content [message #471456 is a reply to message #471298] Fri, 18 January 2008 15:19 Go to previous messageGo to next message
Guillaume is currently offline GuillaumeFriend
Messages: 20
Registered: July 2009
Junior Member
Hi,

it's me again. Does anyone have a clue here ?
I really need to understand this issue.

Thanks in advance,
Guillaume.


Eric Rizzo wrote:

> 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.
>>
>>
Re: [User Assistance] Help weird content [message #471523 is a reply to message #471456] Mon, 21 January 2008 17:23 Go to previous message
Chris Goldthorpe is currently offline Chris GoldthorpeFriend
Messages: 815
Registered: July 2009
Senior Member
What version of Eclipse are you using? I can't tell exactly what's
happening in your situation but the help should not be indexed more than
once. I fixed several context help bugs in Eclipse 3.4 related to
getting inconsistent results when F1 is pressed more than once, you may
want to download the latest 3.4 milestone build and see if the problem
still exists.
Re: [User Assistance] Help weird content [message #606938 is a reply to message #471298] Fri, 18 January 2008 15:19 Go to previous message
Guillaume is currently offline GuillaumeFriend
Messages: 20
Registered: July 2009
Junior Member
Hi,

it's me again. Does anyone have a clue here ?
I really need to understand this issue.

Thanks in advance,
Guillaume.


Eric Rizzo wrote:

> 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.
>>
>>
Re: [User Assistance] Help weird content [message #607654 is a reply to message #471456] Mon, 21 January 2008 17:23 Go to previous message
Chris Goldthorpe is currently offline Chris GoldthorpeFriend
Messages: 815
Registered: July 2009
Senior Member
What version of Eclipse are you using? I can't tell exactly what's
happening in your situation but the help should not be indexed more than
once. I fixed several context help bugs in Eclipse 3.4 related to
getting inconsistent results when F1 is pressed more than once, you may
want to download the latest 3.4 milestone build and see if the problem
still exists.
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: Sat Apr 27 00:07:57 GMT 2024

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

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

Back to the top