createBrowser HELP! [message #667823] |
Mon, 02 May 2011 06:58  |
Eclipse User |
|
|
|
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 06:18  |
Eclipse User |
|
|
|
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
|
|
|
Powered by
FUDForum. Page generated in 1.51953 seconds