mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-10-02 10:14:57 +07:00
Cleanup and deprecate old git executable validation
This commit is contained in:
@@ -410,6 +410,7 @@ public class GitVcs extends AbstractVcs<CommittedChangeList> {
|
||||
: Collections.emptyList();
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
@NotNull
|
||||
public GitExecutableValidator getExecutableValidator() {
|
||||
return myExecutableValidator;
|
||||
|
||||
@@ -32,7 +32,9 @@ import java.util.Map;
|
||||
* and to display notification to the user proposing to fix the project set up.
|
||||
*
|
||||
* @author Kirill Likhodedov
|
||||
* @deprecated in favor of {@link GitExecutableManager#identifyVersion(String)} and {@link GitExecutableProblemsNotifier}
|
||||
*/
|
||||
@Deprecated
|
||||
public class GitExecutableValidator extends ExecutableValidator {
|
||||
|
||||
public GitExecutableValidator(@NotNull Project project) {
|
||||
@@ -54,18 +56,4 @@ public class GitExecutableValidator extends ExecutableValidator {
|
||||
public boolean isExecutableValid(@NotNull String executable) {
|
||||
return doCheckExecutable(executable, Collections.singletonList("--version"), GitHandler.getGitTraceEnvironmentVariables());
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if git executable is valid. If not (which is a common case for low-level vcs exceptions), shows the
|
||||
* notification. Otherwise throws the exception.
|
||||
* This is to be used in catch-clauses
|
||||
*
|
||||
* @param e exception which was thrown.
|
||||
* @throws VcsException if git executable is valid.
|
||||
*/
|
||||
public void showNotificationOrThrow(VcsException e) throws VcsException {
|
||||
if (checkExecutableAndNotifyIfNeeded()) {
|
||||
throw e;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user