views:

9

answers:

0

We usually do this to make changed to a CompilationUnit. Question is do we alway have to call becomeWorkingCopy and then followed by discardWorkingCopy to make any changes to the CompilationUnit?

ICompilationUnit testCU = findUnit();
testCU.becomeWorkingCopy();
// Do someting to testCU
testCU.discardWorkingCopy();