|Context Help in SwingControl [message #574226]
||Tue, 02 September 2008 09:59
| Johannes Utzig
Registered: July 2009
I'm using eclipse albireo to integrate a Swing diagram editor into Eclipse.
Albireo solved many issues already, so first of all, thank you for your
However, now I want to provide context sensitive help for diagram
elements and it is causing me some problems.
I'll try to explain the scenario:
The Eclipse Editor uses a SwingControl that creates a JScrollPane that
finally contains the Swing diagram editor.
The Editor returns an adapter for IContextProvider that reacts to
SELECTION. It then computes a context for the given selection. This all
works just fine, until I activate another WorkbenchPart while the Help
View is still open. Once the other part is activated, the Help View
displays the help content for the other part.
When I click back into the Swing Editor, the HelpView correctly invokes
the handlePartActivation method.
In handlePartActivation, the following check is done:
Control c = display.getFocusControl();
if (c != null && c.isVisible() && !c.isDisposed())
In my case, display.getFocusControl returns null.
I am assuming, that is because the SwingControl passed the focus to the
embedded swing editor and therefore no SWT control is focused.
However, without a focused control, the help view refuses to update the
help content and the only way to display the correct context is by
closing it and pressing F1 again.
Am I doing anything wrong? Any hints on how to work around that?
Or is this more an issue with the code of the help view that I should
post in another newsgroup?
Thanks in advance and best regards,
Powered by FUDForum
. Page generated in 0.02619 seconds