nB gUru

"Wanting to be someone else is a waste of the person you are" – Kurt Cobain

NetBeans Community Docs User Survey

with 2 comments

Take the NetBeans Community Docs User Survey

The NetBeans Community Docs program is a great source of community-authored content about using the NetBeans IDE. Now the team behind the program wants your feedback to help make the program even better. What type of content do you like? Do you want more tech tips or prefer multimedia material? Take the survey and let the team know!

Well, this is an important news item for the NetBeans Community, thus it was necessary to let the community know about it on large scale. Kristian Rink, NBCD Coordinator and its Evangelist setup the survey that contains almost every question, our team wants the community to answer.

Thanking you..

Written by nvarun

July 15, 2009 at 12:46 am

taT | Hacking Modules..

leave a comment »

Ever wondered, apart from extending the NetBeans IDE, or some application based on NetBeans Platform. What else can be done with the module?

Brief Overview

Well, NetBeans IDE provides Module Development Support by providing 4 kinds of Project Templates;

  1. Module
  2. Module Suite
  3. Library Wrapper Module
  4. NetBeans Platform Application

I have some knowledge of the first two, so we will stick to them for the rest of this post. So, lets have a look at the simplistic module structure;

Module Structure

This is what you see when you expand the Project node in Files View. We will focus on platform.properties, project.xml. If you switch to the Project View, you would see the files with following names, visible under Important Files node.

NetBeans Platform Config

So, that’s basically the logical view of the file platform.properties. In the past, I have written some pretty useful tips and Tricks (contributed to NetBeans Community Docs) based on this file;

  1. Configure Clusters and Modules
  2. Managing NetBeans Platforms

Project Metadata

This is the logical view of the file project.xml. There’s one more useful tips and Tricks (contributed), that’s based on this file, which lets you add your module as friends to those modules, if you want your module to depend on the specification version of the same.

NetBeans IDE 6.7 (Click to enlarge)

Playing Tricks..

I will be making use of NetBeans 6.7 IDE. Although, these tricks should work well with NetBeans 6.x IDE. So, lets answer the question I asked in the beginning.. Generally, when you create Module project, you get an option to either create it as Standalone Module or Add to Module Suite.

Standalone Module

When you choose this option, you also get an option to select NetBeans Platform of your choice, along with Manage.. button. If you want to know more about that, refer this contribution.

Suppose, I choose NetBeans 6.5 Build (added with name as 65 in Platform Manager) as Platform and move ahead. I would be able to use 6.7 IDE to create module, targeted for NetBeans 6.5 IDE. The module’s platform.properties looks like this;

nbplatform.active=65

This would enable the running IDE to achieve the desired result, as mentioned above. Now, running the module will ofcourse launch NetBeans 6.5 IDE as Target Instance to see how your module works. This process might be slow, as you’re running full-fledged 6.5 IDE.

NetBeans 6.5 boots with a b'day stamp on splash screen!

If your module doesn’t depend on clusters other than platform (which is by default). Then, you can tweak the file as follows;

enabled.clusters=\
 platform
nbplatform.active=65

These clusters are bare-minimum essentials, that are enabled by default when you create the NetBeans Platform Application project using 6.5/6.7 IDE. The property enabled.clusters helps to enable only those clusters which are necessary to run this module.

Splash Screen for empty NetBeans Platform Application

Now, run your module and it will look like you’re running a NetBeans Platform Application having a single user-defined module. Here’s how module’s project.xml looks like;

<project xmlns="http://www.netbeans.org/ns/project/1">
   <type>org.netbeans.modules.apisupport.project</type>
   <configuration>
      <data xmlns="http://www.netbeans.org/ns/nb-module-project/3">
          <code-name-base>code.name.base.of.your.module</code-name-base>
          <standalone/>
          <module-dependencies>
           <!-- Here are your module dependencies.. -->
          </module-dependencies>
          <public-packages/>
      </data>
   </configuration>
</project>

Note the bold-faced tag <standalone />, this tells the NetBeans IDE that your module is not part of any module suite. Its a standalone module, as you created.

Add to Module Suite

