Unnamed: 0 int64 0 305k | body stringlengths 7 52.9k | name stringlengths 1 185 |
|---|---|---|
292,400 | List<FileTypeInfo> () { final List<LanguageFileType> types = new ArrayList<>(); for (LanguageFileType fileType : StructuralSearchUtil.getSuitableFileTypes()) { if (StructuralSearchUtil.getProfileByFileType(fileType) != null) { types.add(fileType); } } types.sort((o1, o2) -> o1.getDescription().compareToIgnoreCase(o2.ge... | createFileTypeInfos |
292,401 | void (@Nullable LanguageFileType type, @Nullable Language dialect, @Nullable PatternContext context) { if (type == null) { setSelectedItem(null); } else { for (FileTypeInfo info : myFileTypeInfos) { if (info.isEqualTo(type, dialect, context)) { setSelectedItem(info); return; } } } } | setSelectedItem |
292,402 | void (FileTypeInfo info) { mySelectedItem = info; if (myConsumer != null && info != null) { myConsumer.accept(info); } } | setSelectedItem |
292,403 | FileTypeInfo () { return mySelectedItem; } | getSelectedItem |
292,404 | void (@NotNull AnActionEvent e) { super.update(e); final Presentation presentation = e.getPresentation(); if (mySelectedItem == null) { presentation.setIcon(AllIcons.FileTypes.Unknown); presentation.setText(CoreBundle.message("filetype.unknown.description")); } else { presentation.setIcon(mySelectedItem.getFileType().g... | update |
292,405 | ActionUpdateThread () { return ActionUpdateThread.EDT; } | getActionUpdateThread |
292,406 | JComponent (@NotNull Presentation presentation, @NotNull String place) { final JPanel panel = new JPanel(new BorderLayout(1, 0)); final ComboBoxButton button = createComboBoxButton(presentation); final String text = SSRBundle.message("search.dialog.file.type.label"); final JLabel label = new JBLabel(text); button.setLa... | createCustomComponent |
292,407 | DefaultActionGroup (@NotNull JComponent button, @NotNull DataContext context) { final DefaultActionGroup group = new DefaultActionGroup(); for (FileTypeInfo fileTypeInfo : myFileTypeInfos) { group.add(new FileTypeInfoAction(fileTypeInfo)); } return group; } | createPopupActionGroup |
292,408 | Condition<AnAction> () { return action -> ((FileTypeInfoAction)action).getFileTypeInfo() == mySelectedItem; } | getPreselectCondition |
292,409 | void (@NotNull AnActionEvent e) { setSelectedItem(myFileTypeInfo); if (myUserActionConsumer != null) { myUserActionConsumer.accept(myFileTypeInfo); } } | actionPerformed |
292,410 | FileTypeInfo () { return myFileTypeInfo; } | getFileTypeInfo |
292,411 | LanguageFileType () { return myFileType; } | getFileType |
292,412 | Language () { return myDialect; } | getDialect |
292,413 | PatternContext () { return myContext; } | getContext |
292,414 | boolean () { return myNested; } | isNested |
292,415 | boolean (@NotNull LanguageFileType fileType, @Nullable Language dialect, @Nullable PatternContext context) { return (myFileType == fileType) && (dialect == null || myDialect == dialect) && (context == null || myContext == context); } | isEqualTo |
292,416 | boolean (Object o) { if (this == o) return true; if (!(o instanceof FileTypeInfo info)) return false; return myFileType == info.myFileType && myDialect == info.myDialect && myContext == info.myContext; } | equals |
292,417 | int () { return Objects.hash(myFileType, myDialect, myContext); } | hashCode |
292,418 | String () { return getText(); } | toString |
292,419 | void (@NotNull AnActionEvent e) {} | actionPerformed |
292,420 | JComponent (@NotNull Presentation presentation, @NotNull String place) { return new JLabel(myText); } | createCustomComponent |
292,421 | Result (char c, @NotNull Project project, @NotNull Editor editor, @NotNull PsiFile file) { if (editor.getUserData(SubstitutionShortInfoHandler.CURRENT_CONFIGURATION_KEY) == null) { return Result.CONTINUE; } if (c == '$') { final SelectionModel selectionModel = editor.getSelectionModel(); final String selectedText = sel... | beforeSelectionRemoved |
292,422 | boolean (CharSequence text, int start, int end) { boolean $ = false; for (int i = start; i < end; i++) { if (text.charAt(i) == '$') { $ = !$; } } return $; } | hasOddDollar |
292,423 | UIState () { return ApplicationManager.getApplication().getService(UIState.class); } | getInstance |
292,424 | UIState () { return this; } | getState |
292,425 | void (@NotNull UIState state) { XmlSerializerUtil.copyBean(state, this); if (!migrated) { final PropertiesComponent properties = PropertiesComponent.getInstance(); filtersVisible = properties.getBoolean("structural.search.filters.visible", true); existingTemplatesVisible = properties.getBoolean("structural.search.templ... | loadState |
292,426 | void (@NotNull EditorMouseEvent e) { handleInputFocusMovement(e.getLogicalPosition(), false); } | mouseMoved |
292,427 | void (LogicalPosition position, boolean caret) { final Configuration configuration = editor.getUserData(CURRENT_CONFIGURATION_KEY); if (configuration == null) { return; } final Document document = editor.getDocument(); final int lineCount = document.getLineCount(); if (position.line >= lineCount) { return; } final int ... | handleInputFocusMovement |
292,428 | void () { final Document document = editor.getDocument(); if (modificationTimeStamp != document.getModificationStamp()) { variables.clear(); variables.addAll(TemplateImplUtil.parseVariableNames(document.getCharsSequence())); modificationTimeStamp = document.getModificationStamp(); updateEditorInlays(); } } | checkModelValidity |
292,429 | void (@NotNull CaretEvent e) { handleInputFocusMovement(e.getNewPosition(), true); } | caretPositionChanged |
292,430 | void (@NotNull DocumentEvent event) { // to handle backspace & delete (backspace strangely is not reported to the caret listener) handleInputFocusMovement(editor.getCaretModel().getLogicalPosition(), true); updateEditorInlays(); } | documentChanged |
292,431 | List<String> () { checkModelValidity(); return variables; } | getVariables |
292,432 | SubstitutionShortInfoHandler (Editor editor) { return editor == null ? null : editor.getUserData(LISTENER_KEY); } | retrieve |
292,433 | void (Editor editor, ShortFilterTextProvider provider, Disposable disposable) { install(editor, provider, null, disposable, false); } | install |
292,434 | void (Editor editor, ShortFilterTextProvider provider, @Nullable Consumer<? super String> currentVariableCallback, Disposable disposable, boolean replace) { final SubstitutionShortInfoHandler handler = new SubstitutionShortInfoHandler(editor, provider, replace, currentVariableCallback); editor.addEditorMouseMotionListe... | install |
292,435 | void (Editor editor) { final SubstitutionShortInfoHandler handler = retrieve(editor); if (handler != null) { handler.updateEditorInlays(); } } | updateEditorInlays |
292,436 | void (String text) { myText = text; } | setText |
292,437 | int (@NotNull Inlay inlay) { return getFontMetrics(inlay.getEditor()).stringWidth(myText) + 12; } | calcWidthInPixels |
292,438 | Font () { return UIManager.getFont("Label.font"); } | getFont |
292,439 | FontMetrics (Editor editor) { return editor.getContentComponent().getFontMetrics(getFont()) ; } | getFontMetrics |
292,440 | void (@NotNull Inlay inlay, @NotNull Graphics g, @NotNull Rectangle r, @NotNull TextAttributes textAttributes) { final Editor editor = inlay.getEditor(); final TextAttributes attributes = editor.getColorsScheme().getAttributes(DefaultLanguageHighlighterColors.INLINE_PARAMETER_HINT); if (attributes == null) { return; } ... | paint |
292,441 | ReplaceOptions () { throw new IllegalStateException(); } | getReplaceOptions |
292,442 | SearchConfiguration () { return new SearchConfiguration(this); } | copy |
292,443 | MatchOptions () { return matchOptions; } | getMatchOptions |
292,444 | NamedScriptableDefinition (@NotNull String name) { return matchOptions.getVariableConstraint(name); } | findVariable |
292,445 | void () { matchOptions.removeUnusedVariables(); } | removeUnusedVariables |
292,446 | void (Element element) { super.readExternal(element); matchOptions.readExternal(element); } | readExternal |
292,447 | void (Element element) { super.writeExternal(element); matchOptions.writeExternal(element); } | writeExternal |
292,448 | boolean (Object o) { if (this == o) return true; if (!(o instanceof SearchConfiguration)) return false; if (!super.equals(o)) return false; return matchOptions.equals(((SearchConfiguration)o).matchOptions); } | equals |
292,449 | int () { return 31 * super.hashCode() + matchOptions.hashCode(); } | hashCode |
292,450 | String (@NotNull Configuration configuration) { configuration = configuration.copy(); configuration.getMatchOptions().setScope(null); // don't export scope final String className = configuration.getClass().getSimpleName(); final Element element = new Element(Character.toLowerCase(className.charAt(0)) + className.substr... | toXml |
292,451 | void (@NotNull CompletionParameters parameters, @NotNull CompletionResultSet result) { final StructuralSearchDialog dialog = parameters.getEditor().getUserData(StructuralSearchDialogKeys.STRUCTURAL_SEARCH_DIALOG); if (dialog == null) { final Boolean test = parameters.getEditor().getUserData(StructuralSearchDialogKeys.T... | fillCompletionVariants |
292,452 | void (@NotNull JList<? extends Configuration> list, Configuration value, int index, boolean selected, boolean hasFocus) { final MatchOptions matchOptions = value.getMatchOptions(); final LanguageFileType fileType = matchOptions.getFileType(); setIcon((fileType == null) ? AllIcons.FileTypes.Unknown : fileType.getIcon())... | customize |
292,453 | void (char c, @NotNull PsiFile file, @NotNull Editor editor) {} | beforeCharDeleted |
292,454 | boolean (char c, @NotNull PsiFile file, @NotNull Editor editor) { if (editor.getUserData(SubstitutionShortInfoHandler.CURRENT_CONFIGURATION_KEY) == null || !CodeInsightSettings.getInstance().AUTOINSERT_PAIR_BRACKET) { return false; } if (c == '$') { final Document document = editor.getDocument(); final CharSequence tex... | charDeleted |
292,455 | void (@Nullable Consumer<? super String> consumer) { myConsumer = consumer; } | setItemConsumer |
292,456 | void (@NotNull Collection<String> items) { if (items.isEmpty()) throw new IllegalArgumentException("items needs to contain at least one item"); myItems.clear(); myItems.addAll(items); if (!myItems.contains(mySelectedItem)) { setSelectedItem(myDefaultItem != null ? myDefaultItem : myItems.get(0)); } } | setItems |
292,457 | void (@NotNull JLabel label) { label.setLabelFor(this); label.getActionMap().put("release" /* BasicLabelUI.Actions.RELEASE */, new AbstractAction() { @Override public void actionPerformed(ActionEvent event) { doClick(); } }); } | setLabel |
292,458 | void (ActionEvent event) { doClick(); } | actionPerformed |
292,459 | String () { return mySelectedItem; } | getSelectedItem |
292,460 | void (@NlsContexts.Label String selectedItem) { if (!myItems.contains(selectedItem)) throw new IllegalArgumentException("selected item is not contained in items"); mySelectedItem = selectedItem; setText(selectedItem); } | setSelectedItem |
292,461 | void (@NlsContexts.Label String defaultItem) { myDefaultItem = defaultItem; setText(defaultItem); } | setDefaultItem |
292,462 | int () { return myItems.indexOf(mySelectedItem); } | getDefaultOptionIndex |
292,463 | StructuralSearchTemplateBuilder () { return ApplicationManager.getApplication().getService(StructuralSearchTemplateBuilder.class); } | getInstance |
292,464 | boolean (@NotNull HighlightInfo highlightInfo, @Nullable PsiFile file) { if (file == null) { return true; } final Document document = PsiDocumentManager.getInstance(file.getProject()).getDocument(file); if (document == null) { return true; } final String contextId = document.getUserData(StructuralSearchDialogKeys.STRUC... | accept |
292,465 | PsiErrorElement (PsiFile file, int offset, String description) { final List<PsiErrorElement> errorList = ERRORS.get(file, findErrors(file)); for (PsiErrorElement element : errorList) { if (element.getTextOffset() == offset && description.equals(element.getErrorDescription())) { return element; } } return null; } | findErrorElementAt |
292,466 | List<PsiErrorElement> (PsiFile file) { final Collection<PsiErrorElement> errors = PsiTreeUtil.findChildrenOfType(file, PsiErrorElement.class); final List<PsiErrorElement> errorList = new ArrayList<>(errors); errorList.sort(ERROR_COMPARATOR); file.putUserData(ERRORS, errorList); return errorList; } | findErrors |
292,467 | Editor (@NotNull Document doc, Project project, boolean editable, @Nullable TemplateContextType contextType) { final Editor editor = editable ? EditorFactory.getInstance().createEditor(doc, project) : EditorFactory.getInstance().createViewer(doc, project); final EditorSettings editorSettings = editor.getSettings(); edi... | createEditor |
292,468 | void (@NotNull final Editor editor, String text) { final String value = text != null ? text : ""; final Document document = editor.getDocument(); WriteCommandAction.runWriteCommandAction(editor.getProject(), SSRBundle.message("modify.editor.content.command.name"), SS_GROUP, () -> document.replaceString(0, document.getT... | setContent |
292,469 | void (@NotNull EditorTextField editor, @NotNull String text) { final Document document = editor.getDocument(); WriteCommandAction.runWriteCommandAction(editor.getProject(), SSRBundle.message("modify.editor.content.command.name"), SS_GROUP, () -> document.replaceString(0, document.getTextLength(), text)); } | setContent |
292,470 | void (@NotNull Configuration config, @NotNull SearchContext context) { StructuralSearchAction.triggerAction(config, context, !(config instanceof SearchConfiguration)); } | invokeAction |
292,471 | MatchVariableConstraint (@NotNull String varName, @NotNull Configuration configuration) { final MatchOptions options = configuration.getMatchOptions(); final MatchVariableConstraint varInfo = options.getVariableConstraint(varName); if (varInfo != null) { return varInfo; } return configuration.getMatchOptions().addNewVa... | getOrAddVariableConstraint |
292,472 | ReplacementVariableDefinition (@NotNull String varName, @NotNull Configuration configuration) { final ReplaceOptions replaceOptions = configuration.getReplaceOptions(); ReplacementVariableDefinition definition = replaceOptions.getVariableDefinition(varName); if (definition != null) { return definition; } return replace... | getOrAddReplacementVariable |
292,473 | boolean (@NotNull String varName, @NotNull MatchOptions matchOptions) { if (Configuration.CONTEXT_VAR_NAME.equals(varName)) { // Complete Match is default target for (String name : matchOptions.getVariableConstraintNames()) { if (!name.equals(Configuration.CONTEXT_VAR_NAME)) { if (matchOptions.getVariableConstraint(nam... | isTarget |
292,474 | EditorTextField (@NotNull String text, @NotNull Project project) { return createEditorComponent(text, "1.txt", project); } | createTextComponent |
292,475 | EditorTextField (@NotNull String text, @NotNull Project project) { return createEditorComponent(text, "1.regexp", project); } | createRegexComponent |
292,476 | EditorTextField (@NotNull String text, @NotNull Project project) { return createEditorComponent(text, "1.groovy", project); } | createScriptComponent |
292,477 | EditorTextField (@NotNull String text, @NotNull String fileName, @NotNull Project project) { final FileType fileType = getFileType(fileName); final Document document = createDocument(fileType, text, project); return new EditorTextField(document, project, fileType); } | createEditorComponent |
292,478 | Document (@NotNull FileType fileType, @NotNull String text, @NotNull Project project) { final PsiFile file = PsiFileFactory.getInstance(project).createFileFromText("Dummy." + fileType.getDefaultExtension(), fileType, text, -1, true); final Document document = PsiDocumentManager.getInstance(project).getDocument(file); a... | createDocument |
292,479 | FileType (@NotNull String fileName) { FileType fileType = FileTypeManager.getInstance().getFileTypeByFileName(fileName); if (fileType == FileTypes.UNKNOWN) fileType = FileTypes.PLAIN_TEXT; return fileType; } | getFileType |
292,480 | LanguageFileType (@NotNull SearchContext searchContext) { final PsiFile file = searchContext.getFile(); PsiElement context = null; final Editor editor = searchContext.getEditor(); if (editor != null && file != null) { final int offset = editor.getCaretModel().getOffset(); context = InjectedLanguageManager.getInstance(s... | detectFileType |
292,481 | Document (@NotNull Project project, @Nullable LanguageFileType fileType, Language dialect, PatternContext patternContext, @NotNull String text, @Nullable StructuralSearchProfile profile) { if (fileType != null && profile != null) { final String contextId = (patternContext == null) ? null : patternContext.getId(); PsiFi... | createDocument |
292,482 | Editor (@NotNull Project project, @NotNull LanguageFileType fileType, Language dialect, @NotNull String text, boolean editable, @NotNull StructuralSearchProfile profile) { PsiFile codeFragment = profile.createCodeFragment(project, text, null); if (codeFragment == null) { codeFragment = createFileFragment(project, fileT... | createEditor |
292,483 | PsiFile (@NotNull Project project, @NotNull LanguageFileType fileType, Language dialect, @NotNull String text) { final String name = "__dummy." + fileType.getDefaultExtension(); final PsiFileFactory factory = PsiFileFactory.getInstance(project); return dialect == null ? factory.createFileFromText(name, fileType, text, ... | createFileFragment |
292,484 | TemplateContextType (@NotNull StructuralSearchProfile profile) { final Class<? extends TemplateContextType> clazz = profile.getTemplateContextTypeClass(); return TemplateContextTypes.getByClass(clazz); } | getTemplateContextType |
292,485 | UsageViewContext () { final Runnable searchStarter = () -> new SearchCommand(myConfiguration, mySearchContext).startSearching(); return new UsageViewContext(myConfiguration, mySearchContext, searchStarter); } | createUsageViewContext |
292,486 | void () { final UsageViewContext context = createUsageViewContext(); final UsageViewPresentation presentation = new UsageViewPresentation(); presentation.setOpenInNewTab(FindSettings.getInstance().isShowResultsInSeparateView()); context.configure(presentation); myProcessPresentation = new FindUsagesProcessPresentation(... | startSearching |
292,487 | void (@NotNull UsageView usageView) { context.setUsageView(usageView); context.configureActions(); } | usageViewCreated |
292,488 | void (final UsageView usageView) {} | findingUsagesFinished |
292,489 | void (@NotNull Processor<? super Usage> processor) { final ProgressIndicator progress = ProgressManager.getInstance().getProgressIndicator(); progress.setIndeterminate(false); final MatchResultSink sink = new MatchResultSink() { int count; @Override public void setMatchingProcess(@NotNull MatchingProcess _process) { fi... | findUsages |
292,490 | void (@NotNull MatchingProcess _process) { findStarted(); } | setMatchingProcess |
292,491 | void (@NotNull PsiFile element) { final VirtualFile virtualFile = element.getVirtualFile(); if (virtualFile != null) progress.setText(SSRBundle.message("looking.in.progress.message", virtualFile.getPresentableName())); } | processFile |
292,492 | void () { if (mySearchContext.getProject().isDisposed()) return; findEnded(); progress.setText(SSRBundle.message("found.progress.message", count)); } | matchingFinished |
292,493 | ProgressIndicator () { return progress; } | getProgressIndicator |
292,494 | void (@NotNull MatchResult result) { UsageInfo info; if (MatchResult.MULTI_LINE_MATCH.equals(result.getName())) { int start = -1; int end = -1; PsiElement parent = result.getMatch().getParent(); for (final MatchResult matchResult : result.getChildren()) { PsiElement el = matchResult.getMatch(); final int elementStart =... | newMatch |
292,495 | void () {} | findStarted |
292,496 | void () {} | findEnded |
292,497 | void (MatchResult result, Usage usage) {} | foundUsage |
292,498 | PsiFile () { return myFile; } | getFile |
292,499 | Project () { return myProject; } | getProject |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.