You optimise code in an IDE the same way you optimise it outside the IDE: you don't.
Not quite true: You make sure to use efficient algorithms, eg bubble sort is faster than merge sort for 20 items, but merge sort is much faster over about 100 items. You avoid using + for Strings in several lines; use a StringBuilder instead. You avoid unnecessary synchronization (use ArrayList instead of Vector). You read
this article by Brian Goetz which tells you what to so. You ask a bartender to move this
thread to Performance.