Hello all,
I'm currently working on a jEdit plugin named ScalaSidekick. Currently
it's a port of the Ensime application (only has a subset of the
features). However on the long term the plan is that it should be a
complete development environment for Scala developers, and that means
also for Lift development. Currenly it does only support sbt projects,
but hey who needs anything else:)
Besides that it is also possible to use sbt in the integrated console,
and a simple Scala REPL (currently without jars from the project in
classpath).
A showcase of some of the features can be seen in this screencast.
http://www.screencast.com/users/Adagioklez/folders/Jing/media/c46075bf-3486-4680-a8d3-402cc7ad8fcd
(I'm sorry for the mic)
Below follows a guide in how to set it all up:
Download jEdit 4.3.2 or newer and install it.
The plugin depend on the following plugins, make sure you have these
before install ScalaSidekick, my registered dependencies isn’t perfect
yet:)
Console: 4.4.2 or higher
ErrorList: 1.9 or higher
Project Viewer: 3.0.1 or higher
Process Shell : 1.0 or higher
Setup Scala mode in jEdit
The Scala mode I’m using is taken from the Scala distribution, but I
guess others could be used as well.
From the scala dist directory you find it under /misc/scala-tool-
support/jedit
Here there will be a directory named mode, inside is a readme on how
to install it in jEdit.
Download the following file:
https://github.com/downloads/StefanE/ScalaSidekick/ScalaSidekick-0.01.rar
This file contains five jars which all should be extracted to the
jEdit jars folder.
SBT and Error on compile
The plugin already supports error highligtning through ensime, however
if you just want to use sbt in the console this is the error settings
I use for my Error highligtning :
Plugins -> Plugin Options -> Console -> Error Patterns:
Name: Scala
Error Regexp: \[error\](\s)(\w):([\\|\w|.]*):(\d*):(\s)([\w*|(\s)|
\W]*)
Warning Regexp: \[warn\](\s)(\w):([\\|\w|.]*):(\d*):(\s)([\w*|(\s)|
\W]*)
Extra lines regexp:
Filename: $3
Linenumber: $4
Error message: $6
Three important notices:
1. Buffers should not use windows newlines “\r\n”, I’m using it with
unix “\n”, otherwise you will get some strange results when using
interactive features.
2. If you want to use SBT in console, I needed to (in windows) give
the following argument in the sbt script:
-Djline.WindowsTerminal.directConsole=false
That means that my bat is as follows:
set SCRIPT_DIR=%~dp0
java -Xmx512M -XX:MaxPermSize=512m -
Djline.WindowsTerminal.directConsole=false -jar "%SCRIPT_DIR%sbt-
launch-0.7.4.jar" %*
3. When setting up the error patterns remember to push test/commit
before pressing apply and ok, for some stupid reason it won’t save it
unless you do that first. Also sometimes it will report a dummy error
in the beginning, I’m not sure which of the other error patterns who
are creating it, but it removed all mine, and now its gone.
Feedback would be very much appreciated.
Regards Stefan Ettrup (twitter:Adagioklez)