Good Java property files editor

I work on an open-source Java project, and we have a lot of resource property files that contains localizable message resources. Those files are translated by volunteers to 20+ languages, and I'm a developer who primarily edits code.

In Java, resource files for different locales are grouped together by a naming convention. For example, if the default (normally English) resource is "foo.properties", Japanese resource is in "foo_ja.properties", French one is "foo_fr.properties", etc. For the sake of this question, let's call this group a "resource group."

Now, every so often, I need to refactor those resource files. In addition, I need the tool to support the basics of the property files. All in all, my list of requirements are something like:

  1. Renaming property key name, and I want a tool to rename all the keys in all the files in the same group, without me individually going through them.
  2. Move a property from one resource group to another, and I want a tool to do so for each resource file in the group.
  3. In Java, resource files are in the ISO-8859-1 encoding and not in the platform default encoding.
  4. I don't want to see \uXXXX when editing/browsing property files, but I do expect the tool to preserve them.
  5. I don't want the tool to rearrange the order of properties in the resource file, nor mess with the comments. I expect the tool to preserve them.
  6. I want the tool to handle other syntax details of resource files, such as multiline text.

Unfortunately, I'm not finding any good tool that fits these criteria. I'm primarily an IntelliJ IDEA user, but it doesn't do #2 and #3. Eclipse built-in property file editor is even worse, and AFAICT it doesn't do #1, #2, #4. In fact it lacks the view that cuts across resource files in the same group. NetBeans is similarly primitive. The same goes for NetBeans, although it does #4.

Does anyone know of a good tool that fits the bill?

32
задан Kohsuke Kawaguchi 2 March 2011 в 08:24
поделиться