Skip to main content



      Home
Home » Eclipse Projects » Rich Client Platform (RCP) » How to connect retargetable (edit) actions with std SWT controls?
How to connect retargetable (edit) actions with std SWT controls? [message #439102] Wed, 02 November 2005 06:44
Eclipse UserFriend
Hello!

I'm wondering how to solve the following problem:

I have a book-like view (basically similar to Outline) which
presents its pages depending on some RCP internal mechanics
(which differs from Outline) and the shown pages typically
contain several SWT controls (Text, Combo) on a form composite.

The question now is: Since widgets like Text already have a
local edit context (at least on Windows platforms), it would be nice,
if these could interact with the retargetable edit actions (like
Delete, Copy, etc). But my RCP app seems to have this retargeting
for these controls. Is there a simple way to realize this generally
for all my pages?

Please note, that I don't have separate edit actions, which I could
connect via the canonical solution for views via

actionBars.setGlobalActionHandler(...);

I only want to connext the "native" edit capabilities of those controls
with the retargetable edit actions.

I found out that the outline-book contains some special code for
handling global actions, something like:

private IPropertyChangeListener actionBarPropListener =
new IPropertyChangeListener() {
public void propertyChange(PropertyChangeEvent event) {
if (event.getProperty().equals(SubActionBars.P_ACTION_HANDLERS)
&& fActiveRec != null
&& event.getSource() == fActiveRec.subActionBars) {
refreshGlobalActionHandlers();
}
}
};

but replicating this stuff in my own view obviously wasn't enough to
activate the mentioned global handlers.

Any help would be appreciated!

Thank you in advance,

Daniel Krügler
Previous Topic:How to create "file open" menu
Next Topic:Determine selection of another view via extensioncontribution?
Goto Forum:
  


Current Time: Fri Nov 07 00:33:55 EST 2025

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

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

Back to the top