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.

Perception
  • 79,279
  • 19
  • 185
  • 195
Patrick
  • 585
  • 8
  • 22
  • 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]: http://stackoverflow.com/questions/22921306/custom-eclipse-perspective-with-initially-invisble-view-stacked-to-editor-area – Christopher Mindus Feb 03 '15 at 09:36

2 Answers2

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

buciu
  • 101
  • 4
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!