ResourceEnumGenerator
It is capable to generate dynamically code based on the config file for the folder selected.
I wrote it for creating enums based on a resources folder.
Functionalities:
- Generating JSON or Javascript Object
- Generating Enum for Java
- Generating Enum for C styled languages
- String variable type
- The program auto generates some default settings.config file (for C#) in its executable directory
- If you're using windows, you will be able to see in the SystemTray one icon
- By right-clicking on it, some user-friendly functionalities will appear
- The program will listen to one input folder, in the settings.config it is as PATH_TO_WATCH
- After that, you should update its PATH_TO_CREATE_FILE (aka Output Path)
- You can configure the settings.config for creating enumerators for your language
- You will be able to drag and drop files inside the folder listening, it will dynamically update your enumerators
Explanation on settings.config
| Setting Name | Default Config | Functionality |
|---|---|---|
| PATH_TO_WATCH= | ||
| PATH_TO_WATCH= | ./ | Input path(always recursive) |
| PATH_TO_CREATE_FILE= | ./enumwriter.cs | Output path |
| WILL_USE_CLASS_NAME= | true | Class name on top of file(Defaulted on input directory name) |
| CUSTOM_CLASS_NAME= | If you don't want the default class name | |
| CLASS_NAME_START_WITH_CAPITAL= | true | Capital for the default class name |
| CLASS_DECLARATOR= | public class | Prefix for declarating the class |
| IS_ENUM_MODE= | true | For alternating between pure variable assignment |
| ENUM_DECLARATOR= | public enum | Prefix for declarating enums |
| POST_ENUM_DECLARATION= | Sufix after the enum name | |
| AFTER_ENUM_LAST_BRACKET= | You can use comma for json (or javascript object) | |
| ENUM_CONST_SURROUND_WITH= | Useful for json object, tested with double quotes | |
| ENUM_START_WITH_CAPITAL= | true | Capital for the enum names |
| ENUM_TO_UPPERCASE= | false | Uppercase for enums |
| ENUM_CONST_TO_UPPERCASE= | false | Uppercase for enum constants |
| INNER_CLASS_DECLARATOR= | public static class | Prefix for declaring inner objects(folders with folders inside) when recursion is made necessary |
| POST_INNER_CLASS_DECLARATOR= | Sufix the inner class name | |
| STRING_ARRAY_DECLARATOR= | public static string[] | String declarator (as it will be linked with the enum used as an ID for accessign the resource name) |
| POST_STRING_ARRAY_DECLARATOR= | = new String[] | Sufix for the string array name |
| STRING_ARRAY_PREFIX= | get | Prefix for the string array name |
| WILL_START_STRING_ARRAY_WITH_CAPITAL= | true | Capital for the string array name |
| STRING_ARRAY_SUFIX= | If you prefer using sufixes | |
| STRING_ARRAY_START_BLOCK_SYMBOL= | { | Defaulted on { symbol, as in many languages is a starting block definition |
| STRING_ARRAY_END_BLOCK_SYMBOL= | }; | For ending the string array definition block |
| POST_STRING_DEFINITION= | , | After every string is defined inside the block, the comma will be placed |
| ASSIGN_SYMBOL= | = | Did thinking about json, where the assign symbol is ':' |
| WILL_USE_ASSIGN= | false | If you need to use the assign symbol(Only on non-enum mode) |
| WILL_REMOVE_EXTENSION= | false | Every extension is maintained by replacing with a _, if you prefer, you can remove the extension from the enum name |
| IGNORE_EXTENSIONS= | .config, .java, .git, .classpath, .project | Will ignore archives with these extensions |
| IGNORE_PATHS= | .git, .vscode | Will ignore paths with these prefixes |
WARNING
Every setting must:
- End with '= ', yes, there is one default space after every "=" symbol
- Not listen to Desktop, it won't work
- Must not be running 2 instances for the same input/output
If you ever find some bug, contact me