Eugene,

Thank you for the response and clarification. I didn't know that sourcepaths
are treated as equivalent.

I think usually the need to move source files between sourcepaths is quite
rare
(in my case less than 1%). Besides as I said moving to another sourcepath is
usually (in my case) dangerous and undesirable. So when I move classes in
99%
I have to choose the current sourcepath (I think that IDEA chooses as
the default the sourcepath the class is in, so you just have to hit Enter).
So here is my request.

Is it possible to have in the Move dialog a checkbox
"Keep in the current sourcepath" checked by default?
Maybe you could specify the default value of the checkbox in
ProjectProperties
for each classpath (checked/true by default) or for all classpaths.
Thus you'll have the means somehow to tell IDEA that in your case
the main and testcases sourcepaths are very different and source files
are usually not moved between them.

It will save the need to hit Enter (99%) when you have to choose between
sourcepaths
and the need to think for a second about what sourcepath you're in. And also
it will solve the problem below.


Timur Zambalayev


----- Original Message -----
Eugene Zhuravlev [EMAIL PROTECTED]
Tue, 9 Apr 2002 18:35:56 +0400


Hi Timur,

> Please, fix it. It's a bug in my opinion. The user should trust IDEA
> to do refactorings right, the way it's expected, without double checks,
> and be given a choice if needed.

Currently all refactorings work in terms of packages and if the package can
be unabmbiguously resolved to a directory on the disk, IDEA moves the class
to the new _package_, not directory and it should not ask about anything
because all sourcepaths are equivalent (at least they are treated as
equivalent now). No one source path have advantage over another, and IDEA,
of cource, cannot guess that one sourcepath is a "main" sourcepath and
another sourcepath is a "testcase" sourcepath. That's the way it's
implemented now. And I'm not sure that the issue you're talking about is the
bug. Unfortunately, there's no clear and comfortable way for IDEA to handle
such a situation. Anyway, thank you for your report. We will further
investigate it and consider implementing the suggested behaviour.

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

----- Original Message -----
From: "Timur Zambalayev" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, April 08, 2002 21:35
Subject: [Eap-list] #615: Move class problem


> I don't think this is the case where you should worry about how often
> it's used. IDEA silently did a wrong thing (under no circumstances
> source files should be moved from one sourcepath to another
> without warning/choice). It moved the test case
> source file from the testcases sourcepath to the main sourcepath.
> As a result it broke the build. The ant script wasn't able to find
> the test case. I think if it can break things unexpectedly, it should
> be fixed even if doesn't happen too often. I wouldn't like to remember
> to double check whether the folder doesn't exist in this source classpath
> before making the refactoring. And I know about the problem.
> What about users that don't? There is some chance they could encounter it
> for the first time and be confused.
>
> Please, fix it. It's a bug in my opinion. The user should trust IDEA
> to do refactorings right, the way it's expected, without double checks,
> and be given a choice if needed.
>
>
> Timur
>
>
> ----- Original Message -----
> From: Eugene Zhuravlev [EMAIL PROTECTED]
> Sent: Mon, 8 Apr 2002 14:32:16 +0400
>
>
> Hi Timur,
>
> Yes, indeed the 'problem' exists. There's no way to 'split' package into
> several directories right at the time of refactoring. But do you really
need
> it so often? Currently refactorings work in terms of java constructs -
> packages (not directories) and asking you to which directory you want to
> place the class is just because it is impossible to unabiguously determine
> the location when multiple directories correspond to the same package.
> Perhaps it's better to keep it simple and not complicate the refactorings
> with the directory stuff. And besides, such situation doesn't seem to
occur
> too often and could be solved in a way you described. I mean even if we
make
> refactorings work at a directory level, not package level - most time you
> won't need it.
>
> Best regards,
> Eugene Zhuravlev
> JetBrains, Inc / IntelliJ Software, http://www.intellij.com/
> "Develop with pleasure!"
>
> ----- Original Message -----
> From: "Timur Zambalayev" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Saturday, April 06, 2002 11:38
> Subject: [Eap-list] #615: Move class problem
>
>
> > Say you have two source folders: src/main and src/testcases.
> > You have one package src/main/foo and one class
> src/testcases/FooTest.java.
> > Then you decided to move src/testcases/FooTest.java to
> > src/testcases/foo/FooTest.java.
> >
> > 1. In this particular case you're not given an option to choose the
> > destination directory
> > (it's assumed that you want to move it to src/main/foo). If there's no
foo
> > package anywhere
> > you can choose the destination directory.
> > 2. In the refactoring preview the destination directory is not mentioned
> > anywhere.
> >
> > The class was moved to src/main/foo, though I expected and thought that
it
> > was moved to
> > src/testcases/foo. The workaround here is to create the testcases/foo
> folder
> > before
> > you move the class.
> >
> > Suggestions:
> >
> > 1. In the refactoring preview the destination directory should be
> mentioned.
> > 2. In this case you should be given the chance to use the choose
> destination
> > directory dialog,
> > just like in the situation where there's no foo package.
> >
> >
> > Timur Zambalayev
> >
> >
> > _______________________________________________
> > 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

Reply via email to