void () { String oldOptimizeImportsOnSaveProperty = "optimize.imports.on.save"; boolean optimizeAllOld = PropertiesComponent.getInstance(myProject).getBoolean(oldOptimizeImportsOnSaveProperty); if (optimizeAllOld) { setRunOnSaveEnabled(true); setRunForAllFileTypes(); } PropertiesComponent.getInstance(myProject).unsetValue(oldOptimizeImportsOnSaveProperty); }