Posts for the month of September 2009

Notice for Host Migration of This Site

I'm going to migrate this web site to new host during this month, both and may not be available at any time during this period.

Scala Plugin for NetBeans - Rewrite in Scala #8: Partly Visible to Java and Go to Type

>>> Updated on Sep 8:

Now in most cases, Scala is visible to Java, including generic type. Mixed Java/Scala project should be well supported.


I need "Go To Type" working, and Scala's symbols should be visible to Java sources. For NetBeans, that means I should implement a Scala to Java VirtualSourceProvider?, which will translate Scala source to Java stub.

I tried it before, but not so successful, so I disabled it. Finally, I got how it works today, and committed work in part. That is, now, in Scala/Java mixed project, not only Java is visible to Scala source, and also, partly, Scala is visible to Java too.

Another benefit is, when you press "Ctrl + O" or "Command + O", a navigator window will bring you to Type's source file that you are searching.

I'll go on to get Scala -> Java mapping fully works soon.

>>> Updated on Sep 8:

The following issue was fixed in trunk.


Warning: If you have not got a NetBeans nightly built before, do not try it until a recent (after Sep 3rd) serious fault fixed.


Scala Plugin for NetBeans - Rewrite in Scala #7: Mark Override Method and Go to Super def

The new progress is a little mark at the left side bar of editor, showing if a method is overriding a method of base class/trait. Move cursor on this mark will show a tooltip, and, click on this mark will jump to source of super definition.

If a mark of (D) shown and you forget to add "override", you will wait until a whole build process to tell you lacking of "override", so pay attention to it.

Of course, if it's an (I) mark, you do not need to add "override".


Scala Plugin for NetBeans - Rewrite in Scala #5: Refactoring Step One - Finding usages

I'm working on Refactoring features for NetBeans' Scala plugin, the first step is finding usages of class/method/val etc across project's source files, it works now. The next step will be renaming them.

Following snapshot shows class "ScalaDfn?" are used in 19 places, across 6 Scala sources


Scala Plugin for NetBeans - Rewrite in Scala #6: Refactoring Step Two - Rename

As I've done most code of Refactoring skeleton, it did not cost me too much time to get renaming feature working (2 hours about). Now, NetBeans' Scala plugin can rename class/method/val etc across project's source files.

Following snapshot shows class "Dog" is going to be renamed to "BigDog?". After the preview, press "Do Refactoring", all things done.