0

So there is this new feature which will allow post fixes. Example is that if I have String s = "hello"; then I can type s.sysout and Ctrl Space and it will change to System.out.println(s); In the Eclipse Template proposals, this is what it has System.out.println(${i:inner_expression(java.lang.String)}${});${cursor} in the description. So basically it works for any String How can I edit that line so it will work for anything? ie int, double, boolean, anything (it would take that and put it in a System.out.println() )

Edit: it is not a duplicate, I want to edit the above code in the template so it would work for every data type not just Strings. Right now, there was only 1 answer so I accepted it

  • You might find your answers here: https://github.com/trylimits/Eclipse-Postfix-Code-Completion This can be useful too: https://stackoverflow.com/questions/1020027/how-to-use-the-sysout-snippet-in-eclipse-with-selected-text – stackstack293 Oct 22 '20 at 00:10
  • I closed this as a duplicate, because you accepted an answer linking to that question. If it is not a duplicate, then [edit] your question to clarify why it's not a duplicate of that question. – Makyen Oct 22 '20 at 02:02
  • I just edited how do i open the question again –  Oct 22 '20 at 20:41

0 Answers0