This document set describes the APIs used in the
NetBeans
IDE.
It also applies to compatible distributions such as Sun's Forte for Java.
The API set allows partners and power users to extensively customize the IDE
and integrate substantial external applications into the IDE's operation.
It also is self-contained and permits the implementation to be inserted into it at runtime.
Available API sets as of @DATE@:
- The Modules API
provides a way to insert pluggable JAR-based modules into the IDE, in a user-controllable
fashion, which may extend its operation using any of the other APIs. Based heavily on the
Java Extension Mechanism, features include module versioning and cross-compatibility
checks; Web-based download and installation of modules into a running IDE; and the
capability to specify a variety of standard additions (such as new menu items)
descriptively in the module's manifest file.
- The TopManager is the starting
point for the functionality of the other APIs--it provides access to important system
objects, for example the Control Panel, the standard classloader, logging streams, etc.
The Places API provides shortcuts
to well-known places in the Explorer hierarchy--for example, the user Repository.
- The Services API
describes a general way of permitting executors, debugger types, and compiler types
to be uniformly created, installed, configured, selected, and saved.
- The FileSystems
API describes how to access and monitor files used in the IDE, and even to create
custom virtual filesystems.
- The DataSystems API
permits access to the representation of typed data in the IDE. Implementors would
primarily use this API to cause the IDE to recognize new data types (e.g. UML files), add
user-visible actions to nodes representing a custom or standard type, implement templates,
and so on. Data objects may also represent logical groupings of physical files where
appropriate.
- The Explorer API
gives access to the Explorer in its various views--not only the usual Explorer window, but
other views such as the Component Palette (driven from the same underlying
objects). Module authors may drop an Explorer view of some part of the IDE into a custom
UI component. The API also allows an implementor to create new Explorer views for custom
data representation, and make them interoperable with the existing ones.
- The Nodes API permits
access to the provided features of nodes such as those used in the Explorer window;
and allows third parties to create their own hierarchical nodes to display wherever they
wish, including operations such as browsing of nodes; cut/copy/paste and reordering;
display characteristics, both icon and available properties; and actions which may be
taken on the node (e.g. in a context menu), both custom actions and standard actions such
as "Compile" or "Open".
- The Actions API
provides an interface to such IDE elements as toolbars, menus, and keyboard
shortcuts--allowing third parties to create actions which are sensitive to context and are
invokable in more than one way.
- The Window System
API controls the overall functioning of the desktop, including standard and custom
workspaces and the dynamic interaction of windows during various stages of the user
experience.
- The Options API
provides the ability for a module to have richly structured and persistent user-level
options accessible in the Control Panel, including custom option editors and context help.
- The Compiler API
allows an implementor to run the standard IDE Java compiler and check its progress; or, an
unusual sort of compiler interface beyond the scope of the External Compiler control panel
may be created.
- The Execution API
controls the running of user code, whether applets, applications, or non-standalone
components such as
JPanels
. The API permits execution of user classes (including handling
classloader issues), or allows a custom execution engine (say for profiling) to be
integrated.
- The Debugger API
specifies how a Java debugger should interact with the IDE. It may be used to create a
module implementing a custom debugger, or to interact with the default system debugger.
- The Editor API provides
access to the basic functionality of the Editor and its support for different content
types; and the ability to insert custom editors conforming to the Swing Editor Kit
conventions.
- The Java Hierarchy API
encapsulates the result of either parsing Java source documents, or introspecting on Java
classes--a structured representation of the Java class objects and their members. Anything
which can be run in a JVM (e.g. a NetRexx program) can thus be made available to the
Explorer and other components for browsing and possible editing of class, interface, and
member attributes.
- The Projects API
deals with user-level projects, or essentially separate development
areas that may need their own workspaces, options, and environment
settings. A project is also the basic unit of integration with a
version control system.
- Utility
Classes providing support functionality for the primary
APIs.
-
HtmlBrowser
for modules to provide an alternate web browser, and HttpServer
for an alternate web server (which must be internal so as to handle
serving of pages from the Repository).
- Supplementary specifications:
- Threading Models
used in the Open APIs.
- Property
editors available in the IDE.
- Some informational pages which module authors will also want
to look at:
- Recent API Changes
(online).
- APIs FAQ.
- X-Ray Spex
Tutorial to see how a real user IDE session (here, excerpts
from the standard NetBeans tutorial) actually works in terms of the
APIs and modules acting in concert.
- Tips and
Tricks for writing modules, including how to compile the
sources against the Open API library, building the module JAR,
testing and debugging modules.
- Philosophy of FileSystems API
(online).
- General
notes explaining conventions and assumptions made in the IDE.
- Typical
uses showing how the APIs would be used for common
applications.
For more information about the APIs, including source code access and
mailing lists, see
openide.netbeans.org.