|
|
Re: links in a Browser widget [message #454471 is a reply to message #454467] |
Thu, 21 April 2005 15:41 |
Eugene Kuleshov Messages: 504 Registered: July 2009 |
Senior Member |
|
|
Hi Christophe,
Thanks for the answer. I'll try that.
It seems that using this approach it will not be possible to use
jar'ed plugin. On Windows IE-based widget will not understand urls like
jar:name but on Linux that should work since Mozilla support such urls.
I was thinking to use help server, so make all content awailable as
help and then somehow get an URL of the published help topic. That
should work for jared plugins, but I can't find a way how to resolve
help url from the help topic name. Do you have any idea if it is possible?
regards,
Eugene
Christophe Cornu wrote:
> Hi Eugene,
>
> You can have a look at the org.eclipse.swt.examples.browser.demos plugin.
> This is one way to do it.
>
> All resources need to be accessible through file:// or http://. As a result,
> this plugin contains different folders 'css1' 'css2' etc. that contain HTML
> content, cascading style sheets and image resources.
> HTML content is then loaded through code like:
> Browser.setUrl("PLUGIN_PATH/css2/welcome.html");
>
> where PLUGIN_PATH was initialized in the plugin class:
>
> public void start(BundleContext context) throws Exception {
> super.start(context);
> PLUGIN_PATH =
> Platform.resolve(plugin.getBundle().getEntry(".")).toString();
> }
>
> This demo plugin is part of the 'Example Plug-ins' section on the regular
> Eclipse SDK download page.
> The actual source code is at:
> http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.swt.exa mples.browser.demos/src/org/eclipse/swt/examples/browser/dem os/views/PawnTab.java?rev=HEAD&content-type=text/vnd.vie wcvs-markup
> (search for Browser.setUrl(URL_WELCOME) )
>
> The HTML content and resources pointed to by the HTML content (css,
> images...) are stored in folders under your plugin
> e.g.
> http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.swt.exa mples.browser.demos/css2/
>
> The plugin itself is not jar'ed. Its structure is like:
> org.eclipse.swt.examples.browser.demos/
> /css1/
> welcome.html, style.css etc.
>
> To run this plugin, install it into your eclipse, restart, Window > show
> view > SWT Examples > Browser Demo
> The welcome.html page is then displayed in the plugin's view.
>
> Chris
>
>
|
|
|
Powered by
FUDForum. Page generated in 0.03220 seconds