To be able to contribute to the development of Apache NetBeans, you will eventually need to understand the big picture, a.k.a its architecture. The core of Apache NetBeans is its platform, or Rich Client Platform (RCP). The NetBeans IDE is built on top of the NetBeans RCP. In other words, one needs to understands the NetBeans RCP and its components in order to understand NetBeans.
NetBeans is a quite large project, one of the largest Apache projects. cloc command returns more than 7 million lines of code in more than 50 000 files!
The NetBeans Platform consists of a number of features:
- The module system
- A Service infrastructure
- A File System
- A Window System
- A Standardized UI Toolkit
- A Generic Presentation Layer based on the Node API
- Advanced Swing Components
- JavaHelp Integration
- A Lifecycle Management
The most important of the above to understand the NetBeans Platform is its module system. The NetBeans Module API is an architectural framework and an execution environment that supports the Runtime Container. The Runtime Container consists of the minimum modules required to load and execute your application. These are the following six modules:
- the module’s name
- version information
- dependencies, and
- a list of its public packages, if any.
This is a typical NetBeans module manifest file: Manifest-Version: 1.0
Ant-Version: Apache Ant 1.7.1
Created-By: 11.3-b02 (Sun Microsystems Inc.)
OpenIDE-Module-Module-Dependencies: org.openide.util > 220.127.116.11
OpenIDE-Module-Java-Dependencies: Java > 1.5
- Module B's classes must be in a public package and have a version number.
- Module A must declare a dependency on a specified version of Module B.
Display Dependencies plugin
Display Dependencies plugin shows the various dependencies among NetBeans modules. You simply need to select a NetBeans module from the Projects explorer, click on the Show Dependencies button on the toolbar to open a window that displays the dependencies of this module to other NetBeans modules.
The image can be messy as there are many modules and many dependencies, but it provides a nice visualisation and might provide you useful information (e.g. should this module depend on that one?)
An architectural overview of the NetBeans Platform modules
The Core NetBeans Platform (without the plugins) contains around 100 modules(!). Below is an attempt to group them into categories in order to more easily locate where a change might be needed. This will eventually lead to an architectural diagram of the NetBeans Platform.
From the top, the following modules support Ant:
ant.browsetask (Web Browser Ant Task)
ant.debugger (Ant Debugger)
ant.freeform (Freeform Ant Projects)
ant.grammar (Ant Code Completion)
and their dependencies:
Git main module depends on:
libs.git (Git Client Library) which depends on org.eclipse.jgit
- Boeck H., et. al. (2011), NetBeans Platform 7.0, Refcard.