3

For a product we are creating, we want to be able to have the welcome screen display in a perspective (which we are calling "Start Here"). The intro is the only thing that needs to be in that perspective, however, when I try to add our intro view to the perspective, it says that the view already exists in the layout.

I have tried programmatically closing the intro, messing around with standby mode etc but I cant get it working.

The intro is an XHTML one and we use internal Eclipse "action links" (e.g. http://org.eclipse...?runAction etc) extensively (hence the reason that we need to use the intro framework.

Does anyone have any ideas as to how I could get it added to a perspective, or at the very least get the intro fully maximised when you select a specific perspective (using the "showIntro" method results in it displaying oddly, bunched to one side).

Thanks!

BJ Myers
  • 6,617
  • 6
  • 34
  • 50
Chris
  • 31
  • 2

2 Answers2

1

Intro view is a sticky view, so its placeholder is created by default to every perspective, to the right of editor area. There's no public API to remove a placeholder once it is created and when you try to create one you get the error that it already exists.

You can maximize Intro view like this:

IWorkbenchPage page =
    PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
page.setPartState(page.findViewReference("org.eclipse.ui.internal.introview"),
    IWorkbenchPage.STATE_MAXIMIZED);

This should probably be done in IPerspectiveListener.perspectiveChanged() rather than in perspective factory.

Martti Käärik
  • 3,601
  • 18
  • 28
0

Instead of adding the view to the perspective, call IIntroManager.showIntro() or WorkbenchWindowAdvisor.openIntro()

Prakash G. R.
  • 4,746
  • 1
  • 24
  • 35