Quantcast
Channel: JetBrains Developer Community : Thread List - IntelliJ IDEA Users
Viewing all articles
Browse latest Browse all 5661

System.out.println -> out.println + import static, Novice Tip

$
0
0

Let’s say you wanted to convert all your System.out.println to

out.println with an import static java.lang.System.out; at the top.

How do you get all the imports only in the files where needed? Just

use a bulk regex search replace to insert imports just after the

package statement on all files. Then do a bulk Optimise

Imports/Reformat code to tidy the imports. The optimise discards the

unneeded imports, sorts and aligns them.

--

Roedy Green Canadian Mind Products http://mindprod.com

"Don't worry about people stealing an idea; if it's original, you'll

have to shove it down their throats."

~ Howard Aiken (born: 1900-03-08 died: 1973-03-14 at age: 73)

 


Viewing all articles
Browse latest Browse all 5661

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>