Bug 9232

Summary: ICompilationUnit.delete() fails
Product: [Eclipse Project] JDT Reporter: Martin Aeschlimann <martinae>
Component: CoreAssignee: Jerome Lanneluc <jerome_lanneluc>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3    
Version: 2.0   
Target Milestone: 2.0 M4   
Hardware: PC   
OS: Windows 2000   
Whiteboard:

Description Martin Aeschlimann CLA 2002-02-07 09:19:39 EST
In TypePage, line 1240, after fCreatedType= createdType;
add
		cu.delete(true, null);
		if (cu.exists()) {
			System.out.println("still exists");
		}

-> exists returns true.

Testing this in a text class works. As a difference the code in TypePage is 
called inside a WorkbenchRunnable. Could that be a problem? (Is the JavaModel 
listing to deltas itself?)
Comment 1 Philipe Mulet CLA 2002-02-12 08:10:38 EST
Did we close the element and is its resource still existing ?
Comment 2 Jerome Lanneluc CLA 2002-03-14 10:42:11 EST
No we didn't close the element. It was closed only during the delta processing.
Fixed DeleteResourceElementsOperation so that it closes the elements it 
processes.