Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » Hyperlinks to open a view
Hyperlinks to open a view [message #448217] Wed, 19 April 2006 10:35 Go to next message
Eclipse UserFriend
Originally posted by: shruthi.cn.in.bosch.com

Hello everybody,

I want to have hyperlinks in my application.
When i click on a particular link say "Open MyView" link, i want to open a
particular view.

How to do this.

Thank you very much
Best Regards
Shruthi
Re: Hyperlinks to open a view [message #448355 is a reply to message #448217] Fri, 21 April 2006 18:20 Go to previous message
Eclipse UserFriend
Originally posted by: sagrawal.lehman.com

IWorkbench workbench = PlatformUI.getWorkbench();
IWorkbenchWindow window = workbench.getActiveWorkbenchWindow();
// get prespective id from hyperlink
String perspectiveId = hyperlink.getPerspectiveId();
if (perspectiveId != null) {
try {
IWorkbenchPage page = workbench.showPerspective(
perspectiveId,
window);
} catch (WorkbenchException ex) {
}
}
String viewId = hyperlink.getViewId();
if (viewId != null) {
try {
PlatformUI.getWorkbench().getActiveWorkbenchWindow()
.getActivePage().showView(viewId);
} catch (PartInitException ex) {
}
}
Previous Topic:Problem in exporting the eclipse application.
Next Topic:How to open an editor in createInitialLayout
Goto Forum:
  


Current Time: Mon Dec 09 17:07:00 GMT 2024

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

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

Back to the top