TaT UsingGSFByMakingFriends

Want to use GSF API's?

Contributed By; Varun Nischal

Brief Overview

If you want to make use of Specification Version of GSF modules, Caoyuan Deng suggested to add one's modules as friend to the GSF modules. Making friends is an easy task (as per my experience). That’s possible in two ways-

Case #1
I commit my code to /main/contrib and request the GSF Module Owner to add my specific modules as friends. As one might have already versioned his/her project with any other Version Control System (other than Mercurial). So, I went for the second way.
Case #2
I should clone the NetBeans sources, and then run my choice of NetBeans IDE. Then, open the necessary GSF modules (from the clone repos)- tweak them (so as to add my module as a friend).

Tips & Tricks

Actually, I made my module friend of all the three GSF modules- /gsf, /gsf.api and /gsfpath.api
So, you are required to open the /nbproject/project.xml file of one of the GSF modules and add a friend tag with text equivalent to the Code Name Base of your module.

   <!--Many modules added as friends are added here-->

So, open all these modules in your NetBeans IDE (6.0/6.1 onwards). Tweak those project.xml files by searching for a tag "<friend-packages>" there you would see many module’s code name base have been added as friends using tag "<friend>", also specific packages can be added using tag "<package>".

Build the sources...

Once you have followed the second approach, its time to build the sources. Firstly, open the project NetBeans Build System (/main-golden/nbbuild). To know more about how to build the sources, give it a read :) Here’s an excerpt from the entry-

I referred a document for information on Mercurial Access. So, I found out /main-golden would be fine for us. As its guaranteed that build would succeed..

Once you get the build successful, you must now run the IDE either from /main-golden/nbbuild/netbeans/bin/ OR extract the distributable zip you must have created by running the target "build".


Its done & now you can open your project modules in the newly created build of NetBeans IDE. As and when you make use of the Gsf API’s, build would definitely succeed.

Adapted from http://nbguru.wordpress.com/2008/11/11/tat-i-want-to-use-gsf-apis-12/

Not logged in. Log in, Register

By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo