Unnamed: 0 int64 0 305k | body stringlengths 7 52.9k | name stringlengths 1 185 |
|---|---|---|
69,800 | String (String s) { return StringUtil.nullize(s, true); } | convertString |
69,801 | String (String directory) { if (directory.length() == 0) { return null; } return directory.replace(File.separatorChar, '/'); } | toSystemIndependentFormat |
69,802 | String () { return null; } | getDisplayName |
69,803 | String () { return "project.propJavaDoc"; } | getHelpTopic |
69,804 | String () { return myPanel.myTfOutputDir.getText(); } | getOutputDir |
69,805 | JTextField () { return myPanel.myTfOutputDir.getTextField(); } | getOutputDirField |
69,806 | void (@NotNull Project project, @NotNull AnalysisScope scope) { myConfigurable.apply(); JavadocGenerationManager.getInstance(project).generateJavadoc(scope); dispose(); } | analyze |
69,807 | JComponent (@NotNull Project project, @NotNull BaseAnalysisActionDialog dialog) { myConfigurable = new JavadocConfigurable(JavadocGenerationManager.getInstance(project).getConfiguration(), project); JComponent component = myConfigurable.createComponent(); myConfigurable.reset(); // Output field validation final JTextFi... | getAdditionalActionSettings |
69,808 | void (@NotNull DocumentEvent e) { ComponentValidator.getInstance(outputField).ifPresent(v -> v.revalidate()); } | textChanged |
69,809 | void () { super.canceled(); dispose(); } | canceled |
69,810 | void () { if (myConfigurable != null) { myConfigurable.disposeUIResources(); myConfigurable = null; } } | dispose |
69,811 | String () { return JavaBundle.message("javadoc.generate.title"); } | getDialogTitle |
69,812 | String () { return "reference.dialogs.generate.javadoc"; } | getHelpTopic |
69,813 | BaseAnalysisActionDialog (Project project, String title, String scopeTitle, boolean rememberScope, AnalysisUIOptions uiOptions, List<? extends ModelScopeItem> items) { return new BaseAnalysisActionDialog(title, scopeTitle, project, items, uiOptions, rememberScope) { @Override protected JComponent getAdditionalActionSet... | getAnalysisDialog |
69,814 | JComponent (@NotNull Project project) { return GenerateJavadocAction.this.getAdditionalActionSettings(project, this); } | getAdditionalActionSettings |
69,815 | void () { ComponentValidator.getInstance(myConfigurable.getOutputDirField()) .ifPresentOrElse(v -> { v.revalidate(); if (v.getValidationInfo() == null) super.doOKAction(); }, () -> { super.doOKAction(); }); } | doOKAction |
69,816 | String () { return getHelpTopic(); } | getHelpId |
69,817 | String () { return JavaBundle.message("javadoc.generate.ok"); } | getOKButtonText |
69,818 | String () { return getFamilyName(); } | getText |
69,819 | String () { return JavaBundle.message("quickfix.name.find.jar.on.web"); } | getFamilyName |
69,820 | boolean (@NotNull Project project, Editor editor, PsiFile file) { if (isPsiModificationStampChanged()) return false; return javaLangObjectResolved && myModule != null && allFqnsAreUnresolved; } | isAvailable |
69,821 | boolean (@NotNull Project project, @NotNull List<String> fqns) { if (fqns.isEmpty()) return false; JavaPsiFacade facade = JavaPsiFacade.getInstance(project); GlobalSearchScope scope = GlobalSearchScope.allScope(project); return ContainerUtil.all(fqns, fqn -> facade.findClass(fqn, scope) == null); } | allFqnsAreUnresolved |
69,822 | void (@NlsSafe String fqn, @NotNull Editor editor) { ProgressManager.getInstance().run(new Task.Modal(editor.getProject(), JavaBundle.message("progress.title.looking.for.libraries"), true) { final Map<String, String> libs = new HashMap<>(); @Override public void run(@NotNull ProgressIndicator indicator) { try { String ... | findJarsForFqn |
69,823 | void (@NotNull ProgressIndicator indicator) { try { String html = HttpRequests.request(CLASS_ROOT_URL + fqn.replace('.', '/') + CLASS_PAGE_EXT).readString(indicator); indicator.checkCanceled(); Matcher matcher = URLUtil.HREF_PATTERN.matcher(html); if (!matcher.find()) { return; } do { indicator.checkCanceled(); String ... | run |
69,824 | void () { if (libs.isEmpty()) { HintManager.getInstance().showInformationHint(editor, JavaBundle.message("find.jar.hint.text.no.libraries.found.for.fqn", fqn)); } else { JBList<@NlsSafe String> libNames = new JBList<>(ContainerUtil.sorted(libs.keySet())); libNames.installCellRenderer(o -> new JLabel(o, PlatformIcons.JA... | onSuccess |
69,825 | void (@NotNull String url, @NotNull String jarName, @Nullable Project project) { ProgressManager.getInstance().run(new Task.Modal(project, JavaBundle.message("progress.title.download.library.descriptor"), true) { private String jarUrl; @Override public void run(@NotNull ProgressIndicator indicator) { try { String html ... | initiateDownload |
69,826 | void (@NotNull ProgressIndicator indicator) { try { String html = HttpRequests.request(url).readString(indicator); indicator.checkCanceled(); Matcher matcher = URLUtil.HREF_PATTERN.matcher(html); if (!matcher.find()) { return; } do { indicator.checkCanceled(); String jarUrl = matcher.group(1); if (jarUrl != null && jar... | run |
69,827 | void () { if (jarUrl != null) { downloadJar(jarUrl, jarName); } } | onSuccess |
69,828 | void (@NotNull String jarUrl, @NotNull String jarName) { Project project = myModule.getProject(); String dirPath = PropertiesComponent.getInstance(project).getValue(FIND_JAR_LAST_USED_DIR_PROPERTY); VirtualFile toSelect = dirPath == null ? null : LocalFileSystem.getInstance().findFileByIoFile(new File(dirPath)); FileCh... | downloadJar |
69,829 | List<String> (@NotNull PsiQualifiedReferenceElement ref) { Collection<String> fqns = getFqns(ref); List<String> res = new ArrayList<>(fqns.size()); for (String fqn : fqns) { if (fqn.startsWith("java.") || fqn.startsWith("javax.swing.")) { continue; } int index = fqn.lastIndexOf('.'); if (index == -1) { continue; } Stri... | getPossibleFqns |
69,830 | boolean () { return false; } | startInWriteAction |
69,831 | Icon (int flags) { return PlatformIcons.WEB_ICON; } | getIcon |
69,832 | List<Element> (@NotNull String expression, @NotNull Element element) { return XPathFactory.instance() .compile(expression, Filters.element()) .evaluate(element); } | findElements |
69,833 | String (@NotNull VirtualFile classesJar, String artifactId) { try (JarFile jarFile = new JarFile(VfsUtilCore.virtualToIoFile(classesJar))) { final Enumeration<JarEntry> entries = jarFile.entries(); while (entries.hasMoreElements()) { JarEntry entry = entries.nextElement(); final String name = entry.getName(); if (Strin... | findMavenGroupId |
69,834 | void (@NotNull PsiJavaCodeReferenceElement ref, @NotNull QuickFixActionRegistrar registrar) { if (!PsiUtil.isModuleFile(ref.getContainingFile())) { registrar.register(new JavaFindJarFix(ref)); } } | registerFixes |
69,835 | Class<PsiJavaCodeReferenceElement> () { return PsiJavaCodeReferenceElement.class; } | getReferenceClass |
69,836 | Collection<String> (@NotNull PsiQualifiedReferenceElement ref) { PsiImportStatementBase importStatement = PsiTreeUtil.getParentOfType(ref.getElement(), PsiImportStatementBase.class); //from static imports if (importStatement != null) { if (importStatement instanceof PsiImportStatement) { String importFQN = ((PsiImportS... | getFqns |
69,837 | FileTemplateDescriptor (@NotNull TestFramework framework) { return framework.getSetUpMethodFileTemplateDescriptor(); } | getFileTemplateDescriptor |
69,838 | FileTemplateDescriptor (@NotNull TestFramework framework) { return framework.getBeforeClassMethodFileTemplateDescriptor(); } | getFileTemplateDescriptor |
69,839 | FileTemplateDescriptor (@NotNull TestFramework framework) { return framework.getTearDownMethodFileTemplateDescriptor(); } | getFileTemplateDescriptor |
69,840 | FileTemplateDescriptor (@NotNull TestFramework framework) { return framework.getAfterClassMethodFileTemplateDescriptor(); } | getFileTemplateDescriptor |
69,841 | FileTemplateDescriptor (@NotNull TestFramework framework) { return framework.getTestMethodFileTemplateDescriptor(); } | getFileTemplateDescriptor |
69,842 | FileTemplateDescriptor (@NotNull TestFramework framework) { if (framework instanceof JavaTestFramework) { return ((JavaTestFramework)framework).getParametersMethodFileTemplateDescriptor(); } return null; } | getFileTemplateDescriptor |
69,843 | FileTemplateDescriptor (@NotNull TestFramework framework) { if (framework instanceof JavaTestFramework) { return ((JavaTestFramework)framework).getTestClassFileTemplateDescriptor(); } return null; } | getFileTemplateDescriptor |
69,844 | String () { return myDefaultName; } | getDefaultName |
69,845 | boolean (@NotNull PsiElement element) { PsiClass klass = findOuterClass(element); return klass != null && TestFrameworks.getInstance().isTestClass(klass); } | isTest |
69,846 | PsiClass (@NotNull PsiElement element) { PsiClass result = PsiTreeUtil.getParentOfType(element, PsiClass.class, false); if (result == null) { final PsiFile containingFile = element.getContainingFile(); if (containingFile instanceof PsiClassOwner){ final PsiClass[] classes = ((PsiClassOwner)containingFile).getClasses();... | findOuterClass |
69,847 | List<MemberInfo> (PsiClass clazz, boolean includeInherited) { List<MemberInfo> result = new ArrayList<>(); Set<PsiClass> classes; if (includeInherited) { classes = InheritanceUtil.getSuperClasses(clazz); classes.add(clazz); } else { classes = Collections.singleton(clazz); } for (PsiClass aClass : classes) { if (CommonC... | extractClassMethods |
69,848 | boolean (PsiMember member) { if (!(member instanceof PsiMethod)) return false; if (member.hasModifierProperty(PsiModifier.PRIVATE) || (member.hasModifierProperty(PsiModifier.ABSTRACT) && member.getContainingClass() != clazz)) { return false; } return true; } | includeMember |
69,849 | void (@NotNull MethodKind methodKind, TestFramework framework, final Editor editor, final PsiClass targetClass, final PsiMethod method, @Nullable String name, boolean automatic, Set<? super String> existingNames) { runTestMethodTemplate(methodKind, framework, editor, targetClass, null, method, name, automatic, existing... | runTestMethodTemplate |
69,850 | void (@NotNull MethodKind methodKind, TestFramework framework, final Editor editor, final PsiClass targetClass, @Nullable PsiClass sourceClass, final PsiMethod method, @Nullable String name, boolean automatic, Set<? super String> existingNames) { runTestMethodTemplate(editor, targetClass, method, automatic, createTestM... | runTestMethodTemplate |
69,851 | void (final Editor editor, final PsiClass targetClass, final PsiMethod method, boolean automatic, final Template template) { final int startOffset = method.getModifierList().getTextRange().getStartOffset(); final TextRange range = new TextRange(startOffset, method.getTextRange().getEndOffset()); editor.getDocument().re... | runTestMethodTemplate |
69,852 | void (@NotNull Template template, boolean brokenOff) { ApplicationManager.getApplication().runWriteAction(() -> { PsiDocumentManager.getInstance(project).commitDocument(editor.getDocument()); PsiFile psi = PsiDocumentManager.getInstance(project).getPsiFile(editor.getDocument()); PsiElement el = PsiTreeUtil.findElementO... | templateFinished |
69,853 | Template (@NotNull MethodKind methodKind, TestFramework descriptor, @NotNull PsiClass targetClass, @Nullable String name, boolean automatic, Set<? super String> existingNames) { return createTestMethodTemplate(methodKind, descriptor, targetClass, null, name, automatic, existingNames); } | createTestMethodTemplate |
69,854 | Template (@NotNull MethodKind methodKind, TestFramework descriptor, @NotNull PsiClass targetClass, @Nullable PsiClass sourceClass, @Nullable String name, boolean automatic, Set<? super String> existingNames) { FileTemplateDescriptor templateDesc = methodKind.getFileTemplateDescriptor(descriptor); String templateName = ... | createTestMethodTemplate |
69,855 | PsiMethod (@NotNull PsiElement context) { JVMElementFactory factory = JVMElementFactories.getFactory(context.getLanguage(), context.getProject()); if (factory == null) factory = JavaPsiFacade.getElementFactory(context.getProject()); return factory.createMethod("dummy", PsiTypes.voidType()); } | createDummyMethod |
69,856 | List<TestFramework> (PsiClass targetClass) { List<TestFramework> frameworks = ContainerUtil.filter(TestFramework.EXTENSION_NAME.getExtensionList(), framework -> TestFrameworks.isSuitableByLanguage(targetClass, framework) ); Project project = targetClass.getProject(); List<TestFramework> result = new SmartList<>(); for ... | findSuitableFrameworks |
69,857 | boolean (@NotNull Project project, @NotNull TestFramework framework) { if (framework instanceof JavaTestFramework) { GlobalSearchScope scope = GlobalSearchScope.allScope(project); String markerClassFQName = ((JavaTestFramework)framework).getMarkerClassFQName(); PsiClass c = JavaPsiFacade.getInstance(project).findClass(... | isAvailableFor |
69,858 | boolean (PsiClass targetClass, TestFramework framework) { return super.isValidFor(targetClass, framework) && framework.findSetUpMethod(targetClass) == null; } | isValidFor |
69,859 | PsiClass (@NotNull PsiElement element) { return TestIntegrationUtils.findOuterClass(element); } | findSourceElement |
69,860 | Collection<PsiElement> (@NotNull PsiElement element) { PsiClass klass = findSourceElement(element); if (klass == null) return Collections.emptySet(); GlobalSearchScope scope = getSearchScope(element, true); PsiShortNamesCache cache = PsiShortNamesCache.getInstance(element.getProject()); List<Pair<? extends PsiNamedElem... | findClassesForTest |
69,861 | GlobalSearchScope (PsiElement element, boolean dependencies) { final Module module = getModule(element); if (module != null) { return dependencies ? GlobalSearchScope.moduleWithDependenciesScope(module) : GlobalSearchScope.moduleWithDependentsScope(module); } else { return GlobalSearchScope.projectScope(element.getProj... | getSearchScope |
69,862 | boolean (PsiClass klass) { if (klass.isAnnotationType() || TestFrameworks.getInstance().isTestClass(klass) || !klass.isPhysical()) { return false; } return true; } | isTestSubjectClass |
69,863 | Collection<PsiElement> (@NotNull PsiElement element) { PsiClass klass = findSourceElement(element); if (klass == null) return Collections.emptySet(); List<Pair<? extends PsiNamedElement, Integer>> classesWithProximities = new ArrayList<>(); Processor<Pair<? extends PsiNamedElement, Integer>> processor = Processors.canc... | findTestsForClass |
69,864 | void (PsiClass klass, Processor<? super Pair<? extends PsiNamedElement, Integer>> processor) { GlobalSearchScope scope = getSearchScope(klass, false); PsiShortNamesCache cache = PsiShortNamesCache.getInstance(klass.getProject()); String klassName = klass.getName(); assert klassName != null; klassName = StringUtil.trimS... | collectTests |
69,865 | boolean (PsiClass eachClass, PsiClass klass) { final TestFrameworks frameworks = TestFrameworks.getInstance(); return eachClass.isPhysical() && (frameworks.isTestClass(eachClass) || eachClass != klass && frameworks.isPotentialTestClass(eachClass)); } | isTestClass |
69,866 | Module (PsiElement element) { ProjectFileIndex index = ProjectRootManager.getInstance(element.getProject()).getFileIndex(); VirtualFile file = PsiUtilCore.getVirtualFile(element); return file == null ? null : index.getModuleForFile(file); } | getModule |
69,867 | boolean (@NotNull PsiElement element) { return TestIntegrationUtils.isTest(element); } | isTest |
69,868 | String (@NotNull PsiModifierListOwner owner, String annotationFqName) { var annotationNames = Collections.singleton(annotationFqName); var nestedClass = owner instanceof PsiClass && ((PsiClass)owner).getContainingClass() != null; var element = nestedClass ? AnnotationUtil.findAnnotation(owner, annotationNames) : Annota... | annotationValue |
69,869 | boolean (PsiClass targetClass) { return AnnotationUtil.findAnnotation(targetClass, "com.intellij.testFramework.TestDataPath") != null; } | isValidForClass |
69,870 | JBPanel () { var mainPanel = new JBPanel<>().withPreferredWidth(250); var layout = new BoxLayout(mainPanel, BoxLayout.Y_AXIS); mainPanel.setLayout(layout); return mainPanel; } | createMainPanel |
69,871 | Info (@NotNull PsiElement e) { if (isIdentifier(e)) { PsiElement element = e.getParent(); if (element instanceof PsiClass psiClass) { if (!isTestClass(psiClass)) return null; String url = "java:suite://" + ClassUtil.getJVMClassName(psiClass); TestStateStorage.Record state = TestStateStorage.getInstance(e.getProject()).... | getInfo |
69,872 | boolean (@Nullable PsiClass psiClass, @Nullable PsiMethod psiMethod) { if (psiClass == null || psiMethod == null) return false; RunnerAndConfigurationSettings currentConfiguration = RunManager.getInstance(psiClass.getProject()).getSelectedConfiguration(); if (currentConfiguration == null) return false; ConfigurationTyp... | isIgnoredForGradleConfiguration |
69,873 | boolean (PsiClass clazz) { TestFramework framework = TestFrameworks.detectFramework(clazz); return framework != null && framework.isTestClass(clazz); } | isTestClass |
69,874 | boolean (PsiClass containingClass, PsiMethod method) { if (containingClass == null) return false; TestFramework framework = TestFrameworks.detectFramework(containingClass); return framework != null && framework.isTestMethod(method, false); } | isTestMethod |
69,875 | Info (TestStateStorage.Record state, boolean isClass, int order) { return new Info(getTestStateIcon(state, isClass), ExecutorAction.getActions(order), element -> ExecutionBundle.message("run.text")); } | getInfo |
69,876 | boolean (PsiElement e) { return e instanceof PsiIdentifier; } | isIdentifier |
69,877 | boolean (PsiClass targetClass, TestFramework framework) { return super.isValidFor(targetClass, framework) && framework.findTearDownMethod(targetClass) == null; } | isValidFor |
69,878 | boolean (PsiClass targetClass, TestFramework framework) { return super.isValidFor(targetClass, framework) && framework.findAfterClassMethod(targetClass) == null; } | isValidFor |
69,879 | boolean (@NotNull Module module) { GlobalSearchScope scope = GlobalSearchScope.moduleWithDependenciesAndLibrariesScope(module); Project project = module.getProject(); PsiClass c = DumbService.getInstance(project).computeWithAlternativeResolveEnabled(() -> JavaPsiFacade.getInstance(project).findClass(getMarkerClassFQNam... | isLibraryAttached |
69,880 | String () { ExternalLibraryDescriptor descriptor = getFrameworkLibraryDescriptor(); if (descriptor != null) { return descriptor.getLibraryClassesRoots().get(0); } return null; } | getLibraryPath |
69,881 | ExternalLibraryDescriptor () { return null; } | getFrameworkLibraryDescriptor |
69,882 | boolean (@NotNull PsiElement clazz) { String markerClassFQName = getMarkerClassFQName(); return isFrameworkApplicable(clazz, markerClassFQName); } | isFrameworkAvailable |
69,883 | boolean (@NotNull PsiElement clazz, String markerClassFQName) { if (markerClassFQName == null) return true; return CachedValuesManager.<ConcurrentMap<String, PsiClass>>getCachedValue(clazz, () -> { var project = clazz.getProject(); return new CachedValueProvider.Result<>( ConcurrentFactoryMap.createMap( markerInterface... | isFrameworkApplicable |
69,884 | boolean (@NotNull PsiElement clazz) { return clazz instanceof PsiClass && isFrameworkAvailable(clazz) && isTestClass((PsiClass)clazz, false); } | isTestClass |
69,885 | boolean (@NotNull PsiElement clazz) { return clazz instanceof PsiClass && isFrameworkAvailable(clazz) && isTestClass((PsiClass)clazz, true); } | isPotentialTestClass |
69,886 | boolean (PsiClass clazz) { PsiFile psiFile = clazz.getContainingFile(); VirtualFile vFile = psiFile.getVirtualFile(); if (vFile == null) return false; return ProjectRootManager.getInstance(clazz.getProject()).getFileIndex().isInTestSourceContent(vFile); } | isUnderTestSources |
69,887 | PsiElement (@NotNull PsiElement clazz) { if (clazz instanceof PsiClass && isFrameworkAvailable(clazz)) { return findSetUpMethod((PsiClass)clazz); } return null; } | findSetUpMethod |
69,888 | PsiElement (@NotNull PsiElement clazz) { if (clazz instanceof PsiClass && isFrameworkAvailable(clazz)) { return findTearDownMethod((PsiClass)clazz); } return null; } | findTearDownMethod |
69,889 | PsiElement (@NotNull PsiElement clazz) { if (clazz instanceof PsiClass && isFrameworkAvailable(clazz)) { return findBeforeClassMethod((PsiClass)clazz); } return null; } | findBeforeClassMethod |
69,890 | PsiMethod (@NotNull PsiClass clazz) { return null; } | findBeforeClassMethod |
69,891 | PsiElement (@NotNull PsiElement clazz) { if (clazz instanceof PsiClass && isFrameworkAvailable(clazz)) { return findAfterClassMethod((PsiClass)clazz); } return null; } | findAfterClassMethod |
69,892 | PsiMethod (@NotNull PsiClass clazz) { return null; } | findAfterClassMethod |
69,893 | boolean (PsiElement element) { return false; } | isIgnoredMethod |
69,894 | Language () { // despite the class name, it could handle (utilizing LightClasses) test frameworks // in different (JVM-like) languages like java, groovy, kotlin, scala and so on return Language.ANY; } | getLanguage |
69,895 | boolean (PsiClass clazz) { return false; } | isParameterized |
69,896 | PsiMethod (PsiClass clazz) { return null; } | findParametersMethod |
69,897 | FileTemplateDescriptor () { return null; } | getParametersMethodFileTemplateDescriptor |
69,898 | char () { return 0; } | getMnemonic |
69,899 | PsiMethod (JVMElementFactory factory) { final FileTemplate template = FileTemplateManager.getDefaultInstance().getCodeTemplate(getSetUpMethodFileTemplateDescriptor().getFileName()); final String templateText = StringUtil.replace(StringUtil.replace(template.getText(), "${BODY}\n", ""), "${NAME}", "setUp"); return factor... | createSetUpPatternMethod |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.