void () { if (!myProject.isDisposed()) { // Rely on project view to commit PSI and wait until it's updated. if (myTreeStructure.hasSomethingToCommit() ) { myUpdateAlarm.cancelAllRequests(); myUpdateAlarm.addRequest(this, 300, ModalityState.stateForComponent(myList)); return; } updateList(shouldRefreshSelection); } }