Hi Mike, I think that what you want can be easily accomplished using the current features of Idea.
1. if your getter/setter is simple then you can inline them and then use the "Encapsulat Field" refactoring. 2. if not - rename/comment them, generate simple getter/setter with Alt+Ins, apply "Encapsulat Field" refactoring and rename/uncomment the original getter/setter back. hope it helps -- dimiter ======================================================================== ================================== From: "Michael Kirby" <[EMAIL PROTECTED]> Organization: Xerox Corporation To: [EMAIL PROTECTED] Date: Wed, 27 Feb 2002 06:57:24 -0500 Reply-to: [EMAIL PROTECTED] Subject: [Eap-features] New Refactoring Reply-To: [EMAIL PROTECTED] There doesn't seem to be a refactoring for replacing the use of a variable with getter's and setters. Basically I have a field that is used directly, and initialized in the constructor. It turns out that the intitialization can change during the course of running the program so I want to "reinitialize" the variable immediately before each use. I'd like to be able to select the variable and say "create getter & setter for", and have it create 2 new methods (both empty), and everywhere the variable is assigned, call the setter, and everywhere its accessed, call the getter. Further it should change the variable to private if it isn't already so. Comments? Mike --- [EMAIL PROTECTED] To obtain my PGP public key, mail "SEND PUB KEY" in the subject to "[EMAIL PROTECTED]" _______________________________________________ Eap-features mailing list [EMAIL PROTECTED] http://www.intellij.com/mailman/listinfo/eap-features
