NetBeans Modules for Dummies (Part 3)

Another way to learn about writing NetBeans Modules (NBMs) is to read as much as possible about them. Here is a complete list of all the resources I've come across while attempting to understand NBMs. I've tried to organize the links in stages, otherwise it's all a bit overwhelming.

Getting your feet wet

  • NetBeans: How to write a HelloWorld module by Jerry Tan. This was the first accessible document I ever read on NBMs. It's short and sweet, even though I later realized that both Jerry and Elan (see below) re-invented the wheel to some extent, because they could have used a NetBeans project template to structure their NBM, rather than doing everything manually.
  • Netbeans RCP In Action in Elan Meng's blog. I learnt two things from Elan: (a) the Ant script that creates an NBM and (b) how to hook an NBM into the NetBeans Platform.

Everything covered in the two links above, apart from the use of the NetBeans Platform (which Elan refers to as the Rich Client Platform), is also covered in NetBeans Modules for Dummies (Part 1) below. I intend to cover the NetBeans Platform soon.

Up to your knees in it

Going under

Is it a bird? Is it a plane? No, it's Maven!

And here is my wish list of things I would like NetBeans to be able to provide for NetBeans Module development:

  • NBM project template. I'd like this template to provide the following: layer.xml with default code, basic Action class with some default content, module entries in manifest.mf, Ant scripts for building the JAR's XML file and the NBM file, together with as few related properties as possible, so that as little customization as possible is necessary.

  • NBM project wizard. I'd like to be able to specify menus, toolbar buttons, and actions in the wizard (as well as anything else that can be defined in the layer.xml file). And the wizard should generate test code for the menus, toolbar buttons, and actions so that I can build and test the NBM as soon as I've exited the wizard. This is why the wizard should also generate an Action class with default code. The default main class should be something like org.netbeans.modules.app-name so that the structure is NetBeans-friendly from the start.

  • layer.xml. Code completion, editor (like for web.xml in 4.1), availability as file template with default content as in Mevenide.

  • Wrapper. I'd like to be able to select a Java application and wrap it in a module. I'd also like to be able to open an NBM file and inspect its sources.

  • Samples. Simple and complex samples in New Project wizard.

  • Documentation. "NBM Quick Start Guide"; "Complete Reference Guide for Layer.xml File"; "NBM Development Code Conventions Document"; "Introduction to NetBeans Sources"; FAQ; Helpfiles.

Comments:

I would like to make a module that starts by default when netbeans is launched. Is there anyway to do that?

Posted by Tim Shi on August 03, 2005 at 06:29 AM PDT #

I think that's default behavior. By the way, I'd recommend you using a post-4.1 development build (i.e., do NOT use 4.1 for creating plug-ins) and then go to http://platform.netbeans.org/tutorials/ for tutorials.

Posted by Geertjan on August 03, 2005 at 03:02 PM PDT #

Great list, Geertjan. You can also add link to the tutorials, well, mostly written by you.

To understand the concepts, I highly recommend this book. Unfortunately it's from the 3.6 ages, but the OpenAPIs haven't changed too much, so I got a lot of unique information from here. The concepts are mostly the same in 4.1 and 4.2 so it's worth reading to get an overview (and to get a deep understanding how the layered filesystems, datasystems, nodes, etc. work).

Posted by Roman Strobl on August 04, 2005 at 01:52 AM PDT #

Could you please provide the link to download nbantext.jar I am not able to get it from binary

Posted by abhisek on September 06, 2007 at 03:35 PM PDT #

Why do you need it?

Posted by Geertjan on September 06, 2007 at 03:37 PM PDT #

I am just a new comer to netbean plateform.i just want to test the NetBeans: How to write a HelloWorld module posted in http://www.javalobby.org/java/forums/t17711 where build.xml is using that jar.

Or if any other way for it.please suggest.I dont want to use IDE for module creation.I have downloaded only the blank plateform from netbean.I want to plug swing module into it.

Posted by Abhisek on September 06, 2007 at 03:41 PM PDT #

Did you see that JavaLobby article that was written in 2005?! It is completely out of date. It is now completely wrong. Here is how you can create a module in 6.0: http://platform.netbeans.org/tutorials/60/nbm-google.html

It is much simpler than it used to be, as you will see if you follow that tutorial. And here is a very long list of other tutorials for creating NetBeans modules:
http://platform.netbeans.org/tutorials/

