> Maybe what I really was looking for, was a way of finding out
> if the refactoring can be done without side effects
> before actually doing it.

We are currently working on this functionality and some refactorings (e.g.
"move members") already warn you about possible errors that may be
introduced by the refactoring.

> So this is a low prio feature request:
> Maybe IDEA could indeed show all affected usages and mark those
> of them that will be changed by the refactoring?

I myself use change signature refactoring this way: 1) do change signature
2) search all usages of the changed method and correct all inconsistencies.
Perhaps we need to add an option to the change signature dialog allowing to
automatically search usages after the refactoring? Will this do the job?

> well, if IDEA does it as I want, I don't mind if it programs for me ;-)

I wish IDEA were the first IDE with real AI. Who knows, perhaps in the
future versions "we will add this possibility" :-)

Best regards,
Eugene Zhuravlev
IntelliJ Software, http://www.intellij.com/
"Develop with pleasure!"


----- Original Message -----
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: 15 November, 2001 5:17 PM
Subject: [Eap-list] 516 bug: change return type


> >Adding cast automatically may hide a semantic error which is undesirable.
>
> I get your point.
> Maybe what I really was looking for, was a way of finding out
> if the refactoring can be done without side effects
> before actually doing it.
>
> So this is a low prio feature request:
> Maybe IDEA could indeed show all affected usages and mark those
> of them that will be changed by the refactoring?
>
> >IDEA should assist in programming, not program instead the developer.
>
> well, if IDEA does it as I want, I don't mind if it programs for me ;-)
>
> >>
> >> public String myMethod() { return "myString"; }
> >> String x = myMethod();
> >>
> >> ->
> >>
> >> public Object myMethod() { return new Object(); }
> >> String x = (String) myMethod();
> >>            --------
> >>
> >> myMethod returns Object after 'change signature'
> >> and calls assigning to String then require a cast.
> > >The behaviour is correct. "Find - Refactoring preview" window displays
> not
> > >all found usages, but the usages to be changed (see the corresponding
> header
> > >in the tree). In this case there are no usages that are to be changed.
> >
> > >> build 516, NT4, JDK1.3.1
> > >>
> > >> refactor - change method signature:
> > >> I changed return type from String to Object
> > >> and IDEA found no references to change,
> > >> although the method was public and it was used in several
> > >> other classes (within project path and within source-path)
> > >> -> the refactoring lead to compiler error
>
>
____________________________________________________________________________
__
> F�r ganz Eilige: Lotto per Quicktipp! Klick und weg!
> Einfach und bequem: WEB.DE Lottoservice! http://tippen2.web.de/?x=6
>
>
> _______________________________________________
> 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

Reply via email to