Unnamed: 0
int64
0
305k
body
stringlengths
7
52.9k
name
stringlengths
1
185
68,100
boolean () { return FILE.equals(this); }
isFile
68,101
boolean () { return DIR.equals(this); }
isDirectory
68,102
boolean () { return NONE.equals(this); }
isNone
68,103
String () { return myKey; }
toString
68,104
void (@NotNull NodeKind kind) { ourAllNodeKinds.put(kind.myKey, kind); }
register
68,105
NodeKind (@NotNull String nodeKindName) { NodeKind result = ourAllNodeKinds.get(nodeKindName); if (result == null) { throw new IllegalArgumentException("Unknown node kind " + nodeKindName); } return result; }
from
68,106
NodeKind (boolean isDirectory) { return isDirectory ? DIR : FILE; }
from
68,107
void () { addClient = new CmdAddClient(); annotateClient = new CmdAnnotateClient(); contentClient = new CmdContentClient(); historyClient = new CmdHistoryClient(); revertClient = new CmdRevertClient(); deleteClient = new CmdDeleteClient(); copyMoveClient = new CmdCopyMoveClient(); conflictClient = new CmdConflictClient...
setup
68,108
UpdateClient () { return prepare(new CmdUpdateClient()); }
createUpdateClient
68,109
SvnVcs () { return myVcs; }
getVcs
68,110
void (@NotNull SvnVcs vcs) { myVcs = vcs; }
setVcs
68,111
ClientFactory () { return myFactory; }
getFactory
68,112
void (@NotNull ClientFactory factory) { myFactory = factory; }
setFactory
68,113
void (boolean isActive) { myIsActive = isActive; }
setIsActive
68,114
void (@NotNull Target target) { if (!target.isUrl()) { throw new IllegalArgumentException("Target should be url " + target); } }
assertUrl
68,115
void (@NotNull Target target) { if (!target.isFile()) { throw new IllegalArgumentException("Target should be file " + target); } }
assertFile
68,116
void (@NotNull Target target) { assertFile(target); if (!target.getFile().isDirectory()) { throw new IllegalArgumentException("Target should be directory " + target); } }
assertDirectory
68,117
Command (@NotNull SvnCommandName name) { return new Command(name); }
newCommand
68,118
CommandRuntime (@NotNull SvnVcs vcs) { return new CommandRuntime(vcs, new AuthenticationService(vcs, myIsActive)); }
newRuntime
68,119
ProgressEvent (@NotNull File path, @Nullable EventAction action) { return new ProgressEvent(path, 0, null, null, action, null, null); }
createEvent
68,120
Revision (@Nullable Revision revision) { return revision != null ? revision : Revision.UNDEFINED; }
notNullize
68,121
int (@NotNull String value) { return Integer.parseInt(value); }
getInt
68,122
File () { return myFile; }
getFile
68,123
EventAction () { return myAction; }
getAction
68,124
StatusType () { return myContentsStatus; }
getContentsStatus
68,125
String () { return myErrorMessage; }
getErrorMessage
68,126
StatusType () { return myPropertiesStatus; }
getPropertiesStatus
68,127
long () { return myRevision; }
getRevision
68,128
Url () { return myURL; }
getURL
68,129
String () { return myFile != null ? myFile.getName() : myURL != null ? myURL.toString() : null; }
getPath
68,130
String () { return getAction() + " " + getFile() + " " + getURL(); }
toString
68,131
String () { return message("patch.creation.save.to.file.button"); }
getName
68,132
void (@NotNull List<? extends FilePatch> remaining, @NotNull MultiMap<VirtualFile, TextFilePatchInProgress> patchGroupsToApply, @Nullable LocalChangeList localList, @Nullable String fileName, @Nullable ThrowableComputable<Map<String, Map<String, CharSequence>>, PatchSyntaxException> additionalInfo) { FileSaverDialog di...
apply
68,133
void (@NotNull MultiMap<VirtualFile, TextFilePatchInProgress> patchGroups, @NotNull VirtualFileWrapper targetFile) { VirtualFile newPatchBase = notNull(myNewPatchBase, myProject.getBaseDir()); try { List<FilePatch> textPatches = toOnePatchGroup(patchGroups, newPatchBase); PatchWriter.writePatches(myProject, targetFile....
savePatch
68,134
void () { String message = myChange.isMoved() ? message("confirmation.resolve.tree.conflict.merge.moved", myOldPresentation, myNewPresentation) : message("confirmation.resolve.tree.conflict.merge.renamed", myOldPresentation, myNewPresentation); int ok = showOkCancelDialog(myVcs.getProject(), message, message("dialog.ti...
execute
68,135
void () { showOverChangesView(myVcs.getProject(), message("message.theirs.changes.merged.for.file", myOldPresentation), MessageType.INFO); showErrors(); }
notifyMergeIsFinished
68,136
void (@NotNull Consumer<VcsException> callback) { LocalChangeList changeList = ChangeListManager.getInstance(myVcs.getProject()).getChangeList(myChange); TreeConflictApplyTheirsPatchExecutor patchExecutor = new TreeConflictApplyTheirsPatchExecutor(myVcs, myBaseForPatch); ApplyPatchDifferentiatedDialog dialog = new Appl...
selectPatchesInApplyPatchDialog
68,137
String () { return VcsBundle.message("button.apply.patch"); }
getName
68,138
void (@NotNull List<? extends FilePatch> remaining, @NotNull MultiMap<VirtualFile, TextFilePatchInProgress> patchGroupsToApply, @Nullable LocalChangeList localList, @Nullable String fileName, @Nullable ThrowableComputable<Map<String, Map<String, CharSequence>>, PatchSyntaxException> additionalInfo) { new Task.Backgroun...
apply
68,139
void (@NotNull ProgressIndicator indicator) { try { List<FilePatch> patches = ApplyPatchSaveToFileExecutor.toOnePatchGroup(patchGroupsToApply, myBaseDir); new PatchApplier(Objects.requireNonNull(myProject), myBaseDir, patches, localList, null).execute(false, true); myThereAreCreations = patches.stream().anyMatch(patch ...
run
68,140
void () { myPromise.setResult(myException); }
onFinished
68,141
Collection<FilePath> (@NotNull List<Change> changes, @NotNull Set<FilePath> paths) { return AbstractVcsHelper.getInstance(myVcs.getProject()).selectFilePathsToProcess( new ArrayList<>(paths), message("dialog.title.resolve.tree.conflict"), message("dialog.message.select.binary.files.to.patch"), message("dialog.title.res...
chooseBinaryFiles
68,142
boolean (@NotNull Change change, @NotNull FilePath path) { FilePath beforePath = getBeforePath(change); FilePath afterPath = getAfterPath(change); return beforePath != null && isAncestor(path.getPath(), beforePath.getPath(), true) || afterPath != null && isAncestor(path.getPath(), afterPath.getPath(), true); }
isUnderOldDir
68,143
FilePath (@NotNull FilePath oldBase, @NotNull FilePath newBase, @NotNull FilePath path) { String relativePath = Objects.requireNonNull(getRelativePath(oldBase.getPath(), path.getPath(), '/')); return VcsUtil.getFilePath(newBase.getPath() + "/" + relativePath, path.isDirectory()); }
rebasePath
68,144
void () { ThreadingAssertions.assertEventDispatchThread(); if (myAdd == null) { myAdd = getAddedFilesPlaceOption(); } }
initAddOption
68,145
boolean () { SvnConfiguration configuration = myVcs.getSvnConfiguration(); Boolean add = configuration.isKeepNewFilesAsIsForTreeConflictMerge(); if (add != null) { return add; } if (!containAdditions(myTheirsChanges) && !containAdditions(myTheirsBinaryChanges)) { return false; } return Messages.YES == yesNo(message("di...
getAddedFilesPlaceOption
68,146
boolean () { return true; }
isToBeShown
68,147
void (boolean value, int exitCode) { if (!value) { configuration.setKeepNewFilesAsIsForTreeConflictMerge(exitCode == 0); } }
setToBeShown
68,148
boolean () { return true; }
canBeHidden
68,149
boolean () { return true; }
shouldSaveOptionsOnCancel
68,150
String () { return IdeCoreBundle.message("dialog.options.do.not.ask"); }
getDoNotShowMessage
68,151
boolean (@NotNull List<Change> changes) { return changes.stream().anyMatch(change -> change.getBeforeRevision() == null || change.isMoved() || change.isRenamed()); }
containAdditions
68,152
boolean (@Nullable ContentRevision revision) { return revision instanceof BinaryContentRevision && !revision.getFile().isDirectory(); }
isBinaryContentRevision
68,153
boolean (@NotNull Change change) { return isBinaryContentRevision(change.getBeforeRevision()) || isBinaryContentRevision(change.getAfterRevision()); }
isBinaryChange
68,154
void (@NotNull FilePath path) { VirtualFile validParent = ChangesUtil.findValidParentAccurately(path); if (validParent != null) { validParent.refresh(false, true); if (path.isDirectory()) { myDirtyScopeManager.dirDirtyRecursively(path); } else { myDirtyScopeManager.fileDirty(path); } } }
pathDirty
68,155
boolean (TreeConflictDescription d1, TreeConflictDescription d2) { if (!d1.getOperation().equals(d2.getOperation())) return false; if (!d1.getConflictAction().equals(d2.getConflictAction())) return false; if (!Comparing.equal(d1.getConflictReason(), d2.getConflictReason())) return false; if (!Comparing.equal(d1.getPath...
descriptionsEqual
68,156
boolean (ConflictVersion v1, ConflictVersion v2) { if (v1 == null && v2 == null) return true; if (v1 == null || v2 == null) return false; if (!v1.getNodeKind().equals(v2.getNodeKind())) return false; if (!v1.getPath().equals(v2.getPath())) return false; if (v1.getPegRevision() != v2.getPegRevision()) return false; if (...
compareConflictVersion
68,157
JPanel () { return myDetailsPanel; }
getPanel
68,158
Revision (@NotNull TreeConflictDescription description) { Revision result = null; if (description.getSourceLeftVersion() != null) { long committed = description.getSourceLeftVersion().getPegRevision(); if (myCommittedRevision != null && myCommittedRevision.getRevision().getNumber() < committed && myCommittedRevision.ge...
getPegRevisionFromLeftSide
68,159
boolean (TreeConflictDescription description) { return description.getSourceLeftVersion() != null && description.getSourceRightVersion() != null && !Objects.equals(description.getSourceLeftVersion().getPath(), description.getSourceRightVersion().getPath()); }
isDifferentURLs
68,160
void () { ThreadingAssertions.assertEventDispatchThread(); myDetailsPanel.startLoading(); Loader task = new Loader(myVcs.getProject()); myIndicator = new BackgroundableProcessIndicator(task); myQueue.run(task, defaultModalityState(), myIndicator); }
refresh
68,161
JPanel (BeforeAfter<BeforeAfter<ConflictSidePresentation>> data) { final JPanel wrapper = new JPanel(new BorderLayout()); final JPanel main = new JPanel(new GridBagLayout()); final GridBagConstraints gb = new GridBagConstraints(0, 0, 1, 1, 1, 0, GridBagConstraints.NORTHWEST, GridBagConstraints.HORIZONTAL, JBUI.insets(1...
dataToPresentation
68,162
void (TreeConflictDescription description, JPanel main, GridBagConstraints gb, BeforeAfter<ConflictSidePresentation> ba) { if (description == null) return; JLabel descriptionLbl = new JLabel(description.toPresentableString()); descriptionLbl.setForeground(JBColor.RED); main.add(descriptionLbl, gb); ++gb.gridy; //button...
appendDescription
68,163
void (TreeConflictDescription description, JPanel main, GridBagConstraints gb) { JPanel wrapper = new JPanel(new FlowLayout(FlowLayout.LEFT, 5, 5)); final JButton merge = new JButton(message("button.resolve.conflict.merge")); final JButton left = new JButton(message("button.resolve.conflict.accept.yours")); final JButt...
addResolveButtons
68,164
ActionListener (final TreeConflictDescription description) { return new ActionListener() { @Override public void actionPerformed(ActionEvent e) { int ok = Messages.showOkCancelDialog( myVcs.getProject(), message("dialog.message.accept.theirs.for.path", filePath(myPath)), message("dialog.title.resolve.tree.conflict"), M...
createRight
68,165
void (ActionEvent e) { int ok = Messages.showOkCancelDialog( myVcs.getProject(), message("dialog.message.accept.theirs.for.path", filePath(myPath)), message("dialog.title.resolve.tree.conflict"), Messages.getQuestionIcon() ); if (Messages.OK != ok) return; FileDocumentManager.getInstance().saveAllDocuments(); final Pat...
actionPerformed
68,166
void () { super.onSuccess(); if (executedOk()) { showOverChangesView(myProject, message("message.theirs.accepted.for.file", filePath(paths.myMainPath)), MessageType.INFO); } }
onSuccess
68,167
Paths (final TreeConflictDescription description) { FilePath mainPath; FilePath additionalPath = null; if (myChange.isMoved() || myChange.isRenamed()) { if (ConflictAction.ADD.equals(description.getConflictAction())) { mainPath = myChange.getAfterRevision().getFile(); additionalPath = myChange.getBeforeRevision().getFi...
getPaths
68,168
ActionListener (final TreeConflictDescription description) { return new ActionListener() { @Override public void actionPerformed(ActionEvent e) { int ok = Messages.showOkCancelDialog( myVcs.getProject(), message("dialog.message.accept.yours.for.path", filePath(myPath)), message("dialog.title.resolve.tree.conflict"), Me...
createLeft
68,169
void (ActionEvent e) { int ok = Messages.showOkCancelDialog( myVcs.getProject(), message("dialog.message.accept.yours.for.path", filePath(myPath)), message("dialog.title.resolve.tree.conflict"), Messages.getQuestionIcon() ); if (Messages.OK != ok) return; FileDocumentManager.getInstance().saveAllDocuments(); final Path...
actionPerformed
68,170
void () { super.onSuccess(); if (executedOk()) { showOverChangesView(myProject, message("message.yours.accepted.for.file", filePath(paths.myMainPath)), MessageType.INFO); } }
onSuccess
68,171
ActionListener (final TreeConflictDescription description) { if (isDifferentURLs(description)) { return null; } // my edit, theirs move or delete if (ConflictAction.EDIT.equals(description.getConflictAction()) && description.getSourceLeftVersion() != null && ConflictReason.DELETED.equals(description.getConflictReason()...
createMerge
68,172
ActionListener (final TreeConflictDescription description) { return e -> new MergeFromTheirsResolver(myVcs, description, myChange, myCommittedRevision).execute(); }
createMergeTheirsForFile
68,173
String (@NotNull FilePath newFilePath) { return newFilePath.getName() + " (" + Objects.requireNonNull(newFilePath.getParentPath()).getPath() + ")"; }
filePath
68,174
void (final ActionListener al, final JButton b) { if (al == null) { b.setEnabled(false); } else { b.addActionListener(al); } }
enableAndSetListener
68,175
void (JPanel main, GridBagConstraints gb, ConflictSidePresentation conflictSide, @NlsContexts.Label String description) { gb.insets.top = 10; main.add(new JBLabel(description), gb); ++gb.gridy; gb.insets.top = 0; if (conflictSide != null) { JPanel panel = conflictSide.createPanel(); if (panel != null) { main.add(panel,...
addSide
68,176
void () { myIndicator.cancel(); Disposer.dispose(myChildDisposables); }
dispose
68,177
void (@NotNull ProgressIndicator indicator) { try { myData = new BeforeAfter<>(processDescription(indicator, myChange.getBeforeDescription()), processDescription(indicator, myChange.getAfterDescription())); } catch (VcsException e) { myException = e; } }
run
68,178
void () { if (myException != null) { showOverChangesView(myProject, myException.getMessage(), MessageType.ERROR); } else { myDetailsPanel.add(dataToPresentation(myData)); myDetailsPanel.stopLoading(); } }
onSuccess
68,179
DiffViewer (@NotNull DiffRequest propertyRequest, @NotNull MyPropertyContext propertyContext) { if (propertyRequest instanceof SvnPropertiesDiffRequest) { return SvnPropertiesDiffViewer.create(propertyContext, ((SvnPropertiesDiffRequest)propertyRequest), true); } else { return ErrorDiffTool.INSTANCE.createComponent(pro...
createPropertiesViewer
68,180
ToolbarComponents () { installListeners(); processContextHints(); ToolbarComponents properties = myPropertiesViewer.init(); ToolbarComponents components = new ToolbarComponents(); components.toolbarActions = createToolbar(properties.toolbarActions); return components; }
init
68,181
void () { destroyListeners(); updateContextHints(); Disposer.dispose(myPropertiesViewer); myPropertyRequest.onAssigned(false); }
dispose
68,182
void () { if (myContext.getUserData(FOCUSED_VIEWER_KEY) == Boolean.TRUE) myPropertiesViewerFocused = true; myDumbContentViewer = myContentViewer.getPreferredFocusedComponent() == null; }
processContextHints
68,183
void () { if (!myDumbContentViewer && !mySettings.isHideProperties()) myContext.putUserData(FOCUSED_VIEWER_KEY, myPropertiesViewerFocused); mySettings.setSplitterProportion(mySplitter.getProportion()); }
updateContextHints
68,184
JComponent () { if (myPropertyRequest instanceof ErrorDiffRequest) { return createNotification(((ErrorDiffRequest)myPropertyRequest).getMessage(), EditorNotificationPanel.Status.Error); } List<DiffContent> contents = ((SvnPropertiesDiffRequest)myPropertyRequest).getContents(); Map<String, PropertyValue> before = getPro...
createNotification
68,185
JPanel (@NlsContexts.Label @NotNull String text, @NotNull EditorNotificationPanel.Status status) { return new EditorNotificationPanel(status).text(text); }
createNotification
68,186
void () { DiffUtil.runPreservingFocus(myContext, () -> { if (!mySettings.isHideProperties()) { mySplitter.setSecondComponent(myPropertiesViewer.getComponent()); myNotificationPanel.setContent(null); } else { mySplitter.setSecondComponent(null); myNotificationPanel.setContent(createNotification()); } }); }
updatePropertiesPanel
68,187
List<AnAction> (@Nullable List<AnAction> propertiesActions) { List<AnAction> result = new ArrayList<>(); if (propertiesActions != null) result.addAll(propertiesActions); result.add(new ToggleHidePropertiesAction()); return result; }
createToolbar
68,188
SvnDiffSettings (@NotNull DiffContext context) { SvnDiffSettings settings = context.getUserData(SvnDiffSettings.KEY); if (settings == null) { settings = SvnDiffSettings.getSettings(); context.putUserData(SvnDiffSettings.KEY, settings); } return settings; }
initSettings
68,189
MyPropertyContext (@NotNull DiffContext context) { MyPropertyContext propertyContext = context.getUserData(PROPERTY_CONTEXT_KEY); if (propertyContext == null) { propertyContext = new MyPropertyContext(); context.putUserData(PROPERTY_CONTEXT_KEY, propertyContext); } return propertyContext; }
initPropertyContext
68,190
void () { myContentViewer.getComponent().addFocusListener(myContentFocusListener); myPropertiesViewer.getComponent().addFocusListener(myPropertiesFocusListener); }
installListeners
68,191
void () { myContentViewer.getComponent().removeFocusListener(myContentFocusListener); myPropertiesViewer.getComponent().removeFocusListener(myPropertiesFocusListener); }
destroyListeners
68,192
JComponent () { return myPanel; }
getComponent
68,193
JComponent () { if (myPropertiesViewerFocused) { JComponent component = getPropertiesPreferredFocusedComponent(); if (component != null) return component; return myContentViewer.getPreferredFocusedComponent(); } else { JComponent component = myContentViewer.getPreferredFocusedComponent(); if (component != null) return ...
getPreferredFocusedComponent
68,194
JComponent () { if (mySettings.isHideProperties()) return null; return myPropertiesViewer.getPreferredFocusedComponent(); }
getPropertiesPreferredFocusedComponent
68,195
ActionUpdateThread () { return ActionUpdateThread.EDT; }
getActionUpdateThread
68,196
boolean (@NotNull AnActionEvent e) { return !mySettings.isHideProperties(); }
isSelected
68,197
void (@NotNull AnActionEvent e, boolean state) { mySettings.setHideProperties(!state); updatePropertiesPanel(); }
setSelected
68,198
Project () { return myContext.getProject(); }
getProject
68,199
boolean () { return myContext.isWindowFocused(); }
isWindowFocused