[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [eclipse-incubator-e4-dev] Initial discussion on the 'modelled' workbench UI
|
[...]
I'm going back to bed, I'm under the weather today. Tom, let me know if
there's anything I can do...Monday...
I have plenty of them but I think they are better discussed on IRC ;-)
One thing I'm not sure is if this is a bug or I don't understand your
model correctly but take this code:
--------8<--------
1 // Client Area
2 ModelElement clientArea = new ModelElement(GuiModel.FID_CLIENT,
"Client Area"); //$NON-NLS-1$
3 wbwModel.setProperty(WBW_CLIENT_AREA, clientArea);
4 clientArea.setProperty(ModelElement.ME_PARENT, wbwModel);
5 wbwModel.addElement(ModelElement.ME_CONTENTS, clientArea);
--------8<--------
Why do you restore the clientArea-instance as an attribute in your model
and as ME_CONTENTS? In fact code line 4 is senseless if your current
code is correct because ModelElement#addElement() by definition updates
the parent :-)
Another thing I'm not happy with are that I need to take care myself
that the parent-child relationship is up-to-date all the times myself.
This is going to be a steady point of failure where one forgets to
update one side and are left with a non bidirectional model although in
theory it should be one :-(
I'm talking about code like this:
--------8<--------
wbwModel.setProperty(WBW_TOP_TRIM, topTrim);
topTrim.setProperty(ModelElement.ME_PARENT, wbwModel);
--------8<--------
Couldn't you simply check inside setProperty() if the given value is a
ModelElement and update the parent automatically?
Another problem I am facing with this admitedly small model is to
extract which property has meaning for which "ModelElement-Type". Which
properties does Perspective-ModelElement support, which of them is a
String, Integer, ModelElement, ... .
Hope you feel better on Monday or did played Pool to long last night :-)
Tom
--
B e s t S o l u t i o n . a t EDV Systemhaus GmbH
------------------------------------------------------------------------
tom schindl leiter softwareentwicklung/CSO
------------------------------------------------------------------------
eduard-bodem-gasse 8/3 A-6020 innsbruck phone ++43 512 935834