Dimitri, thank you very much for this detailed answer. It made everything cristall clear.
Tom On Mon, 15 Jul 2002 11:08:18 +0400, Dmitry Lomov <[EMAIL PROTECTED]> wrote: > Thomas, > > Thomas Singer wrote: > > 1) > > What's the use of the checkbox "Replace usage qualifications with > > class reference"? > > There are two dialogs for 'Make Method Static'. The one you are talking > about appears when there is no references to 'this' in method body. > In this case, you do not need any additional parameters for a method. > > The checkbox you mentioned controls whether you want to replace usage > qualificator of a method (which is an expression giving an instance of > a class) with a class reference (as all static methods are normally > invoked), like this: > Test test; > ... > test.method(); > becomes: > Test test; > ... > Test.method(); > Usually, this is what you want. However, when a usage qualifier is > replaced with class reference, the value and the side effects of it are > lost. Nastiest example I can come up with this far is: > Iterator iterator = ...; > ... > ((Test) iterator.next()).method(); > Unfortunately, it is kinda difficult for us (at this stage at least) > to detect whether a particular method call has a side effect, > hence the checkbox. > > In case this box is unchecked, "Make Method Static" is just a quick > check whether the method has any references to 'this' (it also > automates typing in 'static' keyword, of course! :)). > > If you have any ideas for a better name of such checkbox, feel free > to post it here. > > > > > 2) > > The dialog should have a title, e.g. "IDEA - Make Method Static" (or > > without the leading "IDEA - "). > This is fixed in #636. Thank you! > > > > > Tom > > Friendly, > Dmitry > > -- > Dmitry Lomov > JetBrains Inc. / IntelliJ Software > http://www.intellij.com > "Develop with pleasure!" > _______________________________________________ Eap-bugs mailing list [EMAIL PROTECTED] http://lists.jetbrains.com/mailman/listinfo/eap-bugs
