Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Platform - User Assistance (UA) » Help view not on initial perspective layout
Help view not on initial perspective layout [message #474063] Sat, 14 June 2008 14:54 Go to next message
Steffen is currently offline SteffenFriend
Messages: 14
Registered: July 2009
Junior Member
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 #474065 is a reply to message #474063] Sun, 15 June 2008 23:14 Go to previous messageGo to next message
David Kyle is currently offline David KyleFriend
Messages: 125
Registered: July 2009
Senior Member
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 #474066 is a reply to message #474065] Mon, 16 June 2008 07:19 Go to previous messageGo to next message
Steffen is currently offline SteffenFriend
Messages: 14
Registered: July 2009
Junior Member
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 #474118 is a reply to message #474066] Fri, 27 June 2008 21:55 Go to previous message
David Kyle is currently offline David KyleFriend
Messages: 125
Registered: July 2009
Senior Member
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 23:14 Go to previous message
David Kyle is currently offline David KyleFriend
Messages: 125
Registered: July 2009
Senior Member
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 07:19 Go to previous message
Steffen is currently offline SteffenFriend
Messages: 14
Registered: July 2009
Junior Member
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 21:55 Go to previous message
David Kyle is currently offline David KyleFriend
Messages: 125
Registered: July 2009
Senior Member
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
Previous Topic:What's the right format for "link" path if toc file is in another plug-in?
Next Topic:Recommended Work Flow for Cheat Sheet Development
Goto Forum:
  


Current Time: Fri Apr 19 21:37:51 GMT 2024

Powered by FUDForum. Page generated in 0.03699 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top