The original Rust plugin can be found here. It was written in JavaCC for NetBeans 8.2. A clone that can be installed in Apache NetBeans 16 can be found here.
.
To build and successfully deploy to Apache NetBeans follow these steps:
- Edit
pom.xml
and comment out dependencies toorg-netbeans-modules-gsf-testrunner
as well as inorg.codehaus.mojo:nbm-maven-plugin
. - Optionally you may upgrade old RELEASE82 dependencies to RELEASE123 or later.
- Delete
src/test
directory. - Delete
src/main/java/com/github/drrb/rust/netbeans/cargo/test
src/main/java/com/github/drrb/rust/netbeans/project/action/TestCommand.java
src/main/java/com/github/drrb/rust/netbeans/project/action/TestFileCommand.java
- Edit
RustProjectActionProvider.java
and comment out or delete the errored lines:supportedCommands.add(TestCommand.INSTANCE);
supportedCommands.add(TestFileCommand.INSTANCE);
mvn clean package
- Install the produced
rust-netbeans-1.0.0-SNAPSHOT.nbm
- Click on Tools → Options or NetBeans → Preferences (Mac) and you should see a Rust button. It should automatically pick your Rust environment.
There is no New Project wizard but you can open an .rs
file from the Favourites window. The first time you use the plugin it will complain about braces matching as errors, but when you restart NetBeans this error is gone. You may also open a Rust project from File → Open Project action and pointing to the directory that contains the rust project. NetBeans will recognize that this is a Rust project and it will use the appropriate icon in the Projects tab. You can right-click on the project and select Run to compile and execute it.
It is recommended to rewrite/migrate the plugin to ANTLR4 and LSP.
Progress will be reported here.
Language Feature Support | Status |
File type recognition | X |
Project type | X |
Semantic syntax highlighting | X |
Formatting | X |
Braces matching | X |
Error Hints/Fixes/Suggestions | |
Code completion | |
Code templates | |
Refactoring | |
Debugging |