Bug 43294 Primary working copy: No updates when changed in working copy mode
20030918 see test cases TypeHierarchyTest.testHierarchyWithWorkingCopy1, TypeHierarchyTest.testHierarchyWithWorkingCopy2, TypeHierarchyTest.testHierarchyWithWorkingCopy3 A hierarchy is created on a type that is then opened in an editor. The super type is modified, the editor saved: The type hierarchy does not send a 'typeHierarchyChanged' notification. If I understood correctly, the 'typeHierarchyChanged' is supposed to notify only on save, not while editing the working copy. Crrently it doesn't notify at all.
org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/core/TypeHierarchyTest.java
public void test1() throws Exception {
		
		IPackageFragmentRoot jdk= JavaProjectHelper.addRTJar(fJavaProject1);
		assertTrue("jdk not found", jdk != null);
		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);
		
		JavaProjectHelper.addRTJar(fJavaProject2);
		JavaProjectHelper.addRequiredProject(fJavaProject2, fJavaProject1);
		IPackageFragmentRoot root2= JavaProjectHelper.addSourceContainer(fJavaProject2, "src");
		IPackageFragment pack2= root2.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);
		
		ITypeHierarchy hierarchy= type2.newSupertypeHierarchy(null);
		IType[] allTypes= hierarchy.getAllTypes();
		
		assertTrue("Should contain 3 types, contains: " + allTypes.length, allTypes.length == 3);
		
		IType type= fJavaProject2.findType("pack1.A");
		assertTrue("Type not found", type != null);
	}	
	
}