Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » Java Development Tools (JDT) » A question about perspective extension
A question about perspective extension [message #120718] Tue, 25 November 2003 09:04
Eclipse UserFriend
Originally posted by: xiaoyang.ma.hingesoftware.com

hi, there:

I am tring to create a new perspective in my plugin project but I
encountered a question. I have added the perspective definition into the
plugin.xml below:

<extension
point="org.eclipse.ui.perspectives">
<perspective
id="com.test.testPerspective"
name="VBRD"
class="com.test.TestPerspective">
</perspective>
</extension>

The class TestPerspective's code is here:

package com.test;

import org.eclipse.ui.IPageLayout;
import org.eclipse.ui.IPerspectiveFactory;
import org.eclipse.ui.IFolderLayout;
public class TestPerspective implements IPerspectiveFactory {

public static final String ID_REPORT_ORGANIZER_VIEW =
"com.viador.MovingBoxView";
public void createInitialLayout(IPageLayout layout) {
layout.setEditorAreaVisible(false);

System.out.println("TestPerspective");

String editorArea = layout.getEditorArea();
IFolderLayout topLeft = layout.createFolder("topLeft", IPageLayout.LEFT,
0.25f, editorArea);
topLeft.addView(IPageLayout.ID_RES_NAV);
topLeft.addPlaceholder(IPageLayout.ID_BOOKMARKS);
IFolderLayout bottomLeft =
layout.createFolder(
"bottomLeft",
IPageLayout.BOTTOM,
0.50f,
"topLeft");
bottomLeft.addView(IPageLayout.ID_OUTLINE);
bottomLeft.addView(IPageLayout.ID_PROP_SHEET);
layout.addView(ID_REPORT_ORGANIZER_VIEW, IPageLayout.BOTTOM, 0.66f,
editorArea);
}
}

I have not see the proper view was opened and in console no anything was
output although there is a calling for "System.out" in the
createInitialLayout() method. I think this method is not called as it is
expected. But the perspective is in the "window->open
perspective->others..." list.

What's wrong with my code?

Thanks so much!

Alex Ma
Previous Topic:More CVS wierdness in E3-M5
Next Topic:How to search the Java API Docs
Goto Forum:
  


Current Time: Sun Dec 22 06:16:26 GMT 2024

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

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

Back to the top