Skip to main content



      Home
Home » Eclipse Projects » Eclipse 4 » Add Binding Context programmatically (Add a Model defined Binding Context to a programmatically opened Part)
Add Binding Context programmatically [message #891823] Tue, 26 June 2012 03:18 Go to next message
Eclipse UserFriend
Situation:
We have a programatically opened Part that is not defined in the model.
We add this part to a PartStack defined in the model.

Problem: Now we need to have a Key Binding for a refresh event (F5) bound to this Part.
Binding Table defined, Binding context defined.. everything is done just now we need to add the Binding Context to the Part.

Now we have to add the defined context to the partmodel.getBindingContexts() List.

But from where can we get the defined Binding context ?
Is there something like modelService.find for getting it out of the model?

I would appreciate some hints.

Tom K.
Re: Add Binding Context programmatically [message #891894 is a reply to message #891823] Tue, 26 June 2012 09:01 Go to previous messageGo to next message
Eclipse UserFriend
There's nothing to help you do the search for now: you'll have to search the binding contexts yourself.

Another use for JXPath...
Re: Add Binding Context programmatically [message #892521 is a reply to message #891894] Thu, 28 June 2012 10:23 Go to previous message
Eclipse UserFriend
F5 as refresh is already defined in the windows context (at least in the 4.2 workbench) So adding a part automatically provides F5->Refresh.

Your part needs to provide a refresh handler, either programmatically or in the model.

If this is an Eclipse4 application, you just need to make sure that F5 is bound to Refresh (org.eclipse.ui.file.refresh) in the org.eclipse.ui.contexts.window BindingTable.

PW
Previous Topic:Menu Contribution appears multiple times on restart
Next Topic:Activity bindings vs model processors
Goto Forum:
  


Current Time: Sun Jul 13 07:09:35 EDT 2025

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

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

Back to the top