Unnamed: 0
int64
0
305k
body
stringlengths
7
52.9k
name
stringlengths
1
185
66,500
int () { int result = myFile.hashCode(); result = 31 * result + myUrl.hashCode(); result = 31 * result + myRepositoryUrl.hashCode(); result = 31 * result + (myError != null ? myError.getMessage().hashCode() : 0); return result; }
hashCode
66,501
JComponent () { return myMainPanel; }
getComponent
66,502
void (@NotNull SvnConfiguration configuration) { myUseCommonProxy.setSelected(configuration.isUseDefaultProxy()); mySSHConnectionTimeout.setValue(Long.valueOf(configuration.getSshConnectionTimeout() / 1000)); mySSHReadTimeout.setValue(Long.valueOf(configuration.getSshReadTimeout() / 1000)); myHttpTimeout.setValue(Long....
reset
66,503
boolean (@NotNull SvnConfiguration configuration) { if (configuration.isUseDefaultProxy() != myUseCommonProxy.isSelected()) { return true; } if (configuration.getSshConnectionTimeout() / 1000 != ((SpinnerNumberModel)mySSHConnectionTimeout.getModel()).getNumber().longValue()) { return true; } if (configuration.getSshRea...
isModified
66,504
void (@NotNull SvnConfiguration configuration) { configuration.setUseDefaultProxy(myUseCommonProxy.isSelected()); configuration.setSshConnectionTimeout(((SpinnerNumberModel)mySSHConnectionTimeout.getModel()).getNumber().longValue() * 1000); configuration.setSshReadTimeout(((SpinnerNumberModel)mySSHReadTimeout.getModel(...
apply
66,505
void () { final SvnConfiguration configuration = SvnConfiguration.getInstance(myProject); myNavigateToCommonProxyLink = new LinkLabel<>(SvnBundle.message("navigate.to.idea.proxy.settings"), null); final Long maximum = 30 * 60 * 1000L; final long connection = configuration.getSshConnectionTimeout() <= maximum ? configur...
createUIComponents
66,506
JSpinner (SpinnerModel sm) { JSpinner result = new JSpinner(sm); JComponent editor = result.getEditor(); if (UIUtil.isUnderWin10LookAndFeel() && editor instanceof JSpinner.DefaultEditor) { ((JSpinner.DefaultEditor)editor).getTextField().setHorizontalAlignment(SwingConstants.RIGHT); } return result; }
createSpinner
66,507
String () { return "SvnBinaryContentRevision:" + myFile; }
toString
66,508
SvnCommandName (boolean isMove) { return isMove ? SvnCommandName.move : SvnCommandName.copy; }
getCommandName
66,509
void (@NotNull final Project project, Listener listener) { // TODO: Several dialogs is invoked while dialog.show() - seems code should be rewritten to be more transparent CheckoutDialog dialog = new CheckoutDialog(project, listener); dialog.show(); }
doCheckout
66,510
void (@NotNull Project project, @NotNull File target, @NotNull Url url, Revision revision, Depth depth, boolean ignoreExternals, @Nullable Listener listener) { if (!target.exists()) { target.mkdirs(); } final WorkingCopyFormat selectedFormat = promptForWCopyFormat(target, project); // UNKNOWN here means operation was c...
doCheckout
66,511
ClientFactory (@NotNull SvnVcs vcs) { return vcs.getFactoryFromSettings(); }
getFactory
66,512
void (Project project, File target, @NotNull Url url, Revision revision, Depth depth, boolean ignoreExternals, Listener listener, WorkingCopyFormat selectedFormat) { String projectAbsolutePath = target.getAbsolutePath(); String projectPath = FileUtilRt.toSystemIndependentName(projectAbsolutePath); CloneTask cloneTask =...
checkout
66,513
CloneTaskInfo () { return new CloneTaskInfo(message("progress.title.check.out"), message("progress.title.check.out.cancel"), message("checkout.repository"), message("checkout.repository.tooltip"), message("checkout.repository.failed"), message("checkout.repository.canceled"), message("checkout.stop.message.title"), mes...
taskInfo
66,514
CloneStatus (@NotNull ProgressIndicator indicator) { WorkingCopyFormat format = selectedFormat == null ? UNKNOWN : selectedFormat; SvnVcs vcs = SvnVcs.getInstance(project); ProgressTracker handler = new CheckoutEventHandler(vcs, false, ProgressManager.getInstance().getProgressIndicator()); indicator.setText(message("pr...
run
66,515
void () { notifyRootManagerIfUnderProject(project, target); if (listener != null) { if (!checkoutSuccessful.isNull()) { listener.directoryCheckedOut(target, SvnVcs.getKey()); } listener.checkoutCompleted(); } }
notifyListener
66,516
void (@NotNull Project project, @NotNull File directory) { if (project.isDefault()) return; VirtualFile[] files = SvnVcs.getInstance(project).getSvnFileUrlMapping().getNotFilteredRoots(); for (VirtualFile file : files) { if (FileUtil.isAncestor(virtualToIoFile(file), directory, false)) { // todo: should be done like au...
notifyRootManagerIfUnderProject
66,517
WorkingCopyFormat (@NotNull File target, @NotNull Project project) { return new CheckoutFormatFromUserProvider(project, target).prompt(); }
promptForWCopyFormat
66,518
void (final Project project, final File target, final Url url, final Depth depth, final boolean ignoreExternals, final boolean force, final String eolStyle) { try { final VcsException[] exception = new VcsException[1]; final SvnVcs vcs = SvnVcs.getInstance(project); ProgressManager.getInstance().runProcessWithProgressS...
doExport
66,519
void (final Project project, final File target, final Url url, final Depth depth, final boolean includeIgnored, final String message) { final Ref<@Nls String> errorMessage = new Ref<>(); final SvnVcs vcs = SvnVcs.getInstance(project); final String targetPath = target.getAbsolutePath(); ExclusiveBackgroundVcsAction.run(...
doImport
66,520
boolean (@NotNull File file) { final VirtualFile vf = myLfs.findFileByIoFile(file); return vf != null && myFilter.accept(vf); }
test
66,521
String () { return message("svn.name.with.mnemonic"); }
getVcsName
66,522
WorkingCopyFormat () { assert !getApplication().isUnitTestMode(); final WorkingCopyFormat result = displayUpgradeDialog(); BackgroundTaskUtil.syncPublisher(SvnVcs.WC_CONVERTED).run(); return result; }
prompt
66,523
WorkingCopyFormat () { final UpgradeFormatDialog dialog = new UpgradeFormatDialog(myProject, myPath, false); final ModalityState dialogState = any(); dialog.startLoading(); getApplication().executeOnPooledThread(() -> { final List<WorkingCopyFormat> formats = loadSupportedFormats(); getApplication().invokeLater(() -> {...
displayUpgradeDialog
66,524
List<WorkingCopyFormat> () { List<WorkingCopyFormat> result = new ArrayList<>(); try { result.addAll(myVcs.getFactoryFromSettings().createCheckoutClient().getSupportedFormats()); } catch (VcsException e) { error.set(e.getMessage()); } return result; }
loadSupportedFormats
66,525
VcsCloneComponent (@NotNull Project project, @NotNull ModalityState modalityState, @NotNull VcsCloneDialogComponentStateListener dialogStateListener) { return new SvnCloneDialogExtension(project); }
buildVcsCloneComponent
66,526
void (ProgressEvent event) { if (event.getPath() == null) { return; } if (event.getAction() == EventAction.UPDATE_EXTERNAL) { myExternalsCount++; progress(message("progress.text2.fetching.external.location", event.getFile().getAbsolutePath())); } else if (event.getAction() == EventAction.UPDATE_ADD) { progress2(myIsExp...
consume
66,527
void (@ProgressText @NotNull String text) { if (myIndicator != null) { myIndicator.checkCanceled(); myIndicator.setText(text); myIndicator.setText2(""); } else { ProgressManager.progress(text); } }
progress
66,528
void (@ProgressDetails @NotNull String text) { if (myIndicator != null) { myIndicator.checkCanceled(); myIndicator.setText2(text); } else { ProgressManager.progress2(text); } }
progress2
66,529
List<String> (File file, Depth depth, boolean makeParents, boolean includeIgnored, boolean force) { List<String> parameters = new ArrayList<>(); CommandUtil.put(parameters, file); CommandUtil.put(parameters, depth); CommandUtil.put(parameters, makeParents, "--parents"); CommandUtil.put(parameters, includeIgnored, "--no...
prepareParameters
66,530
ProgressEvent (Matcher o) { StatusType contentStatus = CommandUtil.getStatusType(o.group(1)); String path = o.group(3); return new ProgressEvent(new File(path), 0, contentStatus, null, null, null, null); }
convert
66,531
String () { return myKey; }
toString
66,532
void (@NotNull ConflictAction action) { ourAllActions.put(action.myKey, action); for (String otherKey : action.myOtherKeys) { ourAllActions.put(otherKey, action); } }
register
66,533
ConflictAction (@NotNull String actionName) { ConflictAction result = ourAllActions.get(actionName); if (result == null) { throw new IllegalArgumentException("Unknown conflict action " + actionName); } return result; }
from
66,534
String () { return myKey; }
toString
66,535
void (@NotNull ConflictReason reason) { ourAllReasons.put(reason.myKey, reason); for (String key : reason.myOtherKeys) { ourAllReasons.put(key, reason); } }
register
66,536
ConflictReason (@NotNull String reasonName) { ConflictReason result = ourAllReasons.get(reasonName); if (result == null) { throw new IllegalArgumentException("Unknown conflict reason " + reasonName); } return result; }
from
66,537
ConflictOperation (@NotNull @NonNls String operationName) { return valueOf(ConflictOperation.class, StringUtil.toUpperCase(operationName)); }
from
66,538
String () { return StringUtil.toLowerCase(super.toString()); }
toString
66,539
ProgressEvent (@NotNull Matcher matcher) { String statusMessage = matcher.group(1); String path = matcher.group(2); return createEvent(new File(path), createAction(statusMessage)); }
convert
66,540
EventAction (@NotNull String code) { return switch (code) { case REVERTED_CODE -> EventAction.REVERT; case FAILED_TO_REVERT_CODE -> EventAction.FAILED_REVERT; case SKIPPED_CODE -> EventAction.SKIP; default -> null; }; }
createAction
66,541
AuthenticationData (final AuthenticationData in, final boolean storeAuth) { if (in.isStorageAllowed() == storeAuth || ( ! in.isStorageAllowed())) return in; return putPassedValueAsSave(in, storeAuth); }
proxy
66,542
AuthenticationData (AuthenticationData in, boolean storeAuth) { if (in instanceof PasswordAuthenticationData) { return new PasswordAuthenticationData(((PasswordAuthenticationData)in).getCredentials(), storeAuth); } else if (in instanceof CertificateAuthenticationData) { return new CertificateAuthenticationData(((Certif...
putPassedValueAsSave
66,543
AuthenticationData (final String kind, final Url url, final String realm, final boolean canCache) { SvnAuthenticationNotifier.AuthenticationRequest obj = new SvnAuthenticationNotifier.AuthenticationRequest(myProject, kind, url, realm); SvnAuthenticationNotifier notifier = SvnAuthenticationNotifier.getInstance(myProject...
requestClientAuthentication
66,544
AcceptResult (Url url, String realm, final Object certificate, final boolean canCache) { return mySvnInteractiveAuthenticationProvider.acceptServerAuthentication(url, realm, certificate, canCache); }
acceptServerAuthentication
66,545
SvnVcs () { return myVcs; }
getVcs
66,546
boolean () { return myIsActive; }
isActive
66,547
AcceptResult (final @NotNull Url url, final @NotNull String certificateInfo) { // TODO: Probably explicitly construct server url for realm here - like in CertificateTrustManager. String realm = url.toDecodedString(); Object data = SvnConfiguration.RUNTIME_AUTH_CACHE.getDataWithLowerCheck(TERMINAL_SSL_SERVER_AUTH_KIND, ...
acceptCertificate
66,548
HttpClient (@NotNull Url repositoryUrl) { // TODO: Implement algorithm of resolving necessary enabled protocols (TLSv1 vs SSLv3) instead of just using values from Settings. SSLContext sslContext = createSslContext(repositoryUrl); List<String> supportedProtocols = getSupportedSslProtocols(); SSLConnectionSocketFactory s...
getClient
66,549
List<String> () { List<String> result = new ArrayList<>(); switch (myConfiguration.getSslProtocols()) { case sslv3 -> result.add(SSL_V3_PROTOCOL); case tlsv1 -> result.add(TLS_V1_PROTOCOL); case all -> {} } return result; }
getSupportedSslProtocols
66,550
SSLContext (@NotNull Url url) { SSLContext result = CertificateManager.getSystemSslContext(); TrustManager trustManager = new CertificateTrustManager(this, url); try { result.init(CertificateManager.getDefaultKeyManagers(), new TrustManager[]{trustManager}, null); } catch (KeyManagementException e) { LOG.error(e); } re...
createSslContext
66,551
SvnAuthenticationManager () { return isActive() ? myConfiguration.getInteractiveManager(myVcs) : myConfiguration.getPassiveAuthenticationManager(myVcs); }
getAuthenticationManager
66,552
boolean () { final HttpConfigurable instance = HttpConfigurable.getInstance(); return myConfiguration.isUseDefaultProxy() && (instance.USE_HTTP_PROXY || instance.USE_PROXY_PAC); }
haveDataForTmpConfig
66,553
void () { HttpConfigurable instance = HttpConfigurable.getInstance(); String message = instance.USE_HTTP_PROXY || instance.USE_PROXY_PAC ? message("popup.content.failed.to.authenticate.to.proxy.change.credentials") : message("popup.content.failed.to.authenticate.to.proxy"); PopupUtil.showBalloonForActiveComponent(messa...
showFailedAuthenticateProxy
66,554
void () { }
reset
66,555
Path () { return myConfiguration.getConfigurationPath(); }
getSpecialConfigDir
66,556
String () { return code; }
toString
66,557
AcceptResult (int value) { if (value < 0 || value >= allValues.length) { throw new IllegalArgumentException("Unknown AcceptResult - " + value); } return allValues[value]; }
from
66,558
void () { myCallState.set(null); }
clearCallState
66,559
boolean () { return myCallState.get() != null && myCallState.get().isWasCalled(); }
wasCalled
66,560
boolean () { return myCallState.get() != null && myCallState.get().isWasCancelled(); }
wasCancelled
66,561
AuthenticationData (final String kind, final Url url, final String realm, final boolean canCache) { final MyCallState callState = new MyCallState(true, false); myCallState.set(callState); // once we came here, we don't know _correct_ auth todo +- myVcs.getSvnConfiguration().clearCredentials(kind, realm); final Authenti...
requestClientAuthentication
66,562
AcceptResult (final Url url, String realm, final Object certificate, final boolean canCache) { Ref<AcceptResult> result = Ref.create(AcceptResult.REJECTED); Runnable command; if (certificate instanceof X509Certificate || certificate instanceof String) { command = () -> { ServerSSLDialog dialog = certificate instanceof ...
acceptServerAuthentication
66,563
void (@NotNull Runnable command) { WaitForProgressToShow.runOrInvokeAndWaitAboveProgress(command, ModalityState.any()); }
showAndWait
66,564
boolean () { return myWasCalled; }
isWasCalled
66,565
boolean () { return myWasCancelled; }
isWasCancelled
66,566
void (boolean wasCancelled) { myWasCancelled = wasCancelled; }
setWasCancelled
66,567
AuthenticationData (String kind, String realm) { return (AuthenticationData)SvnConfiguration.RUNTIME_AUTH_CACHE.getDataWithLowerCheck(kind, realm); }
requestFromCache
66,568
String () { return SystemProperties.getUserName(); }
getDefaultUsername
66,569
void (AuthenticationProvider provider) { myProvider = provider; }
setAuthenticationProvider
66,570
AuthenticationProvider () { return myProvider; }
getProvider
66,571
HostOptions (@NotNull Url url) { return new HostOptions(url); }
getHostOptions
66,572
void (String kind, Url url, String realm, AuthenticationData authentication) { boolean authStorageEnabled = getHostOptions(url).isAuthStorageEnabled(); AuthenticationData proxy = ProxySvnAuthentication.proxy(authentication, authStorageEnabled); SvnConfiguration.getInstance(myProject).acknowledge(kind, realm, proxy); }
acknowledgeAuthentication
66,573
int (@NotNull Url url) { String protocol = url.getProtocol(); if (HTTP.equals(protocol) || HTTPS.equals(protocol)) { String host = url.getHost(); String timeout = getPropertyIdea(host, myServersFile.getValue(), ServersFileKeys.TIMEOUT); if (timeout != null) { try { return Integer.parseInt(timeout) * 1000; } catch (Numb...
getReadTimeout
66,574
int (@NotNull Url url) { String protocol = url.getProtocol(); if (SVN_SSH.equals(protocol)) { return (int)SvnConfiguration.getInstance(myProject).getSshConnectionTimeout(); } return HTTP.equals(protocol) || HTTPS.equals(protocol) ? DEFAULT_CONNECT_TIMEOUT : 0; }
getConnectTimeout
66,575
void () { showOverChangesView(myProject, message("svn.cannot.save.credentials.store-auth-creds"), MessageType.ERROR); }
warnOnAuthStorageDisabled
66,576
boolean () { String perHostValue = getPropertyIdea(myUrl.getHost(), myServersFile.getValue(), "store-auth-creds"); boolean storageEnabled = perHostValue != null ? isTurned(perHostValue, false) : isTurned(getValue(myConfigFile.getValue(), "auth", "store-auth-creds"), true); if (!storageEnabled) { warnOnAuthStorageDisabl...
isAuthStorageEnabled
66,577
String () { return getPropertyIdea(myUrl.getHost(), myServersFile.getValue(), "ssl-client-cert-file"); }
getSSLClientCertFile
66,578
boolean (@NotNull X509Certificate certificate) { Object cachedData = SvnConfiguration.RUNTIME_AUTH_CACHE.getDataWithLowerCheck(CMD_SSL_SERVER, myRealm); return certificate.equals(cachedData); }
checkPassive
66,579
boolean (X509Certificate @NotNull [] chain, String authType) { boolean result; try { CertificateManager.getInstance().getTrustManager().checkServerTrusted(chain, authType, ConfirmingTrustManager.CertificateConfirmationParameters.doNotAskConfirmation()); result = true; } catch (CertificateException e) { LOG.debug(e); re...
isAcceptedByIdea
66,580
void (@NotNull X509Certificate certificate) { myAuthenticationService.getVcs().getSvnConfiguration().acknowledge(CMD_SSL_SERVER, myRealm, certificate); }
acknowledge
66,581
X509Certificate[] () { return CertificateManager.getInstance().getTrustManager().getAcceptedIssuers(); }
getAcceptedIssuers
66,582
boolean () { return isRefreshing; }
isRefreshing
66,583
void () { if (isRefreshing) return; isRefreshing = true; getVcs().invokeRefreshSvnRoots(); }
refresh
66,584
SvnVcs () { return SvnVcs.getInstance(myProject); }
getVcs
66,585
void (boolean rootsChanged) { if (rootsChanged) { if (getApplication().isUnitTestMode()) { doRefresh(); } else { getApplication().executeOnPooledThread(this::doRefresh); } } else { getApplication().invokeLater(() -> isRefreshing = false, ModalityState.nonModal()); } }
rootsReloaded
66,586
void () { List<WCInfo> infoList = getVcs().getWcInfosWithErrors(); boolean hasErrors = !getVcs().getSvnFileUrlMapping().getErrorRoots().isEmpty(); List<WorkingCopyFormat> supportedFormats = getSupportedFormats(); getApplication().invokeLater(() -> setWorkingCopies(infoList, hasErrors, supportedFormats), ModalityState.n...
doRefresh
66,587
void (@NotNull List<WCInfo> infoList, boolean hasErrors, List<WorkingCopyFormat> supportedFormats) { infoList.sort(comparing(WCInfo::getPath)); updateList(infoList, supportedFormats); isRefreshing = false; showErrorNotification(hasErrors); }
setWorkingCopies
66,588
void (@NotNull final List<WCInfo> infoList, @NotNull final List<WorkingCopyFormat> supportedFormats) { myPanel.removeAll(); for (final WCInfo wcInfo : infoList) { final Collection<WorkingCopyFormat> upgradeFormats = getUpgradeFormats(wcInfo, supportedFormats); WorkingCopyInfoPanel infoPanel = new WorkingCopyInfoPanel()...
updateList
66,589
void (HyperlinkEvent e) { if (e.getEventType() != HyperlinkEvent.EventType.ACTIVATED) return; performAction(wcInfo, upgradeFormats, infoPanel, e.getDescription()); }
hyperlinkUpdate
66,590
List<WorkingCopyFormat> () { List<WorkingCopyFormat> result = new ArrayList<>(); ClientFactory factory = getVcs().getFactory(); try { result.addAll(factory.createUpgradeClient().getSupportedFormats()); } catch (VcsException e) { LOG.info(e); } return result; }
getSupportedFormats
66,591
Set<WorkingCopyFormat> (@NotNull WCInfo info, @NotNull List<WorkingCopyFormat> supportedFormats) { Set<WorkingCopyFormat> canUpgradeTo = EnumSet.noneOf(WorkingCopyFormat.class); for (WorkingCopyFormat format : supportedFormats) { if (format.isOrGreater(info.getFormat())) { canUpgradeTo.add(format); } } canUpgradeTo.add...
getUpgradeFormats
66,592
boolean (@NotNull VirtualFile root, @ActionText @NotNull String actionName) { if (root.isValid()) return true; showWarningDialog(myProject, message("dialog.message.invalid.working.copy.root", root.getPath()), message("dialog.title.can.not.invoke.action", actionName)); return false; }
checkRoot
66,593
void (@NotNull WCInfo wcInfo, @NotNull Collection<WorkingCopyFormat> upgradeFormats, @NotNull WorkingCopyInfoPanel infoPanel, @NonNls @Nullable String actionName) { if (CONFIGURE_BRANCHES.equals(actionName)) { configureBranches(wcInfo); } else if (FIX_DEPTH.equals(actionName)) { fixDepth(wcInfo); } else if (CHANGE_FORM...
performAction
66,594
void (@NotNull WCInfo info) { VirtualFile root = info.getRootInfo().getVirtualFile(); if (!checkRoot(root, message("action.name.configure.branches"))) return; BranchConfigurationDialog.configureBranches(myProject, root); }
configureBranches
66,595
void (@NotNull WCInfo info) { int result = Messages.showOkCancelDialog(myProject, message("dialog.message.set.working.copy.infinity.depth", info.getPath()), message("dialog.title.set.working.copy.infinity.depth"), Messages.getWarningIcon()); if (result == Messages.OK) { // update of view will be triggered by roots chan...
fixDepth
66,596
void (@NotNull WCInfo info, @NotNull WorkingCopyInfoPanel infoPanel) { VirtualFile root = info.getRootInfo().getVirtualFile(); if (!checkRoot(root, message("action.name.merge.from"))) return; SelectBranchPopup.showForBranchRoot(myProject, root, (project, configuration, branchUrl, revision) -> { try { Url workingCopyUrl...
mergeFrom
66,597
void (@NotNull WCInfo info) { VirtualFile root = info.getRootInfo().getVirtualFile(); if (!checkRoot(root, message("cleanup.action.name"))) return; new CleanupWorker(getVcs(), singletonList(root)).execute(); }
cleanup
66,598
void (@NotNull final WCInfo wcInfo, @NotNull final Collection<WorkingCopyFormat> supportedFormats) { ChangeFormatDialog dialog = new ChangeFormatDialog(myProject, new File(wcInfo.getPath()), false, !wcInfo.isIsWcRoot()); dialog.setSupported(supportedFormats); dialog.setData(wcInfo.getFormat()); if (!dialog.showAndGet()...
changeFormat
66,599
void () { super.onSuccess(); refresh(); }
onSuccess