Greetings fellow Stackoverflownians,
Currently developing an Eclipse RCP app.
I'm trying to make a view appear in the right place when the perspective is reset.
In my plugin.xml:
<perspectiveExtension
targetID="the.perspective.id">
<view
id="the.first.view.id"
relationship="stack"
relative="org.eclipse.ui.navigator.ProjectExplorer"
visible="false">
</view>
<view
id="the.second.view.id"
relationship="left"
relative="org.eclipse.ui.navigator.ProjectExplorer"
visible="true">
</view>
</perspectiveExtension>
Where the first and second views are declared in the views extension point.
As per eclipse.org:
stack indicates that the view will be stacked with the relative view in a folder
The issue is that when I reset the perspective, I get the view in a separate place (more exactly, to the right) occupying ~50% of the workbench.
Should the ProjectExplorer view be declared once more in my plugin.xml, so that the stack
value of the relative
field would work?
EDIT: I've looked in another plugin project
<view
id="org.eclipse.search.ui.views.SearchView"
minimized="false"
relationship="stack"
relative="dreisoft.tresos.launcher2.api.views.ErrorLog"
visible="false">
</view>
This seems to work, and I've looked in the IPerspectiveFactory
, and the createInitialLayout
is empty. Despite that, this works.
Respectfully yours,
Vlad