Lets get into more details about the above and what exactly do we mean by Privileged/Recommended :)

Privileged/Recommended Templates

You have LinkedIn account? Do you Recommend anyone? Are you Privileged enough to get special NetBeans inside access?

Thinking of this and creating an analogy, I will let my Project Type to Recommend some File Templates for itself, and out of those templates, some would be Privileged enough for quick view ;)

Don’t know, what am I talking about?

Well, see the Fig. 1, the “File Templates” you look at are collectively known as Privileged Templates.

Now, looking at Fig. 2, the “Categories” and “Templates” – they are actually Project Context Sensitive ( or Type Specific) :o and thus, they are collectively known as Recommended Templates.

For instance, if you have some categories in Java Project Types, you might not find the same in JavaFX/PHP Project Types and so on. Similarly, every such Project Type would have different set of Privileged Templates.

What to do?

So, how do the developers deal with these issues? What they do, basically is that they just implement either/both of the following interface(s);

PrivilegedTemplates

RecommendedTemplates

This results in providing implementation of one method provided by them and finally, you would see the effect when you run your module.

In NetBeans Sources, I found that these capabilities (as explained earlier in the series) are actually written as nested classes of the class that implements Project Interface, which are then added to the Lookup.

I will soon post more detailed information (also, refer Online Resources) on above by practically applying it, hope you are liking this series. If you’re willing to add/remove some points in this post, comment below.

Online Resources

Next; I will dig deep into the Platform again, its been a month since I have surfed the sources… By the way, many community members are showing interest in creating a project type, hope to see them documenting their experience soon… See ya, until next time.