Unnamed: 0 int64 0 305k | body stringlengths 7 52.9k | name stringlengths 1 185 |
|---|---|---|
19,900 | void (@NlsSafe String initialText) { myResultList = new Tree(); myResultList.setExpandableItemsEnabled(false); myResultList.getEmptyText().setText(CommonBundle.getLoadingTreeNodeText()); myResultList.setRootVisible(false); myResultList.setShowsRootHandles(true); myResultList.setModel(null); MyArtifactCellRenderer rende... | initComponents |
19,901 | void (KeyEvent e) { int d; if (e.getKeyCode() == KeyEvent.VK_DOWN) { d = 1; } else if (e.getKeyCode() == KeyEvent.VK_UP) { d = -1; } else { return; } int row = myResultList.getSelectionModel().getLeadSelectionRow(); row += d; if (row >=0 && row < myResultList.getRowCount()) { myResultList.setSelectionRow(row); } } | keyPressed |
19,902 | void (@NotNull DocumentEvent e) { scheduleSearch(); } | textChanged |
19,903 | void (TreeSelectionEvent e) { if (!myAlarm.isEmpty()) return; boolean hasSelection = !myResultList.isSelectionEmpty(); myListener.canSelectStateChanged(MavenArtifactSearchPanel.this, hasSelection); } | valueChanged |
19,904 | void (KeyEvent e) { if (e.getKeyCode() == KeyEvent.VK_ENTER && myResultList.getLastSelectedPathComponent() != null) { myListener.itemSelected(); e.consume(); } } | keyPressed |
19,905 | boolean (@NotNull MouseEvent e) { final TreePath path = myResultList.getPathForLocation(e.getX(), e.getY()); if (path != null && myResultList.isPathSelected(path)) { Object sel = path.getLastPathComponent(); if (sel != null && myResultList.getModel().isLeaf(sel)) { myListener.itemSelected(); return true; } } return fal... | onDoubleClick |
19,906 | void () { myListener.canSelectStateChanged(this, false); myResultList.setPaintBusy(true); // evaluate text value in the swing thread final String text = mySearchField.getText(); myAlarm.cancelAllRequests(); myAlarm.addRequest(() -> { try { doSearch(text); } catch (Throwable e) { MavenLog.LOG.warn(e); } }, 500); } | scheduleSearch |
19,907 | void (String searchText) { MavenSearcher searcher = myClassMode ? new MavenClassSearcher() : new MavenArtifactSearcher(); List<MavenArtifactSearchResult> result = searcher.search(myProject, searchText, MAX_RESULT); final TreeModel model = new MyTreeModel(result); SwingUtilities.invokeLater(() -> { if (!myDialog.isVisib... | doSearch |
19,908 | List<MavenId> () { TreePath[] selectionPaths = myResultList.getSelectionPaths(); if (selectionPaths == null) { return Collections.emptyList(); } List<MavenId> result = new ArrayList<>(); for (TreePath each : selectionPaths) { Object sel = each.getLastPathComponent(); MavenDependencyCompletionItem info; if (sel instance... | getResult |
19,909 | Object () { return myItems; } | getRoot |
19,910 | Object (Object parent, int index) { return getList(parent).get(index); } | getChild |
19,911 | int (Object parent) { List list = getList(parent); assert list != null : parent; return list.size(); } | getChildCount |
19,912 | List (Object parent) { if (parent == myItems) return myItems; if (parent instanceof MavenArtifactSearchResult) { return Arrays.asList(((MavenArtifactSearchResult)parent).getSearchResults().getItems()); } return null; } | getList |
19,913 | boolean (Object node) { return node != myItems && (getList(node) == null || getChildCount(node) < 2); } | isLeaf |
19,914 | int (Object parent, Object child) { return getList(parent).indexOf(child); } | getIndexOfChild |
19,915 | void (TreePath path, Object newValue) { } | valueForPathChanged |
19,916 | void (TreeModelListener l) { } | addTreeModelListener |
19,917 | void (TreeModelListener l) { } | removeTreeModelListener |
19,918 | Dimension (Container parent) { return new Dimension(getVisibleWidth(), myLeftComponent.getPreferredSize().height); } | preferredLayoutSize |
19,919 | void (Container parent) { int w = getVisibleWidth(); Dimension ls = myLeftComponent.getPreferredSize(); Dimension rs = myRightComponent.getPreferredSize(); int lw = w - rs.width - 10; int rw = rs.width; myLeftComponent.setBounds(0, 0, lw, ls.height); myRightComponent.setBounds(w - rw, 0, rw, rs.height); } | layoutContainer |
19,920 | int () { int w = tree.getVisibleRect().width - 10; Insets insets = tree.getInsets(); w -= insets.left + insets.right; JScrollPane scrollPane = ComponentUtil.getScrollPane(tree); if (scrollPane != null) { JScrollBar sb = scrollPane.getVerticalScrollBar(); if (sb != null) { w -= sb.getWidth(); } } return w; } | getVisibleWidth |
19,921 | Component (JTree tree, Object value, boolean selected, boolean expanded, boolean leaf, int row, boolean hasFocus) { myLeftComponent.clear(); myRightComponent.clear(); setBackground(RenderingUtil.getBackground(tree, selected)); myLeftComponent.setForeground(selected ? UIUtil.getTreeSelectionForeground(hasFocus) : null);... | getTreeCellRendererComponent |
19,922 | void (JTree tree, MavenArtifactSearchResult searchResult, boolean selected) { MavenDependencyCompletionItem info = searchResult.getSearchResults().getItems()[0]; MavenDependencyCompletionItem iconInfo = MavenDependencyCompletionUtil.getMaxIcon(searchResult); myLeftComponent.setIcon(MavenDependencyCompletionUtil.getIcon... | formatSearchResult |
19,923 | void (SimpleColoredComponent component, MavenDependencyCompletionItem info, boolean selected) { component.append(info.getGroupId() + ":", getGrayAttributes(selected)); component.append(info.getArtifactId(), SimpleTextAttributes.REGULAR_ATTRIBUTES); component.append(":" + info.getVersion(), getGrayAttributes(selected));... | appendArtifactInfo |
19,924 | SimpleTextAttributes (boolean selected) { return !selected ? SimpleTextAttributes.GRAY_ATTRIBUTES : SimpleTextAttributes.REGULAR_ATTRIBUTES; } | getGrayAttributes |
19,925 | void (JTree tree, MavenArtifactSearchResult searchResult, boolean selected) { MavenClassSearchResult classResult = (MavenClassSearchResult)searchResult; MavenDependencyCompletionItem info = searchResult.getSearchResults().getItems()[0]; myLeftComponent.setIcon(AllIcons.Nodes.Class); myLeftComponent.append(classResult.g... | formatSearchResult |
19,926 | String () { return myDataDirName; } | getDataDirName |
19,927 | void () { close(true); //noinspection TestOnlyProblems final File currentDataDir = getCurrentDataDir(); final File currentDataContextDir = getCurrentDataContextDir(); final File[] files = currentDataDir.listFiles(); if (files != null) { for (File file : files) { if (!FileUtil.filesEqual(file, currentDataContextDir)) { ... | cleanupBrokenData |
19,928 | void (boolean releaseIndexContext) { IndexData data = myData; try { if (data != null) data.close(releaseIndexContext); } catch (MavenIndexException e) { MavenLog.LOG.warn(e); } myData = null; } | close |
19,929 | String () { return join(myRegisteredRepositoryIds, ","); } | getRepositoryId |
19,930 | File () { return myKind == IndexKind.LOCAL ? new File(myRepositoryPathOrUrl) : null; } | getRepositoryFile |
19,931 | String () { return myKind == IndexKind.REMOTE ? myRepositoryPathOrUrl : null; } | getRepositoryUrl |
19,932 | String () { return myRepositoryPathOrUrl; } | getRepositoryPathOrUrl |
19,933 | IndexKind () { return myKind; } | getKind |
19,934 | MavenRepositoryInfo () { if (myKind == IndexKind.ONLINE) return null; return new MavenRepositoryInfo(getRepositoryId(), getRepositoryId(), myRepositoryPathOrUrl, myKind); } | getRepository |
19,935 | long () { return myUpdateTimestamp == null ? -1 : myUpdateTimestamp; } | getUpdateTimestamp |
19,936 | String () { return myFailureMessage; } | getFailureMessage |
19,937 | boolean (@NotNull File contextDir) { return contextDir.isDirectory() && myNexusIndexer.indexExists(contextDir); } | hasValidContext |
19,938 | void (Exception e) { String failureMessage = e.getMessage(); if (failureMessage != null && failureMessage.contains("nexus-maven-repository-index.properties") && failureMessage.contains("FileNotFoundException")) { failureMessage = "Repository is non-nexus repo, or is not indexed"; MavenLog.LOG.debug("Failed to update Ma... | handleUpdateException |
19,939 | void (PersistentHashMap<String, Set<String>> map) { try { map.closeAndClean(); } catch (IOException e) { MavenLog.LOG.error(e); } } | closeAndClean |
19,940 | void () { if (myDataClosed.compareAndSet(false, true)) { closeAndClean(myData.groupToArtifactMap); closeAndClean(myData.groupWithArtifactToVersionMap); closeAndClean(myData.archetypeIdToDescriptionMap); close(false); } } | closeAndClean |
19,941 | File () { return myDir; } | getDir |
19,942 | File () { //noinspection TestOnlyProblems return new File(getCurrentDataDir(), "context"); } | getCurrentDataContextDir |
19,943 | File () { return MavenIndices.createNewDir(myDir, DATA_DIR_PREFIX, 100); } | createNewDataDir |
19,944 | List<AddArtifactResponse> (@NotNull Collection<File> artifactFiles) { var failedResponses = ContainerUtil.map(artifactFiles, file -> new AddArtifactResponse(file, null)); return doIndexAndRecoveryTask(() -> { boolean locked = indexUpdateLock.tryLock(); if (!locked) return failedResponses; try { IndexData indexData = my... | tryAddArtifacts |
19,945 | Collection<String> () { return doIndexTask(() -> getGroupIdsRaw(), Collections.emptySet()); } | getGroupIds |
19,946 | Set<String> (final String groupId) { return doIndexTask(() -> notNullize(myData.groupToArtifactMap.get(groupId)), Collections.emptySet()); } | getArtifactIds |
19,947 | Set<String> (final String groupId, final String artifactId) { String ga = groupId + ":" + artifactId; return doIndexTask(() -> notNullize(myData.groupWithArtifactToVersionMap.get(ga)), Collections.emptySet()); } | getVersions |
19,948 | boolean (String groupId) { if (isBroken) return false; IndexData indexData = myData; return doIndexTask(() -> indexData.groupToArtifactMap.containsMapping(groupId), false); } | hasGroupId |
19,949 | boolean (String groupId, String artifactId) { if (isBroken) return false; IndexData indexData = myData; String key = groupId + ":" + artifactId; return doIndexTask(() -> indexData.groupWithArtifactToVersionMap.containsMapping(key), false); } | hasArtifactId |
19,950 | boolean (String groupId, String artifactId, final String version) { if (isBroken) return false; final String groupWithArtifactWithVersion = groupId + ":" + artifactId + ':' + version; String groupWithArtifact = groupWithArtifactWithVersion.substring(0, groupWithArtifactWithVersion.length() - version.length() - 1); Inde... | hasVersion |
19,951 | Set<MavenArtifactInfo> (final String pattern, final int maxResult) { return doIndexAndRecoveryTask(() -> myData.search(pattern, maxResult), Collections.emptySet()); } | search |
19,952 | Set<MavenArchetype> () { return doIndexAndRecoveryTask(() -> { Set<MavenArchetype> archetypes = new HashSet<>(); IndexData indexData = myData; indexData.archetypeIdToDescriptionMap.consumeKeysWithExistingMapping(ga -> { List<String> gaParts = split(ga, ":"); String groupId = gaParts.get(0); String artifactId = gaParts.... | getArchetypes |
19,953 | void () { if (isClose) return; if (!isBroken) { MavenLog.LOG.info("index is broken " + this); ApplicationManager.getApplication().getMessageBus().syncPublisher(INDEX_IS_BROKEN).indexIsBroken(this); } isBroken = true; } | markAsBroken |
19,954 | String () { return "MavenIndex{" + "myKind=" + myKind + '\'' + ", myRepositoryPathOrUrl='" + myRepositoryPathOrUrl + ", ids=" + myRegisteredRepositoryIds + '}'; } | toString |
19,955 | File (File dataDir) { return new File(dataDir, "context"); } | getDataContextDir |
19,956 | void (@Nullable Closeable enumerator, MavenIndexException[] exceptions) { try { if (enumerator != null) enumerator.close(); } catch (IOException e) { MavenLog.LOG.warn(e); if (exceptions[0] == null) exceptions[0] = new MavenIndexException(e); } } | safeClose |
19,957 | boolean () { return false; } | isModified |
19,958 | void () { myUpdateButton.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { doUpdateIndex(); } }); myIndicesTable.getSelectionModel().addListSelectionListener(new ListSelectionListener() { @Override public void valueChanged(ListSelectionEvent e) { updateButtonsState(); } });... | configControls |
19,959 | void (ActionEvent e) { doUpdateIndex(); } | actionPerformed |
19,960 | void (ListSelectionEvent e) { updateButtonsState(); } | valueChanged |
19,961 | void (MouseEvent e) { } | mouseDragged |
19,962 | void (MouseEvent e) { int row = myIndicesTable.rowAtPoint(e.getPoint()); if (row == -1) return; updateIndexHint(row); } | mouseMoved |
19,963 | void () { boolean hasSelection = !myIndicesTable.getSelectionModel().isSelectionEmpty(); myUpdateButton.setEnabled(hasSelection); } | updateButtonsState |
19,964 | void (int row) { MavenSearchIndex index = getIndexAt(row); String message = index.getFailureMessage(); if (message == null) { myIndicesTable.setToolTipText(null); } else { myIndicesTable.setToolTipText(message); } } | updateIndexHint |
19,965 | void () { MavenIndicesManager.getInstance(myProject).scheduleUpdateContent(getSelectedIndices(), true); } | doUpdateIndex |
19,966 | List<MavenIndex> () { List<MavenIndex> result = new ArrayList<>(); for (int i : myIndicesTable.getSelectedRows()) { result.add(getIndexAt(i)); } return result; } | getSelectedIndices |
19,967 | MavenIndex (int i) { MyTableModel model = (MyTableModel)myIndicesTable.getModel(); return model.getIndex(i); } | getIndexAt |
19,968 | String () { return IndicesBundle.message("maven.repositories.title"); } | getDisplayName |
19,969 | String () { return "reference.settings.project.maven.repository.indices"; } | getHelpTopic |
19,970 | String () { return getHelpTopic(); } | getId |
19,971 | JComponent () { return myMainPanel; } | createComponent |
19,972 | void () { myIndicesTable.setModel(new MyTableModel(MavenIndicesManager.getInstance(myProject).getIndex().getIndices())); myIndicesTable.getColumnModel().getColumn(0).setPreferredWidth(400); myIndicesTable.getColumnModel().getColumn(1).setPreferredWidth(50); myIndicesTable.getColumnModel().getColumn(2).setPreferredWidth... | reset |
19,973 | void (ActionEvent e) { myIndicesTable.repaint(); } | actionPerformed |
19,974 | void () { if (myRepaintTimer == null) return; // has not yet been initialized and reset myRepaintTimer.removeActionListener(myTimerListener); myRepaintTimer.stop(); myUpdatingIcon.dispose(); } | disposeUIResources |
19,975 | int () { return COLUMNS.length; } | getColumnCount |
19,976 | String (int index) { return COLUMNS[index]; } | getColumnName |
19,977 | int () { return myIndices.size(); } | getRowCount |
19,978 | Object (int rowIndex, int columnIndex) { MavenSearchIndex i = getIndex(rowIndex); return switch (columnIndex) { case 0 -> i.getRepositoryPathOrUrl(); case 1 -> switch (i.getKind()) { case LOCAL -> "Local"; case REMOTE -> "Remote"; case ONLINE -> "Online"; }; case 2 -> { if (i.getFailureMessage() != null) { yield Indice... | getValueAt |
19,979 | MavenIndex (int rowIndex) { return myIndices.get(rowIndex); } | getIndex |
19,980 | Component (JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) { // reset custom colors and let DefaultTableCellRenderer to set ones setForeground(null); setBackground(null); Component c = super.getTableCellRendererComponent(table, value, isSelected, hasFocus, row, column); MavenSearc... | getTableCellRendererComponent |
19,981 | Component (JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) { myState = (MavenIndexUpdateManager.IndexUpdatingState)value; return super.getTableCellRendererComponent(table, "", isSelected, hasFocus, row, column); } | getTableCellRendererComponent |
19,982 | void (Graphics g) { super.paintComponent(g); Dimension size = getSize(); switch (myState) { case UPDATING -> { myUpdatingIcon.setBackground(getBackground()); myUpdatingIcon.setSize(size.width, size.height); myUpdatingIcon.paint(g); } case WAITING -> { int x = (size.width - AllIcons.Process.Step_passive.getIconWidth()) ... | paintComponent |
19,983 | MavenArchetypeManager (@NotNull Project project) { return project.getService(MavenArchetypeManager.class); } | getInstance |
19,984 | Collection<MavenArchetype> (@NotNull MavenCatalog catalog) { if (catalog instanceof MavenCatalog.System.Internal) { return getInnerArchetypes(); } if (catalog instanceof MavenCatalog.System.DefaultLocal) { return getLocalArchetypes(); } if (catalog instanceof MavenCatalog.System.MavenCentral) { return getRemoteArchetyp... | getArchetypes |
19,985 | Set<MavenArchetype> () { MavenIndicesManager indicesManager = MavenIndicesManager.getInstance(myProject); Set<MavenArchetype> result = new HashSet<>(getInnerArchetypes()); result.addAll(loadUserArchetypes(getUserArchetypesFile())); if (!indicesManager.isInit()) { indicesManager.updateIndicesListSync(); } MavenIndexHold... | getArchetypes |
19,986 | Collection<MavenArchetype> () { MavenIndicesManager indicesManager = MavenIndicesManager.getInstance(myProject); if (!indicesManager.isInit()) indicesManager.updateIndicesListSync(); MavenIndex localIndex = indicesManager.getIndex().getLocalIndex(); if (localIndex == null) return Collections.emptySet(); return localInd... | getLocalArchetypes |
19,987 | Collection<MavenArchetype> () { return List.of( new MavenArchetype("org.apache.maven.archetypes", "maven-archetype-archetype", "1.0", null, "An archetype which contains a sample archetype."), new MavenArchetype("org.apache.maven.archetypes", "maven-archetype-j2ee-simple", "1.0", null, "An archetype which contains a sim... | getInnerArchetypes |
19,988 | Collection<MavenArchetype> (Path path) { return executeWithMavenEmbedderWrapper(wrapper -> wrapper.getInnerArchetypes(path)); } | getInnerArchetypes |
19,989 | Collection<MavenArchetype> (URL url) { return getRemoteArchetypes(url.toExternalForm()); } | getRemoteArchetypes |
19,990 | Collection<MavenArchetype> (String url) { return executeWithMavenEmbedderWrapper(wrapper -> wrapper.getRemoteArchetypes(url)); } | getRemoteArchetypes |
19,991 | void (@NotNull String groupId, @NotNull String artifactId, @NotNull String version) { MavenId mavenId = new MavenId(groupId, artifactId, version); MavenIndex localIndex = MavenIndicesManager.getInstance(myProject).getIndex().getLocalIndex(); if (localIndex == null) return; Path artifactPath = MavenUtil.getArtifactPath(... | addToLocalIndex |
19,992 | List<MavenArchetype> (@NotNull Path userArchetypesPath) { try { if (!Files.exists(userArchetypesPath)) { return Collections.emptyList(); } // Store artifact to set to remove duplicate created by old IDEA (https://youtrack.jetbrains.com/issue/IDEA-72105) Collection<MavenArchetype> result = new LinkedHashSet<>(); List<El... | loadUserArchetypes |
19,993 | void (@NotNull MavenArchetype archetype, @NotNull Path userArchetypesPath) { List<MavenArchetype> archetypes = new ArrayList<>(loadUserArchetypes(userArchetypesPath)); int idx = archetypes.indexOf(archetype); if (idx >= 0) { archetypes.set(idx, archetype); } else { archetypes.add(archetype); } saveUserArchetypes(archet... | addArchetype |
19,994 | Path () { return MavenSystemIndicesManager.getInstance().getIndicesDir().resolve("UserArchetypes.xml"); } | getUserArchetypesFile |
19,995 | void (List<MavenArchetype> userArchetypes, @NotNull Path userArchetypesPath) { Element root = new Element(ELEMENT_ARCHETYPES); for (MavenArchetype each : userArchetypes) { Element childElement = new Element(ELEMENT_ARCHETYPE); childElement.setAttribute(ELEMENT_GROUP_ID, each.groupId); childElement.setAttribute(ELEMENT_... | saveUserArchetypes |
19,996 | boolean () { return indicesInit; } | isIndicesInit |
19,997 | boolean () { return !indicesInit; } | isNotInit |
19,998 | List<MavenIndex> (@NotNull RepositoryDiff<MavenIndex> localDiff, @NotNull RepositoryDiff<List<MavenIndex>> remoteDiff) { List<MavenIndex> oldIndices = new ArrayList<>(remoteDiff.oldIndices); if (localDiff.oldIndices != null) oldIndices.add(localDiff.oldIndices); return oldIndices; } | getOldIndices |
19,999 | List<MavenIndex> () { return myIndexHolder.getIndices(); } | getIndices |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.