Monday, June 30, 2008

Refactoring Improvements for i18n Module in Netbeans'

Refactoring is the process of making changes to an application's code without affecting the outward behavior of the application.Refactoring feature could be extended to i18n module of Netbeans too.

Following are the missing features related to Refactoring that can be successfully implemented on Netbeans if nurtured properly,

Scenario 1: *.properties file of every project must be synced effectively with the source. Say I have a file named Foo.java inside a project that contains a properties file named abc.properties. Assume that I have internationalized most of the Hard coded strings in Foo.java whose corresponding key-value pairs are placed in *.properties file. I deleted few of the Hard coded strings from Foo.java. But my abc.properties file doesn't reflect that change. It may soon lead me to confusion if I have several key-value pairs in properties file.

Suggested Solution: It'd be better if my abc.properties could dynamically reflect the changes I made to my Foo.java file. Life would have been much better for people like me. When few strings are deleted from the original Source file, User must right click inside the editor and he should see an option like "Sync" and when clicked on it properties file should change accordingly.

Scenario 2:Imagine I have several properties file in different directories but under a single project. I need all of them under same directory during runtime.

Suggested Solution: When user right clicks inside the editor he must be able to see an option like "Resolve Property file dependencies". When clicked all properties file must be dumped into a single folder and the respective paths must get updated in the original source file.

Another probably missing feature is the Auto Completion (intuitive String completion) feature.
Scenario:Say I have put a certain no. of key-value pairs in my properties file. Now when I try to use them in my original source file, when I write a code like this:
Nbbundle.getBundle().getString("SEVERAL_KEYZ");
code completion popupmenu should appear showing the available keys.

No comments: