Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse 4 » e4: Find a placeholder
e4: Find a placeholder [message #551984] Tue, 10 August 2010 12:12 Go to next message
Missing name Missing name is currently offline Missing name Missing nameFriend
Messages: 57
Registered: September 2009
Member
Hello,

I realise an e4 application divided in 2 parts:
- the main UI, configured whith an e4xmi file containing a placeholder in a Part Stack.
- a bundle with a view which must display a form in the placeholder.

(The main UI invoque the bundle using services.)

How can I find the declared placeholder in the bundle in order to place my view in the main UI? have you got a code exemple ?

Thanks.
Re: e4: Find a placeholder [message #551987 is a reply to message #551984] Tue, 10 August 2010 12:23 Go to previous messageGo to next message
Thomas Schindl is currently offline Thomas SchindlFriend
Messages: 6651
Registered: July 2009
Senior Member
Am 10.08.10 14:12, schrieb Valoueee:
> Hello,
>
> I realise an e4 application divided in 2 parts:
> - the main UI, configured whith an e4xmi file containing a placeholder
> in a Part Stack.

I'm not sure I understand about which placeholder you are talking
because the Placeholder-Element is a very special type so that we can
share UI-Subtrees. I don't think that's what you are after, right?

If you are NOT sharing Subtrees between different areas you DON'T need
placeholders but contribute an MPart to the parent-container.

The ID you need to contribute is found in the elementId of the parent.

In my RCP-Tutorial [1] I show how to contribute elements from other
bundles through the so called fragment.e4xmi.

Tom

[1] http://tomsondev.bestsolution.at/2010/07/28/eclipse-4-0-and- tutorial-on-writing-e4-rcp-application-released/
Re: e4: Find a placeholder [message #552208 is a reply to message #551987] Wed, 11 August 2010 09:28 Go to previous messageGo to next message
Missing name Missing name is currently offline Missing name Missing nameFriend
Messages: 57
Registered: September 2009
Member
Thank you very much. Your tutorial is very useful.

I need to share an area in order to edit some data depending node tree selected in the main GUI.

e.g: I have a tree with nodes representing cars and planes.
When I select a car, a form displays its specific features.
When I select a plane, another form displays its specific features too, but the form is different.

Your tutorial show how to open another indepedant view. How can I integrated my view in the main GUI ?
Re: e4: Find a placeholder [message #552214 is a reply to message #552208] Wed, 11 August 2010 09:54 Go to previous messageGo to next message
Thomas Schindl is currently offline Thomas SchindlFriend
Messages: 6651
Registered: July 2009
Senior Member
Well if the view should open dynamically you first have to define a
MPartDescriptor in your model and then you can use the EPartService to
show the view below any container (MPartStack,MPartSashContainer).

Tom

Am 11.08.10 11:28, schrieb Valoueee:
> Thank you very much. Your tutorial is very useful.
>
> I need to share an area in order to edit some data depending node tree
> selected in the main GUI.
>
> e.g: I have a tree with nodes representing cars and planes.
> When I select a car, a form displays its specific features.
> When I select a plane, another form displays its specific features too,
> but the form is different.
> Your tutorial show how to open another indepedant view. How can I
> integrated my view in the main GUI ?
Re: e4: Find a placeholder [message #552222 is a reply to message #552214] Wed, 11 August 2010 10:20 Go to previous message
Thomas Schindl is currently offline Thomas SchindlFriend
Messages: 6651
Registered: July 2009
Senior Member
The SimpleIDE-Demo in CVS holds an example of a MPartDescriptor in
/cvsroot/eclipse/e4/org.eclipse.e4.ui/examples/org.eclipse.e 4.demo.simpleide.iconview.

The important thing to define which container should be used when an
MPart-instance is to be shown, is to set the "category"-attribute to the
id of the container. Afterwards all you need to do is to call:

-------8<-------
EPartService s ....
s.showPart("element.id.of.the.descriptor",PartState.ACTIVATE);
-------8<-------

Am 11.08.10 11:54, schrieb Tom Schindl:
> Well if the view should open dynamically you first have to define a
> MPartDescriptor in your model and then you can use the EPartService to
> show the view below any container (MPartStack,MPartSashContainer).
>
> Tom
>
> Am 11.08.10 11:28, schrieb Valoueee:
>> Thank you very much. Your tutorial is very useful.
>>
>> I need to share an area in order to edit some data depending node tree
>> selected in the main GUI.
>>
>> e.g: I have a tree with nodes representing cars and planes.
>> When I select a car, a form displays its specific features.
>> When I select a plane, another form displays its specific features too,
>> but the form is different.
>> Your tutorial show how to open another indepedant view. How can I
>> integrated my view in the main GUI ?
>
Re: e4: Find a placeholder [message #580527 is a reply to message #551987] Wed, 11 August 2010 09:28 Go to previous message
Missing name Missing name is currently offline Missing name Missing nameFriend
Messages: 57
Registered: September 2009
Member
Thank you very much. Your tutorial is very useful.

I need to share an area in order to edit some data depending node tree selected in the main GUI.

e.g: I have a tree with nodes representing cars and planes.
When I select a car, a form displays its specific features.
When I select a plane, another form displays its specific features too, but the form is different.

Your tutorial show how to open another indepedant view. How can I integrated my view in the main GUI ?
Re: e4: Find a placeholder [message #580537 is a reply to message #580527] Wed, 11 August 2010 09:54 Go to previous message
Thomas Schindl is currently offline Thomas SchindlFriend
Messages: 6651
Registered: July 2009
Senior Member
Well if the view should open dynamically you first have to define a
MPartDescriptor in your model and then you can use the EPartService to
show the view below any container (MPartStack,MPartSashContainer).

Tom

Am 11.08.10 11:28, schrieb Valoueee:
> Thank you very much. Your tutorial is very useful.
>
> I need to share an area in order to edit some data depending node tree
> selected in the main GUI.
>
> e.g: I have a tree with nodes representing cars and planes.
> When I select a car, a form displays its specific features.
> When I select a plane, another form displays its specific features too,
> but the form is different.
> Your tutorial show how to open another indepedant view. How can I
> integrated my view in the main GUI ?
Re: e4: Find a placeholder [message #580556 is a reply to message #552214] Wed, 11 August 2010 10:20 Go to previous message
Thomas Schindl is currently offline Thomas SchindlFriend
Messages: 6651
Registered: July 2009
Senior Member
The SimpleIDE-Demo in CVS holds an example of a MPartDescriptor in
/cvsroot/eclipse/e4/org.eclipse.e4.ui/examples/org.eclipse.e 4.demo.simpleide.iconview.

The important thing to define which container should be used when an
MPart-instance is to be shown, is to set the "category"-attribute to the
id of the container. Afterwards all you need to do is to call:

-------8<-------
EPartService s ....
s.showPart("element.id.of.the.descriptor",PartState.ACTIVATE);
-------8<-------

Am 11.08.10 11:54, schrieb Tom Schindl:
> Well if the view should open dynamically you first have to define a
> MPartDescriptor in your model and then you can use the EPartService to
> show the view below any container (MPartStack,MPartSashContainer).
>
> Tom
>
> Am 11.08.10 11:28, schrieb Valoueee:
>> Thank you very much. Your tutorial is very useful.
>>
>> I need to share an area in order to edit some data depending node tree
>> selected in the main GUI.
>>
>> e.g: I have a tree with nodes representing cars and planes.
>> When I select a car, a form displays its specific features.
>> When I select a plane, another form displays its specific features too,
>> but the form is different.
>> Your tutorial show how to open another indepedant view. How can I
>> integrated my view in the main GUI ?
>
Previous Topic:MPart vs. MPartDescriptor
Next Topic:Where's the best place to start with e4?
Goto Forum:
  


Current Time: Thu Apr 18 22:53:25 GMT 2024

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

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

Back to the top