Code Completion for Namespaces - part I
This is brief overview how to use code completion for namespaced elements in NetBeans 6.8.
Namespaced elements are resolved according name resolution rules.
See examples for namespace name definitions that are important for resolution rules:
// Fully qualified name $c = new \my\name\ExampleClass(); // Qualified name $c = new name\ExampleClass(); // Unqualified name $c = new ExampleClass();
Now we have 3 ways how to create new instance of class ExampleClass. Let's look how to harness code completion to generate all of them.
Fully qualified name
Simply begin with a namespace separator after new keyword (e.g. new \Exam), choose from the list of proposals and press enter.

As a result:

Unqualified name
The same as for fully qualified name - just omit namespace separator at the beginning (e.g. new Exam).

As a result:

Qualified name
Begin with a sub-namespace name (whereas code completion can be used here also ) followed with namespace separator after new keyword (e.g. new name\Exam), choose from the list of proposals and press enter.

As a result:

As mentioned above, for sub-namespace name can be used code completion too.

For e.g. new name\test\Exam can be used code completion 3 times: name, test, Exam.

DO we have any other version of NetBeans. this NetBeans 6.8 is getting trouble often.
Regards,
stutalk.com
Posted by blostutalk on August 10, 2009 at 12:46 PM CEST #
to blostutalk:
NetBeans 6.8 is in development phase, relase is planned for Fall 2009, but using it and reporting bug is very helpful for us and help us make the IDE better.
Latest stable version is 6.7.1:
http://www.netbeans.org/downloads/index.html
Posted by radek on August 10, 2009 at 12:58 PM CEST #
to blostutalk:
BTW: could you report the mentioned problems, thanks
Posted by 192.9.112.196 on August 10, 2009 at 01:02 PM CEST #
Diky! Nice work
Posted by Vitex on August 10, 2009 at 05:04 PM CEST #
It was a very nice idea! Just wanna say thank you for the information you have shared. Just continue writing this kind of post. I will be your loyal reader. Thanks again.
Posted by links of london on October 31, 2009 at 03:27 AM CET #