[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.platform.rcp] StickyView -how to initialize as visible from start up?

I want someone to install and start my application and have a certain view always be up (and present), right from the very beginning. The StickyView seems to be the thing to use. However:

Starting off, I have two views defined in my plugin.xml and coded in TestView1.java and TestView2.java..... I can bring them up no problem when the application is first initialized by using this code in the perspective used:

public void createInitialLayout(IPageLayout layout) {
  String editorArea = layout.getEditorArea();
  layout.addView(TestView1.ID_VIEW, IPageLayout.LEFT, 0.25f, editorArea);
  layout.addView(TestView2.ID_VIEW, IPageLayout.RIGHT, 0.25f, editorArea);
.
.
}

But when I then designate TestView2 to be a sticky view in the plugin.xml:

<extension point="org.eclipse.ui.views">
  <view name="TestView1" class="my.code.TestView1" id="TestView1"></view>
  <view name="TestView2" class="my.code.TestView2" id="TestView2"></view>
  <stickyView location="RIGHT" id="TestView2"/>
</extension>

The TestView2 will not be visible in the workbench and I get the following error: "Part already exists in page layout: TestView2." (This appears to be identical to the issue posted by Arne Anka on 22nd September: http://dev.eclipse.org/newslists/news.eclipse.platform.rcp/msg07280.html)

Has anyone got a solution for this? Am I approaching this from the right way?

Thanks