Unnamed: 0
int64
0
305k
body
stringlengths
7
52.9k
name
stringlengths
1
185
260,300
void (DnDEvent event) { super.drop(event); Object attachedObject = event.getAttachedObject(); if (attachedObject instanceof ShelvedChangeListDragBean) { ShelveChangesManager.unshelveSilentlyWithDnd(myProject, (ShelvedChangeListDragBean)attachedObject, null, !ChangesTreeDnDSupport.isCopyAction(event)); } }
drop
260,301
boolean (@NotNull DnDEvent event) { Object attachedObject = event.getAttachedObject(); if (attachedObject instanceof ShelvedChangeListDragBean) { return !((ShelvedChangeListDragBean)attachedObject).getShelvedChangelists().isEmpty(); } return attachedObject instanceof ChangeListDragBean; }
isDropPossible
260,302
void (@NotNull RegistryValue value) { configureToolbars(); }
afterValueChanged
260,303
Dimension () { return isMinimumSizeSet() || myChangesPanel.isToolbarHorizontal() ? super.getMinimumSize() : myChangesPanel.getToolbar().getComponent().getPreferredSize(); }
getMinimumSize
260,304
void (@NotNull RegistryValue value) { if (myEditorDiffPreview != null) setDiffPreview(); }
afterValueChanged
260,305
void (@NotNull ToolWindowManager toolWindowManager) { setCommitSplitOrientation(); }
stateChanged
260,306
void (@NotNull VirtualFile file) { refreshChangesViewNodeAsync(file); }
problemsAppeared
260,307
void (@NotNull VirtualFile file) { refreshChangesViewNodeAsync(file); }
problemsDisappeared
260,308
void () { myDisposed = true; }
dispose
260,309
void () { if (myDisposed) return; boolean isEditorPreview = isEditorPreview(myProject); boolean hasSplitterPreview = !isCommitToolWindowShown(myProject); //noinspection DoubleNegation boolean needUpdatePreviews = isEditorPreview != (myEditorChangeProcessor != null) || hasSplitterPreview != (mySplitterChangeProcessor !=...
setDiffPreview
260,310
EditorTabPreview (@NotNull ChangesViewDiffPreviewProcessor changeProcessor, boolean hasSplitterPreview) { return new SimpleTreeEditorDiffPreview(changeProcessor, myView, myContentPanel, isOpenEditorDiffPreviewWithSingleClick.asBoolean() && !hasSplitterPreview) { @Override public void returnFocusToTree() { ToolWindow to...
installEditorPreview
260,311
void () { ToolWindow toolWindow = getToolWindowFor(myProject, LOCAL_CHANGES); if (toolWindow != null) toolWindow.activate(null); }
returnFocusToTree
260,312
void (@NotNull AnActionEvent e) { ShowDiffFromLocalChangesActionProvider.updateAvailability(e); }
updateDiffAction
260,313
String () { String changeName = changeProcessor.getCurrentChangeName(); return changeName != null ? VcsBundle.message("commit.editor.diff.preview.title", changeName) : VcsBundle.message("commit.editor.diff.preview.empty.title"); }
getCurrentName
260,314
boolean () { if (super.skipPreviewUpdate()) return true; if (!myView.equals(IdeFocusManager.getInstance(myProject).getFocusOwner())) return true; if (!isPreviewOpen() && !isEditorPreviewAllowed()) return true; return myModelUpdateInProgress; }
skipPreviewUpdate
260,315
boolean () { return isCommitToolWindowShown(myProject) ? VcsApplicationSettings.getInstance().SHOW_EDITOR_PREVIEW_ON_DOUBLE_CLICK : VcsApplicationSettings.getInstance().SHOW_DIFF_ON_DOUBLE_CLICK; }
isPreviewOnDoubleClickAllowed
260,316
boolean () { return isCommitToolWindowShown(myProject) ? VcsApplicationSettings.getInstance().SHOW_EDITOR_PREVIEW_ON_DOUBLE_CLICK : VcsApplicationSettings.getInstance().SHOW_DIFF_ON_DOUBLE_CLICK; }
isPreviewOnEnterAllowed
260,317
PreviewDiffSplitterComponent (@NotNull ChangesViewDiffPreviewProcessor changeProcessor) { PreviewDiffSplitterComponent previewSplitter = new PreviewDiffSplitterComponent(changeProcessor, CHANGES_VIEW_PREVIEW_SPLITTER_PROPORTION); previewSplitter.setFirstComponent(myContentPanel); DiffPreview.setPreviewVisible(previewSp...
installSplitterPreview
260,318
boolean () { return !isOpenEditorDiffPreviewWithSingleClick.asBoolean() || myVcsConfiguration.LOCAL_CHANGES_DETAILS_PREVIEW_SHOWN; }
isEditorPreviewAllowed
260,319
void (boolean onlyIfEmpty) { if (myEditorDiffPreview == null) return; EditorTabPreview editorPreview = myEditorDiffPreview; if (onlyIfEmpty && editorPreview.hasContent()) return; editorPreview.closePreview(); }
closeEditorPreview
260,320
void (boolean fromModelRefresh) { if (myEditorDiffPreview != null) { myEditorDiffPreview.updatePreview(fromModelRefresh); } if (mySplitterDiffPreview != null) { mySplitterDiffPreview.updatePreview(fromModelRefresh); } }
updatePreview
260,321
void () { if (myDisposed) return; ChangesViewCommitWorkflowHandler newWorkflowHandler = ChangesViewWorkflowManager.getInstance(myProject).getCommitWorkflowHandler(); if (myCommitWorkflowHandler == newWorkflowHandler) return; if (newWorkflowHandler != null) { newWorkflowHandler.addActivityListener(() -> configureDiffPre...
updateCommitWorkflow
260,322
boolean () { return myCommitWorkflowHandler != null && myCommitWorkflowHandler.isActive(); }
isAllowExcludeFromCommit
260,323
void () { if (myEditorChangeProcessor != null) { myEditorChangeProcessor.setAllowExcludeFromCommit(isAllowExcludeFromCommit()); } if (mySplitterChangeProcessor != null) { mySplitterChangeProcessor.setAllowExcludeFromCommit(isAllowExcludeFromCommit()); } }
configureDiffPreview
260,324
void () { boolean isToolbarHorizontal = CommitModeManager.getInstance(myProject).getCurrentCommitMode().useCommitToolWindow() && isToolbarHorizontalSetting.asBoolean(); myChangesPanel.setToolbarHorizontal(isToolbarHorizontal); if (myCommitPanel != null) myCommitPanel.setToolbarHorizontal(isToolbarHorizontal); }
configureToolbars
260,325
void () { boolean hasPreviewPanel = myVcsConfiguration.LOCAL_CHANGES_DETAILS_PREVIEW_SHOWN && mySplitterDiffPreview != null; ToolWindow tw = getToolWindowFor(myProject, LOCAL_CHANGES); if (tw != null) { boolean toolwindowIsHorizontal = tw.getAnchor().isHorizontal(); myCommitPanelSplitter.setOrientation(hasPreviewPanel ...
setCommitSplitOrientation
260,326
List<AnAction> (boolean originalProvider) { return asList(myChangesPanel.getToolbarActionGroup().getChildren(null)); }
getActions
260,327
void (@NotNull JComponent component) { ActionUtil.wrap("ChangesView.Refresh").registerCustomShortcutSet(CommonShortcuts.getRerun(), component); ActionUtil.wrap("ChangesView.NewChangeList").registerCustomShortcutSet(CommonShortcuts.getNew(), component); ActionUtil.wrap("ChangesView.RemoveChangeList").registerCustomShort...
registerShortcuts
260,328
List<AnAction> (@NotNull TreeExpander treeExpander) { List<AnAction> actions = new ArrayList<>(); actions.add(CustomActionsSchema.getInstance().getCorrectedAction(ActionPlaces.CHANGES_VIEW_TOOLBAR)); if (!ExperimentalUI.isNewUI()) { actions.add(Separator.getInstance()); } DefaultActionGroup viewOptionsGroup = DefaultAc...
createChangesToolbarActions
260,329
void (@NotNull List<Supplier<@Nullable JComponent>> progress) { invokeLaterIfNeeded(() -> { if (myDisposed) return; List<? extends @Nullable JComponent> components = ContainerUtil.mapNotNull(progress, it -> it.get()); if (!components.isEmpty()) { JComponent component = DiffUtil.createStackedComponents(components, DiffU...
updateProgressComponent
260,330
void (@NlsContexts.Label String text, boolean isError) { updateProgressComponent(Collections.singletonList(createTextStatusFactory(text, isError))); }
updateProgressText
260,331
void (final boolean b) { invokeLaterIfNeeded(() -> myView.setPaintBusy(b)); }
setBusy
260,332
void () { scheduleRefreshWithDelay(100, ModalityState.nonModal()); }
scheduleRefresh
260,333
void () { scheduleRefreshWithDelay(0, ModalityState.nonModal()); }
scheduleRefreshNow
260,334
void () { myView.setModel(new DefaultTreeModel(ChangesBrowserNode.createRoot())); myView.setPaintBusy(true); ApplicationManager.getApplication().invokeLater(() -> { scheduleRefreshNow(); }, ModalityState.nonModal()); }
resetViewImmediatelyAndRefreshLater
260,335
void (@NotNull DefaultTreeModel treeModel, @NotNull List<? extends LocalChangeList> changeLists, @NotNull List<? extends FilePath> unversionedFiles, boolean hasPendingRefresh) { if (myDisposed) return; Span span = TRACER.spanBuilder(ChangesView.ChangesViewRefreshEdt.getName()).startSpan(); try { myModelUpdateInProgress...
refreshViewOnEdt
260,336
void (@NotNull ChangesListView view, @NotNull DefaultTreeModel newModel) { TreeState state = TreeState.createOn(view, view.getRoot()); state.setScrollToSelection(false); ChangesBrowserNode<?> oldRoot = view.getRoot(); view.setModel(newModel); ChangesBrowserNode<?> newRoot = view.getRoot(); state.applyTo(view, newRoot);...
updateModel
260,337
void (@NotNull ChangesListView view, @NotNull ChangesBrowserNode<?> oldRoot, @NotNull ChangesBrowserNode<?> newRoot) { ChangesBrowserNode<?> defaultListNode = getDefaultChangelistNode(newRoot); if (defaultListNode == null) return; if (view.getSelectionCount() == 0) { TreeUtil.selectNode(view, defaultListNode); } if (ol...
initTreeStateIfNeeded
260,338
void (@NotNull String groupingKey) { myView.getGroupingSupport().setGroupingKeysOrSkip(Set.of(groupingKey)); scheduleRefreshNow(); }
setGrouping
260,339
void (@Nullable VirtualFile vFile) { if (vFile == null) return; ChangesBrowserNode<?> node = findNodeForFile(vFile); if (node == null) return; TreeUtil.selectNode(myView, node); }
selectFile
260,340
void (@NotNull List<? extends Change> changes) { List<TreePath> paths = new ArrayList<>(); for (Change change : changes) { ContainerUtil.addIfNotNull(paths, myView.findNodePathInTree(change)); } TreeUtil.selectPaths(myView, paths); }
selectChanges
260,341
void (@NotNull VirtualFile file) { invokeLater(() -> refreshChangesViewNode(file)); }
refreshChangesViewNodeAsync
260,342
void (@NotNull VirtualFile file) { ChangesBrowserNode<?> node = findNodeForFile(file); if (node == null) return; myView.getModel().nodeChanged(node); }
refreshChangesViewNode
260,343
void (Runnable runnable) { ApplicationManager.getApplication().invokeLater(runnable, ModalityState.nonModal(), myProject.getDisposed()); }
invokeLater
260,344
void (Runnable runnable) { ModalityUiUtil.invokeLaterIfNeeded(ModalityState.nonModal(), myProject.getDisposed(), runnable); }
invokeLaterIfNeeded
260,345
void () { scheduleRefresh(); }
changeListsChanged
260,346
void () { scheduleRefresh(); }
unchangedFileStatusChanged
260,347
void () { setBusy(false); scheduleRefresh(); ChangeListManagerImpl changeListManager = ChangeListManagerImpl.getInstanceImpl(myProject); updateProgressComponent(changeListManager.getAdditionalUpdateInfo()); }
changedFileStatusChanged
260,348
ActionUpdateThread () { return ActionUpdateThread.EDT; }
getActionUpdateThread
260,349
boolean (@NotNull AnActionEvent e) { return myChangesViewManager.myState.myShowIgnored; }
isSelected
260,350
void (@NotNull AnActionEvent e, boolean state) { myChangesViewManager.myState.myShowIgnored = state; scheduleRefreshNow(); }
setSelected
260,351
RemoteRevisionsCache (final Project project) { return project.getService(RemoteRevisionsCache.class); }
getInstance
260,352
void (boolean remoteCacheStateChanged) { manageAlarm(); }
updateAutomaticRefreshAlarmState
260,353
void () { final VcsConfiguration vcsConfiguration = VcsConfiguration.getInstance(myProject); if ((! myProject.isDefault()) && myVcsManager.hasActiveVcss() && vcsConfiguration.isChangedOnServerEnabled()) { // will check whether is already started inside // interval is checked further, this is small and constant myContro...
manageAlarm
260,354
void () { if (! VcsConfiguration.getInstance(myProject).isChangedOnServerEnabled()) { manageAlarm(); } else { BackgroundTaskUtil.executeOnPooledThread(myProject, () -> { try { myRemoteRevisionsNumbersCache.directoryMappingChanged(); myRemoteRevisionsStateCache.directoryMappingChanged(); manageAlarm(); } catch (ProcessC...
directoryMappingChanged
260,355
void (@NotNull String path, @NotNull AbstractVcs vcs) { if (RemoteDifferenceStrategy.ASK_TREE_PROVIDER.equals(vcs.getRemoteDifferenceStrategy())) { myRemoteRevisionsStateCache.changeUpdated(path, vcs); } else { myRemoteRevisionsNumbersCache.changeUpdated(path, vcs); } }
changeUpdated
260,356
void (final UpdatedFiles updatedFiles) { final Collection<String> newForTree = new ArrayList<>(); final Collection<String> newForUsual = new ArrayList<>(); UpdateFilesHelper.iterateAffectedFiles(updatedFiles, pair -> { AbstractVcs vcs = myVcsManager.findVcsByName(pair.getSecond()); if (vcs == null) return; if (RemoteDi...
invalidate
260,357
void (@NotNull String path, @NotNull AbstractVcs vcs) { if (RemoteDifferenceStrategy.ASK_TREE_PROVIDER.equals(vcs.getRemoteDifferenceStrategy())) { myRemoteRevisionsStateCache.changeRemoved(path, vcs); } else { myRemoteRevisionsNumbersCache.changeRemoved(path, vcs); } }
changeRemoved
260,358
boolean (@NotNull Change change) { if (myProject.isDisposed()) return true; final AbstractVcs vcs = ChangesUtil.getVcsForChange(change, myProject); if (vcs == null) return true; final RemoteDifferenceStrategy strategy = vcs.getRemoteDifferenceStrategy(); if (RemoteDifferenceStrategy.ASK_TREE_PROVIDER.equals(strategy)) ...
isUpToDate
260,359
RemoteStatusChangeNodeDecorator () { return myChangeDecorator; }
getChangesNodeDecorator
260,360
LocalChangeList (@NotNull String name, @Nullable String comment, @Nullable ChangeListData data) { AddList command = new AddList(name, comment, data); impl(command); LocalChangeList newList = command.getNewListCopy(); return newList != null ? newList : myWorker.getDefaultList(); }
addChangeList
260,361
void (@NotNull String name, boolean automatic) { SetDefault command = new SetDefault(name, automatic); impl(command); }
setDefault
260,362
void (@NotNull String name) { RemoveList command = new RemoveList(name); impl(command); }
removeChangeList
260,363
void (@NotNull String name, @NotNull List<Change> changes) { MoveChanges command = new MoveChanges(name, changes); impl(command); }
moveChangesTo
260,364
boolean (@NotNull String name, boolean value) { SetReadOnly command = new SetReadOnly(name, value); impl(command); return command.isResult(); }
setReadOnly
260,365
boolean (@NotNull String fromName, @NotNull String toName) { EditName command = new EditName(fromName, toName); impl(command); return command.isResult(); }
editName
260,366
String (@NotNull String fromName, @NotNull String newComment) { EditComment command = new EditComment(fromName, newComment); impl(command); return command.getOldComment(); }
editComment
260,367
boolean (@NotNull String fromName, @Nullable ChangeListData newData) { EditData command = new EditData(fromName, newData); impl(command); return command.isResult(); }
editData
260,368
void (@NotNull ChangeListCommand command) { if (!myWorker.areChangeListsEnabled()) { LOG.warn("Changelists are disabled, command ignored", new Throwable()); return; } if (myInsideUpdate) { // apply command and store it to be applied again when update is finished // notification about this invocation might be sent later...
impl
260,369
boolean () { return myInsideUpdate; }
isInsideUpdate
260,370
void () { myInsideUpdate = true; }
enterUpdate
260,371
void (@Nullable ChangeListWorker updatedWorker) { myInsideUpdate = false; if (!myWorker.areChangeListsEnabled()) { if (!myCommandQueue.isEmpty()) LOG.warn("Changelists are disabled, commands ignored: " + myCommandQueue); myCommandQueue.clear(); return; } if (updatedWorker != null) { for (ChangeListCommand command : myC...
finishUpdate
260,372
void (@NotNull AnActionEvent e) { super.update(e); Project project = e.getProject(); if (project == null) return; ChangesViewManager changesViewManager = getChangesViewManager(project); if (changesViewManager == null) return; e.getPresentation().setEnabledAndVisible(changesViewManager.isDiffPreviewAvailable()); }
update
260,373
ActionUpdateThread () { return ActionUpdateThread.EDT; }
getActionUpdateThread
260,374
void (@NotNull AnActionEvent e, boolean state) { Project project = e.getProject(); if (project == null) return; VcsConfiguration.getInstance(project).LOCAL_CHANGES_DETAILS_PREVIEW_SHOWN = state; ChangesViewManager changesViewManager = getChangesViewManager(project); if (changesViewManager == null) return; changesViewMa...
setSelected
260,375
boolean (@NotNull AnActionEvent e) { Project project = e.getProject(); if (project == null) return false; return VcsConfiguration.getInstance(project).LOCAL_CHANGES_DETAILS_PREVIEW_SHOWN; }
isSelected
260,376
ChangesViewManager (@NotNull Project project) { ChangesViewI changesView = ChangesViewManager.getInstance(project); if (changesView instanceof ChangesViewManager) return (ChangesViewManager)changesView; return null; }
getChangesViewManager
260,377
void () { myView.rebuildTree(); }
changeListUpdateDone
260,378
JPanel () { JPanel panel = new JPanel(new BorderLayout()); final DefaultActionGroup group = new DefaultActionGroup(); final ActionToolbar actionToolbar = ActionManager.getInstance().createActionToolbar("SPECIFIC_FILES_DIALOG", group, true); addCustomActions(group); final CommonActionsManager cam = CommonActionsManager....
createPanel
260,379
void (@NotNull DefaultActionGroup group) { }
addCustomActions
260,380
String () { return "com.intellij.openapi.vcs.changes.SpecificFilesViewDialog"; }
getDimensionServiceKey
260,381
JComponent () { return myView; }
getPreferredFocusedComponent
260,382
JComponent () { return myPanel; }
createCenterPanel
260,383
void () { TreeUtil.expandAll(myView); }
expandAll
260,384
boolean () { return !myView.getGroupingSupport().isNone(); }
canExpand
260,385
void () { TreeUtil.collapseAll(myView, 1); TreeUtil.expand(myView, 0); }
collapseAll
260,386
boolean () { return !myView.getGroupingSupport().isNone(); }
canCollapse
260,387
int () { return 2; }
getToggleClickCount
260,388
void (@NotNull ActionGroup group) { PopupHandler.installPopupMenu(this, group, ActionPlaces.CHANGES_VIEW_POPUP); }
installPopupHandler
260,389
AsyncChangesTreeModel () { return SimpleAsyncChangesTreeModel.create(grouping -> { List<FilePath> files = SpecificFilesViewDialog.this.getFiles(); return TreeModelBuilder.buildFromFilePaths(myProject, grouping, files); }); }
getChangesTreeModel
260,390
void () { ChangesBrowserNode<?> root = getRoot(); if (root.getChildCount() == 1) { TreeNode child = root.getChildAt(0); expandPath(TreeUtil.getPathFromRoot(child)); } }
resetTreeState
260,391
Object (@NotNull String dataId) { if (PlatformCoreDataKeys.BGT_DATA_PROVIDER.is(dataId)) { VcsTreeModelData treeSelection = VcsTreeModelData.selected(this); VcsTreeModelData exactSelection = VcsTreeModelData.exactlySelected(this); DataProvider ourDataProvider = slowId -> getSlowData(myProject, treeSelection, exactSelec...
getData
260,392
Object (@NotNull Project project, @NotNull VcsTreeModelData treeSelection, @NotNull VcsTreeModelData exactSelection, @NotNull String slowId) { if (ChangesListView.EXACTLY_SELECTED_FILES_DATA_KEY.is(slowId)) { return VcsTreeModelData.mapToExactVirtualFile(exactSelection); } return null; }
getSlowData
260,393
void () { myMap.clear(); }
cleanAll
260,394
void (final VirtualFile file, final LogicalLock lock) { myMap.put(file, lock); }
add
260,395
void (@NotNull VcsDirtyScope scope) { VirtualFileHolder.Companion.cleanScope(myMap.keySet(), scope); }
cleanUnderScope
260,396
LogicallyLockedHolder () { final LogicallyLockedHolder result = new LogicallyLockedHolder(myProject); result.myMap.putAll(myMap); return result; }
copy
260,397
boolean (final VirtualFile vf) { return myMap.containsKey(vf); }
containsKey
260,398
boolean (Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; LogicallyLockedHolder that = (LogicallyLockedHolder)o; if (!myMap.equals(that.myMap)) return false; return true; }
equals
260,399
int () { return myMap.hashCode(); }
hashCode