Bug 41611 - CreateCompilationUnitOperation.executeOperation() should probably force creation more agressively
Summary: CreateCompilationUnitOperation.executeOperation() should probably force creat...
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.0   Edit
Hardware: PC Windows 2000
: P3 normal (vote)
Target Milestone: 3.0 M5   Edit
Assignee: Jerome Lanneluc CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-08-15 10:16 EDT by Adam Kiezun CLA
Modified: 2003-11-24 06:26 EST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Adam Kiezun CLA 2003-08-15 10:16:12 EDT
20030813

CreateCompilationUnitOperation.executeOperation() 
does not force IFile creation if IFile returns 'false' to 'exists()'.
However, IFile.create specifies that 'force' should be used to control how to 
deal with resources being (or not) in synch with file system, not with 
resources existing or not.

so, what happens is that an IFile, whose physical representation does really 
exist on disk (the IFile returns 'false' to 'exists()' but is out of sych with 
the file system), is not forced to be created which results in a 
JavaModelException.

because of the mismatch in semantics of 'force' in jcore and core i'm not able 
to force creation of a compilation unit, because IFile.create still gets passed 
a 'false' as the 'force' argument
Comment 1 Jerome Lanneluc CLA 2003-11-05 05:42:20 EST
Changed CreateCompilationUnitOperation.executeOperation() to use the force flag 
even if the file is thought to not exist.

Added regression test CreateCompilationUnitTests.testForce()
Comment 2 David Audel CLA 2003-11-24 06:26:35 EST
Verified.