#Mirah Netbeans Module
A module to add Mirah support to Netbeans.
This module includes both support for augmenting the build/compile process of certain NetBeans project types, and support for editing .mirah files in the code editor. So far (October 20, 2014) I have focused only on the Codename One and Java SE Application, Java Web Application and Maven project types (added in version 1.0.23).
If you would like to see support for a specific project type, please post it in the issue tracker.
###Mirah (the language)
- Ruby-like syntax
- Statically compiled to JVM bytecode.
- Compiled code has no dependencies (you can deploy code just as if it was compiled java).
- 2-way interrop between Mirah code and java code.
- As fast as Java
- .mirah editor (to edit Mirah files).
- Syntax highlighting
- Method and property completion.
- Import hints
- Error highlighting
- Abstract method completion
- Class member navigation panel
- Java Application & Java Class Library (i.e. JavaSE)
- Java Web Application (i.e. JavaEE)
- Codename One Projects
- Codename One Libraries
- Maven Projects
- Seamless integration with Java projects. You can add .mirah source files to your Java project in the same source tree, and they will be built like normal Java files.
- Support for 2-way dependency between Java and Mirah code.
- Comes packaged with Mirah compiler
- Download the .nbm file.
- In Netbeans, select "Tools" > "Plugins"
- Click on the "Downloaded" tab, and click the "Add Plugins…" button.
- In the file dialog, select the ca-weblite-netbeans-mirah.nbm module that you downloaded, and click "Open".
- Follow the prompts as it is installed.
The following screencast demonstrates the use of the NetBeans Mirah plugin to develop a Codename One application using Mirah.
This tutorial shows you how to use Mirah with a JavaFX Maven project.
###Creating a Mirah Class
- Access the "New File" wizard inside an existing Java project. (e.g. Select File > "New File…").
- One of the file types should be "Mirah Class". Select this option.
- Click "Next". This will take you to a form to enter the name, package, etc.. of your class.
- Click "Finish". This should add your class to the specified directory, and open it in the editor.
Method completion is a little bit rough, but it works in most cases.
- Press Ctrl-Space after typing ".", and it will present a drop-down list of available methods on this object.
If you use a class or symbol that hasn't been imported into the file's scope, you will receive a hint in the margin that allows you to select appropriate classes that it has found in the classpath and add the import statement automatically.
This was the first Netbeans module of this complexity that I have written, and there is still much to do. It does handle method completion, but it is still a little clunky and only provides autocomplete for those methods that it could introspect using Java reflection. This doesn't include Rubyisms like the List.each() method, and it currently doesn't include properties or static fields.
There also isn't any support for refactoring operations, either from a producer or consumer standpoint.
Report bugs in the issue tracker
##Building from Source
- Clone the repo
- Open project in Netbeans
- Build project
Mirah is awesome, but the community is small right now. Make it better by forking and improving any of the following projects:
- This project
- The Mirah Ant Task (used by the Netbeans module to perform builds)
- The Mirah Project (Includes the Mirah compiler and CLI tools)
- The Mirah Parser Project (Used by the Mirah compiler for parsing source)