java - rename refactor in eclipse -


while developing eclispe plugin, able programmatically rename class-field using following code.

renamesupport renamesupport = renamesupport.create(field, newname, renamesupport.update_references); renamesupport.perform(workbench.getshell(), workbench); 

but applies changes actual source files. there anyway can prevented? need renamed code internally (for performing other computations), must not change actual source.

please suggest.

you copy temporary file file.createtempfile() , rename code in temporary file, if renamesupport lets that. if doesn't, can copy original temporary file , copy once other computations finished.


Comments

Popular posts from this blog

SAP Web Service from .NET via WCF -

email - PHP Mail Error "The Page at X Says: E-Mail can not be sent!" -

Optimized Line drawing in QT -