Unnamed: 0
int64
0
305k
body
stringlengths
7
52.9k
name
stringlengths
1
185
259,000
String () { return "reference.dialogs.vcs.shelf.settings"; }
getHelpId
259,001
void () { boolean wasCustom = myVcsConfiguration.USE_CUSTOM_SHELF_PATH; String prevPath = myVcsConfiguration.CUSTOM_SHELF_PATH; String customPath = FileUtil.toSystemIndependentName(myShelfDirectoryPath.getText()); boolean nowCustom = myUseCustomShelfDirectory.isSelected(); if (nowCustom && !checkAndIgnoreIfCreated(cust...
doOKAction
259,002
boolean (@NotNull String newPath) { File newDir = new File(newPath); if (newDir.exists()) return true; if (!newDir.mkdirs()) return false; return true; }
checkAndIgnoreIfCreated
259,003
ValidationInfo () { updateOkAction(); if (myUseCustomShelfDirectory.isSelected()) { File toFile = new File(myShelfDirectoryPath.getText()); if (!toFile.exists()) return null; // check that file can be created after OK button pressed; String validationError = null; if (!toFile.canRead()) { validationError = VcsBundle.me...
doValidate
259,004
void () { setOKActionEnabled(isModified()); }
updateOkAction
259,005
boolean () { if (myVcsConfiguration.USE_CUSTOM_SHELF_PATH != myUseCustomShelfDirectory.isSelected()) return true; return myUseCustomShelfDirectory.isSelected() && !StringUtil.equals(myVcsConfiguration.CUSTOM_SHELF_PATH, myShelfDirectoryPath.getText()); }
isModified
259,006
VcsDirectoryMapping (@NotNull Project project) { String basePath = project.getBasePath(); if (basePath == null) return VcsDirectoryMapping.createDefault(""); return new VcsDirectoryMapping(basePath, ""); }
suggestDefaultMapping
259,007
JComponent () { return myPanel; }
createCenterPanel
259,008
void (@NotNull VcsDirectoryMapping mapping) { myMappingCopy = new VcsDirectoryMapping(mapping.getDirectory(), mapping.getVcs(), mapping.getRootSettings()); myProjectRadioButton.setSelected(myMappingCopy.isDefaultMapping()); myDirectoryRadioButton.setSelected(!myProjectRadioButton.isSelected()); myDirectoryTextField.set...
setMapping
259,009
VcsDirectoryMapping () { AbstractVcs vcs = myVCSComboBox.getItem(); String vcsName = vcs != null ? vcs.getName() : ""; String directory = myProjectRadioButton.isSelected() ? "" : toSystemIndependentName(myDirectoryTextField.getText()); return new VcsDirectoryMapping(directory, vcsName, myMappingCopy.getRootSettings());...
getMapping
259,010
void () { if (myVcsConfigurable != null) { myVcsConfigurablePlaceholder.remove(myVcsConfigurableComponent); myVcsConfigurable.disposeUIResources(); myVcsConfigurable = null; } AbstractVcs vcs = myVCSComboBox.getItem(); if (vcs != null) { UnnamedConfigurable configurable = vcs.getRootConfigurable(myMappingCopy); if (con...
updateVcsConfigurable
259,011
void () { if (myVcsConfigurable != null) { try { myVcsConfigurable.apply(); } catch(ConfigurationException ex) { Messages.showErrorDialog(myPanel, VcsBundle.message("settings.vcs.mapping.invalid.vcs.options.error", ex.getMessage())); } } super.doOKAction(); }
doOKAction
259,012
void () { ButtonGroup bg = new ButtonGroup(); myProjectRadioButton = new JRadioButton(); myDirectoryRadioButton = new JRadioButton(); bg.add(myProjectRadioButton); bg.add(myDirectoryRadioButton); ActionListener listener = e -> myDirectoryTextField.setEnabled(myDirectoryRadioButton.isSelected()); myProjectRadioButton.ad...
createUIComponents
259,013
void () { myProjectButtonComment.setText(wrapInHtml(DefaultVcsRootPolicy.getInstance(myProject).getProjectConfigurationMessage())); }
initProjectMessage
259,014
VirtualFile () { // suggest project base dir only if nothing is typed in the component. String text = getComponentText(); if (text.isEmpty()) { VirtualFile file = myProject.getBaseDir(); if (file != null) { return file; } } return super.getInitialFile(); }
getInitialFile
259,015
void (@NotNull final VirtualFile chosenFile) { String oldText = myDirectoryTextField.getText(); super.onFileChosen(chosenFile); AbstractVcs vcs = myVCSComboBox.getItem(); if (oldText.isEmpty() && vcs != null) { new Task.Backgroundable(myProject, VcsBundle.message("settings.vcs.mapping.status.looking.for.vcs.administrat...
onFileChosen
259,016
void (@NotNull ProgressIndicator indicator) { List<VcsDescriptor> allVcss = Arrays.asList(myVcsManager.getAllVcss()); probableVcs = getIfSingle(allVcss.stream().filter(descriptor -> descriptor.probablyUnderVcs(chosenFile))); }
run
259,017
void () { if (probableVcs != null) { myVCSComboBox.setSelectedItem(probableVcs); } }
onSuccess
259,018
String () { return VcsBundle.message("configurable.VcsDirectoryConfigurationPanel.display.name"); }
getDisplayName
259,019
String () { return ID; }
getId
259,020
JComponent () { if (myPanel == null) myPanel = new VcsDirectoryConfigurationPanel(myProject); return myPanel; }
createComponent
259,021
void () { if (myPanel != null) { Disposer.dispose(myPanel); myPanel = null; } }
disposeUIResources
259,022
void () { if (myPanel != null) { myPanel.reset(); } }
reset
259,023
boolean () { return myPanel != null && myPanel.isModified(); }
isModified
259,024
void (@NotNull ChangeEvent e) { myComboBox.setEnabled(myCheckbox.isSelected()); }
stateChanged
259,025
void () { reset(); }
scopesChanged
259,026
String () { return VcsBundle.message("settings.filter.update.project.info.by.scope"); }
getDisplayName
259,027
JComponent () { final JPanel panel = new JPanel(new FlowLayout(FlowLayout.LEFT, 0, 0)); panel.add(myCheckbox); panel.add(myComboBox); panel.add(Box.createHorizontalStrut(UIUtil.DEFAULT_HGAP)); panel.add(new ActionLink(VcsBundle.message("configurable.vcs.manage.scopes"), e -> { Settings settings = Settings.KEY.getData(D...
createComponent
259,028
boolean () { return !Objects.equals(myVcsConfiguration.UPDATE_FILTER_SCOPE_NAME, getScopeFilterName()); }
isModified
259,029
void () { myVcsConfiguration.UPDATE_FILTER_SCOPE_NAME = getScopeFilterName(); }
apply
259,030
void () { myComboBox.removeAllItems(); boolean selection = false; for (NamedScopesHolder holder : myNamedScopeHolders) { for (NamedScope scope : holder.getEditableScopes()) { @NlsSafe String name = scope.getScopeId(); myComboBox.addItem(name); if (!selection && name.equals(myVcsConfiguration.UPDATE_FILTER_SCOPE_NAME)) ...
reset
259,031
void () { }
dispose
259,032
void () { Disposer.dispose(this); }
disposeUIResources
259,033
String () { if (!myCheckbox.isSelected()) { return null; } return myComboBox.getItem(); }
getScopeFilterName
259,034
SpinnerNumberModel () { return new SpinnerNumberModel(1, 1, VcsContentAnnotationSettings.ourMaxDays, 1); }
createSpinnerModel
259,035
String () { return VcsBundle.message("configurable.VcsContentAnnotationConfigurable.display.name"); }
getDisplayName
259,036
boolean () { VcsContentAnnotationSettings settings = VcsContentAnnotationSettings.getInstance(myProject); if (myHighlightRecentlyChanged.isSelected() != settings.isShow()) return true; if (!Comparing.equal(myHighlightInterval.getValue(), settings.getLimitDays())) return true; return false; }
isModified
259,037
void () { VcsContentAnnotationSettings settings = VcsContentAnnotationSettings.getInstance(myProject); settings.setShow(myHighlightRecentlyChanged.isSelected()); settings.setLimitDays(((Number)myHighlightInterval.getValue()).intValue()); }
apply
259,038
void () { VcsContentAnnotationSettings settings = VcsContentAnnotationSettings.getInstance(myProject); myHighlightRecentlyChanged.setSelected(settings.isShow()); myHighlightInterval.setValue(settings.getLimitDays()); myHighlightInterval.setEnabled(myHighlightRecentlyChanged.isSelected()); }
reset
259,039
void (@NotNull DocumentEvent e) { updateFeedback(); }
textChanged
259,040
void () { myErrorLabel.setText(" "); try { if (myIssueIDTextField.getText().length() > 0) { ArrayList<IssueNavigationConfiguration.LinkMatch> matches = new ArrayList<>(); IssueNavigationConfiguration.findIssueLinkMatches(myExampleIssueIDTextField.getText(), getLink(), matches); IssueNavigationConfiguration.LinkMatch fi...
updateFeedback
259,041
JComponent () { return myPanel; }
createCenterPanel
259,042
String () { return "reference.settings.vcs.issue.navigation.add.link"; }
getHelpId
259,043
IssueNavigationLink () { return new IssueNavigationLink(myIssueIDTextField.getText(), myIssueLinkTextField.getText()); }
getLink
259,044
void (final IssueNavigationLink link) { myIssueIDTextField.setText(link.getIssueRegexp()); myIssueLinkTextField.setText(link.getLinkRegexp()); }
setLink
259,045
JComponent () { return myIssueIDTextField; }
getPreferredFocusedComponent
259,046
Configurable () { return new VcsManagerConfigurable(myProject); }
createConfigurable
259,047
boolean () { return !AllVcses.getInstance(myProject).isEmpty(); }
canCreateConfigurable
259,048
int () { return GROUP_WEIGHT; }
getWeight
259,049
Configurable[] () { List<Configurable> result = new ArrayList<>(); result.add(new VcsGeneralSettingsConfigurable(myProject)); result.add(new VcsMappingConfigurable(myProject)); if (Registry.is("vcs.ignorefile.generation", true)) { result.add(new IgnoredSettingsPanel(myProject)); } result.add(new IssueNavigationConfigur...
buildConfigurables
259,050
String (@NotNull String vcsName) { return "vcs." + vcsName; }
getVcsConfigurableId
259,051
Object () { return myConfigurable; }
createElement
259,052
boolean () { return true; }
canCreateElement
259,053
int (VcsFileRevision first, VcsFileRevision second) { if (first instanceof CurrentRevision && second instanceof CurrentRevision) { return compareNumbers(first, second); } if (second instanceof CurrentRevision) return -1 * compare(second, first); if (first instanceof CurrentRevision) { int result = compareNumbers(first,...
compare
259,054
int (VcsFileRevision first, VcsFileRevision second) { return first.getRevisionNumber().compareTo(second.getRevisionNumber()); }
compareNumbers
259,055
FilePath (@NotNull VcsFileRevision revision) { if (revision instanceof VcsFileRevisionEx) { return ((VcsFileRevisionEx)revision).getPath(); } return null; }
getRevisionPath
259,056
boolean (VcsFileRevision revision) { return revision instanceof CurrentRevision; }
isCurrent
259,057
boolean (VcsFileRevision revision) { return revision == null || VcsFileRevision.NULL.equals(revision); }
isEmpty
259,058
void (@NotNull final Project project, @NotNull final FilePath filePath, @NotNull final VcsFileRevision older, @NotNull final VcsFileRevision newer) { new Task.Backgroundable(project, VcsBundle.message("file.history.diff.revisions.process")) { @Override public void run(@NotNull ProgressIndicator indicator) { try { showD...
showDifferencesInBackground
259,059
void (@NotNull ProgressIndicator indicator) { try { showDiff(project, filePath, older, newer, makeTitle(older), makeTitle(newer)); } catch (final VcsException e) { LOG.info(e); WaitForProgressToShow.runOrInvokeLaterAboveProgress( () -> Messages.showErrorDialog(VcsBundle.message("message.text.cannot.show.differences", e...
run
259,060
void (@NotNull Runnable consumerRunnable) { // Do not invoke in arbitrary background thread as due to parallel execution this could lead to cases when invokeLater() (from // sessionRefresher) is scheduled at first for history session with (as an example) 10 revisions (new buffered list) and then with // 5 revisions (pr...
invokeConsumer
259,061
FileHistoryRefresherI (@NotNull Project project, @NotNull FilePath path, @Nullable VcsRevisionNumber startingRevisionNumber) { JComponent component = ContentUtilEx.findContentComponent(getToolWindow(project).getContentManager(), comp -> comp instanceof FileHistoryContentPanel && sameHistories(((FileHistoryContentPanel)...
findExistingHistoryRefresher
259,062
boolean () { return mySession.shouldBeRefreshed(); }
shouldBeRefreshed
259,063
void (VcsFileRevision revision) { myLimitHistoryCheck.checkNumber(); myBuffer.consumeOne(revision); }
acceptRevision
259,064
void (VcsAbstractHistorySession session) { if (mySession != null && session != null && mySession.getRevisionList().equals(session.getRevisionList())) return; mySession = session; if (mySession != null) { mySession.shouldBeRefreshed(); // to init current revision! List<VcsFileRevision> revisionList = mySession.getRevisi...
reportCreatedEmptySession
259,065
ToolWindow (@NotNull Project project) { ToolWindow toolWindow = ToolWindowManager.getInstance(project).getToolWindow(ChangesViewContentManager.TOOLWINDOW_ID); assert toolWindow != null : "Version Control ToolWindow should be available at this point."; return toolWindow; }
getToolWindow
259,066
void (VcsException exception) { VcsBalloonProblemNotifier.showOverVersionControlView(myVcs.getProject(), VcsBundle.message("message.title.could.not.load.file.history") + ": " + exception.getMessage(), MessageType.ERROR); }
reportException
259,067
void () { myLimitHistoryCheck.reset(); }
beforeRefresh
259,068
void () { ToolWindow toolWindow = getToolWindow(myVcs.getProject()); ContentManager manager = toolWindow.getContentManager(); boolean selectedExistingContent = ContentUtilEx.selectContent(manager, myContentPanel, true); if (!selectedExistingContent) { String tabName = getTabName(myPath, myStartingRevisionNumber); Conte...
createOrSelectContent
259,069
String (@NotNull FilePath path, @Nullable VcsRevisionNumber revisionNumber) { String tabName = path.getName(); if (revisionNumber != null) { tabName += " (" + VcsUtil.getShortRevisionString(revisionNumber) + ")"; } return tabName; }
getTabName
259,070
void () { myBuffer.flush(); ApplicationManager.getApplication().invokeAndWait(() -> { if (mySession == null) { // nothing to be done, exit return; } myContentPanel.finishRefresh(); }); }
finished
259,071
void () { }
dispose
259,072
void (@NotNull VcsHistorySession session) { if (myFileHistoryPanel == null) { myFileHistoryPanel = new FileHistoryPanelImpl(myVcs, myPath, myStartingRevisionNumber, session, myVcsHistoryProvider, myRefresher, false); add(myFileHistoryPanel, BorderLayout.CENTER); DataManager.registerDataProvider(this, myFileHistoryPanel...
setHistorySession
259,073
void () { if (myFileHistoryPanel != null) myFileHistoryPanel.finishRefresh(); }
finishRefresh
259,074
FilePath () { return myPath; }
getPath
259,075
VcsRevisionNumber () { return myStartingRevisionNumber; }
getRevision
259,076
FileHistoryRefresherI (@NotNull VcsHistoryProvider vcsHistoryProvider, @NotNull FilePath path, @NotNull AbstractVcs vcs) { FileHistoryRefresherI refresher = FileHistorySessionPartner.findExistingHistoryRefresher(vcs.getProject(), path, null); return refresher == null ? new FileHistoryRefresher(vcsHistoryProvider, path,...
findOrCreate
259,077
FileHistoryRefresherI (@NotNull VcsHistoryProviderEx vcsHistoryProvider, @NotNull FilePath path, @NotNull AbstractVcs vcs, @Nullable VcsRevisionNumber startingRevisionNumber) { FileHistoryRefresherI refresher = FileHistorySessionPartner.findExistingHistoryRefresher(vcs.getProject(), path, startingRevisionNumber); retur...
findOrCreate
259,078
void () { mySessionPartner.createOrSelectContent(); }
selectContent
259,079
boolean () { return VcsCachingHistory.getHistoryLock(myVcs, VcsBackgroundableActions.CREATE_HISTORY_SESSION, myPath, myStartingRevisionNumber) .isLocked(); }
isInRefresh
259,080
void (boolean canUseCache) { mySessionPartner.beforeRefresh(); if (myVcsHistoryProvider instanceof VcsHistoryProviderEx && myStartingRevisionNumber != null) { VcsCachingHistory.collectInBackground(myVcs, myPath, myStartingRevisionNumber, mySessionPartner); } else { boolean collectedFromCache = false; if (myFirstTime) {...
refresh
259,081
void () { if (myLastTask != null) { myLastTask.cancel(false); } if (myVcs.getProject().isDisposed()) { return; } myUpdateAlarm.cancelAllRequests(); if (myUpdateAlarm.isDisposed()) return; schedule(); if (!ApplicationManager.getApplication().isActive()) return; myLastTask = ourExecutor.submit(() -> { if (!myUpdateAlarm....
run
259,082
void () { myUpdateAlarm.addRequest(this, myDelayMillis); }
schedule
259,083
boolean () { return mySelection == null || mySelection.isEmpty(); }
isStatusVisible
259,084
void (Graphics g) { super.paintComponent(g); myStatusText.paint(this, g); }
paintComponent
259,085
void (@NotNull List<? extends TreeNodeOnVcsRevision> selection) { mySelection = selection; update(); }
update
259,086
String () { if (mySelection == null || mySelection.isEmpty()) { return ""; } boolean addRevisionInfo = mySelection.size() > 1; @Nls StringBuilder html = new StringBuilder(); for (TreeNodeOnVcsRevision revision : mySelection) { String message = revision.getRevision().getCommitMessage(); if (StringUtil.isEmpty(message)) ...
getBody
259,087
Color () { return UIUtil.getEditorPaneBackground(); }
getBackground
259,088
ActionUpdateThread () { return ActionUpdateThread.BGT; }
getActionUpdateThread
259,089
void (@NotNull DataContext dataContext) { String selectedText = getSelectedText(); if (selectedText == null || selectedText.isEmpty()) selectedText = StringUtil.removeHtmlTags(getText()); CopyPasteManager.getInstance().setContents(new StringSelection(selectedText)); }
performCopy
259,090
boolean (@NotNull DataContext dataContext) { return true; }
isCopyEnabled
259,091
boolean (@NotNull DataContext dataContext) { return true; }
isCopyVisible
259,092
Object (@NotNull @NonNls String dataId) { if (PlatformDataKeys.COPY_PROVIDER.is(dataId)) { return this; } return null; }
getData
259,093
void (@NotNull AnActionEvent e, @NotNull Project project, @NotNull FilePath filePath, @NotNull VcsFileRevision previousRevision, @NotNull VcsFileRevision revision) { doShowDiff(filePath, previousRevision, revision); }
showDiffForOne
259,094
void (@NotNull Project project, @NotNull FilePath filePath, @NotNull VcsFileRevision older, @NotNull VcsFileRevision newer) { doShowDiff(filePath, older, newer); }
showDiffForTwo
259,095
void (@NotNull FilePath filePath, @NotNull VcsFileRevision older, @NotNull VcsFileRevision newer) { if (!filePath.isDirectory()) { VcsHistoryUtil.showDifferencesInBackground(myProject, filePath, older, newer); } else if (older.equals(VcsFileRevision.NULL)) { T right = (T)newer; showAffectedChanges(filePath, right); } e...
doShowDiff
259,096
void (@NotNull final FilePath path, @NotNull final T older, @Nullable final T newer) { if (newer == null) { FileDocumentManager.getInstance().saveAllDocuments(); } new CollectChangesTask(VcsBundle.message("file.history.diff.handler.comparing.process")) { @NotNull @Override public List<Change> getChanges() throws VcsExc...
showChangesBetweenRevisions
259,097
String () { return getChangesBetweenRevisionsDialogTitle(path, older, newer); }
getDialogTitle
259,098
void (@NotNull final FilePath path, @NotNull final T rev) { new CollectChangesTask(VcsBundle.message("file.history.diff.handler.collecting.affected.process")) { @NotNull @Override public List<Change> getChanges() throws VcsException { return getAffectedChanges(path, rev); } @NotNull @Override public String getDialogTit...
showAffectedChanges
259,099
String () { return getAffectedChangesDialogTitle(path, rev); }
getDialogTitle