Unnamed: 0 int64 0 305k | body stringlengths 7 52.9k | name stringlengths 1 185 |
|---|---|---|
278,800 | void () { incModificationCount(); } | inc |
278,801 | void (@NotNull PluginDescriptor pluginDescriptor) { this.pluginDescriptor = pluginDescriptor; } | setPluginDescriptor |
278,802 | boolean () { return false; } | hasNextOccurence |
278,803 | boolean () { return false; } | hasPreviousOccurence |
278,804 | OccurenceInfo () { return null; } | goNextOccurence |
278,805 | OccurenceInfo () { return null; } | goPreviousOccurence |
278,806 | String () { return ""; } | getNextOccurenceActionName |
278,807 | String () { return ""; } | getPreviousOccurenceActionName |
278,808 | ActionUpdateThread () { return OccurenceNavigator.super.getActionUpdateThread(); } | getActionUpdateThread |
278,809 | OccurenceInfo (int occurenceNumber, int occurencesCount) { return new OccurenceInfo(occurenceNumber, occurencesCount); } | position |
278,810 | Navigatable () { return myNavigateable; } | getNavigateable |
278,811 | int () { return myOccurenceNumber; } | getOccurenceNumber |
278,812 | int () { return myOccurencesCount; } | getOccurencesCount |
278,813 | Project () { return myProject; } | getProject |
278,814 | VirtualFile () { return myFile; } | getVirtualFile |
278,815 | FileEditorProvider (@NotNull Project project, @NotNull VirtualFile file) { FileEditorManager manager = FileEditorManager.getInstance(project); return manager == null ? null : () -> getFirstElement(manager.openFile(file, false)); } | getFileEditorProvider |
278,816 | String () { return "FileSelectInContext{" + "myProject=" + myProject + ", myFile=" + myFile + ", myProvider=" + myProvider + '}'; } | toString |
278,817 | String () { if (name != null) { return name; } if (resourceKey != null) { String bundleName = resourceBundle; if (bundleName == null && pluginDescriptor != null) { bundleName = pluginDescriptor.getResourceBundleBaseName(); } if (bundleName != null) { ResourceBundle bundle = DynamicBundle.getResourceBundle(pluginDescriptor.getClassLoader(), bundleName); return BundleBase.message(bundle, resourceKey); } } return null; } | compute |
278,818 | NullableLazyValue<String> () { return myName; } | getTypeName |
278,819 | void (@NotNull PluginDescriptor pluginDescriptor) { this.pluginDescriptor = pluginDescriptor; } | setPluginDescriptor |
278,820 | boolean (String url) { return ourExternalPrefix.matcher(StringUtil.toLowerCase(url)).find(); } | isAbsoluteURL |
278,821 | String (String url) { Matcher anchorMatcher = ourAnchorSuffix.matcher(url); return anchorMatcher.find() ? anchorMatcher.reset().replaceAll("") : url; } | getDocURL |
278,822 | void (@NotNull String url) { getBrowserLauncher().open(url); } | open |
278,823 | void (@NotNull VirtualFile file) { browse(file.getUrl(), null); } | browse |
278,824 | void (@NotNull File file) { getBrowserLauncher().browse(file); } | browse |
278,825 | void (@NotNull Path file) { getBrowserLauncher().browse(file); } | browse |
278,826 | void (@NotNull URL url) { browse(url.toExternalForm(), null); } | browse |
278,827 | void (@NotNull URI uri) { getBrowserLauncher().browse(uri); } | browse |
278,828 | void (@NotNull String url) { browse(url, null); } | browse |
278,829 | void (@NotNull String url, @Nullable Project project) { getBrowserLauncher().browse(url, null, project); } | browse |
278,830 | BrowserLauncher () { return LoadingState.COMPONENTS_LOADED.isOccurred() ? BrowserLauncher.getInstance() : new BrowserLauncherAppless(); } | getBrowserLauncher |
278,831 | List<String> (@NotNull String browserPathOrName, @Nullable String url, @NotNull List<String> parameters, boolean newWindowIfPossible) { var command = new ArrayList<String>(); var path = NioFiles.toPath(browserPathOrName); if (path == null || !Files.isRegularFile(path)) { if (SystemInfo.isMac) { command.addAll(List.of(ExecUtil.getOpenCommandPath(), "-a", browserPathOrName)); if (newWindowIfPossible) { command.add("-n"); } if (url != null) { command.add(url); } if (!parameters.isEmpty()) { command.add("--args"); command.addAll(parameters); } } else if (SystemInfo.isWindows) { command.addAll(List.of(ExecUtil.getWindowsShellName(), "/c", "start", GeneralCommandLine.inescapableQuote(""), browserPathOrName)); command.addAll(parameters); if (url != null) { command.add(url); } } } if (command.isEmpty()) { command.add(browserPathOrName); command.addAll(parameters); if (url != null) { command.add(url); } } return command; } | getOpenBrowserCommand |
278,832 | void (@NotNull String url) { browse(url); } | launchBrowser |
278,833 | Object () { return pointer.getElement(); } | getSelectorInFile |
278,834 | String () { return "SmartSelectInContext{" + "pointer=" + pointer + "} " + super.toString(); } | toString |
278,835 | void (@NotNull DataContext dataContext) { Collection<String> lines = getTextLinesToCopy(); if (lines != null && !lines.isEmpty()) { String text = StringUtil.join(lines, getLinesSeparator()); CopyPasteManager.getInstance().setContents(new StringSelection(text)); } } | performCopy |
278,836 | String () { return "\n"; } | getLinesSeparator |
278,837 | boolean (@NotNull DataContext dataContext) { return getTextLinesToCopy() != null; } | isCopyEnabled |
278,838 | boolean (@NotNull DataContext dataContext) { return true; } | isCopyVisible |
278,839 | boolean () { return !Experiments.getInstance().isFeatureEnabled("new.project.wizard"); } | isAvailable |
278,840 | RemoteDesktopService () { return ourInstance.get(); } | getInstance |
278,841 | boolean () { if (!SystemInfoRt.isWindows) { return false; } if (!LoadingState.COMPONENTS_REGISTERED.isOccurred() || ApplicationManager.getApplication() == null) { return false; } RemoteDesktopService instance = getInstance(); return instance != null && instance.isRemoteDesktopConnected(); } | isRemoteSession |
278,842 | void (final @NotNull String path) { myTextField.setText(path); } | doSetText |
278,843 | void (ActionEvent e ) { final VirtualFile fileToSelect = getFileToSelect(); myChooserDescriptor.setTitle(myTitle); // important to set title and description here because a shared descriptor instance can be used myChooserDescriptor.setDescription(myDescription); FileChooser.chooseFiles(myChooserDescriptor, null, fileToSelect, files -> doSetText(FileUtil.toSystemDependentName(files.get(0).getPath()))); } | actionPerformed |
278,844 | void () { myIndicator.start(); } | start |
278,845 | void () { myIndicator.stop(); } | stop |
278,846 | boolean () { return myIndicator.isRunning(); } | isRunning |
278,847 | void () { myIndicator.cancel(); } | cancel |
278,848 | boolean () { return myIndicator.isCanceled(); } | isCanceled |
278,849 | void (@Nls @NlsContexts.ProgressText String text) { myIndicator.setText(text); } | setText |
278,850 | String () { return myIndicator.getText(); } | getText |
278,851 | void (@Nls @NlsContexts.ProgressDetails String text) { myIndicator.setText2(text); } | setText2 |
278,852 | String () { return myIndicator.getText2(); } | getText2 |
278,853 | double () { return myIndicator.getFraction(); } | getFraction |
278,854 | void (final double fraction) { myIndicator.setFraction(fraction); } | setFraction |
278,855 | void () { myIndicator.pushState(); } | pushState |
278,856 | void () { myIndicator.popState(); } | popState |
278,857 | void () { myIndicator.startNonCancelableSection(); } | startNonCancelableSection |
278,858 | void () { myIndicator.finishNonCancelableSection(); } | finishNonCancelableSection |
278,859 | boolean () { return myIndicator.isModal(); } | isModal |
278,860 | ModalityState () { return myIndicator.getModalityState(); } | getModalityState |
278,861 | void (final ProgressIndicator modalityProgress) { myIndicator.setModalityProgress(modalityProgress); } | setModalityProgress |
278,862 | boolean () { return myIndicator.isIndeterminate(); } | isIndeterminate |
278,863 | void (final boolean indeterminate) { myIndicator.setIndeterminate(indeterminate); } | setIndeterminate |
278,864 | ProgressIndicator () { return myIndicator; } | getDelegate |
278,865 | ProgressIndicator () { return myIndicator; } | getOriginalProgressIndicator |
278,866 | boolean () { return myIndicator.isPopupWasShown(); } | isPopupWasShown |
278,867 | boolean () { return myIndicator.isShowing(); } | isShowing |
278,868 | Icon (Icon icon, boolean selected, boolean hasFocus) { if (icon != null && !StartupUiUtil.isUnderDarcula() && Registry.is("ide.project.view.change.icon.on.selection", true) && selected && hasFocus) { return IconLoader.getDarkIcon(icon, true); } return icon; } | fixIconIfNeeded |
278,869 | void (@NotNull JTree tree, @NlsSafe Object value, boolean selected, boolean expanded, boolean leaf, int row, boolean hasFocus) { @NlsSafe Object node = TreeUtil.getUserObject(value); if (node instanceof NodeDescriptor<?> descriptor) { // TODO: use this color somewhere Color color = descriptor.getColor(); setIcon(fixIconIfNeeded(descriptor.getIcon(), selected, hasFocus)); } ItemPresentation p0 = getPresentation(node); if (p0 instanceof PresentationData presentation) { Color color = node instanceof NodeDescriptor ? ((NodeDescriptor<?>)node).getColor() : null; setIcon(fixIconIfNeeded(presentation.getIcon(false), selected, hasFocus)); final List<PresentableNodeDescriptor.ColoredFragment> coloredText = presentation.getColoredText(); Color forcedForeground = presentation.getForcedTextForeground(); if (coloredText.isEmpty()) { String text = presentation.getPresentableText(); if (StringUtil.isEmpty(text)) { @NlsSafe String valueSting = value.toString(); text = valueSting; } text = tree.convertValueToText(text, selected, expanded, leaf, row, hasFocus); SimpleTextAttributes simpleTextAttributes = getSimpleTextAttributes( presentation, forcedForeground != null ? forcedForeground : color, node); append(text, simpleTextAttributes); String location = presentation.getLocationString(); if (!StringUtil.isEmpty(location)) { SimpleTextAttributes attributes = SimpleTextAttributes.merge(simpleTextAttributes, SimpleTextAttributes.GRAYED_ATTRIBUTES); append(presentation.getLocationPrefix() + location + presentation.getLocationSuffix(), attributes, false); } } else { boolean first = true; boolean isMain = true; for (PresentableNodeDescriptor.ColoredFragment each : coloredText) { SimpleTextAttributes simpleTextAttributes = each.getAttributes(); if (each.getAttributes().getFgColor() == null && forcedForeground != null) { simpleTextAttributes = addColorToSimpleTextAttributes(each.getAttributes(), forcedForeground); } if (first) { final TextAttributesKey textAttributesKey = presentation.getTextAttributesKey(); if (textAttributesKey != null) { TextAttributes forcedAttributes = getScheme().getAttributes(textAttributesKey); if (forcedAttributes != null) { simpleTextAttributes = SimpleTextAttributes.merge(simpleTextAttributes, SimpleTextAttributes.fromTextAttributes(forcedAttributes)); } } first = false; } // the first grayed text (inactive foreground, regular or small) ends main speed-searchable text isMain = isMain && !Comparing.equal(simpleTextAttributes.getFgColor(), SimpleTextAttributes.GRAYED_ATTRIBUTES.getFgColor()); append(each.getText(), simpleTextAttributes, isMain); } String location = presentation.getLocationString(); if (!StringUtil.isEmpty(location)) { append(presentation.getLocationPrefix() + location + presentation.getLocationSuffix(), SimpleTextAttributes.GRAYED_ATTRIBUTES, false); } } setToolTipText(presentation.getTooltip()); } else if (value != null) { @NlsSafe String text = value.toString(); if (node instanceof NodeDescriptor) { text = node.toString(); } text = tree.convertValueToText(text, selected, expanded, leaf, row, hasFocus); if (text == null) { text = ""; } append(text); setToolTipText(null); } } | customizeCellRenderer |
278,870 | EditorColorsScheme () { return EditorColorsManager.getInstance().getSchemeForCurrentUITheme(); } | getScheme |
278,871 | SimpleTextAttributes (@NotNull PresentationData presentation, Color color, @NotNull Object node) { SimpleTextAttributes simpleTextAttributes = getSimpleTextAttributes(presentation, getScheme()); return addColorToSimpleTextAttributes(simpleTextAttributes, color); } | getSimpleTextAttributes |
278,872 | SimpleTextAttributes (SimpleTextAttributes simpleTextAttributes, Color color) { if (color != null) { final TextAttributes textAttributes = simpleTextAttributes.toTextAttributes(); textAttributes.setForegroundColor(color); simpleTextAttributes = SimpleTextAttributes.fromTextAttributes(textAttributes); } return simpleTextAttributes; } | addColorToSimpleTextAttributes |
278,873 | SimpleTextAttributes (final @Nullable ItemPresentation presentation) { return getSimpleTextAttributes(presentation, getScheme()); } | getSimpleTextAttributes |
278,874 | SimpleTextAttributes (final @Nullable ItemPresentation presentation, @NotNull EditorColorsScheme colorsScheme) { if (presentation instanceof ColoredItemPresentation) { final TextAttributesKey textAttributesKey = ((ColoredItemPresentation) presentation).getTextAttributesKey(); if (textAttributesKey == null) return SimpleTextAttributes.REGULAR_ATTRIBUTES; final TextAttributes textAttributes = colorsScheme.getAttributes(textAttributesKey); return textAttributes == null ? SimpleTextAttributes.REGULAR_ATTRIBUTES : SimpleTextAttributes.fromTextAttributes(textAttributes); } return SimpleTextAttributes.REGULAR_ATTRIBUTES; } | getSimpleTextAttributes |
278,875 | String () { return id + ": " + type; } | toString |
278,876 | boolean (Object object) { return getMatchTo(object) != null; } | isMatchTo |
278,877 | Match (Object object) { Object userObject = TreeUtil.getUserObject(object); if (this.userObject != null && this.userObject.equals(userObject)) { return Match.OBJECT; } return Objects.equals(id, calcId(userObject)) && Objects.equals(type, calcType(userObject)) ? Match.ID_TYPE : null; } | getMatchTo |
278,878 | void (String id) { this.id = id == null ? null : INTERNER.intern(id); } | setId |
278,879 | String () { return id; } | getId |
278,880 | void (String type) { this.type = type == null ? null : INTERNER.intern(type); } | setType |
278,881 | String () { return type; } | getType |
278,882 | boolean () { return myExpandedPaths.isEmpty() && mySelectedPaths.isEmpty(); } | isEmpty |
278,883 | void (@NotNull Element root, List<PathElement[]> list, @NotNull String name) { list.clear(); for (Element element : root.getChildren(name)) { for (Element child : element.getChildren(PATH_TAG)) { PathElement[] path = XmlSerializer.deserialize(child, PathElement[].class); list.add(path); } } } | readExternal |
278,884 | TreeState (@NotNull JTree tree, @NotNull DefaultMutableTreeNode treeNode) { return createOn(tree, new TreePath(treeNode.getPath())); } | createOn |
278,885 | TreeState (@NotNull JTree tree, @NotNull TreePath rootPath) { return new TreeState(createPaths(tree, TreeUtil.collectExpandedPaths(tree, rootPath)), createPaths(tree, TreeUtil.collectSelectedPaths(tree, rootPath))); } | createOn |
278,886 | TreeState (@NotNull JTree tree) { return createOn(tree, true, false); } | createOn |
278,887 | TreeState (@NotNull JTree tree, boolean persistExpand, boolean persistSelect) { List<TreePath> expanded = persistExpand ? TreeUtil.collectExpandedPaths(tree) : Collections.emptyList(); List<TreePath> selected = persistSelect ? TreeUtil.collectSelectedPaths(tree) : Collections.emptyList(); return createOn(tree, expanded, selected); } | createOn |
278,888 | TreeState (@NotNull JTree tree, @NotNull List<TreePath> expandedPaths, @NotNull List<TreePath> selectedPaths) { List<PathElement[]> expandedPathElements = !expandedPaths.isEmpty() ? createPaths(tree, expandedPaths) : new ArrayList<>(); List<PathElement[]> selectedPathElements = !selectedPaths.isEmpty() ? createPaths(tree, selectedPaths) : new ArrayList<>(); return new TreeState(expandedPathElements, selectedPathElements); } | createOn |
278,889 | TreeState (@Nullable Element element) { TreeState state = new TreeState(new ArrayList<>(), new ArrayList<>()); try { if (element != null) { state.readExternal(element); } } catch (InvalidDataException e) { LOG.warn(e); } return state; } | createFrom |
278,890 | void (Element element) { writeExternal(element, myExpandedPaths, EXPAND_TAG); writeExternal(element, mySelectedPaths, SELECT_TAG); } | writeExternal |
278,891 | void (Element element, List<PathElement[]> list, String name) { Element root = new Element(name); for (PathElement[] path : list) { Element e = XmlSerializer.serialize(path); e.setName(PATH_TAG); root.addContent(e); } element.addContent(root); } | writeExternal |
278,892 | List<PathElement[]> (@NotNull JTree tree, @NotNull List<? extends TreePath> paths) { List<PathElement[]> list = new ArrayList<>(); for (TreePath o : paths) { if (o.getPathCount() > 1 || tree.isRootVisible()) { list.add(createPath(tree.getModel(), o)); } } return list; } | createPaths |
278,893 | PathElement[] (@NotNull TreeModel model, @NotNull TreePath treePath) { Object prev = null; int count = treePath.getPathCount(); PathElement[] result = new PathElement[count]; for (int i = 0; i < count; i++) { Object cur = treePath.getPathComponent(i); Object userObject = TreeUtil.getUserObject(cur); int childIndex = prev == null ? 0 : model.getIndexOfChild(prev, cur); result[i] = new PathElement(calcId(userObject), calcType(userObject), childIndex, userObject); prev = cur; } return result; } | createPath |
278,894 | String (@Nullable Object userObject) { if (userObject == null) return ""; // The easiest case: the node provides an ID explicitly. if (userObject instanceof PathElementIdProvider userObjectWithPathId) { return userObjectWithPathId.getPathElementId(); } // There used to be a lot of code here that all started in 2005 with IDEA-29734 (back then IDEADEV-2150), // which later was modified many times, but in the end all it did was to invoke some slow operations on EDT // (IDEA-270843, IDEA-305055), and IDEA-29734 was still broken. // Now we just fall back to toString(), which MUST work fast. If that doesn't work, implement PathElementIdProvider. return StringUtil.notNullize(userObject.toString()); } | calcId |
278,895 | String (@Nullable Object userObject) { if (userObject == null) return ""; String name = userObject.getClass().getName(); return Integer.toHexString(StringHash.murmur(name, 31)) + ":" + StringUtil.getShortName(name); } | calcType |
278,896 | void (@NotNull JTree tree) { applyTo(tree, tree.getModel().getRoot()); } | applyTo |
278,897 | void (@NotNull JTree tree, @Nullable Object root) { LOG.debug(new IllegalStateException("restore paths")); if (visit(tree)) return; // AsyncTreeModel#accept if (root == null) return; TreeFacade facade = TreeFacade.getFacade(tree); ActionCallback callback = facade.getInitialized().doWhenDone(new TreeRunnable("TreeState.applyTo: on done facade init") { @Override public void perform() { facade.batch(indicator -> applyExpandedTo(facade, new TreePath(root), indicator)); } }); if (tree.getSelectionCount() == 0) { callback.doWhenDone(new TreeRunnable("TreeState.applyTo: on done") { @Override public void perform() { if (tree.getSelectionCount() == 0) { applySelectedTo(tree); } } }); } } | applyTo |
278,898 | void () { facade.batch(indicator -> applyExpandedTo(facade, new TreePath(root), indicator)); } | perform |
278,899 | void () { if (tree.getSelectionCount() == 0) { applySelectedTo(tree); } } | perform |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.