Viewing the NetBeans Central Registry

For some fun, create a TopComponent and then add this bit of code, with thanks to Toni Epple:

add(new BeanTreeView(), BorderLayout.CENTER);
try {
    myExplorerManager.setRootContext(DataObject.find(FileUtil.getConfigRoot()).getNodeDelegate());
} catch (DataObjectNotFoundException ex) {
    Exceptions.printStackTrace(ex);
}

Run the application and you'll see the NetBeans Central Registry (a.k.a. System FileSystem) of the application you're running.

Comments:

For even more fun, open one of the folders Toolbar or Menu and drag and drop the content around. Notice anything in your application :-)?

Posted by Toni Epple on June 26, 2012 at 01:43 AM PDT #

I wrapped that Node in a FilterNode to provide the "position" attribute and the "file extension". All Children are wrapped to.

Than I used an OutlineView to show these two properties. Great tool to find wrong layer entries :-)

Jens

Posted by guest on June 26, 2012 at 02:05 AM PDT #

Why don't you use
'NodeOperation.getDefault().explore(DataObject.find(FileUtil.getConfigRoot()).getNodeDelegate());'

Posted by J.Boesl on June 26, 2012 at 07:05 AM PDT #

I described my version in my blog (in german, Google Translate available):

http://blog.nigjo.de/netbeans/2012/06/die-netbeans-laufzeitkonfiguration-auf-einen-blick/

Jens

Posted by Jens Hofschröer on June 29, 2012 at 01:58 AM PDT #

Post a Comment:
  • HTML Syntax: NOT allowed
About

Geertjan Wielenga (@geertjanw) is a Principal Product Manager in the Oracle Developer Tools group living & working in Amsterdam. He is a Java technology enthusiast, evangelist, trainer, speaker, and writer. He blogs here daily.

The focus of this blog is mostly on NetBeans (a development tool primarily for Java programmers), with an occasional reference to NetBeans, and sometimes diverging to topics relating to NetBeans. And then there are days when NetBeans is mentioned, just for a change.

Search

Archives
« April 2014
SunMonTueWedThuFriSat
  
12
13
14
23
24
25
26
27
28
29
30
   
       
Today