Bean Browser

The Bean Browser facility lets you look at the structure of objects live in the IDE, provided they can be represented as JavaBeans (which many API-related objects can). There are several ways to use the Bean Browser:

In the Bean Browser, by default nodes just show up as themselves, but they will show extra children. First of all, their regular children are displayed in a special subnode, to separate them from other things. Other subnodes may be displayed, including:

Here is an example of what you can do with the Browser:

  1. Open Bean Browse Master (or go to Runtime | Bean Browser). Click on the Property Sheet. Make the window a little bigger.
  2. TopManager -> Properties.
  3. windowManager -> Properties.
  4. mainWindow -> Components.
  5. (only child) -> Components.
  6. null.layeredPane -> Components.
  7. (MenuBar) -> Components.
  8. First child: property text in Property Sheet should read File.
  9. Change property to Phile. IDE menu bar should change.

Remember to look at tool tips on the nodes, and have fun browsing the IDE!

Node Information

Associated with the Bean Browser is a special utility action to help you see information about nodes and understand cloning, the node hierarchy, and visualizers. If you select any node, the tools action Explore node... will be enabled, and will have several subitems you can choose; each will open a new Explorer window:

Additionally, this action is presented in the context menu of every Bean Browser node which represents a real node (i.e. every "wrapper"). If you select it on a Bean Browser wrapper node, the real underlying node is used instead, which is occasionally useful.

Lookup Helper

Under Runtime | Bean Browser | Lookup results you can find out what is currently in the lookup system. Right click on this node and select Add Superclass/interface. You will be asked for a class name. Type in the fully qualified name of any class in the APIs or modules, for example org.openide.filesystems.MIMEResolver or org.openide.awt.HtmlBrowser$Factory.

Now browse underneath the lookup node and you will see all instances of that class registered in the system's default lookup. Each instance can be explored using the Bean Browser. Also the tooltip for an instance gives you the lookup item ID (for example, the name of the data object with which an instance was registered). If the contents of lookup change (e.g. because of module installation), the result node will be refreshed.

To help you understand how the property editor for java.lang.Object works that is part of the UI of services, the lookup node also has a property using this property editor restricted to the class you are looking up. Its pulldown shows the user-oriented displays of the available instances, and its custom property editor permits you to select one from a tree view of services.