Unnamed: 0 int64 0 305k | body stringlengths 7 52.9k | name stringlengths 1 185 |
|---|---|---|
260,500 | VcsRevisionNumber () { return VcsRevisionNumber.NULL; } | getRevisionNumber |
260,501 | String () { return myFile.getPath(); } | toString |
260,502 | void (@NotNull Element element, @Nullable List<? extends LocalChangeList> changeLists, boolean areChangeListsEnabled) { if (changeLists == null) return; for (LocalChangeList list : changeLists) { element.addContent(writeChangeList(list, areChangeListsEnabled)); } } | writeExternal |
260,503 | List<LocalChangeListImpl> (@NotNull Element element, @NotNull Project project) { List<LocalChangeListImpl> lists = new ArrayList<>(); for (Element listNode : element.getChildren(NODE_LIST)) { lists.add(readChangeList(listNode, project)); } return new ArrayList<>(removeDuplicatedLists(lists)); } | readExternal |
260,504 | Collection<LocalChangeListImpl> (@NotNull List<LocalChangeListImpl> lists) { // workaround for loading incorrect settings (with duplicate changelist names) boolean hasDefault = false; Map<String, LocalChangeListImpl> map = new HashMap<>(); for (LocalChangeListImpl list : lists) { if (list.isDefault() && hasDefault) { l... | removeDuplicatedLists |
260,505 | Element (@NotNull LocalChangeList list, boolean areChangeListsEnabled) { Element listNode = new Element(NODE_LIST); if (list.isDefault()) listNode.setAttribute(ATT_DEFAULT, ATT_VALUE_TRUE); listNode.setAttribute(ATT_ID, list.getId()); listNode.setAttribute(ATT_NAME, list.getName()); String comment = list.getComment(); ... | writeChangeList |
260,506 | int (Change o1, Change o2) { ContentRevision bRev1 = o1.getBeforeRevision(); ContentRevision bRev2 = o2.getBeforeRevision(); int delta = compareRevisions(bRev1, bRev2); if (delta != 0) return delta; ContentRevision aRev1 = o1.getAfterRevision(); ContentRevision aRev2 = o2.getAfterRevision(); return compareRevisions(aRe... | compare |
260,507 | int (@Nullable ContentRevision bRev1, @Nullable ContentRevision bRev2) { if (bRev1 == null && bRev2 == null) return 0; if (bRev1 == null) return -1; if (bRev2 == null) return 1; String path1 = bRev1.getFile().getPath(); String path2 = bRev2.getFile().getPath(); return path1.compareTo(path2); } | compareRevisions |
260,508 | LocalChangeListImpl (@NotNull Element listNode, @NotNull Project project) { String id = listNode.getAttributeValue(ATT_ID); String name = StringUtil.notNullize(listNode.getAttributeValue(ATT_NAME), LocalChangeList.getDefaultName()); String comment = StringUtil.notNullize(listNode.getAttributeValue(ATT_COMMENT)); Change... | readChangeList |
260,509 | Element (@NotNull Change change) { Element changeNode = new Element(NODE_CHANGE); writeContentRevision(changeNode, change.getBeforeRevision(), RevisionSide.BEFORE); writeContentRevision(changeNode, change.getAfterRevision(), RevisionSide.AFTER); return changeNode; } | writeChange |
260,510 | Change (@NotNull Element changeNode, @NotNull Project project) { FakeRevision bRev = readContentRevision(changeNode, project, RevisionSide.BEFORE); FakeRevision aRev = readContentRevision(changeNode, project, RevisionSide.AFTER); return new Change(bRev, aRev); } | readChange |
260,511 | void (@NotNull Element changeNode, @Nullable ContentRevision rev, @NotNull RevisionSide side) { if (rev == null) return; FilePath filePath = rev.getFile(); String path = filePath.getPath(); if (hasIllegalXmlChars(path)) { changeNode.setAttribute(side.getPathKey(), JDOMUtil.removeControlChars(path)); changeNode.setAttri... | writeContentRevision |
260,512 | FakeRevision (@NotNull Element changeNode, @NotNull Project project, @NotNull RevisionSide side) { String plainPath = changeNode.getAttributeValue(side.getPathKey()); String escapedPath = changeNode.getAttributeValue(side.getEscapedPathKey()); String path = escapedPath != null ? XmlStringUtil.unescapeIllegalXmlChars(es... | readContentRevision |
260,513 | String () { return myPathKey; } | getPathKey |
260,514 | String () { return myIsDirKey; } | getIsDirKey |
260,515 | boolean (@NotNull String text) { return text.chars().anyMatch(c -> !Verifier.isXMLCharacter(c)); } | hasIllegalXmlChars |
260,516 | String () { return myContent; } | getContent |
260,517 | FilePath () { return myNewFilePath; } | getFile |
260,518 | VcsRevisionNumber () { return new VcsRevisionNumber() { @NotNull @Override public String asString() { return myRevision; } @Override public int compareTo(final VcsRevisionNumber o) { return 0; } }; } | getRevisionNumber |
260,519 | String () { return myRevision; } | asString |
260,520 | int (final VcsRevisionNumber o) { return 0; } | compareTo |
260,521 | ChangesViewWorkflowManager (@NotNull Project project) { return project.getService(ChangesViewWorkflowManager.class); } | getInstance |
260,522 | ChangesViewCommitWorkflowHandler () { if (ApplicationManager.getApplication().isDispatchThread() && !myInitialized) { updateCommitWorkflowHandler(); } return myCommitWorkflowHandler; } | getCommitWorkflowHandler |
260,523 | void () { myInitialized = true; boolean isNonModal = CommitModeManager.getInstance(myProject).getCurrentCommitMode() instanceof CommitMode.NonModalCommitMode; if (isNonModal) { if (myCommitWorkflowHandler == null) { Activity activity = StartUpMeasurer.startActivity("ChangesViewWorkflowManager initialization"); // Chang... | updateCommitWorkflowHandler |
260,524 | void () { if (myCommitWorkflowHandler != null) { Disposer.dispose(myCommitWorkflowHandler); myCommitWorkflowHandler = null; } } | dispose |
260,525 | void () { Runnable operation = () -> { LOG.debug("starting"); boolean savedSuccessfully = save(); LOG.debug("save result: " + savedSuccessfully); if (savedSuccessfully) { try { LOG.debug("running operation"); myOperation.run(); LOG.debug("operation completed."); } finally { LOG.debug("loading"); ProgressManager.getInst... | execute |
260,526 | boolean () { return ProgressManager.getInstance().computeInNonCancelableSection(() -> { try { mySaver.save(myRootsToSave); return true; } catch (VcsException e) { LOG.info("Couldn't save local changes", e); String format = VcsBundle.message("changes.tried.to.save.uncommitted.changes.in.shelve.before.s.but.failed.with.a... | save |
260,527 | void (@NotNull VirtualFile file) { if (isTouched(file)) { return; } Long lastTs = getLastSavedStamp(file); final long stamp = file.getTimeStamp(); if (lastTs != null && stamp == lastTs) { return; } Integer oldContentId = getSavedContentId(file); if (oldContentId != null && oldContentId > 0) { if (LOG.isDebugEnabled()) ... | updateLastUnchangedContent |
260,528 | boolean (VirtualFile file) { return Boolean.TRUE.equals(file.getUserData(VCS_INVALID_FILE_STATUS)); } | isTouched |
260,529 | void (VirtualFile file) { file.putUserData(VCS_INVALID_FILE_STATUS, Boolean.TRUE); } | markTouched |
260,530 | void (VirtualFile file) { file.putUserData(VCS_INVALID_FILE_STATUS, null); } | markUntouched |
260,531 | PersistentFS () { return (PersistentFS)ManagingFS.getInstance(); } | getFS |
260,532 | void (VirtualFile file, int contentId) { if (contentId == 0) { if (LOG.isDebugEnabled()) { LOG.debug("saveContentReference without content for file = " + file); } return; // content not loaded yet, nothing to save } LOG.assertTrue(contentId > 0, contentId); if (LOG.isDebugEnabled()) { LOG.debug("saveContentReference fi... | saveContentReference |
260,533 | boolean (VirtualFile file) { return getSavedContentId(file) != null; } | hasSavedContent |
260,534 | void (VirtualFile file, @NotNull String content) { saveContentReference(file, getFS().storeUnlinkedContent(content.getBytes(file.getCharset()))); } | forceSavedContent |
260,535 | Integer (VirtualFile file) { if (!file.isValid()) { return null; } Integer oldContentId = null; try(final DataInputStream stream = ACQUIRED_CONTENT_ATTR.readFileAttribute(file)) { if (LOG.isDebugEnabled()) { LOG.debug("getSavedContentId for " + file + "; stream=" + stream); } if (stream != null) { oldContentId = stream... | getSavedContentId |
260,536 | Long (VirtualFile file) { Long l = file.getUserData(LAST_TS_KEY); if (l == null) { try (final DataInputStream stream = LAST_TS_ATTR.readFileAttribute(file)) { if (stream != null) { l = stream.readLong(); } } catch (IOException e) { LOG.info(e); } } return l; } | getLastSavedStamp |
260,537 | void (@NotNull DefaultActionGroup group) { AnAction deleteAction = ActionManager.getInstance().getAction(IdeActions.ACTION_DELETE); deleteAction.registerCustomShortcutSet(myView, null); group.add(deleteAction); myView.installPopupHandler(new DefaultActionGroup(deleteAction)); } | addCustomActions |
260,538 | List<FilePath> () { return ChangeListManager.getInstance(myProject).getIgnoredFilePaths(); } | getFiles |
260,539 | void (@NotNull ChangeListsIndexes idx) { myMap = new HashMap<>(idx.myMap); myChanges = new HashSet<>(idx.myChanges); } | copyFrom |
260,540 | void () { myMap = new HashMap<>(); myChanges = new HashSet<>(); } | clear |
260,541 | void (@NotNull FilePath file, @NotNull Change change, @NotNull FileStatus status, @Nullable AbstractVcs key, @NotNull VcsRevisionNumber number) { myMap.put(file, new Data(status, change, key, number)); if (LOG.isDebugEnabled()) { LOG.debug("Set status " + status + " for " + file); } } | add |
260,542 | void (@NotNull FilePath file) { myMap.remove(file); if (LOG.isDebugEnabled()) { LOG.debug("Clear status for " + file); } } | remove |
260,543 | Change (@NotNull FilePath file) { Data data = myMap.get(file); return data != null ? data.change : null; } | getChange |
260,544 | FileStatus (@NotNull FilePath file) { Data data = myMap.get(file); return data != null ? data.status : null; } | getStatus |
260,545 | void (@NotNull Change change, @Nullable AbstractVcs key) { myChanges.add(change); ContentRevision afterRevision = change.getAfterRevision(); ContentRevision beforeRevision = change.getBeforeRevision(); if (beforeRevision != null && afterRevision != null) { add(afterRevision.getFile(), change, change.getFileStatus(), ke... | changeAdded |
260,546 | void (@NotNull Change change) { myChanges.remove(change); ContentRevision afterRevision = change.getAfterRevision(); ContentRevision beforeRevision = change.getBeforeRevision(); if (afterRevision != null) { remove(afterRevision.getFile()); } if (beforeRevision != null) { remove(beforeRevision.getFile()); } } | changeRemoved |
260,547 | Set<Change> () { return myChanges; } | getChanges |
260,548 | AbstractVcs (@NotNull Change change) { AbstractVcs vcs = getVcsForRevision(change.getAfterRevision()); if (vcs != null) return vcs; return getVcsForRevision(change.getBeforeRevision()); } | getVcsFor |
260,549 | AbstractVcs (@Nullable ContentRevision revision) { if (revision != null) { Data data = myMap.get(revision.getFile()); return data != null ? data.vcs : null; } return null; } | getVcsForRevision |
260,550 | void (ChangeListsIndexes newIndexes, Set<? super BaseRevision> toRemove, Set<? super BaseRevision> toAdd, Set<? super BeforeAfter<BaseRevision>> toModify) { Map<FilePath, Data> oldMap = myMap; Map<FilePath, Data> newMap = newIndexes.myMap; for (Map.Entry<FilePath, Data> entry : oldMap.entrySet()) { FilePath s = entry.g... | getDelta |
260,551 | BaseRevision (@NotNull FilePath path, @NotNull Data data) { return new BaseRevision(data.vcs, data.revision, path); } | createBaseRevision |
260,552 | Set<FilePath> () { return myMap.keySet(); } | getAffectedPaths |
260,553 | boolean (@NotNull Data data) { return Comparing.equal(vcs, data.vcs) && Comparing.equal(revision, data.revision); } | sameRevisions |
260,554 | void (final Project project, final CommittedChangesTableModel changes, final Mode mode) { myProject = project; myChanges = changes; myMode = mode; setTitle(VcsBundle.message("dialog.title.changes.browser")); setCancelButtonText(CommonBundle.getCloseButtonText()); final ModalityState currentState = ModalityState.current... | initDialog |
260,555 | void () { SwingUtilities.invokeLater(() -> { if (ChangesBrowserDialog.this.isShowing()) { myCommittedChangesBrowser.stopLoading(); } }); } | finished |
260,556 | void (final List<CommittedChangeList> committedChangeLists) { SwingUtilities.invokeLater(() -> { if (ChangesBrowserDialog.this.isShowing()) { final boolean selectFirst = (myChanges.getRowCount() == 0) && (!committedChangeLists.isEmpty()); myChanges.addRows(committedChangeLists); if (selectFirst) { myCommittedChangesBro... | consume |
260,557 | boolean () { myInitRunnable.consume(ChangesBrowserDialog.this); return true; } | init |
260,558 | AsynchConsumer<List<CommittedChangeList>> () { return myAppender; } | getAppender |
260,559 | void () { myCommittedChangesBrowser.startLoading(); } | startLoading |
260,560 | String () { return "VCS.ChangesBrowserDialog"; } | getDimensionServiceKey |
260,561 | JComponent () { myCommittedChangesBrowser = new CommittedChangesBrowserDialogPanel(myProject, myChanges); return myCommittedChangesBrowser; } | createCenterPanel |
260,562 | void () { super.createDefaultActions(); if (myMode == Mode.Browse) { getOKAction().putValue(Action.NAME, VcsBundle.message("button.search.again")); } } | createDefaultActions |
260,563 | CommittedChangeList () { return myCommittedChangesBrowser.getSelectedChangeList(); } | getSelectedChangeList |
260,564 | JComponent () { return null; } | getFilterUI |
260,565 | CommittedChangesFilterKey () { throw new UnsupportedOperationException(); } | getKey |
260,566 | void (@NotNull List<? extends CommittedChangeList> changeLists) { setFilterBaseImpl(changeLists, true); } | setFilterBase |
260,567 | List<CommittedChangeList> (final List<? extends CommittedChangeList> changeLists, final boolean setFirst) { List<CommittedChangeList> list = new ArrayList<>(changeLists); if (myInSetBase) { return list; } myInSetBase = true; boolean callSetFilterBase = setFirst; for (final ChangeListFilteringStrategy delegate : myDeleg... | setFilterBaseImpl |
260,568 | void (@NotNull ChangeListener listener) { // not used for (final ChangeListFilteringStrategy delegate : myDelegates.values()) { delegate.addChangeListener(listener); } } | addChangeListener |
260,569 | void (@NotNull ChangeListener listener) { // not used for (final ChangeListFilteringStrategy delegate : myDelegates.values()) { delegate.removeChangeListener(listener); } } | removeChangeListener |
260,570 | void () { for (final ChangeListFilteringStrategy delegate : myDelegates.values()) { delegate.resetFilterBase(); } } | resetFilterBase |
260,571 | void (@NotNull List<? extends CommittedChangeList> changeLists) { List<CommittedChangeList> list = new ArrayList<>(changeLists); for (final ChangeListFilteringStrategy delegate : myDelegates.values()) { delegate.appendFilterBase(list); list = delegate.filterChangeLists(list); } } | appendFilterBase |
260,572 | List<CommittedChangeList> (@NotNull List<? extends CommittedChangeList> changeLists) { return setFilterBaseImpl(changeLists, false); } | filterChangeLists |
260,573 | void (final CommittedChangesFilterKey key, final ChangeListFilteringStrategy strategy) { myDelegates.put(key, strategy); } | addStrategy |
260,574 | ChangeListFilteringStrategy (final CommittedChangesFilterKey key) { return myDelegates.remove(key); } | removeStrategy |
260,575 | ActionUpdateThread () { return ActionUpdateThread.EDT; } | getActionUpdateThread |
260,576 | void (@NotNull AnActionEvent e) { e.getPresentation().setText(myPreviousSelection.toString()); } | update |
260,577 | DefaultActionGroup (@NotNull JComponent button, @NotNull DataContext context) { return new DefaultActionGroup(ContainerUtil.map(collectStrategies(), (NotNullFunction<ChangeListFilteringStrategy, AnAction>)strategy -> new SetFilteringAction(strategy))); } | createPopupActionGroup |
260,578 | Condition<AnAction> () { return action -> ((SetFilteringAction)action).myStrategy.getKey().equals(myPreviousSelection.getKey()); } | getPreselectCondition |
260,579 | List<ChangeListFilteringStrategy> () { List<ChangeListFilteringStrategy> result = new ArrayList<>(); result.add(NoneChangeListFilteringStrategy.INSTANCE); result.add(new StructureFilteringStrategy(myProject)); boolean addNameFilter = false; for (AbstractVcs vcs : ProjectLevelVcsManager.getInstance(myProject).getAllActi... | collectStrategies |
260,580 | void (@NotNull AnActionEvent e) { if (!NoneChangeListFilteringStrategy.INSTANCE.equals(myPreviousSelection)) { myBrowser.removeFilteringStrategy(myPreviousSelection.getKey()); } if (!NoneChangeListFilteringStrategy.INSTANCE.equals(myStrategy)) { myBrowser.setFilteringStrategy(myStrategy); } myPreviousSelection = myStra... | actionPerformed |
260,581 | List<CommittedChangeList> () { return myList; } | getList |
260,582 | boolean () { return myConsistentWithPrevious; } | isConsistentWithPrevious |
260,583 | CommittedChangesCache (Project project) { return project.getService(CommittedChangesCache.class); } | getInstance |
260,584 | CommittedChangesCache (Project project) { return project.getServiceIfCreated(CommittedChangesCache.class); } | getInstanceIfCreated |
260,585 | void () { myLocationCache.reset(); myCachesHolder.reset(); refreshAllCachesAsync(false, true); refreshIncomingChangesAsync(); myTaskQueue.run(() -> { for (ChangesCacheFile file : myCachesHolder.getAllCaches()) { final RepositoryLocation location = file.getLocation(); fireChangesLoaded(location, Collections.emptyList())... | directoryMappingChanged |
260,586 | void () { cancelRefreshTimer(); } | dispose |
260,587 | void (@NotNull CommittedChangesCacheState state) { super.loadState(state); updateRefreshTimer(); } | loadState |
260,588 | boolean () { for (AbstractVcs vcs : ProjectLevelVcsManager.getInstance(myProject).getAllActiveVcss()) { final CommittedChangesProvider provider = vcs.getCommittedChangesProvider(); if (provider instanceof CachingCommittedChangesProvider cachingProvider) { if (!cachingProvider.isMaxCountSupported()) { return false; } } ... | isMaxCountSupportedForProject |
260,589 | void () { for (AbstractVcs vcs : ProjectLevelVcsManager.getInstance(myProject).getAllActiveVcss()) { final CommittedChangesProvider provider = vcs.getCommittedChangesProvider(); if (provider == null) continue; final VcsCommittedListsZipper vcsZipper = provider.getZipper(); CommittedListsSequencesZipper zipper = null; i... | run |
260,590 | void (final ChangeBrowserSettings settings, final int maxCount, final boolean cacheOnly, final Consumer<? super List<CommittedChangeList>> consumer, final Consumer<? super List<VcsException>> errorConsumer) { final MyProjectChangesLoader loader = new MyProjectChangesLoader(settings, maxCount, cacheOnly, consumer, error... | getProjectChangesAsync |
260,591 | void (final @Nullable Consumer<? super Boolean> continuation) { myTaskQueue.run(() -> { final Ref<Boolean> success = new Ref<>(); try { success.set(hasCachesWithEmptiness(false)); } catch (ProcessCanceledException e) { success.set(true); } ApplicationManager.getApplication().invokeLater(() -> continuation.consume(succe... | hasCachesForAnyRoot |
260,592 | boolean () { try { return hasCachesWithEmptiness(true); } catch (ProcessCanceledException e) { return false; } } | hasEmptyCaches |
260,593 | boolean (final boolean emptiness) { final Ref<Boolean> resultRef = new Ref<>(Boolean.FALSE); myCachesHolder.iterateAllCaches(changesCacheFile -> { try { if (changesCacheFile.isEmpty() == emptiness) { resultRef.set(true); return false; } } catch (IOException e) { LOG.info(e); } return true; }); return resultRef.get(); } | hasCachesWithEmptiness |
260,594 | void (@NotNull RepositoryLocation location, @NotNull List<CommittedChangeList> changes) { invokeLaterIfNeededOnSyncPublisher(myProject, COMMITTED_TOPIC, listener -> listener.changesLoaded(location, changes)); } | fireChangesLoaded |
260,595 | void () { invokeLaterIfNeededOnSyncPublisher(myProject, COMMITTED_TOPIC, listener -> listener.incomingChangesUpdated(Collections.emptyList())); } | fireIncomingReloaded |
260,596 | void (@NonNls String message) { LOG.debug(message); } | debug |
260,597 | List<CommittedChangeList> (@NotNull List<CommittedChangeList> changes, int maxCount) { if (maxCount > 0) { while (changes.size() > maxCount) { changes.remove(0); } } return changes; } | trimToSize |
260,598 | List<CommittedChangeList> (boolean inBackground) { final List<CommittedChangeList> result = new ArrayList<>(); final Collection<ChangesCacheFile> caches = myCachesHolder.getAllCaches(); debug(caches.size() + " caches found"); final MultiMap<AbstractVcs, Pair<RepositoryLocation, List<CommittedChangeList>>> byVcs = new M... | loadIncomingChanges |
260,599 | CommittedChangeList (@NotNull RepositoryLocationGroup group, @NotNull List<? extends CommittedChangeList> lists) { if (lists.size() == 1) { return lists.get(0); } final CommittedChangeList victim = ReceivedChangeList.unwrap(lists.get(0)); final ReceivedChangeList result = new ReceivedChangeList(victim); result.setForce... | zip |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.