eclipse-rbe
eclipse-rbe copied to clipboard
Looking for internals
Hi I'm trying to reformat my property files without opening eclipse (because sometimes eclipse is too heavy/ try to check for missing locale messages in a commit hook or CI step with e.g. jenkins) so I'm looking for the internal data layer of eclipse-rbe. Can you point me to some class names or a package? :wink:
Where can I find something like the following in your project?
ResourceBundleEditor editor = ResourceBundleEditor.builder()
.withPropertyFilePrefix(prefix)
.otherConfigs(..)
.withLocal("en")
.withLocal(locale)
.build(mainFolder);
editor.put("key", "value");
editor.put("key", "value", locale);
editor.get("key");
editor.toMultimap();
editor.reformatAndSave(); // <--
I am not sure running this outside Eclipse will work flawlessly given the dependencies on some Eclipse runtime objects, such as the preference store (for formatting preferences).
With some code modification you maybe able to get what you want. I suggest you start by looking at the following classes:
- com.essiembre.eclipse.rbe.model.Bundle
- com.essiembre.eclipse.rbe.model.PropertiesGenerator
- com.essiembre.eclipse.rbe.model.PropertiesParser
Okay I think my question is answered, thanks.
btw: what do you think about to build your plugin with a tool like Tycho this could be helpful to create a spin-off like eclipse-rbe-standalone.jar or eclipse-rbe-formatter.jar ... or out of scope?