Unnamed: 0 int64 0 305k | body stringlengths 7 52.9k | name stringlengths 1 185 |
|---|---|---|
30,200 | void (@NotNull GrImportStatement statement) { if (!myOptions.skipImports()) { visitElement(statement); } } | visitImportStatement |
30,201 | void (@NotNull GrDocComment comment) {} | visitDocComment |
30,202 | void (@NotNull GrLiteral literal) {} | visitLiteralExpression |
30,203 | OptPane () { return pane( number("m_limit", InspectionGadgetsBundle.message("overly.complex.arithmetic.expression.max.number.option"), 2, 100)); } | getGroovyOptionsPane |
30,204 | void (@NotNull Project project, @NotNull PsiElement startElement, @NotNull ModPsiUpdater updater) { LOG.assertTrue(startElement instanceof GrReferenceElement<?>); GrReferenceAdjuster.shortenReference((GrQualifiedReference<?>)startElement); } | applyFix |
30,205 | String () { return GroovyBundle.message("replace.qualified.name.with.import"); } | getFamilyName |
30,206 | OptPane () { return pane( number("m_limit", InspectionGadgetsBundle.message("overly.complex.boolean.expression.max.terms.option"), 2, 100)); } | getGroovyOptionsPane |
30,207 | LocalQuickFix () { return new MyQuickFix(); } | getFix |
30,208 | String () { return GroovyBundle.message("declare.explicit.implementations.of.trait"); } | getFamilyName |
30,209 | void (@NotNull Project project, @NotNull final ProblemDescriptor descriptor) { PsiElement element = descriptor.getPsiElement(); PsiElement parent = element.getParent(); if (parent instanceof GrTypeDefinition aClass && ((GrTypeDefinition)parent).getNameIdentifierGroovy() == element) { final List<ClashingMethod> clashing... | applyFix |
30,210 | void (@NotNull PsiDocComment comment, @NotNull TokenConsumer consumer) { final CommentSplitter splitter = CommentSplitter.getInstance(); for (PsiElement el : comment.getChildren()) { if (el instanceof PsiDocTag tag) { if (!excludedTags.contains(tag.getName())) { for (PsiElement data : tag.getDataElements()) { consumer.... | tokenize |
30,211 | void (@NotNull PsiElement literal, @NotNull TokenConsumer consumer) { String text = GrStringUtil.removeQuotes(literal.getText()); if (!text.contains("\\")) { consumer.consumeToken(literal, PlainTextSplitter.getInstance()); } else { StringBuilder unescapedText = new StringBuilder(); int[] offsets = new int[text.length()... | tokenize |
30,212 | Tokenizer (PsiElement element) { if (TokenSets.STRING_LITERAL_SET.contains(element.getNode().getElementType())) { return myStringTokenizer; } if (element instanceof GrNamedElement) { final PsiElement name = ((GrNamedElement)element).getNameIdentifierGroovy(); if (TokenSets.STRING_LITERAL_SET.contains(name.getNode().get... | getTokenizer |
30,213 | OptPane () { return pane( number("m_limit", GroovyBundle.message("method.returns.max.returns.option"), 1, 100)); } | getGroovyOptionsPane |
30,214 | OptPane () { return pane( number("m_limit", GroovyBundle.message("method.parameters.count.max.parameters.option"), 1, 255)); } | getGroovyOptionsPane |
30,215 | OptPane () { return pane( number("m_limit", GroovyBundle.message("overly.complex.method.complexity.limit.option"), 1, 1000)); } | getGroovyOptionsPane |
30,216 | OptPane () { return pane( number("m_limit", GroovyBundle.message("overly.nested.method.nesting.limit.option"), 1, 100)); } | getGroovyOptionsPane |
30,217 | OptPane () { return pane( number("m_limit", GroovyBundle.message("overly.long.method.statements.limit.option"), 2, 1000)); } | getGroovyOptionsPane |
30,218 | IntentionPreviewInfo (@NotNull Project project, @NotNull ProblemDescriptor previewDescriptor) { final PsiElement element = previewDescriptor.getPsiElement(); PsiClass psiClass = PsiTreeUtil.getParentOfType(element, PsiClass.class); if (psiClass == null) return IntentionPreviewInfo.EMPTY; String textBefore = psiClass.ge... | generatePreview |
30,219 | String () { return GroovyBundle.message("intention.family.name.rename"); } | getFamilyName |
30,220 | void (@NotNull final Project project, @NotNull ProblemDescriptor descriptor) { final PsiElement element = descriptor.getPsiElement(); doFix(element); } | doFix |
30,221 | RefactoringActionHandler () { return RefactoringActionHandlerFactory.getInstance().createRenameHandler(); } | getHandler |
30,222 | String () { return GroovyBundle.message("remove.parameter.0", myName); } | getText |
30,223 | String () { return GroovyBundle.message("remove.unused.parameter"); } | getFamilyName |
30,224 | boolean (@NotNull Project project, Editor editor, PsiFile file) { PsiElement at = file.findElementAt(editor.getCaretModel().getOffset()); GrParameter parameter = PsiTreeUtil.getParentOfType(at, GrParameter.class); return parameter != null && myName.equals(parameter.getName()); } | isAvailable |
30,225 | GrParameter (Editor editor, PsiFile file) { PsiElement at = file.findElementAt(editor.getCaretModel().getOffset()); GrParameter parameter = PsiTreeUtil.getParentOfType(at, GrParameter.class); if (parameter == null) return null; return parameter; } | getParameter |
30,226 | GrChangeInfoImpl (GrMethod method, GrParameter parameter) { List<GrParameterInfo> params = new ArrayList<>(); int i = 0; for (GrParameter p : method.getParameterList().getParameters()) { if (p != parameter) { params.add(new GrParameterInfo(p, i)); } i++; } GrTypeElement typeElement = method.getReturnTypeElementGroovy()... | createChangeInfo |
30,227 | IntentionPreviewInfo (@NotNull Project project, @NotNull Editor editor, @NotNull PsiFile file) { GrParameter parameter = getParameter(editor, file); if (parameter == null) { return IntentionPreviewInfo.EMPTY; } parameter.delete(); return IntentionPreviewInfo.DIFF; } | generatePreview |
30,228 | boolean () { return false; } | startInWriteAction |
30,229 | String () { return GroovyBundle.message("implement.class", myInterfaceName); } | getName |
30,230 | String () { return GroovyBundle.message("add.class.to.extends.family.name"); } | getFamilyName |
30,231 | String () { return GroovyBundle.message("add.method", myMethodName, myClassName); } | getName |
30,232 | String () { return GroovyBundle.message("add.method.family"); } | getFamilyName |
30,233 | String (GrTypeDefinition aClass) { String className = aClass.getName(); LOG.assertTrue(className != null, aClass); StringBuilder returnType = new StringBuilder(className); final PsiTypeParameter[] typeParameters = aClass.getTypeParameters(); if (typeParameters.length > 0) { returnType.append('<'); for (PsiTypeParameter... | generateTypeText |
30,234 | BaseInspectionVisitor () { return new BaseInspectionVisitor() { @Override public void visitFile(@NotNull GroovyFileBase file) { CompilerConfiguration configuration = CompilerConfiguration.getInstance(file.getProject()); if (configuration != null && !configuration.isResourceFile(file.getVirtualFile()) && fileSeemsToBeTy... | buildVisitor |
30,235 | void (@NotNull GroovyFileBase file) { CompilerConfiguration configuration = CompilerConfiguration.getInstance(file.getProject()); if (configuration != null && !configuration.isResourceFile(file.getVirtualFile()) && fileSeemsToBeTypeCustomizer(file)) { final LocalQuickFix[] fixes = {new AddToResourceFix(file)}; final St... | visitFile |
30,236 | boolean (@NotNull final PsiFile file) { if (file instanceof GroovyFile && ((GroovyFile)file).isScript()) { for (GrStatement statement : ((GroovyFile)file).getStatements()) { if (statement instanceof GrMethodCall) { GrExpression invoked = ((GrMethodCall)statement).getInvokedExpression(); if (invoked instanceof GrReferen... | fileSeemsToBeTypeCustomizer |
30,237 | boolean (@Nullable String name) { return CUSTOMIZER_EVENT_NAMES.contains(name); } | isCustomizerEvent |
30,238 | String () { return GroovyBundle.message("add.to.resources"); } | getName |
30,239 | boolean () { return false; } | startInWriteAction |
30,240 | String () { return GroovyBundle.message("add.type.customizer.to.resources"); } | getFamilyName |
30,241 | void (@NotNull Project project, @NotNull ProblemDescriptor descriptor) { PsiFile file = myFilePointer.getElement(); if (file == null) return; final VirtualFile virtualFile = file.getVirtualFile(); if (virtualFile == null) return; final ProjectFileIndex fileIndex = ProjectRootManager.getInstance(project).getFileIndex();... | applyFix |
30,242 | OptPane () { return pane( number("m_limit", InspectionGadgetsBundle.message("if.statement.with.too.many.branches.max.option"), 2, 100)); } | getGroovyOptionsPane |
30,243 | GlobalSearchScope (@NotNull VirtualFile file, @NotNull Project project) { final GroovyConsoleStateService projectConsole = GroovyConsoleStateService.getInstance(project); final Module module = projectConsole.getSelectedModule(file); if (module == null || module.isDisposed()) return null; GlobalSearchScope moduleScope =... | getResolveScope |
30,244 | void (Project project, Consumer<Module> consumer) { ModuleChooserUtil.selectModule(project, getApplicableModules(project), GroovyConsoleUtil::getDisplayGroovyVersion, consumer); } | selectModuleAndRun |
30,245 | void (@NotNull AnActionEvent e) { final Project project = e.getProject(); final Editor editor = e.getData(CommonDataKeys.EDITOR); final VirtualFile virtualFile = e.getData(CommonDataKeys.VIRTUAL_FILE); if (project == null || editor == null || virtualFile == null) return; FileDocumentManager.getInstance().saveAllDocumen... | actionPerformed |
30,246 | GroovyConsoleRootType () { return findByClass(GroovyConsoleRootType.class); } | getInstance |
30,247 | String () { return GroovyFileType.DEFAULT_EXTENSION; } | getDefaultFileExtension |
30,248 | boolean (@NotNull Project project, @NotNull VirtualFile element) { return !GroovyConsoleStateService.getInstance(project).isProjectConsole(element); } | isIgnored |
30,249 | String (@NotNull String id) { assert id.equals(CONTENT_ID); return CONTENT_ID; } | getContentPathName |
30,250 | void (@NotNull final VirtualFile file, @NotNull FileEditorManager source) { for (FileEditor fileEditor : source.getAllEditors(file)) { if (!(fileEditor instanceof TextEditor)) continue; EXECUTE_ACTION.registerCustomShortcutSet(CommonShortcuts.CTRL_ENTER, fileEditor.getComponent()); } } | fileOpened |
30,251 | ActionUpdateThread () { return ActionUpdateThread.BGT; } | getActionUpdateThread |
30,252 | void (@NotNull AnActionEvent e) { e.getPresentation().setEnabled(isEnabled()); } | update |
30,253 | boolean () { if (myModule == null || myModule.isDisposed()) return false; final ProcessHandler processHandler = myContentDescriptor.getProcessHandler(); if (processHandler == null || processHandler.isProcessTerminated()) return false; return true; } | isEnabled |
30,254 | void (@NotNull AnActionEvent e) { if (RunContentManager.getInstance(myProject).removeRunContent(myExecutor, myContentDescriptor)) { CompilerManager.getInstance(myProject).compile(myModule, new CompileStatusNotification() { @Override public void finished(boolean aborted, int errors, int warnings, @NotNull CompileContext... | actionPerformed |
30,255 | void (boolean aborted, int errors, int warnings, @NotNull CompileContext compileContext) { if (!myModule.isDisposed()) { myRestarter.consume(myModule); } } | finished |
30,256 | void (@NotNull String command) { for (String line : command.trim().split("\n")) { myConsoleView.print("> ", ConsoleViewContentType.USER_INPUT); myConsoleView.print(line, ConsoleViewContentType.USER_INPUT); myConsoleView.print("\n", ConsoleViewContentType.NORMAL_OUTPUT); } ApplicationManager.getApplication().executeOnPo... | doExecute |
30,257 | void (@NotNull String command) { if (!StringUtil.isEmptyOrSpaces(command)) { doExecute(command); } RunContentManager.getInstance(myProject).toFrontRunContent(defaultExecutor, myContentDescriptor); } | execute |
30,258 | void () { myProcessHandler.destroyProcess(); // use force } | stop |
30,259 | void (@NotNull ProcessHandler processHandler, @NotNull String command) { final OutputStream outputStream = processHandler.getProcessInput(); assert outputStream != null : "output stream is null"; final Charset charset = processHandler instanceof BaseOSProcessHandler ? ((BaseOSProcessHandler)processHandler).getCharset()... | send |
30,260 | void (@NotNull VirtualFile contentFile) { GroovyConsole console = removeUserData(contentFile, GROOVY_CONSOLE); if (console != null) { console.stop(); } } | stopConsole |
30,261 | void (@NotNull final Project project, @NotNull final VirtualFile contentFile, @NotNull final Consumer<? super GroovyConsole> callback) { final GroovyConsole existingConsole = contentFile.getUserData(GROOVY_CONSOLE); if (existingConsole != null) { callback.consume(existingConsole); return; } final Consumer<Module> initi... | getOrCreateConsole |
30,262 | GroovyConsole (@NotNull final Project project, @NotNull final VirtualFile contentFile, @NotNull Module module) { final ProcessHandler processHandler = createProcessHandler(module); if (processHandler == null) return null; final ConsoleViewImpl consoleView = new GroovyConsoleView(project); final RunContentDescriptor des... | createConsole |
30,263 | void (@NotNull AnActionEvent e) { processHandler.destroyProcess(); // use force super.actionPerformed(e); } | actionPerformed |
30,264 | void (@NotNull ProcessEvent event) { if (contentFile.getUserData(GROOVY_CONSOLE) == console) { // process terminated either by closing file or by close action contentFile.putUserData(GROOVY_CONSOLE, null); } } | processTerminated |
30,265 | ProcessHandler (Module module) { try { final JavaParameters javaParameters = createJavaParameters(module); final GeneralCommandLine commandLine = javaParameters.toCommandLine(); return new ColoredProcessHandler(commandLine) { @Override protected @NotNull BaseOutputReader.Options readerOptions() { return BaseOutputReade... | createProcessHandler |
30,266 | boolean () { return true; } | isSilentlyDestroyOnClose |
30,267 | boolean (@NotNull JavaParameters res) { Sdk jdk = res.getJdk(); if (jdk == null) { return false; } String rootPath = jdk.getHomePath(); if (rootPath == null) { return false; } return JdkUtil.isModularRuntime(rootPath); } | useArgsFile |
30,268 | Consumer<Module> (final Project project, final VirtualFile file) { return module -> createConsole(project, file, module); } | restarter |
30,269 | ASTNode (ASTNode node) { IElementType elementType = node.getElementType(); if (elementType == GroovyElementTypes.CLOSABLE_BLOCK) { PsiElement rBrace = ((GrClosableBlock)node.getPsi()).getRBrace(); return rBrace != null ? rBrace.getNode() : null; } ASTNode lastChild = node.getLastChildNode(); while (lastChild != null &&... | getClosureRBraceAtTheEnd |
30,270 | boolean (PsiElement e) { return e != null && e.getNode().getElementType() == GroovyTokenTypes.mRCURLY && e.getParent() instanceof GrClosableBlock && ((GrClosableBlock)e.getParent()).getRBrace() == e; } | isClosureRBrace |
30,271 | PsiElement (PsiElement e) { PsiElement next = PsiTreeUtil.nextLeaf(e); while (next != null && next.getNode().getElementType() == TokenType.WHITE_SPACE) next = PsiTreeUtil.nextLeaf(next); return next; } | getNextNonWhitespaceToken |
30,272 | void (PsiElement rBrace, AlignmentProvider alignments) { int leadingBraceCount = 0; PsiElement next; if (!isClosureContainLF(rBrace)) return; for (next = PsiUtil.getPreviousNonWhitespaceToken(rBrace); isClosureRBrace(next) && isClosureContainLF(next); next = PsiUtil.getPreviousNonWhitespaceToken(next)) { leadingBraceCo... | calculateRBraceAlignment |
30,273 | boolean (PsiElement rBrace) { PsiElement parent = rBrace.getParent(); return parent.getText().indexOf('\n') >= 0; } | isClosureContainLF |
30,274 | PsiElement (@NotNull PsiElement source, @NotNull CodeStyleSettings settings) { if (source instanceof GroovyPsiElement) { return new GroovyBraceEnforcer(settings).process(((GroovyPsiElement)source)); } else { return source; } } | processElement |
30,275 | TextRange (@NotNull PsiFile source, @NotNull TextRange rangeToReformat, @NotNull CodeStyleSettings settings) { if (source instanceof GroovyFile) { return new GroovyBraceEnforcer(settings).processText(((GroovyFile)source), rangeToReformat); } else { return rangeToReformat; } } | processText |
30,276 | boolean (@NotNull ASTNode node) { return node.getElementType() == GroovyTokenTypes.mNLS; } | containsWhitespacesOnly |
30,277 | FormattingModel (com.intellij.formatting.@NotNull FormattingContext formattingContext) { PsiFile containingFile = formattingContext.getContainingFile().getViewProvider().getPsi(GroovyLanguage.INSTANCE); assert containingFile != null; ASTNode astNode = containingFile.getNode(); assert astNode != null; CodeStyleSettings ... | createModel |
30,278 | void (@NotNull PsiElement element) { if (GeeseUtil.isClosureRBrace(element)) { GeeseUtil.calculateRBraceAlignment(element, alignments); } else { super.visitElement(element); } } | visitElement |
30,279 | String (TextRange textRange, String whiteSpace, ASTNode leafElement) { if (!myCanModifyAllWhiteSpaces) { if (PsiImplUtil.isWhiteSpaceOrNls(leafElement)) return null; } IElementType elementTypeToUse = TokenType.WHITE_SPACE; ASTNode prevNode = TreeUtil.prevLeaf(leafElement); if (prevNode != null && PsiImplUtil.isWhiteSpa... | replaceWithPsiInLeaf |
30,280 | TextRange (final GroovyFile source, final TextRange rangeToReformat) { myPostProcessor.setResultTextRange(rangeToReformat); source.accept(this); return myPostProcessor.getResultTextRange(); } | processText |
30,281 | PsiElement (GroovyPsiElement formatted) { LOG.assertTrue(formatted.isValid()); formatted.accept(this); return formatted; } | process |
30,282 | void (@NotNull GrStatement statement, GrStatement blockCandidate) { if (!statement.isValid()) { LOG.assertTrue(false); } if (!checkRangeContainsElement(blockCandidate)) return; final PsiManager manager = statement.getManager(); LOG.assertTrue(manager != null); GroovyPsiElementFactory factory = GroovyPsiElementFactory.g... | replaceWithBlock |
30,283 | void (ASTNode newChild, ASTNode parent) { ASTNode semi = newChild.getTreeNext(); while (semi != null && semi.getElementType() == TokenType.WHITE_SPACE && !semi.getText().contains("\n")) { semi = semi.getTreeNext(); } if (semi != null && semi.getElementType() == GroovyTokenTypes.mSEMI) { parent.removeRange(newChild.getT... | removeTailSemicolon |
30,284 | void (final int oldTextLength, final int newTextLength) { myPostProcessor.updateResultRange(oldTextLength, newTextLength); } | updateResultRange |
30,285 | boolean (final PsiElement element) { return myPostProcessor.isElementPartlyInRange(element); } | checkElementContainsRange |
30,286 | boolean (final PsiElement element) { return myPostProcessor.isElementFullyInRange(element); } | checkRangeContainsElement |
30,287 | void (GrStatement statement, @Nullable GrStatement blockCandidate, int options) { if (blockCandidate instanceof GrCodeBlock || blockCandidate instanceof GrBlockStatement || blockCandidate == null) return; if (options == CommonCodeStyleSettings.FORCE_BRACES_ALWAYS || options == CommonCodeStyleSettings.FORCE_BRACES_IF_MU... | processStatement |
30,288 | void (@NotNull GrIfStatement statement) { if (checkElementContainsRange(statement)) { final SmartPsiElementPointer pointer = SmartPointerManager.getInstance(statement.getProject()).createSmartPsiElementPointer(statement); super.visitIfStatement(statement); statement = (GrIfStatement)pointer.getElement(); if (statement ... | visitIfStatement |
30,289 | void (@NotNull GrForStatement statement) { if (checkElementContainsRange(statement)) { super.visitForStatement(statement); processStatement(statement, statement.getBody(), myPostProcessor.getSettings().FOR_BRACE_FORCE); } } | visitForStatement |
30,290 | void (@NotNull GrWhileStatement statement) { if (checkElementContainsRange(statement)) { super.visitWhileStatement(statement); processStatement(statement, statement.getBody(), myPostProcessor.getSettings().WHILE_BRACE_FORCE); } } | visitWhileStatement |
30,291 | void (@NotNull GrDoWhileStatement statement) { if (checkElementContainsRange(statement)) { super.visitDoWhileStatement(statement); processStatement(statement, statement.getBody(), myPostProcessor.getSettings().DOWHILE_BRACE_FORCE); } } | visitDoWhileStatement |
30,292 | void (@NotNull PsiElement e1, @NotNull PsiElement e2, boolean allowBackwardShift) { Aligner aligner = createAligner(allowBackwardShift); aligner.append(e1); aligner.append(e2); } | addPair |
30,293 | Alignment (@NotNull PsiElement e) { Aligner aligner = myElement2Aligner.get(e); return aligner == null ? null : aligner.getAlignment(); } | getAlignment |
30,294 | Aligner (boolean allowBackwardShift) { return new Aligner(allowBackwardShift, Alignment.Anchor.LEFT); } | createAligner |
30,295 | Aligner (PsiElement element, boolean allowBackwardShift, Alignment.Anchor anchor) { final Aligner aligner = new Aligner(allowBackwardShift, anchor); aligner.append(element); return aligner; } | createAligner |
30,296 | void (@Nullable PsiElement element) { if (element == null) return; assert !myElement2Aligner.containsKey(element) || myElement2Aligner.get(element) == this; myElement2Aligner.put(element, this); } | append |
30,297 | Alignment () { return myAlignment.getValue(); } | getAlignment |
30,298 | CommonCodeStyleSettings () { return mySettings; } | getSettings |
30,299 | AlignmentProvider () { return myAlignmentProvider; } | getAlignmentProvider |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.