[RCP] Laying out a view in the plugin [message #467303] |
Wed, 02 May 2007 11:38  |
Eclipse User |
|
|
|
Originally posted by: emmanuel.blonvia.vidal.fr
Hi there,
I've developped an eclipse RCP client software. In that main RCP software, I
used an IPerspectiveFactory.createInitialLayout(IPageLayout) to layout all
my views. But now, I'm developping an other (secundary) plugin for my main
RCP software I mentioned above and I want to add some other views via that
plugin.
I don't know how to layout my views. For the moment the only thing I can do
is:
IWorkbenchPage page =
PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActi vePage();
IViewPart viewPart = page.showView("viewid",
"viewId2",IWorkbenchPage.VIEW_ACTIVATE);
But that code always put my view at the same place. How can I master the way
my secundary plugin lays out its views ?
Thanks for your help.
Emmanuel
|
|
|
Re: [RCP] Laying out a view in the plugin [message #467335 is a reply to message #467303] |
Thu, 03 May 2007 05:33   |
Eclipse User |
|
|
|
Hi Emmanuel,
I am going from the fact that you created a rcp. Under the Perspective-Class, from the snippet below,
************************
public void createInitialLayout(IPageLayout layout) {
layout.setEditorAreaVisible(false);
layout.addView(View1.ID, IPageLayout.LEFT, 0.50f, layout.getEditorArea());
layout.addView(BelowView1.ID,IPageLayout.BOTTOM, 0.40f, View1.ID);
layout.addView(RightToView1.ID, IPageLayout.RIGHT, 0.25f, layout.getEditorArea());
layout.addView(BelowRithtToView1.ID,IPageLayout.BOTTOM, 0.60f, RightToView1.ID);
}
**************************
I believe your problem will be solved.
Best Regards,
Enique
|
|
|
|
|
Re: [RCP] Laying out a view in the plugin [message #467447 is a reply to message #467397] |
Thu, 03 May 2007 19:36  |
Eclipse User |
|
|
|
Hi Emmanuel,
In order to be able to access classes in a plugin from another plugin, under the runtime-tab of the plugin-xml, you could specify which packages could be accessed. And on the calling plugin-xml, you could specify under the dependencies-tab the plugin-name of your plugin having your views.
Hope I could help.
Enrique
|
|
|
Powered by
FUDForum. Page generated in 0.03980 seconds