Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » Albireo » Context Help in SwingControl
Context Help in SwingControl [message #574226] Tue, 02 September 2008 09:59
Johannes Utzig is currently offline Johannes UtzigFriend
Messages: 329
Registered: July 2009
Senior Member
Hi,

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
valuable efforts.
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,
Johannes
Previous Topic:Re: Albireo (Swing/SWT integration) alpha available
Next Topic:Context Help in SwingControl
Goto Forum:
  


Current Time: Wed Nov 14 16:04:36 GMT 2018

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

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

Back to the top