ResourceBundleWrapper - plugin detail

Generates wrapper accessor class for properties files

NetBeans Plugin - ResourceBundleWrapper
Plugin owner: jayeaeotiv
Website: http://carrowyn.net
Added: 2009-12-25
License: GPLv3
Category: Programming Languages
Downloaded: 575 times
Rating:
 0, by 0 users

Plugin Log Show log

Versions available

Download plugin   Download size: 0.02 MB   Last Update: 2009-12-25

This plugin is also available on the NetBeans Plugin Portal Update Center. Use 'Tools > Plugins' action from the NetBeans IDE main menu for convenient installation of this plugin


What's new in this version



Verifications for NetBeans versions

6.8 verification PASSED See verification details


Introduction

Creates a Java class with simple wrappers for a properties file. Simply right click on the .properties file and choose the Create Wrapper Class item. A class with the name ${yourpropfile}Props.java will be created next to it.
For example if your properties file looks like this:
Db.ConnString=jdbc://blahblah
Db.UserName=User
Db.Password=Password

Then a wrapper would be created with the following methods:
String getDbConnString();
String getDbConnString(String defaultValue);
String getDbUserName();
String getDbUserName(String defaultValue);
String getDbPassword();
String getDbPassword(String defaultValue);
Enjoy!

[ You have to be logged in to be able to comment. ]

User Comments

  

Plugin does work

This plugin works fine if the properties' file is in the src/ directory. At the project's root dir, it didn't work for me. I'm not sure if this is really a problem. The menu item should not show
Posted by melling on Jan 03, 2010
  

This didn't work

I created a new foo.properties file, added your 3 lines, then right-clicked on the filename and selected "Created Wrapper Class" and nothing happened. This was on a Solaris box running Netbeans 6.8.
Posted by melling on Dec 29, 2009
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