Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [e4-dev] e4 Model Questions and comments

It's understandable how we ended up in the current state, but I agree with Tom's comments that we don't have the right shape for this yet. PartDescriptor should not be derived from Part. It needs many of the same attributes and references, but not all.

Any takers for changing the model to the better?

Boris

Inactive hide details for Paul Webster ---03/05/2010 08:08:19 AM---Hi Tom, On Thu, Mar 4, 2010 at 5:23 PM, Tom Schindl <tom.schPaul Webster ---03/05/2010 08:08:19 AM---Hi Tom, On Thu, Mar 4, 2010 at 5:23 PM, Tom Schindl <tom.schindl@xxxxxxxxxxxxxxx> wrote:


From:

Paul Webster <pwebster@xxxxxxxxxxxxxxxxxxx>

To:

E4 Project developer mailing list <e4-dev@xxxxxxxxxxx>

Date:

03/05/2010 08:08 AM

Subject:

Re: [e4-dev] e4 Model Questions and comments

Sent by:

e4-dev-bounces@xxxxxxxxxxx




Hi Tom,

On Thu, Mar 4, 2010 at 5:23 PM, Tom Schindl <tom.schindl@xxxxxxxxxxxxxxx> wrote:
> If I get this right the descriptor is something one uses to contribute a
> Part-Description to through ModelComponent and Part the thing that
> should end up as part of our UI-Workbench-Model.

PartDescriptors serve one purpose -> they  are templates for creating
Parts.  PartDescriptor->Part is the equivalent of
ViewDescriptor->ViewPart in the 3.x world.  PartDescriptors are stored
in a part of the model that's not rendered.  They need to contain
everything necessary to generate the Part so it can be rendered (which
is pretty well every field).

Right now we take the shortcut of simply cloning the PartDescriptor
(which is a Part) so that it can be rendered, but that's simply our
current implementation, not a requirement.

>
> This (IMHO) incorrect extending of Part is also the problem we are
> seeing in ModelComponent which has the following attributes:
>
> PartDescriptorContainer {
>   descriptor: List<PartDescriptor>
> }
>
> ModelComponent extends PartDescriptorContainer {
>   children: List<UIElement>
> }
>
> So because PartDescriptor is a Part I can also contribute it through the
> children-Attribute though this probably not I wanted to do.

Probably not, as it will be rendered :-)

ModelComponent also serves a purpose.  It's supposed to be a loadable
fragment of the model, that we can then apply to the real model (kind
of an extension point for models).

Really what we are trying to do with ModelComponent is to add to the
model instance by merging model fragments into it.  If there's already
a well known EMF way to do this, it would be good to know :-)  I
recently ran into a problem where the model has commands defined, but
I can't use the model fragment to add a menu item because it cannot
resolve the reference to its command ... since that's in the already
loaded model instance.

Later,
PW

--
Paul Webster
Hi floor.  Make me a sammich! - GIR
_______________________________________________
e4-dev mailing list
e4-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/e4-dev


GIF image

GIF image


Back to the top