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

android - Spacing between the stars of a rating bar? -

aspxgridview - Devexpress grid - header filter does not work if column is initially hidden -

c# - How to execute a particular part of code asynchronously in a class -