void (LocalTask task, @NotNull String shelfName) { Collection<Change> changes = ChangeListManager.getInstance(myProject).getDefaultChangeList().getChanges(); if (changes.isEmpty()) return; try { ShelveChangesManager.getInstance(myProject).shelveChanges(changes, shelfName, true); task.setShelfName(shelfName); } catch (Exception e) { LOG.warn("Can't shelve changes", e); } }