If you decide to go with this option, you would then browse the filesystem to find the appropriate Module Suite project and then, move ahead.

In case of Module Suite projects, the enabled.clusters property automatically occurs/disappears, when you check/uncheck the modules and/or clusters from its Project Properties Wizard.

Note that the module, that becomes part of the suite, would use only those clusters which the suite has enabled. Along with that, suite-private.properties file is added under /nbproject/private. Also, take a look at the module’s project.xml;

<project xmlns="http://www.netbeans.org/ns/project/1">
   <type>org.netbeans.modules.apisupport.project</type>
   <configuration>
      <data xmlns="http://www.netbeans.org/ns/nb-module-project/3">
          <code-name-base>code.name.base.of.your.module</code-name-base>
          <suite-component/>
          <module-dependencies>
           <!-- Here are your module dependencies.. -->
          </module-dependencies>
          <public-packages/>
      </data>
   </configuration>
</project>

Note the bold-faced tag <suite-component/>, this tells that NetBeans IDE that this module is part of a Module Suite project.

Tips to Remember

You may convert your standalone module to become part of suite, or vice-versa. Just add/remove suite-private.properties (Per Suite Locator) file and tweak your Module’s project.xml and Module Suite’s project.properties.

Also, note that some changes have taken place in NetBeans 6.7 IDE, you may find out more over the web. One more thing, NetBeans 6.5 IDE added suite.properties file under /nbproject and had same tag as <suite-component/>. I think NetBeans 6.0 and 6.1 might do the same. Please try it yourself and let me know.

Stay tuned..

Written by nvarun

July 10, 2009 at 7:03 pm

taT | Hacking Project Properties

with one comment

Yesterday, I recreated one of the Visual Library Sample  (basically a tutorial based on it at Dzone) using NetBeans 6.7 IDE on Windows XP Professional SP2. The sample was Java Application that had two JAR’s (present in the platform7 cluster of NetBeans 6.0 IDE) in its classpath.

I followed the tutorial and successfully executed the application. Fortunately, I have NetBeans IDE from 5.5 onwards, so there wasn’t any issue finding the JAR’s and adding them in the application’s classpath.

I didn’t knew whether it will work with cluster from higher release or not. Hence, I decided to give it a try by making use of clusters from 6.1, 6.5 and finally, 6.7.

Playing Tricks..

Now, removing/adding JAR’s again and again can be boring/cumbersome if you have several releases stored under different hierarchies of your filesystem. So, I looked into the various files created under /nbproject to inspect how these JAR’s being referred.

When you right-click Libraries Node and click Add JAR/Folder..

right-click Libraries Node (Click to enlarge)

You’re prompted with the dialog for browsing and then, selecting Reference/Absolute Path as per your choice.

Browse to select platform7 cluster (Click to enlarge)

I selected the platform7 cluster (see above figure) and selected the JAR’s shown in the following figure.

Selected JARs from platform7 cluster

/nbproject/project.properties

This file contains all the project related properties, that are accessed by build-impl.xml (created from project.xml automatically) for necessary Ant operations.

file.reference.org-netbeans-api-visual.jar=\
  path\\to\\cluster\\modules\\org-netbeans-api-visual.jar
file.reference.org-openide-util.jar=\
  path\\to\\cluster\\lib\\org-openide-util.jar
includes=**
jar.compress=false
javac.classpath=\
 ${file.reference.org-openide-util.jar}:\
 ${file.reference.org-netbeans-api-visual.jar}:\
 ${libs.swing-layout.classpath}

The bold-faced text is added, once referenced JAR’s are added from Projects Window/Project Properties Wizard. Also, path\\to\\cluster refers to the directory where the platform cluster is stored. In case of the above application, here’s the path;

E:\\OpenSource\\NetBeans_Archies\\NetBeans 6.0\\platform7

Playing with Clusters

Now, as you can see the path\\to\\cluster is the same in this case. So, I introduce another property that will have the path as value.

path.to.cluster.platform=\
  E:\\OpenSource\\NetBeans_Archies\\NetBeans 6.0\\platform7
