// NetBeans GIT support

If you are using GIT as SCM and NetBeans as IDE you should probably check out NBGit. The plugin integrates GIT in NetBeans in the same way as the out of the box Mercurial support does it. In fact both modules have the same origin since nbgit is a fork of the mercurial integration project and incrementally adds features to catch up.

NBGit Version 0.3 is already fairly stable and provides the basic set of features you would expect from distributed versioning system IDE integration.

Features

  • Graph visualization of parallel branches (Browser similar to giggle)
  • Versioning History (git log)
  • Show changes (git status)
  • update/commit/reset
  • clone/clone other/git init
  • custom actions (custom git commands)
  • diff
  • in-editor annotation of code changes
  • ignore files (parsing '.gitignore' files)
  • git properties (username, email etc via options)

The project is developed by volunteers outside Sun, if you like to see GIT integration as out-of-the-box feature in a future version of NetBeans please vote for this RFE.

I use the plugin for most of my open source projects and haven't experience any serious issues so far. I would say its already safe to use since you can't do anything wrong if you do a 'git status' -> 'git push' via command line as last step anyway.


// XPath plugin now available via NetBeans plugin portal

The XPath Utility I submitted to the NetBeans Plugin Portal over two months ago has been recently verified against NetBeans 6.7. This makes the plugin now directly available from within the IDE over the Plugin manager (Tools -> Plugins).

One .nbm less to carry with me ;)


// NetBeans OpenGL Pack 0.5.5 released

NetBeans OpenGL Pack logo The NetBeans 6.7 compatible OpenGL Pack has been updated to version 0.5.5 and is now available on the plugin portal also. The current release is feature compatible with 0.5.4 (release notes) only JOGL and project webstart extensions have been updated to JOGL 1.1.1a security update.

// OpenGL Pack 0.5.4 now ready for NetBeans 6.7

NetBeans OpenGL Pack logoNetBeans OpenGL Pack 0.5.4 is now ready to be used in the upcoming NetBeans 6.7 release, currently as rc2 available.

It wasn't sure if we would be able to ship the GLSL editor in this release since NetBeans 6.7 changed the editor APIs once again. But fortunately the P1 bug was fixed in time and we (and apparently many others, thanks for voting!) can keep using the Generic Language Framework (GLF aka Schlieman) - at least for now since GLF it is now a deprecated/unsupported module.

Build 0.5.4 will break compatibility with NB 6.5. The latest and also all other releases can be downloaded on the project page. I will wait with the upload to the plugin portal until NetBeans 6.7 final is released.

Features/Enhancements:

Anyway. Not much changed since the last release. The most important point is probably that the GLWorker used internally for tasks like shader compilation or capabilities viewer is now more stable on systems which do software rendering (e.g Mesa GL).

I added also an experimental feature which lets you define GLSL shader dependencies similar to java imports.

It is very common in GLSL to reuse code by simple concatenation of files. For example a set of independent shaders can reuse a code fragment defining some generic mathematical functions if the fragment has been concatenated to the top of all shaders which make use of the functions. Editing those kind of shaders would produce compilation errors without a way to inform the editor about those dependencies.

For example the following shader uses the function light() of PerPixelLight.frag by inserting the file ./PerPixelLight.frag at the position of the //import statement.

PerPixelLight.frag


vec4 light(void) {
    // insert fancy light calculation here
}

PlanetShader.frag


//import PerPixelLight.frag

uniform samplerCube cubemap;
varying vec3 vertex;

void main (void) {
    //Cubemap
    gl_FragColor = vec4(textureCube(cubemap, vertex)) * light();
}

When you compile a shader with dependencies you should see something like that in the output window:


All dependencies are listed in the compiler log and even the line numbers of the compiler warnings are translated back to the code fragments, which lets you jump via hyperlink directly to the annotated files.

Just a warning: Please don't define cyclic dependencies, however double imports should work in theory (have I mentioned it is experimental? ;))

Happy coding!


// XPath NetBeans plugin

I built some time ago a NetBeans plugin which simplifies browsing through large xml documents a bit. Just start typing a XPath expression in the text field of the TopComponent and the result of the (last) xml editor in focus are computed and printed in the textarea below. (You can open the XPath window either by using the context menu on xml files or directly via the window menu)

It uses the JDK's javax.xml.xpath package which means XPath 1.0 support.

xpath plugin image

it also supports basic auto completion and localized error messages (in other words: XPathExpressionException.getCause().getLocalizedMessage()).

Github project can be found here. Feel free to use it ;)


// NetBeans OpenGL Pack #2 in most popular plugins ranking

NetBeans OpenGL Pack logoSince I haven't bloged for a long time about the OpenGL Pack, here are some notes for the last two update releases.

Beside updates and fixes the only new feature I added is the OpenGL Quicksearch. It uses the NetBeans 6.5 Quicksearch functionality (similar to ctrl + 3 in eclipse) and searches through several OpenGL resources.



currently are five resources available for search:

power users can restrict the search to a category with the following prefixes ([prefix  space] searchstring  (space searchstring)*):
gl for GL SDK, ext for GL extensions, nv for Nvidia extensions, ati for ATI/AMD Extensions.


JOGL component in NetBeans Formdesigner OpenGL quicksearch GLSL editor

Pictures featuring: Form Designer sample project, GL Quicksearch, updated GLSL 1.3 editor

Changes in 0.5.3:

  • Java Applet and Webstart support
  • OpenGL Quicksearch
  • GLSL editor updated to support GLSL 1.3 (OpenGL 3.0 spec)
  • two new NetBeans Form Designer sample JOGL projects
  • NetBeans 6.5 and JDK6 are the new minimum requirements

