简体   繁体   中英

Hidden Viewpart in Eclipse RCP with iFolderLayout

I am working on an Eclipse (3.X) RCP application. I am trying to implement a way to have a ViewPart display in a pre-defined placeholder (IFolderLayout). But here is the problem, whenever I initially launch the application the placeholder is displayed as a dark grayed out area in the application. I do not want that placeholder displayed when my application launches. I would only like the ViewPart to appear were the placeholder is when I call it. I have looked high and low for a way to do this. I know that since the IFolderLayout is not durable it closes when the ViewPart is closed. This is a desired effect, but I do not want the IFolderLayout to display when I launch the application. My code is being created in the overridden createInitialLayout(IPageLayout layout) method

To clarify: Imagine I have a view that takes up the entire screen. When I click on a button another ViewPart appears on the bottom half pushing the original view up to make room for the new ViewPart so they are both equally displayed. I do not want the IFolderLayout placeholder displayed when the application launches.

Here is my placeholder code:

IFolderLayout bottomHalf = layout.createFolder(args here);
bottomHalf.addPlaceHolder(BottomHalfView.ID);

Any help on the matter would be greatly appreciated!

Instead of calling layout.createFolder() , call layout.createPlaceholderFolder() , with the same arguments, but a different return type.

IPlaceholderFolderLayout bottomHalf = layout.createPlaceholderFolder( ... );
bottomHalf.addPlaceHolder(BottomHalfView.ID);

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM