Bug 220565

Summary: adapt to new API ICompilationUnit.applyEdits
Product: [Eclipse Project] JDT Reporter: Martin Aeschlimann <martinae>
Component: CoreAssignee: Jerome Lanneluc <jerome_lanneluc>
Status: VERIFIED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: david_audel
Version: 3.4   
Target Milestone: 3.4 M6   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
Proposed change
none
Improved change after Martin's feedback none

Description Martin Aeschlimann CLA 2008-02-27 10:06:56 EST
20080227

At several places in jdt.core it is now possible to simplify the code and use the new API ICompilationUnit#applyTextEdit

org.eclipse.jdt.internal.core.JavaModelOperation.getDocument(ICompilationUnit)
can be removed.

Callers of the method can use ICompilationUnit#applyTextEdit

This should also improve performance with IBuffers that implement applyTextEdit (e.g. from JDT/UI)
Comment 1 Jerome Lanneluc CLA 2008-02-29 10:57:10 EST
Created attachment 91201 [details]
Proposed change

Note there is no regression test as this is not a bug fix. It is just an internal change. It is transparent for clients.
Comment 2 Jerome Lanneluc CLA 2008-02-29 12:57:06 EST
Created attachment 91214 [details]
Improved change after Martin's feedback
Comment 3 Jerome Lanneluc CLA 2008-03-03 09:07:40 EST
Change released for 3.4M6
Comment 4 David Audel CLA 2008-03-26 06:14:27 EDT
Verified for 3.4M6 using build I20080324-1300.