mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
vcs: commit action text should not depend on order of affected vcses
* fix case, when one of affected vcses doesn't have a CheckinEnvironment
This commit is contained in:
+6
-9
@@ -761,17 +761,14 @@ public class CommitChangeListDialog extends DialogWrapper implements CheckinProj
|
||||
|
||||
@NotNull
|
||||
private static String getCommitActionName(@NotNull Collection<AbstractVcs> affectedVcses) {
|
||||
String name = null;
|
||||
for (AbstractVcs vcs : affectedVcses) {
|
||||
Set<String> names = map2SetNotNull(affectedVcses, vcs -> {
|
||||
CheckinEnvironment checkinEnvironment = vcs.getCheckinEnvironment();
|
||||
if (name == null && checkinEnvironment != null) {
|
||||
name = checkinEnvironment.getCheckinOperationName();
|
||||
}
|
||||
else {
|
||||
name = VcsBundle.getString("commit.dialog.default.commit.operation.name");
|
||||
}
|
||||
return checkinEnvironment != null ? checkinEnvironment.getCheckinOperationName() : null;
|
||||
});
|
||||
if (names.size() == 1) {
|
||||
return notNull(ContainerUtil.getFirstItem(names));
|
||||
}
|
||||
return name != null ? name : VcsBundle.getString("commit.dialog.default.commit.operation.name");
|
||||
return VcsBundle.getString("commit.dialog.default.commit.operation.name");
|
||||
}
|
||||
|
||||
private boolean checkComment() {
|
||||
|
||||
Reference in New Issue
Block a user