|
From: Eric Le L. <ker...@us...> - 2014-09-28 21:07:36
|
Hello list, I've tried to use swt's native html component to provide a decent html component to display the javadocs. The problem is that there is one swt.jar per platform/cpu. So, is it acceptable to create a handful of plugins "swt-linux-x86.jar", "swt-linux-x64.jar", "swt-osx-x64.jar", "swt-win32-x86.jar", "swt-win32-x64.jar"? Then not two of them could be installed simultaneously, otherwise class names would collide. Also there should be a SWTPlugin.jar plugin to use as a dependency from other plugins. A NativeBrowser plugin has been created in 2010, that shipped one version of swt. It has not been released/worked on for quite some time. http://sourceforge.net/p/jedit/svn/HEAD/tree/plugins/NativeBrowser/trunk/ A solution to create a big multiplatform jar is discussed here http://stackoverflow.com/questions/2706222/create-cross-platform-java-swt-application/5784073#5784073 It modifies class loaders to load from jars inside a jar. Something more appropriate for jEdit can be done from a plugin, downloading to ~/.jedit/plugins/swtplugin.SWTPlugin/swt-xxx.jar the required jar for current platform and registering it as a PluginJar. I have started such a plugin at https://sourceforge.net/u/kerik-sf/swtplugin/ci/master/tree/ You currently have to download the appropriate swt.jar and only linux and OSX 64bit are supported (see the user doc for SWTPlugin) An example of a plugin using it is at https://sourceforge.net/u/kerik-sf/swtbrowserplugin/ci/master/tree/ It loads the SWT browser on startup. You'll have to use the activator plugin to start it or execute jEdit.getPlugin("swtbrowser.SWTBrowserPlugin",true) in beanshell. I've encountered other problems with the SWT browser widget so I'm not sure I'll push forward with it. Still the SWTPlugin may prove useful to someone else. What do you think? Cheers, Eric |