Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse 4 » Can not create a Mpart(Can not create a Mpart)
Can not create a Mpart [message #1702562] Thu, 23 July 2015 09:10 Go to next message
rakesh kanchalwar is currently offline rakesh kanchalwarFriend
Messages: 7
Registered: July 2015
Junior Member
Hi,
I am trying to create a part with below code,
MPart mPart = epartService.createPart("org.eclipse.ui.navigator.ProjectExplorer");

But I am getting null as a response.

Further debugging I found out that it is created based on the MPartDescriptors. But in my case MApplication returns null for MPartDescritpors.

Do I need to initialize something?

Re: Can not create a Mpart [message #1702616 is a reply to message #1702562] Thu, 23 July 2015 14:17 Go to previous messageGo to next message
rakesh kanchalwar is currently offline rakesh kanchalwarFriend
Messages: 7
Registered: July 2015
Junior Member
Hi,
I found the solutions for the above problem, I have to add the Part Description in Application Model. Now I can get the Part created.
But when I add it to stack it is rendering only the top part of the stack and not the content.
Is there any programmatic way to add it otherwise.
Re: Can not create a Mpart [message #1702738 is a reply to message #1702616] Fri, 24 July 2015 12:03 Go to previous message
Loic Faure is currently offline Loic FaureFriend
Messages: 24
Registered: December 2014
Junior Member
If it doesnt create it, there is two possibilities :
- You have an error during the creation of the content, see the console view for this.
- You don't have this method in the class under your MPart : @Postconstruct public createContent(Composite parent) ...
Previous Topic:How to use live editor to debug Eclipse IDE
Next Topic:eclipse rcp application bundle work on cross platform
Goto Forum:
  


Current Time: Mon Sep 25 02:48:08 GMT 2017

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

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