- Add the Codota plugin to your IDE and get smart completions
private void myMethod () {Connection c =
DataSource dataSource;dataSource.getConnection()
String url;DriverManager.getConnection(url)
IdentityDatabaseUtil.getDBConnection()
- Smart code suggestions by Codota
}
@Override public void run(@NotNull ProgressIndicator indicator) { GitRemote remote; String fetch; String url; boolean commitIsFetched = checkIfCommitIsFetched(gitRepository, commitHash); if (commitIsFetched) { // 'git fetch' works with a local path instead of a remote -> this way FETCH_HEAD is set remote = new GitRemote(gitRepository.getRoot().getPath(), Collections.<String>emptyList(), Collections.<String>emptySet(), Collections.<String>emptyList(), Collections.<String>emptyList()); fetch = commitHash; url = ""; } else { remote = getRemoteForChange(project, gitRepository, fetchInfo).orNull(); if (remote == null) { return; } fetch = fetchInfo.ref; url = remote.getFirstUrl(); } GitFetchResult result = fetchNatively(gitRepository.getGitDir(), remote, url, fetch, project, indicator); if (!result.isSuccess()) { GitFetcher.displayFetchResult(project, result, null, result.getErrors()); } } });
private boolean doFetchRemote(@NotNull BranchInfo branch) { if (branch.getName() == null) { return false; } GitFetchResult result = new GitFetcher(project, new EmptyProgressIndicator(), false).fetch(gitRepository.getRoot(), branch.getRemoteName(), null); if (!result.isSuccess()) { GitFetcher.displayFetchResult(project, result, null, result.getErrors()); return false; } return true; }