Changes in 0.5.2 since last release:

  • JOGL distribution has been updated to version 1.1.1
  • GLSL linker now does not stop linking shaders on compiler warnings
  • the pack should now correctly deploy JOGL and GlueGen's native libraries on all supported platforms (64bit bug)

To download the pack, please visit the plugin portal.

As always, please use the user mailing list for feedback and the issue tracker for bug reports on the project page.

- - - - -

BTW the pack recenty reached the 36k downloads milestone which makes it to the #2 in the most popular plugins category of the plugin portal ;)


// NetBeans OpenGL Pack 0.5.1 released

The NetBeans OpenGL Pack 0.5.1 has been released. This is a small bugfix release with no major features added.

Changes since last release:

  • updated JOGL distribution to v1.1.1rc8
  • updated JOGL demos (added gears Applet demo)
  • added JOGL API support module for doc and source integration
  • webstart support for JOGL project templates (just enable it in the project properties)
  • improved JOGL deployment code (fixed some issues on 64bit systems)
  • bug fixes

To download the pack please visit the plugin portal page.

The OpenGL pack will be soon available via plugin portal update center (Tools | Plugins). This will make our old  "NetBeans OpenGL Pack update center" obsolete (and improve the download speed!). However, we will use the old update center for experimental not final releases in future.

As always, please use the user mailing list for feedback and the issue tracker for bug reports on the project page.

-------

Write once run everywhere [1][2][3][4][5][6] - seems like the platform agnostic JOGL deployment is working ;)


// How to reuse modules across different NetBeans applications

If you develop NetBeans modules you probably also wondered how to add a pre-packaged .nbm file as dependency to your module or how to use modules in multiple suites.

After some search I found that there is currently no official supported way for doing this. The reason is the bidirectional dependency between the suite and each module in the suite. This makes it hard to reuse modules across suites but it is still possible. In this entry I will describe different techniques/hacks to workaround this issue. (Note: technique, hack and workaround in the same sentence ;) )

In general, you can add a dependency to a module when the module you like to depend on is in:

a) your suite

b) the target NetBeans platform (default target platform is the installed IDE)

As mentioned above a) works only for one suite -> only b) is left

option 1. Assemble your own target platform:

point and click

  • Either make a copy of NetBeans, or if there's a lot of stuff you don't want, create an empty suite. Then build it and create a zip distribution and unpack that
  • Launch the result
  • In Tools | Plugins, install the module(s) you want globally (check the "Force install into shared directories" checkbox)
  • Shut it down
  • In your real IDE, use Tools | NetBeans Platforms to point at the copy of the platform that now has the module you want in it
  • Set your suite to build against that. It should pick up the module you installed and all classes in it's public packages

or put it in a build script

option 2. Install the module into your IDE:

point and click

  • enable "Force install into shared directories" in Tools | Plugins | Settings
  • install your module(s)
  • restart NetBeans
  • your module is now in the extra cluster and part of your IDE

or declarative

edit Info/index.xml inside your .nbm file

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE module PUBLIC "-//NetBeans//DTD Autoupdate Module Info 2.5//EN" "http://www.netbeans.org/dtds/autoupdate-info-2_5.dtd">
<module codenamebase="org.yourorghere.module4" distribution="" downloadsize="0" global="true"
homepage="" license="AD9FBBC9" moduleauthor="Michael Bien" needsrestart="false" releasedate="2008/04/07" targetcluster="milkyway">
    <manifest AutoUpdate-Show-In-Client="true" OpenIDE-Module="org.yourorghere.module4" OpenIDE-Module-Implementation-Version="080407"
OpenIDE-Module-Java-Dependencies="Java &gt; 1.5" OpenIDE-Module-Name="module4" OpenIDE-Module-Requires="org.openide.modules.ModuleFormat1" OpenIDE-Module-Specification-Version="1.1"/>
    <license name="AD9FBBC9">[NO LICENSE SPECIFIED]
</license>
</module>


alternatively you can add the flags to module/nbproject/project.properties and rebuild/create NBM (if source available)

nbm.is.global=true
nbm.target.cluster=milkyway

Now when you install the module with Tools | Plugins, NetBeans will place the module directly into the installation folder in the new created "milkyway" cluster. With this trick you should be able to use the same library wrapper module in as many suites you want.

Thanks to all on the mailing lists for the help on that topic.

------

I am already looking forward to JSR 277 which will hopefully replace the current implementation of the NetBeans module system. (no there was nothing anounced but this would make defenetive sense)


// NetBeans OpenGL Pack is evolving

The NetBeans OpenGL Pack is slowly evolving to a set of useful integrated tools, demo applications and editors for Java OpenGL development.

The features currently included are:

  • Editor for the OpenGL Shading Language (GLSL) with compiler error annotation, code folding, syntax highlighting, auto completion and documentation.
  • Easy access to the GLSL compiler and linker of your graphics driver integrated in the editor
  • OpenGL Capabilities Viewer
  • Integration of JOGL GUI components into the Matisse GUI builder
  • JOGL project templates
  • Ready to run JOGL demos and examples of the OpenGL Programming Guide (also known as Red Book) 

We are currently fixing the last bugs and hope to build the first release soon. The early access version is available via Update Center in the download section of the project page.

------------
The project has also been recently mentioned in the NetBeans Magazine [issue four] covering NetBeans 6 features. Geertjan Wielenga interviewed me about the GLSL editor in the Schliemann section of the magazine.