Unnamed: 0 int64 0 305k | body stringlengths 7 52.9k | name stringlengths 1 185 |
|---|---|---|
12,200 | LightProjectDescriptor () { return LombokTestUtil.LOMBOK_NEW_DESCRIPTOR; } | getProjectDescriptor |
12,201 | String () { return "java.lang.Deprecated"; } | annotationToComparePattern |
12,202 | LightProjectDescriptor () { return LombokTestUtil.LOMBOK_OLD_DESCRIPTOR; } | getProjectDescriptor |
12,203 | boolean () { return false; } | shouldCompareCodeBlocks |
12,204 | String[] () { return new String[] { "", "abc", "abc def ()", "C.m()()())", "C C.m(123)" }; } | invalid |
12,205 | String[] () { return new String[] { "123 456.789()", "A B . . . ()" }; } | invalidButPassing |
12,206 | String[] () { return new String[] { "A.m()", "A A.m()", "A.m()(NAME,TOPIC)" }; } | validType |
12,207 | String[] () { return new String[] { "A B.m()", "B.m()", "B.m(NAME,NULL)(TOPIC)" }; } | validInitializer |
12,208 | String[] () { return new String[] { "B.m(XYZ)", "B.m()()", "B.m(NAME,,NULL)", "B.m(NAME)(NAME,TOPIC)(NULL)", "B.m(NAME)(NAME,TOPIC)(NULL,TOPIC)" }; } | invalidParameters |
12,209 | T[] () { return new T[] { t("B.m()", null, asList()), t("B.m(NAME)", null, asList(LoggerInitializerParameter.NAME)), t("B.m(TYPE)", null, asList(LoggerInitializerParameter.TYPE)), t("B.m(NULL)", null, asList(LoggerInitializerParameter.NULL)), t("B.m(NAME,NULL,NAME)", null, asList(LoggerInitializerParameter.NAME, LoggerInitializerParameter.NULL, LoggerInitializerParameter.NAME)), t("B.m(NAME,TOPIC)", asList(LoggerInitializerParameter.NAME, LoggerInitializerParameter.TOPIC), null), t("B.m(TOPIC,TOPIC)(NULL)", asList(LoggerInitializerParameter.TOPIC, LoggerInitializerParameter.TOPIC), asList(LoggerInitializerParameter.NULL)), t("B.m()(TOPIC,TYPE)", asList(LoggerInitializerParameter.TOPIC, LoggerInitializerParameter.TYPE), asList()) }; } | validParameters |
12,210 | T (String input, List<LoggerInitializerParameter> withTopic, List<LoggerInitializerParameter> withoutTopic) { return new T(input, new LoggerInitializerDeclaration(withTopic, withoutTopic)); } | t |
12,211 | String () { return super.getBasePath() + "/augment/modifier"; } | getBasePath |
12,212 | void () { PsiFile file = myFixture.configureByFile(getTestName(false) + ".java"); PsiLocalVariable var = PsiTreeUtil.getParentOfType(file.findElementAt(myFixture.getCaretOffset()), PsiLocalVariable.class); assertNotNull(var); assertNotNull(var.getModifierList()); assertTrue("val should make variable final", var.getModifierList().hasModifierProperty(PsiModifier.FINAL)); } | testValModifiers |
12,213 | void () { PsiFile file = myFixture.configureByText("a.java", "import lombok.val;\nclass Foo { {val o = <caret>;} }"); PsiLocalVariable var = PsiTreeUtil.getParentOfType(file.findElementAt(myFixture.getCaretOffset()), PsiLocalVariable.class); assertNotNull(var); PsiType type1 = var.getType(); assertNotNull(type1); assertEquals("lombok.val", type1.getCanonicalText(false)); myFixture.type('1'); PsiDocumentManager.getInstance(getProject()).commitAllDocuments(); assertTrue(var.isValid()); assertNotNull(var.getModifierList()); assertTrue("val should make variable final", var.getModifierList().hasModifierProperty(PsiModifier.FINAL)); } | testValModifiersEditing |
12,214 | String () { return super.getBasePath() + "/augment/modifier"; } | getBasePath |
12,215 | void () { PsiFile file = myFixture.configureByFile(getTestName(false) + ".java"); PsiField field = PsiTreeUtil.getParentOfType(file.findElementAt(myFixture.getCaretOffset()), PsiField.class); assertNotNull(field); assertNotNull(field.getModifierList()); PsiElement parent = field.getParent(); assertNotNull(parent); assertTrue(parent instanceof PsiClass); PsiClass parentClass = (PsiClass) parent; assertNotNull(parentClass.getModifierList()); assertTrue("@UtilityClass should make parent class final", parentClass.getModifierList().hasModifierProperty(PsiModifier.FINAL)); assertTrue("@UtilityClass should make field static", field.getModifierList().hasModifierProperty(PsiModifier.STATIC)); } | testUtilityClassModifiersField |
12,216 | void () { PsiFile file = myFixture.configureByFile(getTestName(false) + ".java"); PsiClass innerClass = PsiTreeUtil.getParentOfType(file.findElementAt(myFixture.getCaretOffset()), PsiClass.class); assertNotNull(innerClass); assertNotNull(innerClass.getModifierList()); PsiElement parent = innerClass.getParent(); assertNotNull(parent); assertTrue(parent instanceof PsiClass); PsiClass parentClass = (PsiClass) parent; assertNotNull(parentClass.getModifierList()); assertTrue("@UtilityClass should make parent class final", ((PsiClass) innerClass.getParent()).getModifierList().hasModifierProperty(PsiModifier.FINAL)); assertTrue("@UtilityClass should make inner class static", innerClass.getModifierList().hasModifierProperty(PsiModifier.STATIC)); } | testUtilityClassModifiersInnerClass |
12,217 | void () { PsiFile file = myFixture.configureByFile(getTestName(false) + ".java"); PsiMethod method = PsiTreeUtil.getParentOfType(file.findElementAt(myFixture.getCaretOffset()), PsiMethod.class); assertNotNull(method); assertNotNull(method.getModifierList()); PsiElement parent = method.getParent(); assertNotNull(parent); assertTrue(parent instanceof PsiClass); PsiClass parentClass = (PsiClass) parent; assertNotNull(parentClass.getModifierList()); assertTrue("@UtilityClass should make parent class final", ((PsiClass) method.getParent()).getModifierList().hasModifierProperty(PsiModifier.FINAL)); assertTrue("@UtilityClass should make method static", method.getModifierList().hasModifierProperty(PsiModifier.STATIC)); } | testUtilityClassModifiersMethod |
12,218 | String () { return super.getBasePath() + "/augment/modifier"; } | getBasePath |
12,219 | void () { PsiModifierList modifierList = getFieldModifierListAtCaret(); assertFalse("@FieldDefaults(makeFinal = true) should not make static field final", modifierList.hasModifierProperty(PsiModifier.FINAL)); assertTrue("@FieldDefaults(makeFinal = true) should keep static field package local", modifierList.hasModifierProperty(PsiModifier.PACKAGE_LOCAL)); } | testFieldDefaultsStaticFinal |
12,220 | void () { PsiModifierList modifierList = getFieldModifierListAtCaret(); assertTrue("@FieldDefaults(makeFinal = true) should make all @NonFinal fields final", modifierList.hasModifierProperty(PsiModifier.FINAL)); assertTrue("@FieldDefaults(makeFinal = true) should keep fields package local", modifierList.hasModifierProperty(PsiModifier.PACKAGE_LOCAL)); } | testFieldDefaultsFinal |
12,221 | void () { PsiModifierList modifierList = getFieldModifierListAtCaret(); assertFalse("@FieldDefaults(makeFinal = false) should make all @NonFinal fields final", modifierList.hasModifierProperty(PsiModifier.FINAL)); assertTrue("@FieldDefaults(makeFinal = false) should keep fields package local", modifierList.hasModifierProperty(PsiModifier.PACKAGE_LOCAL)); } | testFieldDefaultsFinalFalse |
12,222 | void () { PsiModifierList modifierList = getFieldModifierListAtCaret(); assertFalse("@FieldDefaults(makeFinal = true) should not make @NonFinal fields final", modifierList.hasModifierProperty(PsiModifier.FINAL)); } | testFieldDefaultsWithNonFinal |
12,223 | void () { PsiModifierList modifierList = getFieldModifierListAtCaret(); assertFalse("@FieldDefaults(makeFinal = true) should not make @UtilityClass fields final", modifierList.hasModifierProperty(PsiModifier.FINAL)); } | testFieldDefaultsWithUtilityClass |
12,224 | void () { PsiModifierList modifierList = getFieldModifierListAtCaret(); assertFalse("@FieldDefaults should not make static field private", modifierList.hasModifierProperty(PsiModifier.PRIVATE)); assertTrue("@FieldDefaults should keep static field package local", modifierList.hasModifierProperty(PsiModifier.PACKAGE_LOCAL)); } | testFieldDefaultsStaticPrivate |
12,225 | void () { PsiModifierList modifierList = getFieldModifierListAtCaret(); assertFalse("@FieldDefaults should not make fields public", modifierList.hasModifierProperty(PsiModifier.PUBLIC)); assertFalse("@FieldDefaults should not make fields protected", modifierList.hasModifierProperty(PsiModifier.PROTECTED)); assertFalse("@FieldDefaults should not make fields private", modifierList.hasModifierProperty(PsiModifier.PRIVATE)); assertTrue("@FieldDefaults should keep fields as package-private", modifierList.hasModifierProperty(PsiModifier.PACKAGE_LOCAL)); } | testFieldDefaultsNone |
12,226 | void () { PsiModifierList modifierList = getFieldModifierListAtCaret(); assertTrue("@FieldDefaults(level = AccessLevel.PUBLIC) should make non-@PackagePrivate fields public", modifierList.hasModifierProperty(PsiModifier.PUBLIC)); assertFalse("@FieldDefaults(level = AccessLevel.PUBLIC) should not make fields package-private", modifierList.hasModifierProperty(PsiModifier.PACKAGE_LOCAL)); assertFalse("@FieldDefaults(level = AccessLevel.PUBLIC) should not make fields protected", modifierList.hasModifierProperty(PsiModifier.PROTECTED)); assertFalse("@FieldDefaults(level = AccessLevel.PUBLIC) should not make fields private", modifierList.hasModifierProperty(PsiModifier.PRIVATE)); } | testFieldDefaultsPublic |
12,227 | void () { PsiModifierList modifierList = getFieldModifierListAtCaret(); assertFalse("@FieldDefaults(level = AccessLevel.PROTECTED) should not make fields public", modifierList.hasModifierProperty(PsiModifier.PUBLIC)); assertFalse("@FieldDefaults(level = AccessLevel.PROTECTED) should not make fields package-private", modifierList.hasModifierProperty(PsiModifier.PACKAGE_LOCAL)); assertTrue("@FieldDefaults(level = AccessLevel.PROTECTED) should non-@PackagePrivate make fields protected", modifierList.hasModifierProperty(PsiModifier.PROTECTED)); assertFalse("@FieldDefaults(level = AccessLevel.PROTECTED) should not make fields private", modifierList.hasModifierProperty(PsiModifier.PRIVATE)); } | testFieldDefaultsProtected |
12,228 | void () { PsiModifierList modifierList = getFieldModifierListAtCaret(); assertFalse("@FieldDefaults(level = AccessLevel.PRIVATE) should not make fields public", modifierList.hasModifierProperty(PsiModifier.PUBLIC)); assertFalse("@FieldDefaults(level = AccessLevel.PRIVATE) should not make fields protected", modifierList.hasModifierProperty(PsiModifier.PROTECTED)); assertFalse("@FieldDefaults(level = AccessLevel.PRIVATE) should not make fields package-private", modifierList.hasModifierProperty(PsiModifier.PACKAGE_LOCAL)); assertTrue("@FieldDefaults(level = AccessLevel.PRIVATE) should make non-@PackagePrivate fields private", modifierList.hasModifierProperty(PsiModifier.PRIVATE)); } | testFieldDefaultsPrivate |
12,229 | void () { PsiModifierList modifierList = getFieldModifierListAtCaret(); assertFalse("@FieldDefaults(level = AccessLevel.PUBLIC) should not make @PackagePrivate fields public", modifierList.hasModifierProperty(PsiModifier.PUBLIC)); assertTrue("@FieldDefaults should keep @PackagePrivate fields package-private", modifierList.hasModifierProperty(PsiModifier.PACKAGE_LOCAL)); } | testFieldDefaultsPublicWithPackagePrivate |
12,230 | void () { PsiModifierList modifierList = getFieldModifierListAtCaret(); assertFalse("@FieldDefaults should not touch fields with explicit modifier", modifierList.hasModifierProperty(PsiModifier.PUBLIC)); assertTrue("@FieldDefaults should keep explicit modifier intact", modifierList.hasModifierProperty(PsiModifier.PROTECTED)); } | testFieldDefaultsWithExplicitModifier |
12,231 | PsiModifierList () { PsiFile file = loadToPsiFile(getTestName(false) + ".java"); PsiField field = PsiTreeUtil.getParentOfType(file.findElementAt(myFixture.getCaretOffset()), PsiField.class); assertNotNull(field); PsiModifierList modifierList = field.getModifierList(); assertNotNull(modifierList); return modifierList; } | getFieldModifierListAtCaret |
12,232 | String () { return super.getBasePath() + "/augment/modifier"; } | getBasePath |
12,233 | void () { PsiFile file = myFixture.configureByFile(getTestName(false) + ".java"); PsiLocalVariable var = PsiTreeUtil.getParentOfType(file.findElementAt(myFixture.getCaretOffset()), PsiLocalVariable.class); assertNotNull(var); assertNotNull(var.getModifierList()); boolean isFinal = var.getModifierList().hasModifierProperty(PsiModifier.FINAL); assertFalse("var doesn't make variable final", isFinal); } | testVarModifiers |
12,234 | void () { PsiFile file = myFixture.configureByFile(getTestName(false) + ".java"); PsiLocalVariable var = PsiTreeUtil.getParentOfType(file.findElementAt(myFixture.getCaretOffset()), PsiLocalVariable.class); assertNotNull(var); assertNotNull(var.getType()); myFixture.type('1'); PsiDocumentManager.getInstance(getProject()).commitAllDocuments(); assertTrue(var.isValid()); assertEquals(PsiTypes.intType(), var.getType()); assertNotNull(var.getModifierList()); boolean isFinal = var.getModifierList().hasModifierProperty(PsiModifier.FINAL); assertFalse("var doesn't make variable final", isFinal); } | testVarModifiersEditing |
12,235 | String () { return super.getBasePath() + "/augment/modifier"; } | getBasePath |
12,236 | void () { PsiFile file = myFixture.configureByFile(getTestName(false) + ".java"); PsiField field = PsiTreeUtil.getParentOfType(file.findElementAt(myFixture.getCaretOffset()), PsiField.class); assertNotNull(field); assertNotNull(field.getModifierList()); assertTrue("@Value should make variable final", field.getModifierList().hasModifierProperty(PsiModifier.FINAL)); assertTrue("@Value should make variable private", field.getModifierList().hasModifierProperty(PsiModifier.PRIVATE)); PsiClass clazz = PsiTreeUtil.getParentOfType(field, PsiClass.class); assertNotNull(clazz); PsiModifierList list = clazz.getModifierList(); assertNotNull(list); assertTrue("@Value should make class final", list.hasModifierProperty(PsiModifier.FINAL)); assertFalse("@Value should not make class private", list.hasModifierProperty(PsiModifier.PRIVATE)); assertFalse("@Value should not make class static", list.hasModifierProperty(PsiModifier.STATIC)); } | testValueModifiers |
12,237 | void () { PsiFile file = myFixture.configureByFile(getTestName(false) + ".java"); PsiField field = PsiTreeUtil.getParentOfType(file.findElementAt(myFixture.getCaretOffset()), PsiField.class); assertNotNull(field); assertNotNull(field.getModifierList()); assertFalse("@Value should not make static variable final", field.getModifierList().hasModifierProperty(PsiModifier.FINAL)); assertFalse("@Value should not make static variable private", field.getModifierList().hasModifierProperty(PsiModifier.PRIVATE)); } | testValueModifiersStatic |
12,238 | String () { return TEST_DATA_INTENTION_DIRECTORY; } | getBasePath |
12,239 | void () { doTest(true); } | doTest |
12,240 | void (boolean intentionAvailable) { loadToPsiFile(getTestName(false) + ".java"); ModCommandAction intentionAction = getAction(); boolean isActuallyAvailable = intentionAction.getPresentation(myFixture.getActionContext()) != null; assertEquals("Intention \"" + intentionAction.getFamilyName() + "\" was not available at caret", intentionAvailable, isActuallyAvailable); if (isActuallyAvailable) { myFixture.launchAction(intentionAction.asIntention()); } assertTrue("Intention \"" + intentionAction.getFamilyName() + "\" was not properly invoked", wasInvocationSuccessful()); } | doTest |
12,241 | String () { return super.getBasePath() + "/replaceLombok"; } | getBasePath |
12,242 | ModCommandAction () { return new ReplaceWithLombokAnnotationAction(); } | getAction |
12,243 | boolean () { PsiElement elementAtCaret = myFixture.getFile().findElementAt(myFixture.getCaretOffset()); PsiField field = Optional.ofNullable(PsiTreeUtil.getParentOfType(elementAtCaret, PsiField.class)) .orElseGet(() -> PsiTreeUtil.findChildOfType(myFixture.getFile(), PsiField.class)); if (field == null) { return false; } return ContainerUtil.and(expectedAnnotations, field::hasAnnotation) && field.getAnnotations().length == expectedAnnotations.size() && Arrays.stream(field.getAnnotations()).map(LombokProcessorUtil::getMethodModifier).allMatch(expectedAnnotationAccessLevel::equals); } | wasInvocationSuccessful |
12,244 | void () { setExpectedAnnotations(LombokClassNames.GETTER); doTest(); } | testReplaceGetterFromField |
12,245 | void () { setExpectedAnnotations(LombokClassNames.SETTER); doTest(); } | testReplaceSetterFromField |
12,246 | void () { setExpectedAnnotations(LombokClassNames.GETTER, LombokClassNames.SETTER); doTest(); } | testReplaceAccessorsFromField |
12,247 | void () { setExpectedAnnotations(LombokClassNames.GETTER, LombokClassNames.SETTER); expectedAnnotationAccessLevel = PsiModifier.PRIVATE; doTest(); } | testReplacePrivateAccessorsFromField |
12,248 | void () { setExpectedAnnotations(LombokClassNames.GETTER, LombokClassNames.SETTER); expectedAnnotationAccessLevel = PsiModifier.PROTECTED; doTest(); } | testReplaceProtectedAccessorsFromField |
12,249 | void () { setExpectedAnnotations(LombokClassNames.GETTER, LombokClassNames.SETTER); expectedAnnotationAccessLevel = PsiModifier.PACKAGE_LOCAL; doTest(); } | testReplacePackageProtectedAccessorsFromField |
12,250 | void () { setExpectedAnnotations(LombokClassNames.GETTER); expectedAnnotationAccessLevel = PsiModifier.PROTECTED; doTest(); } | testReplaceGetterFromProtectedMethod |
12,251 | void () { setExpectedAnnotations(LombokClassNames.SETTER); expectedAnnotationAccessLevel = PsiModifier.PROTECTED; doTest(); } | testReplaceSetterFromProtectedMethod |
12,252 | void () { setExpectedAnnotations(); doTest(false); } | testNotReplaceIncorrectAccessors |
12,253 | void () { setExpectedAnnotations(); doTest(false); } | testNotReplaceSetterWithAdditionalCode |
12,254 | void () { setExpectedAnnotations(LombokClassNames.GETTER); doTest(); } | testReplaceGetterFromMethod |
12,255 | void () { setExpectedAnnotations(LombokClassNames.SETTER); doTest(); } | testReplaceSetterFromMethod |
12,256 | void () { setExpectedAnnotations(LombokClassNames.GETTER); doTest(); } | testReplaceGetterFromMethod2 |
12,257 | void () { setExpectedAnnotations(LombokClassNames.SETTER); doTest(); } | testReplaceSetterFromMethod2 |
12,258 | void () { setExpectedAnnotations(LombokClassNames.GETTER); doTest(); } | testReplaceGetterFromFieldNotCompleteMethod |
12,259 | void () { setExpectedAnnotations(LombokClassNames.SETTER); doTest(); } | testReplaceSetterFromFieldNotCompleteMethod |
12,260 | void () { setExpectedAnnotations(); doTest(false); } | testNotReplaceAbstractGetterFromField |
12,261 | void () { setExpectedAnnotations(); doTest(false); } | testNotReplaceAbstractSetterFromField |
12,262 | void () { setExpectedAnnotations(); doTest(false); } | testNotReplaceSetterWithWrongParamFromField |
12,263 | void (String... annotationNames) { expectedAnnotations = Set.of(annotationNames); } | setExpectedAnnotations |
12,264 | String () { return PlatformTestUtil.getCommunityPath().replace(File.separatorChar, '/'); } | getTestDataPath |
12,265 | boolean () { return true; } | shouldBeAvailableAfterExecution |
12,266 | LightProjectDescriptor () { return LombokTestUtil.LOMBOK_DESCRIPTOR; } | getProjectDescriptor |
12,267 | String () { return "/plugins/lombok/testData/intentions"; } | getBasePath |
12,268 | String () { return EXPLICIT_TO_VAL_VAR_DIRECTORY; } | getBasePath |
12,269 | void () { loadToPsiFile(getTestName(false) + ".java"); IntentionAction replaceExplicitTypeWithValIntentionAction = new ReplaceExplicitTypeWithValIntentionAction().asIntention(); IntentionAction replaceExplicitTypeWithVarIntentionAction = new ReplaceExplicitTypeWithVarIntentionAction().asIntention(); boolean foundVal = false; boolean foundVar = false; for (IntentionAction availableIntention : myFixture.getAvailableIntentions()) { if (availableIntention.getFamilyName().equals(replaceExplicitTypeWithValIntentionAction.getFamilyName())) { foundVal = true; } if (availableIntention.getFamilyName().equals(replaceExplicitTypeWithVarIntentionAction.getFamilyName())) { foundVar = true; } if (foundVal && foundVar) { break; } } assertTrue("Both intention actions should be available", foundVal && foundVar); } | testValAndVar |
12,270 | String () { return EXPLICIT_TO_VAL_VAR_DIRECTORY; } | getBasePath |
12,271 | ModCommandAction () { return new ReplaceExplicitTypeWithValIntentionAction(); } | getAction |
12,272 | boolean () { PsiElement elementAtCaret = myFixture.getFile().findElementAt(myFixture.getCaretOffset()); PsiLocalVariable localVariable = PsiTreeUtil.getParentOfType(elementAtCaret, PsiLocalVariable.class); if (localVariable == null) { return false; } PsiModifierList modifierList = localVariable.getModifierList(); PsiTypeElement typeElement = localVariable.getTypeElement(); return typeElement.getText().equals("val") && localVariable.hasModifierProperty(FINAL) && modifierList != null && !modifierList.hasExplicitModifier(FINAL); } | wasInvocationSuccessful |
12,273 | void () { doTest(); } | testFinalTypeWithVal |
12,274 | String () { return EXPLICIT_TO_VAL_VAR_DIRECTORY; } | getBasePath |
12,275 | ModCommandAction () { return new ReplaceExplicitTypeWithVarIntentionAction(); } | getAction |
12,276 | boolean () { PsiElement elementAtCaret = myFixture.getFile().findElementAt(myFixture.getCaretOffset()); PsiLocalVariable localVariable = PsiTreeUtil.getParentOfType(elementAtCaret, PsiLocalVariable.class); if (localVariable == null) { return false; } PsiTypeElement typeElement = localVariable.getTypeElement(); return typeElement.getText().equals("var"); } | wasInvocationSuccessful |
12,277 | void () { doTest(); } | testTypeWithVar |
12,278 | String () { return REPLACE_VAL_VAR_WITH_EXPLICIT_TYPE_DIRECTORY; } | getBasePath |
12,279 | ModCommandAction () { return new ReplaceValWithExplicitTypeIntentionAction(); } | getAction |
12,280 | boolean () { PsiElement elementAtCaret = myFixture.getFile().findElementAt(myFixture.getCaretOffset()); PsiLocalVariable localVariable = PsiTreeUtil.getParentOfType(elementAtCaret, PsiLocalVariable.class); if (localVariable == null) { return false; } PsiModifierList modifierList = localVariable.getModifierList(); PsiTypeElement typeElement = localVariable.getTypeElement(); return typeElement.getText().equals("String") && modifierList != null && modifierList.hasExplicitModifier(FINAL); } | wasInvocationSuccessful |
12,281 | void () { doTest(); } | testReplaceVal |
12,282 | String () { return REPLACE_VAL_VAR_WITH_EXPLICIT_TYPE_DIRECTORY; } | getBasePath |
12,283 | ModCommandAction () { return new ReplaceValWithExplicitTypeIntentionAction(); } | getAction |
12,284 | boolean () { PsiElement elementAtCaret = myFixture.getFile().findElementAt(myFixture.getCaretOffset()); PsiLocalVariable localVariable = PsiTreeUtil.getParentOfType(elementAtCaret, PsiLocalVariable.class); if (localVariable == null) { return false; } PsiModifierList modifierList = localVariable.getModifierList(); PsiTypeElement typeElement = localVariable.getTypeElement(); return typeElement.getText().equals("ArrayList<String>") && modifierList != null && modifierList.hasExplicitModifier(FINAL); } | wasInvocationSuccessful |
12,285 | void () { doTest(); } | testReplaceValWithGenerics |
12,286 | String () { return REPLACE_VAL_VAR_WITH_EXPLICIT_TYPE_DIRECTORY; } | getBasePath |
12,287 | ModCommandAction () { return new ReplaceVarWithExplicitTypeIntentionAction(); } | getAction |
12,288 | boolean () { PsiElement elementAtCaret = myFixture.getFile().findElementAt(myFixture.getCaretOffset()); PsiLocalVariable localVariable = PsiTreeUtil.getParentOfType(elementAtCaret, PsiLocalVariable.class); if (localVariable == null) { return false; } PsiTypeElement typeElement = localVariable.getTypeElement(); return typeElement.getText().equals("String"); } | wasInvocationSuccessful |
12,289 | void () { doTest(); } | testReplaceVar |
12,290 | void () { LombokExternalLibraryResolver cut = new LombokExternalLibraryResolver(); ExternalLibraryResolver.ExternalClassResolveResult result = cut.resolveClass("Data", ThreeState.YES, getModule()); assertNotNull(result); assertEquals(LombokClassNames.DATA, result.getQualifiedClassName()); } | testResolverConstruction |
12,291 | void (String fieldName, boolean isBoolean) { result.clear(); final AccessorsInfo accessorsInfo = AccessorsInfo.DEFAULT; result.addAll(LombokUtils.toAllWitherNames(accessorsInfo, fieldName, isBoolean)); } | makeResults |
12,292 | void () { makeResults("myField", false); assertThat(result, is(Collections.singletonList("withMyField"))); } | testToAllWitherNames_NonBoolean |
12,293 | void () { makeResults("myField", false); assertThat(result, is(Collections.singletonList("withMyField"))); } | testToAllWitherNames_NonBoolean_Uppercase |
12,294 | void () { makeResults("MYField", false); assertThat(result, is(Collections.singletonList("withMYField"))); } | testToAllWitherNames_NonBoolean_Uppercase_Multiple |
12,295 | void () { makeResults("myField", true); assertThat(result, is(Collections.singletonList("withMyField"))); } | testToAllWitherNames_Boolean |
12,296 | void () { makeResults("MyField", true); assertThat(result, is(Collections.singletonList("withMyField"))); } | testToAllWitherNames_Boolean_Uppercase |
12,297 | void () { makeResults("ismyField", true); assertThat(result, is(Collections.singletonList("withIsmyField"))); } | testToAllWitherNames_Boolean_is_Lowercase |
12,298 | void () { makeResults("isMyField", true); assertThat(result, is(Arrays.asList("withIsMyField", "withMyField"))); } | testToAllWitherNames_Boolean_is_Uppercase |
12,299 | void () { makeResults("ISmyField", true); assertThat(result, is(Collections.singletonList("withISmyField"))); } | testToAllWitherNames_Boolean_IS |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.