Although that is the definition of Java it doesn't match user's expectations. There have been some similar cases reported with selecting expressions for use with extract method as well. For String and integer expressions there are often many evaluation orders that would give identical results and throw identical exceptions. I think user's expect IDEA to be able to figure this out.
-- Mark -----Original Message----- From: Fedor Karpelevitch [mailto:[EMAIL PROTECTED]] Sent: Monday, March 25, 2002 09:00a To: '[EMAIL PROTECTED]' Subject: RE: [Eap-list] "extract variable" does not detect all occurences that's not the parser, that's the RULE! Association is significant. In this partivcular case it makes not difference, but in general it does, so ignoring it is not correct. -- fedor. ---- Newton's Fourth Law: Every action has an equal and opposite satisfaction. > -----Original Message----- > From: Neil Galarneau [mailto:[EMAIL PROTECTED]] > Sent: Monday, March 25, 2002 6:24 AM > To: [EMAIL PROTECTED] > Subject: Re: [Eap-list] "extract variable" does not detect all > occurences > > > So are you proposing that Intellij rename the feature from > "replace all occurrences" to > "replace all occurrences that we can easily see with our > current parser" :-) ? > > Neil > > At 10:06 AM 3/24/2002 -0800, you wrote: > >As far as I renmember "+" associates right-to-left and so > > > >"a"+"b"+"a"+b" is in fact (("a"+"b")+"a")+b" so the second > "a"+b" is broken > >apart and need not be replaced. Does it work correctly for > "a"+"b"+("a"+b") ? > >If it does not then that is probably indeed a bug... > > > >fedor. > > > >On Sunday 24 March 2002 04:02 am, you wrote: > > > If you "extract variable", and "replace all occurrences" on > > > "a" + "b" > > > in the code below, > > > IDEA will only detect 2 occurences, and not the 4 possibles ; > > > > > > > > > Before: > > > > > > System.out.println( > > > "a" + "b" > > > + "a" + "b" > > > ); > > > System.out.println( > > > "a" + "b" > > > + "a" + "b" > > > ); > > > > > > After: > > > > > > String COMMON = "a" + "b"; > > > System.out.println( > > > COMMON > > > + "a" + "b" > > > ); > > > System.out.println( > > > COMMON > > > + "a" + "b" > > > ); > > > > > > > > > Alain Ravet > > > >-- > >Alex Haley was adopted! > > > >_______________________________________________ > >Eap-list mailing list > >[EMAIL PROTECTED] > >http://www.intellij.com/mailman/listinfo/eap-list > > > _______________________________________________ > Eap-list mailing list > [EMAIL PROTECTED] > http://www.intellij.com/mailman/listinfo/eap-list > _______________________________________________ Eap-list mailing list [EMAIL PROTECTED] http://www.intellij.com/mailman/listinfo/eap-list _______________________________________________ Eap-list mailing list [EMAIL PROTECTED] http://www.intellij.com/mailman/listinfo/eap-list
