Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » WindowBuilder » WB Databinding Tab - Information about the "code generation pattern"(I would like to know more about the code pattern WB uses to describe Databindings)
WB Databinding Tab - Information about the "code generation pattern" [message #735642] Wed, 12 October 2011 13:17 Go to next message
Daniel iCanHasLastName is currently offline Daniel iCanHasLastNameFriend
Messages: 6
Registered: May 2011
Junior Member
Hello everyone,

as stated in the $topic i would like to humbly ask for hints and advice concerning the "code generation pattern" that is used to generate/populate the entries shown in the "Bindings"-Tab in the graphical editor for a WorkbenchPart.

I would like to ask this, because i had defined roundabout 25 Bindings via the gui and after i manually changed something (i changed the data-object whose property is to be observed by an ObservableValue) there are only 6 of the 25 bindings displayed. Also the following raised my awareness:

Via searching google with google.com/search?hl=en&q=windowbuilder+databinding+%22code+generation+pattern%22 the first results all pointed out WB documentation pages which contained following phrase:

Quote:
Warning: do not edit the initDataBinding() method by hand (without carefully matching the code generation pattern used by the tool) as it will be regenerated in its entirety any time the tool needs to add, remove or update a data binding.


I would be very happy if someone could maybe point me to some helpful searchphrases or URLs or might be able to describe what pitfalls i have to watch out for when manually editing the generated code as i really would like to be able to carefully match the code generation pattern

Thank you in advance!
Daniel
Re: WB Databinding Tab - Information about the "code generation pattern" [message #735661 is a reply to message #735642] Wed, 12 October 2011 13:49 Go to previous messageGo to next message
Eric Clayberg is currently offline Eric ClaybergFriend
Messages: 979
Registered: July 2009
Location: Boston, MA
Senior Member
It would be helpful to see the code before and after you modified it.
Re: WB Databinding Tab - Information about the "code generation pattern" [message #735760 is a reply to message #735661] Wed, 12 October 2011 16:31 Go to previous messageGo to next message
Daniel iCanHasLastName is currently offline Daniel iCanHasLastNameFriend
Messages: 6
Registered: May 2011
Junior Member
A quick followup (and a thank you for your quick answer which showed me that my question is/was under surveillance!)

Through trying to supply you with example code before and after the incident i was able to find my fault, yay!

DB-Code that is not parseable:
IObservableValue xyObserveValue = PojoObservables.observeValue(dataContainerA.getPropertyB().getPropertyC(), "propertyCsProperty");


DB-Code that is indeed parseable:
IObservableValue xyObserveValue = PojoObservables.observeValue(dataContainerA.getPropertyB(), "propertyC.propertyCsProperty");


I can understand your remark concerning a code-example. Furthermore i absolutely do not want to sound picky about the following (hell, even already getting a reply which hints me at what to do to get more help is getting me happy enough)

As nice as fixing the current problem at hand might be (via displaying the code and getting comments on that) i am rather more interested in grasping the bigger picture.

Would you maybe be able to point me to, say, an URL which points me to the code which does the parsing of the initDatabindings()-Method? (smth like HTTP-SVN-Repo-Browsing?)

Thank you for your reply and as before ... Thank you in advance!
Daniel
Re: WB Databinding Tab - Information about the "code generation pattern" [message #736273 is a reply to message #735760] Thu, 13 October 2011 21:50 Go to previous message
Eric Clayberg is currently offline Eric ClaybergFriend
Messages: 979
Registered: July 2009
Location: Boston, MA
Senior Member
Did you try looking at the org.eclipse.wb.internal.rcp.databinding.parser.DatabindingParser class?

You could could also scan the source for "initDataBindings".
Previous Topic:What is the purpose of WindowBuilder XML Core feature?
Next Topic:Does WindowBuilder support AWT?
Goto Forum:
  


Current Time: Sat Apr 20 00:39:24 GMT 2024

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

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

Back to the top