Unnamed: 0 int64 0 305k | body stringlengths 7 52.9k | name stringlengths 1 185 |
|---|---|---|
29,500 | void (@NotNull Module module, @NotNull ModifiableRootModel rootModel) { if (myLibraryCompositionSettings != null) { myLibraryCompositionSettings.addLibraries(rootModel, new ArrayList<>(), myLibrariesContainer); } } | update |
29,501 | JComponent () { return getPanel().getMainPanel(); } | getComponent |
29,502 | String () { return "reference.dialogs.new.project.fromScratch.groovy"; } | getHelpId |
29,503 | void () { myLibraryCompositionSettings = getPanel().apply(); if (myJavaStep != null) { myJavaStep.updateDataModel(); } } | updateDataModel |
29,504 | void (boolean finishChosen) { if (finishChosen && !myDownloaded && myLibraryCompositionSettings != null) { if (myLibraryCompositionSettings.downloadFiles(getPanel().getMainPanel())) { myDownloaded = true; } } } | _commit |
29,505 | LibraryOptionsPanel () { if (myPanel == null) { final GroovyLibraryDescription libraryDescription = new GroovyLibraryDescription(); final String baseDirPath = myBasePath != null ? FileUtil.toSystemIndependentName(myBasePath) : ""; myPanel = new LibraryOptionsPanel(libraryDescription, baseDirPath, FrameworkLibraryVersionFilter.ALL, myLibrariesContainer, false); Disposer.register(myDisposable, myPanel); } return myPanel; } | getPanel |
29,506 | FrameworkTypeEx () { return FrameworkTypeEx.EP_NAME.findExtension(GroovyFrameworkType.class); } | getFrameworkType |
29,507 | boolean (@NotNull ModuleBuilder builder) { return super.isEnabledForModuleBuilder(builder) && !(builder instanceof GroovyAwareModuleBuilder); } | isEnabledForModuleBuilder |
29,508 | boolean (@NotNull Module module, @NotNull FacetsProvider facetsProvider) { final String version = GroovyConfigUtils.getInstance().getSDKVersion(module); return version != null; } | isSupportAlreadyAdded |
29,509 | FrameworkSupportInModuleConfigurable (@NotNull final FrameworkSupportModel model) { return new GroovySupportConfigurable(); } | createConfigurable |
29,510 | boolean (@NotNull ModuleType moduleType) { return GroovyFacetUtil.isAcceptableModuleType(moduleType); } | isEnabledForModuleType |
29,511 | boolean (@NotNull Module module) { return true; } | hasFrameworkStructure |
29,512 | boolean (@NotNull Module module) { return JavaPsiFacade.getInstance(module.getProject()).findClass( GroovyCommonClassNames.GROOVY_OBJECT, module.getModuleWithDependenciesAndLibrariesScope(true) ) != null; } | hasFrameworkLibrary |
29,513 | GroovyLibraryPresentationProviderBase (@NotNull VirtualFile dir) { final String name = dir.getName(); final List<GroovyLibraryPresentationProviderBase> providers = ContainerUtil.findAll(LibraryPresentationProvider.EP_NAME.getExtensions(), GroovyLibraryPresentationProviderBase.class); for (final GroovyLibraryPresentationProviderBase provider : providers) { if (provider.managesName(name) && provider.isSDKHome(dir)) { return provider; } } for (final GroovyLibraryPresentationProviderBase manager : providers) { if (manager.isSDKHome(dir)) { return manager; } } return null; } | findManager |
29,514 | NewLibraryConfiguration (@NotNull JComponent parentComponent, VirtualFile contextDirectory) { VirtualFile initial = findPathToGroovyHome(); final FileChooserDescriptor descriptor = createFileChooserDescriptor(); final VirtualFile dir = FileChooser.chooseFile(descriptor, parentComponent, null, initial); if (dir == null) { return null; } return createLibraryConfiguration(parentComponent, dir); } | createNewLibrary |
29,515 | VirtualFile () { VirtualFile initial = findFile(System.getenv(myEnvVariable)); if (initial == null && GROOVY_FRAMEWORK_NAME.equals(myFrameworkName)) { if (SystemInfo.isLinux) { return findFile("/usr/share/groovy"); } else if (SystemInfo.isMac) { return findFile("/usr/local/opt/groovy/libexec"); // homebrew } } return initial; } | findPathToGroovyHome |
29,516 | FileChooserDescriptor () { FileChooserDescriptor descriptor = new FileChooserDescriptor(false, true, false, false, false, false) { @Override public boolean isFileSelectable(@Nullable VirtualFile file) { if (!super.isFileSelectable(file)) { return false; } return findManager(file) != null; } }; descriptor.setTitle(GroovyBundle.message("framework.0.sdk.chooser.title", myFrameworkName)); descriptor.setDescription(GroovyBundle.message("framework.0.sdk.chooser.description", myFrameworkName)); return descriptor; } | createFileChooserDescriptor |
29,517 | boolean (@Nullable VirtualFile file) { if (!super.isFileSelectable(file)) { return false; } return findManager(file) != null; } | isFileSelectable |
29,518 | void (@NotNull LibraryEditor editor) { provider.fillLibrary(path, editor); } | addRoots |
29,519 | VirtualFile (String path) { if (path != null && !path.isEmpty()) { return LocalFileSystem.getInstance().findFileByPath(FileUtil.toSystemIndependentName(path)); } return null; } | findFile |
29,520 | String () { return myVersion; } | getVersion |
29,521 | GroovyLibraryProperties () { return null; } | getState |
29,522 | void (@NotNull GroovyLibraryProperties state) { } | loadState |
29,523 | boolean (Object obj) { return obj instanceof GroovyLibraryProperties && Objects.equals(myVersion, ((GroovyLibraryProperties)obj).myVersion); } | equals |
29,524 | int () { return myVersion != null ? myVersion.hashCode() : 0; } | hashCode |
29,525 | boolean () { return false; } | isDumbAware |
29,526 | FrameworkSupportInModuleProvider () { return new GroovyFrameworkSupportProvider(); } | createProvider |
29,527 | String () { return GroovyBundle.message("language.groovy"); } | getPresentableName |
29,528 | Icon () { return JetgroovyIcons.Groovy.Groovy_16x16; } | getIcon |
29,529 | boolean (final VirtualFile[] libraryFiles) { return LibrariesUtil.getGroovyLibraryHome(libraryFiles) != null; } | managesLibrary |
29,530 | String (final VirtualFile[] libraryFiles) { String jarVersion = JarVersionDetectionUtil.detectJarVersion(SOME_GROOVY_CLASS, Arrays.asList(libraryFiles)); if (jarVersion != null) { return jarVersion; } String home = LibrariesUtil.getGroovyLibraryHome(libraryFiles); if (home == null) { return GroovyBundle.message("undefined.library.version"); } String version = GroovyConfigUtils.getInstance().getSDKVersionOrNull(home); if (version == null) { return GroovyBundle.message("undefined.library.version"); } return version; } | getLibraryVersion |
29,531 | Icon (GroovyLibraryProperties properties) { return JetgroovyIcons.Groovy.Groovy_16x16; } | getIcon |
29,532 | boolean (@NotNull VirtualFile file) { return GroovyConfigUtils.getInstance().isSDKHome(file); } | isSDKHome |
29,533 | void (String path, LibraryEditor libraryEditor) { File srcRoot = new File(path + "/src/main"); if (srcRoot.exists()) { libraryEditor.addRoot(VfsUtil.getUrlForLibraryRoot(srcRoot), OrderRootType.SOURCES); } File[] jars; File libDir = new File(path + "/lib"); if (libDir.exists()) { jars = libDir.listFiles(); } else { jars = new File(path + "/embeddable").listFiles(); } if (jars != null) { for (File file : jars) { if (file.getName().endsWith(".jar")) { libraryEditor.addRoot(VfsUtil.getUrlForLibraryRoot(file), OrderRootType.CLASSES); } } } } | fillLibrary |
29,534 | String () { return GroovyBundle.message("language.groovy"); } | getLibraryCategoryName |
29,535 | boolean (Module module) { if (module == null) return false; return isAcceptableModuleType(ModuleType.get(module)); } | isSuitableModule |
29,536 | boolean (ModuleType type) { return type instanceof JavaModuleType || PLUGIN_MODULE_ID.equals(type.getId()) || "ANDROID_MODULE".equals(type.getId()); } | isAcceptableModuleType |
29,537 | String (@NotNull GroovyLibraryProperties properties) { final String version = properties.getVersion(); if (version == null) { return GroovyBundle.message("framework.0.library", getLibraryCategoryName()); } else { return GroovyBundle.message("framework.0.library.version.1", getLibraryCategoryName(), version); } } | getDescription |
29,538 | GroovyLibraryProperties (@NotNull List<VirtualFile> classesRoots) { final VirtualFile[] libraryFiles = VfsUtilCore.toVirtualFileArray(classesRoots); if (managesLibrary(libraryFiles)) { final String version = getLibraryVersion(libraryFiles); return new GroovyLibraryProperties(version); } return null; } | detect |
29,539 | String () { return StringUtil.toLowerCase(getLibraryCategoryName()); } | getLibraryPrefix |
29,540 | boolean (@NotNull String name) { return StringUtil.startsWithIgnoreCase(name, getLibraryPrefix()); } | managesName |
29,541 | EditorNotificationPanel (@NotNull Module module, @NotNull FileEditor fileEditor) { final EditorNotificationPanel panel = new EditorNotificationPanel(fileEditor, EditorNotificationPanel.Status.Warning); panel.setText(GroovyBundle.message("groovy.library.is.not.configured.for.module", module.getName())); panel.createActionLabel(GroovyBundle.message("configure.groovy.library"), () -> { AddCustomLibraryDialog.createDialog(new GroovyLibraryDescription(), module, null).show(); }); return panel; } | createConfigureNotificationPanel |
29,542 | boolean (@NotNull Module module) { for (VirtualFile root : ModuleRootManager.getInstance(module).getContentRoots()) { if (root.findChild("pom.xml") != null) return true; } return false; } | isMavenModule |
29,543 | JComponent () { return null; } | createComponent |
29,544 | CustomLibraryDescription () { return new GroovyLibraryDescription(); } | createLibraryDescription |
29,545 | boolean () { return true; } | isOnlyLibraryAdded |
29,546 | void (@NotNull Module module, @NotNull ModifiableRootModel rootModel, @NotNull ModifiableModelsProvider modifiableModelsProvider) { } | addSupport |
29,547 | void (@NotNull CompletionParameters parameters, @NotNull ProcessingContext context, @NotNull CompletionResultSet result) { final PsiClass psiClass = PsiTreeUtil.getParentOfType(parameters.getPosition(), PsiClass.class); assert psiClass != null; for (Pair<String, TailType> trinity : VARIANTS) { String fieldName = trinity.first; if (psiClass.findFieldByName(fieldName, false) == null) { result.addElement(TailTypeDecorator.withTail(LookupElementBuilder.create(fieldName), trinity.second)); } } } | addCompletions |
29,548 | boolean (@NotNull PsiElement element, @NotNull Editor editor, @NotNull PsiFile file, @NotNull DataContext context) { return isEnabledOnElements(new PsiElement[]{element}); } | isAvailableOnElementInEditorAndFile |
29,549 | boolean () { return false; } | isAvailableInEditorOnly |
29,550 | boolean (Language language) { return GroovyLanguage.INSTANCE == language; } | isAvailableForLanguage |
29,551 | boolean (PsiElement @NotNull [] elements) { return !ConvertToStaticHandler.collectFilesForProcessing(elements).isEmpty(); } | isEnabledOnElements |
29,552 | RefactoringActionHandler (@NotNull DataContext dataContext) { return new ConvertToStaticHandler(); } | getHandler |
29,553 | boolean (@NotNull PsiElement element, @NotNull Editor editor, @NotNull PsiFile file, @NotNull DataContext context) { return isEnabledOnElements(new PsiElement[]{element}); } | isAvailableOnElementInEditorAndFile |
29,554 | boolean () { return false; } | isAvailableInEditorOnly |
29,555 | boolean (Language language) { return GroovyLanguage.INSTANCE == language; } | isAvailableForLanguage |
29,556 | boolean (PsiElement @NotNull [] elements) { for (PsiElement element : elements) { final PsiFile containingFile = element.getContainingFile(); if (!(containingFile instanceof GroovyFile) || isScriptFile((GroovyFile)containingFile)) { return false; } } return true; } | isEnabledOnElements |
29,557 | RefactoringActionHandler (@NotNull DataContext dataContext) { return new ConvertToJavaHandler(); } | getHandler |
29,558 | void (@NotNull AnActionEvent e) { final Editor editor = e.getData(CommonDataKeys.EDITOR); if (editor == null) return; final PsiFile psiFile = e.getDataContext().getData(CommonDataKeys.PSI_FILE); if (!(psiFile instanceof GroovyFile)) return; int offset = editor.getCaretModel().getOffset(); final List<GrControlFlowOwner> controlFlowOwners = collectControlFlowOwners(psiFile, offset); if (controlFlowOwners.isEmpty()) return; if (controlFlowOwners.size() == 1) { passInner(controlFlowOwners.get(0)); } else { IntroduceTargetChooser.showChooser(editor, controlFlowOwners, new Pass<>() { @Override public void pass(GrControlFlowOwner grExpression) { passInner(grExpression); } }, flowOwner -> flowOwner.getText() ); } } | actionPerformed |
29,559 | void (GrControlFlowOwner grExpression) { passInner(grExpression); } | pass |
29,560 | List<GrControlFlowOwner> (final PsiFile file, final int offset) { final PsiElement elementAtCaret = file.findElementAt(offset); final List<GrControlFlowOwner> result = new ArrayList<>(); for (GrControlFlowOwner owner = ControlFlowUtils.findControlFlowOwner(elementAtCaret); owner != null && !result.contains(owner); owner = ControlFlowUtils.findControlFlowOwner(owner)) { result.add(owner); } return result; } | collectControlFlowOwners |
29,561 | ActionUpdateThread () { return ActionUpdateThread.BGT; } | getActionUpdateThread |
29,562 | void (GrControlFlowOwner owner) { System.out.println(owner.getText()); System.out.println(ControlFlowUtils.dumpControlFlow(ControlFlowUtils.getGroovyControlFlow(owner))); } | passInner |
29,563 | void (@NotNull Project project, PsiDirectory directory, CreateFileFromTemplateDialog.Builder builder) { builder .setTitle(GroovyBundle.message("new.class.dialog.title")) .addKind(GroovyBundle.message("new.class.list.item.class"), JetgroovyIcons.Groovy.Class, GroovyTemplates.GROOVY_CLASS) .addKind(GroovyBundle.message("new.class.list.item.interface"), JetgroovyIcons.Groovy.Interface, GroovyTemplates.GROOVY_INTERFACE); if (GroovyConfigUtils.getInstance().isVersionAtLeast(directory, GroovyConfigUtils.GROOVY2_3, true)) { builder.addKind(GroovyBundle.message("new.class.list.item.trait"), JetgroovyIcons.Groovy.Trait, GroovyTemplates.GROOVY_TRAIT); } builder .addKind(GroovyBundle.message("new.class.list.item.enum"), JetgroovyIcons.Groovy.Enum, GroovyTemplates.GROOVY_ENUM) .addKind(GroovyBundle.message("new.class.list.item.annotation"), JetgroovyIcons.Groovy.AnnotationType, GroovyTemplates.GROOVY_ANNOTATION); if (GroovyConfigUtils.isAtLeastGroovy40(directory)) { builder.addKind(GroovyBundle.message("new.class.list.item.record"), JetgroovyIcons.Groovy.Record, GroovyTemplates.GROOVY_RECORD); } for (FileTemplate template : FileTemplateManager.getInstance(project).getAllTemplates()) { FileType fileType = FileTypeManagerEx.getInstanceEx().getFileTypeByExtension(template.getExtension()); if (fileType.equals(GroovyFileType.GROOVY_FILE_TYPE) && JavaDirectoryService.getInstance().getPackage(directory) != null) { builder.addKind(template.getName(), JetgroovyIcons.Groovy.Class, template.getName()); } } builder.setValidator(new InputValidatorEx() { @Override public String getErrorText(String inputString) { return GroovyBundle.message("invalid.qualified.name"); } @Override public boolean checkInput(String inputString) { return true; } @Override public boolean canClose(String inputString) { return !StringUtil.isEmptyOrSpaces(inputString) && PsiNameHelper.getInstance(project).isQualifiedName(inputString); } }); } | buildDialog |
29,564 | String (String inputString) { return GroovyBundle.message("invalid.qualified.name"); } | getErrorText |
29,565 | boolean (String inputString) { return true; } | checkInput |
29,566 | boolean (String inputString) { return !StringUtil.isEmptyOrSpaces(inputString) && PsiNameHelper.getInstance(project).isQualifiedName(inputString); } | canClose |
29,567 | boolean (DataContext dataContext) { return super.isAvailable(dataContext) && LibrariesUtil.hasGroovySdk(PlatformCoreDataKeys.MODULE.getData(dataContext)); } | isAvailable |
29,568 | String (PsiDirectory directory, @NotNull String newName, String templateName) { return GroovyBundle.message("new.class.action.text"); } | getActionName |
29,569 | PsiElement (@NotNull GrTypeDefinition createdElement) { return createdElement.getLBrace(); } | getNavigationElement |
29,570 | void (@NotNull AnActionEvent e) { super.update(e); Presentation presentation = e.getPresentation(); if (!presentation.isVisible()) return; IdeView view = e.getData(LangDataKeys.IDE_VIEW); if (view == null) return; Project project = e.getProject(); if (project == null) return; ProjectFileIndex projectFileIndex = ProjectRootManager.getInstance(project).getFileIndex(); for (PsiDirectory dir : view.getDirectories()) { if (projectFileIndex.isInSourceContent(dir.getVirtualFile()) && checkPackageExists(dir)) { for (GroovySourceFolderDetector detector : GroovySourceFolderDetector.EP_NAME.getExtensions()) { if (detector.isGroovySourceFolder(dir)) { presentation.setWeight(Presentation.HIGHER_WEIGHT); break; } } return; } } } | update |
29,571 | void (Project project, PsiDirectory directory, CreateFileFromTemplateDialog.Builder builder) { builder .setTitle(GroovyBundle.message("new.script.dialog.title")) .addKind(GroovyBundle.message("new.script.list.item.script"), JetgroovyIcons.Groovy.GroovyFile, GroovyTemplates.GROOVY_SCRIPT) .addKind(GroovyBundle.message("new.script.list.item.script.dsl"), JetgroovyIcons.Groovy.GroovyFile, GroovyTemplates.GROOVY_DSL_SCRIPT); } | buildDialog |
29,572 | boolean (DataContext dataContext) { return super.isAvailable(dataContext) && LibrariesUtil.hasGroovySdk(PlatformCoreDataKeys.MODULE.getData(dataContext)); } | isAvailable |
29,573 | String (PsiDirectory directory, @NotNull String newName, String templateName) { return GroovyBundle.message("new.script.action.text"); } | getActionName |
29,574 | PsiElement (@NotNull GroovyFile createdFile) { return createdFile.getLastChild(); } | getNavigationElement |
29,575 | String (String templateName) { if (GroovyTemplates.GROOVY_DSL_SCRIPT.equals(templateName)) { return GdslFileType.INSTANCE.getDefaultExtension(); } return GroovyFileType.DEFAULT_EXTENSION; } | extractExtension |
29,576 | boolean (DataContext dataContext) { if (!super.isAvailable(dataContext)) { return false; } Module module = PlatformCoreDataKeys.MODULE.getData(dataContext); return GroovyFacetUtil.isSuitableModule(module) && LibrariesUtil.hasGroovySdk(module); } | isAvailable |
29,577 | String () { return CommonBundle.getErrorTitle(); } | getErrorTitle |
29,578 | boolean (@NotNull Project project, @NotNull Editor editor, @NotNull PsiFile file) { if (file instanceof PsiCompiledElement) return false; if (!GroovyFileType.GROOVY_FILE_TYPE.equals(file.getFileType())) return false; PsiClass targetClass = getTargetClass(editor, file); if (targetClass == null) return false; if (targetClass.isInterface()) return false; //? return true; } | isValidForFile |
29,579 | void (PsiMember member) { final PsiElement child = member.getFirstChild(); if (child instanceof PsiDocComment) { final Project project = member.getProject(); final GrDocComment groovyDoc = GroovyPsiElementFactory.getInstance(project).createDocCommentFromText(child.getText()); child.delete(); CodeStyleManager.getInstance(project).reformat(member); member.getParent().addBefore(groovyDoc, member); } } | adjustDocCommentIfExists |
29,580 | PsiElement (@NotNull PsiClass aClass, @NotNull PsiElement leaf) { PsiElement parent = aClass instanceof GroovyScriptClass ? aClass.getContainingFile() : ((GrTypeDefinition)aClass).getBody(); if (parent == null) return null; if (!PsiTreeUtil.isAncestor(parent, leaf, true)) { return null; // we are not in class body } PsiElement element = PsiTreeUtil.findPrevParent(parent, leaf); PsiElement lBrace = aClass.getLBrace(); if (lBrace == null) { return null; } else { PsiElement rBrace = aClass.getRBrace(); if (!GenerateMembersUtil.isChildInRange(element, lBrace.getNextSibling(), rBrace)) { return null; } } return element; } | findInsertionAnchor |
29,581 | void (@NotNull Editor editor, boolean toEditMethodBody) { final T firstMember = getPsiMember(); LOG.assertTrue(firstMember != null); if (toEditMethodBody) { GrMethod method = (GrMethod)firstMember; GrOpenBlock body = method.getBlock(); if (body != null) { PsiElement l = body.getLBrace(); if (l != null) l = l.getNextSibling(); while (PsiImplUtil.isWhiteSpaceOrNls(l)) l = l.getNextSibling(); if (l == null) l = body; PsiElement r = body.getRBrace(); if (r != null) r = r.getPrevSibling(); while (PsiImplUtil.isWhiteSpaceOrNls(r)) r = r.getPrevSibling(); if (r == null) r = body; int start = l.getTextRange().getStartOffset(); int end = r.getTextRange().getEndOffset(); editor.getCaretModel().moveToOffset(Math.min(start, end)); editor.getScrollingModel().scrollToCaret(ScrollType.RELATIVE); if (start < end) { //Not an empty body editor.getSelectionModel().setSelection(start, end); } return; } } int offset; if (firstMember instanceof GrMethod) { GrMethod method = (GrMethod)firstMember; GrCodeBlock body = method.getBlock(); if (body == null) { offset = method.getTextRange().getStartOffset(); } else { offset = body.getLBrace().getTextRange().getEndOffset(); } } else { offset = firstMember.getTextRange().getStartOffset(); } editor.getCaretModel().moveToOffset(offset); editor.getScrollingModel().scrollToCaret(ScrollType.RELATIVE); editor.getSelectionModel().removeSelection(); } | positionCaret |
29,582 | String () { return GroovyBundle.message("Constructor"); } | getCommandName |
29,583 | String () { return GroovyBundle.message("Setter"); } | getCommandName |
29,584 | Collection<EncapsulatableClassMember> (PsiClass s) { if (!(s instanceof GrTypeDefinition)) return Collections.emptyList(); final List<EncapsulatableClassMember> result = new ArrayList<>(); for (PsiField field : s.getFields()) { if (!(field instanceof PsiEnumConstant) && field instanceof GrField) { result.add(new GrFieldMember(field)); } } return result; } | fun |
29,585 | GroovyGenerationInfo<GrMethod> () { PsiField field = getElement(); final GrMethod method = createMethodIfNotExists(field, GroovyPropertyUtils.generateGetterPrototype(field)); return method != null ? new GroovyGenerationInfo<>(method) : null; } | generateGetter |
29,586 | GrMethod (final PsiField field, @Nullable final GrMethod template) { PsiMethod existing = field.getContainingClass().findMethodBySignature(template, false); return existing == null || existing instanceof GrAccessorMethod ? template : null; } | createMethodIfNotExists |
29,587 | GroovyGenerationInfo<GrMethod> () { PsiField field = getElement(); if (field.hasModifierProperty(PsiModifier.FINAL)) { return null; } final GrMethod method = createMethodIfNotExists(field, GroovyPropertyUtils.generateSetterPrototype(field)); return method == null ? null : new GroovyGenerationInfo<>(method); } | generateSetter |
29,588 | String () { return GroovyBundle.message("Getter"); } | getCommandName |
29,589 | String (String base, PsiField[] fields) { String id = base; int index = 0; while (true) { if (index > 0) { id = base + index; } index++; boolean anyEqual = false; for (PsiField equalsField : fields) { if (id.equals(equalsField.getName())) { anyEqual = true; break; } } if (!anyEqual) break; } return id; } | getUniqueLocalVarName |
29,590 | void () { try { final Collection<PsiMethod> members = generateMembers(); for (PsiElement member : members) { myClass.add(member); } } catch (IncorrectOperationException e) { LOG.error(e); } } | run |
29,591 | void (final StringBuffer buffer, final PsiField field) { @NonNls final String type = PsiTypes.doubleType().equals(field.getType()) ? "Double" : "Float"; final Object[] parameters = new Object[]{type, myClassInstanceName, field.getName()}; DOUBLE_FIELD_COMPARER_MF.format(parameters, buffer, null); } | addDoubleFieldComparison |
29,592 | void (StringBuffer buffer, PsiField field) { final PsiType fieldType = field.getType(); if (isNestedArray(fieldType)) { buffer.append(" "); buffer.append(GroovyBundle.message("generate.equals.compare.nested.arrays.comment", field.getName())); buffer.append("\n"); return; } if (isArrayOfObjects(fieldType)) { buffer.append(" "); buffer.append(GroovyBundle.message("generate.equals.compare.arrays.comment")); buffer.append("\n"); } ARRAY_COMPARER_MF.format(getComparerFormatParameters(field), buffer, null); } | addArrayEquals |
29,593 | Object[] (PsiField field) { return new Object[]{myClassInstanceName, field.getName()}; } | getComparerFormatParameters |
29,594 | void (StringBuffer buffer, PsiField field) { FIELD_COMPARER_MF.format(getComparerFormatParameters(field), buffer, null); } | addFieldComparison |
29,595 | void (@NonNls StringBuffer buffer) { if (myCheckParameterWithInstanceof) { buffer .append("if (!(") .append(myParameterName) .append(" instanceof ") .append(myClass.getName()) .append(")) return false\n"); } else { buffer .append("if (") .append(myParameterName) .append(" == null || getClass() != ") .append(myParameterName) .append(".class) return false\n"); } } | addInstanceOfToText |
29,596 | void (@NonNls StringBuffer buffer) { buffer.append("if (this.is(").append(myParameterName).append(")").append(") return true\n"); if (!superMethodExists(getEqualsSignature(myProject, myClass.getResolveScope()))) { addInstanceOfToText(buffer); } else { addInstanceOfToText(buffer); buffer.append("if (!super.equals("); buffer.append(myParameterName); buffer.append(")) return false\n"); } } | addEqualsPrologue |
29,597 | void (@NonNls StringBuffer buffer) { buffer.append("\n"); // A a = (A) object; JavaCodeStyleSettings settings = JavaCodeStyleSettings.getInstance(myFile); if (settings.GENERATE_FINAL_LOCALS) { buffer.append("final "); } buffer.append(myClass.getName()); buffer.append(" ").append(myClassInstanceName).append(" = ("); buffer.append(myClass.getName()); buffer.append(")"); buffer.append(myParameterName); buffer.append("\n\n"); } | addClassInstance |
29,598 | boolean (MethodSignature methodSignature) { LOG.assertTrue(myClass.isValid()); PsiMethod superEquals = MethodSignatureUtil.findMethodBySignature(myClass, methodSignature, true); if (superEquals == null) return true; if (superEquals.hasModifierProperty(PsiModifier.ABSTRACT)) return false; return !CommonClassNames.JAVA_LANG_OBJECT.equals(superEquals.getContainingClass().getQualifiedName()); } | superMethodExists |
29,599 | void (PsiField field, StringBuilder buffer, String tempName) { if (PsiTypes.doubleType().equals(field.getType())) { buffer.append(tempName); addTempForDoubleInitialization(field, buffer); } } | addTempAssignment |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.