Scala Syntax Highlighting in Eclipse - eclipse

I'm using Eclipse & the Scala plugin to write scala code. The editor seems to have limited syntax highlighting options - for example I would like to change the formatting of variables (I like them blue) and method defs.
I know there are a few other highlighter plugins out there like EclipsesColorer, but they all seem to lose features of the Scala (or other langauges) Editor like auto complete and suggestions.
Is there any plugin or way I can modify the scala plugin to get finer control over Scala syntax coloring/formatting options?

Some of this is being worked on. The nightly build page has 'Semantic Highlighting' (making variables blue etc) marked as 'coming soon.
Also the current roadmap may help with when a released version on the eclipse-scala ide.
(As 'coming soon' is very date dependent then 'today' is 10/March/12 )

The editor that comes with the Play Framework Eclipse plugin has syntax highlighting customizability: http://scala-ide.org/download/current.html
You can go to Preferences -> Scala -> Syntax Coloring to set the different colors.

Have you tried Eclipse Color Theme?
Scala auto complete, etc. unaffected ;-)
A slightly tweaked Wombat theme in Scala works well for me (also: Aptana Eclipse plugin helps immensely with html/css/erb, etc.)

Related

AST (abstract syntax tree) view in Netbeans

Eclipse offers a plugin, which displays the abstract tree view of Java projects. After installing the plugin, the view becomes available. http://www.eclipse.org/jdt/ui/astview/index.php
Is there such a functionality / plugin also available for the Netbeans IDE? I didn't find an answer in stackoverflow. The results in Google dealing with AST in Netbeans are somewhat old (2007-2009).
I know that there are standalone tools which display the AST and also other IDEs which are more useful, if such functionality is required (like IntelliJ Idea).
My question is Netbeans-specific - if this is not possible with Netbeans (without using other tools) a simple "No" will be enough! I am using Netbeans 7.3.
Did you look at these ? It is more recent (2012).
http://netbeans.dzone.com/nb-javac-ast-visualization
https://bitbucket.org/crazyjavahacking
The dev builds of NB already contain such a view in the navigator. Not pretty but it works

eclipse editor, how to work with text editor (theme) when working with a specific perspective?

Is there a way to change the 'Appearance color' (or theme) in the editor when choosing to work with a specific view/perspective?
To be more specific, I'm starting to use python and I wish to have a different theme but when switching to Java I'd like to use the default editor.
Doable?
There is nothing to make the theme depend on the perspective, I believe.
The straightforward solution would be installing a Python plugin, which then has its own editor (and own syntax highlighting settings). You would have to do that for every file type, nonetheless.
Apart from that, your best choice is probably the Eclipse Colorer plugin, which can do syntax coloring based on the file type.
(Disclaimer: I've never used any of those myself).

IDE support for Scala scripting

I plan to try some exploratory programming with Scala, e.g. loading some scala source files and call the functions defined in these source files interactively, maybe doing some plotting in the between.
I want to keep a scripting source file, and occasionally send some lines in it to the scala console using a short-cut such as Ctrl+Enter.
Which IDE supports scripting well?
The Scala plugin for Eclipse offers two different interpreters. One is the standard REPL, simply integrated within the IDE, the other one is the Run Selection Interpreter which may be very handy for the kind of experimentation you'd like to do, give it a try.
The Scala plugin for eclipse is the best out there .
http://www.scala-ide.org/
With the Run Selection Interpreter you can achieve what you want :
An expression can be executed in the interpreter by selecting text in
any Scala editor and either selecting the toolbar button (see
screenshot) or by using the Ctrl+Shift+X key combination (Cmd+Shift+X
on the Mac). The key combination can be changed by going to Keys ->
Preferences and changing the binding for the command "Send Selection
to Scala Interpreter"
In latest version of scala plugin for IntellJ Idea 11 (Nika EAP) scala console works much better. Read more in plugin blog http://blog.jetbrains.com/scala/2011/10/19/scala-language-console-nika-builds/
you can try Slate while I am still heavily developing. Although, for basic scripting, you can probably do command line as well. Almost all IDEs support integration with the interpreter btw.
It is obligatory to mention emacs here. Can emacs do _? Yes, emacs can do that!
In all seriousness, though, you might want to google around for "scala mode emacs" and see what you can find.

Eclipse: Using "Open Declaration" ... in a Scala project

I've been trying to convert from Java to Scala for a few months, and found that the greatest roadblock is that Eclipse plugin for Scala is hardly better then using Vim.
I normally have "Build Automatically" on, so apart from Open and Save, the commands I use most of the time are:
Open Declaration (F3)
References > Workspace (Ctrl-Shift-G)
Open Type Hierarchy (F4)
Open Type (Ctrl-Shift-T)
Content Assist (Ctrl-Space)
and looking at the Outline.
None of this works with the Scala IDE for the libraries. Some stuff works for my own code, like outline. But the rest just returns the following error:
The resource is not on the build path of a Java project.
Is there any way to get any of those things to work in Eclipse? Without them, basically the only thing I get is syntax highlight and compile-on-save, and I can get syntax highlight from vim without needing 1.5 GB of ram...
With implicits, and static function import, finding out from where something comes is really difficult without F3. I ended up using Google to find what class/trait defines what.
[EDIT] I just pulled Eclipse Classic 3.6.2, and update-1.0.0-milestones-2.8.1.final, which wasn't available the last time I checked. They have fixed the Outline, and "Open Type", that's it. The rest still doesn't work.
Which version of the Eclipse plugin are you using? If the version is from a while ago, then you're right, it's a bit buggy.
However, there is a new version, currently in beta (as of 23.04.2011) available from Scala IDE Eclipse download site. This is a lot better.
Also, please make sure that the 'Use JDT content assists' checkboxes are checked in Scala->Setup diagnostics window.
Please try the new version, and see if it fixes your problems. If not, raise a bug, and the team will fix it.

Eclipse refactoring plugins

I am after more refactoring options than the default that comes in Eclipse 3.6. Can anyone list any other plugins that do refactoring and what they do ?
My original problem was i wanted to re-order some type parameter declarations in some classes and unfortunately for me the default refactorings in Eclipse did not support moving them around...