- Open your perspective.java file (If you don't have this file yet, you are in trouble!)
- in public void createInitialLayout(IPageLayout layout) you should have some code that looks similar to this:
layout.addStandaloneView(ItagTreeView.ID, true, IPageLayout.LEFT, 1.0f, editorArea);
layout.addStandaloneView(ChartView.ID, true, IPageLayout.RIGHT, 0.5f, ItagTreeView.ID);
layout.addStandaloneView(FormView.ID, true, IPageLayout.BOTTOM, 0.5f, ItagTreeView.ID);
// create a folder for multiple analysis views so that they will open up
// in tabs next to the table view.
IFolderLayout folder = layout.createFolder("Tables", IPageLayout.BOTTOM, 0.5f, ChartView.ID);
folder.addPlaceholder(AnalysisView.ID + ":*");
folder.addView(TableView.ID);
The above code has 4 views and the table view is it. Our AnalysisView is a 2nd tab under the TableView.
You can see instead of calling addStandaloneView we call createFolder. The "folder" is how we combine several views to make a tabbed view presentation.
Friday, August 17, 2007
Tabbed Views in Eclipse RCP
Tabbed Views in Eclipse RCP sounds really complicated but Eclipse has made this really easy. Just follow these simple instructions and you will be off and running with multiple tabbed views.
Subscribe to:
Post Comments (Atom)
3 comments:
Thanks! It solved my problem. Is there a way to do it by using plugin.xml?
I have never tried with plugin.xml but I am sure there is.
you can use the org.eclipse.ui.perspectiveExtensions extension to add views declaratively via the plugin.xml. Lars Vogel has a nice example of this here: http://www.vogella.de/articles/RichClientPlatform/article.html#views_perspective
Post a Comment