Unnamed: 0 int64 0 305k | body stringlengths 7 52.9k | name stringlengths 1 185 |
|---|---|---|
255,800 | String () { return mySource == null ? null : mySource.getName(); } | getSourceName |
255,801 | String () { return mySource == null ? null : mySource.getPresentableName(); } | getSourcePresentableName |
255,802 | String () { return mySourceLength < 0 ? null : String.valueOf(mySourceLength); } | getSourceSize |
255,803 | DirDiffOperation () { return myDefaultOperation; //if (myType == DType.SOURCE) return COPY_TO; //if (myType == DType.TARGET) return COPY_FROM; //if (myType == DType.CHANGED) return MERGE; //if (myType == DType.EQUAL) return EQUAL; //return NONE; } | getDefaultOperation |
255,804 | String () { return myTarget == null ? null : myTarget.getName(); } | getTargetName |
255,805 | String () { return myTarget == null ? null : myTarget.getPresentableName(); } | getTargetPresentableName |
255,806 | String () { return myTargetLength < 0 ? null : String.valueOf(myTargetLength); } | getTargetSize |
255,807 | boolean () { return myType == DiffType.SEPARATOR; } | isSeparator |
255,808 | boolean () { return myType == DiffType.SOURCE; } | isSource |
255,809 | boolean () { return myType == DiffType.TARGET; } | isTarget |
255,810 | DirDiffOperation () { return myOperation == null ? myDefaultOperation : myOperation; } | getOperation |
255,811 | void (DiffElement target) { myTarget = target; myTargetLength = mySourceLength; myDefaultOperation = EQUAL; myOperation = EQUAL; myType = DiffType.EQUAL; } | updateSourceFromTarget |
255,812 | void (DiffElement source) { mySource = source; mySourceLength = myTargetLength; myDefaultOperation = EQUAL; myOperation = EQUAL; myType = DiffType.EQUAL; } | updateTargetFromSource |
255,813 | void () { final DirDiffOperation op = getOperation(); if (myType == DiffType.SOURCE) { myOperation = op == COPY_TO ? DELETE : op == DELETE ? NONE : COPY_TO; } else if (myType == DiffType.TARGET) { myOperation = op == COPY_FROM ? DELETE : op == DELETE ? NONE : COPY_FROM; } else if (myType == DiffType.CHANGED) { myOperat... | setNextOperation |
255,814 | void (@NotNull DirDiffOperation operation) { if (myType == DiffType.EQUAL || myType == DiffType.SEPARATOR) return; if (myType == DiffType.TARGET && operation == COPY_TO) return; if (myType == DiffType.SOURCE && operation == COPY_FROM) return; if (myType == DiffType.CHANGED && operation == DELETE) return; myOperation = ... | setOperation |
255,815 | Icon () { return getIcon(mySource); } | getSourceIcon |
255,816 | Icon () { return getIcon(myTarget); } | getTargetIcon |
255,817 | Icon (DiffElement element) { return element != null ? element.getIcon() : null; } | getIcon |
255,818 | DTree () { return myParent; } | getParentNode |
255,819 | DTree () { return myNode; } | getNode |
255,820 | Collection<DTree> () { init(); if (myChildrenList == null) { myChildrenList = new SortedList<>(COMPARATOR); myChildrenList.addAll(myChildren.values()); } return myChildrenList; } | getChildren |
255,821 | DTree (@NotNull DiffElement element, boolean source, String replacementName) { init(); myChildrenList = null; final DTree node; final String name = element.getName(); if (replacementName != null && myChildren.containsKey(replacementName)) { node = myChildren.get(replacementName); } else if (myChildren.containsKey(name)... | addChild |
255,822 | void (DiffElement<?> source) { mySource = source; } | setSource |
255,823 | void (DiffElement<?> target) { myTarget = target; } | setTarget |
255,824 | void () { if (myChildren == null) { myChildren = new HashMap<>(); } } | init |
255,825 | String () { return myName; } | getName |
255,826 | DTree () { return myParent; } | getParent |
255,827 | boolean () { return myExpanded; } | isExpanded |
255,828 | void (boolean expanded) { this.myExpanded = expanded; } | setExpanded |
255,829 | boolean () { return isContainer; } | isContainer |
255,830 | String () { return myName; } | toString |
255,831 | void () { final DiffElement<?> src = getSource(); final DiffElement<?> trg = getTarget(); if (src instanceof ComparableDiffElement) { ((ComparableDiffElement)src).prepare(trg); } if (trg instanceof ComparableDiffElement) { ((ComparableDiffElement)trg).prepare(src); } for (DTree tree : getChildren()) { tree.prepare(); }... | prepare |
255,832 | void (DirDiffSettings settings) { prepare(); updateChildren(settings); } | update |
255,833 | void (DirDiffSettings settings) { for (DTree tree : getChildren()) { final DiffElement<?> src = tree.getSource(); final DiffElement<?> trg = tree.getTarget(); if (src instanceof DiffErrorElement || trg instanceof DiffErrorElement) { tree.setType(ERROR); } else if (src == null && trg != null) { tree.setType(DiffType.TAR... | updateChildren |
255,834 | boolean () { return myVisible; } | isVisible |
255,835 | void (DirDiffSettings settings) { if (getChildren().isEmpty()) { if (myType == ERROR) { myVisible = true; return; } if (myType != DiffType.SEPARATOR && !"".equals(settings.getFilter())) { if (!settings.getFilterPattern().matcher(getName()).matches()) { myVisible = false; return; } } if (myType == null) { myVisible = tr... | updateVisibility |
255,836 | void () { myChildren.clear(); } | reset |
255,837 | void (DTree node) { init(); final boolean removed = myChildrenList.remove(node); if (removed) { for (String key : myChildren.keySet()) { if (myChildren.get(key) == node) { myChildren.remove(key); return; } } } } | remove |
255,838 | boolean (DiffElement<?> file1, DiffElement<?> file2) { return file1.getSize() == file2.getSize(); } | isEqualSizes |
255,839 | boolean (DiffElement<?> src, DiffElement<?> trg, DirDiffSettings settings) { if (src.getSize() != trg.getSize()) return false; return Math.abs(src.getTimeStamp() - trg.getTimeStamp()) <= settings.compareTimestampAccuracy; } | isEqualTimestamps |
255,840 | boolean (DiffElement<?> file1, DiffElement<?> file2) { if (file1.isContainer() || file2.isContainer()) return false; if (file1.getSize() != file2.getSize()) return false; try { return DiffUtil.compareStreams(() -> file1.getContentStream(), () -> file2.getContentStream()); } catch (IOException e) { LOG.warn(e); return f... | isEqualContents |
255,841 | boolean (DiffElement<?> file1, DiffElement<?> file2) { if (file1.isContainer() || file2.isContainer()) return false; if (file1.getFileType().isBinary() || file2.getFileType().isBinary()) { return isEqualContents(file1, file2); } try { byte[] content1 = file1.getContent(); byte[] content2 = file2.getContent(); if (Array... | isEqualContentsAsText |
255,842 | DiffType () { return myType; } | getType |
255,843 | void (DiffType type) { this.myType = type; } | setType |
255,844 | String () { if (myPath == null) { final DTree parent = getParent(); if (parent != null) { myPath = parent.getPath() + getName() + (isContainer ? DiffElement.getSeparator() : ""); } else { myPath = getName() + (isContainer ? DiffElement.getSeparator() : ""); } } return myPath; } | getPath |
255,845 | String () { setSize(800, 600); return "DirDiffDialog"; } | getDimensionServiceKey |
255,846 | JComponent () { myDiffPanel = new DirDiffPanel(myModel, new DirDiffWindow.Dialog(this)); Disposer.register(getDisposable(), myDiffPanel); return myDiffPanel.getPanel(); } | createCenterPanel |
255,847 | JComponent () { return myDiffPanel.getTable(); } | getPreferredFocusedComponent |
255,848 | String () { return "reference.dialogs.diff.folder"; } | getHelpId |
255,849 | void (ListSelectionEvent e) { ListSelectionModel selectionModel = (ListSelectionModel)e.getSource(); int lastIndex = e.getLastIndex(); int firstIndex = e.getFirstIndex(); DirDiffElementImpl last = myModel.getElementAt(lastIndex); DirDiffElementImpl first = myModel.getElementAt(firstIndex); if (last == null || first == ... | valueChanged |
255,850 | boolean (@NotNull MouseEvent e, int clickCount) { if (e.getButton() == MouseEvent.BUTTON3) return false; if (myTable.getRowCount() > 0) { final int row = myTable.rowAtPoint(e.getPoint()); final int col = myTable.columnAtPoint(e.getPoint()); if (row != -1 && col == ((myTable.getColumnCount() - 1) / 2)) { changeOperation... | onClick |
255,851 | void () { if (showHelp && myModel.isOperationsEnabled() && myModel.getRowCount() > 0) { final long count = PropertiesComponent.getInstance().getLong("dir.diff.space.button.info", 0); if (count < 3) { JBPopupFactory.getInstance() .createBalloonBuilder(new JLabel(DiffBundle.message("use.space.button.to.change.operation")... | onLoadingFinish |
255,852 | void (ComponentEvent e) { myTable.removeComponentListener(this); myModel.reloadModel(false); } | componentShown |
255,853 | void () { UIUtil.setEnabled(myFilter, false, true); } | updateStarted |
255,854 | void () { UIUtil.setEnabled(myFilter, true, true); } | updateFinished |
255,855 | void (@Nullable Callable<? extends DiffElement<?>> chooser, boolean isTarget) { @NotNull TextFieldWithBrowseButton dirField = isTarget ? myTargetDirField : mySourceDirField; dirField.setEditable(false); if (chooser != null && myModel.getSettings().enableChoosers) { dirField.setButtonEnabled(true); dirField.addActionLis... | setDirFieldChooser |
255,856 | void (ActionEvent e) { try { final DiffElement<?> newElement = chooser.call(); if (newElement == null) return; if (StringUtil.equals(dirField.getText(), newElement.getPath())) return; dirField.setText(newElement.getPath()); if (isTarget) { myModel.setTargetDir(newElement); } else { myModel.setSourceDir(newElement); } m... | actionPerformed |
255,857 | AbstractAction (boolean goDown, boolean withSelection) { return new AbstractAction() { @Override public void actionPerformed(ActionEvent e) { int row = goDown ? getNextRow() : getPrevRow(); if (row != -1) { selectRow(row, withSelection); } } }; } | createNavigationAction |
255,858 | void (ActionEvent e) { int row = goDown ? getNextRow() : getPrevRow(); if (row != -1) { selectRow(row, withSelection); } } | actionPerformed |
255,859 | int () { if (myTable.getSelectedRows().length == 0) return -1; int rowCount = myTable.getRowCount(); int row = myTable.getSelectionModel().getLeadSelectionIndex(); while (true) { if (row >= rowCount) return -1; row++; DirDiffElementImpl element = myModel.getElementAt(row); if (element == null) return -1; if (!element.i... | getNextRow |
255,860 | int () { if (myTable.getSelectedRows().length == 0) return -1; int row = myTable.getSelectionModel().getLeadSelectionIndex(); while (true) { if (row <= 0) return -1; row--; DirDiffElementImpl element = myModel.getElementAt(row); if (element == null) return -1; if (!element.isSeparator()) break; } return row; } | getPrevRow |
255,861 | void (int row, boolean extend) { if (row == -1) return; DirDiffElementImpl element = myModel.getElementAt(row); if (element == null || element.isSeparator()) return; myTable.changeSelection(row, (myModel.getColumnCount() - 1) / 2, false, extend); } | selectRow |
255,862 | AnAction[] () { return new DirDiffToolbarActions(myModel).getChildren(null); } | getActions |
255,863 | JComponent () { myToolbarPanel.setVisible(false); return myFilterPanel; } | extractFilterPanel |
255,864 | void () { for (int row : myTable.getSelectedRows()) { if (row != -1) { final DirDiffElementImpl element = myModel.getElementAt(row); if (element != null) { element.setNextOperation(); myModel.fireTableRowsUpdated(row, row); } } } } | changeOperationForSelection |
255,865 | void (boolean force) { myDiffRequestProcessor.updateRequest(force); } | update |
255,866 | void (DirDiffToolbarActions actions, JComponent component) { for (AnAction action : actions.getChildren(null)) { if (action instanceof ShortcutProvider) { final ShortcutSet shortcut = ((ShortcutProvider)action).getShortcut(); if (shortcut != null) { action.registerCustomShortcutSet(shortcut, component); } } } } | registerCustomShortcuts |
255,867 | void () { final IdeFocusManager focusManager = myProject == null || myProject.isDefault() ? IdeFocusManager.getGlobalInstance() : IdeFocusManager.getInstance(myProject); focusManager.requestFocus(myTable, true); } | focusTable |
255,868 | String () { return myFilter.getFilter(); } | getFilter |
255,869 | void () { final String newFilter = myFilter.getFilter(); if (!StringUtil.equals(myModel.getSettings().getFilter(), newFilter)) { myModel.getSettings().setFilter(newFilter); myModel.applySettings(); } } | fireFilterUpdated |
255,870 | JComponent () { return myRootPanel; } | getPanel |
255,871 | JBTable () { return myTable; } | getTable |
255,872 | void () { myModel.stopUpdating(); } | dispose |
255,873 | Object (@NotNull @NonNls String dataId) { if (CommonDataKeys.PROJECT.is(dataId)) { return myProject; } else if (DIR_DIFF_MODEL.is(dataId)) { return myModel; } else if (DIR_DIFF_TABLE.is(dataId)) { return myTable; } else if (DiffDataKeys.NAVIGATABLE_ARRAY.is(dataId)) { return getNavigatableArray(); } else if (DiffDataKe... | getData |
255,874 | void () { super.doLayout(); int totalWidth1 = 0; int totalWidth2 = 0; for (int i = 0; i < (columnModel.getColumnCount() - 1) / 2; i++) { TableColumn column1 = columnModel.getColumn(i); TableColumn column2 = columnModel.getColumn(columnModel.getColumnCount() - i - 1); int delta = (column2.getWidth() - column1.getWidth()... | doLayout |
255,875 | boolean () { return getPrevRow() != -1; } | canGoPrev |
255,876 | boolean () { return getNextRow() != -1; } | canGoNext |
255,877 | void () { selectRow(getPrevRow(), false); } | goPrev |
255,878 | void () { selectRow(getNextRow(), false); } | goNext |
255,879 | String (@NotNull ElementWrapper element) { return null; } | getRequestName |
255,880 | ElementWrapper () { DirDiffElementImpl element = myModel.getElementAt(myTable.getSelectedRow()); return element != null ? new ElementWrapper(element) : null; } | getCurrentRequestProvider |
255,881 | boolean (boolean fromUpdate) { return getNextRow() != -1; } | hasNextChange |
255,882 | boolean (boolean fromUpdate) { return getPrevRow() != -1; } | hasPrevChange |
255,883 | void (boolean fromDifferences) { goToNextChangeImpl(fromDifferences, () -> { selectRow(getNextRow(), false); }); } | goToNextChange |
255,884 | void (boolean fromDifferences) { goToPrevChangeImpl(fromDifferences, () -> { selectRow(getPrevRow(), false); }); } | goToPrevChange |
255,885 | boolean () { return myModel.getRowCount() > 0; } | isNavigationEnabled |
255,886 | boolean (Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; ElementWrapper wrapper = (ElementWrapper)o; return Objects.equals(sourceElement, wrapper.sourceElement) && Objects.equals(targetElement, wrapper.targetElement); } | equals |
255,887 | int () { int result = sourceElement != null ? sourceElement.hashCode() : 0; result = 31 * result + (targetElement != null ? targetElement.hashCode() : 0); return result; } | hashCode |
255,888 | void () { fireFilterUpdated(); } | filter |
255,889 | void (@NotNull KeyEvent e) { e.consume(); focusTable(); } | onEscape |
255,890 | JComponent () { return UIUtil.findComponentOfType(super.getPopupLocationComponent(), JTextComponent.class); } | getPopupLocationComponent |
255,891 | void (Graphics g) { super.paintChildren(g); if (myFirstUpdate) { myFirstUpdate = false; myModel.reloadModel(false); } } | paintChildren |
255,892 | Disposable () { return myDialog.getDisposable(); } | getDisposable |
255,893 | void (@NotNull @NlsContexts.DialogTitle String title) { myDialog.setTitle(title); } | setTitle |
255,894 | Disposable () { return myFrame; } | getDisposable |
255,895 | void (@NotNull String title) { ((JFrame)myFrame.getFrame()).setTitle(title); } | setTitle |
255,896 | boolean (@NotNull AnActionEvent e) { return false; } | isSelected |
255,897 | void (boolean state) { getModel().updateFromUI(); } | updateState |
255,898 | ShortcutSet () { return REFRESH_SHORTCUT; } | getShortcut |
255,899 | boolean () { return true; } | isFullReload |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.