global inspection graph: mark java method which overrides groovy method as overridden

This commit is contained in:
Dmitry Batkovich
2018-10-01 14:27:58 +03:00
parent 237bd8c9a0
commit 3296a4e3b6
6 changed files with 30 additions and 0 deletions
@@ -229,6 +229,8 @@ public class RefMethodImpl extends RefJavaElementImpl implements RefMethod {
if (refSuperMethod != null) {
addSuperMethod(refSuperMethod);
refSuperMethod.markExtended(this);
} else {
setLibraryOverride(true);
}
}
else {
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<problems/>
@@ -0,0 +1,11 @@
public class XXX extends ZZZ {
@Override
public boolean ololo() {
System.out.println("adssdadsa");
return false;
}
public static void main(String[] args) {
new XXX().ololo();
}
}
@@ -0,0 +1,5 @@
class ZZZ {
boolean ololo() {
}
}
@@ -86,4 +86,8 @@ public class SameParameterValueLocalTest extends InspectionTestCase {
myGlobalTool.minimalUsageCount = previous;
}
}
public void testOverrideGroovy() {
doTest(getGlobalTestDir(), myTool);
}
}
@@ -101,4 +101,8 @@ public class SameParameterValueTest extends InspectionTestCase {
public void testField() {
doTest(getTestDir(), myTool, false, true);
}
public void testOverrideGroovy() {
doTest(getTestDir(), myTool, false, true);
}
}