Help view not on initial perspective layout [message #474063] |
Sat, 14 June 2008 10:54  |
Eclipse User |
|
|
|
Hi,
I added the help view to the perspective of my RCP with following line:
IFolderLayout folder =
layout.createFolder("rightFolder", IPageLayout.RIGHT, 0.6f,
layout.getEditorArea());
folder.addView("org.eclipse.help.ui.HelpView");
But this does not work. Resetting the perspective doesn't show any help
view. Using the menu item of eclipse for "Dynamic Help" works fine, i.e.
shows the help view. My intention was to show the dynamic help as
default in the perspective. Any ideas to achieve that or why this
doesn't work?
Thanks in advance,
Steffen
|
|
|
|
|
Re: Help view not on initial perspective layout [message #474118 is a reply to message #474066] |
Fri, 27 June 2008 17:55  |
Eclipse User |
|
|
|
Steffen,
Sorry for the delay. Could you listen for a WorkbenchWindow CHANGE_RESET or
CHANGE_RESET_COMPLETE event?
IWorkbenchWindow window =
PlatformUI.getWorkbench().getActiveWorkbenchWindow();
window.addPerspectiveListener(new IPerspectiveListener() {
public void perspectiveActivated(IWorkbenchPage page,
IPerspectiveDescriptor perspective) {
System.out.println("perspectiveActivated: " +
page.toString() + " " + perspective.toString());
}
public void perspectiveChanged(IWorkbenchPage page,
IPerspectiveDescriptor perspective, String changeId) {
System.out.println("perspectiveChanged: " + page.toString()
+ " " + perspective.toString());
}
});
David
|
|
|
Re: Help view not on initial perspective layout [message #615255 is a reply to message #474063] |
Sun, 15 June 2008 19:14  |
Eclipse User |
|
|
|
Steffen,
What you did is correct in that it will position the
"org.eclipse.help.ui.HelpView". However, the perspective does not open a
view.
You mentioned that it is your RCP application so you will have an
implementation of WorkbenchAdvisor. Use it to open the
"org.eclipse.help.ui.HelpView" view in WorkbenchAdvisor#postStartup().
public void postStartup() {
try {
IWorkbenchPage page = PlatformUI.getWorkbench().
getActiveWorkbenchWindow().
getActivePage();
page.showView("org.eclipse.help.ui.HelpView");
} catch (PartInitException e1) {
e1.printStackTrace();
}
}
David Kyle
http://richclientplatform.blogspot.com/
|
|
|
Re: Help view not on initial perspective layout [message #615260 is a reply to message #474065] |
Mon, 16 June 2008 03:19  |
Eclipse User |
|
|
|
Hi,
thank you for your answer. I want the help view to be opened when
resetting the perspective (this implies that the view should also be
opened on first start up of my application). So, the code you posted
works, but opens the view every time the workbench is started. Any ideas?
Steffen
|
|
|
Re: Help view not on initial perspective layout [message #618937 is a reply to message #474066] |
Fri, 27 June 2008 17:55  |
Eclipse User |
|
|
|
Steffen,
Sorry for the delay. Could you listen for a WorkbenchWindow CHANGE_RESET or
CHANGE_RESET_COMPLETE event?
IWorkbenchWindow window =
PlatformUI.getWorkbench().getActiveWorkbenchWindow();
window.addPerspectiveListener(new IPerspectiveListener() {
public void perspectiveActivated(IWorkbenchPage page,
IPerspectiveDescriptor perspective) {
System.out.println("perspectiveActivated: " +
page.toString() + " " + perspective.toString());
}
public void perspectiveChanged(IWorkbenchPage page,
IPerspectiveDescriptor perspective, String changeId) {
System.out.println("perspectiveChanged: " + page.toString()
+ " " + perspective.toString());
}
});
David
|
|
|
Powered by
FUDForum. Page generated in 0.25547 seconds