Thomas Lieven
Thomas Lieven

Reputation: 371

Empty window space for Eclipse e4 RCP part extracted to fragment in separate plugin project

I have successfully built my first Eclipse 4 RCP application by extending the PartSashContainer of the demo content to also show a second Part.

Now I have tried to move the second part to a separate plugin package and import it as fragment. This works up to the point that the new application neither freezes nor throws any explicit exception. It also divides the space of the window into even parts and shows the main part. Unfortunately the part of the window which is supposed to show the content of the second part from the extracted fragment is completely empty. Default constructors for both parts are called. "@PostConstruct public void createComposite(Composite parent)" to be found in both parts however is only called for the main part and not for the second. I have set all parts to be visible and to be rendered without any difference. Due to the lack of errors and otherwise strange behavior I'm quite convinced to have set all required IDs in both *.e4xmi files.

Any ideas where there might be the difference between the incorporated and the extracted approach?

I uploaded both projects as zip file to link

Upvotes: 0

Views: 432

Answers (1)

christoph.keimel
christoph.keimel

Reputation: 1240

You might have run into this:

http://blog.vogella.com/2012/11/23/eclipse4-and-postconstruct-and-predestroy-not-called-javax-annotation/

To solve the issue, you need to add javax.annotation as a package dependency instead of plug-in dependency to the MANIFEST.MF of the plug-in containing the fragment.

Upvotes: 1

Related Questions