Unnamed: 0
int64
0
305k
body
stringlengths
7
52.9k
name
stringlengths
1
185
12,600
String () { return variableSettings.getEnteredName(); }
getEnteredName
12,601
boolean () { return variableSettings.isReplaceAllOccurrences(); }
isReplaceAllOccurrences
12,602
boolean () { return variableSettings.isDeclareFinal(); }
isDeclareFinal
12,603
boolean () { return variableSettings.isReplaceLValues(); }
isReplaceLValues
12,604
PsiType () { return psiClassType; }
getSelectedType
12,605
boolean () { return variableSettings.isOK(); }
isOK
12,606
void (@NotNull PsiElement expression, @NotNull Editor editor) { IntroduceVariableHandler handler = new IntroduceLombokVariableHandler(selectedTypeFQN); handler.invoke(expression.getProject(), editor, (PsiExpression) expression); }
expandForChooseExpression
12,607
IntroduceVariableSettings (Project project, Editor editor, PsiExpression expr, PsiExpression[] occurrences, TypeSelectorManagerImpl typeSelectorManager, boolean declareFinalIfAll, boolean anyAssignmentLHS, InputValidator validator, PsiElement anchor, JavaReplaceChoice replaceChoice) { final IntroduceVariableSettings va...
getSettings
12,608
IntroduceVariableSettings (Project project, IntroduceVariableSettings variableSettings) { final PsiClassType psiClassType = PsiType.getTypeByName(selectedTypeFQN, project, GlobalSearchScope.projectScope(project)); return new IntroduceVariableSettingsDelegate(variableSettings, psiClassType); }
getIntroduceVariableSettings
12,609
String () { return "foo"; }
getEnteredName
12,610
boolean () { return false; }
isReplaceAllOccurrences
12,611
boolean () { return false; }
isDeclareFinal
12,612
boolean () { return false; }
isReplaceLValues
12,613
PsiType () { return expr.getType(); }
getSelectedType
12,614
boolean () { return true; }
isOK
12,615
boolean (@NotNull PsiElement element) { @Nullable PsiReferenceExpression psiReferenceExpression = PsiTreeUtil.getParentOfType(element, PsiReferenceExpression.class); if (psiReferenceExpression == null) { return false; } PsiElement psiElement = psiReferenceExpression.resolve(); if (!(psiElement instanceof PsiModifierLis...
isFiledNameConstants
12,616
boolean (@NotNull PsiElement element) { if (!(element instanceof PsiIdentifier)) { return false; } PsiField field = PsiTreeUtil.getParentOfType(element, PsiField.class); if (field == null) { return false; } final PsiAnnotation getterAnnotation = PsiAnnotationSearchUtil.findAnnotation(field, LombokClassNames.GETTER); re...
isLazyGetterHandled
12,617
boolean (@NotNull PsiElement element) { if (!(element instanceof PsiIdentifier)) { return false; } PsiElement parent = element.getParent(); if (!(parent instanceof PsiReferenceExpression)) { return false; } PsiElement qualifier = ((PsiReferenceExpression) parent).getQualifier(); if (qualifier == null) { return false; }...
isInitializedInConstructors
12,618
boolean (@Nullable PsiElement element, @NotNull PsiClassType exceptionType, PsiElement topElement) { PsiElement parent = PsiTreeUtil.getParentOfType(element, PsiLambdaExpression.class, PsiTryStatement.class, PsiMethod.class); if (parent instanceof PsiLambdaExpression) { // lambda it's another scope, @SneakyThrows annot...
isHandled
12,619
boolean (@NotNull PsiClassType exceptionType, PsiTryStatement topElement) { List<PsiType> caughtExceptions = ContainerUtil.map(topElement.getCatchBlockParameters(), PsiParameter::getType); return isExceptionHandled(exceptionType, caughtExceptions); }
isHandledByTryCatch
12,620
boolean (@NotNull PsiModifierListOwner psiModifierListOwner, PsiClassType exceptionClassType) { final PsiAnnotation psiAnnotation = PsiAnnotationSearchUtil.findAnnotation(psiModifierListOwner, LombokClassNames.SNEAKY_THROWS); if (psiAnnotation == null) { return false; } final Collection<PsiType> sneakedExceptionTypes =...
isExceptionHandled
12,621
boolean (@NotNull PsiClassType exceptionClassType, @NotNull Collection<PsiType> sneakedExceptionTypes) { for (PsiType sneakedExceptionType : sneakedExceptionTypes) { if (sneakedExceptionType.equalsToText(JAVA_LANG_THROWABLE) || sneakedExceptionType.equals(exceptionClassType)) { return true; } } final PsiClass unhandled...
isExceptionHandled
12,622
boolean (HighlightInfo highlightInfo, PsiFile file) { final String description = StringUtil.notNullize(highlightInfo.getDescription()); if (!(ANNOTATION_TYPE_EXPECTED.equals(description) || CANNOT_RESOLVE_SYMBOL_UNDERSCORES_MESSAGE.matcher(description).matches() || CANNOT_RESOLVE_METHOD_UNDERSCORES_MESSAGE.matcher(desc...
isOnXParameterAnnotation
12,623
boolean (HighlightInfo highlightInfo, PsiFile file) { if (!CANNOT_FIND_METHOD_VALUE_MESSAGE.equals(highlightInfo.getDescription())) { return false; } PsiElement highlightedElement = file.findElementAt(highlightInfo.getStartOffset()); PsiNameValuePair nameValuePair = findContainingNameValuePair(highlightedElement); if (...
isOnXParameterValue
12,624
PsiNameValuePair (PsiElement highlightedElement) { PsiElement nameValuePair = highlightedElement; while (!(nameValuePair == null || nameValuePair instanceof PsiNameValuePair)) { nameValuePair = nameValuePair.getContext(); } return (PsiNameValuePair) nameValuePair; }
findContainingNameValuePair
12,625
boolean (@NotNull PsiElement highlightedElement) { PsiField field = PsiTreeUtil.getParentOfType(highlightedElement, PsiField.class); if (field == null) { return false; } return PsiAnnotationSearchUtil.isAnnotatedWith(field, LombokClassNames.BUILDER_DEFAULT); }
isDefaultBuilderValue
12,626
ActionUpdateThread () { return ActionUpdateThread.BGT; }
getActionUpdateThread
12,627
void (@NotNull AnActionEvent e) { final Project project = e.getProject(); final boolean shouldShow = e.getData(CommonDataKeys.PSI_FILE) instanceof PsiJavaFile && project != null && LombokLibraryUtil.hasLombokLibrary(project); e.getPresentation().setEnabledAndVisible(shouldShow); }
update
12,628
boolean (@NotNull Project project, @NotNull Editor editor, @NotNull PsiFile file) { return file.isWritable() && super.isValidForFile(project, editor, file) && LombokLibraryUtil.hasLombokLibrary(project); }
isValidForFile
12,629
void (@NotNull PsiClass psiClass) { LombokProcessorManager manager = LombokProcessorManager.getInstance(); final Collection<AbstractLogProcessor> logProcessors = Arrays.asList( manager.getCommonsLogProcessor(), manager.getJBossLogProcessor(), manager.getLog4jProcessor(), manager.getLog4j2Processor(), manager.getLogProc...
processClass
12,630
void (@NotNull PsiField psiField, @NotNull PsiClass psiClass, @NotNull AbstractLogProcessor logProcessor, @NotNull String lombokLoggerName) { if (!lombokLoggerName.equals(psiField.getName())) { RenameProcessor processor = new RenameProcessor(psiField.getProject(), psiField, lombokLoggerName, false, false); processor.do...
processLoggerField
12,631
boolean (@NotNull PsiField psiField, @NotNull String lombokLoggerName, boolean lombokLoggerIsStatic) { if (!isValidLoggerField(psiField, lombokLoggerName, lombokLoggerIsStatic)) { String messageText = LombokBundle.message("dialog.message.logger.field.s.not.private.sfinal.field.named.s.refactor.anyway", psiField.getName...
checkLoggerField
12,632
boolean (@NotNull PsiField psiField, @NotNull String lombokLoggerName, boolean lombokLoggerIsStatic) { boolean isPrivate = psiField.hasModifierProperty(PsiModifier.PRIVATE); boolean isStatic = lombokLoggerIsStatic == psiField.hasModifierProperty(PsiModifier.STATIC); boolean isFinal = psiField.hasModifierProperty(PsiMod...
isValidLoggerField
12,633
void (@NotNull PsiClass psiClass) { final Map<PsiField, PsiMethod> fieldMethodMap = new HashMap<>(); for (PsiField psiField : psiClass.getFields()) { PsiMethod propertySetter = PropertyUtilBase.findPropertySetter(psiClass, psiField.getName(), psiField.hasModifierProperty(PsiModifier.STATIC), false); if (null != propert...
processClass
12,634
void (@NotNull PsiClass psiClass) { final PsiMethod equalsMethod = findPublicNonStaticMethod(psiClass, "equals", PsiTypes.booleanType(), PsiType.getJavaLangObject(psiClass.getManager(), psiClass.getResolveScope())); if (null != equalsMethod) { equalsMethod.delete(); } final PsiMethod hashCodeMethod = findPublicNonStati...
processClass
12,635
void (@NotNull Project project, @NotNull Editor editor, @NotNull PsiFile file) { if (file.isWritable()) { PsiClass psiClass = OverrideImplementUtil.getContextClass(project, editor, file, false); if (null != psiClass) { processClass(psiClass); UndoUtil.markPsiFileForUndo(file); } } }
invoke
12,636
void (@NotNull Map<PsiField, PsiMethod> fieldMethodMap, @NotNull PsiClass psiClass, String annotationClassName) { if (fieldMethodMap.isEmpty()) { return; } final PsiMethod firstPropertyMethod = fieldMethodMap.values().iterator().next(); final boolean useAnnotationOnClass = haveAllMethodsSameAccessLevel(fieldMethodMap.v...
processIntern
12,637
boolean (PsiClass psiClass, PsiMethod firstPropertyMethod, String annotationClassName) { final PsiAnnotation presentAnnotation = PsiAnnotationSearchUtil.findAnnotation(psiClass, annotationClassName); if (null != presentAnnotation) { final String presentAccessModifier = LombokProcessorUtil.getMethodModifier(presentAnnot...
isNotAnnotatedWithOrSameAccessLevelAs
12,638
boolean (Collection<PsiMethod> psiMethods) { final Set<Integer> accessLevelSet = new HashSet<>(); for (PsiMethod psiMethod : psiMethods) { accessLevelSet.add(PsiUtil.getAccessLevel(psiMethod.getModifierList())); } return accessLevelSet.size() <= 1; }
haveAllMethodsSameAccessLevel
12,639
void (@NotNull PsiModifierListOwner targetElement, @NotNull PsiModifierListOwner sourceElement, String annotationClassName) { final PsiAnnotation newPsiAnnotation = LombokProcessorUtil.createAnnotationWithAccessLevel(sourceElement, annotationClassName); addAnnotation(targetElement, newPsiAnnotation, annotationClassName...
addAnnotation
12,640
void (@NotNull PsiClass targetElement, String annotationClassName) { final PsiAnnotation newPsiAnnotation = PsiAnnotationUtil.createPsiAnnotation(targetElement, annotationClassName); addAnnotation(targetElement, newPsiAnnotation, annotationClassName); }
addAnnotation
12,641
void (@NotNull PsiModifierListOwner targetElement, @NotNull PsiAnnotation newPsiAnnotation, String annotationClassName) { final PsiAnnotation presentAnnotation = PsiAnnotationSearchUtil.findAnnotation(targetElement, annotationClassName); final Project project = targetElement.getProject(); final JavaCodeStyleManager jav...
addAnnotation
12,642
void (@NotNull PsiModifierListOwner targetElement, String annotationClassName) { final PsiAnnotation psiAnnotation = PsiAnnotationSearchUtil.findAnnotation(targetElement, annotationClassName); if (null != psiAnnotation) { boolean hasOnlyDefaultValues = true; final PsiAnnotationParameterList psiAnnotationParameterList =...
removeDefaultAnnotation
12,643
PsiMethod (@NotNull PsiClass psiClass, @NotNull String methodName, @NotNull PsiType returnType, PsiType... params) { final PsiMethod[] toStringMethods = psiClass.findMethodsByName(methodName, false); for (PsiMethod method : toStringMethods) { if (method.hasModifierProperty(PsiModifier.PUBLIC) && !method.hasModifierProp...
findPublicNonStaticMethod
12,644
void (@NotNull PsiClass psiClass) { final PsiElementFactory factory = JavaPsiFacade.getElementFactory(psiClass.getProject()); final PsiClassType stringClassType = factory.createTypeByFQClassName(CommonClassNames.JAVA_LANG_STRING, psiClass.getResolveScope()); final PsiMethod toStringMethod = findPublicNonStaticMethod(ps...
processClass
12,645
void (@NotNull PsiClass psiClass) { final Map<PsiField, PsiMethod> fieldMethodMap = new HashMap<>(); for (PsiField psiField : psiClass.getFields()) { PsiMethod propertyGetter = PropertyUtilBase.findPropertyGetter(psiClass, psiField.getName(), psiField.hasModifierProperty(PsiModifier.STATIC), false); if (null != propert...
processClass
12,646
void (@NotNull PsiClass psiClass) { for (BaseLombokHandler handler : handlers) { handler.processClass(psiClass); } removeDefaultAnnotation(psiClass, LombokClassNames.GETTER); removeDefaultAnnotation(psiClass, LombokClassNames.SETTER); removeDefaultAnnotation(psiClass, LombokClassNames.TO_STRING); removeDefaultAnnotatio...
processClass
12,647
DelombokHandler () { LombokProcessorManager manager = LombokProcessorManager.getInstance(); return new DelombokHandler( manager.getWitherProcessor(), manager.getWitherFieldProcessor()); }
createHandler
12,648
DelombokHandler () { LombokProcessorManager manager = LombokProcessorManager.getInstance(); return new DelombokHandler( manager.getCommonsLogProcessor(), manager.getJBossLogProcessor(), manager.getLog4jProcessor(), manager.getLog4j2Processor(), manager.getLogProcessor(), manager.getSlf4jProcessor(), manager.getXSlf4jPr...
createHandler
12,649
DelombokHandler () { LombokProcessorManager manager = LombokProcessorManager.getInstance(); return new DelombokHandler( manager.getAllArgsConstructorProcessor(), manager.getNoArgsConstructorProcessor(), manager.getRequiredArgsConstructorProcessor()); }
createHandler
12,650
DelombokHandler () { return new DelombokHandler(true, LombokProcessorManager.getInstance().getStandardExceptionProcessor()); }
createHandler
12,651
ActionUpdateThread () { return ActionUpdateThread.BGT; }
getActionUpdateThread
12,652
DelombokHandler () { if (null == myHandler) { myHandler = createHandler(); } return myHandler; }
getHandler
12,653
void (@NotNull AnActionEvent event) { final Project project = event.getProject(); if (project == null) { return; } final PsiDocumentManager psiDocumentManager = PsiDocumentManager.getInstance(project); psiDocumentManager.commitAllDocuments(); final DataContext dataContext = event.getDataContext(); final Editor editor =...
actionPerformed
12,654
void (@NotNull final Project project, @NotNull VirtualFile vFile) { VfsUtilCore.visitChildrenRecursively(vFile, new VirtualFileVisitor<Void>() { @Override public boolean visitFile(@NotNull VirtualFile file) { if (!file.isDirectory()) { processFile(project, file); } return true; } }); }
processDirectory
12,655
boolean (@NotNull VirtualFile file) { if (!file.isDirectory()) { processFile(project, file); } return true; }
visitFile
12,656
void (Project project, VirtualFile file) { if (JavaFileType.INSTANCE.equals(file.getFileType())) { final PsiManager psiManager = PsiManager.getInstance(project); PsiJavaFile psiFile = (PsiJavaFile) psiManager.findFile(file); if (psiFile != null) { process(project, psiFile); } } }
processFile
12,657
void (@NotNull final Project project, @NotNull final PsiJavaFile psiJavaFile) { executeCommand(project, () -> getHandler().invoke(project, psiJavaFile)); }
process
12,658
void (@NotNull final Project project, @NotNull final PsiFile psiFile, @NotNull final PsiClass psiClass) { executeCommand(project, () -> getHandler().invoke(project, psiFile, psiClass)); }
process
12,659
void (final Project project, final Runnable action) { CommandProcessor.getInstance().executeCommand(project, () -> ApplicationManager.getApplication().runWriteAction(action), getCommandName(), null); }
executeCommand
12,660
void (@NotNull AnActionEvent event) { final Presentation presentation = event.getPresentation(); final DataContext dataContext = event.getDataContext(); final Project project = event.getProject(); if (project == null || !LombokLibraryUtil.hasLombokLibrary(project)) { presentation.setEnabled(false); return; } final Edit...
update
12,661
boolean (@NotNull PsiClass psiClass) { if (psiClass.isInterface()) { return false; } Collection<PsiAnnotation> psiAnnotations = getHandler().collectProcessableAnnotations(psiClass); if (!psiAnnotations.isEmpty()) { return true; } final Collection<PsiClass> classesIntern = PsiClassUtil.collectInnerClassesIntern(psiClass...
isValidForClass
12,662
PsiClass (Editor editor, PsiFile file) { int offset = editor.getCaretModel().getOffset(); PsiElement element = file.findElementAt(offset); if (element == null) { return null; } final PsiClass target = PsiTreeUtil.getParentOfType(element, PsiClass.class); return target instanceof SyntheticElement ? null : target; }
getTargetClass
12,663
boolean (@NotNull Editor editor, @NotNull PsiFile file) { if (!(file instanceof PsiJavaFile)) { return false; } if (file instanceof PsiCompiledElement) { return false; } if (!file.isWritable()) { return false; } PsiClass targetClass = getTargetClass(editor, file); return targetClass != null && isValidForClass(targetCla...
isValidForFile
12,664
String () { String text = getTemplatePresentation().getText(); return text == null ? "" : text; }
getCommandName
12,665
DelombokHandler () { LombokProcessorManager manager = LombokProcessorManager.getInstance(); return new DelombokHandler(true, manager.getBuilderPreDefinedInnerClassFieldProcessor(), manager.getBuilderPreDefinedInnerClassMethodProcessor(), manager.getBuilderClassProcessor(), manager.getBuilderClassMethodProcessor(), mana...
createHandler
12,666
DelombokHandler () { return new DelombokHandler(LombokProcessorManager.getInstance().getEqualsAndHashCodeProcessor()); }
createHandler
12,667
DelombokHandler () { LombokProcessorManager manager = LombokProcessorManager.getInstance(); return new DelombokHandler(true, manager.getFieldNameConstantsOldProcessor(), manager.getFieldNameConstantsFieldProcessor(), manager.getFieldNameConstantsProcessor(), manager.getFieldNameConstantsPredefinedInnerClassFieldProcess...
createHandler
12,668
DelombokHandler () { LombokProcessorManager manager = LombokProcessorManager.getInstance(); return new DelombokHandler( manager.getGetterProcessor(), manager.getGetterFieldProcessor()); }
createHandler
12,669
DelombokHandler () { return new DelombokHandler(LombokProcessorManager.getInstance().getToStringProcessor()); }
createHandler
12,670
DelombokHandler () { return new DelombokHandler(true, LombokProcessorManager.getInstance().getUtilityClassProcessor()); }
createHandler
12,671
DelombokHandler () { return new DelombokHandler(LombokProcessorManager.getInstance().getDataProcessor()); }
createHandler
12,672
DelombokHandler () { LombokProcessorManager manager = LombokProcessorManager.getInstance(); return new DelombokHandler( manager.getSetterProcessor(), manager.getSetterFieldProcessor()); }
createHandler
12,673
DelombokHandler () { LombokProcessorManager manager = LombokProcessorManager.getInstance(); return new DelombokHandler(true, manager.getRequiredArgsConstructorProcessor(), manager.getAllArgsConstructorProcessor(), manager.getNoArgsConstructorProcessor(), manager.getDataProcessor(), manager.getGetterProcessor(), manager...
createHandler
12,674
DelombokHandler () { LombokProcessorManager manager = LombokProcessorManager.getInstance(); return new DelombokHandler( manager.getDelegateFieldProcessor(), manager.getDelegateMethodProcessor()); }
createHandler
12,675
DelombokHandler () { LombokProcessorManager manager = LombokProcessorManager.getInstance(); return new DelombokHandler(true, manager.getSuperBuilderPreDefinedInnerClassFieldProcessor(), manager.getSuperBuilderPreDefinedInnerClassMethodProcessor(), manager.getSuperBuilderClassProcessor(), manager.getSuperBuilderProcesso...
createHandler
12,676
DelombokHandler () { return new DelombokHandler(LombokProcessorManager.getInstance().getValueProcessor()); }
createHandler
12,677
void (@NotNull Project project, @NotNull PsiFile psiFile, @NotNull PsiClass psiClass) { if (psiFile.isWritable()) { invoke(project, psiClass, processInnerClasses); finish(project, psiFile); } }
invoke
12,678
void (@NotNull Project project, @NotNull PsiJavaFile psiFile) { for (PsiClass psiClass : psiFile.getClasses()) { invoke(project, psiClass, true); } finish(project, psiFile); }
invoke
12,679
void (Project project, PsiClass psiClass, boolean processInnerClasses) { Collection<PsiAnnotation> processedAnnotations = new HashSet<>(); processModifierList(psiClass); // get all inner classes before first lombok processing final PsiClass[] allInnerClasses = psiClass.getAllInnerClasses(); for (AbstractProcessor lombo...
invoke
12,680
void (Project project, PsiFile psiFile) { JavaCodeStyleManager.getInstance(project).optimizeImports(psiFile); UndoUtil.markPsiFileForUndo(psiFile); }
finish
12,681
Collection<PsiAnnotation> (@NotNull Project project, @NotNull PsiClass psiClass, @NotNull AbstractProcessor lombokProcessor) { Collection<PsiAnnotation> psiAnnotations = lombokProcessor.collectProcessedAnnotations(psiClass); final List<? super PsiElement> psiElements = lombokProcessor.process(psiClass); if (lombokProce...
processClass
12,682
void (@NotNull PsiClass psiClass) { rebuildModifierList(psiClass); PsiClassUtil.collectClassFieldsIntern(psiClass).forEach(DelombokHandler::rebuildModifierList); PsiClassUtil.collectClassMethodsIntern(psiClass).forEach(DelombokHandler::rebuildModifierList); PsiClassUtil.collectClassStaticMethodsIntern(psiClass).forEach...
processModifierList
12,683
void (@NotNull PsiModifierListOwner modifierListOwner) { final PsiModifierList modifierList = modifierListOwner.getModifierList(); if (null != modifierList) { final Set<String> lombokModifiers = new HashSet<>(); LombokProcessorManager.getLombokModifierProcessors().forEach(modifierProcessor -> { if (modifierProcessor.is...
rebuildModifierList
12,684
void (@NotNull PsiModifierListOwner psiModifierListOwner) { final Collection<String> augmentedAnnotations = psiModifierListOwner.getUserData(LombokUserDataKeys.AUGMENTED_ANNOTATIONS); final PsiModifierList psiModifierList = psiModifierListOwner.getModifierList(); if (null != augmentedAnnotations && !augmentedAnnotation...
postProcessAugmentedAnnotations
12,685
void (Project project, PsiClass psiClass, List<? super PsiElement> psiElements) { //add generated elements in generated/declaration order, but before existing Fields if (!psiElements.isEmpty()) { final PsiField existingField = PsiClassUtil.collectClassFieldsIntern(psiClass).stream().findFirst().orElse(null); Iterator<?...
rebuildElementsBeforeExistingFields
12,686
void (Project project, PsiClass psiClass, List<? super PsiElement> psiElements) { for (Object psiElement : psiElements) { final PsiElement element = rebuildPsiElement(project, (PsiElement)psiElement); if (null != element) { psiClass.add(element); } } }
rebuildElements
12,687
Collection<PsiAnnotation> (@NotNull PsiClass psiClass) { Collection<PsiAnnotation> result = new ArrayList<>(); for (AbstractProcessor lombokProcessor : lombokProcessors) { result.addAll(lombokProcessor.collectProcessedAnnotations(psiClass)); } return result; }
collectProcessableAnnotations
12,688
PsiElement (@NotNull Project project, PsiElement psiElement) { if (psiElement instanceof PsiMethod) { return rebuildMethod(project, (PsiMethod)psiElement); } else if (psiElement instanceof PsiField) { return rebuildField(project, (PsiField)psiElement); } else if (psiElement instanceof PsiClass) { if (((PsiClass)psiElem...
rebuildPsiElement
12,689
PsiClass (@NotNull Project project, @NotNull PsiClass fromClass) { final PsiElementFactory elementFactory = JavaPsiFacade.getElementFactory(project); final PsiClass resultClass = elementFactory.createEnum(StringUtil.defaultIfEmpty(fromClass.getName(), "UnknownClassName")); copyModifiers(fromClass.getModifierList(), res...
rebuildEnum
12,690
PsiClass (@NotNull Project project, @NotNull PsiClass fromClass) { final PsiElementFactory elementFactory = JavaPsiFacade.getElementFactory(project); PsiClass resultClass = elementFactory.createClass(StringUtil.defaultIfEmpty(fromClass.getName(), "UnknownClassName")); copyModifiers(fromClass.getModifierList(), resultCl...
rebuildClass
12,691
PsiMethod (@NotNull Project project, @NotNull PsiMethod fromMethod) { final PsiElementFactory elementFactory = JavaPsiFacade.getElementFactory(project); final PsiMethod resultMethod; final PsiType returnType = fromMethod.getReturnType(); if (null == returnType) { resultMethod = elementFactory.createConstructor(fromMeth...
rebuildMethod
12,692
void (@NotNull PsiModifierList fromModifierList, @NotNull PsiModifierList toModifierList) { for (PsiAnnotation originalAnnotation : fromModifierList.getAnnotations()) { final String annotationQualifiedName = originalAnnotation.getQualifiedName(); if (!StringUtil.isEmptyOrSpaces(annotationQualifiedName)) { AddAnnotation...
copyAnnotations
12,693
void (@NotNull PsiTypeParameterListOwner listOwner, @NotNull PsiTypeParameterListOwner resultOwner) { final PsiTypeParameterList resultOwnerTypeParameterList = resultOwner.getTypeParameterList(); if (null != resultOwnerTypeParameterList) { final PsiElementFactory elementFactory = JavaPsiFacade.getElementFactory(resultO...
rebuildTypeParameter
12,694
String (@NotNull PsiTypeParameter typeParameter) { final PsiClassType[] referencedTypes = typeParameter.getExtendsList().getReferencedTypes(); String extendsText = ""; if (referencedTypes.length > 0) { extendsText = Stream.of(referencedTypes).map(DelombokHandler::getTypeWithParameter) .collect(Collectors.joining(" & ",...
getTypeParameterAsString
12,695
String (@NotNull PsiClassType psiClassType) { if (psiClassType instanceof PsiClassReferenceType) { return ((PsiClassReferenceType)psiClassType).getReference().getText(); } return psiClassType.getName(); }
getTypeWithParameter
12,696
void (PsiModifierList fromModifierList, PsiModifierList resultModifierList) { for (String modifier : PsiModifier.MODIFIERS) { resultModifierList.setModifierProperty(modifier, fromModifierList.hasExplicitModifier(modifier)); } }
copyModifiers
12,697
PsiField (@NotNull Project project, @NotNull PsiField fromField) { final PsiElementFactory elementFactory = JavaPsiFacade.getElementFactory(project); final PsiField resultField; if (fromField instanceof PsiEnumConstant) { resultField = elementFactory.createEnumConstantFromText(fromField.getName(), fromField.getContext(...
rebuildField
12,698
boolean (PsiElement element) { return element instanceof LombokLightMethodBuilder && element.getLanguage() == JavaLanguage.INSTANCE; }
canInlineElement
12,699
void (final Project project, Editor editor, PsiElement element) { performInline(project, editor, (PsiMethod) element, true); }
inlineElement