diff --git a/jps/javac-ref-scanner-8/testData/referenceIndex/lambda/initialIndex.txt b/jps/javac-ref-scanner-8/testData/referenceIndex/lambda/initialIndex.txt index df5b0c45fed9..aea1c8ee9322 100644 --- a/jps/javac-ref-scanner-8/testData/referenceIndex/lambda/initialIndex.txt +++ b/jps/javac-ref-scanner-8/testData/referenceIndex/lambda/initialIndex.txt @@ -13,4 +13,6 @@ java.lang.Thread.(1) in Lambda occurrences = 1 Class Definitions: Lambda in Lambda -fun_expr(id=0) in Lambda \ No newline at end of file +fun_expr(id=0) in Lambda + +Members Signatures: \ No newline at end of file diff --git a/jps/javac-ref-scanner-8/testData/referenceIndex/methodReference/initialIndex.txt b/jps/javac-ref-scanner-8/testData/referenceIndex/methodReference/initialIndex.txt index a3b863aa1434..abd019f34f7b 100644 --- a/jps/javac-ref-scanner-8/testData/referenceIndex/methodReference/initialIndex.txt +++ b/jps/javac-ref-scanner-8/testData/referenceIndex/methodReference/initialIndex.txt @@ -15,4 +15,6 @@ java.util.Collections.emptyList(0) in MethodReference occurrences = 1 Class Definitions: MethodReference in MethodReference -fun_expr(id=0) in MethodReference \ No newline at end of file +fun_expr(id=0) in MethodReference + +Members Signatures: \ No newline at end of file diff --git a/jps/jps-builders/testData/referencesIndex/annotation/initialIndex.txt b/jps/jps-builders/testData/referencesIndex/annotation/initialIndex.txt index 2c1416045602..2570fd849ec6 100644 --- a/jps/jps-builders/testData/referencesIndex/annotation/initialIndex.txt +++ b/jps/jps-builders/testData/referencesIndex/annotation/initialIndex.txt @@ -17,4 +17,6 @@ java.lang.annotation.Target in Foo occurrences = 2 java.lang.annotation.Target.value(0) in Foo occurrences = 1 Class Definitions: -Foo in Foo \ No newline at end of file +Foo in Foo + +Members Signatures: \ No newline at end of file diff --git a/jps/jps-builders/testData/referencesIndex/anonymous/initialIndex.txt b/jps/jps-builders/testData/referencesIndex/anonymous/initialIndex.txt index 2a9062e6793a..d235219f4614 100644 --- a/jps/jps-builders/testData/referencesIndex/anonymous/initialIndex.txt +++ b/jps/jps-builders/testData/referencesIndex/anonymous/initialIndex.txt @@ -13,4 +13,6 @@ java.lang.Runnable.run(0) in Anonymous occurrences = 2 Class Definitions: Anonymous in Anonymous -anonymous(id=0) in Anonymous \ No newline at end of file +anonymous(id=0) in Anonymous + +Members Signatures: \ No newline at end of file diff --git a/jps/jps-builders/testData/referencesIndex/arrayRefs/initialIndex.txt b/jps/jps-builders/testData/referencesIndex/arrayRefs/initialIndex.txt index a69e1d856910..b6d49f394a7a 100644 --- a/jps/jps-builders/testData/referencesIndex/arrayRefs/initialIndex.txt +++ b/jps/jps-builders/testData/referencesIndex/arrayRefs/initialIndex.txt @@ -14,4 +14,6 @@ java.lang.Object.(0) in Array Bar Foo occurrences = 3 Class Definitions: Array in Array Bar in Bar -Foo in Foo \ No newline at end of file +Foo in Foo + +Members Signatures: \ No newline at end of file diff --git a/jps/jps-builders/testData/referencesIndex/classDeleted/classDeletedIndex.txt b/jps/jps-builders/testData/referencesIndex/classDeleted/classDeletedIndex.txt index 0470a2789360..6b3a5ea4f4bb 100644 --- a/jps/jps-builders/testData/referencesIndex/classDeleted/classDeletedIndex.txt +++ b/jps/jps-builders/testData/referencesIndex/classDeleted/classDeletedIndex.txt @@ -7,4 +7,6 @@ Foo.(0) in Foo occurrences = 1 java.lang.Object.(0) in Foo occurrences = 1 Class Definitions: -Foo in Foo \ No newline at end of file +Foo in Foo + +Members Signatures: \ No newline at end of file diff --git a/jps/jps-builders/testData/referencesIndex/classDeleted/initialIndex.txt b/jps/jps-builders/testData/referencesIndex/classDeleted/initialIndex.txt index 8ffaf277192d..93873059be01 100644 --- a/jps/jps-builders/testData/referencesIndex/classDeleted/initialIndex.txt +++ b/jps/jps-builders/testData/referencesIndex/classDeleted/initialIndex.txt @@ -14,4 +14,6 @@ java.lang.Runnable in Foo occurrences = 1 Class Definitions: Foo in Foo -Foo$Inner in Foo \ No newline at end of file +Foo$Inner in Foo + +Members Signatures: \ No newline at end of file diff --git a/jps/jps-builders/testData/referencesIndex/compilationUnitContains2Decls/initialIndex.txt b/jps/jps-builders/testData/referencesIndex/compilationUnitContains2Decls/initialIndex.txt index 9b683834abb2..0cb71291f3d0 100644 --- a/jps/jps-builders/testData/referencesIndex/compilationUnitContains2Decls/initialIndex.txt +++ b/jps/jps-builders/testData/referencesIndex/compilationUnitContains2Decls/initialIndex.txt @@ -15,4 +15,6 @@ java.util.Collections.emptySet(0) in Foo occurrences = 1 Class Definitions: Boo in Foo -Foo in Foo \ No newline at end of file +Foo in Foo + +Members Signatures: \ No newline at end of file diff --git a/jps/jps-builders/testData/referencesIndex/constructors/initialIndex.txt b/jps/jps-builders/testData/referencesIndex/constructors/initialIndex.txt index 162ef109509c..701df57991aa 100644 --- a/jps/jps-builders/testData/referencesIndex/constructors/initialIndex.txt +++ b/jps/jps-builders/testData/referencesIndex/constructors/initialIndex.txt @@ -13,4 +13,6 @@ java.util.LinkedList.(0) in Foo occurrences = 2 java.util.List in Foo occurrences = 5 Class Definitions: -Foo in Foo \ No newline at end of file +Foo in Foo + +Members Signatures: \ No newline at end of file diff --git a/jps/jps-builders/testData/referencesIndex/deadCode/initialIndex.txt b/jps/jps-builders/testData/referencesIndex/deadCode/initialIndex.txt index 9788736f617a..b0cbef2857ad 100644 --- a/jps/jps-builders/testData/referencesIndex/deadCode/initialIndex.txt +++ b/jps/jps-builders/testData/referencesIndex/deadCode/initialIndex.txt @@ -14,4 +14,6 @@ java.util.ArrayList in Bar occurrences = 1 java.util.ArrayList.(0) in Bar occurrences = 1 Class Definitions: -Bar in Bar \ No newline at end of file +Bar in Bar + +Members Signatures: \ No newline at end of file diff --git a/jps/jps-builders/testData/referencesIndex/fileCaseOnlyRename/afterRename.txt b/jps/jps-builders/testData/referencesIndex/fileCaseOnlyRename/afterRename.txt index 2231b28bc058..4a1b8b585eab 100644 --- a/jps/jps-builders/testData/referencesIndex/fileCaseOnlyRename/afterRename.txt +++ b/jps/jps-builders/testData/referencesIndex/fileCaseOnlyRename/afterRename.txt @@ -11,4 +11,6 @@ java.lang.System in bar occurrences = 1 java.lang.System.out in bar occurrences = 1 Class Definitions: -Inner in bar \ No newline at end of file +Inner in bar + +Members Signatures: \ No newline at end of file diff --git a/jps/jps-builders/testData/referencesIndex/fileCaseOnlyRename/initialIndex.txt b/jps/jps-builders/testData/referencesIndex/fileCaseOnlyRename/initialIndex.txt index b23060f88255..210066e11566 100644 --- a/jps/jps-builders/testData/referencesIndex/fileCaseOnlyRename/initialIndex.txt +++ b/jps/jps-builders/testData/referencesIndex/fileCaseOnlyRename/initialIndex.txt @@ -11,4 +11,6 @@ java.lang.System in Bar occurrences = 1 java.lang.System.out in Bar occurrences = 1 Class Definitions: -Inner in Bar \ No newline at end of file +Inner in Bar + +Members Signatures: \ No newline at end of file diff --git a/jps/jps-builders/testData/referencesIndex/fileDeleted/fileDeletedIndex.txt b/jps/jps-builders/testData/referencesIndex/fileDeleted/fileDeletedIndex.txt index f11c67e1704a..d6a258d7dd49 100644 --- a/jps/jps-builders/testData/referencesIndex/fileDeleted/fileDeletedIndex.txt +++ b/jps/jps-builders/testData/referencesIndex/fileDeleted/fileDeletedIndex.txt @@ -8,4 +8,6 @@ Foo.m(0) in Foo occurrences = 1 java.lang.Object.(0) in Foo occurrences = 1 Class Definitions: -Foo in Foo \ No newline at end of file +Foo in Foo + +Members Signatures: \ No newline at end of file diff --git a/jps/jps-builders/testData/referencesIndex/fileDeleted/initialIndex.txt b/jps/jps-builders/testData/referencesIndex/fileDeleted/initialIndex.txt index 08cfeb2eec56..08e2fed1395e 100644 --- a/jps/jps-builders/testData/referencesIndex/fileDeleted/initialIndex.txt +++ b/jps/jps-builders/testData/referencesIndex/fileDeleted/initialIndex.txt @@ -12,4 +12,6 @@ java.lang.Object.(0) in Bar Foo occurrences = 2 Class Definitions: Bar in Bar -Foo in Foo \ No newline at end of file +Foo in Foo + +Members Signatures: \ No newline at end of file diff --git a/jps/jps-builders/testData/referencesIndex/incrementalIndexUpdate/afterMakeIndex.txt b/jps/jps-builders/testData/referencesIndex/incrementalIndexUpdate/afterMakeIndex.txt index 6d5df80410ef..50003cc08e9e 100644 --- a/jps/jps-builders/testData/referencesIndex/incrementalIndexUpdate/afterMakeIndex.txt +++ b/jps/jps-builders/testData/referencesIndex/incrementalIndexUpdate/afterMakeIndex.txt @@ -18,4 +18,8 @@ java.lang.String in Foo FooImpl occurrences = 3 Class Definitions: Bar in Bar Foo in Foo -FooImpl in FooImpl \ No newline at end of file +FooImpl in FooImpl + +Members Signatures: +java.lang.String <- Foo.getSomeText(0) FooImpl.getSomeText(0) +static java.lang.String <- FooImpl.TITLE \ No newline at end of file diff --git a/jps/jps-builders/testData/referencesIndex/incrementalIndexUpdate/afterSecondMakeIndex.txt b/jps/jps-builders/testData/referencesIndex/incrementalIndexUpdate/afterSecondMakeIndex.txt index be75da6c33c7..2ccb8de727a5 100644 --- a/jps/jps-builders/testData/referencesIndex/incrementalIndexUpdate/afterSecondMakeIndex.txt +++ b/jps/jps-builders/testData/referencesIndex/incrementalIndexUpdate/afterSecondMakeIndex.txt @@ -17,4 +17,8 @@ java.lang.String in Foo FooImpl occurrences = 3 Class Definitions: Bar in Bar Foo in Foo -FooImpl in FooImpl \ No newline at end of file +FooImpl in FooImpl + +Members Signatures: +java.lang.String <- Foo.getSomeText(0) FooImpl.getSomeText(0) +static java.lang.String <- FooImpl.TITLE \ No newline at end of file diff --git a/jps/jps-builders/testData/referencesIndex/incrementalIndexUpdate/initialIndex.txt b/jps/jps-builders/testData/referencesIndex/incrementalIndexUpdate/initialIndex.txt index f2938081632c..dca77e971ea2 100644 --- a/jps/jps-builders/testData/referencesIndex/incrementalIndexUpdate/initialIndex.txt +++ b/jps/jps-builders/testData/referencesIndex/incrementalIndexUpdate/initialIndex.txt @@ -21,4 +21,8 @@ java.lang.System.out in Bar occurrences = 2 Class Definitions: Bar in Bar Foo in Foo -FooImpl in FooImpl \ No newline at end of file +FooImpl in FooImpl + +Members Signatures: +java.lang.String <- Foo.getSomeText(0) FooImpl.getSomeText(0) +static java.lang.String <- FooImpl.TITLE \ No newline at end of file diff --git a/jps/jps-builders/testData/referencesIndex/incrementalIndexUpdate2/after1MakeIndex.txt b/jps/jps-builders/testData/referencesIndex/incrementalIndexUpdate2/after1MakeIndex.txt index 2b9269b7228b..b29fe28f6b0a 100644 --- a/jps/jps-builders/testData/referencesIndex/incrementalIndexUpdate2/after1MakeIndex.txt +++ b/jps/jps-builders/testData/referencesIndex/incrementalIndexUpdate2/after1MakeIndex.txt @@ -10,4 +10,6 @@ java.util.Collections in Foo occurrences = 2 java.util.Collections.emptySet(0) in Foo occurrences = 1 Class Definitions: -Foo in Foo \ No newline at end of file +Foo in Foo + +Members Signatures: \ No newline at end of file diff --git a/jps/jps-builders/testData/referencesIndex/incrementalIndexUpdate2/after2MakeIndex.txt b/jps/jps-builders/testData/referencesIndex/incrementalIndexUpdate2/after2MakeIndex.txt index c53e2f02ebac..75601b5a114e 100644 --- a/jps/jps-builders/testData/referencesIndex/incrementalIndexUpdate2/after2MakeIndex.txt +++ b/jps/jps-builders/testData/referencesIndex/incrementalIndexUpdate2/after2MakeIndex.txt @@ -10,4 +10,6 @@ java.util.Collections in Bar occurrences = 2 java.util.Collections.emptySet(0) in Bar occurrences = 1 Class Definitions: -Foo in Bar \ No newline at end of file +Foo in Bar + +Members Signatures: \ No newline at end of file diff --git a/jps/jps-builders/testData/referencesIndex/incrementalIndexUpdate2/initialIndex.txt b/jps/jps-builders/testData/referencesIndex/incrementalIndexUpdate2/initialIndex.txt index 817aa22f2133..2b29bc5b29b2 100644 --- a/jps/jps-builders/testData/referencesIndex/incrementalIndexUpdate2/initialIndex.txt +++ b/jps/jps-builders/testData/referencesIndex/incrementalIndexUpdate2/initialIndex.txt @@ -12,4 +12,6 @@ java.util.Collections.emptyList(0) in Foo occurrences = 1 java.util.List in Foo occurrences = 2 Class Definitions: -Foo in Foo \ No newline at end of file +Foo in Foo + +Members Signatures: \ No newline at end of file diff --git a/jps/jps-builders/testData/referencesIndex/incrementalIndexUpdate3/after1MakeIndex.txt b/jps/jps-builders/testData/referencesIndex/incrementalIndexUpdate3/after1MakeIndex.txt index 330878311969..1319fd901294 100644 --- a/jps/jps-builders/testData/referencesIndex/incrementalIndexUpdate3/after1MakeIndex.txt +++ b/jps/jps-builders/testData/referencesIndex/incrementalIndexUpdate3/after1MakeIndex.txt @@ -15,4 +15,6 @@ java.util.Collections.emptySet(0) in Bar occurrences = 1 Class Definitions: Bar in Bar -Foo in Foo \ No newline at end of file +Foo in Foo + +Members Signatures: \ No newline at end of file diff --git a/jps/jps-builders/testData/referencesIndex/incrementalIndexUpdate3/initialIndex.txt b/jps/jps-builders/testData/referencesIndex/incrementalIndexUpdate3/initialIndex.txt index 9db6a7c88404..da5593deeb13 100644 --- a/jps/jps-builders/testData/referencesIndex/incrementalIndexUpdate3/initialIndex.txt +++ b/jps/jps-builders/testData/referencesIndex/incrementalIndexUpdate3/initialIndex.txt @@ -15,4 +15,6 @@ java.util.Collections.emptySet(0) in Foo occurrences = 1 Class Definitions: Bar in Foo -Foo in Foo \ No newline at end of file +Foo in Foo + +Members Signatures: \ No newline at end of file diff --git a/jps/jps-builders/testData/referencesIndex/multiFileMultiUnitCompilation/initialIndex.txt b/jps/jps-builders/testData/referencesIndex/multiFileMultiUnitCompilation/initialIndex.txt index 6720c008182d..d500ccab35a2 100644 --- a/jps/jps-builders/testData/referencesIndex/multiFileMultiUnitCompilation/initialIndex.txt +++ b/jps/jps-builders/testData/referencesIndex/multiFileMultiUnitCompilation/initialIndex.txt @@ -32,4 +32,6 @@ Bar1 in Bar Boo0 in Boo Boo1 in Boo Foo0 in Foo -Foo1 in Foo \ No newline at end of file +Foo1 in Foo + +Members Signatures: \ No newline at end of file diff --git a/jps/jps-builders/testData/referencesIndex/nestedClasses/initialIndex.txt b/jps/jps-builders/testData/referencesIndex/nestedClasses/initialIndex.txt index 02dd64129551..3d13ebd3d18e 100644 --- a/jps/jps-builders/testData/referencesIndex/nestedClasses/initialIndex.txt +++ b/jps/jps-builders/testData/referencesIndex/nestedClasses/initialIndex.txt @@ -25,4 +25,6 @@ Class Definitions: Boo in Foo Boo$Baz in Foo Foo in Foo -Foo$Bar in Foo \ No newline at end of file +Foo$Bar in Foo + +Members Signatures: \ No newline at end of file diff --git a/jps/jps-builders/testData/referencesIndex/occurrences/initialIndex.txt b/jps/jps-builders/testData/referencesIndex/occurrences/initialIndex.txt index 2f2cd49acc91..a7f254ec913e 100644 --- a/jps/jps-builders/testData/referencesIndex/occurrences/initialIndex.txt +++ b/jps/jps-builders/testData/referencesIndex/occurrences/initialIndex.txt @@ -19,4 +19,6 @@ java.util.ArrayList.size(0) in Bar Foo occurrences = 6 Class Definitions: Bar in Bar -Foo in Foo \ No newline at end of file +Foo in Foo + +Members Signatures: \ No newline at end of file diff --git a/jps/jps-builders/testData/referencesIndex/packageInfo/initialIndex.txt b/jps/jps-builders/testData/referencesIndex/packageInfo/initialIndex.txt index 6fa1bb2145ea..6b8e3fea813f 100644 --- a/jps/jps-builders/testData/referencesIndex/packageInfo/initialIndex.txt +++ b/jps/jps-builders/testData/referencesIndex/packageInfo/initialIndex.txt @@ -8,4 +8,6 @@ myPackage.A in package-info occurrences = 1 myPackage.A.(0) in package-info occurrences = 1 Class Definitions: -myPackage.A in package-info \ No newline at end of file +myPackage.A in package-info + +Members Signatures: \ No newline at end of file diff --git a/jps/jps-builders/testData/referencesIndex/packageInfo2/initialIndex.txt b/jps/jps-builders/testData/referencesIndex/packageInfo2/initialIndex.txt index ef4363801c22..e4ecab05ebb3 100644 --- a/jps/jps-builders/testData/referencesIndex/packageInfo2/initialIndex.txt +++ b/jps/jps-builders/testData/referencesIndex/packageInfo2/initialIndex.txt @@ -4,4 +4,7 @@ Backward Hierarchy: Backward References: java.lang.Deprecated in package-info occurrences = 1 -Class Definitions: \ No newline at end of file +Class Definitions: + + +Members Signatures: \ No newline at end of file diff --git a/jps/jps-builders/testData/referencesIndex/privateMembers/initialIndex.txt b/jps/jps-builders/testData/referencesIndex/privateMembers/initialIndex.txt index bbe89770c4ae..27ed3a0de8e9 100644 --- a/jps/jps-builders/testData/referencesIndex/privateMembers/initialIndex.txt +++ b/jps/jps-builders/testData/referencesIndex/privateMembers/initialIndex.txt @@ -8,4 +8,6 @@ java.lang.Object.(0) in PrivateMembers occurrences = 2 Class Definitions: PrivateMembers in PrivateMembers -PrivateMembers$PrivateInnerClass in PrivateMembers \ No newline at end of file +PrivateMembers$PrivateInnerClass in PrivateMembers + +Members Signatures: \ No newline at end of file diff --git a/jps/jps-builders/testData/referencesIndex/qualifierResolution/initialIndex.txt b/jps/jps-builders/testData/referencesIndex/qualifierResolution/initialIndex.txt index fd10dfc28c62..a1ebcd62e046 100644 --- a/jps/jps-builders/testData/referencesIndex/qualifierResolution/initialIndex.txt +++ b/jps/jps-builders/testData/referencesIndex/qualifierResolution/initialIndex.txt @@ -15,4 +15,6 @@ java.util.ArrayList.(0) in Foo occurrences = 1 Class Definitions: ArrayListImpl in Foo -Foo in Foo \ No newline at end of file +Foo in Foo + +Members Signatures: \ No newline at end of file diff --git a/jps/jps-builders/testData/referencesIndex/signatureDataIndex/Foo.java b/jps/jps-builders/testData/referencesIndex/signatureDataIndex/Foo.java new file mode 100644 index 000000000000..ddfd2651a8f8 --- /dev/null +++ b/jps/jps-builders/testData/referencesIndex/signatureDataIndex/Foo.java @@ -0,0 +1,17 @@ +import java.util.List; + +public class Foo { + + public String m1() { + return null; + } + + public static List m2() { + return null; + } + + public List m3() { + return null; + } + +} \ No newline at end of file diff --git a/jps/jps-builders/testData/referencesIndex/signatureDataIndex/initialIndex.txt b/jps/jps-builders/testData/referencesIndex/signatureDataIndex/initialIndex.txt new file mode 100644 index 000000000000..e9c4c301eeeb --- /dev/null +++ b/jps/jps-builders/testData/referencesIndex/signatureDataIndex/initialIndex.txt @@ -0,0 +1,20 @@ +Backward Hierarchy: +java.lang.Object -> Foo + +Backward References: +Foo in Foo occurrences = 1 +Foo.(0) in Foo occurrences = 1 +Foo.m1(0) in Foo occurrences = 1 +Foo.m2(0) in Foo occurrences = 1 +Foo.m3(0) in Foo occurrences = 1 +java.lang.Object.(0) in Foo occurrences = 1 +java.lang.String in Foo occurrences = 2 +java.util.List in Foo occurrences = 3 + +Class Definitions: +Foo in Foo + +Members Signatures: +java.lang.String <- Foo.m1(0) +java.util.List <- Foo.m3(0) +static java.util.List <- Foo.m2(0) \ No newline at end of file diff --git a/jps/jps-builders/testData/referencesIndex/staticallyImportedConstant/initialIndex.txt b/jps/jps-builders/testData/referencesIndex/staticallyImportedConstant/initialIndex.txt index 33b06afb47cc..724fe5979e60 100644 --- a/jps/jps-builders/testData/referencesIndex/staticallyImportedConstant/initialIndex.txt +++ b/jps/jps-builders/testData/referencesIndex/staticallyImportedConstant/initialIndex.txt @@ -14,4 +14,6 @@ pack.Foo.CONST in Bar Foo occurrences = 2 Class Definitions: pack.Bar in Bar -pack.Foo in Foo \ No newline at end of file +pack.Foo in Foo + +Members Signatures: \ No newline at end of file diff --git a/jps/jps-builders/testData/referencesIndex/typeParameterRefs/initialIndex.txt b/jps/jps-builders/testData/referencesIndex/typeParameterRefs/initialIndex.txt index 401e24a1112c..7938734e6911 100644 --- a/jps/jps-builders/testData/referencesIndex/typeParameterRefs/initialIndex.txt +++ b/jps/jps-builders/testData/referencesIndex/typeParameterRefs/initialIndex.txt @@ -10,4 +10,6 @@ java.lang.String in TypeParam occurrences = 1 java.util.List in TypeParam occurrences = 2 Class Definitions: -TypeParam in TypeParam \ No newline at end of file +TypeParam in TypeParam + +Members Signatures: \ No newline at end of file diff --git a/jps/jps-builders/testData/referencesIndex/unqualifiedMethodCallResolution/initialIndex.txt b/jps/jps-builders/testData/referencesIndex/unqualifiedMethodCallResolution/initialIndex.txt index a833d7119d50..45e540e8487b 100644 --- a/jps/jps-builders/testData/referencesIndex/unqualifiedMethodCallResolution/initialIndex.txt +++ b/jps/jps-builders/testData/referencesIndex/unqualifiedMethodCallResolution/initialIndex.txt @@ -12,4 +12,6 @@ java.lang.Object.(0) in Foo occurrences = 2 Class Definitions: A in Foo -A$B in Foo \ No newline at end of file +A$B in Foo + +Members Signatures: \ No newline at end of file diff --git a/jps/jps-builders/testData/referencesIndex/unqualifiedMethodCallResolution2/initialIndex.txt b/jps/jps-builders/testData/referencesIndex/unqualifiedMethodCallResolution2/initialIndex.txt index c9226dc75805..afde15668d27 100644 --- a/jps/jps-builders/testData/referencesIndex/unqualifiedMethodCallResolution2/initialIndex.txt +++ b/jps/jps-builders/testData/referencesIndex/unqualifiedMethodCallResolution2/initialIndex.txt @@ -12,4 +12,6 @@ java.lang.Object.(0) in Foo occurrences = 2 Class Definitions: A in Foo -A$B in Foo \ No newline at end of file +A$B in Foo + +Members Signatures: \ No newline at end of file diff --git a/jps/jps-builders/testData/referencesIndex/unqualifiedMethodCallResolution3/initialIndex.txt b/jps/jps-builders/testData/referencesIndex/unqualifiedMethodCallResolution3/initialIndex.txt index 7ee942bd73cd..3e5b14796cf9 100644 --- a/jps/jps-builders/testData/referencesIndex/unqualifiedMethodCallResolution3/initialIndex.txt +++ b/jps/jps-builders/testData/referencesIndex/unqualifiedMethodCallResolution3/initialIndex.txt @@ -13,4 +13,6 @@ java.lang.Runnable.run(0) in Foo occurrences = 1 Class Definitions: A in Foo -anonymous(id=0) in Foo \ No newline at end of file +anonymous(id=0) in Foo + +Members Signatures: \ No newline at end of file diff --git a/jps/jps-builders/testData/referencesIndex/unqualifiedMethodCallResolution4/initialIndex.txt b/jps/jps-builders/testData/referencesIndex/unqualifiedMethodCallResolution4/initialIndex.txt index b70ea2adc93d..2a2e01cc960a 100644 --- a/jps/jps-builders/testData/referencesIndex/unqualifiedMethodCallResolution4/initialIndex.txt +++ b/jps/jps-builders/testData/referencesIndex/unqualifiedMethodCallResolution4/initialIndex.txt @@ -13,4 +13,6 @@ java.lang.Runnable.run(0) in Foo occurrences = 2 Class Definitions: A in Foo -anonymous(id=0) in Foo \ No newline at end of file +anonymous(id=0) in Foo + +Members Signatures: \ No newline at end of file diff --git a/jps/jps-builders/testData/referencesIndex/unqualifiedMethodCallResolution5/initialIndex.txt b/jps/jps-builders/testData/referencesIndex/unqualifiedMethodCallResolution5/initialIndex.txt index 3b02de47dbfa..5fab1be47c80 100644 --- a/jps/jps-builders/testData/referencesIndex/unqualifiedMethodCallResolution5/initialIndex.txt +++ b/jps/jps-builders/testData/referencesIndex/unqualifiedMethodCallResolution5/initialIndex.txt @@ -13,4 +13,6 @@ java.lang.Runnable.run(0) in Foo occurrences = 1 Class Definitions: A in Foo -anonymous(id=0) in Foo \ No newline at end of file +anonymous(id=0) in Foo + +Members Signatures: \ No newline at end of file diff --git a/jps/jps-builders/testData/referencesIndex/unusedImports/initialIndex.txt b/jps/jps-builders/testData/referencesIndex/unusedImports/initialIndex.txt index 15d56d214031..51047907b816 100644 --- a/jps/jps-builders/testData/referencesIndex/unusedImports/initialIndex.txt +++ b/jps/jps-builders/testData/referencesIndex/unusedImports/initialIndex.txt @@ -13,4 +13,6 @@ java.util.LinkedList in Bar occurrences = 1 java.util.List in Bar occurrences = 1 Class Definitions: -Bar in Bar \ No newline at end of file +Bar in Bar + +Members Signatures: \ No newline at end of file diff --git a/jps/jps-builders/testData/referencesIndex/unusedImports2/initialIndex.txt b/jps/jps-builders/testData/referencesIndex/unusedImports2/initialIndex.txt index 161bc35dc7f8..d8099768941b 100644 --- a/jps/jps-builders/testData/referencesIndex/unusedImports2/initialIndex.txt +++ b/jps/jps-builders/testData/referencesIndex/unusedImports2/initialIndex.txt @@ -36,4 +36,6 @@ com.ru.Some$I1$I2$I3 in Some com.ru.Some2 in Some2 com.ru.Some2$I1 in Some2 com.ru.Some2$I1$I2 in Some2 -com.ru.Some3 in Some3 \ No newline at end of file +com.ru.Some3 in Some3 + +Members Signatures: \ No newline at end of file diff --git a/jps/jps-builders/testSrc/org/jetbrains/references/ReferenceIndexTest.kt b/jps/jps-builders/testSrc/org/jetbrains/references/ReferenceIndexTest.kt index c23cb0f5e152..76393fb32f9a 100644 --- a/jps/jps-builders/testSrc/org/jetbrains/references/ReferenceIndexTest.kt +++ b/jps/jps-builders/testSrc/org/jetbrains/references/ReferenceIndexTest.kt @@ -165,5 +165,9 @@ class ReferenceIndexTest : ReferenceIndexTestBase() { fun testQualifierResolution() { assertIndexOnRebuild("Foo.java") } + + fun testSignatureDataIndex() { + assertIndexOnRebuild("Foo.java") + } } diff --git a/jps/jps-builders/testSrc/org/jetbrains/references/ReferenceIndexTestBase.kt b/jps/jps-builders/testSrc/org/jetbrains/references/ReferenceIndexTestBase.kt index ef7f9cf2d487..ed107ae6dbb4 100644 --- a/jps/jps-builders/testSrc/org/jetbrains/references/ReferenceIndexTestBase.kt +++ b/jps/jps-builders/testSrc/org/jetbrains/references/ReferenceIndexTestBase.kt @@ -22,10 +22,7 @@ import com.intellij.util.indexing.ID import com.intellij.util.indexing.impl.MapIndexStorage import com.intellij.util.indexing.impl.MapReduceIndex import com.intellij.util.io.PersistentStringEnumerator -import org.jetbrains.jps.backwardRefs.BackwardReferenceIndexWriter -import org.jetbrains.jps.backwardRefs.CompilerBackwardReferenceIndex -import org.jetbrains.jps.backwardRefs.LightRef -import org.jetbrains.jps.backwardRefs.NameEnumerator +import org.jetbrains.jps.backwardRefs.* import org.jetbrains.jps.backwardRefs.index.CompiledFileData import org.jetbrains.jps.backwardRefs.index.CompilerIndices import org.jetbrains.jps.builders.JpsBuildTestCase @@ -145,6 +142,24 @@ abstract class ReferenceIndexTestBase : JpsBuildTestCase() { classDefs.sort() result.append(classDefs.joinToString(separator = "\n")) + result.append("\n\nMembers Signatures:\n") + val signs = mutableListOf() + storage(index, CompilerIndices.BACK_MEMBER_SIGN).processKeys { sign -> + val definedMembers = mutableListOf() + val valueIt = index[CompilerIndices.BACK_MEMBER_SIGN].getData(sign).valueIterator + while (valueIt.hasNext()) { + val nextRefs = valueIt.next() + nextRefs.mapTo(definedMembers) { it.asText(nameEnumerator) } + } + if (!definedMembers.isEmpty()) { + definedMembers.sort() + signs.add(sign.asText(nameEnumerator) + " <- " + definedMembers.joinToString(separator = " ")) + } + true + } + signs.sort() + result.append(signs.joinToString(separator = "\n")) + return result.toString() } finally { @@ -169,5 +184,9 @@ abstract class ReferenceIndexTestBase : JpsBuildTestCase() { else -> throw UnsupportedOperationException() } + private fun SignatureData.asText(nameEnumerator: NameEnumerator): String { + return (if (this.isStatic) "static " else "") + this.rawReturnType.asName(nameEnumerator) + } + private fun Int.asFileName(fileNameEnumerator: PersistentStringEnumerator) = FileUtil.getNameWithoutExtension(File(fileNameEnumerator.valueOf(this)).canonicalFile) } \ No newline at end of file