Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 320171 - [Model] Use real Java-References in the Binding-Model-Elements
Summary: [Model] Use real Java-References in the Binding-Model-Elements
Status: RESOLVED FIXED
Alias: None
Product: e4
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 0.9   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: 4.1 M6   Edit
Assignee: Paul Webster CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 324957 337558
  Show dependency tree
 
Reported: 2010-07-17 12:06 EDT by Thomas Schindl CLA
Modified: 2011-02-18 07:37 EST (History)
5 users (show)

See Also:


Attachments
Model changes (81.24 KB, text/plain)
2010-12-18 04:47 EST, Thomas Schindl CLA
no flags Details
Model changes (41.22 KB, patch)
2010-12-18 09:47 EST, Thomas Schindl CLA
no flags Details | Diff
model patch (41.61 KB, patch)
2011-01-29 09:30 EST, Thomas Schindl CLA
no flags Details | Diff
model patch and update v04 (92.52 KB, patch)
2011-02-15 08:43 EST, Paul Webster CLA
no flags Details | Diff
simple ide model patch (4.55 KB, patch)
2011-02-15 09:43 EST, Thomas Schindl CLA
no flags Details | Diff
make editor work (at least) (6.87 KB, patch)
2011-02-15 09:55 EST, Thomas Schindl CLA
no flags Details | Diff
Reconciler patch v1 (10.66 KB, patch)
2011-02-15 10:47 EST, Remy Suen CLA
no flags Details | Diff
Reconciler and tests patch v2 (17.62 KB, patch)
2011-02-15 12:19 EST, Remy Suen CLA
no flags Details | Diff
Role model and other patches v05 (134.31 KB, patch)
2011-02-15 13:01 EST, Paul Webster CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Schindl CLA 2010-07-17 12:06:37 EDT
Currently they BindingTable is referencing a BindingContext using an ID. To me it looks like BindingTable is a child of BindingContext and then doesn't need the ID-Reference any more
Comment 1 Thomas Schindl CLA 2010-12-18 04:47:42 EST
Created attachment 185473 [details]
Model changes

Paul, all those String referenceing in the binding system don't look correct. I think we once defined that we should use string references as less as possible.

I think this stem from the fact that we very long had no contribution story for this which has been changed already in 4.0

This model-patch does the following:
a) it makes the BindingTable a child of BindingContext
b) it remove the BindingTable from BindingTableContainer and renamed this one 
   BindingContextContainer
c) modified Bindings to hold a list of BindingContext instead of Strings
Comment 2 Thomas Schindl CLA 2010-12-18 09:47:28 EST
Created attachment 185477 [details]
Model changes

This is less radical - it only replaces the string references through real java references.
Comment 3 Paul Webster CLA 2010-12-18 11:20:34 EST
Changes like this will have to wait until the new year.

PW
Comment 4 Thomas Schindl CLA 2010-12-20 10:40:09 EST
Agreed - if you are ok with such a change I could prepare the e4xmi-editor to work with it.
Comment 5 Thomas Schindl CLA 2011-01-29 09:30:48 EST
Created attachment 187907 [details]
model patch
Comment 6 Paul Webster CLA 2011-02-15 08:43:42 EST
Created attachment 188991 [details]
model patch and update v04

This turns most gets into getContext().getElementId() and the sets into a search for a MBindingContext from the application.getRootContext() list.

Remy, can I get you to look at ModelReconcilerBindingTableTest.java, there are 4 errors there.

Description	Resource	Path	Location	Type
The method getBindingContextId() is undefined for the type MBindingTable	ModelReconcilerBindingTableTest.java	/org.eclipse.e4.ui.tests/src/org/eclipse/e4/ui/tests/reconciler	line 46	Java Problem

That leaves errors in the ...e4.tools.emf.ui and in simpleide.

PW
Comment 7 Thomas Schindl CLA 2011-02-15 09:43:12 EST
Created attachment 189002 [details]
simple ide model patch
Comment 8 Thomas Schindl CLA 2011-02-15 09:55:05 EST
Created attachment 189004 [details]
make editor work (at least)

This patch makes the editor at least useable for everything beside the new binding story - once we have a running workbench patch (applied) I'll update the editor code which is a bit more work than I can do just now
Comment 9 Remy Suen CLA 2011-02-15 10:47:28 EST
Created attachment 189010 [details]
Reconciler patch v1
Comment 10 Remy Suen CLA 2011-02-15 12:19:50 EST
Created attachment 189019 [details]
Reconciler and tests patch v2
Comment 11 Paul Webster CLA 2011-02-15 13:01:11 EST
Created attachment 189029 [details]
Role model and other patches v05

This patches roles in the other 3 + fixes the e4xmi for contacts and e4 photo demos.

PW
Comment 12 Paul Webster CLA 2011-02-15 13:03:32 EST
Released to HEAD
PW
Comment 13 Thomas Schindl CLA 2011-02-15 16:29:21 EST
I've fixed the ModelEditor to support this new element type. The only bundle still broken is "org.eclipse.e4.ui.workbench.renderers.swt.cocoa"
Comment 14 Brian de Alwis CLA 2011-02-16 18:56:12 EST
Committed fix for CocoaUIHandler
Comment 15 Brian de Alwis CLA 2011-02-16 19:01:22 EST
Oops, I should note that I patched BindingServiceImpl #activateBinding() and #deactivateBinding() to avoid an NPE when attempting to add a binding for a binding table that does not yet exist.  BindingServiceImpl should really create a new table and corresponding model objects, but that was beyond the scope of this fix :-)  Submitted as bug 337384.