Unnamed: 0
int64
0
305k
body
stringlengths
7
52.9k
name
stringlengths
1
185
68,300
void () { super.init(); myWorkingCopyField.setText(mySrcFile.toString()); myRepositoryField.setText(mySrcURL.toDecodedString()); myToURLText.setText(mySrcURL.toDecodedString()); updateControls(); myWorkingCopyRadioButton.setSelected(true); updateSwitchOnCreate(); }
init
68,301
String () { return myCommentText.getText(); }
getComment
68,302
Revision () { if (myWorkingCopyRadioButton.isSelected()) { return Revision.WORKING; } else { try { return myRevisionPanel.getRevision(); } catch (ConfigurationException e) { return Revision.UNDEFINED; } } }
getRevision
68,303
Url () { try { return createUrl(myRepositoryField.getText(), false); } catch (SvnBindException ignored) { return null; } }
getRepositoryFieldUrl
68,304
JComponent () { return myTopPanel; }
createCenterPanel
68,305
JComponent () { return myBranchTextField; }
getPreferredFocusedComponent
68,306
String () { return "svn.copyDialog"; }
getDimensionServiceKey
68,307
boolean () { return false; }
postponeValidation
68,308
ValidationInfo () { ValidationInfo info = validateSource(); return info != null ? info : validateDestination(); }
doValidate
68,309
ValidationInfo () { if (myRepositoryRadioButton.isSelected()) { Url url = getRepositoryFieldUrl(); if (url == null) { return new ValidationInfo(message("dialog.message.invalid.repository.location"), myRepositoryField.getTextField()); } Revision revision = getRevision(); if (!revision.isValid() || revision.isLocal()) { ...
validateSource
68,310
ValidationInfo () { if (myBranchOrTagRadioButton.isSelected()) { Url branchLocation = myBranchTagBaseModel.getSelected(); if (branchLocation == null) { return new ValidationInfo(message("dialog.message.no.branch.base.location.selected"), myBranchTagBaseComboBox.getComboBox()); } if (isEmptyOrSpaces(myBranchTextField.ge...
validateDestination
68,311
boolean () { return mySwitchOnCreate.isSelected(); }
isSwitchOnCreate
68,312
Target () { return mySource; }
getSource
68,313
File () { return myRepositoryRadioButton.isSelected() ? mySrcFile : new File(myWorkingCopyField.getText()); }
getSourceFile
68,314
Url () { return myDestination; }
getDestination
68,315
boolean () { return myUserinfoInUrl; }
isUserinfoInUrl
68,316
void (final boolean userinfoInUrl) { myUserinfoInUrl = userinfoInUrl; }
setUserinfoInUrl
68,317
void (@NotNull List<String> branchUrls) { myBranchUrls = branchUrls; Collections.sort(myBranchUrls); }
setBranchUrls
68,318
void (final String trunkUrl) { myTrunkUrl = trunkUrl; }
setTrunkUrl
68,319
String () { return myTrunkUrl; }
getTrunkUrl
68,320
List<String> () { return myBranchUrls; }
getBranchUrls
68,321
ValidationInfo () { try { myTrunkUrl = createUrl(myTrunkLocationTextField.getText(), false); } catch (SvnBindException e) { return new ValidationInfo(e.getMessage(), myTrunkLocationTextField.getTextField()); } if (!isAncestor(myRootUrl, myTrunkUrl) || myTrunkUrl.equals(myRootUrl)) { return new ValidationInfo(message("c...
doValidate
68,322
void () { if (myTrunkUrl != null) { myConfiguration.setTrunk(myTrunkUrl); } super.doOKAction(); }
doOKAction
68,323
JPanel (@NotNull Project project, @NotNull Url rootUrl) { return ToolbarDecorator.createDecorator(myBranchLocationsList) .setAddAction(new AnActionButtonRunnable() { @Nullable private Url usedRootUrl; @Override public void run(AnActionButton button) { Pair<Url, Url> result = SelectLocationDialog.selectLocationAndRoot(p...
wrapLocationsWithToolbar
68,324
void (AnActionButton button) { Pair<Url, Url> result = SelectLocationDialog.selectLocationAndRoot(project, notNull(usedRootUrl, rootUrl)); if (result != null) { Url selectedUrl = result.first; usedRootUrl = result.second; if (selectedUrl != null && !myConfiguration.getBranchLocations().contains(selectedUrl)) { myConfig...
run
68,325
JComponent () { return myTopPanel; }
createCenterPanel
68,326
String () { return "Subversion.BranchConfigurationDialog"; }
getDimensionServiceKey
68,327
void (@NotNull Project project, @Nullable VirtualFile file) { if (file == null) { return; } RootUrlInfo wcRoot = SvnVcs.getInstance(project).getSvnFileUrlMapping().getWcRootForFilePath(getFilePath(file)); if (wcRoot == null) { return; } SvnBranchConfigurationNew configuration = SvnBranchConfigurationManager.getInstance...
configureBranches
68,328
SvnBranchMapperManager () { return ApplicationManager.getApplication().getService(SvnBranchMapperManager.class); }
getInstance
68,329
SvnBranchMapperHolder () { return myStateHolder; }
getState
68,330
void (@NotNull final SvnBranchMapperHolder state) { myStateHolder = state; }
loadState
68,331
void (@NotNull Url url, @NotNull File file) { myStateHolder.put(url.toDecodedString(), file.getAbsolutePath()); }
put
68,332
void (@NotNull Url url, @NotNull File value) { Set<String> set = myStateHolder.get(url.toDecodedString()); if (set != null) { set.remove(value.getAbsolutePath()); } }
remove
68,333
void (final Project project, final VirtualFile vcsRoot, final SvnBranchConfigurationNew configuration) { for (Map.Entry<Url, File> entry : configuration.getUrl2FileMappings(project, vcsRoot).entrySet()) { put(entry.getKey(), entry.getValue()); } }
notifyBranchesChanged
68,334
Set<String> (@NotNull Url url) { return myStateHolder.get(url.toDecodedString()); }
get
68,335
void (final String key, final String value) { Set<String> files = myMapping.get(key); if (files == null) { files = new HashSet<>(); myMapping.put(key, files); } files.add(value); }
put
68,336
Set<String> (final String key) { return myMapping.get(key); }
get
68,337
void () { myFilesWaitingForRevision.push(new ArrayList<>()); }
startUpdate
68,338
void () { while (!myFilesWaitingForRevision.isEmpty()) { setRevisionForWaitingFiles(CommitInfo.EMPTY.getRevisionNumber()); } }
finishUpdate
68,339
void (final File file, final Url url) { myUrlToCheckForSwitch.put(file, url); }
addToSwitch
68,340
void (final UpdatedFiles updatedFiles) { myUpdatedFiles = updatedFiles; }
setUpdatedFiles
68,341
void (final ProgressEvent event) { if (event == null || event.getFile() == null) { return; } String path = event.getFile().getAbsolutePath(); String displayPath = event.getFile().getName(); myText2 = null; myText = null; if (handleInDescendants(event)) { updateProgressIndicator(); return; } if (event.getAction() == Eve...
consume
68,342
void (ProgressEvent event) { final File file = event.getFile(); if (file == null) return; final Url wasUrl = myUrlToCheckForSwitch.get(file); if (wasUrl != null && ! wasUrl.equals(event.getURL())) { myUrlToCheckForSwitch.remove(file); addFileToGroup(FileGroup.SWITCHED_ID, event); } }
possiblySwitched
68,343
boolean (final ProgressEvent event) { final File file = event.getFile(); final SvnFileUrlMapping urlMapping = myVCS.getSvnFileUrlMapping(); final Url currentUrl = urlMapping.getUrlForFile(file); return (currentUrl != null) && (! currentUrl.equals(event.getURL())); }
itemSwitched
68,344
void () { if (myProgressIndicator != null) { if (myText != null) { myProgressIndicator.setText(myText); } if (myText2 != null) { myProgressIndicator.setText2(myText2); } } }
updateProgressIndicator
68,345
boolean (final ProgressEvent event) { return false; }
handleInDescendants
68,346
void (final String id, final ProgressEvent event) { final FileGroup fileGroup = myUpdatedFiles.getGroupById(id); final String path = event.getFile().getAbsolutePath(); myFilesWaitingForRevision.peek().add(Pair.create(id, path)); if (event.getErrorMessage() != null) { fileGroup.addError(path, event.getErrorMessage()); }...
addFileToGroup
68,347
void (long revisionNumber) { SvnRevisionNumber revision = new SvnRevisionNumber(Revision.of(revisionNumber)); for (Pair<String, String> pair : myFilesWaitingForRevision.pop()) { FileGroup fileGroup = myUpdatedFiles.getGroupById(pair.getFirst()); fileGroup.add(pair.getSecond(), SvnVcs.getKey(), revision); } }
setRevisionForWaitingFiles
68,348
FileGroup (@Nls String name, String id) { return new FileGroup(name, name, false, id, true); }
createFileGroup
68,349
void (ProgressIndicator progressIndicator) { myProgressIndicator = progressIndicator; }
setProgressIndicator
68,350
boolean () { if (getWidth() < finalMinimumRightSize * 2) { final int left = getWidth() - finalMinimumRightSize; final float newProportion; if (left < 0) { newProportion = 0.2f; } else { newProportion = ((float) left / getWidth()); } splitter.setProportion(newProportion); } return true; }
init
68,351
boolean () { return getWidth() > 0; }
canExecute
68,352
void (final Collection<FilePath> roots) { final JPanel configureRootsPanel = getRootsPanel(); configureRootsPanel.setLayout(new BorderLayout()); final ArrayList<FilePath> rootsCopy = new ArrayList<>(roots); rootsCopy.sort(FilePathByPathComparator.getInstance()); for (FilePath root : rootsCopy) { Url url = getUrlFor(roo...
init
68,353
JPanel () { return null; }
getAdditionalPanel
68,354
void (final SvnConfiguration configuration) { getDepthBox().setSelectedItem(configuration.getUpdateDepth()); for (FilePath filePath : myRootToPanel.keySet()) { myRootToPanel.get(filePath).reset(configuration); } }
reset
68,355
Url (@NotNull final FilePath root) { final Info info = myVCS.getInfo(root.getIOFile()); return info != null ? info.getUrl() : null; }
getUrlFor
68,356
void (File root, ProgressIndicator progress) { if (progress != null) { showProgressMessage(progress, root); } myHandler.startUpdate(); try { long rev = doUpdate(root); if (rev < 0 && !isMerge()) { throw new SvnBindException(SvnBundle.message("exception.text.root.was.not.properly.updated", root)); } } catch (VcsExceptio...
handleWorkingCopyRoot
68,357
SvnPanel (final FilePath root, final SvnVcs p1, Collection<FilePath> roots) { return new SvnIntegrateRootOptionsPanel(myVCS, root); }
createRootPanel
68,358
JPanel () { return myRootOptionsPanel; }
getRootsPanel
68,359
JPanel () { return myAdditionalPanel; }
getAdditionalPanel
68,360
void (final SvnConfiguration configuration) { super.reset(configuration); myDryRunCheckbox.setSelected(configuration.isMergeDryRun()); myUseAncestry.setSelected(configuration.isMergeDiffUseAncestry()); }
reset
68,361
JComponent () { return myPanel; }
getPanel
68,362
DepthCombo () { return myDepthCombo; }
getDepthBox
68,363
void () { myDepthCombo = new DepthCombo(true); }
createUIComponents
68,364
void (ProgressTracker dispatcher) { myDispatcher = dispatcher; }
setEventHandler
68,365
void (boolean ignoreExternals) { myIgnoreExternals = ignoreExternals; }
setIgnoreExternals
68,366
BaseUpdateCommandListener (final File[] paths, final AtomicReference<long[]> updatedToRevision, final File base) { return new BaseUpdateCommandListener(base, myDispatcher) { final long[] myRevisions = new long[paths.length]; @Override protected void beforeHandler(@NotNull ProgressEvent event) { if (EventAction.UPDATE_C...
createCommandListener
68,367
void (@NotNull ProgressEvent event) { if (EventAction.UPDATE_COMPLETED.equals(event.getAction())) { final long eventRevision = event.getRevision(); for (int i = 0; i < paths.length; i++) { final File path = paths[i]; if (FileUtil.filesEqual(path, event.getFile())) { myRevisions[i] = eventRevision; break; } } } }
beforeHandler
68,368
void (int exitCode) { super.processTerminated(exitCode); updatedToRevision.set(myRevisions); }
processTerminated
68,369
void (@NotNull List<String> parameters, @Nullable Revision revision, @Nullable Depth depth, boolean depthIsSticky, boolean allowUnversionedObstructions) { CommandUtil.put(parameters, revision); CommandUtil.put(parameters, depth, depthIsSticky); CommandUtil.put(parameters, allowUnversionedObstructions, "--force"); Comma...
fillParameters
68,370
AbstractUpdateIntegrateCrawler (UpdateEventHandler eventHandler, boolean totalUpdate, ArrayList<VcsException> exceptions, UpdatedFiles updatedFiles) { return new IntegrateCrawler(myVcs, eventHandler, totalUpdate, exceptions, updatedFiles); }
createCrawler
68,371
Configurable (final Collection<FilePath> collection) { if (collection.isEmpty()) return null; return new SvnUpdateConfigurable(myVcs.getProject()){ @Override protected AbstractSvnUpdatePanel createPanel() { return new SvnIntegratePanel(myVcs, collection); } @Override public String getDisplayName() { return SvnBundle.me...
createConfigurable
68,372
AbstractSvnUpdatePanel () { return new SvnIntegratePanel(myVcs, collection); }
createPanel
68,373
String () { return SvnBundle.message("integrate.display.name"); }
getDisplayName
68,374
String () { return "reference.dialogs.versionControl.integrate.project.subversion"; }
getHelpTopic
68,375
boolean () { return myVcs.getSvnConfiguration().isMergeDryRun(); }
isDryRun
68,376
void (final ProgressIndicator progress, final File root) { if (myVcs.getSvnConfiguration().isMergeDryRun()) { progress.setText(SvnBundle.message("progress.text.merging.dry.run.changes", root.getAbsolutePath())); } else { progress.setText(SvnBundle.message("progress.text.merging.changes", root.getAbsolutePath())); } }
showProgressMessage
68,377
boolean () { return true; }
isMerge
68,378
boolean (final Collection<FilePath> roots) { return true; }
validateOptions
68,379
void (@NotNull final DocumentEvent e) { notifyChangeListeners(); }
textChanged
68,380
void () { if (myProject != null && myUrlProvider != null) { try { SvnRepositoryLocation location = new SvnRepositoryLocation(myUrlProvider.compute()); SvnChangeList version = SvnSelectRevisionUtil.chooseCommittedChangeList(myProject, location, myRoot); if (version != null) { myRevisionField.setText(String.valueOf(versi...
chooseRevision
68,381
void (final Project project) { myProject = project; }
setProject
68,382
void (final VirtualFile root) { myRoot = root; }
setRoot
68,383
void (@Nullable ThrowableComputable<Url, SvnBindException> urlProvider) { myUrlProvider = urlProvider; }
setUrlProvider
68,384
String () { return myHead.isSelected() ? Revision.HEAD.toString() : myRevisionField.getText(); }
getRevisionText
68,385
JTextField () { return myRevisionField.getTextField(); }
getRevisionTextField
68,386
void (String text) { myRevisionField.setText(text); }
setRevisionText
68,387
void (final Revision revision) { if (revision == Revision.HEAD) { myHead.setSelected(true); myRevisionField.setEnabled(false); } else { myRevisionField.setText(String.valueOf(revision.getNumber())); mySpecified.setSelected(true); myRevisionField.setEnabled(true); } }
setRevision
68,388
void (final boolean enabled) { super.setEnabled(enabled); if (!enabled) { myHead.setEnabled(false); mySpecified.setEnabled(false); myRevisionField.setEnabled(false); } else { myHead.setEnabled(true); mySpecified.setEnabled(true); myRevisionField.setEnabled(mySpecified.isSelected()); } }
setEnabled
68,389
void (ChangeListener listener) { myChangeListeners.add(listener); }
addChangeListener
68,390
void (ChangeListener listener) { myChangeListeners.remove(listener); }
removeChangeListener
68,391
void () { for(ChangeListener listener: myChangeListeners) { listener.stateChanged(new ChangeEvent(this)); } }
notifyChangeListeners
68,392
void (UpdatedFiles updatedFiles) { updatedFiles.registerGroup(new FileGroup(VcsBundle.message("update.group.name.merged.with.property.conflicts"), VcsBundle.message("status.group.name.will.be.merged.with.property.conflicts"), false, FileGroup.MERGED_WITH_PROPERTY_CONFLICT_ID, false)); updatedFiles.registerGroup(new Fil...
fillGroups
68,393
List<VirtualFile> () { return null; }
merge
68,394
void () { final Collection<VirtualFile> vfColl = Arrays.stream(myContentRoots).map(FilePath::getVirtualFile) .filter(Objects::nonNull).collect(Collectors.toList()); myDirtyScopeManager.filesDirty(vfColl, null); }
dirtyRoots
68,395
void () { // TODO: why do we need to mark all roots as dirty here??? dirtyRoots(); for (Runnable groupWorker : myGroupWorkers) { groupWorker.run(); } }
onRefreshFilesCompleted
68,396
void () { final FileGroup replacedGroup = myUpdatedFiles.getGroupById(REPLACED_ID); final FileGroup deletedGroup = myUpdatedFiles.getGroupById(FileGroup.REMOVED_FROM_REPOSITORY_ID); if ((deletedGroup != null) && (replacedGroup != null) && (! deletedGroup.isEmpty()) && (! replacedGroup.isEmpty())) { final Set<String> re...
run
68,397
void () { final LocalFileSystem lfs = LocalFileSystem.getInstance(); final FileGroup conflictedGroup = myUpdatedFiles.getGroupById(FileGroup.MERGED_WITH_TREE_CONFLICT); final Collection<String> conflictedFiles = conflictedGroup.getFiles(); final Collection<VirtualFile> parents = new ArrayList<>(); if ((conflictedFiles ...
run
68,398
List<VirtualFile> () { final List<VirtualFile> writable = prepareWritable(myFiles); final AbstractVcsHelper vcsHelper = AbstractVcsHelper.getInstance(myVcs.getProject()); return vcsHelper.showMergeDialog(writable, new SvnMergeProvider(myVcs.getProject())); }
merge
68,399
List<VirtualFile> (final Collection<VirtualFile> files) { final List<VirtualFile> writable = new ArrayList<>(); for (VirtualFile vf : files) { if (myVcs.equals(myPlVcsManager.getVcsFor(vf))) { writable.add(vf); } } final ReadonlyStatusHandler.OperationStatus operationStatus = ReadonlyStatusHandler.getInstance(myVcs.get...
prepareWritable