Lines 103-120
Link Here
|
103 |
} |
103 |
} |
104 |
return getWorkingCopy(path, source, this.wcOwner); |
104 |
return getWorkingCopy(path, source, this.wcOwner); |
105 |
} |
105 |
} |
106 |
protected void search(IJavaElement element, int limitTo) throws CoreException { |
|
|
107 |
search(element, limitTo, EXACT_RULE, getJavaSearchScope(), resultCollector); |
108 |
} |
109 |
protected void search(IJavaElement element, int limitTo, int matchRule) throws CoreException { |
110 |
search(element, limitTo, matchRule, getJavaSearchScope(), resultCollector); |
111 |
} |
112 |
protected void search(String patternString, int searchFor, int limitTo) throws CoreException { |
113 |
search(patternString, searchFor, limitTo, EXACT_RULE, getJavaSearchScope(), resultCollector); |
114 |
} |
115 |
protected void search(String patternString, int searchFor, int limitTo, int matchRule) throws CoreException { |
116 |
search(patternString, searchFor, limitTo, matchRule, getJavaSearchScope(), resultCollector); |
117 |
} |
118 |
/* (non-Javadoc) |
106 |
/* (non-Javadoc) |
119 |
* @see org.eclipse.jdt.core.tests.model.SuiteOfTestCases#setUpSuite() |
107 |
* @see org.eclipse.jdt.core.tests.model.SuiteOfTestCases#setUpSuite() |
120 |
*/ |
108 |
*/ |
Lines 4731-4737
Link Here
|
4731 |
"interface IDocumentExtension315 {}\n" |
4719 |
"interface IDocumentExtension315 {}\n" |
4732 |
); |
4720 |
); |
4733 |
TypeNameRequestor requestor = new SearchTests.SearchTypeNameRequestor(); |
4721 |
TypeNameRequestor requestor = new SearchTests.SearchTypeNameRequestor(); |
4734 |
int validatedRule = SearchPattern.validateMatchRule("IDE3", SearchPattern.R_CAMELCASE_MATCH); |
4722 |
int validatedRule = SearchPattern.validateMatchRule("IDE3", SearchPattern.R_CAMEL_CASE_MATCH); |
4735 |
searchAllTypeNames("IDE3", validatedRule, requestor); |
4723 |
searchAllTypeNames("IDE3", validatedRule, requestor); |
4736 |
assertSearchResults( |
4724 |
assertSearchResults( |
4737 |
"IDocumentExtension135\n" + |
4725 |
"IDocumentExtension135\n" + |
Lines 4752-4758
Link Here
|
4752 |
"interface IDocumentProviderExtension54321 {}\n" |
4740 |
"interface IDocumentProviderExtension54321 {}\n" |
4753 |
); |
4741 |
); |
4754 |
TypeNameRequestor requestor = new SearchTests.SearchTypeNameRequestor(); |
4742 |
TypeNameRequestor requestor = new SearchTests.SearchTypeNameRequestor(); |
4755 |
int validatedRule = SearchPattern.validateMatchRule("IDPE3", SearchPattern.R_CAMELCASE_MATCH); |
4743 |
int validatedRule = SearchPattern.validateMatchRule("IDPE3", SearchPattern.R_CAMEL_CASE_MATCH); |
4756 |
searchAllTypeNames("IDPE3", validatedRule, requestor); |
4744 |
searchAllTypeNames("IDPE3", validatedRule, requestor); |
4757 |
assertSearchResults( |
4745 |
assertSearchResults( |
4758 |
"IDocumentProviderExtension12345\n" + |
4746 |
"IDocumentProviderExtension12345\n" + |
Lines 4769-4775
Link Here
|
4769 |
"interface IPerspectiveListener3 {}\n" |
4757 |
"interface IPerspectiveListener3 {}\n" |
4770 |
); |
4758 |
); |
4771 |
TypeNameRequestor requestor = new SearchTests.SearchTypeNameRequestor(); |
4759 |
TypeNameRequestor requestor = new SearchTests.SearchTypeNameRequestor(); |
4772 |
int validatedRule = SearchPattern.validateMatchRule("IPL3", SearchPattern.R_CAMELCASE_MATCH); |
4760 |
int validatedRule = SearchPattern.validateMatchRule("IPL3", SearchPattern.R_CAMEL_CASE_MATCH); |
4773 |
searchAllTypeNames("IPL3", validatedRule, requestor); |
4761 |
searchAllTypeNames("IPL3", validatedRule, requestor); |
4774 |
assertSearchResults( |
4762 |
assertSearchResults( |
4775 |
"IPerspectiveListener3", |
4763 |
"IPerspectiveListener3", |
Lines 4783-4789
Link Here
|
4783 |
"interface IPropertySource2 {}\n" |
4771 |
"interface IPropertySource2 {}\n" |
4784 |
); |
4772 |
); |
4785 |
TypeNameRequestor requestor = new SearchTests.SearchTypeNameRequestor(); |
4773 |
TypeNameRequestor requestor = new SearchTests.SearchTypeNameRequestor(); |
4786 |
int validatedRule = SearchPattern.validateMatchRule("IPS2", SearchPattern.R_CAMELCASE_MATCH); |
4774 |
int validatedRule = SearchPattern.validateMatchRule("IPS2", SearchPattern.R_CAMEL_CASE_MATCH); |
4787 |
searchAllTypeNames("IPS2", validatedRule, requestor); |
4775 |
searchAllTypeNames("IPS2", validatedRule, requestor); |
4788 |
assertSearchResults( |
4776 |
assertSearchResults( |
4789 |
"IPropertySource2", |
4777 |
"IPropertySource2", |
Lines 4800-4806
Link Here
|
4800 |
"interface IWorkbenchWindowPulldownDelegate4 {}\n" |
4788 |
"interface IWorkbenchWindowPulldownDelegate4 {}\n" |
4801 |
); |
4789 |
); |
4802 |
TypeNameRequestor requestor = new SearchTests.SearchTypeNameRequestor(); |
4790 |
TypeNameRequestor requestor = new SearchTests.SearchTypeNameRequestor(); |
4803 |
int validatedRule = SearchPattern.validateMatchRule("IWWPD2", SearchPattern.R_CAMELCASE_MATCH); |
4791 |
int validatedRule = SearchPattern.validateMatchRule("IWWPD2", SearchPattern.R_CAMEL_CASE_MATCH); |
4804 |
searchAllTypeNames("IWWPD2", validatedRule, requestor); |
4792 |
searchAllTypeNames("IWWPD2", validatedRule, requestor); |
4805 |
assertSearchResults( |
4793 |
assertSearchResults( |
4806 |
"IWorkbenchWindowPulldownDelegate2", |
4794 |
"IWorkbenchWindowPulldownDelegate2", |
Lines 4816-4822
Link Here
|
4816 |
"class UTFDocScannerSupport {}\n" |
4804 |
"class UTFDocScannerSupport {}\n" |
4817 |
); |
4805 |
); |
4818 |
TypeNameRequestor requestor = new SearchTests.SearchTypeNameRequestor(); |
4806 |
TypeNameRequestor requestor = new SearchTests.SearchTypeNameRequestor(); |
4819 |
int validatedRule = SearchPattern.validateMatchRule("UTF16DSS", SearchPattern.R_CAMELCASE_MATCH); |
4807 |
int validatedRule = SearchPattern.validateMatchRule("UTF16DSS", SearchPattern.R_CAMEL_CASE_MATCH); |
4820 |
searchAllTypeNames("UTF16DSS", validatedRule, requestor); |
4808 |
searchAllTypeNames("UTF16DSS", validatedRule, requestor); |
4821 |
assertSearchResults( |
4809 |
assertSearchResults( |
4822 |
"UTF16DocumentScannerSupport", |
4810 |
"UTF16DocumentScannerSupport", |
Lines 4832-4838
Link Here
|
4832 |
"class UTFDocScannerSupport {}\n" |
4820 |
"class UTFDocScannerSupport {}\n" |
4833 |
); |
4821 |
); |
4834 |
TypeNameRequestor requestor = new SearchTests.SearchTypeNameRequestor(); |
4822 |
TypeNameRequestor requestor = new SearchTests.SearchTypeNameRequestor(); |
4835 |
int validatedRule = SearchPattern.validateMatchRule("UTF1DSS", SearchPattern.R_CAMELCASE_MATCH); |
4823 |
int validatedRule = SearchPattern.validateMatchRule("UTF1DSS", SearchPattern.R_CAMEL_CASE_MATCH); |
4836 |
searchAllTypeNames("UTF1DSS", validatedRule, requestor); |
4824 |
searchAllTypeNames("UTF1DSS", validatedRule, requestor); |
4837 |
assertSearchResults( |
4825 |
assertSearchResults( |
4838 |
"UTF16DocumentScannerSupport\n" + |
4826 |
"UTF16DocumentScannerSupport\n" + |
Lines 4849-4855
Link Here
|
4849 |
"class UTFDocScannerSupport {}\n" |
4837 |
"class UTFDocScannerSupport {}\n" |
4850 |
); |
4838 |
); |
4851 |
TypeNameRequestor requestor = new SearchTests.SearchTypeNameRequestor(); |
4839 |
TypeNameRequestor requestor = new SearchTests.SearchTypeNameRequestor(); |
4852 |
int validatedRule = SearchPattern.validateMatchRule("UTF6DSS", SearchPattern.R_CAMELCASE_MATCH); |
4840 |
int validatedRule = SearchPattern.validateMatchRule("UTF6DSS", SearchPattern.R_CAMEL_CASE_MATCH); |
4853 |
searchAllTypeNames("UTF6DSS", validatedRule, requestor); |
4841 |
searchAllTypeNames("UTF6DSS", validatedRule, requestor); |
4854 |
assertSearchResults( |
4842 |
assertSearchResults( |
4855 |
"UTF16DocumentScannerSupport\n" + |
4843 |
"UTF16DocumentScannerSupport\n" + |
Lines 4866-4872
Link Here
|
4866 |
"class UTFDocScannerSupport {}\n" |
4854 |
"class UTFDocScannerSupport {}\n" |
4867 |
); |
4855 |
); |
4868 |
TypeNameRequestor requestor = new SearchTests.SearchTypeNameRequestor(); |
4856 |
TypeNameRequestor requestor = new SearchTests.SearchTypeNameRequestor(); |
4869 |
int validatedRule = SearchPattern.validateMatchRule("UTFDSS", SearchPattern.R_CAMELCASE_MATCH); |
4857 |
int validatedRule = SearchPattern.validateMatchRule("UTFDSS", SearchPattern.R_CAMEL_CASE_MATCH); |
4870 |
searchAllTypeNames("UTFDSS", validatedRule, requestor); |
4858 |
searchAllTypeNames("UTFDSS", validatedRule, requestor); |
4871 |
assertSearchResults( |
4859 |
assertSearchResults( |
4872 |
"UTF16DocumentScannerSupport\n" + |
4860 |
"UTF16DocumentScannerSupport\n" + |
Lines 4886-5340
Link Here
|
4886 |
*/ |
4874 |
*/ |
4887 |
// Types search |
4875 |
// Types search |
4888 |
private void setUpBug110060_TypePattern() throws CoreException { |
4876 |
private void setUpBug110060_TypePattern() throws CoreException { |
4889 |
workingCopies = new ICompilationUnit[5]; |
4877 |
workingCopies = new ICompilationUnit[1]; |
4890 |
workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/b110060/AA.java", |
4878 |
workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/b110060/Test.java", |
4891 |
"package b110060;\n" + |
|
|
4892 |
"public class AA {\n" + |
4893 |
"}\n" |
4894 |
); |
4895 |
workingCopies[1] = getWorkingCopy("/JavaSearchBugs/src/b110060/AAxx.java", |
4896 |
"package b110060;\n" + |
4897 |
"public class AAxx {\n" + |
4898 |
"}\n" |
4899 |
); |
4900 |
workingCopies[2] = getWorkingCopy("/JavaSearchBugs/src/b110060/AxxAyy.java", |
4901 |
"package b110060;\n" + |
4902 |
"public class AxxAyy {\n" + |
4903 |
"}\n" |
4904 |
); |
4905 |
workingCopies[3] = getWorkingCopy("/JavaSearchBugs/src/b110060/AxA.java", |
4906 |
"package b110060;\n" + |
4907 |
"public class AxA {\n" + |
4908 |
"}\n" |
4909 |
); |
4910 |
workingCopies[4] = getWorkingCopy("/JavaSearchBugs/src/b110060/Test.java", |
4911 |
"package b110060;\n" + |
4879 |
"package b110060;\n" + |
4912 |
"public class Test {\n" + |
4880 |
"public class Test {\n" + |
4913 |
" AA aa;\n" + |
4881 |
" Aaa a1;\n" + |
4914 |
" AAxx aaxx;\n" + |
4882 |
" AAa a2;\n" + |
4915 |
" AxA axa;\n" + |
4883 |
" AaAaAa a3;\n" + |
4916 |
" AxxAyy axxayy;\n" + |
4884 |
" AAxx a4;\n" + |
4917 |
"}\n" |
4885 |
" AxA a5;\n" + |
|
|
4886 |
" AxxAyy a6;\n" + |
4887 |
"}\n" + |
4888 |
"class AAa {}\n" + |
4889 |
"class Aaa {}\n" + |
4890 |
"class AaAaAa {}\n" + |
4891 |
"class AAxx {}\n" + |
4892 |
"class AxA {}\n" + |
4893 |
"class AxxAyy {}\n" |
4918 |
); |
4894 |
); |
4919 |
} |
4895 |
} |
|
|
4896 |
/** @deprecated As using a depreciated constant */ |
4920 |
public void testBug110060_TypePattern01() throws CoreException { |
4897 |
public void testBug110060_TypePattern01() throws CoreException { |
4921 |
setUpBug110060_TypePattern(); |
4898 |
setUpBug110060_TypePattern(); |
4922 |
search("AA", TYPE, REFERENCES, SearchPattern.R_CAMELCASE_MATCH); |
4899 |
search("AA", TYPE, REFERENCES, SearchPattern.R_CAMELCASE_MATCH); |
4923 |
assertSearchResults( |
4900 |
assertSearchResults( |
4924 |
"src/b110060/Test.java b110060.Test.aa [AA] EXACT_MATCH\n" + |
4901 |
"src/b110060/Test.java b110060.Test.a1 [Aaa] EXACT_MATCH\n" + |
4925 |
"src/b110060/Test.java b110060.Test.aaxx [AAxx] EXACT_MATCH\n" + |
4902 |
"src/b110060/Test.java b110060.Test.a2 [AAa] EXACT_MATCH\n" + |
4926 |
"src/b110060/Test.java b110060.Test.axa [AxA] EXACT_MATCH\n" + |
4903 |
"src/b110060/Test.java b110060.Test.a3 [AaAaAa] EXACT_MATCH\n" + |
4927 |
"src/b110060/Test.java b110060.Test.axxayy [AxxAyy] EXACT_MATCH" |
4904 |
"src/b110060/Test.java b110060.Test.a4 [AAxx] EXACT_MATCH\n" + |
|
|
4905 |
"src/b110060/Test.java b110060.Test.a5 [AxA] EXACT_MATCH\n" + |
4906 |
"src/b110060/Test.java b110060.Test.a6 [AxxAyy] EXACT_MATCH" |
4928 |
); |
4907 |
); |
4929 |
} |
4908 |
} |
4930 |
|
4909 |
public void testBug110060_TypePattern01new() throws CoreException { |
|
|
4910 |
setUpBug110060_TypePattern(); |
4911 |
search("AA", TYPE, REFERENCES, SearchPattern.R_CAMEL_CASE_MATCH); |
4912 |
assertSearchResults( |
4913 |
"src/b110060/Test.java b110060.Test.a2 [AAa] EXACT_MATCH\n" + |
4914 |
"src/b110060/Test.java b110060.Test.a4 [AAxx] EXACT_MATCH\n" + |
4915 |
"src/b110060/Test.java b110060.Test.a5 [AxA] EXACT_MATCH\n" + |
4916 |
"src/b110060/Test.java b110060.Test.a6 [AxxAyy] EXACT_MATCH" |
4917 |
); |
4918 |
} |
4919 |
/** @deprecated As using a depreciated constant */ |
4931 |
public void testBug110060_TypePattern02() throws CoreException { |
4920 |
public void testBug110060_TypePattern02() throws CoreException { |
4932 |
setUpBug110060_TypePattern(); |
4921 |
setUpBug110060_TypePattern(); |
4933 |
search("AA", TYPE, ALL_OCCURRENCES, SearchPattern.R_CAMELCASE_MATCH); |
4922 |
search("AA", TYPE, ALL_OCCURRENCES, SearchPattern.R_CAMELCASE_MATCH); |
4934 |
assertSearchResults( |
4923 |
assertSearchResults( |
4935 |
"src/b110060/AA.java b110060.AA [AA] EXACT_MATCH\n" + |
4924 |
"src/b110060/Test.java b110060.Test.a1 [Aaa] EXACT_MATCH\n" + |
4936 |
"src/b110060/AAxx.java b110060.AAxx [AAxx] EXACT_MATCH\n" + |
4925 |
"src/b110060/Test.java b110060.Test.a2 [AAa] EXACT_MATCH\n" + |
4937 |
"src/b110060/AxA.java b110060.AxA [AxA] EXACT_MATCH\n" + |
4926 |
"src/b110060/Test.java b110060.Test.a3 [AaAaAa] EXACT_MATCH\n" + |
4938 |
"src/b110060/AxxAyy.java b110060.AxxAyy [AxxAyy] EXACT_MATCH\n" + |
4927 |
"src/b110060/Test.java b110060.Test.a4 [AAxx] EXACT_MATCH\n" + |
4939 |
"src/b110060/Test.java b110060.Test.aa [AA] EXACT_MATCH\n" + |
4928 |
"src/b110060/Test.java b110060.Test.a5 [AxA] EXACT_MATCH\n" + |
4940 |
"src/b110060/Test.java b110060.Test.aaxx [AAxx] EXACT_MATCH\n" + |
4929 |
"src/b110060/Test.java b110060.Test.a6 [AxxAyy] EXACT_MATCH\n" + |
4941 |
"src/b110060/Test.java b110060.Test.axa [AxA] EXACT_MATCH\n" + |
4930 |
"src/b110060/Test.java b110060.AAa [AAa] EXACT_MATCH\n" + |
4942 |
"src/b110060/Test.java b110060.Test.axxayy [AxxAyy] EXACT_MATCH" |
4931 |
"src/b110060/Test.java b110060.Aaa [Aaa] EXACT_MATCH\n" + |
|
|
4932 |
"src/b110060/Test.java b110060.AaAaAa [AaAaAa] EXACT_MATCH\n" + |
4933 |
"src/b110060/Test.java b110060.AAxx [AAxx] EXACT_MATCH\n" + |
4934 |
"src/b110060/Test.java b110060.AxA [AxA] EXACT_MATCH\n" + |
4935 |
"src/b110060/Test.java b110060.AxxAyy [AxxAyy] EXACT_MATCH" |
4943 |
); |
4936 |
); |
4944 |
} |
4937 |
} |
4945 |
|
4938 |
public void testBug110060_TypePattern02new() throws CoreException { |
|
|
4939 |
setUpBug110060_TypePattern(); |
4940 |
search("AA", TYPE, ALL_OCCURRENCES, SearchPattern.R_CAMEL_CASE_MATCH); |
4941 |
assertSearchResults( |
4942 |
"src/b110060/Test.java b110060.Test.a2 [AAa] EXACT_MATCH\n" + |
4943 |
"src/b110060/Test.java b110060.Test.a4 [AAxx] EXACT_MATCH\n" + |
4944 |
"src/b110060/Test.java b110060.Test.a5 [AxA] EXACT_MATCH\n" + |
4945 |
"src/b110060/Test.java b110060.Test.a6 [AxxAyy] EXACT_MATCH\n" + |
4946 |
"src/b110060/Test.java b110060.AAa [AAa] EXACT_MATCH\n" + |
4947 |
"src/b110060/Test.java b110060.AAxx [AAxx] EXACT_MATCH\n" + |
4948 |
"src/b110060/Test.java b110060.AxA [AxA] EXACT_MATCH\n" + |
4949 |
"src/b110060/Test.java b110060.AxxAyy [AxxAyy] EXACT_MATCH" |
4950 |
); |
4951 |
} |
4952 |
/** @deprecated As using a depreciated constant */ |
4946 |
public void testBug110060_TypePattern03() throws CoreException { |
4953 |
public void testBug110060_TypePattern03() throws CoreException { |
4947 |
setUpBug110060_TypePattern(); |
4954 |
setUpBug110060_TypePattern(); |
4948 |
search("AAx", TYPE, ALL_OCCURRENCES, SearchPattern.R_CAMELCASE_MATCH); |
4955 |
search("AAx", TYPE, REFERENCES, SearchPattern.R_CAMELCASE_MATCH); |
4949 |
assertSearchResults( |
4956 |
assertSearchResults( |
4950 |
"src/b110060/AAxx.java b110060.AAxx [AAxx] EXACT_MATCH\n" + |
4957 |
"src/b110060/Test.java b110060.Test.a4 [AAxx] EXACT_MATCH" |
4951 |
"src/b110060/Test.java b110060.Test.aaxx [AAxx] EXACT_MATCH" |
|
|
4952 |
); |
4958 |
); |
4953 |
} |
4959 |
} |
4954 |
|
4960 |
public void testBug110060_TypePattern03new() throws CoreException { |
|
|
4961 |
setUpBug110060_TypePattern(); |
4962 |
search("AAx", TYPE, REFERENCES, SearchPattern.R_CAMEL_CASE_MATCH); |
4963 |
assertSearchResults( |
4964 |
"" // no result as camel case does not allow prefix match |
4965 |
); |
4966 |
} |
4967 |
/** @deprecated As using a depreciated constant */ |
4955 |
public void testBug110060_TypePattern04() throws CoreException { |
4968 |
public void testBug110060_TypePattern04() throws CoreException { |
4956 |
setUpBug110060_TypePattern(); |
4969 |
setUpBug110060_TypePattern(); |
4957 |
search("Axx", TYPE, ALL_OCCURRENCES, SearchPattern.R_CAMELCASE_MATCH); |
4970 |
search("Axx", TYPE, REFERENCES, SearchPattern.R_CAMELCASE_MATCH); |
4958 |
assertSearchResults( |
4971 |
assertSearchResults( |
4959 |
"src/b110060/AxxAyy.java b110060.AxxAyy [AxxAyy] EXACT_MATCH\n" + |
4972 |
"src/b110060/Test.java b110060.Test.a6 [AxxAyy] EXACT_MATCH" |
4960 |
"src/b110060/Test.java b110060.Test.axxayy [AxxAyy] EXACT_MATCH" |
|
|
4961 |
); |
4973 |
); |
4962 |
} |
4974 |
} |
4963 |
|
4975 |
public void testBug110060_TypePattern04new() throws CoreException { |
|
|
4976 |
setUpBug110060_TypePattern(); |
4977 |
search("Axx", TYPE, REFERENCES, SearchPattern.R_CAMEL_CASE_MATCH); |
4978 |
assertSearchResults( |
4979 |
"" // no result as camel case does not allow prefix match |
4980 |
); |
4981 |
} |
4982 |
/** @deprecated As using a depreciated constant */ |
4964 |
public void testBug110060_TypePattern05() throws CoreException { |
4983 |
public void testBug110060_TypePattern05() throws CoreException { |
4965 |
setUpBug110060_TypePattern(); |
4984 |
setUpBug110060_TypePattern(); |
4966 |
search("Ax", TYPE, ALL_OCCURRENCES, SearchPattern.R_CAMELCASE_MATCH); |
4985 |
search("Ax", TYPE, REFERENCES, SearchPattern.R_CAMELCASE_MATCH); |
4967 |
assertSearchResults( |
4986 |
assertSearchResults( |
4968 |
"src/b110060/AxA.java b110060.AxA [AxA] EXACT_MATCH\n" + |
4987 |
"src/b110060/Test.java b110060.Test.a5 [AxA] EXACT_MATCH\n" + |
4969 |
"src/b110060/AxxAyy.java b110060.AxxAyy [AxxAyy] EXACT_MATCH\n" + |
4988 |
"src/b110060/Test.java b110060.Test.a6 [AxxAyy] EXACT_MATCH" |
4970 |
"src/b110060/Test.java b110060.Test.axa [AxA] EXACT_MATCH\n" + |
|
|
4971 |
"src/b110060/Test.java b110060.Test.axxayy [AxxAyy] EXACT_MATCH" |
4972 |
); |
4989 |
); |
4973 |
} |
4990 |
} |
4974 |
|
4991 |
public void testBug110060_TypePattern05new() throws CoreException { |
|
|
4992 |
setUpBug110060_TypePattern(); |
4993 |
search("Ax", TYPE, ALL_OCCURRENCES, SearchPattern.R_CAMEL_CASE_MATCH); |
4994 |
assertSearchResults( |
4995 |
"" // no result as camel case does not allow prefix match |
4996 |
); |
4997 |
} |
4998 |
/** @deprecated As using a depreciated constant */ |
4975 |
public void testBug110060_TypePattern06() throws CoreException { |
4999 |
public void testBug110060_TypePattern06() throws CoreException { |
4976 |
setUpBug110060_TypePattern(); |
5000 |
setUpBug110060_TypePattern(); |
4977 |
search("A*A*", TYPE, ALL_OCCURRENCES, SearchPattern.R_CAMELCASE_MATCH); |
5001 |
search("A*A*", TYPE, REFERENCES, SearchPattern.R_CAMELCASE_MATCH); |
4978 |
assertSearchResults( |
5002 |
assertSearchResults( |
4979 |
"src/b110060/AA.java b110060.AA [AA] EXACT_MATCH\n" + |
5003 |
"src/b110060/Test.java b110060.Test.a1 [Aaa] EXACT_MATCH\n" + |
4980 |
"src/b110060/AAxx.java b110060.AAxx [AAxx] EXACT_MATCH\n" + |
5004 |
"src/b110060/Test.java b110060.Test.a2 [AAa] EXACT_MATCH\n" + |
4981 |
"src/b110060/AxA.java b110060.AxA [AxA] EXACT_MATCH\n" + |
5005 |
"src/b110060/Test.java b110060.Test.a3 [AaAaAa] EXACT_MATCH\n" + |
4982 |
"src/b110060/AxxAyy.java b110060.AxxAyy [AxxAyy] EXACT_MATCH\n" + |
5006 |
"src/b110060/Test.java b110060.Test.a4 [AAxx] EXACT_MATCH\n" + |
4983 |
"src/b110060/Test.java b110060.Test.aa [AA] EXACT_MATCH\n" + |
5007 |
"src/b110060/Test.java b110060.Test.a5 [AxA] EXACT_MATCH\n" + |
4984 |
"src/b110060/Test.java b110060.Test.aaxx [AAxx] EXACT_MATCH\n" + |
5008 |
"src/b110060/Test.java b110060.Test.a6 [AxxAyy] EXACT_MATCH" |
4985 |
"src/b110060/Test.java b110060.Test.axa [AxA] EXACT_MATCH\n" + |
|
|
4986 |
"src/b110060/Test.java b110060.Test.axxayy [AxxAyy] EXACT_MATCH\n" + |
4987 |
""+ getExternalJCLPathString("1.5") + " java.lang.annotation.Annotation EXACT_MATCH" |
4988 |
); |
5009 |
); |
4989 |
} |
5010 |
} |
4990 |
|
5011 |
public void testBug110060_TypePattern06new() throws CoreException { |
|
|
5012 |
setUpBug110060_TypePattern(); |
5013 |
search("A*A*", TYPE, REFERENCES, SearchPattern.R_CAMEL_CASE_MATCH); |
5014 |
assertSearchResults( |
5015 |
"src/b110060/Test.java b110060.Test.a1 [Aaa] EXACT_MATCH\n" + |
5016 |
"src/b110060/Test.java b110060.Test.a2 [AAa] EXACT_MATCH\n" + |
5017 |
"src/b110060/Test.java b110060.Test.a3 [AaAaAa] EXACT_MATCH\n" + |
5018 |
"src/b110060/Test.java b110060.Test.a4 [AAxx] EXACT_MATCH\n" + |
5019 |
"src/b110060/Test.java b110060.Test.a5 [AxA] EXACT_MATCH\n" + |
5020 |
"src/b110060/Test.java b110060.Test.a6 [AxxAyy] EXACT_MATCH" |
5021 |
); |
5022 |
} |
5023 |
/** @deprecated As using a depreciated constant */ |
4991 |
public void testBug110060_TypePattern07() throws CoreException { |
5024 |
public void testBug110060_TypePattern07() throws CoreException { |
4992 |
setUpBug110060_TypePattern(); |
5025 |
setUpBug110060_TypePattern(); |
4993 |
search("aa", TYPE, ALL_OCCURRENCES, SearchPattern.R_CAMELCASE_MATCH); |
5026 |
search("aa", TYPE, REFERENCES, SearchPattern.R_CAMELCASE_MATCH); |
4994 |
assertSearchResults(""); |
5027 |
assertSearchResults( |
|
|
5028 |
"" // no result because it's an invalid camel case pattern which is replaced with |
5029 |
// prefix case sensitive match bu SearchPatter.validateMatchRule(...) (old behavior) |
5030 |
); |
5031 |
} |
5032 |
public void testBug110060_TypePattern07new() throws CoreException { |
5033 |
setUpBug110060_TypePattern(); |
5034 |
search("aa", TYPE, REFERENCES, SearchPattern.R_CAMEL_CASE_MATCH); |
5035 |
// Not a valid camel case pattern => changed to prefix |
5036 |
assertSearchResults( |
5037 |
"src/b110060/Test.java b110060.Test.a1 [Aaa] EXACT_MATCH\n" + |
5038 |
"src/b110060/Test.java b110060.Test.a2 [AAa] EXACT_MATCH\n" + |
5039 |
"src/b110060/Test.java b110060.Test.a3 [AaAaAa] EXACT_MATCH\n" + |
5040 |
"src/b110060/Test.java b110060.Test.a4 [AAxx] EXACT_MATCH" |
5041 |
); |
4995 |
} |
5042 |
} |
4996 |
|
|
|
4997 |
public void testBug110060_TypePattern08() throws CoreException { |
5043 |
public void testBug110060_TypePattern08() throws CoreException { |
4998 |
setUpBug110060_TypePattern(); |
5044 |
setUpBug110060_TypePattern(); |
4999 |
search("aa", TYPE, ALL_OCCURRENCES, SearchPattern.R_CAMELCASE_MATCH | SearchPattern.R_PREFIX_MATCH); |
5045 |
search("aa", TYPE, REFERENCES, SearchPattern.R_CAMEL_CASE_MATCH | SearchPattern.R_PREFIX_MATCH); |
5000 |
assertSearchResults( |
5046 |
assertSearchResults( |
5001 |
"src/b110060/AA.java b110060.AA [AA] EXACT_MATCH\n" + |
5047 |
"src/b110060/Test.java b110060.Test.a1 [Aaa] EXACT_MATCH\n" + |
5002 |
"src/b110060/AAxx.java b110060.AAxx [AAxx] EXACT_MATCH\n" + |
5048 |
"src/b110060/Test.java b110060.Test.a2 [AAa] EXACT_MATCH\n" + |
5003 |
"src/b110060/Test.java b110060.Test.aa [AA] EXACT_MATCH\n" + |
5049 |
"src/b110060/Test.java b110060.Test.a3 [AaAaAa] EXACT_MATCH\n" + |
5004 |
"src/b110060/Test.java b110060.Test.aaxx [AAxx] EXACT_MATCH" |
5050 |
"src/b110060/Test.java b110060.Test.a4 [AAxx] EXACT_MATCH" |
5005 |
); |
5051 |
); |
5006 |
} |
5052 |
} |
5007 |
|
|
|
5008 |
public void testBug110060_TypePattern09() throws CoreException { |
5053 |
public void testBug110060_TypePattern09() throws CoreException { |
5009 |
setUpBug110060_TypePattern(); |
5054 |
setUpBug110060_TypePattern(); |
5010 |
search("AA", TYPE, ALL_OCCURRENCES, SearchPattern.R_CAMELCASE_MATCH | SearchPattern.R_CASE_SENSITIVE); |
5055 |
search("AA", TYPE, REFERENCES, SearchPattern.R_CAMEL_CASE_MATCH | SearchPattern.R_CASE_SENSITIVE); |
5011 |
assertSearchResults( |
5056 |
assertSearchResults( |
5012 |
"src/b110060/AA.java b110060.AA [AA] EXACT_MATCH\n" + |
5057 |
"src/b110060/Test.java b110060.Test.a2 [AAa] EXACT_MATCH\n" + |
5013 |
"src/b110060/AAxx.java b110060.AAxx [AAxx] EXACT_MATCH\n" + |
5058 |
"src/b110060/Test.java b110060.Test.a4 [AAxx] EXACT_MATCH\n" + |
5014 |
"src/b110060/AxA.java b110060.AxA [AxA] EXACT_MATCH\n" + |
5059 |
"src/b110060/Test.java b110060.Test.a5 [AxA] EXACT_MATCH\n" + |
5015 |
"src/b110060/AxxAyy.java b110060.AxxAyy [AxxAyy] EXACT_MATCH\n" + |
5060 |
"src/b110060/Test.java b110060.Test.a6 [AxxAyy] EXACT_MATCH" |
5016 |
"src/b110060/Test.java b110060.Test.aa [AA] EXACT_MATCH\n" + |
|
|
5017 |
"src/b110060/Test.java b110060.Test.aaxx [AAxx] EXACT_MATCH\n" + |
5018 |
"src/b110060/Test.java b110060.Test.axa [AxA] EXACT_MATCH\n" + |
5019 |
"src/b110060/Test.java b110060.Test.axxayy [AxxAyy] EXACT_MATCH" |
5020 |
); |
5061 |
); |
5021 |
} |
5062 |
} |
5022 |
|
5063 |
/** @deprecated As using a depreciated constant */ |
5023 |
public void testBug110060_TypePattern10() throws CoreException { |
5064 |
public void testBug110060_TypePattern10() throws CoreException { |
5024 |
setUpBug110060_TypePattern(); |
5065 |
setUpBug110060_TypePattern(); |
5025 |
search("AxAx", TYPE, ALL_OCCURRENCES, SearchPattern.R_CAMELCASE_MATCH); |
5066 |
search("AxAx", TYPE, REFERENCES, SearchPattern.R_CAMELCASE_MATCH); |
5026 |
assertSearchResults(""); |
5067 |
assertSearchResults(""); |
5027 |
} |
5068 |
} |
5028 |
|
5069 |
public void testBug110060_TypePattern10new() throws CoreException { |
|
|
5070 |
setUpBug110060_TypePattern(); |
5071 |
search("AxAx", TYPE, REFERENCES, SearchPattern.R_CAMEL_CASE_MATCH); |
5072 |
assertSearchResults(""); |
5073 |
} |
5074 |
/** @deprecated As using a depreciated constant */ |
5029 |
public void testBug110060_TypePattern11() throws CoreException { |
5075 |
public void testBug110060_TypePattern11() throws CoreException { |
5030 |
setUpBug110060_TypePattern(); |
5076 |
setUpBug110060_TypePattern(); |
5031 |
search("AxxA", TYPE, ALL_OCCURRENCES, SearchPattern.R_CAMELCASE_MATCH); |
5077 |
search("AxxA", TYPE, REFERENCES, SearchPattern.R_CAMELCASE_MATCH); |
5032 |
assertSearchResults( |
5078 |
assertSearchResults( |
5033 |
"src/b110060/AxxAyy.java b110060.AxxAyy [AxxAyy] EXACT_MATCH\n" + |
5079 |
"src/b110060/Test.java b110060.Test.a6 [AxxAyy] EXACT_MATCH" |
5034 |
"src/b110060/Test.java b110060.Test.axxayy [AxxAyy] EXACT_MATCH" |
|
|
5035 |
); |
5080 |
); |
5036 |
} |
5081 |
} |
5037 |
|
5082 |
public void testBug110060_TypePattern11new() throws CoreException { |
|
|
5083 |
setUpBug110060_TypePattern(); |
5084 |
search("AxxA", TYPE, REFERENCES, SearchPattern.R_CAMEL_CASE_MATCH); |
5085 |
assertSearchResults( |
5086 |
"src/b110060/Test.java b110060.Test.a6 [AxxAyy] EXACT_MATCH" |
5087 |
); |
5088 |
} |
5089 |
/** @deprecated As using a depreciated constant */ |
5038 |
public void testBug110060_TypePattern12() throws CoreException { |
5090 |
public void testBug110060_TypePattern12() throws CoreException { |
5039 |
setUpBug110060_TypePattern(); |
5091 |
setUpBug110060_TypePattern(); |
5040 |
search("AxXA", TYPE, ALL_OCCURRENCES, SearchPattern.R_CAMELCASE_MATCH); |
5092 |
search("AxXA", TYPE, REFERENCES, SearchPattern.R_CAMELCASE_MATCH); |
5041 |
assertSearchResults( |
5093 |
assertSearchResults( |
5042 |
"src/b110060/AxxAyy.java b110060.AxxAyy [AxxAyy] EXACT_MATCH\n" + |
5094 |
"src/b110060/Test.java b110060.Test.a6 [AxxAyy] EXACT_MATCH" |
5043 |
"src/b110060/Test.java b110060.Test.axxayy [AxxAyy] EXACT_MATCH" |
|
|
5044 |
); |
5095 |
); |
5045 |
} |
5096 |
} |
|
|
5097 |
public void testBug110060_TypePattern12new() throws CoreException { |
5098 |
setUpBug110060_TypePattern(); |
5099 |
search("AxXA", TYPE, REFERENCES, SearchPattern.R_CAMEL_CASE_MATCH); |
5100 |
assertSearchResults(""); |
5101 |
} |
5046 |
|
5102 |
|
|
|
5103 |
// Search all type names requests |
5104 |
/** @deprecated As using a depreciated constant */ |
5047 |
public void testBug110060_AllTypeNames01() throws CoreException { |
5105 |
public void testBug110060_AllTypeNames01() throws CoreException { |
5048 |
setUpBug110060_TypePattern(); |
5106 |
setUpBug110060_TypePattern(); |
5049 |
TypeNameRequestor requestor = new SearchTests.SearchTypeNameRequestor(); |
5107 |
TypeNameRequestor requestor = new SearchTests.SearchTypeNameRequestor(); |
5050 |
new SearchEngine(this.workingCopies).searchAllTypeNames( |
5108 |
searchAllTypeNames("AA", SearchPattern.R_CAMELCASE_MATCH, requestor); |
5051 |
null, |
|
|
5052 |
SearchPattern.R_EXACT_MATCH, |
5053 |
"AA".toCharArray(), |
5054 |
SearchPattern.R_CAMELCASE_MATCH, |
5055 |
TYPE, |
5056 |
getJavaSearchScope(), |
5057 |
requestor, |
5058 |
IJavaSearchConstants.WAIT_UNTIL_READY_TO_SEARCH, |
5059 |
null |
5060 |
); |
5061 |
assertSearchResults( |
5109 |
assertSearchResults( |
5062 |
"Unexpected all type names", |
5110 |
"Unexpected all type names", |
5063 |
"b110060.AA\n" + |
5111 |
"b110060.AAa\n" + |
5064 |
"b110060.AAxx\n" + |
5112 |
"b110060.AAxx\n" + |
5065 |
"b110060.AxA\n" + |
5113 |
"b110060.AaAaAa\n" + |
|
|
5114 |
"b110060.Aaa\n" + |
5115 |
"b110060.AxA\n" + |
5116 |
"b110060.AxxAyy", |
5117 |
requestor); |
5118 |
} |
5119 |
public void testBug110060_AllTypeNames01new() throws CoreException { |
5120 |
setUpBug110060_TypePattern(); |
5121 |
TypeNameRequestor requestor = new SearchTests.SearchTypeNameRequestor(); |
5122 |
searchAllTypeNames("AA", SearchPattern.R_CAMEL_CASE_MATCH, requestor); |
5123 |
assertSearchResults( |
5124 |
"Unexpected all type names", |
5125 |
"b110060.AAa\n" + |
5126 |
"b110060.AAxx\n" + |
5127 |
"b110060.AxA\n" + |
5066 |
"b110060.AxxAyy", |
5128 |
"b110060.AxxAyy", |
5067 |
requestor); |
5129 |
requestor); |
5068 |
} |
5130 |
} |
5069 |
|
|
|
5070 |
public void testBug110060_AllTypeNames02() throws CoreException { |
5131 |
public void testBug110060_AllTypeNames02() throws CoreException { |
5071 |
setUpBug110060_TypePattern(); |
5132 |
setUpBug110060_TypePattern(); |
5072 |
TypeNameRequestor requestor = new SearchTests.SearchTypeNameRequestor(); |
5133 |
TypeNameRequestor requestor = new SearchTests.SearchTypeNameRequestor(); |
5073 |
new SearchEngine(this.workingCopies).searchAllTypeNames( |
5134 |
searchAllTypeNames("AA", SearchPattern.R_CAMEL_CASE_MATCH | SearchPattern.R_PREFIX_MATCH, requestor); |
5074 |
null, |
|
|
5075 |
SearchPattern.R_EXACT_MATCH, |
5076 |
"AA".toCharArray(), |
5077 |
SearchPattern.R_CAMELCASE_MATCH | SearchPattern.R_PREFIX_MATCH, |
5078 |
TYPE, |
5079 |
getJavaSearchScope(), |
5080 |
requestor, |
5081 |
IJavaSearchConstants.WAIT_UNTIL_READY_TO_SEARCH, |
5082 |
null |
5083 |
); |
5084 |
assertSearchResults( |
5135 |
assertSearchResults( |
5085 |
"Unexpected all type names", |
5136 |
"Unexpected all type names", |
5086 |
"b110060.AA\n" + |
5137 |
"b110060.AAa\n" + |
5087 |
"b110060.AAxx\n" + |
5138 |
"b110060.AAxx\n" + |
5088 |
"b110060.AxA\n" + |
5139 |
"b110060.AaAaAa\n" + |
|
|
5140 |
"b110060.Aaa\n" + |
5141 |
"b110060.AxA\n" + |
5089 |
"b110060.AxxAyy", |
5142 |
"b110060.AxxAyy", |
5090 |
requestor); |
5143 |
requestor); |
5091 |
} |
5144 |
} |
5092 |
|
|
|
5093 |
public void testBug110060_AllTypeNames03() throws CoreException { |
5145 |
public void testBug110060_AllTypeNames03() throws CoreException { |
5094 |
setUpBug110060_TypePattern(); |
5146 |
setUpBug110060_TypePattern(); |
5095 |
TypeNameRequestor requestor = new SearchTests.SearchTypeNameRequestor(); |
5147 |
TypeNameRequestor requestor = new SearchTests.SearchTypeNameRequestor(); |
5096 |
new SearchEngine(this.workingCopies).searchAllTypeNames( |
5148 |
searchAllTypeNames("AAA", SearchPattern.R_CAMEL_CASE_MATCH | SearchPattern.R_CASE_SENSITIVE, requestor); |
5097 |
null, |
|
|
5098 |
SearchPattern.R_EXACT_MATCH, |
5099 |
"AA".toCharArray(), |
5100 |
SearchPattern.R_CAMELCASE_MATCH | SearchPattern.R_CASE_SENSITIVE, |
5101 |
TYPE, |
5102 |
getJavaSearchScope(), |
5103 |
requestor, |
5104 |
IJavaSearchConstants.WAIT_UNTIL_READY_TO_SEARCH, |
5105 |
null |
5106 |
); |
5107 |
assertSearchResults( |
5149 |
assertSearchResults( |
5108 |
"Unexpected all type names", |
5150 |
"Unexpected all type names", |
5109 |
"b110060.AA\n" + |
5151 |
"b110060.AaAaAa", |
5110 |
"b110060.AAxx\n" + |
|
|
5111 |
"b110060.AxA\n" + |
5112 |
"b110060.AxxAyy", |
5113 |
requestor); |
5152 |
requestor); |
5114 |
} |
5153 |
} |
5115 |
|
|
|
5116 |
public void testBug110060_AllTypeNames04() throws CoreException { |
5154 |
public void testBug110060_AllTypeNames04() throws CoreException { |
5117 |
setUpBug110060_TypePattern(); |
5155 |
setUpBug110060_TypePattern(); |
5118 |
TypeNameRequestor requestor = new SearchTests.SearchTypeNameRequestor(); |
5156 |
TypeNameRequestor requestor = new SearchTests.SearchTypeNameRequestor(); |
5119 |
new SearchEngine(this.workingCopies).searchAllTypeNames( |
5157 |
searchAllTypeNames("AA", SearchPattern.R_CAMEL_CASE_MATCH | SearchPattern.R_PREFIX_MATCH | SearchPattern.R_CASE_SENSITIVE, requestor); |
5120 |
null, |
|
|
5121 |
SearchPattern.R_EXACT_MATCH, |
5122 |
"AA".toCharArray(), |
5123 |
SearchPattern.R_CAMELCASE_MATCH | SearchPattern.R_PREFIX_MATCH | SearchPattern.R_CASE_SENSITIVE, |
5124 |
TYPE, |
5125 |
getJavaSearchScope(), |
5126 |
requestor, |
5127 |
IJavaSearchConstants.WAIT_UNTIL_READY_TO_SEARCH, |
5128 |
null |
5129 |
); |
5130 |
assertSearchResults( |
5158 |
assertSearchResults( |
5131 |
"Unexpected all type names", |
5159 |
"Unexpected all type names", |
5132 |
"b110060.AA\n" + |
5160 |
"b110060.AAa\n" + |
5133 |
"b110060.AAxx\n" + |
5161 |
"b110060.AAxx\n" + |
5134 |
"b110060.AxA\n" + |
5162 |
"b110060.AaAaAa\n" + |
|
|
5163 |
"b110060.AxA\n" + |
5135 |
"b110060.AxxAyy", |
5164 |
"b110060.AxxAyy", |
5136 |
requestor); |
5165 |
requestor); |
5137 |
} |
5166 |
} |
5138 |
|
|
|
5139 |
public void testBug110060_AllTypeNames05() throws CoreException { |
5167 |
public void testBug110060_AllTypeNames05() throws CoreException { |
5140 |
setUpBug110060_TypePattern(); |
5168 |
setUpBug110060_TypePattern(); |
5141 |
TypeNameRequestor requestor = new SearchTests.SearchTypeNameRequestor(); |
5169 |
TypeNameRequestor requestor = new SearchTests.SearchTypeNameRequestor(); |
5142 |
new SearchEngine(this.workingCopies).searchAllTypeNames( |
5170 |
searchAllTypeNames("AA", SearchPattern.R_PREFIX_MATCH, requestor); |
5143 |
null, |
|
|
5144 |
SearchPattern.R_EXACT_MATCH, |
5145 |
"AA".toCharArray(), |
5146 |
SearchPattern.R_PREFIX_MATCH, |
5147 |
TYPE, |
5148 |
getJavaSearchScope(), |
5149 |
requestor, |
5150 |
IJavaSearchConstants.WAIT_UNTIL_READY_TO_SEARCH, |
5151 |
null |
5152 |
); |
5153 |
assertSearchResults( |
5171 |
assertSearchResults( |
5154 |
"Unexpected all type names", |
5172 |
"Unexpected all type names", |
5155 |
"b110060.AA\n" + |
5173 |
"b110060.AAa\n" + |
5156 |
"b110060.AAxx", |
5174 |
"b110060.AAxx\n" + |
|
|
5175 |
"b110060.AaAaAa\n" + |
5176 |
"b110060.Aaa", |
5157 |
requestor); |
5177 |
requestor); |
5158 |
} |
5178 |
} |
5159 |
|
|
|
5160 |
public void testBug110060_AllTypeNames06() throws CoreException { |
5179 |
public void testBug110060_AllTypeNames06() throws CoreException { |
5161 |
setUpBug110060_TypePattern(); |
5180 |
setUpBug110060_TypePattern(); |
5162 |
TypeNameRequestor requestor = new SearchTests.SearchTypeNameRequestor(); |
5181 |
TypeNameRequestor requestor = new SearchTests.SearchTypeNameRequestor(); |
5163 |
new SearchEngine(this.workingCopies).searchAllTypeNames( |
5182 |
searchAllTypeNames("AAA", SearchPattern.R_CASE_SENSITIVE, requestor); |
5164 |
null, |
|
|
5165 |
SearchPattern.R_EXACT_MATCH, |
5166 |
"AA".toCharArray(), |
5167 |
SearchPattern.R_CASE_SENSITIVE, |
5168 |
TYPE, |
5169 |
getJavaSearchScope(), |
5170 |
requestor, |
5171 |
IJavaSearchConstants.WAIT_UNTIL_READY_TO_SEARCH, |
5172 |
null |
5173 |
); |
5174 |
assertSearchResults( |
5183 |
assertSearchResults( |
5175 |
"Unexpected all type names", |
5184 |
"Unexpected all type names", |
5176 |
"b110060.AA", |
5185 |
"", |
5177 |
requestor); |
5186 |
requestor); |
5178 |
} |
5187 |
} |
5179 |
|
|
|
5180 |
public void testBug110060_AllTypeNames07() throws CoreException { |
5188 |
public void testBug110060_AllTypeNames07() throws CoreException { |
5181 |
setUpBug110060_TypePattern(); |
5189 |
setUpBug110060_TypePattern(); |
5182 |
TypeNameRequestor requestor = new SearchTests.SearchTypeNameRequestor(); |
5190 |
TypeNameRequestor requestor = new SearchTests.SearchTypeNameRequestor(); |
5183 |
new SearchEngine(this.workingCopies).searchAllTypeNames( |
5191 |
searchAllTypeNames("AA", SearchPattern.R_PREFIX_MATCH | SearchPattern.R_CASE_SENSITIVE, requestor); |
5184 |
null, |
|
|
5185 |
SearchPattern.R_EXACT_MATCH, |
5186 |
"AA".toCharArray(), |
5187 |
SearchPattern.R_PREFIX_MATCH | SearchPattern.R_CASE_SENSITIVE, |
5188 |
TYPE, |
5189 |
getJavaSearchScope(), |
5190 |
requestor, |
5191 |
IJavaSearchConstants.WAIT_UNTIL_READY_TO_SEARCH, |
5192 |
null |
5193 |
); |
5194 |
assertSearchResults( |
5192 |
assertSearchResults( |
5195 |
"Unexpected all type names", |
5193 |
"Unexpected all type names", |
5196 |
"b110060.AA\n" + |
5194 |
"b110060.AAa\n" + |
5197 |
"b110060.AAxx", |
5195 |
"b110060.AAxx", |
5198 |
requestor); |
5196 |
requestor); |
5199 |
} |
5197 |
} |
5200 |
|
5198 |
/** @deprecated As using a depreciated constant */ |
5201 |
public void testBug110060_AllTypeNames08() throws CoreException { |
5199 |
public void testBug110060_AllTypeNames08() throws CoreException { |
5202 |
setUpBug110060_TypePattern(); |
5200 |
setUpBug110060_TypePattern(); |
5203 |
TypeNameRequestor requestor = new SearchTests.SearchTypeNameRequestor(); |
5201 |
TypeNameRequestor requestor = new SearchTests.SearchTypeNameRequestor(); |
5204 |
new SearchEngine(this.workingCopies).searchAllTypeNames( |
5202 |
searchAllTypeNames("aa", SearchPattern.R_CAMELCASE_MATCH, requestor); |
5205 |
null, |
|
|
5206 |
SearchPattern.R_EXACT_MATCH, |
5207 |
"aa".toCharArray(), |
5208 |
SearchPattern.R_CAMELCASE_MATCH, |
5209 |
TYPE, |
5210 |
getJavaSearchScope(), |
5211 |
requestor, |
5212 |
IJavaSearchConstants.WAIT_UNTIL_READY_TO_SEARCH, |
5213 |
null |
5214 |
); |
5215 |
assertSearchResults( |
5203 |
assertSearchResults( |
5216 |
"Unexpected all type names", |
5204 |
"Unexpected all type names", |
5217 |
"b110060.AA\n" + |
5205 |
"b110060.AAa\n" + |
5218 |
"b110060.AAxx", |
5206 |
"b110060.AAxx\n" + |
|
|
5207 |
"b110060.AaAaAa\n" + |
5208 |
"b110060.Aaa", |
5209 |
requestor); |
5210 |
} |
5211 |
public void testBug110060_AllTypeNames08new() throws CoreException { |
5212 |
setUpBug110060_TypePattern(); |
5213 |
TypeNameRequestor requestor = new SearchTests.SearchTypeNameRequestor(); |
5214 |
searchAllTypeNames("aa", SearchPattern.R_CAMEL_CASE_MATCH, requestor); |
5215 |
assertSearchResults( |
5216 |
"Unexpected all type names", |
5217 |
"", // no match as pattern is not a valid camel case |
5219 |
requestor); |
5218 |
requestor); |
5220 |
} |
5219 |
} |
5221 |
|
|
|
5222 |
public void testBug110060_AllTypeNames09() throws CoreException { |
5220 |
public void testBug110060_AllTypeNames09() throws CoreException { |
5223 |
setUpBug110060_TypePattern(); |
5221 |
setUpBug110060_TypePattern(); |
5224 |
TypeNameRequestor requestor = new SearchTests.SearchTypeNameRequestor(); |
5222 |
TypeNameRequestor requestor = new SearchTests.SearchTypeNameRequestor(); |
5225 |
new SearchEngine(this.workingCopies).searchAllTypeNames( |
5223 |
searchAllTypeNames("aa", SearchPattern.R_CAMEL_CASE_MATCH | SearchPattern.R_PREFIX_MATCH, requestor); |
5226 |
null, |
|
|
5227 |
SearchPattern.R_EXACT_MATCH, |
5228 |
"aa".toCharArray(), |
5229 |
SearchPattern.R_CAMELCASE_MATCH | SearchPattern.R_PREFIX_MATCH, |
5230 |
TYPE, |
5231 |
getJavaSearchScope(), |
5232 |
requestor, |
5233 |
IJavaSearchConstants.WAIT_UNTIL_READY_TO_SEARCH, |
5234 |
null |
5235 |
); |
5236 |
assertSearchResults( |
5224 |
assertSearchResults( |
5237 |
"Unexpected all type names", |
5225 |
"Unexpected all type names", |
5238 |
"b110060.AA\n" + |
5226 |
"b110060.AAa\n" + |
5239 |
"b110060.AAxx", |
5227 |
"b110060.AAxx\n" + |
|
|
5228 |
"b110060.AaAaAa\n" + |
5229 |
"b110060.Aaa", |
5240 |
requestor); |
5230 |
requestor); |
5241 |
} |
5231 |
} |
5242 |
|
|
|
5243 |
public void testBug110060_AllTypeNames10() throws CoreException { |
5232 |
public void testBug110060_AllTypeNames10() throws CoreException { |
5244 |
setUpBug110060_TypePattern(); |
5233 |
setUpBug110060_TypePattern(); |
5245 |
TypeNameRequestor requestor = new SearchTests.SearchTypeNameRequestor(); |
5234 |
TypeNameRequestor requestor = new SearchTests.SearchTypeNameRequestor(); |
5246 |
new SearchEngine(this.workingCopies).searchAllTypeNames( |
5235 |
searchAllTypeNames("aa", SearchPattern.R_CAMEL_CASE_MATCH | SearchPattern.R_CASE_SENSITIVE, requestor); |
5247 |
null, |
|
|
5248 |
SearchPattern.R_EXACT_MATCH, |
5249 |
"aa".toCharArray(), |
5250 |
SearchPattern.R_CAMELCASE_MATCH | SearchPattern.R_CASE_SENSITIVE, |
5251 |
TYPE, |
5252 |
getJavaSearchScope(), |
5253 |
requestor, |
5254 |
IJavaSearchConstants.WAIT_UNTIL_READY_TO_SEARCH, |
5255 |
null |
5256 |
); |
5257 |
assertSearchResults( |
5236 |
assertSearchResults( |
5258 |
"Unexpected all type names", |
5237 |
"Unexpected all type names", |
5259 |
"", |
5238 |
"", // no match as pattern is not a valid camel case |
5260 |
requestor); |
5239 |
requestor); |
5261 |
} |
5240 |
} |
5262 |
|
|
|
5263 |
public void testBug110060_AllTypeNames11() throws CoreException { |
5241 |
public void testBug110060_AllTypeNames11() throws CoreException { |
5264 |
setUpBug110060_TypePattern(); |
5242 |
setUpBug110060_TypePattern(); |
5265 |
TypeNameRequestor requestor = new SearchTests.SearchTypeNameRequestor(); |
5243 |
TypeNameRequestor requestor = new SearchTests.SearchTypeNameRequestor(); |
5266 |
new SearchEngine(this.workingCopies).searchAllTypeNames( |
5244 |
searchAllTypeNames("aa", SearchPattern.R_CAMEL_CASE_MATCH | SearchPattern.R_PREFIX_MATCH | SearchPattern.R_CASE_SENSITIVE, requestor); |
5267 |
null, |
|
|
5268 |
SearchPattern.R_EXACT_MATCH, |
5269 |
"aa".toCharArray(), |
5270 |
SearchPattern.R_CAMELCASE_MATCH | SearchPattern.R_PREFIX_MATCH | SearchPattern.R_CASE_SENSITIVE, |
5271 |
TYPE, |
5272 |
getJavaSearchScope(), |
5273 |
requestor, |
5274 |
IJavaSearchConstants.WAIT_UNTIL_READY_TO_SEARCH, |
5275 |
null |
5276 |
); |
5277 |
assertSearchResults( |
5245 |
assertSearchResults( |
5278 |
"Unexpected all type names", |
5246 |
"Unexpected all type names", |
5279 |
"", |
5247 |
"", |
5280 |
requestor); |
5248 |
requestor); |
5281 |
} |
5249 |
} |
5282 |
|
|
|
5283 |
public void testBug110060_AllTypeNames12() throws CoreException { |
5250 |
public void testBug110060_AllTypeNames12() throws CoreException { |
5284 |
setUpBug110060_TypePattern(); |
5251 |
setUpBug110060_TypePattern(); |
5285 |
TypeNameRequestor requestor = new SearchTests.SearchTypeNameRequestor(); |
5252 |
TypeNameRequestor requestor = new SearchTests.SearchTypeNameRequestor(); |
5286 |
new SearchEngine(this.workingCopies).searchAllTypeNames( |
5253 |
searchAllTypeNames("aa", SearchPattern.R_PREFIX_MATCH, requestor); |
5287 |
null, |
|
|
5288 |
SearchPattern.R_EXACT_MATCH, |
5289 |
"aa".toCharArray(), |
5290 |
SearchPattern.R_PREFIX_MATCH, |
5291 |
TYPE, |
5292 |
getJavaSearchScope(), |
5293 |
requestor, |
5294 |
IJavaSearchConstants.WAIT_UNTIL_READY_TO_SEARCH, |
5295 |
null |
5296 |
); |
5297 |
assertSearchResults( |
5254 |
assertSearchResults( |
5298 |
"Unexpected all type names", |
5255 |
"Unexpected all type names", |
5299 |
"b110060.AA\n" + |
5256 |
"b110060.AAa\n" + |
5300 |
"b110060.AAxx", |
5257 |
"b110060.AAxx\n" + |
|
|
5258 |
"b110060.AaAaAa\n" + |
5259 |
"b110060.Aaa", |
5301 |
requestor); |
5260 |
requestor); |
5302 |
} |
5261 |
} |
5303 |
|
|
|
5304 |
public void testBug110060_AllTypeNames13() throws CoreException { |
5262 |
public void testBug110060_AllTypeNames13() throws CoreException { |
5305 |
setUpBug110060_TypePattern(); |
5263 |
setUpBug110060_TypePattern(); |
5306 |
TypeNameRequestor requestor = new SearchTests.SearchTypeNameRequestor(); |
5264 |
TypeNameRequestor requestor = new SearchTests.SearchTypeNameRequestor(); |
5307 |
new SearchEngine(this.workingCopies).searchAllTypeNames( |
5265 |
searchAllTypeNames("aa", SearchPattern.R_CASE_SENSITIVE, requestor); |
5308 |
null, |
|
|
5309 |
SearchPattern.R_EXACT_MATCH, |
5310 |
"aa".toCharArray(), |
5311 |
SearchPattern.R_CASE_SENSITIVE, |
5312 |
TYPE, |
5313 |
getJavaSearchScope(), |
5314 |
requestor, |
5315 |
IJavaSearchConstants.WAIT_UNTIL_READY_TO_SEARCH, |
5316 |
null |
5317 |
); |
5318 |
assertSearchResults( |
5266 |
assertSearchResults( |
5319 |
"Unexpected all type names", |
5267 |
"Unexpected all type names", |
5320 |
"", |
5268 |
"", |
5321 |
requestor); |
5269 |
requestor); |
5322 |
} |
5270 |
} |
5323 |
|
|
|
5324 |
public void testBug110060_AllTypeNames14() throws CoreException { |
5271 |
public void testBug110060_AllTypeNames14() throws CoreException { |
5325 |
setUpBug110060_TypePattern(); |
5272 |
setUpBug110060_TypePattern(); |
5326 |
TypeNameRequestor requestor = new SearchTests.SearchTypeNameRequestor(); |
5273 |
TypeNameRequestor requestor = new SearchTests.SearchTypeNameRequestor(); |
5327 |
new SearchEngine(this.workingCopies).searchAllTypeNames( |
5274 |
searchAllTypeNames("aa", SearchPattern.R_PREFIX_MATCH | SearchPattern.R_CASE_SENSITIVE, requestor); |
5328 |
null, |
|
|
5329 |
SearchPattern.R_EXACT_MATCH, |
5330 |
"aa".toCharArray(), |
5331 |
SearchPattern.R_PREFIX_MATCH | SearchPattern.R_CASE_SENSITIVE, |
5332 |
TYPE, |
5333 |
getJavaSearchScope(), |
5334 |
requestor, |
5335 |
IJavaSearchConstants.WAIT_UNTIL_READY_TO_SEARCH, |
5336 |
null |
5337 |
); |
5338 |
assertSearchResults( |
5275 |
assertSearchResults( |
5339 |
"Unexpected all type names", |
5276 |
"Unexpected all type names", |
5340 |
"", |
5277 |
"", |
Lines 5380-5386
Link Here
|
5380 |
} |
5317 |
} |
5381 |
public void testBug110060_ConstructorPattern01() throws CoreException { |
5318 |
public void testBug110060_ConstructorPattern01() throws CoreException { |
5382 |
setUpBug110060_ConstructorPattern(); |
5319 |
setUpBug110060_ConstructorPattern(); |
5383 |
search("AA", CONSTRUCTOR, REFERENCES, SearchPattern.R_CAMELCASE_MATCH); |
5320 |
search("AA", CONSTRUCTOR, REFERENCES, SearchPattern.R_CAMEL_CASE_MATCH); |
5384 |
assertSearchResults( |
5321 |
assertSearchResults( |
5385 |
"src/b110060/Test.java b110060.Test.aa [new AA()] EXACT_MATCH\n" + |
5322 |
"src/b110060/Test.java b110060.Test.aa [new AA()] EXACT_MATCH\n" + |
5386 |
"src/b110060/Test.java b110060.Test.aaxx [new AAxx()] EXACT_MATCH\n" + |
5323 |
"src/b110060/Test.java b110060.Test.aaxx [new AAxx()] EXACT_MATCH\n" + |
Lines 5388-5397
Link Here
|
5388 |
"src/b110060/Test.java b110060.Test.axxayy [new AxxAyy()] EXACT_MATCH" |
5325 |
"src/b110060/Test.java b110060.Test.axxayy [new AxxAyy()] EXACT_MATCH" |
5389 |
); |
5326 |
); |
5390 |
} |
5327 |
} |
5391 |
|
|
|
5392 |
public void testBug110060_ConstructorPattern02() throws CoreException { |
5328 |
public void testBug110060_ConstructorPattern02() throws CoreException { |
5393 |
setUpBug110060_ConstructorPattern(); |
5329 |
setUpBug110060_ConstructorPattern(); |
5394 |
search("AA", CONSTRUCTOR, ALL_OCCURRENCES, SearchPattern.R_CAMELCASE_MATCH); |
5330 |
search("AA", CONSTRUCTOR, ALL_OCCURRENCES, SearchPattern.R_CAMEL_CASE_MATCH); |
5395 |
assertSearchResults( |
5331 |
assertSearchResults( |
5396 |
"src/b110060/AA.java b110060.AA() [AA] EXACT_MATCH\n" + |
5332 |
"src/b110060/AA.java b110060.AA() [AA] EXACT_MATCH\n" + |
5397 |
"src/b110060/AAxx.java b110060.AAxx() [AAxx] EXACT_MATCH\n" + |
5333 |
"src/b110060/AAxx.java b110060.AAxx() [AAxx] EXACT_MATCH\n" + |
Lines 5403-5441
Link Here
|
5403 |
"src/b110060/Test.java b110060.Test.axxayy [new AxxAyy()] EXACT_MATCH" |
5339 |
"src/b110060/Test.java b110060.Test.axxayy [new AxxAyy()] EXACT_MATCH" |
5404 |
); |
5340 |
); |
5405 |
} |
5341 |
} |
5406 |
|
|
|
5407 |
public void testBug110060_ConstructorPattern03() throws CoreException { |
5342 |
public void testBug110060_ConstructorPattern03() throws CoreException { |
5408 |
setUpBug110060_ConstructorPattern(); |
5343 |
setUpBug110060_ConstructorPattern(); |
5409 |
search("AAx", CONSTRUCTOR, ALL_OCCURRENCES, SearchPattern.R_CAMELCASE_MATCH); |
5344 |
search("AAx", CONSTRUCTOR, ALL_OCCURRENCES, SearchPattern.R_CAMEL_CASE_MATCH); |
5410 |
assertSearchResults( |
5345 |
assertSearchResults( |
5411 |
"src/b110060/AAxx.java b110060.AAxx() [AAxx] EXACT_MATCH\n" + |
5346 |
"" // no match as prefix is not set |
5412 |
"src/b110060/Test.java b110060.Test.aaxx [new AAxx()] EXACT_MATCH" |
|
|
5413 |
); |
5347 |
); |
5414 |
} |
5348 |
} |
5415 |
|
|
|
5416 |
public void testBug110060_ConstructorPattern04() throws CoreException { |
5349 |
public void testBug110060_ConstructorPattern04() throws CoreException { |
5417 |
setUpBug110060_ConstructorPattern(); |
5350 |
setUpBug110060_ConstructorPattern(); |
5418 |
search("Axx", CONSTRUCTOR, ALL_OCCURRENCES, SearchPattern.R_CAMELCASE_MATCH); |
5351 |
search("Axx", CONSTRUCTOR, ALL_OCCURRENCES, SearchPattern.R_CAMEL_CASE_MATCH); |
5419 |
assertSearchResults( |
5352 |
assertSearchResults( |
5420 |
"src/b110060/AxxAyy.java b110060.AxxAyy() [AxxAyy] EXACT_MATCH\n" + |
5353 |
"" // no match as prefix is not set |
5421 |
"src/b110060/Test.java b110060.Test.axxayy [new AxxAyy()] EXACT_MATCH" |
|
|
5422 |
); |
5354 |
); |
5423 |
} |
5355 |
} |
5424 |
|
|
|
5425 |
public void testBug110060_ConstructorPattern05() throws CoreException { |
5356 |
public void testBug110060_ConstructorPattern05() throws CoreException { |
5426 |
setUpBug110060_ConstructorPattern(); |
5357 |
setUpBug110060_ConstructorPattern(); |
5427 |
search("Ax", CONSTRUCTOR, ALL_OCCURRENCES, SearchPattern.R_CAMELCASE_MATCH); |
5358 |
search("Ax", CONSTRUCTOR, ALL_OCCURRENCES, SearchPattern.R_CAMEL_CASE_MATCH); |
5428 |
assertSearchResults( |
5359 |
assertSearchResults( |
5429 |
"src/b110060/AxA.java b110060.AxA() [AxA] EXACT_MATCH\n" + |
5360 |
"" // no match as prefix is not set |
5430 |
"src/b110060/AxxAyy.java b110060.AxxAyy() [AxxAyy] EXACT_MATCH\n" + |
|
|
5431 |
"src/b110060/Test.java b110060.Test.axa [new AxA()] EXACT_MATCH\n" + |
5432 |
"src/b110060/Test.java b110060.Test.axxayy [new AxxAyy()] EXACT_MATCH" |
5433 |
); |
5361 |
); |
5434 |
} |
5362 |
} |
5435 |
|
|
|
5436 |
public void testBug110060_ConstructorPattern06() throws CoreException { |
5363 |
public void testBug110060_ConstructorPattern06() throws CoreException { |
5437 |
setUpBug110060_ConstructorPattern(); |
5364 |
setUpBug110060_ConstructorPattern(); |
5438 |
search("A*A*", CONSTRUCTOR, ALL_OCCURRENCES, SearchPattern.R_CAMELCASE_MATCH); |
5365 |
search("A*A*", CONSTRUCTOR, ALL_OCCURRENCES, SearchPattern.R_CAMEL_CASE_MATCH); |
5439 |
assertSearchResults( |
5366 |
assertSearchResults( |
5440 |
"src/b110060/AA.java b110060.AA() [AA] EXACT_MATCH\n" + |
5367 |
"src/b110060/AA.java b110060.AA() [AA] EXACT_MATCH\n" + |
5441 |
"src/b110060/AAxx.java b110060.AAxx() [AAxx] EXACT_MATCH\n" + |
5368 |
"src/b110060/AAxx.java b110060.AAxx() [AAxx] EXACT_MATCH\n" + |
Lines 5469-5486
Link Here
|
5469 |
"}\n" |
5396 |
"}\n" |
5470 |
); |
5397 |
); |
5471 |
} |
5398 |
} |
|
|
5399 |
/** @deprecated As using a depreciated constant */ |
5472 |
public void testBug110060_MethodPattern01() throws CoreException { |
5400 |
public void testBug110060_MethodPattern01() throws CoreException { |
5473 |
setUpBug110060_MethodPattern(); |
5401 |
setUpBug110060_MethodPattern(); |
5474 |
search("MWD", METHOD, ALL_OCCURRENCES, SearchPattern.R_CAMELCASE_MATCH); |
5402 |
search("MWD", METHOD, ALL_OCCURRENCES, SearchPattern.R_CAMELCASE_MATCH); |
5475 |
assertSearchResults(""); |
5403 |
assertSearchResults(""); |
5476 |
} |
5404 |
} |
5477 |
|
5405 |
public void testBug110060_MethodPattern01new() throws CoreException { |
5478 |
public void testBug110060_MethodPattern02() throws CoreException { |
5406 |
setUpBug110060_MethodPattern(); |
|
|
5407 |
search("MWD", METHOD, ALL_OCCURRENCES, SearchPattern.R_CAMEL_CASE_MATCH); |
5408 |
assertSearchResults(""); |
5409 |
} |
5410 |
/** @deprecated As using a depreciated constant */ |
5411 |
public void testBug110060_MethodPattern02() throws CoreException { |
5479 |
setUpBug110060_MethodPattern(); |
5412 |
setUpBug110060_MethodPattern(); |
5480 |
search("AMWD", METHOD, ALL_OCCURRENCES, SearchPattern.R_CAMELCASE_MATCH); |
5413 |
search("AMWD", METHOD, ALL_OCCURRENCES, SearchPattern.R_CAMELCASE_MATCH); |
5481 |
assertSearchResults(""); |
5414 |
assertSearchResults(""); |
5482 |
} |
5415 |
} |
5483 |
|
5416 |
public void testBug110060_MethodPattern02new() throws CoreException { |
|
|
5417 |
setUpBug110060_MethodPattern(); |
5418 |
search("AMWD", METHOD, ALL_OCCURRENCES, SearchPattern.R_CAMEL_CASE_MATCH); |
5419 |
assertSearchResults(""); |
5420 |
} |
5421 |
/** @deprecated As using a depreciated constant */ |
5484 |
public void testBug110060_MethodPattern03() throws CoreException { |
5422 |
public void testBug110060_MethodPattern03() throws CoreException { |
5485 |
setUpBug110060_MethodPattern(); |
5423 |
setUpBug110060_MethodPattern(); |
5486 |
search("aMWD", METHOD, ALL_OCCURRENCES, SearchPattern.R_CAMELCASE_MATCH); |
5424 |
search("aMWD", METHOD, ALL_OCCURRENCES, SearchPattern.R_CAMELCASE_MATCH); |
Lines 5491-5497
Link Here
|
5491 |
"src/b110060/Test.java void b110060.Test.testReferences() [aMethodWith1DigitAnd_AnUnderscore()] EXACT_MATCH" |
5429 |
"src/b110060/Test.java void b110060.Test.testReferences() [aMethodWith1DigitAnd_AnUnderscore()] EXACT_MATCH" |
5492 |
); |
5430 |
); |
5493 |
} |
5431 |
} |
5494 |
|
5432 |
public void testBug110060_MethodPattern03new() throws CoreException { |
|
|
5433 |
setUpBug110060_MethodPattern(); |
5434 |
search("aMWD", METHOD, ALL_OCCURRENCES, SearchPattern.R_CAMEL_CASE_MATCH); |
5435 |
assertSearchResults( |
5436 |
"src/b110060/Test.java void b110060.Test.aMethodWith1Digit() [aMethodWith1Digit] EXACT_MATCH\n" + |
5437 |
"src/b110060/Test.java void b110060.Test.testReferences() [aMethodWith1Digit()] EXACT_MATCH" |
5438 |
); |
5439 |
} |
5440 |
/** @deprecated As using a depreciated constant */ |
5495 |
public void testBug110060_MethodPattern04() throws CoreException { |
5441 |
public void testBug110060_MethodPattern04() throws CoreException { |
5496 |
setUpBug110060_MethodPattern(); |
5442 |
setUpBug110060_MethodPattern(); |
5497 |
search("aMW", METHOD, ALL_OCCURRENCES, SearchPattern.R_CAMELCASE_MATCH); |
5443 |
search("aMW", METHOD, ALL_OCCURRENCES, SearchPattern.R_CAMELCASE_MATCH); |
Lines 5506-5512
Link Here
|
5506 |
"src/b110060/Test.java void b110060.Test.testReferences() [aMethodWithNothingSpecial()] EXACT_MATCH" |
5452 |
"src/b110060/Test.java void b110060.Test.testReferences() [aMethodWithNothingSpecial()] EXACT_MATCH" |
5507 |
); |
5453 |
); |
5508 |
} |
5454 |
} |
5509 |
|
5455 |
public void testBug110060_MethodPattern04new() throws CoreException { |
|
|
5456 |
setUpBug110060_MethodPattern(); |
5457 |
search("aMW", METHOD, ALL_OCCURRENCES, SearchPattern.R_CAMEL_CASE_MATCH); |
5458 |
assertSearchResults( |
5459 |
"" // no result as prefix match is not set |
5460 |
); |
5461 |
} |
5462 |
/** @deprecated As using a depreciated constant */ |
5510 |
public void testBug110060_MethodPattern05() throws CoreException { |
5463 |
public void testBug110060_MethodPattern05() throws CoreException { |
5511 |
setUpBug110060_MethodPattern(); |
5464 |
setUpBug110060_MethodPattern(); |
5512 |
search("aMethod", METHOD, ALL_OCCURRENCES, SearchPattern.R_CAMELCASE_MATCH); |
5465 |
search("aMethod", METHOD, ALL_OCCURRENCES, SearchPattern.R_CAMELCASE_MATCH); |
Lines 5521-5527
Link Here
|
5521 |
"src/b110060/Test.java void b110060.Test.testReferences() [aMethodWithNothingSpecial()] EXACT_MATCH" |
5474 |
"src/b110060/Test.java void b110060.Test.testReferences() [aMethodWithNothingSpecial()] EXACT_MATCH" |
5522 |
); |
5475 |
); |
5523 |
} |
5476 |
} |
5524 |
|
5477 |
public void testBug110060_MethodPattern05new() throws CoreException { |
|
|
5478 |
setUpBug110060_MethodPattern(); |
5479 |
search("aMethod", METHOD, ALL_OCCURRENCES, SearchPattern.R_CAMEL_CASE_MATCH); |
5480 |
assertSearchResults( |
5481 |
"" // no result as prefix match is not set |
5482 |
); |
5483 |
} |
5484 |
/** @deprecated As using a depreciated constant */ |
5525 |
public void testBug110060_MethodPattern06() throws CoreException { |
5485 |
public void testBug110060_MethodPattern06() throws CoreException { |
5526 |
setUpBug110060_MethodPattern(); |
5486 |
setUpBug110060_MethodPattern(); |
5527 |
search("aMethodWith1", METHOD, ALL_OCCURRENCES, SearchPattern.R_CAMELCASE_MATCH); |
5487 |
search("aMethodWith1", METHOD, ALL_OCCURRENCES, SearchPattern.R_CAMELCASE_MATCH); |
Lines 5534-5540
Link Here
|
5534 |
"src/b110060/Test.java void b110060.Test.testReferences() [aMethodWith1Or2_Or_3_Or__4__DigitsAnd_Several_Underscores()] EXACT_MATCH" |
5494 |
"src/b110060/Test.java void b110060.Test.testReferences() [aMethodWith1Or2_Or_3_Or__4__DigitsAnd_Several_Underscores()] EXACT_MATCH" |
5535 |
); |
5495 |
); |
5536 |
} |
5496 |
} |
5537 |
|
5497 |
public void testBug110060_MethodPattern06new() throws CoreException { |
|
|
5498 |
setUpBug110060_MethodPattern(); |
5499 |
search("aMethodWith1", METHOD, ALL_OCCURRENCES, SearchPattern.R_CAMEL_CASE_MATCH); |
5500 |
assertSearchResults( |
5501 |
"" // no result as prefix match is not set |
5502 |
); |
5503 |
} |
5504 |
/** @deprecated As using a depreciated constant */ |
5538 |
public void testBug110060_MethodPattern07() throws CoreException { |
5505 |
public void testBug110060_MethodPattern07() throws CoreException { |
5539 |
setUpBug110060_MethodPattern(); |
5506 |
setUpBug110060_MethodPattern(); |
5540 |
search("*Method*With*A*", METHOD, ALL_OCCURRENCES, SearchPattern.R_CAMELCASE_MATCH); |
5507 |
search("*Method*With*A*", METHOD, ALL_OCCURRENCES, SearchPattern.R_CAMELCASE_MATCH); |
Lines 5549-5555
Link Here
|
5549 |
"src/b110060/Test.java void b110060.Test.testReferences() [otherMethodWhichStartsWithAnotherLetter()] EXACT_MATCH" |
5516 |
"src/b110060/Test.java void b110060.Test.testReferences() [otherMethodWhichStartsWithAnotherLetter()] EXACT_MATCH" |
5550 |
); |
5517 |
); |
5551 |
} |
5518 |
} |
5552 |
|
5519 |
public void testBug110060_MethodPattern07new() throws CoreException { |
|
|
5520 |
setUpBug110060_MethodPattern(); |
5521 |
search("*Method*With*A*", METHOD, ALL_OCCURRENCES, SearchPattern.R_CAMEL_CASE_MATCH); |
5522 |
assertSearchResults( |
5523 |
"src/b110060/Test.java void b110060.Test.aMethodWithNothingSpecial() [aMethodWithNothingSpecial] EXACT_MATCH\n" + |
5524 |
"src/b110060/Test.java void b110060.Test.aMethodWith1DigitAnd_AnUnderscore() [aMethodWith1DigitAnd_AnUnderscore] EXACT_MATCH\n" + |
5525 |
"src/b110060/Test.java void b110060.Test.aMethodWith1Or2_Or_3_Or__4__DigitsAnd_Several_Underscores() [aMethodWith1Or2_Or_3_Or__4__DigitsAnd_Several_Underscores] EXACT_MATCH\n" + |
5526 |
"src/b110060/Test.java void b110060.Test.otherMethodWhichStartsWithAnotherLetter() [otherMethodWhichStartsWithAnotherLetter] EXACT_MATCH\n" + |
5527 |
"src/b110060/Test.java void b110060.Test.testReferences() [aMethodWith1DigitAnd_AnUnderscore()] EXACT_MATCH\n" + |
5528 |
"src/b110060/Test.java void b110060.Test.testReferences() [aMethodWith1Or2_Or_3_Or__4__DigitsAnd_Several_Underscores()] EXACT_MATCH\n" + |
5529 |
"src/b110060/Test.java void b110060.Test.testReferences() [aMethodWithNothingSpecial()] EXACT_MATCH\n" + |
5530 |
"src/b110060/Test.java void b110060.Test.testReferences() [otherMethodWhichStartsWithAnotherLetter()] EXACT_MATCH" |
5531 |
); |
5532 |
} |
5533 |
/** @deprecated As using a depreciated constant */ |
5553 |
public void testBug110060_MethodPattern08() throws CoreException { |
5534 |
public void testBug110060_MethodPattern08() throws CoreException { |
5554 |
setUpBug110060_MethodPattern(); |
5535 |
setUpBug110060_MethodPattern(); |
5555 |
search("aMW1D", METHOD, ALL_OCCURRENCES, SearchPattern.R_CAMELCASE_MATCH); |
5536 |
search("aMW1D", METHOD, ALL_OCCURRENCES, SearchPattern.R_CAMELCASE_MATCH); |
Lines 5560-5566
Link Here
|
5560 |
"src/b110060/Test.java void b110060.Test.testReferences() [aMethodWith1DigitAnd_AnUnderscore()] EXACT_MATCH" |
5541 |
"src/b110060/Test.java void b110060.Test.testReferences() [aMethodWith1DigitAnd_AnUnderscore()] EXACT_MATCH" |
5561 |
); |
5542 |
); |
5562 |
} |
5543 |
} |
5563 |
|
5544 |
public void testBug110060_MethodPattern08new() throws CoreException { |
|
|
5545 |
setUpBug110060_MethodPattern(); |
5546 |
search("aMW1D", METHOD, ALL_OCCURRENCES, SearchPattern.R_CAMEL_CASE_MATCH); |
5547 |
assertSearchResults( |
5548 |
"src/b110060/Test.java void b110060.Test.aMethodWith1Digit() [aMethodWith1Digit] EXACT_MATCH\n" + |
5549 |
"src/b110060/Test.java void b110060.Test.testReferences() [aMethodWith1Digit()] EXACT_MATCH" |
5550 |
); |
5551 |
} |
5552 |
/** @deprecated As using a depreciated constant */ |
5564 |
public void testBug110060_MethodPattern09() throws CoreException { |
5553 |
public void testBug110060_MethodPattern09() throws CoreException { |
5565 |
setUpBug110060_MethodPattern(); |
5554 |
setUpBug110060_MethodPattern(); |
5566 |
search("aMWOOODASU", METHOD, ALL_OCCURRENCES, SearchPattern.R_CAMELCASE_MATCH); |
5555 |
search("aMWOOODASU", METHOD, ALL_OCCURRENCES, SearchPattern.R_CAMELCASE_MATCH); |
Lines 5569-5574
Link Here
|
5569 |
"src/b110060/Test.java void b110060.Test.testReferences() [aMethodWith1Or2_Or_3_Or__4__DigitsAnd_Several_Underscores()] EXACT_MATCH" |
5558 |
"src/b110060/Test.java void b110060.Test.testReferences() [aMethodWith1Or2_Or_3_Or__4__DigitsAnd_Several_Underscores()] EXACT_MATCH" |
5570 |
); |
5559 |
); |
5571 |
} |
5560 |
} |
|
|
5561 |
public void testBug110060_MethodPattern09new() throws CoreException { |
5562 |
setUpBug110060_MethodPattern(); |
5563 |
search("aMWOOODASU", METHOD, ALL_OCCURRENCES, SearchPattern.R_CAMEL_CASE_MATCH); |
5564 |
assertSearchResults( |
5565 |
"src/b110060/Test.java void b110060.Test.aMethodWith1Or2_Or_3_Or__4__DigitsAnd_Several_Underscores() [aMethodWith1Or2_Or_3_Or__4__DigitsAnd_Several_Underscores] EXACT_MATCH\n" + |
5566 |
"src/b110060/Test.java void b110060.Test.testReferences() [aMethodWith1Or2_Or_3_Or__4__DigitsAnd_Several_Underscores()] EXACT_MATCH" |
5567 |
); |
5568 |
} |
5572 |
|
5569 |
|
5573 |
// Fields search |
5570 |
// Fields search |
5574 |
private void setUpBug110060_FieldPattern() throws CoreException { |
5571 |
private void setUpBug110060_FieldPattern() throws CoreException { |
Lines 5591-5596
Link Here
|
5591 |
"}\n" |
5588 |
"}\n" |
5592 |
); |
5589 |
); |
5593 |
} |
5590 |
} |
|
|
5591 |
/** @deprecated As using a depreciated constant */ |
5594 |
public void testBug110060_FieldPattern01() throws CoreException { |
5592 |
public void testBug110060_FieldPattern01() throws CoreException { |
5595 |
setUpBug110060_FieldPattern(); |
5593 |
setUpBug110060_FieldPattern(); |
5596 |
search("aFWSD", FIELD, ALL_OCCURRENCES, SearchPattern.R_CAMELCASE_MATCH); |
5594 |
search("aFWSD", FIELD, ALL_OCCURRENCES, SearchPattern.R_CAMELCASE_MATCH); |
Lines 5601-5613
Link Here
|
5601 |
"src/b110060/Test.java void b110060.Test.testReferences() [aFieldWith$Several$DollarslAnd1DigitAnd_1Underscore] EXACT_MATCH" |
5599 |
"src/b110060/Test.java void b110060.Test.testReferences() [aFieldWith$Several$DollarslAnd1DigitAnd_1Underscore] EXACT_MATCH" |
5602 |
); |
5600 |
); |
5603 |
} |
5601 |
} |
5604 |
|
5602 |
public void testBug110060_FieldPattern01new() throws CoreException { |
|
|
5603 |
setUpBug110060_FieldPattern(); |
5604 |
search("aFWSD", FIELD, ALL_OCCURRENCES, SearchPattern.R_CAMEL_CASE_MATCH); |
5605 |
assertSearchResults( |
5606 |
"src/b110060/Test.java b110060.Test.aFieldWithS$Dollar [aFieldWithS$Dollar] EXACT_MATCH\n" + |
5607 |
"src/b110060/Test.java void b110060.Test.testReferences() [aFieldWithS$Dollar] EXACT_MATCH" |
5608 |
); |
5609 |
} |
5610 |
/** @deprecated As using a depreciated constant */ |
5605 |
public void testBug110060_FieldPattern02() throws CoreException { |
5611 |
public void testBug110060_FieldPattern02() throws CoreException { |
5606 |
setUpBug110060_FieldPattern(); |
5612 |
setUpBug110060_FieldPattern(); |
5607 |
search("afwsd", FIELD, ALL_OCCURRENCES, SearchPattern.R_CAMELCASE_MATCH); |
5613 |
search("afwsd", FIELD, ALL_OCCURRENCES, SearchPattern.R_CAMELCASE_MATCH); |
5608 |
assertSearchResults(""); |
5614 |
assertSearchResults(""); |
5609 |
} |
5615 |
} |
5610 |
|
5616 |
public void testBug110060_FieldPattern02new() throws CoreException { |
|
|
5617 |
setUpBug110060_FieldPattern(); |
5618 |
search("afwsd", FIELD, ALL_OCCURRENCES, SearchPattern.R_CAMEL_CASE_MATCH); |
5619 |
assertSearchResults(""); |
5620 |
} |
5621 |
/** @deprecated As using a depreciated constant */ |
5611 |
public void testBug110060_FieldPattern03() throws CoreException { |
5622 |
public void testBug110060_FieldPattern03() throws CoreException { |
5612 |
setUpBug110060_FieldPattern(); |
5623 |
setUpBug110060_FieldPattern(); |
5613 |
search("aFWS$", FIELD, ALL_OCCURRENCES, SearchPattern.R_CAMELCASE_MATCH); |
5624 |
search("aFWS$", FIELD, ALL_OCCURRENCES, SearchPattern.R_CAMELCASE_MATCH); |
Lines 5616-5622
Link Here
|
5616 |
"src/b110060/Test.java void b110060.Test.testReferences() [aFieldWithS$Dollar] EXACT_MATCH" |
5627 |
"src/b110060/Test.java void b110060.Test.testReferences() [aFieldWithS$Dollar] EXACT_MATCH" |
5617 |
); |
5628 |
); |
5618 |
} |
5629 |
} |
5619 |
|
5630 |
public void testBug110060_FieldPattern03new() throws CoreException { |
|
|
5631 |
setUpBug110060_FieldPattern(); |
5632 |
search("aFWS$", FIELD, ALL_OCCURRENCES, SearchPattern.R_CAMEL_CASE_MATCH); |
5633 |
assertSearchResults( |
5634 |
"" // no result as prefix match is not set |
5635 |
); |
5636 |
} |
5637 |
/** @deprecated As using a depreciated constant */ |
5620 |
public void testBug110060_FieldPattern04() throws CoreException { |
5638 |
public void testBug110060_FieldPattern04() throws CoreException { |
5621 |
setUpBug110060_FieldPattern(); |
5639 |
setUpBug110060_FieldPattern(); |
5622 |
search("aSFWSCD", FIELD, ALL_OCCURRENCES, SearchPattern.R_CAMELCASE_MATCH); |
5640 |
search("aSFWSCD", FIELD, ALL_OCCURRENCES, SearchPattern.R_CAMELCASE_MATCH); |
Lines 5625-5631
Link Here
|
5625 |
"src/b110060/Test.java void b110060.Test.testReferences() [aStrangeFieldWith$$$$$$$$$$$$$$$SeveraContiguousDollars] EXACT_MATCH" |
5643 |
"src/b110060/Test.java void b110060.Test.testReferences() [aStrangeFieldWith$$$$$$$$$$$$$$$SeveraContiguousDollars] EXACT_MATCH" |
5626 |
); |
5644 |
); |
5627 |
} |
5645 |
} |
5628 |
|
5646 |
public void testBug110060_FieldPattern04new() throws CoreException { |
|
|
5647 |
setUpBug110060_FieldPattern(); |
5648 |
search("aSFWSCD", FIELD, ALL_OCCURRENCES, SearchPattern.R_CAMEL_CASE_MATCH); |
5649 |
assertSearchResults( |
5650 |
"src/b110060/Test.java b110060.Test.aStrangeFieldWith$$$$$$$$$$$$$$$SeveraContiguousDollars [aStrangeFieldWith$$$$$$$$$$$$$$$SeveraContiguousDollars] EXACT_MATCH\n" + |
5651 |
"src/b110060/Test.java void b110060.Test.testReferences() [aStrangeFieldWith$$$$$$$$$$$$$$$SeveraContiguousDollars] EXACT_MATCH" |
5652 |
); |
5653 |
} |
5654 |
/** @deprecated As using a depreciated constant */ |
5629 |
public void testBug110060_FieldPattern05() throws CoreException { |
5655 |
public void testBug110060_FieldPattern05() throws CoreException { |
5630 |
setUpBug110060_FieldPattern(); |
5656 |
setUpBug110060_FieldPattern(); |
5631 |
search("oF", FIELD, ALL_OCCURRENCES, SearchPattern.R_CAMELCASE_MATCH); |
5657 |
search("oF", FIELD, ALL_OCCURRENCES, SearchPattern.R_CAMELCASE_MATCH); |
Lines 5635-5640
Link Here
|
5635 |
"src/b110060/Test.java b110060.Test.oF [otherFieldWhichStartsWithAnotherLetter] EXACT_MATCH" |
5661 |
"src/b110060/Test.java b110060.Test.oF [otherFieldWhichStartsWithAnotherLetter] EXACT_MATCH" |
5636 |
); |
5662 |
); |
5637 |
} |
5663 |
} |
|
|
5664 |
public void testBug110060_FieldPattern05new() throws CoreException { |
5665 |
setUpBug110060_FieldPattern(); |
5666 |
search("oF", FIELD, ALL_OCCURRENCES, SearchPattern.R_CAMEL_CASE_MATCH); |
5667 |
assertSearchResults( |
5668 |
"src/b110060/Test.java b110060.Test.oF [oF] EXACT_MATCH" |
5669 |
); |
5670 |
} |
5638 |
|
5671 |
|
5639 |
/** |
5672 |
/** |
5640 |
* @test Bug 110291: [search] BasicSearchEngine return constructor declarations that doesn't exist in source |
5673 |
* @test Bug 110291: [search] BasicSearchEngine return constructor declarations that doesn't exist in source |
Lines 6418-6423
Link Here
|
6418 |
} |
6451 |
} |
6419 |
|
6452 |
|
6420 |
/** |
6453 |
/** |
|
|
6454 |
* @bug 124624: [search] Camel case matching routines should support end character |
6455 |
* @test Ensure that camel case pattern may use end character |
6456 |
* @see "https://bugs.eclipse.org/bugs/show_bug.cgi?id=124624" |
6457 |
*/ |
6458 |
public void testBug124624_HM_new() throws CoreException { |
6459 |
workingCopies = new ICompilationUnit[1]; |
6460 |
workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/Test.java", |
6461 |
"class HashMap {}\n" + |
6462 |
"class HtmlMapper {}\n" + |
6463 |
"class HashMapEntry {}\n" + |
6464 |
"class HatMappage {}\n" |
6465 |
); |
6466 |
search("HM", IJavaSearchConstants.TYPE, IJavaSearchConstants.DECLARATIONS, SearchPattern.R_CAMEL_CASE_MATCH); |
6467 |
assertSearchResults( |
6468 |
"src/Test.java HashMap [HashMap] EXACT_MATCH\n" + |
6469 |
"src/Test.java HtmlMapper [HtmlMapper] EXACT_MATCH\n" + |
6470 |
"src/Test.java HatMappage [HatMappage] EXACT_MATCH" |
6471 |
); |
6472 |
} |
6473 |
/** @deprecated As using a depreciated constant */ |
6474 |
public void testBug124624_HM_old() throws CoreException { |
6475 |
workingCopies = new ICompilationUnit[1]; |
6476 |
workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/Test.java", |
6477 |
"class HashMap {}\n" + |
6478 |
"class HtmlMapper {}\n" + |
6479 |
"class HashMapEntry {}\n" + |
6480 |
"class HatMappage {}\n" |
6481 |
); |
6482 |
search("HM", IJavaSearchConstants.TYPE, IJavaSearchConstants.DECLARATIONS, SearchPattern.R_CAMELCASE_MATCH); |
6483 |
assertSearchResults( |
6484 |
"src/Test.java HashMap [HashMap] EXACT_MATCH\n" + |
6485 |
"src/Test.java HtmlMapper [HtmlMapper] EXACT_MATCH\n" + |
6486 |
"src/Test.java HashMapEntry [HashMapEntry] EXACT_MATCH\n" + |
6487 |
"src/Test.java HatMappage [HatMappage] EXACT_MATCH" |
6488 |
); |
6489 |
} |
6490 |
public void testBug124624_HaM_new() throws CoreException { |
6491 |
workingCopies = new ICompilationUnit[1]; |
6492 |
workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/Test.java", |
6493 |
"class HashMap {}\n" + |
6494 |
"class HtmlMapper {}\n" + |
6495 |
"class HashMapEntry {}\n" + |
6496 |
"class HatMappage {}\n" |
6497 |
); |
6498 |
search("HaM", IJavaSearchConstants.TYPE, IJavaSearchConstants.DECLARATIONS, SearchPattern.R_CAMEL_CASE_MATCH); |
6499 |
assertSearchResults( |
6500 |
"src/Test.java HashMap [HashMap] EXACT_MATCH\n" + |
6501 |
"src/Test.java HatMappage [HatMappage] EXACT_MATCH" |
6502 |
); |
6503 |
} |
6504 |
/** @deprecated As using a depreciated constant */ |
6505 |
public void testBug124624_HaM_old() throws CoreException { |
6506 |
workingCopies = new ICompilationUnit[1]; |
6507 |
workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/Test.java", |
6508 |
"class HashMap {}\n" + |
6509 |
"class HtmlMapper {}\n" + |
6510 |
"class HashMapEntry {}\n" + |
6511 |
"class HatMappage {}\n" |
6512 |
); |
6513 |
search("HaM", IJavaSearchConstants.TYPE, IJavaSearchConstants.DECLARATIONS, SearchPattern.R_CAMELCASE_MATCH); |
6514 |
assertSearchResults( |
6515 |
"src/Test.java HashMap [HashMap] EXACT_MATCH\n" + |
6516 |
"src/Test.java HashMapEntry [HashMapEntry] EXACT_MATCH\n" + |
6517 |
"src/Test.java HatMappage [HatMappage] EXACT_MATCH" |
6518 |
); |
6519 |
} |
6520 |
public void testBug124624_HashM_new() throws CoreException { |
6521 |
workingCopies = new ICompilationUnit[1]; |
6522 |
workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/Test.java", |
6523 |
"class HashMap {}\n" + |
6524 |
"class HtmlMapper {}\n" + |
6525 |
"class HashMapEntry {}\n" + |
6526 |
"class HatMappage {}\n" |
6527 |
); |
6528 |
search("HashM", IJavaSearchConstants.TYPE, IJavaSearchConstants.DECLARATIONS, SearchPattern.R_CAMEL_CASE_MATCH); |
6529 |
assertSearchResults( |
6530 |
"src/Test.java HashMap [HashMap] EXACT_MATCH" |
6531 |
); |
6532 |
} |
6533 |
/** @deprecated As using a depreciated constant */ |
6534 |
public void testBug124624_HashM_old() throws CoreException { |
6535 |
workingCopies = new ICompilationUnit[1]; |
6536 |
workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/Test.java", |
6537 |
"class HashMap {}\n" + |
6538 |
"class HtmlMapper {}\n" + |
6539 |
"class HashMapEntry {}\n" + |
6540 |
"class HatMappage {}\n" |
6541 |
); |
6542 |
search("HashM", IJavaSearchConstants.TYPE, IJavaSearchConstants.DECLARATIONS, SearchPattern.R_CAMELCASE_MATCH); |
6543 |
assertSearchResults( |
6544 |
"src/Test.java HashMap [HashMap] EXACT_MATCH\n" + |
6545 |
"src/Test.java HashMapEntry [HashMapEntry] EXACT_MATCH" |
6546 |
); |
6547 |
} |
6548 |
public void testBug124624_HMa_new() throws CoreException { |
6549 |
workingCopies = new ICompilationUnit[1]; |
6550 |
workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/Test.java", |
6551 |
"class HashMap {}\n" + |
6552 |
"class HtmlMapper {}\n" + |
6553 |
"class HashMapEntry {}\n" + |
6554 |
"class HatMappage {}\n" |
6555 |
); |
6556 |
search("HMa", IJavaSearchConstants.TYPE, IJavaSearchConstants.DECLARATIONS, SearchPattern.R_CAMEL_CASE_MATCH); |
6557 |
assertSearchResults(""); |
6558 |
} |
6559 |
/** @deprecated As using a depreciated constant */ |
6560 |
public void testBug124624_HMa_old() throws CoreException { |
6561 |
workingCopies = new ICompilationUnit[1]; |
6562 |
workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/Test.java", |
6563 |
"class HashMap {}\n" + |
6564 |
"class HtmlMapper {}\n" + |
6565 |
"class HashMapEntry {}\n" + |
6566 |
"class HatMappage {}\n" |
6567 |
); |
6568 |
search("HMa", IJavaSearchConstants.TYPE, IJavaSearchConstants.DECLARATIONS, SearchPattern.R_CAMELCASE_MATCH); |
6569 |
assertSearchResults( |
6570 |
"src/Test.java HashMap [HashMap] EXACT_MATCH\n" + |
6571 |
"src/Test.java HtmlMapper [HtmlMapper] EXACT_MATCH\n" + |
6572 |
"src/Test.java HashMapEntry [HashMapEntry] EXACT_MATCH\n" + |
6573 |
"src/Test.java HatMappage [HatMappage] EXACT_MATCH" |
6574 |
); |
6575 |
} |
6576 |
public void testBug124624_HaMa_new() throws CoreException { |
6577 |
workingCopies = new ICompilationUnit[1]; |
6578 |
workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/Test.java", |
6579 |
"class HashMap {}\n" + |
6580 |
"class HtmlMapper {}\n" + |
6581 |
"class HashMapEntry {}\n" + |
6582 |
"class HatMappage {}\n" |
6583 |
); |
6584 |
search("HaMa", IJavaSearchConstants.TYPE, IJavaSearchConstants.DECLARATIONS, SearchPattern.R_CAMEL_CASE_MATCH); |
6585 |
assertSearchResults(""); |
6586 |
} |
6587 |
/** @deprecated As using a depreciated constant */ |
6588 |
public void testBug124624_HaMa_old() throws CoreException { |
6589 |
workingCopies = new ICompilationUnit[1]; |
6590 |
workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/Test.java", |
6591 |
"class HashMap {}\n" + |
6592 |
"class HtmlMapper {}\n" + |
6593 |
"class HashMapEntry {}\n" + |
6594 |
"class HatMappage {}\n" |
6595 |
); |
6596 |
search("HashMa", IJavaSearchConstants.TYPE, IJavaSearchConstants.DECLARATIONS, SearchPattern.R_CAMELCASE_MATCH); |
6597 |
assertSearchResults( |
6598 |
"src/Test.java HashMap [HashMap] EXACT_MATCH\n" + |
6599 |
"src/Test.java HashMapEntry [HashMapEntry] EXACT_MATCH" |
6600 |
); |
6601 |
} |
6602 |
public void testBug124624_HashMa_new() throws CoreException { |
6603 |
workingCopies = new ICompilationUnit[1]; |
6604 |
workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/Test.java", |
6605 |
"class HashMap {}\n" + |
6606 |
"class HtmlMapper {}\n" + |
6607 |
"class HashMapEntry {}\n" + |
6608 |
"class HatMappage {}\n" |
6609 |
); |
6610 |
search("HashMa", IJavaSearchConstants.TYPE, IJavaSearchConstants.DECLARATIONS, SearchPattern.R_CAMEL_CASE_MATCH); |
6611 |
assertSearchResults(""); |
6612 |
} |
6613 |
/** @deprecated As using a depreciated constant */ |
6614 |
public void testBug124624_HashMa_old() throws CoreException { |
6615 |
workingCopies = new ICompilationUnit[1]; |
6616 |
workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/Test.java", |
6617 |
"class HashMap {}\n" + |
6618 |
"class HtmlMapper {}\n" + |
6619 |
"class HashMapEntry {}\n" + |
6620 |
"class HatMappage {}\n" |
6621 |
); |
6622 |
search("HashM", IJavaSearchConstants.TYPE, IJavaSearchConstants.DECLARATIONS, SearchPattern.R_CAMELCASE_MATCH); |
6623 |
assertSearchResults( |
6624 |
"src/Test.java HashMap [HashMap] EXACT_MATCH\n" + |
6625 |
"src/Test.java HashMapEntry [HashMapEntry] EXACT_MATCH" |
6626 |
); |
6627 |
} |
6628 |
public void testBug124624_HMap_new() throws CoreException { |
6629 |
workingCopies = new ICompilationUnit[1]; |
6630 |
workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/Test.java", |
6631 |
"class HashMap {}\n" + |
6632 |
"class HtmlMapper {}\n" + |
6633 |
"class HashMapEntry {}\n" + |
6634 |
"class HatMappage {}\n" |
6635 |
); |
6636 |
search("HMap", IJavaSearchConstants.TYPE, IJavaSearchConstants.DECLARATIONS, SearchPattern.R_CAMEL_CASE_MATCH); |
6637 |
assertSearchResults( |
6638 |
"src/Test.java HashMap [HashMap] EXACT_MATCH" |
6639 |
); |
6640 |
} |
6641 |
/** @deprecated As using a depreciated constant */ |
6642 |
public void testBug124624_HMap_old() throws CoreException { |
6643 |
workingCopies = new ICompilationUnit[1]; |
6644 |
workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/Test.java", |
6645 |
"class HashMap {}\n" + |
6646 |
"class HtmlMapper {}\n" + |
6647 |
"class HashMapEntry {}\n" + |
6648 |
"class HatMappage {}\n" |
6649 |
); |
6650 |
search("HMap", IJavaSearchConstants.TYPE, IJavaSearchConstants.DECLARATIONS, SearchPattern.R_CAMELCASE_MATCH); |
6651 |
assertSearchResults( |
6652 |
"src/Test.java HashMap [HashMap] EXACT_MATCH\n" + |
6653 |
"src/Test.java HtmlMapper [HtmlMapper] EXACT_MATCH\n" + |
6654 |
"src/Test.java HashMapEntry [HashMapEntry] EXACT_MATCH\n" + |
6655 |
"src/Test.java HatMappage [HatMappage] EXACT_MATCH" |
6656 |
); |
6657 |
} |
6658 |
public void testBug124624_HaMap_new() throws CoreException { |
6659 |
workingCopies = new ICompilationUnit[1]; |
6660 |
workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/Test.java", |
6661 |
"class HashMap {}\n" + |
6662 |
"class HtmlMapper {}\n" + |
6663 |
"class HashMapEntry {}\n" + |
6664 |
"class HatMappage {}\n" |
6665 |
); |
6666 |
search("HaMap", IJavaSearchConstants.TYPE, IJavaSearchConstants.DECLARATIONS, SearchPattern.R_CAMEL_CASE_MATCH); |
6667 |
assertSearchResults( |
6668 |
"src/Test.java HashMap [HashMap] EXACT_MATCH" |
6669 |
); |
6670 |
} |
6671 |
/** @deprecated As using a depreciated constant */ |
6672 |
public void testBug124624_HaMap_old() throws CoreException { |
6673 |
workingCopies = new ICompilationUnit[1]; |
6674 |
workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/Test.java", |
6675 |
"class HashMap {}\n" + |
6676 |
"class HtmlMapper {}\n" + |
6677 |
"class HashMapEntry {}\n" + |
6678 |
"class HatMappage {}\n" |
6679 |
); |
6680 |
search("HaMap", IJavaSearchConstants.TYPE, IJavaSearchConstants.DECLARATIONS, SearchPattern.R_CAMELCASE_MATCH); |
6681 |
assertSearchResults( |
6682 |
"src/Test.java HashMap [HashMap] EXACT_MATCH\n" + |
6683 |
"src/Test.java HashMapEntry [HashMapEntry] EXACT_MATCH\n" + |
6684 |
"src/Test.java HatMappage [HatMappage] EXACT_MATCH" |
6685 |
); |
6686 |
} |
6687 |
public void testBug124624_HashMap_new() throws CoreException { |
6688 |
workingCopies = new ICompilationUnit[1]; |
6689 |
workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/Test.java", |
6690 |
"class HashMap {}\n" + |
6691 |
"class HtmlMapper {}\n" + |
6692 |
"class HashMapEntry {}\n" + |
6693 |
"class HatMappage {}\n" |
6694 |
); |
6695 |
search("HashMap", IJavaSearchConstants.TYPE, IJavaSearchConstants.DECLARATIONS, SearchPattern.R_CAMEL_CASE_MATCH); |
6696 |
assertSearchResults( |
6697 |
"src/Test.java HashMap [HashMap] EXACT_MATCH" |
6698 |
); |
6699 |
} |
6700 |
/** @deprecated As using a depreciated constant */ |
6701 |
public void testBug124624_HashMap_old() throws CoreException { |
6702 |
workingCopies = new ICompilationUnit[1]; |
6703 |
workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/Test.java", |
6704 |
"class HashMap {}\n" + |
6705 |
"class HtmlMapper {}\n" + |
6706 |
"class HashMapEntry {}\n" + |
6707 |
"class HatMappage {}\n" |
6708 |
); |
6709 |
search("HashMap", IJavaSearchConstants.TYPE, IJavaSearchConstants.DECLARATIONS, SearchPattern.R_CAMELCASE_MATCH); |
6710 |
assertSearchResults( |
6711 |
"src/Test.java HashMap [HashMap] EXACT_MATCH\n" + |
6712 |
"src/Test.java HashMapEntry [HashMapEntry] EXACT_MATCH" |
6713 |
); |
6714 |
} |
6715 |
|
6716 |
/** |
6421 |
* @test Bug 124645: [search] for implementors does not find subclasses of binary classes |
6717 |
* @test Bug 124645: [search] for implementors does not find subclasses of binary classes |
6422 |
* @see "https://bugs.eclipse.org/bugs/show_bug.cgi?id=124645" |
6718 |
* @see "https://bugs.eclipse.org/bugs/show_bug.cgi?id=124645" |
6423 |
*/ |
6719 |
*/ |
Lines 6610-6615
Link Here
|
6610 |
"}\n" |
6906 |
"}\n" |
6611 |
); |
6907 |
); |
6612 |
} |
6908 |
} |
|
|
6909 |
/** @deprecated As using a depreciated constant */ |
6613 |
public void testBug130390() throws CoreException { |
6910 |
public void testBug130390() throws CoreException { |
6614 |
setUpBug130390(); |
6911 |
setUpBug130390(); |
6615 |
search("NuPoEx", TYPE, DECLARATIONS, SearchPattern.R_CAMELCASE_MATCH); |
6912 |
search("NuPoEx", TYPE, DECLARATIONS, SearchPattern.R_CAMELCASE_MATCH); |
Lines 6617-6622
Link Here
|
6617 |
"src/b130390/NullPointerException.java b130390.NullPointerException [NullPointerException] EXACT_MATCH" |
6914 |
"src/b130390/NullPointerException.java b130390.NullPointerException [NullPointerException] EXACT_MATCH" |
6618 |
); |
6915 |
); |
6619 |
} |
6916 |
} |
|
|
6917 |
public void testBug130390_new() throws CoreException { |
6918 |
setUpBug130390(); |
6919 |
search("NuPoEx", TYPE, DECLARATIONS, SearchPattern.R_CAMEL_CASE_MATCH); |
6920 |
assertSearchResults( |
6921 |
"" // no result as prefix match is not set |
6922 |
); |
6923 |
} |
6924 |
/** @deprecated As using a depreciated constant */ |
6620 |
public void testBug130390b() throws CoreException { |
6925 |
public void testBug130390b() throws CoreException { |
6621 |
setUpBug130390(); |
6926 |
setUpBug130390(); |
6622 |
search("NPE", TYPE, DECLARATIONS, SearchPattern.R_CAMELCASE_MATCH); |
6927 |
search("NPE", TYPE, DECLARATIONS, SearchPattern.R_CAMELCASE_MATCH); |
Lines 6625-6630
Link Here
|
6625 |
"src/b130390/NullPointerException.java b130390.NullPointerException [NullPointerException] EXACT_MATCH" |
6930 |
"src/b130390/NullPointerException.java b130390.NullPointerException [NullPointerException] EXACT_MATCH" |
6626 |
); |
6931 |
); |
6627 |
} |
6932 |
} |
|
|
6933 |
public void testBug130390b_new() throws CoreException { |
6934 |
setUpBug130390(); |
6935 |
search("NPE", TYPE, DECLARATIONS, SearchPattern.R_CAMEL_CASE_MATCH); |
6936 |
assertSearchResults( |
6937 |
"src/b130390/Npe.java b130390.Npe [Npe] EXACT_MATCH\n" + |
6938 |
"src/b130390/NullPointerException.java b130390.NullPointerException [NullPointerException] EXACT_MATCH" |
6939 |
); |
6940 |
} |
6941 |
/** @deprecated As using a depreciated constant */ |
6628 |
public void testBug130390c() throws CoreException { |
6942 |
public void testBug130390c() throws CoreException { |
6629 |
setUpBug130390(); |
6943 |
setUpBug130390(); |
6630 |
search("NPE", TYPE, DECLARATIONS, SearchPattern.R_CAMELCASE_MATCH | SearchPattern.R_CASE_SENSITIVE); |
6944 |
search("NPE", TYPE, DECLARATIONS, SearchPattern.R_CAMELCASE_MATCH | SearchPattern.R_CASE_SENSITIVE); |
Lines 6632-6637
Link Here
|
6632 |
"src/b130390/NullPointerException.java b130390.NullPointerException [NullPointerException] EXACT_MATCH" |
6946 |
"src/b130390/NullPointerException.java b130390.NullPointerException [NullPointerException] EXACT_MATCH" |
6633 |
); |
6947 |
); |
6634 |
} |
6948 |
} |
|
|
6949 |
public void testBug130390c_new() throws CoreException { |
6950 |
setUpBug130390(); |
6951 |
search("NPE", TYPE, DECLARATIONS, SearchPattern.R_CAMEL_CASE_MATCH | SearchPattern.R_CASE_SENSITIVE); |
6952 |
assertSearchResults( |
6953 |
"src/b130390/NullPointerException.java b130390.NullPointerException [NullPointerException] EXACT_MATCH" |
6954 |
); |
6955 |
} |
6956 |
/** @deprecated As using a depreciated constant */ |
6635 |
public void testBug130390d() throws CoreException { |
6957 |
public void testBug130390d() throws CoreException { |
6636 |
setUpBug130390(); |
6958 |
setUpBug130390(); |
6637 |
search("Npe", TYPE, ALL_OCCURRENCES, SearchPattern.R_CAMELCASE_MATCH); |
6959 |
search("Npe", TYPE, ALL_OCCURRENCES, SearchPattern.R_CAMELCASE_MATCH); |
Lines 6639-6644
Link Here
|
6639 |
"src/b130390/Npe.java b130390.Npe [Npe] EXACT_MATCH" |
6961 |
"src/b130390/Npe.java b130390.Npe [Npe] EXACT_MATCH" |
6640 |
); |
6962 |
); |
6641 |
} |
6963 |
} |
|
|
6964 |
public void testBug130390d_new() throws CoreException { |
6965 |
setUpBug130390(); |
6966 |
search("Npe", TYPE, ALL_OCCURRENCES, SearchPattern.R_CAMEL_CASE_MATCH); |
6967 |
assertSearchResults( |
6968 |
"src/b130390/Npe.java b130390.Npe [Npe] EXACT_MATCH" |
6969 |
); |
6970 |
} |
6971 |
/** @deprecated As using a depreciated constant */ |
6642 |
public void testBug130390e() throws CoreException { |
6972 |
public void testBug130390e() throws CoreException { |
6643 |
setUpBug130390(); |
6973 |
setUpBug130390(); |
6644 |
search("Npe", TYPE, DECLARATIONS, SearchPattern.R_CAMELCASE_MATCH | SearchPattern.R_CASE_SENSITIVE); |
6974 |
search("Npe", TYPE, DECLARATIONS, SearchPattern.R_CAMELCASE_MATCH | SearchPattern.R_CASE_SENSITIVE); |
Lines 6646-6651
Link Here
|
6646 |
"src/b130390/Npe.java b130390.Npe [Npe] EXACT_MATCH" |
6976 |
"src/b130390/Npe.java b130390.Npe [Npe] EXACT_MATCH" |
6647 |
); |
6977 |
); |
6648 |
} |
6978 |
} |
|
|
6979 |
public void testBug130390e_new() throws CoreException { |
6980 |
setUpBug130390(); |
6981 |
search("Npe", TYPE, DECLARATIONS, SearchPattern.R_CAMEL_CASE_MATCH | SearchPattern.R_CASE_SENSITIVE); |
6982 |
assertSearchResults( |
6983 |
"src/b130390/Npe.java b130390.Npe [Npe] EXACT_MATCH" |
6984 |
); |
6985 |
} |
6986 |
/** @deprecated As using a depreciated constant */ |
6649 |
public void testBug130390f() throws CoreException { |
6987 |
public void testBug130390f() throws CoreException { |
6650 |
setUpBug130390(); |
6988 |
setUpBug130390(); |
6651 |
search("NullPE", TYPE, ALL_OCCURRENCES, SearchPattern.R_CAMELCASE_MATCH); |
6989 |
search("NullPE", TYPE, ALL_OCCURRENCES, SearchPattern.R_CAMELCASE_MATCH); |
Lines 6653-6658
Link Here
|
6653 |
"src/b130390/NullPointerException.java b130390.NullPointerException [NullPointerException] EXACT_MATCH" |
6991 |
"src/b130390/NullPointerException.java b130390.NullPointerException [NullPointerException] EXACT_MATCH" |
6654 |
); |
6992 |
); |
6655 |
} |
6993 |
} |
|
|
6994 |
public void testBug130390f_new() throws CoreException { |
6995 |
setUpBug130390(); |
6996 |
search("NullPE", TYPE, ALL_OCCURRENCES, SearchPattern.R_CAMEL_CASE_MATCH); |
6997 |
assertSearchResults( |
6998 |
"src/b130390/NullPointerException.java b130390.NullPointerException [NullPointerException] EXACT_MATCH" |
6999 |
); |
7000 |
} |
7001 |
/** @deprecated As using a depreciated constant */ |
6656 |
public void testBug130390g() throws CoreException { |
7002 |
public void testBug130390g() throws CoreException { |
6657 |
setUpBug130390(); |
7003 |
setUpBug130390(); |
6658 |
search("TZ", TYPE, DECLARATIONS, SearchPattern.R_CAMELCASE_MATCH | SearchPattern.R_CASE_SENSITIVE); |
7004 |
search("TZ", TYPE, DECLARATIONS, SearchPattern.R_CAMELCASE_MATCH | SearchPattern.R_CASE_SENSITIVE); |
Lines 6661-6923
Link Here
|
6661 |
"src/b130390/TimeZone.java b130390.TimeZone [TimeZone] EXACT_MATCH" |
7007 |
"src/b130390/TimeZone.java b130390.TimeZone [TimeZone] EXACT_MATCH" |
6662 |
); |
7008 |
); |
6663 |
} |
7009 |
} |
6664 |
public void testBug130390h() throws CoreException { |
7010 |
public void testBug130390g_new() throws CoreException { |
6665 |
setUpBug130390(); |
7011 |
setUpBug130390(); |
6666 |
search("TiZo", TYPE, DECLARATIONS, SearchPattern.R_CAMELCASE_MATCH | SearchPattern.R_CASE_SENSITIVE); |
7012 |
search("TZ", TYPE, DECLARATIONS, SearchPattern.R_CAMEL_CASE_MATCH | SearchPattern.R_CASE_SENSITIVE); |
6667 |
assertSearchResults( |
7013 |
assertSearchResults( |
|
|
7014 |
"src/b130390/TZ.java b130390.TZ [TZ] EXACT_MATCH\n" + |
6668 |
"src/b130390/TimeZone.java b130390.TimeZone [TimeZone] EXACT_MATCH" |
7015 |
"src/b130390/TimeZone.java b130390.TimeZone [TimeZone] EXACT_MATCH" |
6669 |
); |
7016 |
); |
6670 |
} |
7017 |
} |
|
|
7018 |
public void testBug130390h() throws CoreException { |
7019 |
setUpBug130390(); |
7020 |
search("TiZo", TYPE, DECLARATIONS, SearchPattern.R_CAMEL_CASE_MATCH | SearchPattern.R_CASE_SENSITIVE); |
7021 |
assertSearchResults( |
7022 |
"" // no result as prefix match is not set |
7023 |
); |
7024 |
} |
7025 |
|
6671 |
/** |
7026 |
/** |
6672 |
* To get these tests search matches in a workspace, do NOT forget to modify files |
7027 |
* To get these tests search matches in a workspace, do NOT forget to modify files |
6673 |
* to set them as working copies. |
7028 |
* to set them as working copies. |
6674 |
* |
7029 |
* |
6675 |
* @test Bug 137087: Open Type - missing matches when using mixed case pattern |
7030 |
* @bug 137087: Open Type - missing matches when using mixed case pattern |
6676 |
* @see "https://bugs.eclipse.org/bugs/show_bug.cgi?id=137087" |
7031 |
* @see "https://bugs.eclipse.org/bugs/show_bug.cgi?id=137087" |
|
|
7032 |
* @deprecated As using a depreciated constant |
6677 |
*/ |
7033 |
*/ |
6678 |
public void testBug137087() throws CoreException { |
7034 |
public void testBug137087() throws CoreException { |
6679 |
// Search CamelCase |
|
|
6680 |
int matchRule = SearchPattern.R_CAMELCASE_MATCH; |
7035 |
int matchRule = SearchPattern.R_CAMELCASE_MATCH; |
6681 |
String pattern = "runtimeEx"; |
7036 |
String pattern = "runtimeEx"; |
6682 |
search(pattern, TYPE, DECLARATIONS, matchRule); |
7037 |
search(pattern, TYPE, DECLARATIONS, matchRule); |
6683 |
assertSearchResults( |
7038 |
assertSearchResults( |
6684 |
""+ getExternalJCLPathString("1.5") + " java.lang.RuntimeException EXACT_MATCH" |
7039 |
""+ getExternalJCLPathString("1.5") + " java.lang.RuntimeException EXACT_MATCH" |
6685 |
); |
7040 |
); |
6686 |
// Search like UI does (ie. replace it with prefix if it's not a valid CamelCase) |
|
|
6687 |
int validatedRule = SearchPattern.validateMatchRule(pattern, matchRule); |
6688 |
if (validatedRule != matchRule) { |
6689 |
matchRule = SearchPattern.R_PREFIX_MATCH; |
6690 |
} |
6691 |
search(pattern, TYPE, DECLARATIONS, matchRule); |
6692 |
assertSearchResults( |
6693 |
""+ getExternalJCLPathString("1.5") + " java.lang.RuntimeException EXACT_MATCH\n" + |
6694 |
""+ getExternalJCLPathString("1.5") + " java.lang.RuntimeException EXACT_MATCH" |
6695 |
); |
6696 |
} |
7041 |
} |
|
|
7042 |
/** @deprecated As using a depreciated constant */ |
6697 |
public void testBug137087b() throws CoreException { |
7043 |
public void testBug137087b() throws CoreException { |
6698 |
// Search CamelCase |
|
|
6699 |
int matchRule = SearchPattern.R_CAMELCASE_MATCH; |
7044 |
int matchRule = SearchPattern.R_CAMELCASE_MATCH; |
6700 |
String pattern = "Runtimeex"; |
7045 |
String pattern = "Runtimeex"; |
6701 |
search(pattern, TYPE, DECLARATIONS, matchRule); |
7046 |
search(pattern, TYPE, DECLARATIONS, matchRule); |
6702 |
assertSearchResults( |
7047 |
assertSearchResults( |
6703 |
""+ getExternalJCLPathString("1.5") + " java.lang.RuntimeException EXACT_MATCH" |
7048 |
""+ getExternalJCLPathString("1.5") + " java.lang.RuntimeException EXACT_MATCH" |
6704 |
); |
7049 |
); |
6705 |
// Search like UI does (ie. replace it with prefix if it's not a valid CamelCase) |
|
|
6706 |
int validatedRule = SearchPattern.validateMatchRule(pattern, matchRule); |
6707 |
if (validatedRule != matchRule) { |
6708 |
matchRule = SearchPattern.R_PREFIX_MATCH; |
6709 |
} |
6710 |
search(pattern, TYPE, DECLARATIONS, matchRule); |
6711 |
assertSearchResults( |
6712 |
""+ getExternalJCLPathString("1.5") + " java.lang.RuntimeException EXACT_MATCH\n" + |
6713 |
""+ getExternalJCLPathString("1.5") + " java.lang.RuntimeException EXACT_MATCH" |
6714 |
); |
6715 |
} |
7050 |
} |
|
|
7051 |
/** @deprecated As using a depreciated constant */ |
6716 |
public void testBug137087c() throws CoreException { |
7052 |
public void testBug137087c() throws CoreException { |
6717 |
// Search CamelCase |
|
|
6718 |
int matchRule = SearchPattern.R_CAMELCASE_MATCH; |
7053 |
int matchRule = SearchPattern.R_CAMELCASE_MATCH; |
6719 |
String pattern = "runtimeexception"; |
7054 |
String pattern = "runtimeexception"; |
6720 |
search(pattern, TYPE, DECLARATIONS, matchRule); |
7055 |
search(pattern, TYPE, DECLARATIONS, matchRule); |
6721 |
assertSearchResults( |
7056 |
assertSearchResults( |
6722 |
"" // no match expected as this is not a valid camel case |
7057 |
"" // no result because it's an invalid camel case pattern which is replaced with |
6723 |
); |
7058 |
// prefix case sensitive match bu SearchPatter.validateMatchRule(...) (old behavior) |
6724 |
// Search like UI does (ie. replace it with prefix if it's not a valid CamelCase) |
|
|
6725 |
int validatedRule = SearchPattern.validateMatchRule(pattern, matchRule); |
6726 |
if (validatedRule != matchRule) { |
6727 |
matchRule = SearchPattern.R_PREFIX_MATCH; |
6728 |
} |
6729 |
search(pattern, TYPE, DECLARATIONS, matchRule); |
6730 |
assertSearchResults( |
6731 |
""+ getExternalJCLPathString("1.5") + " java.lang.RuntimeException EXACT_MATCH" |
6732 |
); |
7059 |
); |
6733 |
} |
7060 |
} |
|
|
7061 |
/** @deprecated As using a depreciated constant */ |
6734 |
public void testBug137087d() throws CoreException { |
7062 |
public void testBug137087d() throws CoreException { |
6735 |
// Search CamelCase |
|
|
6736 |
int matchRule = SearchPattern.R_CAMELCASE_MATCH; |
7063 |
int matchRule = SearchPattern.R_CAMELCASE_MATCH; |
6737 |
String pattern = "Runtimexception"; |
7064 |
String pattern = "Runtimexception"; |
6738 |
search(pattern, TYPE, DECLARATIONS, matchRule); |
7065 |
search(pattern, TYPE, DECLARATIONS, matchRule); |
6739 |
assertSearchResults( |
7066 |
assertSearchResults( |
6740 |
"" // no match expected as pattern is missing a 'e' |
7067 |
"" // no match expected as pattern is missing a 'e' |
6741 |
); |
7068 |
); |
6742 |
// Search like UI does (ie. replace it with prefix if it's not a valid CamelCase) |
|
|
6743 |
int validatedRule = SearchPattern.validateMatchRule(pattern, matchRule); |
6744 |
if (validatedRule != matchRule) { |
6745 |
matchRule = SearchPattern.R_PREFIX_MATCH; |
6746 |
} |
6747 |
search(pattern, TYPE, DECLARATIONS, matchRule); |
6748 |
assertSearchResults( |
6749 |
"" // no match expected as pattern is missing a 'e' |
6750 |
); |
6751 |
} |
7069 |
} |
|
|
7070 |
/** @deprecated As using a depreciated constant */ |
6752 |
public void testBug137087e() throws CoreException { |
7071 |
public void testBug137087e() throws CoreException { |
6753 |
// Search CamelCase |
|
|
6754 |
int matchRule = SearchPattern.R_CAMELCASE_MATCH; |
7072 |
int matchRule = SearchPattern.R_CAMELCASE_MATCH; |
6755 |
String pattern = "IllegalMSException"; |
7073 |
String pattern = "IllegalMSException"; |
6756 |
search(pattern, TYPE, DECLARATIONS, matchRule); |
7074 |
search(pattern, TYPE, DECLARATIONS, matchRule); |
6757 |
assertSearchResults( |
7075 |
assertSearchResults( |
6758 |
""+ getExternalJCLPathString("1.5") + " java.lang.IllegalMonitorStateException EXACT_MATCH" |
7076 |
""+ getExternalJCLPathString("1.5") + " java.lang.IllegalMonitorStateException EXACT_MATCH" |
6759 |
); |
7077 |
); |
6760 |
// Search like UI does (ie. replace it with prefix if it's not a valid CamelCase) |
|
|
6761 |
int validatedRule = SearchPattern.validateMatchRule(pattern, matchRule); |
6762 |
if (validatedRule != matchRule) { |
6763 |
matchRule = SearchPattern.R_PREFIX_MATCH; |
6764 |
} |
6765 |
search(pattern, TYPE, DECLARATIONS, matchRule); |
6766 |
assertSearchResults( |
6767 |
""+ getExternalJCLPathString("1.5") + " java.lang.IllegalMonitorStateException EXACT_MATCH\n" + |
6768 |
""+ getExternalJCLPathString("1.5") + " java.lang.IllegalMonitorStateException EXACT_MATCH" |
6769 |
); |
6770 |
} |
7078 |
} |
|
|
7079 |
/** @deprecated As using a depreciated constant */ |
6771 |
public void testBug137087f() throws CoreException { |
7080 |
public void testBug137087f() throws CoreException { |
6772 |
// Search CamelCase |
|
|
6773 |
int matchRule = SearchPattern.R_CAMELCASE_MATCH; |
7081 |
int matchRule = SearchPattern.R_CAMELCASE_MATCH; |
6774 |
String pattern = "illegalMsExceptionSException"; |
7082 |
String pattern = "illegalMsExceptionSException"; |
6775 |
search(pattern, TYPE, DECLARATIONS, matchRule); |
7083 |
search(pattern, TYPE, DECLARATIONS, matchRule); |
6776 |
assertSearchResults( |
7084 |
assertSearchResults( |
6777 |
"" // expected no result as uppercase characters in pattern do not match any camelcase ones in existing types |
7085 |
"" // expected no result as uppercase characters in pattern do not match any camelcase ones in existing types |
6778 |
); |
7086 |
); |
6779 |
// Search like UI does (ie. replace it with prefix if it's not a valid CamelCase) |
|
|
6780 |
int validatedRule = SearchPattern.validateMatchRule(pattern, matchRule); |
6781 |
if (validatedRule != matchRule) { |
6782 |
matchRule = SearchPattern.R_PREFIX_MATCH; |
6783 |
} |
6784 |
search(pattern, TYPE, DECLARATIONS, matchRule); |
6785 |
assertSearchResults( |
6786 |
"" // expected no result as uppercase characters in pattern do not match any camelcase ones in existing types |
6787 |
); |
6788 |
} |
7087 |
} |
|
|
7088 |
/** @deprecated As using a depreciated constant */ |
6789 |
public void testBug137087g() throws CoreException { |
7089 |
public void testBug137087g() throws CoreException { |
6790 |
// Search CamelCase |
|
|
6791 |
int matchRule = SearchPattern.R_CAMELCASE_MATCH; |
7090 |
int matchRule = SearchPattern.R_CAMELCASE_MATCH; |
6792 |
String pattern = "clonenotsupportedex"; |
7091 |
String pattern = "clonenotsupportedex"; |
6793 |
search(pattern, TYPE, DECLARATIONS, matchRule); |
7092 |
search(pattern, TYPE, DECLARATIONS, matchRule); |
6794 |
assertSearchResults( |
7093 |
assertSearchResults( |
6795 |
"" // no match expected as this is not a valid camel case |
7094 |
"" // no result because it's an invalid camel case pattern which is replaced with |
6796 |
); |
7095 |
// prefix case sensitive match bu SearchPatter.validateMatchRule(...) (old behavior) |
6797 |
// Search like UI does (ie. replace it with prefix if it's not a valid CamelCase) |
|
|
6798 |
int validatedRule = SearchPattern.validateMatchRule(pattern, matchRule); |
6799 |
if (validatedRule != matchRule) { |
6800 |
matchRule = SearchPattern.R_PREFIX_MATCH; |
6801 |
} |
6802 |
search(pattern, TYPE, DECLARATIONS, matchRule); |
6803 |
assertSearchResults( |
6804 |
""+ getExternalJCLPathString("1.5") + " java.lang.CloneNotSupportedException EXACT_MATCH" |
6805 |
); |
7096 |
); |
6806 |
} |
7097 |
} |
|
|
7098 |
/** @deprecated As using a depreciated constant */ |
6807 |
public void testBug137087h() throws CoreException { |
7099 |
public void testBug137087h() throws CoreException { |
6808 |
// Search CamelCase |
|
|
6809 |
int matchRule = SearchPattern.R_CAMELCASE_MATCH; |
7100 |
int matchRule = SearchPattern.R_CAMELCASE_MATCH; |
6810 |
String pattern = "CloneNotSupportedEx"; |
7101 |
String pattern = "CloneNotSupportedEx"; |
6811 |
search(pattern, TYPE, DECLARATIONS, matchRule); |
7102 |
search(pattern, TYPE, DECLARATIONS, matchRule); |
6812 |
assertSearchResults( |
7103 |
assertSearchResults( |
6813 |
""+ getExternalJCLPathString("1.5") + " java.lang.CloneNotSupportedException EXACT_MATCH" |
7104 |
""+ getExternalJCLPathString("1.5") + " java.lang.CloneNotSupportedException EXACT_MATCH" |
6814 |
); |
7105 |
); |
6815 |
// Search like UI does (ie. replace it with prefix if it's not a valid CamelCase) |
|
|
6816 |
int validatedRule = SearchPattern.validateMatchRule(pattern, matchRule); |
6817 |
if (validatedRule != matchRule) { |
6818 |
matchRule = SearchPattern.R_PREFIX_MATCH; |
6819 |
} |
6820 |
search(pattern, TYPE, DECLARATIONS, matchRule); |
6821 |
assertSearchResults( |
6822 |
""+ getExternalJCLPathString("1.5") + " java.lang.CloneNotSupportedException EXACT_MATCH\n" + |
6823 |
""+ getExternalJCLPathString("1.5") + " java.lang.CloneNotSupportedException EXACT_MATCH" |
6824 |
); |
6825 |
} |
7106 |
} |
|
|
7107 |
/** @deprecated As using a depreciated constant */ |
6826 |
public void testBug137087i() throws CoreException { |
7108 |
public void testBug137087i() throws CoreException { |
6827 |
// Search CamelCase |
|
|
6828 |
int matchRule = SearchPattern.R_CAMELCASE_MATCH; |
7109 |
int matchRule = SearchPattern.R_CAMELCASE_MATCH; |
6829 |
String pattern = "cloneNotsupportedEx"; |
7110 |
String pattern = "cloneNotsupportedEx"; |
6830 |
search(pattern, TYPE, DECLARATIONS, matchRule); |
7111 |
search(pattern, TYPE, DECLARATIONS, matchRule); |
6831 |
assertSearchResults( |
7112 |
assertSearchResults( |
6832 |
""+ getExternalJCLPathString("1.5") + " java.lang.CloneNotSupportedException EXACT_MATCH" |
7113 |
""+ getExternalJCLPathString("1.5") + " java.lang.CloneNotSupportedException EXACT_MATCH" |
6833 |
); |
7114 |
); |
6834 |
// Search like UI does (ie. replace it with prefix if it's not a valid CamelCase) |
|
|
6835 |
int validatedRule = SearchPattern.validateMatchRule(pattern, matchRule); |
6836 |
if (validatedRule != matchRule) { |
6837 |
matchRule = SearchPattern.R_PREFIX_MATCH; |
6838 |
} |
6839 |
search(pattern, TYPE, DECLARATIONS, matchRule); |
6840 |
assertSearchResults( |
6841 |
""+ getExternalJCLPathString("1.5") + " java.lang.CloneNotSupportedException EXACT_MATCH\n" + |
6842 |
""+ getExternalJCLPathString("1.5") + " java.lang.CloneNotSupportedException EXACT_MATCH" |
6843 |
); |
6844 |
} |
7115 |
} |
|
|
7116 |
/** @deprecated As using a depreciated constant */ |
6845 |
public void testBug137087j() throws CoreException { |
7117 |
public void testBug137087j() throws CoreException { |
6846 |
// Search CamelCase |
|
|
6847 |
int matchRule = SearchPattern.R_CAMELCASE_MATCH; |
7118 |
int matchRule = SearchPattern.R_CAMELCASE_MATCH; |
6848 |
String pattern = "ClonenotSupportedexc"; |
7119 |
String pattern = "ClonenotSupportedexc"; |
6849 |
search(pattern, TYPE, DECLARATIONS, matchRule); |
7120 |
search(pattern, TYPE, DECLARATIONS, matchRule); |
6850 |
assertSearchResults( |
7121 |
assertSearchResults( |
6851 |
""+ getExternalJCLPathString("1.5") + " java.lang.CloneNotSupportedException EXACT_MATCH" |
7122 |
""+ getExternalJCLPathString("1.5") + " java.lang.CloneNotSupportedException EXACT_MATCH" |
6852 |
); |
7123 |
); |
6853 |
// Search like UI does (ie. replace it with prefix if it's not a valid CamelCase) |
|
|
6854 |
int validatedRule = SearchPattern.validateMatchRule(pattern, matchRule); |
6855 |
if (validatedRule != matchRule) { |
6856 |
matchRule = SearchPattern.R_PREFIX_MATCH; |
6857 |
} |
6858 |
search(pattern, TYPE, DECLARATIONS, matchRule); |
6859 |
assertSearchResults( |
6860 |
""+ getExternalJCLPathString("1.5") + " java.lang.CloneNotSupportedException EXACT_MATCH\n" + |
6861 |
""+ getExternalJCLPathString("1.5") + " java.lang.CloneNotSupportedException EXACT_MATCH" |
6862 |
); |
6863 |
} |
7124 |
} |
|
|
7125 |
/** @deprecated As using a depreciated constant */ |
6864 |
public void testBug137087k() throws CoreException { |
7126 |
public void testBug137087k() throws CoreException { |
6865 |
// Search CamelCase |
|
|
6866 |
int matchRule = SearchPattern.R_CAMELCASE_MATCH; |
7127 |
int matchRule = SearchPattern.R_CAMELCASE_MATCH; |
6867 |
String pattern = "cloneNotSupportedExcep"; |
7128 |
String pattern = "cloneNotSupportedExcep"; |
6868 |
search(pattern, TYPE, DECLARATIONS, matchRule); |
7129 |
search(pattern, TYPE, DECLARATIONS, matchRule); |
6869 |
assertSearchResults( |
7130 |
assertSearchResults( |
6870 |
""+ getExternalJCLPathString("1.5") + " java.lang.CloneNotSupportedException EXACT_MATCH" |
7131 |
""+ getExternalJCLPathString("1.5") + " java.lang.CloneNotSupportedException EXACT_MATCH" |
6871 |
); |
7132 |
); |
6872 |
// Search like UI does (ie. replace it with prefix if it's not a valid CamelCase) |
|
|
6873 |
int validatedRule = SearchPattern.validateMatchRule(pattern, matchRule); |
6874 |
if (validatedRule != matchRule) { |
6875 |
matchRule = SearchPattern.R_PREFIX_MATCH; |
6876 |
} |
6877 |
search(pattern, TYPE, DECLARATIONS, matchRule); |
6878 |
assertSearchResults( |
6879 |
""+ getExternalJCLPathString("1.5") + " java.lang.CloneNotSupportedException EXACT_MATCH\n" + |
6880 |
""+ getExternalJCLPathString("1.5") + " java.lang.CloneNotSupportedException EXACT_MATCH" |
6881 |
); |
6882 |
} |
7133 |
} |
|
|
7134 |
/** @deprecated As using a depreciated constant */ |
6883 |
public void testBug137087l() throws CoreException { |
7135 |
public void testBug137087l() throws CoreException { |
6884 |
// Search CamelCase |
|
|
6885 |
int matchRule = SearchPattern.R_CAMELCASE_MATCH; |
7136 |
int matchRule = SearchPattern.R_CAMELCASE_MATCH; |
6886 |
String pattern = "Clonenotsupportedexception"; |
7137 |
String pattern = "Clonenotsupportedexception"; |
6887 |
search(pattern, TYPE, DECLARATIONS, matchRule); |
7138 |
search(pattern, TYPE, DECLARATIONS, matchRule); |
6888 |
assertSearchResults( |
7139 |
assertSearchResults( |
6889 |
""+ getExternalJCLPathString("1.5") + " java.lang.CloneNotSupportedException EXACT_MATCH" |
7140 |
""+ getExternalJCLPathString("1.5") + " java.lang.CloneNotSupportedException EXACT_MATCH" |
6890 |
); |
7141 |
); |
6891 |
// Search like UI does (ie. replace it with prefix if it's not a valid CamelCase) |
|
|
6892 |
int validatedRule = SearchPattern.validateMatchRule(pattern, matchRule); |
6893 |
if (validatedRule != matchRule) { |
6894 |
matchRule = SearchPattern.R_PREFIX_MATCH; |
6895 |
} |
6896 |
search(pattern, TYPE, DECLARATIONS, matchRule); |
6897 |
assertSearchResults( |
6898 |
""+ getExternalJCLPathString("1.5") + " java.lang.CloneNotSupportedException EXACT_MATCH\n" + |
6899 |
""+ getExternalJCLPathString("1.5") + " java.lang.CloneNotSupportedException EXACT_MATCH" |
6900 |
); |
6901 |
} |
7142 |
} |
|
|
7143 |
/** @deprecated As using a depreciated constant */ |
6902 |
public void testBug137087m() throws CoreException { |
7144 |
public void testBug137087m() throws CoreException { |
6903 |
// Search CamelCase |
|
|
6904 |
int matchRule = SearchPattern.R_CAMELCASE_MATCH; |
7145 |
int matchRule = SearchPattern.R_CAMELCASE_MATCH; |
6905 |
String pattern = "CloneNotSupportedException"; |
7146 |
String pattern = "CloneNotSupportedException"; |
6906 |
search(pattern, TYPE, DECLARATIONS, matchRule); |
7147 |
search(pattern, TYPE, DECLARATIONS, matchRule); |
6907 |
assertSearchResults( |
7148 |
assertSearchResults( |
6908 |
""+ getExternalJCLPathString("1.5") + " java.lang.CloneNotSupportedException EXACT_MATCH" |
7149 |
""+ getExternalJCLPathString("1.5") + " java.lang.CloneNotSupportedException EXACT_MATCH" |
6909 |
); |
7150 |
); |
6910 |
// Search like UI does (ie. replace it with prefix if it's not a valid CamelCase) |
|
|
6911 |
int validatedRule = SearchPattern.validateMatchRule(pattern, matchRule); |
6912 |
if (validatedRule != matchRule) { |
6913 |
matchRule = SearchPattern.R_PREFIX_MATCH; |
6914 |
} |
6915 |
search(pattern, TYPE, DECLARATIONS, matchRule); |
6916 |
assertSearchResults( |
6917 |
""+ getExternalJCLPathString("1.5") + " java.lang.CloneNotSupportedException EXACT_MATCH\n" + |
6918 |
""+ getExternalJCLPathString("1.5") + " java.lang.CloneNotSupportedException EXACT_MATCH" |
6919 |
); |
6920 |
} |
7151 |
} |
|
|
7152 |
|
6921 |
/** |
7153 |
/** |
6922 |
* Bug 137984: [search] Field references not found when type is a qualified member type [regression] |
7154 |
* Bug 137984: [search] Field references not found when type is a qualified member type [regression] |
6923 |
* @see "https://bugs.eclipse.org/bugs/show_bug.cgi?id=137984" |
7155 |
* @see "https://bugs.eclipse.org/bugs/show_bug.cgi?id=137984" |