Bug 220565 - adapt to new API ICompilationUnit.applyEdits
Summary: adapt to new API ICompilationUnit.applyEdits
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.4   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.4 M6   Edit
Assignee: Jerome Lanneluc CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-02-27 10:06 EST by Martin Aeschlimann CLA
Modified: 2008-03-26 06:14 EDT (History)
1 user (show)

See Also:


Attachments
Proposed change (24.02 KB, patch)
2008-02-29 10:57 EST, Jerome Lanneluc CLA
no flags Details | Diff
Improved change after Martin's feedback (25.58 KB, patch)
2008-02-29 12:57 EST, Jerome Lanneluc CLA
no flags Details | Diff

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