|
Re: Programmatically show a part [message #938916 is a reply to message #938908] |
Wed, 10 October 2012 09:17 |
Eclipse User |
|
|
|
EPS#createPart takes an ID which is the ID of a MPartDescriptor in the model and produces an MPart out of it. If you want to create an MPart out of the blue use something like
MPart part = MBasicFactory.INSTANCE.createPart();
part.setLabel("New Part");
part.setContributionURI("bla:/bla/bla");
and add it to the MPartStack's children. Then use the show/hide methods in the EPS.
EPS - EPartService
|
|
|
|
Re: Programmatically show a part [message #941228 is a reply to message #938928] |
Fri, 12 October 2012 10:14 |
Eclipse User |
|
|
|
The createPart method does not set a parent to the part. It just copys descriptor data to the part data. You have the responsibility of adding it to the children of a container (be it Window, Part stack etc.).
I'm not sure I understand what you are trying to do. If you define the part in the model (trimmed window -bla-bla-bla) then it makes no sense creating it out of a part descriptor. The descriptor is used to create parts out of a certain "template" then take this part where it is needed. You inject it as @Named(PART_ID) but you supply it as a descriptor ID.
|
|
|
|
Powered by
FUDForum. Page generated in 0.02114 seconds