Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » put a view at the editor area of a perpective by default(I want to put my viewpart at the editor area by default. and I don't know how to code it in perspective class.)
put a view at the editor area of a perpective by default [message #1833574] Mon, 19 October 2020 05:56
YUE ZHANG is currently offline YUE ZHANGFriend
Messages: 1
Registered: October 2020
Junior Member
1.When i create a view.just like below code
public class SampleView extends ViewPart {
        ...
        ...
}

2.I also create a perspective factory for my self
public class SamplePerspective implements IPerspectiveFactory {
    ...
}

3.I want that my SamplePerspective will show my SampleView by default, and my SampleView will be shown at the editor area.

It can only be relative to the top, bottom, left and right positions of the edtiors area, and can not be relative to the stack, by coding at SamplePerspective.java.
private static void addViews(final IPageLayout layout) {
        String editorArea = layout.getEditorArea();        // bottom
        IFolderLayout bottomLeft = layout.createFolder("bottomLeft", IPageLayout.BOTTOM, 0.6f, editorArea);
        ...
        ...
        bottomRight.addView(UIConstants.SAMPLEVIEW);
    }


So my question is, how can I put my view in the editor area by coding or some other way?
Previous Topic:eclipse rcp dopins for automation not showing any errors and not execting.
Next Topic:Mouse wheel event handler cannot be be handled running RCP app on non-development platform
Goto Forum:
  


Current Time: Mon Sep 27 02:16:08 GMT 2021

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

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

Back to the top