Unnamed: 0 int64 0 305k | body stringlengths 7 52.9k | name stringlengths 1 185 |
|---|---|---|
292,500 | Editor () { return myEditor; } | getEditor |
292,501 | void (@NotNull DocumentEvent event) { if (myAlarm.isDisposed()) return; myAlarm.cancelRequest(runnable); myAlarm.addRequest(runnable, 100); } | documentChanged |
292,502 | void (@NotNull FileEditorManagerEvent event) { if (myAlarm.isDisposed()) return; myAlarm.cancelRequest(runnable); myNewEditor = event.getNewEditor(); myAlarm.addRequest(runnable, 100); } | selectionChanged |
292,503 | void (@NotNull IdeaPluginDescriptor pluginDescriptor, boolean isUpdate) { close(CANCEL_EXIT_CODE); } | beforePluginUnload |
292,504 | void () { close(CANCEL_EXIT_CODE); } | appClosing |
292,505 | void (@NotNull Project project) { if (project == myProject) { close(CANCEL_EXIT_CODE); } } | projectClosing |
292,506 | void () { if (myEditor != null) { myEditor.getDocument().addDocumentListener(myRestartHighlightingListener); } } | addRestartHighlightingListenerToCurrentEditor |
292,507 | void () { if (myEditor != null) { myEditor.getDocument().removeDocumentListener(myRestartHighlightingListener); } } | removeRestartHighlightingListenerFromCurrentEditor |
292,508 | EditorTextField (boolean replace) { final StructuralSearchProfile profile = StructuralSearchUtil.getProfileByFileType(myFileType); assert profile != null; final Document document = UIUtil.createDocument(myProject, myFileType, myDialect, myPatternContext, "", profile); document.addDocumentListener(this, myDisposable); d... | createEditor |
292,509 | void (@NotNull final DocumentEvent event) { initValidation(); if (!myChangedConfiguration) { myExistingTemplatesComponent.templateChanged(); } } | documentChanged |
292,510 | void (@Nullable CompiledPattern compiledPattern) { final MatchOptions matchOptions = getConfiguration().getMatchOptions(); final CompiledPattern finalCompiledPattern = compiledPattern == null ? PatternCompiler.compilePattern(myProject, matchOptions, false, false) : compiledPattern; if (finalCompiledPattern == null) ret... | initializeFilterPanel |
292,511 | ReplaceConfiguration (Configuration template) { final ReplaceConfiguration result = template == null ? new ReplaceConfiguration(SSRBundle.message("new.template.defaultname"), SSRBundle.message("user.defined.category")) : new ReplaceConfiguration(template); if (!myEditConfigOnly) { final MatchOptions matchOptions = resu... | createConfiguration |
292,512 | void () { final Editor editor = myEditor; if (editor != null) { final SelectionModel selectionModel = editor.getSelectionModel(); final String selectedText = selectionModel.getSelectedText(); if (selectedText != null) { if (loadConfiguration(selectedText)) { return; } final String text = selectedText.trim(); setTextFor... | setTextFromContext |
292,513 | void (String text, EditorTextField editor) { editor.setText(text); editor.selectAll(); final Document document = editor.getDocument(); final PsiDocumentManager documentManager = PsiDocumentManager.getInstance(myProject); documentManager.commitDocument(document); final PsiFile file = documentManager.getPsiFile(document)... | setTextForEditor |
292,514 | void () { if (myReplace) { new ReplaceCommand(getConfiguration(), mySearchContext).startSearching(); } else { new SearchCommand(getConfiguration(), mySearchContext).startSearching(); } } | startSearching |
292,515 | String () { return myReplace ? SSRBundle.message("structural.replace.title") : SSRBundle.message("structural.search.title"); } | getDefaultTitle |
292,516 | DialogStyle () { return DialogStyle.COMPACT; } | getStyle |
292,517 | JComponent () { final var searchPanel = createSearchPanel(); myReplacePanel = createReplacePanel(); myReplacePanel.setVisible(myReplace); myScopePanel = new ScopePanel(myProject, myDisposable); if (!myEditConfigOnly) { myScopePanel.setRecentDirectories(FindInProjectSettings.getInstance(myProject).getRecentDirectories()... | createCenterPanel |
292,518 | JPanel () { // 'Search template:' label final JBLabel searchTemplateLabel = new JBLabel(SSRBundle.message("search.template")); // File type chooser myFileType = UIUtil.detectFileType(mySearchContext); myDialect = myFileType.getLanguage(); final StructuralSearchProfile profile = StructuralSearchUtil.getProfileByFileType... | createSearchPanel |
292,519 | ActionUpdateThread () { return ActionUpdateThread.EDT; } | getActionUpdateThread |
292,520 | boolean (@NotNull AnActionEvent e) { return isExistingTemplatesPanelVisible(); } | isSelected |
292,521 | void (@NotNull AnActionEvent e, boolean state) { setExistingTemplatesPanelVisible(state); } | setSelected |
292,522 | ActionUpdateThread () { return ActionUpdateThread.EDT; } | getActionUpdateThread |
292,523 | void (@NotNull AnActionEvent e) { super.update(e); final Presentation presentation = e.getPresentation(); presentation.setIcon(filterIcon.getLiveIndicatorIcon(myFilterPanel.hasVisibleFilter())); } | update |
292,524 | boolean (@NotNull AnActionEvent e) { return isFilterPanelVisible(); } | isSelected |
292,525 | void (@NotNull AnActionEvent e, boolean state) { setFilterPanelVisible(state); } | setSelected |
292,526 | ActionUpdateThread () { return ActionUpdateThread.BGT; } | getActionUpdateThread |
292,527 | boolean (@NotNull AnActionEvent e) { return myPinned; } | isSelected |
292,528 | void (@NotNull AnActionEvent e, boolean state) { myPinned = state; } | setSelected |
292,529 | void (@NotNull AnActionEvent e) { super.update(e); e.getPresentation().setEnabledAndVisible(!myEditConfigOnly); } | update |
292,530 | JComponent () { final JBLabel replacementTemplateLabel = new JBLabel(SSRBundle.message("replacement.template.label")); myShortenFqn = new JBCheckBox(SSRBundle.message("shorten.fully.qualified.names.checkbox")); myShortenFqn.setOpaque(false); myShortenFqn.addActionListener(e -> myConfiguration.getReplaceOptions().setToS... | createReplacePanel |
292,531 | void () { final StructuralSearchProfile profile = StructuralSearchUtil.getProfileByFileType(myFileType); myShortenFqn.setVisible(profile != null && profile.supportsShortenFQNames()); myStaticImport.setVisible(profile != null && profile.supportsUseStaticImports()); } | updateOptions |
292,532 | JPanel () { if (myEditConfigOnly) return null; final JPanel panel = new JPanel(new BorderLayout()); panel.setBorder(BorderFactory.createEmptyBorder(0, 6, 0, 0)); myOpenInNewTab = new JCheckBox(SSRBundle.message("open.in.new.tab.checkbox")); myOpenInNewTab.setSelected(FindSettings.getInstance().isShowResultsInSeparateVi... | createSouthAdditionalPanel |
292,533 | Point () { // handle dimension service manually to store dimensions correctly when switching between search/replace in the same dialog final DimensionService dimensionService = DimensionService.getInstance(); final Dimension size = dimensionService.getSize(myReplace ? REPLACE_DIMENSION_SERVICE_KEY : SEARCH_DIMENSION_SE... | getInitialLocation |
292,534 | void () { if (!myConfigurationLoaded) { setTextFromContext(); } super.show(); } | show |
292,535 | void () { if (!Registry.is("ssr.template.from.selection.builder")) { return; } final Document document = mySearchCriteriaEdit.getDocument(); final PsiFile psiFile = PsiDocumentManager.getInstance(myProject).getPsiFile(document); assert psiFile != null; final TemplateBuilder builder = StructuralSearchTemplateBuilder.get... | startTemplate |
292,536 | JComponent () { return mySearchCriteriaEdit; } | getPreferredFocusedComponent |
292,537 | void () { super.doCancelAction(); removeMatchHighlights(); } | doCancelAction |
292,538 | void () { if (!getOKAction().isEnabled()) return; if (!myPinned) close(OK_EXIT_CODE); removeMatchHighlights(); myAlarm.cancelAllRequests(); myConfiguration.removeUnusedVariables(); if (myEditConfigOnly) return; final SearchScope scope = myScopePanel.getScope(); if (scope instanceof GlobalSearchScopesCore.DirectoryScope... | doOKAction |
292,539 | Configuration () { saveConfiguration(); //final MatchOptions matchOptions = myConfiguration.getMatchOptions(); //assert matchOptions.isCaseSensitiveMatch() == myMatchCase.isSelected(); //assert matchOptions.isSearchInjectedCode() == myInjected.isSelected(); //final ReplaceOptions replaceOptions = myConfiguration.getRep... | getConfiguration |
292,540 | void () { if (myEditConfigOnly || myRangeHighlighters.isEmpty()) { return; } // retrieval of editor needs to be outside invokeLater(), otherwise the editor might have already changed. final Editor editor = myEditor; if (editor == null) { return; } ApplicationManager.getApplication().invokeLater(() -> { if (myProject.is... | removeMatchHighlights |
292,541 | void () { if (myEditConfigOnly) return; ReadAction.nonBlocking(() -> { if (DumbService.isDumb(myProject)) { // Search hits in the current editor are not shown when dumb. return null; } final Editor editor = myEditor; if (editor == null) { return null; } final Document document = editor.getDocument(); final PsiFile file... | addMatchHighlights |
292,542 | void (@NotNull List<? extends MatchResult> matchResults, @NotNull Editor editor, @NotNull PsiFile file, @NlsContexts.StatusBarText @Nullable String statusBarText) { ApplicationManager.getApplication().invokeLater(() -> { if (myProject.isDisposed()) { return; } if (!matchResults.isEmpty()) { for (MatchResult result : ma... | addMatchHighlights |
292,543 | boolean () { return false; } | continuousValidation |
292,544 | List<ValidationInfo> () { final JRootPane component = getRootPane(); if (component == null || myPerformAction) { return Collections.emptyList(); } final List<ValidationInfo> errors = new SmartList<>(); saveConfiguration(); final MatchOptions matchOptions = myConfiguration.getMatchOptions(); try { CompiledPattern compil... | doValidateAll |
292,545 | void (@NlsContexts.PopupContent @Nullable String message, boolean error, @NotNull JComponent component) { ApplicationManager.getApplication().invokeLater(() -> { if (isDisposed()) return; if (myBalloon != null) myBalloon.hide(); if (message == null) return; myBalloon = JBPopupFactory.getInstance() .createHtmlTextBalloo... | reportMessage |
292,546 | void () { final MatchOptions matchOptions = myConfiguration.getMatchOptions(); int scripts = 0; for (String name : matchOptions.getVariableConstraintNames()) { final MatchVariableConstraint constraint = matchOptions.getVariableConstraint(name); if (constraint.getScriptCodeConstraint().length() > 2) scripts++; } final R... | securityCheck |
292,547 | void (boolean visible) { if (visible && myFilterPanel.getVariable() == null) { myFilterPanel.initFilters(UIUtil.getOrAddVariableConstraint(Configuration.CONTEXT_VAR_NAME, myConfiguration)); } if (isFilterPanelVisible() != visible) { mySearchEditorPanel.setSecondComponent(visible ? myFilterPanel.getComponent() : null); ... | setFilterPanelVisible |
292,548 | boolean () { return mySearchEditorPanel.getSecondComponent() != null; } | isFilterPanelVisible |
292,549 | void (boolean visible) { if (visible) { myMainSplitter.setFirstComponent(myExistingTemplatesComponent.getTemplatesPanel()); } else { myMainSplitter.setFirstComponent(null); } } | setExistingTemplatesPanelVisible |
292,550 | boolean () { return myMainSplitter.getFirstComponent() != null; } | isExistingTemplatesPanelVisible |
292,551 | void (MatchOptions matchOptions) { final List<String> names = new ArrayList<>(matchOptions.getUsedVariableNames()); Collections.sort(names); names.remove(Configuration.CONTEXT_VAR_NAME); names.add(SSRBundle.message("complete.match.variable.name")); myTargetComboBox.setItems(names); myTargetComboBox.setEnabled(names.siz... | setSearchTargets |
292,552 | boolean (String text) { if (text == null) { return false; } try { final Configuration configuration = ConfigurationUtil.fromXml(text); if (configuration == null) { return false; } if (configuration instanceof ReplaceConfiguration && !myReplace) { switchSearchReplace(); } loadConfiguration(configuration); securityCheck(... | loadConfiguration |
292,553 | void (Configuration configuration) { myConfigurationLoaded = true; myConfiguration = createConfiguration(configuration); final MatchOptions matchOptions = myConfiguration.getMatchOptions(); final ReplaceOptions replaceOptions = myConfiguration.getReplaceOptions(); if (myEditConfigOnly) { myMatchCase.setSelected(matchOp... | loadConfiguration |
292,554 | void (boolean replace, String text) { myChangedConfiguration = true; UIUtil.setContent(replace ? myReplaceCriteriaEdit : mySearchCriteriaEdit, text); myChangedConfiguration = false; } | setEditorContent |
292,555 | void () { final MatchOptions matchOptions = myConfiguration.getMatchOptions(); if (myScopePanel.isVisible()) { final SearchScope scope = myScopePanel.getScope(); final boolean searchWithinHierarchy = IdeBundle.message("scope.class.hierarchy").equals(scope.getDisplayName()); // We need to reset search within hierarchy s... | saveConfiguration |
292,556 | String (EditorTextField textField) { final StructuralSearchProfile profile = StructuralSearchUtil.getProfileByFileType(myFileType); if (profile != null) { final Document document = textField.getDocument(); final String pattern = ReadAction.compute(() -> { final PsiFile file = PsiDocumentManager.getInstance(myProject).g... | getPattern |
292,557 | void () { myProject.putUserData(STRUCTURAL_SEARCH_PREVIOUS_CONFIGURATION, myConfiguration); storeDimensions(); saveUIState(); StructuralSearchPlugin.getInstance(myProject).setDialog(null); myAlarm.cancelAllRequests(); mySearchCriteriaEdit.removeNotify(); myReplaceCriteriaEdit.removeNotify(); removeRestartHighlightingLi... | dispose |
292,558 | void () { final UIState uiState = UIState.getInstance(); if (isFilterPanelVisible() != uiState.filtersVisible) { mySearchEditorPanel.setSecondComponent(uiState.filtersVisible ? myFilterPanel.getComponent() : null); } setExistingTemplatesPanelVisible(uiState.existingTemplatesVisible); myExistingTemplatesComponent.setTre... | loadUIState |
292,559 | void () { if (mySearchEditorPanel == null) return; final UIState uiState = UIState.getInstance(); uiState.filtersVisible = isFilterPanelVisible(); uiState.existingTemplatesVisible = isExistingTemplatesPanelVisible(); uiState.templatesTreeState = myExistingTemplatesComponent.getTreeState(); if (!myEditConfigOnly) { uiSt... | saveUIState |
292,560 | void () { if (myEditConfigOnly) return; // don't store dimensions when editing structural search inspection patterns final String key1 = myReplace ? REPLACE_DIMENSION_SERVICE_KEY : SEARCH_DIMENSION_SERVICE_KEY; final String key2 = myReplace ? SEARCH_DIMENSION_SERVICE_KEY : REPLACE_DIMENSION_SERVICE_KEY; final Point loc... | storeDimensions |
292,561 | String () { return "find.structuredSearch"; } | getHelpId |
292,562 | void () { final var scheme = EditorColorsManager.getInstance().getGlobalScheme(); myComponentsWithEditorBackground.forEach(component -> { component.setBackground(scheme.getDefaultBackground()); }); final var borderTopBottom = JBUI.Borders.customLine(JBUI.CurrentTheme.Editor.BORDER_COLOR, 1, 0, 1, 0); if (myEditConfigOn... | updateColors |
292,563 | void () { String text = ConfigurationUtil.toXml(getConfiguration()); String html = "<html><body><pre><code>" + StringUtil.escapeXmlEntities(text) + "</code></pre></body></html>"; CopyPasteManager.getInstance().setContents(new TextTransferable(html, text)); } | exportToClipboard |
292,564 | void () { final String contents = CopyPasteManager.getInstance().getContents(DataFlavor.stringFlavor); if (!loadConfiguration(contents)) { reportMessage(SSRBundle.message("no.template.found.warning"), false, mySearchCriteriaEdit); } } | importFromClipboard |
292,565 | void () { storeDimensions(); myReplace = !myReplace; setTitle(getDefaultTitle()); myReplacePanel.setVisible(myReplace); loadConfiguration(myConfiguration); final Dimension size = DimensionService.getInstance().getSize(myReplace ? REPLACE_DIMENSION_SERVICE_KEY : SEARCH_DIMENSION_SERVICE_KEY, myProject); if (size != null... | switchSearchReplace |
292,566 | void (Component c, Graphics g, int x, int y, int width, int height) { final EditorTextField editorTextField = ComponentUtil.getParentOfType((Class<? extends EditorTextField>)EditorTextField.class, c); if (editorTextField == null) { return; } DarculaUIUtil.Outline object = DarculaUIUtil.getOutline(editorTextField); if (... | paintBorder |
292,567 | Insets (Component c) { return myErrorBorder.getBorderInsets(c); } | getBorderInsets |
292,568 | boolean () { return false; } | isBorderOpaque |
292,569 | void (@NotNull AnActionEvent e) { switchSearchReplace(); } | actionPerformed |
292,570 | void (@NotNull AnActionEvent e) { e.getPresentation().setText(SSRBundle.messagePointer(myReplace ? "switch.to.search.action" : "switch.to.replace.action")); } | update |
292,571 | ActionUpdateThread () { return ActionUpdateThread.BGT; } | getActionUpdateThread |
292,572 | void (@NotNull AnActionEvent e) { e.getPresentation().setEnabled(!StringUtil.isEmptyOrSpaces(mySearchCriteriaEdit.getText())); } | update |
292,573 | ActionUpdateThread () { return ActionUpdateThread.EDT; } | getActionUpdateThread |
292,574 | void (@NotNull AnActionEvent e) { exportToClipboard(); } | actionPerformed |
292,575 | void (@NotNull AnActionEvent e) { importFromClipboard(); } | actionPerformed |
292,576 | EditorEx () { final EditorEx editor = super.createEditor(); editor.setHorizontalScrollbarVisible(true); editor.setVerticalScrollbarVisible(true); final StructuralSearchProfile profile = StructuralSearchUtil.getProfileByFileType(myFileType); if (profile != null) { TemplateEditorUtil.setHighlighter(editor, UIUtil.getTemp... | createEditor |
292,577 | void (@NotNull EditorEx editor) { setupBorder(editor); final JScrollPane scrollPane = editor.getScrollPane(); scrollPane.setBorder(new ErrorBorder(scrollPane.getBorder())); } | updateBorder |
292,578 | String () { return name; } | getName |
292,579 | String () { final LanguageFileType type = getFileType(); final String name = type == null ? CoreBundle.message("filetype.unknown.display.name") : type.getLanguage().getDisplayName(); return isPredefined() ? SSRBundle.message("predefined.configuration.type.text", name) : SSRBundle.message("predefined.configuration.type.... | getTypeText |
292,580 | String () { return category; } | getCategory |
292,581 | void (@NotNull String category) { this.category = category; } | setCategory |
292,582 | long () { return created; } | getCreated |
292,583 | void (long created) { if (predefined) { throw new AssertionError(); } this.created = created; } | setCreated |
292,584 | String () { if (uuid == null) { uuid = UUID.nameUUIDFromBytes(name.getBytes(StandardCharsets.UTF_8)).toString(); } return uuid; } | getUuid |
292,585 | void (@Nullable String uuid) { this.uuid = uuid; } | setUuid |
292,586 | void (String description) { this.description = description; } | setDescription |
292,587 | void (String suppressId) { this.suppressId = suppressId; } | setSuppressId |
292,588 | void (String problemDescriptor) { this.problemDescriptor = problemDescriptor; } | setProblemDescriptor |
292,589 | boolean () { return cleanup; } | isCleanup |
292,590 | void (boolean cleanup) { this.cleanup = cleanup; } | setCleanup |
292,591 | int () { return order; } | getOrder |
292,592 | void (int order) { if (order < 0) throw new IllegalArgumentException(); this.order = order; } | setOrder |
292,593 | void (Element element) { //noinspection HardCodedStringLiteral name = ObjectUtils.notNull(element.getAttributeValue(NAME_ATTRIBUTE_NAME), ""); final Attribute createdAttribute = element.getAttribute(CREATED_ATTRIBUTE_NAME); if (createdAttribute != null) { try { created = createdAttribute.getLongValue(); } catch (DataCo... | readExternal |
292,594 | void (Element element) { element.setAttribute(NAME_ATTRIBUTE_NAME,name); if (created > 0) { element.setAttribute(CREATED_ATTRIBUTE_NAME, String.valueOf(created)); } if (uuid != null && !uuid.equals(UUID.nameUUIDFromBytes(name.getBytes(StandardCharsets.UTF_8)).toString())) { element.setAttribute(UUID_ATTRIBUTE_NAME, uui... | writeExternal |
292,595 | boolean () { return predefined; } | isPredefined |
292,596 | void (boolean predefined) { this.predefined = predefined; } | setPredefined |
292,597 | boolean (Object configuration) { if (!(configuration instanceof Configuration other)) return false; return Objects.equals(category, other.category) && name.equals(other.name); } | equals |
292,598 | int () { return 31 * name.hashCode() + (category != null ? category.hashCode() : 0); } | hashCode |
292,599 | Icon () { final LanguageFileType type = getFileType(); return (type == null || type.getIcon() == null) ? AllIcons.FileTypes.Unknown : type.getIcon(); } | getIcon |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.