the future of automated code modification

I think something like the following example should also be possible:

I have a simple UI component (JPanel) which contains
some textfields / checkboxes which are loaded from
a config file, and saved to it again.
Now the task is to add an additional checkbox.
This is a trivial task, that therefore can be automated.
Here are the required steps in detail:

1. declare a new JCheckBox field
2. instantiate the field in the same was as the others ;), give it a new label (prompt for it like in "create mthod from unknown usage")
3. add the field to the panel, like the others (& after the others) - it is enough if the automated process just adds new field at the end ;)
4. set the value of the field in the load method - pop up chooser for config.getParamXYZ()
5. write the value from the field into the config in the save-method - again show chooser for config.setParamXYZ(), maybe autoguess it ;)

That's all. This is similar to struct replace, but it's rather "struct add".

Sure it is not exactly trivial to implement, I suppose ;)
But I think it could be usable, maybe combined with the
"struct replace template recorder" ;)

Nice weekend,

Please sign in to leave a comment.