e4: Find a placeholder [message #551984] |
Tue, 10 August 2010 08:12  |
Eclipse User |
|
|
|
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 #552222 is a reply to message #552214] |
Wed, 11 August 2010 06:20  |
Eclipse User |
|
|
|
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 05:28  |
Eclipse User |
|
|
|
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 05:54  |
Eclipse User |
|
|
|
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 06:20  |
Eclipse User |
|
|
|
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 ?
>
|
|
|
Powered by
FUDForum. Page generated in 0.09562 seconds