I think you can use code templates if your IDE supports them. I prefer NetBeans as an IDE for my Java projects. It has some predefined code templates that will be expanded on pressing TAB
button.
For example, if you type sout
and press TAB
it will be expanded to
System.out.println("");
with the caret placed between the double-quotes ready to get your string.
There are tens of code templates provided there, ranging from simple St
that expands the String
keyword to bigger blocks of code. The advantage of using this feature is that the caret will move to some predefined points that need to be filled. See Code templates in Netbeans
You can also add your own shortcuts and code templates, this might be useful and reduces typing you have to do by the dictation software.
I don't know about other IDEs such as IntelliJ or Eclipse, maybe they have something similarly productive there.