file.reference.org-netbeans-api-visual.jar=\
  ${path.to.cluster.platform}\\modules\\org-netbeans-api-visual.jar
file.reference.org-openide-util.jar=\
  ${path.to.cluster.platform}\\lib\\org-openide-util.jar

This way, the referenced JAR’s become dependent on this property. Now, one can also change the value of this property, i.e. if one is interested in using JAR’s from platform cluster of higher releases of the NetBeans IDE.

Then, NetBeans will automatically scan the project, to update dependencies. For instance, I opted for platform9 cluster from NetBeans 6.5 IDE.

path.to.cluster.platform=\
  E:\\OpenSource\\NetBeans 6.5\\platform9

I just made changes at one place, that will be automatically reflected in other properties that depend on it directly/indirectly.

Tips to Remember

However, you need to check your code, once you do these changes, as this might cause warnings on deprecated usage of certain API, when you build your application.

Also, if you do any error while editing your project.properties as for this scenario, or any other. You may end up seeing lots of error badges in your code and possibly, get an added menu item (Resolve Reference Problems..) in the project’s context menu.

Stay tuned..

Written by nvarun

July 10, 2009 at 3:58 pm

Community Docs and NetBeans

with 3 comments

This is the first time, I thought of filing an issue for NetBeans Community Docs Program as I have never ever thought there would be a need for it, in the past 2 years. Generally, no one has ever done that, AFAIK.

I have been an active contributor to NetBeans Community Docs Program and managed it as coordinator for the duration of 11 months (May ’08 – Mar ’09). However, I feel there’s lack of coverage of the resources, that are gathered and arranged in the form of several wikis interrelated with each other in a systematic way.

Through this issue, I would like to see increased presence of NetBeans Community Docs in the NetBeans Community. I have some ideas which I would like to put forward, but first I want to see interest from your side (Community Members and NetBeans Team).

You’re welcome to add your comments/suggestions or even vote for this issue. See the following for latest updates.

Jul 14, 2009

Kristian Rink has setup a user survey. Please go and fill up the forms. We need your feedback, so that we can be in better position to decide the future of this program.

Jul 08, 2009

Kristian Rink has written a post discussing the future of the program and what does the community think about it? I feel you must go through it once.

Jul 03, 2009

Since VOC Captains have CC’ed themselves on issue report and I got reply from Michel. Here are I am sharing my ideas and related details;

Brief History

There are over 300 docs, right? When we reached 250 docs, I realized that there was findability issue. If I need a tutorial on how to make use of some feature, which is documented only by a community member and not by Sun writers. Then, user has to put some effort to locate that. Even I had that problem.

So, through mutual agreement, we created several category-specific wikis that would archive docs belonging to those categories. You may read more about that here;

http://nb-community-docs.blogspot.com/2008/11/netbeans-community-docs-reloaded.html

This way we were able to fix the findability issue, temporarily. Yes, temporarily! I thought, we were still missing a page which can provide pointers to all the sections of these category-specific wikis. So, I decided to setup a wiki;

http://wiki.netbeans.org/NBCDMatrix

that will do the needful. Now, if anyone wants (community contributed) tutorials on GUI Builder, just need to bookmark this link;

http://wiki.netbeans.org/NBCDMatrix#section-NBCDMatrix-SwingGUIBuilder

This contains a matrix which has necessary pointers to tackle the issue.

Ideas

Now, coming to the point of concern, i.e. the NetBeans Community Website doesn’t feature pointers to these wikis. As you might know that currently there’s only one pointer to the Community Docs Contributions list from relevant Learning Trails.

Instead, I would love to see a separate “Community Contributed Docs” Learning Trails, where one can have relevant information on how to access these wikis. Also, I would request the NB Team remove the following webpage;

http://www.netbeans.org/community/commdocs.html

Its better to have single Learning Trails page to focus on the above issue, rather than maintaining small sections on every Learning Trail and maintaining the above webpage. It will also ease the work spent by NB Team on such maintenance. Also, the proposed Learning Trail can also be pointed from User FAQs, Developer FAQs, etc.