Posted by Geertjan on September 06, 2007 at 03:49 PM PDT #

It is using IDE.I dont want to use IDE.I want have in depth knowledge on configuring the plateform to develop a desktop application.Could you please send me the steps to develop Hello World appl without using IDE .

My netbean plateform loc: D:\\nb\\Netbeans\\Plateform6

and my user dir is
C:\\nbUser

I am using eclipse as IDE.

Posted by Abhisek on September 06, 2007 at 04:13 PM PDT #

I strongly advise you to use NetBeans IDE, because NetBeans IDE provides LOTS of tools to help you create NetBeans modules. Eclipse does not. You are making your life very difficult for yourself if you use a different IDE. It is like using instructions from Ikea to build furniture from Japan. Almost not possible. We have no instructions to help you to o what you are trying to do -- if you want to use Eclipse to develop modules on the NetBeans Platform, you should ask Eclipse for instructions how to do so.

Posted by Geertjan on September 06, 2007 at 04:22 PM PDT #

I want to learn from scratch.I dont bother difficulties.Please suggest .I am using eclipse only for getting methods from apis imported not for netbean plugin dev.Please suggest me to proceed.It may need some time .i am ready for it.please suggest me

Posted by Abhisek on September 06, 2007 at 07:22 PM PDT #

If you are using Eclipse, I cannot help you. I simply don't know how to work with Eclipse. Write to this mailing list, maybe they will have someone who can help you: dev@openide.netbeans.org. Again, please understand: I cannot give you advice, because I do not know Eclipse.

Posted by Geertjan on September 06, 2007 at 08:53 PM PDT #

Thanks a lot for your valuable respones. assume that i am not using eclipse.I am not using any IDE .I have one netbean plateform i.e blank plateform.how to plug hello world module into it.

As given by http://www.javalobby.org/java/forums/t17711

it was not using any IDE.but the only problem i faced was i didnt get nbantext.jar to download.

Can you suggest further.

Posted by abhisek on September 06, 2007 at 09:00 PM PDT #

No, I cannot suggest further. I don't know the answer to your question, except that you are referring to something written in 2005. It is probably completely wrong now. Please read these words: I don't know. Please join to this mailing list and ask your question there: dev@openide.netbeans.org.

Posted by Geertjan on September 06, 2007 at 09:04 PM PDT #

i build furniture from Japan..:)...its not so difficult .it took 1 week for me.

Posted by abhisek on September 10, 2007 at 02:49 PM PDT #

:-) Hurray! Please tell me how... Write to me at geertjan DOT wielenga AT sun DOT com with the instructions and I will blog about it for other people who need to build furnitue from Japan!

Posted by Geertjan on September 10, 2007 at 03:36 PM PDT #

surely i wl post if u want...ijust started doing the coding part...i need small code to go through to understand TopComponent(just opening one explorer window in left side of plateform).waiting for ur help

Posted by Abhisek on September 17, 2007 at 07:10 PM PDT #

http://platform.netbeans.org/tutorials Plus, if you use the Window Component wizard in the IDE you will see how a TopComponent works. (That's exactly why it makes sense to use NetBeans for module development, i.e., because NetBeans provides lots of wizards that help you get started with many APIs).

Posted by Geertjan on September 17, 2007 at 07:12 PM PDT #

Thanks...i am almost done with that...just a simple problem i am facing.In the menu bar i am adding TestComp .this option is coming fine in menu bar.But after clicking it ..under it "balnk" is getting displayed with disable mode.in layer.xml under tag folder name="TestComp" i have given the correct mapping for the action class.waiting for your help

Posted by Abhisek on September 17, 2007 at 09:22 PM PDT #

CMS and Blog Website templates, flash templates,WordPress Themes,Php-Nuke Templates, phpBB Templates for a economical rate web design products for a economical rate

Posted by Antony Fernando on November 02, 2007 at 02:43 PM PDT #

Hi
My topcomponent is not getting garbedge collected...when i am opening topcomponent(say tComp) one instance getting od tComp created which is never garbedge collected...whthr netbean is registering something somewhere

Posted by rocky on February 21, 2008 at 02:52 AM PST #

Is netbeans the kind of api that could be embedded into a website that does a custom build project? Like adding a deck to my house, pick some styles, hieghts, colors, and have it show as a 3D model ? I have seen this at a Lowes homebuilder website and would like to build one of these to look at other concepts.

Posted by Eric on March 18, 2009 at 06:00 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
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today