Welcome to Software Development on Codidact!
Will you help us build our independent community of developers helping developers? We're small and trying to grow. We welcome questions about all aspects of software development, from design to code to QA and more. Got questions? Got answers? Got code you'd like someone to review? Please join us.
eclipse templates -- creating and setting a permanent variable
In eclipse (java) Window->Preferences->Java->New new templates can be created.
In the field "Pattern" I entered
System.out.println("DEBUG ${label}");
${cursor}
I like old-style debugging, so I use a lot statements like System.out.println("DEBUG A"); ... System.out.println("DEBUG Z");.
The question is, can (and if so, how) I have the variable ${label} to be permanent and auto-increasing?
So that calling it first time, it has value "A", second time "B" and so on.
The question is not restricted to the use-case above, templates are a mighty tool, if you know how to use it.

1 comment thread