Eclipse RCP - Stacking a view with the editor area?
Is it possible, when developing an Eclipse RCP Application, to stack a view with the editor area? Like this?
I have multiple lists/tables and I want to 开发者_如何学JAVAcreate a kind of preview composite. When an Item on a list is selected by single mouse click, I want my preview composite to show the data of the item.
If the user double clicks an item, I want to open an editor in the stack behind the preview composite.
Is there anyway to achieve this?
Thanks.
No, there isn't. You could open a viewpart on the editor area but then, you will not be able to have editors and views as tabs
Well, I've read most stuff about placing a view over the editor area, and none worked. The Answer 1 above causes the plugin.xml to have warnings. In Eclipse Luna, this works however when your perspective is initialized:
public void createInitialLayout(IPageLayout layout) {
if ( layout instanceof org.eclipse.ui.internal.e4.compatibility.ModeledPageLayout ) {
org.eclipse.ui.internal.e4.compatibility.ModeledPageLayout layout4=(org.eclipse.ui.internal.e4.compatibility.ModeledPageLayout)layout;
layout4.stackView(ID+":*",layout.getEditorArea(),false);
}
...
The code above adds a view with "ID" that is a multiple view, added to the stack of editors hidden (last parameter is false="not visible").
It may also work with other Eclipse versions, but I haven't tried it.
Good luck!
精彩评论