hierarchy.refresh(null);
	public void testHierarchyWithWorkingCopy2() throws Exception {				if (!JavaPlugin.USE_WORKING_COPY_OWNERS) {			return;		}				IPackageFragmentRoot root1= JavaProjectHelper.addSourceContainer(fJavaProject1, "src");		IPackageFragment pack1= root1.createPackageFragment("pack1", true, null);				ICompilationUnit cu1= pack1.getCompilationUnit("A.java");		cu1.createType("public class A {\n}\n", null, true, null);				IPackageFragment pack2= root1.createPackageFragment("pack2", true, null);				ICompilationUnit cu2= pack2.getCompilationUnit("B.java");		IType type2= cu2.createType("public class B extends pack1.A {\n}\n", null, true, null);					IEditorPart part= EditorUtility.openInEditor(type2);		final int[] updateCount= new int[] {0};				// create on type in working copy		ITypeHierarchy hierarchy= type2.newSupertypeHierarchy(null);		hierarchy.addTypeHierarchyChangedListener(new ITypeHierarchyChangedListener() {			public void typeHierarchyChanged(ITypeHierarchy typeHierarchy) {				updateCount[0]++;			}		});				IType[] allTypes= hierarchy.getAllTypes();			assertTrue("Update count should be 0, is: " + updateCount[0], updateCount[0] == 0);		assertTrue("Should contain 3 types, contains: " + allTypes.length, allTypes.length == 3);				try {						IDocument document= JavaUI.getDocumentProvider().getDocument(part.getEditorInput());			String superType= "pack1.A";						int offset= document.get().indexOf(superType);						document.replace(offset, superType.length(), "Object");						allTypes= hierarchy.getAllTypes();					// no update of hierarchies on working copies			assertTrue("Update count should be 0, is: " + updateCount[0], updateCount[0] == 0);			assertTrue("Should contain 3 types, contains: " + allTypes.length, allTypes.length == 3);						part.doSave(null);						allTypes= hierarchy.getAllTypes();					// update after save			assertTrue("Update count should be 1, is: " + updateCount[0], updateCount[0] == 1);			hierarchy.refresh(null);			assertTrue("Should contain 2 types, contains: " + allTypes.length, allTypes.length == 2);		} finally {			JavaPlugin.getActivePage().closeAllEditors(false);		}				allTypes= hierarchy.getAllTypes();				// update after save		assertTrue("Update count should be 1, is: " + updateCount[0], updateCount[0] == 1);		assertTrue("Should contain 2 types, contains: " + allTypes.length, allTypes.length == 2);		}