moved here from IDE.util.java