String (@NotNull AnActionEvent e) { String message = e.getData(VcsDataKeys.PRESET_COMMIT_MESSAGE); if (message != null) return message; List<ShelvedChangeList> shelvedChangeLists = ShelvedChangesViewManager.getShelvedLists(e.getDataContext()); if (!shelvedChangeLists.isEmpty()) { return shelvedChangeLists.get(0).DESCRIPTION; } ChangeList[] changeLists = e.getData(VcsDataKeys.CHANGE_LISTS); if (changeLists != null && changeLists.length > 0) { return changeLists[0].getComment(); } return null; }