From cbf991a3cc0dd0664acfc7c4655aeecf2d317402 Mon Sep 17 00:00:00 2001 From: UNV Date: Thu, 12 Feb 2026 19:35:13 +0300 Subject: [PATCH] GitVcsPanel refactoring. --- .../java/consulo/git/config/GitVcsPanel.java | 20 +++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/plugin/src/main/java/consulo/git/config/GitVcsPanel.java b/plugin/src/main/java/consulo/git/config/GitVcsPanel.java index de9f269..55b32c2 100644 --- a/plugin/src/main/java/consulo/git/config/GitVcsPanel.java +++ b/plugin/src/main/java/consulo/git/config/GitVcsPanel.java @@ -89,7 +89,7 @@ public GitVcsPanel(@Nonnull Project project, @Nonnull Disposable uiDisposable) { mySSHExecutableComboBox = ComboBox.create(GitVcsApplicationSettings.SshExecutable.values()); mySSHExecutableComboBox.setValue(GitVcsApplicationSettings.SshExecutable.IDEA_SSH); - mySSHExecutableComboBox.setTextRender(sshExecutable -> switch (sshExecutable) { + mySSHExecutableComboBox.setTextRenderer(sshExecutable -> switch (sshExecutable) { case IDEA_SSH -> GitLocalize.gitVcsConfigSshModeIdea(); case NATIVE_SSH -> GitLocalize.gitVcsConfigSshModeNative(); case PUTTY -> GitLocalize.gitVcsConfigSshModePutty(); @@ -127,9 +127,11 @@ public GitVcsPanel(@Nonnull Project project, @Nonnull Disposable uiDisposable) { updateMethodLabeled.addBorder(BorderPosition.LEFT, BorderStyle.EMPTY, 18); myRootPanel.add(updateMethodLabeled); myRootPanel.add(myAutoUpdateIfPushRejected); - myRootPanel.add(DockLayout.create() - .left(myEnableForcePush) - .right(HorizontalLayout.create(5).add(myProtectedBranchesLabel).add(myProtectedBranchesButton))); + myRootPanel.add( + DockLayout.create() + .left(myEnableForcePush) + .right(HorizontalLayout.create(5).add(myProtectedBranchesLabel).add(myProtectedBranchesButton)) + ); } /** @@ -224,7 +226,7 @@ public boolean isModified(@Nonnull GitVcsSettings settings, @Nonnull GitSharedSe || settings.isForcePushAllowed() != myEnableForcePush.getValueOrError() || settings.getUpdateType() != myUpdateMethodComboBox.getValueOrError() || !ContainerUtil.sorted(sharedSettings.getForcePushProhibitedPatterns()) - .equals(ContainerUtil.sorted(getProtectedBranchesPatterns())); + .equals(ContainerUtil.sorted(getProtectedBranchesPatterns())); } /** @@ -236,9 +238,11 @@ public boolean isModified(@Nonnull GitVcsSettings settings, @Nonnull GitSharedSe public void save(@Nonnull GitVcsSettings settings, GitSharedSettings sharedSettings) { settings.getAppSettings().setPathToGit(getCurrentExecutablePath()); // run check later - myProject.getUIAccess().give(() -> Task.Backgroundable.queue(myProject, "Checking Git Version...", progressIndicator -> { - myVcs.checkVersion(); - })); + myProject.getUIAccess().give(() -> Task.Backgroundable.queue( + myProject, + "Checking Git Version...", + progressIndicator -> myVcs.checkVersion() + )); settings.getAppSettings().setIdeaSsh(mySSHExecutableComboBox.getValueOrError()); settings.setAutoUpdateIfPushRejected(myAutoUpdateIfPushRejected.getValueOrError());