Eclipse RCP - Stacking a view with the editor area?
Asked Answered
Y

2

2

Is it possible, when developing an Eclipse RCP Application, to stack a view with the editor area? Like this?

Stack View Sample Illustration

I have multiple lists/tables and I want to create 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.

Yaroslavl answered 3/5, 2010 at 14:14 Comment(1)
Yes you can, and I just found out how. See the page [custom-eclipse-perspective-with-initially-invisble-view-stacked-to-editor-area][1]. [1]: #22921806Wonacott
R
2

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

Rutan answered 21/6, 2010 at 14:44 Comment(0)
W
1

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!

Wonacott answered 3/2, 2015 at 9:38 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.