Unnamed: 0 int64 0 305k | body stringlengths 7 52.9k | name stringlengths 1 185 |
|---|---|---|
70,200 | Icon () { return AllIcons.Nodes.Class; } | getIcon |
70,201 | String () { //noinspection DialogTitleCapitalization return JavaBundle.message("label.jvm.class.name"); } | getDisplayName |
70,202 | JavaClassReferenceProvider () { return new JavaClassReferenceProvider() { @Override public @NotNull GlobalSearchScope getScope(@NotNull Project project) { return allScope(project); // relax search to all known classes because we do not know the usage context here } }; } | getReferenceProvider |
70,203 | GlobalSearchScope (@NotNull Project project) { return allScope(project); // relax search to all known classes because we do not know the usage context here } | getScope |
70,204 | boolean (@NotNull Attribute attribute) { Element parent = attribute.getParent(); if (parent.getName().equals(Constants.OPTION)) { String optionName = parent.getAttributeValue(Constants.NAME); if ("MAIN_CLASS_NAME".equals(optionName) || "METHOD_NAME".equals(optionName) || "TEST_OBJECT".equals(optionName)) { return true;... | skipPathMacros |
70,205 | PsiBasedStripTrailingSpacesFilter (@NotNull Document document) { return new JavaPsiBasedStripTrailingSpacesFilter(document); } | createFilter |
70,206 | boolean (@NotNull Language language) { return language.isKindOf(JavaLanguage.INSTANCE); } | isApplicableTo |
70,207 | void (@NotNull PsiFile psiFile) { if (!HighlightingFeature.TEXT_BLOCKS.isAvailable(psiFile)) return; psiFile.accept(new JavaRecursiveElementWalkingVisitor() { @Override public void visitLiteralExpression(@NotNull PsiLiteralExpression expression) { if (expression.isTextBlock()) { disableRange(expression.getTextRange(), ... | process |
70,208 | void (@NotNull PsiLiteralExpression expression) { if (expression.isTextBlock()) { disableRange(expression.getTextRange(), false); } } | visitLiteralExpression |
70,209 | UnnamedConfigurable () { return new HyperlinksToClassesConfigurable(); } | createConfigurable |
70,210 | void (@NotNull PsiElement psiElement, @NotNull Map<? super Integer, ? super PsiReference> refMap, @NotNull Map<PsiFile, PsiFile> filesMap, @NotNull PsiFile psiFile) { PsiReference ref = psiElement.getReference(); if(ref instanceof PsiJavaCodeReferenceElement) { PsiElement refElement = ref.resolve(); if(refElement insta... | findClassReferences |
70,211 | JComponent () { myCbGenerateHyperlinksToClasses = new JCheckBox(JavaBundle.message("export.to.html.generate.hyperlinks.checkbox"), isGenerateHyperlinksToClasses); return myCbGenerateHyperlinksToClasses; } | createComponent |
70,212 | boolean () { return myCbGenerateHyperlinksToClasses.isSelected() != isGenerateHyperlinksToClasses; } | isModified |
70,213 | void () { myCbGenerateHyperlinksToClasses.setSelected(isGenerateHyperlinksToClasses); } | reset |
70,214 | Icon (final Icon baseIcon, final VirtualFile file, final int flags, final Project project) { if (project == null) { return baseIcon; } FileType fileType = file.getFileType(); if (fileType == JavaFileType.INSTANCE && !FileIndexUtil.isJavaSourceFile(project, file)) { return PlatformIcons.JAVA_OUTSIDE_SOURCE_ICON; } PsiFi... | patchIcon |
70,215 | boolean (@NotNull SearchEverywhereFoundElementInfo newItemInfo, @NotNull SearchEverywhereFoundElementInfo alreadyFoundItemInfo) { PsiElement newElementPsi = PsiElementsEqualityProvider.toPsi(newItemInfo.getElement()); PsiElement alreadyFoundPsi = PsiElementsEqualityProvider.toPsi(alreadyFoundItemInfo.getElement()); ret... | areEqual |
70,216 | boolean (@NotNull PsiElement newElement, @NotNull PsiElement oldElement) { return isClass(newElement) && isFile(oldElement) || isClass(oldElement) && isFile(newElement); } | isClassAndFile |
70,217 | boolean (Object element) { return element instanceof PsiFile || element instanceof VirtualFile; } | isFile |
70,218 | boolean (Object element) { return element instanceof PsiClass; } | isClass |
70,219 | boolean (@NotNull PsiElement newItem, @NotNull PsiElement alreadyFound) { VirtualFile newItemFile = convertToFileIsPossible(newItem); VirtualFile foundItemFile = convertToFileIsPossible(alreadyFound); return newItemFile != null && newItemFile.equals(foundItemFile); } | isSameFile |
70,220 | VirtualFile (@NotNull PsiElement element) { if (element instanceof VirtualFile) { return (VirtualFile) element; } else if (element instanceof PsiFile) { return ((PsiFile) element).getVirtualFile(); } else if (element instanceof PsiDirectory) { return ((PsiDirectory) element).getVirtualFile(); } else if (element instanc... | convertToFileIsPossible |
70,221 | CodeStyleConfigurable (@NotNull CodeStyleSettings settings, @NotNull CodeStyleSettings modelSettings) { return new CodeStyleAbstractConfigurable(settings, modelSettings, JavaLanguage.INSTANCE.getDisplayName()) { @Override protected @NotNull CodeStyleAbstractPanel createPanel(final @NotNull CodeStyleSettings settings) {... | createConfigurable |
70,222 | CodeStyleAbstractPanel (final @NotNull CodeStyleSettings settings) { return new JavaCodeStyleMainPanel(getCurrentSettings(), settings); } | createPanel |
70,223 | String () { return "reference.settingsdialog.codestyle.java"; } | getHelpTopic |
70,224 | CustomCodeStyleSettings (@NotNull CodeStyleSettings settings) { return new JavaCodeStyleSettings(settings); } | createCustomSettings |
70,225 | Language () { return JavaLanguage.INSTANCE; } | getLanguage |
70,226 | String (@NotNull SettingsType settingsType) { if (settingsType == SettingsType.SPACING_SETTINGS) return SPACING_SAMPLE; if (settingsType == SettingsType.BLANK_LINES_SETTINGS) return BLANK_LINE_SAMPLE; if (settingsType == SettingsType.WRAPPING_AND_BRACES_SETTINGS) return WRAPPING_CODE_SAMPLE; return GENERAL_CODE_SAMPLE;... | getCodeSample |
70,227 | int (@NotNull SettingsType settingsType) { if (settingsType == SettingsType.WRAPPING_AND_BRACES_SETTINGS) return 37; return super.getRightMargin(settingsType); } | getRightMargin |
70,228 | void (@NotNull CodeStyleSettingsCustomizable consumer, @NotNull SettingsType settingsType) { if (settingsType == SettingsType.SPACING_SETTINGS) { consumer.showAllStandardOptions(); consumer.showCustomOption(JavaCodeStyleSettings.class, "SPACES_WITHIN_ANGLE_BRACKETS", JavaBundle.message("code.style.settings.angle.spacin... | customizeSettings |
70,229 | PsiFile (final @NotNull Project project, final @NotNull String text) { final PsiFile file = PsiFileFactory.getInstance(project).createFileFromText( "sample.java", JavaFileType.INSTANCE, text, LocalTimeCounter.currentTime(), false, false ); file.putUserData(PsiUtil.FILE_LANGUAGE_LEVEL_KEY, LanguageLevel.HIGHEST); return... | createFileFromText |
70,230 | IndentOptionsEditor () { return new JavaIndentOptionsEditor(); } | getIndentOptionsEditor |
70,231 | DocCommentSettings (@NotNull CodeStyleSettings rootSettings) { return new DocCommentSettings() { private final JavaCodeStyleSettings mySettings = rootSettings.getCustomSettings(JavaCodeStyleSettings.class); @Override public boolean isDocFormattingEnabled() { return mySettings.ENABLE_JAVADOC_FORMATTING; } @Override publ... | getDocCommentSettings |
70,232 | boolean () { return mySettings.ENABLE_JAVADOC_FORMATTING; } | isDocFormattingEnabled |
70,233 | void (boolean formattingEnabled) { mySettings.ENABLE_JAVADOC_FORMATTING = formattingEnabled; } | setDocFormattingEnabled |
70,234 | boolean () { return mySettings.JD_LEADING_ASTERISKS_ARE_ENABLED; } | isLeadingAsteriskEnabled |
70,235 | boolean () { return mySettings.JD_KEEP_EMPTY_EXCEPTION || mySettings.JD_KEEP_EMPTY_PARAMETER || mySettings.JD_KEEP_EMPTY_RETURN; } | isRemoveEmptyTags |
70,236 | void (boolean removeEmptyTags) { mySettings.JD_KEEP_EMPTY_RETURN = !removeEmptyTags; mySettings.JD_KEEP_EMPTY_PARAMETER = !removeEmptyTags; mySettings.JD_KEEP_EMPTY_EXCEPTION = !removeEmptyTags; } | setRemoveEmptyTags |
70,237 | CodeStyleFieldAccessor (@NotNull Object codeStyleObject, @NotNull Field field) { if (PackageEntryTable.class.isAssignableFrom(field.getType())) { return new JavaPackageEntryTableAccessor(codeStyleObject, field); } return super.getAccessor(codeStyleObject, field); } | getAccessor |
70,238 | List<CodeStylePropertyAccessor> (@NotNull Object codeStyleObject) { if (codeStyleObject instanceof JavaCodeStyleSettings) { return Collections.singletonList(new RepeatAnnotationsAccessor((JavaCodeStyleSettings)codeStyleObject)); } return super.getAdditionalAccessors(codeStyleObject); } | getAdditionalAccessors |
70,239 | boolean (@NotNull List<String> extVal) { mySettings.setRepeatAnnotations(extVal); return true; } | set |
70,240 | List<String> () { return mySettings.getRepeatAnnotations(); } | get |
70,241 | List<String> (@NotNull String string) { return CodeStylePropertiesUtil.getValueList(string); } | parseString |
70,242 | String (@NotNull List<String> value) { return CodeStylePropertiesUtil.toCommaSeparatedString(value); } | valueToString |
70,243 | String () { return "repeat_annotations"; } | getPropertyName |
70,244 | boolean () { return true; } | usesCommonKeepLineBreaks |
70,245 | void (boolean a, int x, int y, int z) { label1: do { try { if (x > 0) { int someVariable = a ? x : y; int anotherVariable = a ? x : y; } else if (x < 0) { int someVariable = (y + z); someVariable = x = x + y; } else { label2: for (int i = 0; i < 5; i++) doSomething(i); } switch (a) { case 0: doCase0(); break; default: ... | foo |
70,246 | void () { new Runnable() { public void run() { } }; } | foo1 |
70,247 | void () { } | run |
70,248 | void (int x, int y) { Runnable r = () -> {}; Runnable r1 = this :: bar; for (int i = 0; i < x; i++) { y += (y ^ 0x123) << 2; } for (int a: X) { System.out.print(a); } do { try(MyResource r1 = getResource(); MyResource r2 = null) { if (0 < x && x < 10) { while (x != y) { x = f(x * 3 + 5); } } else { synchronized (this) ... | foo |
70,249 | void (int i1, int i2, int i3, int i4, int i5, int i6, int i7) {} | foo1 |
70,250 | ActionUpdateThread () { return ActionUpdateThread.BGT; } | getActionUpdateThread |
70,251 | void (@NotNull final DataContext dataContext) { final Project project = CommonDataKeys.PROJECT.getData(dataContext); final IdeView ideView = LangDataKeys.IDE_VIEW.getData(dataContext); if (project == null || ideView == null) return; String copied = CopyPasteManager.getInstance().getContents(DataFlavor.stringFlavor); if... | performPaste |
70,252 | void (final PsiJavaFile javaFile, final PsiDirectory targetDir) { final PsiPackage aPackage = JavaDirectoryService.getInstance().getPackage(targetDir); if (aPackage == null) return; final PsiPackageStatement oldStatement = javaFile.getPackageStatement(); final Project project = javaFile.getProject(); if ((oldStatement ... | updatePackageStatement |
70,253 | boolean (@NotNull final DataContext dataContext) { return true; } | isPastePossible |
70,254 | boolean (@NotNull final DataContext dataContext) { final Project project = CommonDataKeys.PROJECT.getData(dataContext); final IdeView ideView = LangDataKeys.IDE_VIEW.getData(dataContext); if (project == null || ideView == null || ideView.getDirectories().length == 0) { return false; } String pasteText = CopyPasteManage... | isPasteEnabled |
70,255 | String (@NotNull Project project, @NotNull String fileText) { final PsiClass[] classes = getPastedClasses(project, fileText); if (classes.length < 1) return null; for (PsiClass aClass : classes) { if (aClass.hasModifierProperty(PsiModifier.PUBLIC)) { return aClass.getName(); } } return classes[0].getName(); } | detectClassName |
70,256 | String (@NotNull PsiClass psiClass) { return PsiUtil.getPackageName(psiClass); } | getPackageName |
70,257 | PsiMember () { PsiElement element = getPsiElement(); return element == null ? null : getEnclosingElement(element); } | getEnclosingElement |
70,258 | PsiMember (PsiElement element) { return PsiTreeUtil.getNonStrictParentOfType(element, PsiField.class, PsiMethod.class, PsiClass.class); } | getEnclosingElement |
70,259 | void () { myUsageCount++; } | incrementUsageCount |
70,260 | PsiElement () { return getPsiElement(); } | getTargetElement |
70,261 | boolean () { return getEnclosingElement() != null; } | isValid |
70,262 | boolean () { CompositeAppearance oldText = myHighlightedText; Icon oldIcon = getIcon(); boolean changes = super.update(); PsiMember enclosingElement = getEnclosingElement(); if (enclosingElement == null) { return invalidElement(); } installIcon(enclosingElement, changes); myHighlightedText = new CompositeAppearance(); ... | update |
70,263 | void (PsiReference reference) { myReferences.add(reference); } | addReference |
70,264 | boolean (PsiReference reference) { return myReferences.contains(reference); } | hasReference |
70,265 | void (boolean requestFocus) { if (!myNavigateToReference) { PsiElement element = getPsiElement(); if (element instanceof Navigatable && ((Navigatable)element).canNavigate()) { ((Navigatable)element).navigate(requestFocus); } return; } PsiReference firstReference = myReferences.get(0); PsiElement element = firstReferenc... | navigate |
70,266 | boolean () { if (!myNavigateToReference) { PsiElement element = getPsiElement(); return element instanceof Navigatable && ((Navigatable)element).canNavigate(); } if (myReferences.isEmpty()) return false; PsiReference firstReference = myReferences.get(0); PsiElement callElement = firstReference.getElement().getParent();... | canNavigate |
70,267 | boolean () { return canNavigate(); } | canNavigateToSource |
70,268 | void (@NotNull PsiElement element, @NotNull List<? super PsiMethod> methods) { PsiElement[] children = element.getChildren(); for (PsiElement child : children) { collectCallees(child, methods); if (child instanceof PsiMethodCallExpression callExpression) { PsiReferenceExpression methodExpression = callExpression.getMet... | collectCallees |
70,269 | PsiElement (@NotNull DataContext dataContext) { Project project = CommonDataKeys.PROJECT.getData(dataContext); if (project == null) return null; PsiElement element = CommonDataKeys.PSI_ELEMENT.getData(dataContext); if (element instanceof PsiField) return element; return PsiTreeUtil.getParentOfType(element, PsiMethod.cl... | getTarget |
70,270 | HierarchyBrowser (@NotNull PsiElement target) { return new CallHierarchyBrowser(target.getProject(), (PsiMember)target); } | createHierarchyBrowser |
70,271 | void (@NotNull HierarchyBrowser hierarchyBrowser) { ((CallHierarchyBrowser)hierarchyBrowser).changeView(CallHierarchyBrowserBase.getCallerType()); } | browserActivated |
70,272 | void (@NotNull Map<? super @Nls String, ? super JTree> type2TreeMap) { JTree tree1 = createTree(false); PopupHandler.installPopupMenu(tree1, IdeActions.GROUP_CALL_HIERARCHY_POPUP, ActionPlaces.CALL_HIERARCHY_VIEW_POPUP); BaseOnThisMethodAction baseOnThisMethodAction = new BaseOnThisMethodAction(); baseOnThisMethodActio... | createTrees |
70,273 | PsiElement (@NotNull HierarchyNodeDescriptor descriptor) { if (descriptor instanceof CallHierarchyNodeDescriptor nodeDescriptor) { return nodeDescriptor.getEnclosingElement(); } return null; } | getElementFromDescriptor |
70,274 | PsiElement (@NotNull HierarchyNodeDescriptor descriptor) { if (descriptor instanceof CallHierarchyNodeDescriptor nodeDescriptor) { return nodeDescriptor.getTargetElement(); } return null; } | getOpenFileElementFromDescriptor |
70,275 | boolean (@NotNull PsiElement e) { return e instanceof PsiMethod || e instanceof PsiField; } | isApplicableElement |
70,276 | HierarchyTreeStructure (@NotNull String typeName, @NotNull PsiElement psiElement) { if (getCallerType().equals(typeName)) { return new CallerMethodsTreeStructure(myProject, (PsiMember)psiElement, getCurrentScopeType()); } if (getCalleeType().equals(typeName)) { return new CalleeMethodsTreeStructure(myProject, (PsiMembe... | createHierarchyTreeStructure |
70,277 | boolean (@NotNull PsiClass expectedQualifierClass, @NotNull PsiClass receiverClass) { if (areClassesDirectlyRelated(expectedQualifierClass, receiverClass)) { return true; } if (receiverClass instanceof PsiTypeParameter) { // in case of "T extends S", it should be related to SImpl, even though T is not superclass of SIm... | areClassesRelated |
70,278 | boolean (@NotNull PsiClass expectedQualifierClass, @NotNull PsiClass receiverClass) { return InheritanceUtil.isInheritorOrSelf(expectedQualifierClass, receiverClass, true) || InheritanceUtil.isInheritorOrSelf(receiverClass, expectedQualifierClass, true); } | areClassesDirectlyRelated |
70,279 | boolean (PsiMember enclosingElement) { return enclosingElement instanceof PsiClass && ((PsiClass)enclosingElement).getQualifiedName() == null; } | isLocalOrAnonymousClass |
70,280 | String () { return "Caller Hierarchy for " + formatBaseElementText(); } | toString |
70,281 | boolean (@NotNull PsiReference reference, @NotNull JavaCallHierarchyData data) { PsiClass originalClass = data.getOriginalClass(); PsiMethod method = data.getMethod(); Set<? extends PsiMethod> methodsToFind = data.getMethodsToFind(); PsiMethod methodToFind = data.getMethodToFind(); PsiClassType originalType = data.getO... | process |
70,282 | PsiMember (PsiElement element) { return PsiTreeUtil.getNonStrictParentOfType(element, PsiField.class, PsiMethod.class, PsiClass.class); } | getEnclosingElement |
70,283 | boolean (@NotNull PsiMethod method, @NotNull HierarchyNodeDescriptor parentDescriptor) { // detect recursion // the current call-site calls *method* // Thus, we already have a node that represents *method* // Check whether we have any other node along the parent-chain that represents that same method NodeDescriptor<?> ... | isRecursiveNode |
70,284 | boolean (@NotNull PsiAnnotation annotation) { String qualifiedName = annotation.getQualifiedName(); return qualifiedName != null && qualifiedName.startsWith("java.lang.annotation"); } | isJavaLangAnnotation |
70,285 | Collection<PsiClass> (@NotNull PsiClass psiClass, @NotNull SearchScope searchScope) { if (psiClass.isAnnotationType()) { Set<PsiClass> result = new HashSet<>(); AnnotatedElementsSearch.searchPsiClasses(psiClass, searchScope).forEach(processorResult -> { if (processorResult.isAnnotationType()) { result.add(processorResu... | searchInheritors |
70,286 | boolean (@NotNull PsiElement psiElement) { return psiElement instanceof PsiClass && ((PsiClass)psiElement).isInterface(); } | isInterface |
70,287 | void (@NotNull Map<? super @Nls String, ? super JTree> trees) { createTreeAndSetupCommonActions(trees, IdeActions.GROUP_TYPE_HIERARCHY_POPUP); } | createTrees |
70,288 | void (@NotNull DefaultActionGroup actionGroup) { super.prependActions(actionGroup); actionGroup.add(new ChangeScopeAction() { @Override protected boolean isEnabled() { return !Comparing.strEqual(getCurrentViewType(), getSupertypesHierarchyType()); } }); } | prependActions |
70,289 | boolean () { return !Comparing.strEqual(getCurrentViewType(), getSupertypesHierarchyType()); } | isEnabled |
70,290 | String (@NotNull String typeName, @NotNull PsiElement element) { return MessageFormat.format(typeName, ClassPresentationUtil.getNameForClass((PsiClass)element, false)); } | getContentDisplayName |
70,291 | PsiElement (@NotNull HierarchyNodeDescriptor descriptor) { if (!(descriptor instanceof TypeHierarchyNodeDescriptor)) return null; return ((TypeHierarchyNodeDescriptor)descriptor).getPsiClass(); } | getElementFromDescriptor |
70,292 | JPanel () { return null; } | createLegendPanel |
70,293 | boolean (@NotNull PsiElement element) { return element instanceof PsiClass; } | isApplicableElement |
70,294 | boolean (@NotNull PsiElement element) { return element instanceof PsiClass && !CommonClassNames.JAVA_LANG_OBJECT.equals(((PsiClass)element).getQualifiedName()); } | isApplicableElementForBaseOn |
70,295 | HierarchyTreeStructure (@NotNull String typeName, @NotNull PsiElement psiElement) { if (getSupertypesHierarchyType().equals(typeName)) { return new SupertypesHierarchyTreeStructure(myProject, (PsiClass)psiElement); } else if (getSubtypesHierarchyType().equals(typeName)) { return new SubtypesHierarchyTreeStructure(myPro... | createHierarchyTreeStructure |
70,296 | boolean (PsiElement psiElement) { return psiElement instanceof PsiClass && !(psiElement instanceof PsiAnonymousClass); } | canBeDeleted |
70,297 | String (PsiElement psiElement) { if (psiElement instanceof PsiClass) { return ((PsiClass)psiElement).getQualifiedName(); } return ""; } | getQualifiedName |
70,298 | PsiClass (@NotNull DataContext dataContext) { Project project = CommonDataKeys.PROJECT.getData(dataContext); if (project == null) return null; Editor editor = CommonDataKeys.EDITOR.getData(dataContext); if (LOG.isDebugEnabled()) { LOG.debug("editor " + editor); } if (editor != null) { PsiFile file = PsiDocumentManager.... | getTarget |
70,299 | HierarchyBrowser (@NotNull PsiElement target) { return new TypeHierarchyBrowser(target.getProject(), (PsiClass) target); } | createHierarchyBrowser |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.