Bindows and IntelliJ IDEA
support posted in Developing in Bindows on May 3rd, 2007
If you are already using Jetbrains popular Java IDE for your Bindows development you are in luck. If not, now is the time to take a good look at it. We have been working together with Jetbrains to add and improve Bindows-specific support in IntelliJ IDEA. Starting with the Selena Milestone 1 of IntelliJ we have most of the features that are needed for enjoyable development. In addition we have created our own plugin that can be automatically downloaded and installed from within the IDE. This plugin provides even more features to boost your productivity. Let’s start by going through some of the enhancements integrated to the IDE by Jetbrains.
Since we use a special method called _biExtend to derive classes, editors usually don’t understand Bindows inheritance structure. This causes problems with code completion, showing none or every single function of Bindows. IntelliJ IDE understands how classes are derived and extended by looking at this method.
• Recognize public/private variables
In Bindows we use the underscore character in front of methods and variables to denote a private member. This is recognized by IntelliJ IDEA and reflected in code completion, etc.
• Support for addProperty
Bindows also includes a special function that can be used to create getter/setter methods - called addProperty. This function creates a private member variable as well as public getter/setters for it. IntelliJ IDEA sees this while parsing the code and adds those methods to code completion and navigation etc.
• Support for Bindows code documentation
IntelliJ can look at the API documentation for a function and figure out type-information as well as give you quick-lookup of the documentation text. It shows you the inparameters of a function, it knows the return type, etc.
• Type awareness
IntelliJ also has more traditional type awareness so when you type (for example):
var lbl = new BiLabel;
it then understands that lbl is of type BiLabel and this is reflected in the code completion, so it only shows you public methods available on BiLabel and its superclasses.
The Bindows plugin that we have developed has a built in web-server and can be used to quickly launch Bindows applications but also aid in debugging. Here are some of the main features:
Starts your browser of choice (Firefox or Internet Explorer) and runs your Bindows application without any need for creating html launchers, messing with paths etc.
It does not matter where things are. Let’s say you found some strange Bindows ADF sitting on your desktop. “What’s this?” Just open it in IntelliJ and launch.
It can receive logging messages and data from a running Bindows application. These are then printed to a special Bindows Console inside IntelliJ IDEA. This is a useful alternative to the ‘dreaded’ alert messages.
• Code completion in Bindows XML/ADF
This will give you access to all tags and attributes as well as quick documentation lookup. We actually included the full documentation together with this feature. Just position your cursor on a tag or attribute and press Ctrl+Q.
The plugin is currently in beta and can be downloaded and installed from the plugin manager inside IntelliJ IDEA. Just look for “BindowsPlugin”. Detailed information is available in the readme.txt file included in the plugin jar file. You will of course need a copy of both Bindows and IntelliJ IDEA. There are trial versions on both our sites. We intend to further develop the plugin, so your bug reports and recommendations are always very welcome.
Enjoy a screencast describing Bindows development techniques using the new Bindows plugin for the IntelliJ IDEA development environment for the screencast.
Johan Lund - The Bindows Team