Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    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 07:18 Go to next message
Tom K. is currently offline Tom K.Friend
Messages: 22
Registered: July 2009
Junior Member
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 13:01 Go to previous messageGo to next message
Brian de Alwis is currently offline Brian de AlwisFriend
Messages: 242
Registered: July 2009
Senior Member
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 14:23 Go to previous message
Paul Webster is currently offline Paul WebsterFriend
Messages: 6859
Registered: July 2009
Location: Ottawa
Senior Member

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: Wed Apr 24 22:16:40 GMT 2024

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

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

Back to the top