### Eclipse Workspace Patch 1.0 #P org.eclipse.jdt.core.tests.performance Index: src/org/eclipse/jdt/core/tests/performance/FullSourceWorkspaceTypeHierarchyTests.java =================================================================== RCS file: /cvsroot/eclipse/org.eclipse.jdt.core.tests.performance/src/org/eclipse/jdt/core/tests/performance/FullSourceWorkspaceTypeHierarchyTests.java,v retrieving revision 1.16 diff -u -r1.16 FullSourceWorkspaceTypeHierarchyTests.java --- src/org/eclipse/jdt/core/tests/performance/FullSourceWorkspaceTypeHierarchyTests.java 22 Apr 2010 17:07:40 -0000 1.16 +++ src/org/eclipse/jdt/core/tests/performance/FullSourceWorkspaceTypeHierarchyTests.java 10 Dec 2010 07:04:32 -0000 @@ -40,7 +40,7 @@ } static { -// TESTS_NAMES = new String[] { "testPerSuperTypes" }; + TESTS_NAMES = new String[] { "testTypeResolve" }; } public static Test suite() { Test suite = buildSuite(testClass()); @@ -181,5 +181,41 @@ commitMeasurements(); assertPerformance(); } + public void testTypeResolve() throws Exception { + ICompilationUnit unit = getCompilationUnit("org.eclipse.jdt.core", "org.eclipse.jdt.internal.core", "JavaModelManager.java"); + assertNotNull("Unit not found!", unit); + IType type = unit.getType("JavaModelManager"); + assertNotNull(type); + String[][] typeName = type.resolveType("JavaCore"); + + for(int i = 0; i < typeName.length; i++) { + for (int j=0; j < typeName[0].length; j++) { + System.out.println(typeName[i][j]); + } + System.out.println("\n"); + } + + // Warm up + for (int i=0; i<10*WARMUP_COUNT; i++) { // More Warm up is required. + type = unit.getType("JavaModelManager"); + typeName = type.resolveType("IJavaProject"); + } + // Clean memory + runGc(); + // Measures + for (int i=0; i