Lines 1948-1954
Link Here
|
1948 |
deleteFile(new File(jarName)); |
1948 |
deleteFile(new File(jarName)); |
1949 |
} |
1949 |
} |
1950 |
} |
1950 |
} |
|
|
1951 |
//https://bugs.eclipse.org/bugs/show_bug.cgi?id=120766 |
1952 |
public void testDuplicateTypeDeclaration8() throws JavaModelException { |
1953 |
this.workingCopies = new ICompilationUnit[3]; |
1954 |
this.workingCopies[0] = getWorkingCopy( |
1955 |
"/Resolve/src/test/Test.java", |
1956 |
"package test;"+ |
1957 |
"public class Test {\n" + |
1958 |
" void foo() {\n" + |
1959 |
" test.p1.Type t = new test.p1.Type();\n" + |
1960 |
" }\n" + |
1961 |
"}\n"); |
1962 |
|
1963 |
this.workingCopies[1] = getWorkingCopy( |
1964 |
"/Resolve/src/test/p1/Type.java", |
1965 |
"package test.p1;"+ |
1966 |
"public class Type {\n" + |
1967 |
" public Type(int i) {}\n" + |
1968 |
"}\n"); |
1969 |
|
1970 |
this.workingCopies[2] = getWorkingCopy( |
1971 |
"/Resolve/src/test/p2/Type.java", |
1972 |
"package test.p2;"+ |
1973 |
"public class Type {\n" + |
1974 |
"}\n"); |
1951 |
|
1975 |
|
|
|
1976 |
String str = this.workingCopies[0].getSource(); |
1977 |
int start = str.lastIndexOf("Type"); |
1978 |
int length = "Type".length(); |
1979 |
IJavaElement[] elements = this.workingCopies[0].codeSelect(start, length, this.wcOwner); |
1980 |
|
1981 |
assertElementsEqual( |
1982 |
"Unexpected elements", |
1983 |
"Type [in [Working copy] Type.java [in test.p1 [in src [in Resolve]]]]", |
1984 |
elements |
1985 |
); |
1986 |
} |
1952 |
public void testArrayParameterInsideParent1() throws JavaModelException { |
1987 |
public void testArrayParameterInsideParent1() throws JavaModelException { |
1953 |
ICompilationUnit cu = getCompilationUnit("Resolve", "src", "", "ResolveArrayParameterInsideParent1.java"); |
1988 |
ICompilationUnit cu = getCompilationUnit("Resolve", "src", "", "ResolveArrayParameterInsideParent1.java"); |
1954 |
|
1989 |
|