Templates for Properties files [message #1694110] |
Thu, 30 April 2015 10:50  |
Eclipse User |
|
|
|
Hi all,
Is it somehow possible to define templates for properties files? Eg. if I type "Message<tab>" I get a list of matching templates, and if I select one the editor automatically inserts something like:
source.SomeName.type=${ask for type}
source.SomeName.prop1=
source.SomeName.prop2=
...
(should prompt for "SomeName" as well).
We are working with a tool that's being configured with such blocks, and each block basically corresponds to a class which is configured using class-specific properties. There's many different types of classes, and it's getting hard to remember all possible properties for a specific class. Plus it's just a lot of typing. I think I could safe my users a lot of work if I can distribute a set of templates, one for each possible class.
Right now it doesn't look like the Eclipse Properties Editor supports this. Is there perhaps a plugin available that adds this? Would it be hard to write a plugin for this?
Maarten
|
|
|
Re: Templates for Properties files [message #1694181 is a reply to message #1694110] |
Fri, 01 May 2015 12:32  |
Eclipse User |
|
|
|
Following up on myself, I've come up with an example that's probably a bit closer to home for most people.
Imagine you are writing log4j.properties files over and over again, wouldn't it be useful if you could type "roll<tab>" and Eclipse would fill in the entire required stanza for a RollingFileAppender, in the process asking you for some main parameters such as appender name, log file name etc?
That's basically the functionality I'm after, and unfortunately Eclipse doesn't offer this at the moment. Not wanting to compare here, but IntelliJ does support this in properties files.
Maarten
|
|
|
Powered by
FUDForum. Page generated in 0.04793 seconds