boolean (int listIndex) { AnAction action = myList.getModel().getElementAt(listIndex); if (action instanceof ReopenProjectAction) { return !isPathValid((((ReopenProjectAction)action).getProjectPath())); } return false; }