Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse 4 » MPart vs. MPartDescriptor
MPart vs. MPartDescriptor [message #552154] Wed, 11 August 2010 02:37 Go to next message
Heiko Barth is currently offline Heiko Barth
Messages: 6
Registered: July 2009
Junior Member
Can somebody explain me why there is an MPart and a MPartDescriptor interface? What is the idea behind these two interfaces? What is the technical distinction?
Re: MPart vs. MPartDescriptor [message #552159 is a reply to message #552154] Wed, 11 August 2010 02:52 Go to previous messageGo to next message
Thomas Schindl is currently offline Thomas Schindl
Messages: 5230
Registered: July 2009
Senior Member
Hi,

The difference between those is similar to the one between Class and
Object in Java. MPartDescription is the blueprint for MPart instances
who are the instances you add to your UI-Structure (e.g. as children of
an MPartStack).

If you look at the ShowView-Menu you see all registered MPartDescriptors
and clicking on one of those the system creates an MPart-instance from
them and places them into the UI-Structure.

You can also compare them to ViewDescriptor/EditorDescriptor in 3.x and
their real UI counterparts ViewPart and EditorPart.

Tom

Am 11.08.10 08:37, schrieb Heiko:
> Can somebody explain me why there is an MPart and a MPartDescriptor
> interface? What is the idea behind these two interfaces? What is the
> technical distinction?
Re: MPart vs. MPartDescriptor [message #552161 is a reply to message #552159] Wed, 11 August 2010 02:57 Go to previous messageGo to next message
Thomas Schindl is currently offline Thomas Schindl
Messages: 5230
Registered: July 2009
Senior Member
On a second thought maybe the Class-Object comparison is not a good one.
It is more of a Template => Instance relation.

MPartDescriptor is the template we use to create MPart-instance from, if
you look at the interfaces closely you'll notice that MPart-derives from
UIElement and MPartDescriptor only from ApplicationElement.

Tom

Am 11.08.10 08:52, schrieb Tom Schindl:
> Hi,
>
> The difference between those is similar to the one between Class and
> Object in Java. MPartDescription is the blueprint for MPart instances
> who are the instances you add to your UI-Structure (e.g. as children of
> an MPartStack).
>
> If you look at the ShowView-Menu you see all registered MPartDescriptors
> and clicking on one of those the system creates an MPart-instance from
> them and places them into the UI-Structure.
>
> You can also compare them to ViewDescriptor/EditorDescriptor in 3.x and
> their real UI counterparts ViewPart and EditorPart.
>
> Tom
>
> Am 11.08.10 08:37, schrieb Heiko:
>> Can somebody explain me why there is an MPart and a MPartDescriptor
>> interface? What is the idea behind these two interfaces? What is the
>> technical distinction?
>
Re: MPart vs. MPartDescriptor [message #552169 is a reply to message #552159] Wed, 11 August 2010 03:26 Go to previous message
Heiko Barth is currently offline Heiko Barth
Messages: 6
Registered: July 2009
Junior Member
Thank you for your quick answer. I´ll have to dive deeper into the model Smile
Re: MPart vs. MPartDescriptor [message #580498 is a reply to message #552159] Wed, 11 August 2010 02:57 Go to previous message
Thomas Schindl is currently offline Thomas Schindl
Messages: 5230
Registered: July 2009
Senior Member
On a second thought maybe the Class-Object comparison is not a good one.
It is more of a Template => Instance relation.

MPartDescriptor is the template we use to create MPart-instance from, if
you look at the interfaces closely you'll notice that MPart-derives from
UIElement and MPartDescriptor only from ApplicationElement.

Tom

Am 11.08.10 08:52, schrieb Tom Schindl:
> Hi,
>
> The difference between those is similar to the one between Class and
> Object in Java. MPartDescription is the blueprint for MPart instances
> who are the instances you add to your UI-Structure (e.g. as children of
> an MPartStack).
>
> If you look at the ShowView-Menu you see all registered MPartDescriptors
> and clicking on one of those the system creates an MPart-instance from
> them and places them into the UI-Structure.
>
> You can also compare them to ViewDescriptor/EditorDescriptor in 3.x and
> their real UI counterparts ViewPart and EditorPart.
>
> Tom
>
> Am 11.08.10 08:37, schrieb Heiko:
>> Can somebody explain me why there is an MPart and a MPartDescriptor
>> interface? What is the idea behind these two interfaces? What is the
>> technical distinction?
>
Re: MPart vs. MPartDescriptor [message #580511 is a reply to message #552159] Wed, 11 August 2010 03:26 Go to previous message
Heiko Barth is currently offline Heiko Barth
Messages: 6
Registered: July 2009
Junior Member
Thank you for your quick answer. I´ll have to dive deeper into the model :)
Previous Topic:MPart vs. MPartDescriptor
Next Topic:e4: Find a placeholder
Goto Forum:
  


Current Time: Wed Jul 23 20:20:32 EDT 2014

Powered by FUDForum. Page generated in 0.03037 seconds