Bug 9232 - ICompilationUnit.delete() fails
Summary: ICompilationUnit.delete() fails
Status: RESOLVED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 2.0   Edit
Hardware: PC Windows 2000
: P3 normal (vote)
Target Milestone: 2.0 M4   Edit
Assignee: Jerome Lanneluc CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-02-07 09:19 EST by Martin Aeschlimann CLA
Modified: 2002-03-14 10:42 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.