mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
SOE
This commit is contained in:
@@ -159,6 +159,9 @@ public class TitleCapitalizationInspection extends BaseJavaLocalInspectionTool {
|
||||
if (arg instanceof PsiMethodCallExpression) {
|
||||
PsiMethod psiMethod = ((PsiMethodCallExpression)arg).resolveMethod();
|
||||
PsiExpression returnValue = PropertyUtil.getGetterReturnExpression(psiMethod);
|
||||
if (arg == returnValue) {
|
||||
return null;
|
||||
}
|
||||
if (returnValue != null) {
|
||||
return getTitleValue(returnValue);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
import org.jetbrains.annotations.Nls;
|
||||
|
||||
class RecursiveMethod {
|
||||
@Nls(capitalization = Nls.Capitalization.Title)
|
||||
public String getName() {
|
||||
return getName();
|
||||
}
|
||||
}
|
||||
@@ -37,6 +37,11 @@ public class CapitalizationInspectionTest extends LightCodeInsightFixtureTestCas
|
||||
doTest();
|
||||
}
|
||||
|
||||
public void testRecursiveMethod() throws Exception {
|
||||
myFixture.testHighlighting(getTestName(false) + ".java");
|
||||
assertEmpty(myFixture.filterAvailableIntentions("Properly capitalize"));
|
||||
}
|
||||
|
||||
public void doTest() {
|
||||
myFixture.testHighlighting(getTestName(false) + ".java");
|
||||
final IntentionAction action = myFixture.filterAvailableIntentions("Properly capitalize").get(0);
|
||||
|
||||
Reference in New Issue
Block a user