Install the power editor plugin
By romain francois on Monday, January 5 2009, 15:58 - Permalink
Dependencies
biocep.jar
You need to have the workbench installed on your machine, meaning you need the biocep.jar file to be somewhere you know. Instructions on how to get it and install it can be found on the biocep page. Since the power editor follows the developpment of the workbench closely, I would recommend to build the biocep.jar from source, which can be done by retrieveing the biocep project from r-forge :$ svn checkout svn://svn.r-forge.r-project.org/svnroot/biocepFor this to work you need java (>= 1.5) and ant installed. This should create a file biocep.jar that you can copy wherever you like. On my linux machine, I usually put a copy at "/opt/biocep/biocep.jar"
$ cd biocep
$ ant distrib
java and ant
the plugin is written in java, so you need a JDK (at least 1.5) installed and also ant.R packages
The svTools package (from the sciviews) project contains most of the R side code needed by the plugin. At the time of writing, this package is not on CRAN, so you need to install it (and its dependencies) from r-forge:- svTools :
install.packages("svTools",repos="http://R-Forge.R-project.org")
- operators:
install.packages("operators",repos="http://R-Forge.R-project.org")
- svMisc:
install.packages("svMisc",repos="http://R-Forge.R-project.org")
Retrieve the project from r-forge
You can checkout the biocep-editor project from r-forge by :$ svn checkout svn://svn.r-forge.r-project.org/svnroot/biocep-editorOnce the project is retrieved, you need to edit the file build.properties.sample and rename it build.properties.
$ cd biocep-editor
The most important properties to edit are "biocep.dir" and "install.dir" :
- biocep.dir is the name of the directory where the biocep.jar file is located (/opt/biocep in my settings)
- install.dir is the name of the directory where the Editor plugin will be installed, it will be something like "C:\Documents and Settings\romain\RWorkbench\plugins" on windows and something like "/home/romain/RWorkbench/plugins/Editor" on linux
Two "modes" of installation
Dependent mode
The power editor plugin mainly consists of jedit (and jedit plugins) slightly patched so that it can be used as a view of the workbench instead of a main application. The plugin has been developped so that it can coexist with another installed copy of jedit and share the same set of plugins, this is the dependent mode of install because it depends on an installed copy of jedit. Note however that it will only work with versions of jedit greater or equal to 4.3pre16.The ant targets "installDependent" and "zipDependent" can be used to install or create a zip of the plugin. Since with this mode, we are going to depend on another installed version of jedit, we need to let the plugin know about this version, this is achieved by modifying the file "jedit.properties" with appropriate values of the two properties :
- jedit.home: this is the directory where jedit is installed. A "jedit.jar" file must live in this directory along with directories such as modes and jars. I usually install jedit in the directory "/opt/jedit" on my linux machines and under "C:\Program Files\jEdit" on my windows machines.
- jedit.settings: this is the settings directory of jedit, containing jedit plugins (in the jars directory), user mode files (in the modes) directory, ... on my linux machines, it usually is "/home/romain/.jedit" and on my windows machines "C:\Documents and Settings\romain\.jedit"
$ ant installDependent
Standalone mode
However, you do not need to have jedit installed for the plugin to work at all, if you do not have jedit installed otherwise, you will use the standalone mode of installation of the plugin. In this mode, you do not need to edit the jedit.properties file since a dummy one will be generated by ant, simply build the plugin using the "installStandalone" target:ant installStandalone
Comments
Hi, I had a go following your instructions to install poweredit on Mac OS X (10.5.6).
The command $ ant distrib gives a build faliure:
/Applications/biocep/biocep/build.xml:1838: Error while expanding /Applications/biocep/biocep/${env.JAVA_HOME}/lib/tools.jar
Searching the net for the cause of this, I came across a page on apple.com (http://developer.apple.com/document...) which states that
"tools.jar does not exist. Classes usually located here are instead included in classes.jar. Scripts that rely on the existence of tools.jar need to be rewritten accordingly."
Is there a possible quick workaround available?
Thanks.
Hi Rahul,
I am not really familiar with the Mac systems. It looks like you need to define the JAVA_HOME environment variable, it looks like ant did not find it. You can download the built biocep.jar from the biocep website: http://biocep-distrib.r-forge.r-pro...
Then to install the editor plugin, don't follow instructions on this page, which is out of date. You can simply use the "Plugins" > "Install from Plugin URL" and point to this link http://addictedtor.free.fr/software...
Romain
Many thanks for your quick reply.
The installation process went well. But upon launching Power Editor, jEdit attempts to open but throws an exception:
java.lang.UnsupportedClassVersionError: Bad version number in .class file
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:675)
at java.lang.ClassLoader.defineClass(ClassLoader.java:520)
... further frames omitted.
I suspect this is because you compiled the .jar on Java 1.6. Can you please confirm this?
While I have the same installed on my Mac, it only supports 64bit apps and jEdit can't seem to run on that. So I am forced to use J2SE 5.0.
If we eventually figure this out, I'd happily add a "how-to install on a mac" on my blog
Sorry, me again
I investigated further. We now have two situations.
Situation I.
- Mac OS uses the default (or preferred) Java 1.5.
- jEdit runs independently
- biocep.jar runs and creates a server on my machine
- on selecting poweredit, the stack in the above msg. is thrown.
Situation II.
- Force Mac to use Java 6.
- jEdit won't run anymore by itself.
- biocep.jar runs, but cannot seem to create a R server on my machine (the progress bar becomes stationary at 0)
- I can launch poweredit (*hurrah)
- Yet another exception:
java.lang.NullPointerException
at javax.swing.DefaultComboBoxModel.<init>(DefaultComboBoxModel.java:53)
at javax.swing.JComboBox.<init>(JComboBox.java:177)
at com.addictedtor.workbench.plugin.editor.jedit.powereditor.objects.ObjectsExplorer.<init>(Unknown Source)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
at org.gjt.sp.jedit.bsh.Reflect.constructObject(Reflect.java:620)
- Any attempt to run a R command results in the msg. "No R available".
Thanks!