Skip to main content



      Home
Home » Eclipse Projects » Remote Application Platform (RAP) » Perspective & addPlaceholder
Perspective & addPlaceholder [message #842816] Thu, 12 April 2012 12:28
Eclipse UserFriend
Hi,
I've created a Perspective a I tried to set a placeholder in order to open the same view type in the same place.

public class Perspective implements IPerspectiveFactory {
	public void createInitialLayout(IPageLayout layout) {
		String editorArea = layout.getEditorArea();
		layout.setEditorAreaVisible(false);
		layout.setFixed(true);
		
		layout.addStandaloneView(HistoryView.ID, false, IPageLayout.TOP, 0.10f, editorArea);
		
		IFolderLayout bottomLeft = layout.createFolder("bottomLeft", IPageLayout.BOTTOM, 0.90f, editorArea); 

		bottomLeft.addPlaceholder(View.ID + ":id*");
		bottomLeft.addView(View.ID);
		bottomLeft.addView(XmlCodeView.ID);		
	}
}


When the plugin starts View opens correctly into the desired position.

When I try to open another View it is opened after XmlCodeView: the application works correctly, the only problem is the View position. This is the code which I use to open the view:

protected void view(XmlAutomaton automaton)
	{
                //... 
		
		IWorkbenchPage pg = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
		
		//get the reference for your viewId
		IViewReference ref = pg.findViewReference(View.ID);

		//release the view
		pg.hideView(ref);
		
		try {
			pg.showView(View.ID, "id1", IWorkbenchPage.VIEW_ACTIVATE);
		} catch (PartInitException e) {
			e.printStackTrace();
		}
	}


I will appreciate any suggestion.

Thanks a lot.
Previous Topic:Nebula formattedtext
Next Topic:oeju.UrlEncoded:maxFormKeys limit exceeded keys>1000
Goto Forum:
  


Current Time: Sat Jun 14 17:18:26 EDT 2025

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

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

Back to the top