Before starting to work with JSC you might want to check
the integrated help from Eclipse. A lot of these topics are also true
Some Eclipse topics/features you might want to have a
Starting JSC and configuration
After starting Eclipse choose 'Window/Open
Perspective/other...' from the menu and select the SuperCollider
perspective. When JSC gets started the first time the configuration
wizard is opened. You need to set the SuperCollider3 directory on the
first page of the wizard. On the second page you need to set the
support directories for SuperCollider to directories of your choice.
You can choose to create these directories as projects in your
workspace but this feature is not yet tested and you might run into
JSC makes changes to your SuperCollider system
directory. When a project gets compiled the source folders of that
project get copied into the system extensions directory into a
sub-folder called JSCExtensions. You should not make any changes to
this folder while working with JSC. After a project was compiled JSC
will automatically keep track of changes in the project source folders.
To create a new JSC project in the workspace you can
JSC Project Wizard. Choose 'File/New/Other...'
from the menu and then select 'SuperCollider/Project'. You can
optionally add a 'src' folder to the project. This folder will get
compiled with the SCClassLibrary once you compile the project. You can
add additional source folders in the project settings - right click on
the project and select 'Properties/SC Paths and Files'. Here you can
also add files that will automatically get interpreted once you run the
project. You can also add 'project references' to the project. When
compiling a project all source folders from referenced projects will
get compiled too.
You can use the JSC Source File Wizard to create new
files in the project.
Opening the SuperCollider Editor
The editor gets opened automatically once you open a
one of these endings: 'sc', 'scd'. You can change the file extensions
that will be accepted as interpreter files in the plugin preferences.
Attention - Using JSC without SuperCollider?!
Because of license restrictions in the GNU
General Public License (version 2) that prohibit linking a GPL covered
software to an EPL (Eclipse Public License) covered software
it is currently not possible to control SuperCollider from within JSC.
The library jsclang.jar that would normally link to the SuperCollider
language is not doing anything at the moment.
A lot of the features described below will not be working in
the normal JSC release version until these issues are
If you are interested in licensing stuff have
a look here:
Asked Questions about the GNU Licenses
Analysis of the Eclipse Public License (version 1.0) and GNU General
Public License (version 2.0) and the Interaction of Works Licensed
Compiling the SCClassLibrary and using the interpreter
You can use these actions from the
- Compile Library - compiles the SCClassLibrary.
- Compile Project - compiles the SCClassLibrary and the
source folders of the currently selected project.
- Interpret - interprets the currently selected text
after the library has been compiled
- Stop - stops the interpreter
- Boot Default Server
- Stop Server
- Start SwingOSC
- Stop SwingOSC
- Run Main - interprets all global
interpreter files (see JSC preferences) and calls Main.run() afterwards.
- Run Project - Compiles the project if it isn't
compiled, interprets all global and
project interpreter files
and calls Main.run() afterwards.
Using the SuperCollider Editor
- press 'strg+space' for code completion. Code
works for class names, keywords and for predefined code templates (try
'if' and then 'strg+space'). Code templates can be defined in the JSC
- Typing a period after a class name will show a list
class methods. Typing a period after a global
show a list of it's instance methods. Typing a period
method where the return type is known will also show a list of
instance methods for the return type. You can add methods with
pre defined return types in the JSC preferences. You can also specify
prefixes for methods that will certainly return the class name
after that prefix. The default prefixes are 'as' and 'to'. So if you
type 'asString' JSC will assume that the return type will be 'String'.
Also all 'is', 'can', 'includes' and 'contains' methods will be assumed
to return the type Boolean.
- Hovering over a class will reveal a text hover that
the help to that class. Hovering over methods will show the
implementations of that method and the references to that method.
Hovering over a global variable will show a dump of the object this
variable points to.
- Selecting a word will automatically search the file
this word and annotate the occurrences. You can change this behaviour
in the Eclipse preferences (General/Editors/Text
- 'strg'-clicking on a class will open the
of the class. 'strg'-clicking on a method will start a search for
implementations of the method.
- If you put the cursor next to a bracket its
counterpart gets highlighted.
- If you double click after a bracket the text inside
two bracket will get selected.
- Using the context menu you can:
- show the 'implementations of' /
'references to' classes and methods.
- shift code left or right.
- comment/uncomment code
- search the selected text in the workspace, file
- When right clicking on the left border of the editor
- show/hide line numbers
- add bookmarks to the document
- add tasks to the document
- You can use the editor to open RTF files and HTML
it is not possible to save these files. You can of course save the
files with another extension using 'Save As...' if you did edit them
and want to save your changes.
Using the console
- Clicking on file links in the console will take you
to that file.
- You can interpret code from within the console and
use the menu actions 'Open help file', 'Implementations of' and
- Some of the SC errors will be shown in red in the
You can configure JSC with the JSC preference page -
open the menu 'Window/Preferences' and then select 'SuperCollider'.
- SuperCollider/Editor - Preferences for the
- Syntax - change the colours of the syntax
- Content Assist - preferences like content assist
delay and colours.
- Return Values - here you can add return values to
methods so they can be used with the content assist.
- Templates - add templates for the code completion
- SuperCollider/SC Paths and Files - Here you can
source files that will get compiled with the SCClassLibrary and
interpreter files that will automatically be interpreted when 'Run
- SuperCollider/SC Paths and Files/File Types - define
the file extensions that JSC accepts as interpreter files.
- Some preferences for JSC can be set in other Eclipse
- preferences for the automatically annotated occurrences of selected
words in the SC editor
- General/Editors/Text Editors/Hyperlinking/SC
Element - preferences for hyperlinks in the SC editor.
- General/Appearance/colours and Fonts/JSC - change
the font of text hovers
- General//Keys - change the key bindings for
JSC Help View
- When you select 'TOC' you can switch between a
browser style view and the Eclipse help.
- When the action 'Open Help File' is selected from the
menu the help file to the currently selected topic (the selected text
SC editor) is opened. This action will automatically search the
SuperCollider/Help directory. This way you can use the
help even if the plugin jsc.help is not up to date with the currently
used SuperCollider3 version.
- You can interpret text and use the
action 'Open Help
File' from within the help view (only if your browser supports
- You can use the help view as a web browser if you
want. The button SC Home takes you to the SuperCollider homepage.
- 'Open in Editor' will open the help file in the SC
editor (only working if you have opened a help file from the
Using the SC class JscEclipse and SwingOSC
You can find some JSC specific examples in the file