If someone is unable to find  necessary info in these FAQs, then he/she may navigate to the trail to learn how to find out community contributed docs for their requirement. This should be good enough to make our presence felt in the community, as this Learning Trails would feature in Docs & Support page.

Thanks!

Written by nvarun

July 1, 2009 at 10:06 pm

Blog Series and PrayogShala

leave a comment »

PrayogShala (New Blog)

I have some important news to share, I will contiuning some of the blog series (started here) at another blog. As announced yesterday, I have launched the new blog today.

Currently, there are two posts. One of the them, continues the series I started here with the following blogs;

Hope you will like this change. Also, I have changed the look of this blog as you would notice. Hoping I will continue to provide quality content on both blogs and interested readers may read more about the new blog.

Stay tuned..

Written by nvarun

July 1, 2009 at 4:43 pm

Posted in Kenai, NetBeans, Personal

James Gosling, NBDT Honorary Member

with one comment

I was wondering whether to blog this or not. However, I felt its important the NetBeans Community must know this. Last month at JavaOne, Sven Reimers who received Duke’s Choice Award, inducted James Gosling into the NetBeans Dream Team Wall of Fame. Thank you so much!

Sven Reimers and James Gosling, members of NetBeans Dream Team

Netbeans Dream Team Honorary Members

Honorary members are previous Dream Team members who opted out. They must be a Dream Team member for a continuous year before they are Honorary Members. They reserve the right to be a Dream Team guest at any time. The do not reserve the right to use the Dream Team logo in future works. They do not receive any software, hardware, clothing, or other material benefits which may or may not be given to Dream Team Members.

Other News

I have setup a new blog for my experimental work, I like to carry out either with NetBeans Platform or any other technologies. I will be announcing it tomorrow.

Stay tuned..

Written by nvarun

June 30, 2009 at 8:39 pm

Posted in Java, NetBeans, Personal

Hyperlink Navigation Renaissance | #2

leave a comment »

Last year, I had written a blog on Hyperlink Navigation Renaissance, here’s brief overview;

After lot of discussion on OpenIDE mailing lists, exploring Developer FAQ’s, exerting my wrist, flexing fingers and what not? Finally, hit the deck hard! Yeah, Hyperlink Navigation in NetBeans got smarter! Especially, for HTML documents.

That time, I had developed a plug in, which I have started to discuss about more these days. Yes, its Revamped Hyperlink Navigation and here are list of blogs discussing about it;

These blogs basically describe the history of this plug in, pointers to available resources at Kenai and how do I use SVN for managing the plug in source code from CLI, as well as from NetBeans IDE.

Now, I would like to tell you that there has been many changes since and I thought community would be interested to see the updates in the tutorial, I wrote last year. Have a look at this wiki for updates, rather than the entry at NetBeans Zone (If you want to, then see the comments for updates).

Changes done..

I have got rid of overloaded setPosition methods, instead there would be one method from now onwards. While, some of the methods were renamed and some are no longer parameterized. This has reduced lot of redundant code and now, the code looks really neat. Making use of various editor features to cut-short long line of codes has helped.

Also, I removed the parameterized constructor, instead introduced a public method to pass necessary parameters from HyperlinkProvider implementation. This was done so as to possibly introduce an interface, which the module would depend on, while its implementation is available in another module. Yes, I am trying to make use of Lookup API to achieve same result.

Only issues I have, that currently one module can only depend on another user-defined module within a suite project. However, module I created is standalone one and its not possible to depend on another module, AFAIK. If you know of ways to do so, let me know or join this project to work towards achieving this.

NetBeans 6.7 and Manage Platforms..

All of this was possible due to a feature I recently discovered in NetBeans 6.7 IDE, which was there in previous releases as well. However, I never really explored it. By the way, NetBeans 6.7 FCS is released. Check out the new, super cool homepage of NetBeans DOT org.

NetBeans 6.7 FCS released!

Stay tuned..

Written by nvarun

June 29, 2009 at 8:11 pm

Posted in Dzone, Kenai, NetBeans, Windows

Follow

Get every new post delivered to your Inbox.