Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » createBrowser HELP!
createBrowser HELP! [message #667823] Mon, 02 May 2011 10:58 Go to next message
Iago Seara is currently offline Iago SearaFriend
Messages: 2
Registered: May 2011
Junior Member
I'm working from RCP Browser example, I added to this example a favorite section which reads a xml values ​​and show on a links layout obtained in the XML. When I perform the action of double click on a link correctly retrieve the requested URL. Then my intention is to open within the RCP application selected link. For this I use:

							try {
								platformUrl = new URL(contenido);
								URL fileUrl = FileLocator.toFileURL(platformUrl);
								IWorkbenchBrowserSupport bs = PlatformUI.getWorkbench().getBrowserSupport();
								IWebBrowser b = bs.createBrowser("report");
								b.openURL(fileUrl);
								
							} catch (IOException e) {
								e.printStackTrace();
								
							} catch (PartInitException e) {
								e.printStackTrace();
								
							}



Being "contenido" the variable with the url. But whenever I run the action, the browser opens to the outside. As I can do to activate the internal browser in the Browser?

Thanks
Re: createBrowser HELP! [message #668584 is a reply to message #667823] Fri, 06 May 2011 10:18 Go to previous message
Dani Megert is currently offline Dani MegertFriend
Messages: 3801
Registered: July 2009
Senior Member
On 02.05.2011 12:58, Iago Seara wrote:
> I'm working from RCP Browser example, I added to this example a
> favorite section which reads a xml values ​​and show on a links layout
> obtained in the XML. When I perform the action of double click on a
> link correctly retrieve the requested URL. Then my intention is to
> open within the RCP application selected link. For this I use:
>
>
> try {
> platformUrl = new URL(contenido);
> URL fileUrl =
> FileLocator.toFileURL(platformUrl);
> IWorkbenchBrowserSupport bs =
> PlatformUI.getWorkbench().getBrowserSupport();
> IWebBrowser b =
> bs.createBrowser("report");
> b.openURL(fileUrl);
>
> } catch (IOException e) {
> e.printStackTrace();
>
> } catch (PartInitException e) {
> e.printStackTrace();
>
> }
>
>
>
> Being "contenido" the variable with the url. But whenever I run the
> action, the browser opens to the outside. As I can do to activate the
> internal browser in the Browser?
Try

org.eclipse.ui.browser.IWorkbenchBrowserSupport.createBrowse r(org.eclipse.ui.browser.IWorkbenchBrowserSupport.AS_VIEW,
String, String, String)

Dani
>
> Thanks
Previous Topic:Finding a view from another perspective
Next Topic:Pause/Resume on Progress View ?
Goto Forum:
  


Current Time: Mon Nov 24 21:35:44 GMT 2014

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

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