Small touches based on 873
Hi,
There is the list of small touches for refactoring which I believe can help in people life.
1. When I go and make "Change method signature", I am asked if I would like to change the this method in interface (it is cool!!!) but when I say yes, and let say I change return type from List to Collection - I am still in my file. In my interface there is no import for Collection (as it is missing in my currently edited class). Currently edited class is not a problem (I just press Alt+Enter, but in the Interface - I have to remember to go....
2. In the previous scenario I have comment on the method:
I change method signature to return Collection. The Comment should be changed too.
3. I would like to see two new features:
- Now I can refactor-rename one file, but let say I generated 200 objects by some tool. Now I like to refactor-rename all of the FooBazBar_VO to the FooBazBarVO. It will be great to have it. (it does not have to be fast)
- Multiple line replacement (across the project/directory). At least I have no idea how to do it right now.
4. On the end small bug. When I make some key stroke action (realy no matter which - let say Shift+F6) most of the times it works fine and the popup window has the focus, but sometimes it does not. I do not know if this is system related (Mandrake9.1 + GNOME + IDEA-873)
Best regards to you all
Jerzy Puchala
Please sign in to leave a comment.
Jerzy Puchala wrote:
Please submit a request.
http://www.intellij.net/tracker/idea/viewSCR?publicId=1783
Any good ideas for UI for that?
I guess it is window manager related (RH9.0 + KDE + Aurora is my config
and I never stumbled upon this.
Friendly,
Dmitry
--
Dmitry Lomov
IntelliJ Labs / JetBrains Inc.
http://www.intellij.com
"Develop with pleasure!"
Dmitry Lomov wrote:
>>3. I would like to see two new features:
>> - Now I can refactor-rename one file, but let say I generated 200 objects
>> by some tool. Now I like to refactor-rename all of the FooBazBar_VO to
>> the FooBazBarVO. It will be great to have it. (it does not have to be
>> fast) - Multiple line replacement (across the project/directory). At
>> least I have no idea how to do it right now.
Isn't this what the Migrate tool already does? Or is this a request for
regex replacement on the class names as well? If the latter, then simply
updating the Migrate tool to support the same regular expression features as
the search and replace dialog ought to do the trick... shouldn't it?
Vil.
--
Vilya Harvey
vilya.harvey@digitalsteps.com / digital steps /
(W) +44 (0)1483 469 480
(M) +44 (0)7816 678 457 http://www.digitalsteps.com/
DisclaimerThis e-mail and any attachments may be confidential and/or legally
privileged. If you have received this email and you are not a named
addressee, please inform the sender at Digital Steps Ltd by phone on
+44 (0)1483 469 480 or by reply email and then delete the email from
your system. If you are not a named addressee you must not use,
disclose, distribute, copy, print or rely on this email. Although
Digital Steps Ltd routinely screens for viruses, addressees should
check this email and any attachments for viruses. Digital Steps Ltd
makes no representation or warranty as to the absence of viruses in this
email or any attachments.
Hi Vilya,
Can you point me to it, please?
Jerzy
Nevermind - I found it. I did not know it exists...
No - it is more or less what I am talking about.
The part which I would like to have is that when I choose in "Edit class/package" class I can put in "Old Name" "Zxc_Impl" and in new name for example "Bean" and provide the direcory name. This should refactor all the files like this:
ZxcFoo_Impl.java -> FooBean.java
ZxcBaz_Impl.java -> BazBean.java
....
>> - Multiple line replacement (across the project/directory). At
>> least I have no idea how to do it right now.
>Any good ideas for UI for that?
Now if we are talknig about multiple line replacement of the text. The greatest UI for this I found in HomeSite. You can download it for eval for free and see for yourself. Its very nice.
Jerzy Puchala
Jerzy Puchala wrote:
That's rather heuristic. It would have to be a more precise regular
expression substitution like so: (Zxc*)_Impl -> \1Bean
Ciao,
Gordon
--
Gordon Tyler (Software Developer)
Quest Software <http://java.quest.com/>
260 King Street East, Toronto, Ontario M5A 4L5, Canada
Voice: 416-643-4846 | Fax: 416-594-1919
I miss that too (searches and replacements with line feeds).
In case of an editor like IntelliJ, it would probably be useful to search
for expressions ignoring white space (spaces, line feeds, etc.)
Amnon
"Jerzy Puchala" <no_mail@jetbrains.com> wrote in message
news:32447881.1059147146961.JavaMail.itn@is.intellij.net...
>
>
greatest UI for this I found in HomeSite. You can download it for eval for
free and see for yourself. Its very nice.
>
I've not tried HomeSite, but I absolutely love BBEdit's Find/Replace interface. I submitted a few SCRs (2958, 2959, 2960, and 2961) a long time ago hoping for better Find/Replace in IDEA (using BBEdit as the model).
#2959 ("Change textboxes in Find and Replace dialogs from single to multiple-line") and #576 ("Add possibility to specify "multiline match" option for regular expressions") are both related to multiline find/replace (which, to me, make 2958 a necessity).
Jerzy Puchala wrote:
For the lazy and lazy at heart, here's a screenshot for HomeSite's Find
and Replace:
http://www.macromedia.com/software/homesite/productinfo/features/find_replace.html
I'm with Chris-- IDEA could use a makeover on this to move from the
decent level to the IDEA is fantastic level, and I've submitted a number
of requests over time about that.
Jon
And here's BBEdit's:
http://www.bbedit.com/images/aqua_find_dialog.gif
Looks pretty similar, but adds saving of grep patterns (see SCR #2960), file filter criteria, etc. It may not have a way to ignore tags like HomeSite does, however.
This is not valid use of javadoc, is it? I mean, the @return tag is supposed to describe what's returned, logically; javadoc shows what the method returns on its own.
>This is not valid use of javadoc, is it? I mean, the
>@return tag is supposed to describe what's returned,
>logically; javadoc shows what the method returns on its
>own.
Sorry,
I have to say yes to your comments. With one exception. In my post was the example of what should be changed. Will it be better if I will give example like this?
I believe this will not change anything in terms of the subject of the problem.
Since there is no general requirement for the @return tag comment format, how could Idea know for sure that the "Object" string in your comment refers precisely to the return value type - and it should therefore be changed accordingly (to FooBaz)?
IMO, the most you could ask from IDEA is to present a preview mode option about changing the occurrences of Object in the @return comment - but this would still be based on a rather wild guess.
(In fact, the @return comment might refer to the type of a parameter - which may also be affected by the required signature change! What if that parameter is changed to another type than the return value type??)
Of course, parsing natural language in comments (for a start, English understanding would suffice :) and doing context-based deductions about the semantics of comments would solve the problem - and, as a side effect, bring about a revolution in the software world.
BTW: People are talking about IDEA for C#, Python etc - why not also IDEA for... English? For example, I would love to have (smart, context-based) word completion, phrase refactoring or composing by intention when I write elaborate e-mails or documents - wouldn't you?!
...Well, I'm looking forward to IDEA 5.0 and it's possible motto: "thinking with pleasure" :)