"Choose destination folder" dialog on creating class
Answered
The Choose destination folder dialog that pops up every time I want to create a new class totally annoys me. For me, the only two source paths are my normal sourcepath and my test sourcepath. I never want to create classes in my test path aside from a single SelfTest class in packages with classes which require testing.
What does anyone else think? I had a few ideas:
1. Integrate the choose destination folder listbox into the New Class dialog
2. Make separate New->Class and New->Test Class
I wonder if this dialog bothers anyone else, and if anyone else has any ideas.
Please sign in to leave a comment.
Keith Lea wrote:
>The Choose destination folder dialog ..
>anyone else has any ideas?
>
What would be nice, and would solve this "problem", would be add a way,
in "File Template", to specify the default destination of the new file.
The best location for a new "build.xml" won't be the same as for a new
"todo.txt" files, of "index.html"
I'd suggest to
- use $macros$,
that could be
- relative to the current editor/file/class/module
(ex: "$thisModuleTestOutputPath$/")
- absolute
(ex: $project$/resource)
In this context, it would make sense to make this info - File Templates
- project related.
Alain
That dialog really hasn't bugged me. Most of the time the source path I
intend (normal vs. test) is initially selected, so it is easy to say "Yep,
that's right; continue" (either via Return or Ctrl-Return; I'm not at work
right now).
WRT to new classes in the test sourcepath, are you really saying that you
only have one test class (SelfTest) per package? If so, I think that may be
atypical.
Kendall
"Keith Lea" <keith@cs.oswego.edu> wrote in message
news:8796733.1076471515544.JavaMail.itn@is.intellij.net...
create a new class totally annoys me. For me, the only two source paths are
my normal sourcepath and my test sourcepath. I never want to create classes
in my test path aside from a single SelfTest class in packages with classes
which require testing.
>
dialog
>
ideas.
Keith Lea wrote:
I like this idea. No need for two seperate dialogs.
dialog
>
>
This sounds nice, integrate it and show it only if multiple options are
available.
Is there a request number already (so I can vote for it :)?
Andrei
Yeah, http://www.intellij.net/tracker/idea/viewSCR?publicId=28450
Pardon my ignorance here, but how are you getting this double dialog? When I create new classes I am already in the directory I want to create it and it gets created there.
Try a new class from the package view, on a package that exists in multiple
source paths (in different modules, for example).
Andrei
"Patrick Burleson" <pbur@yahoo.com> wrote in message
news:27525958.1076527322259.JavaMail.itn@is.intellij.net...
I create new classes I am already in the directory I want to create it and
it gets created there.
Ah, ok. I don't have that issue yet. Mostly because we don't have test cases.
My problem is even worse than that of the author of the post. Something happened with the project settings (I don't know where exactly) and every time I want to create a class "Target destination directory" points to test directory (green marked ...\src\test\...). Every time I need to switch it manually to blue marked ...\src\main\...
Vsevols how exactly do you create a class? Please provide the steps to reproduce this issue.
Serge Baranov
I'm having the same issue as Vsevols. I'd like my IntellJ to remember the destination directory I used recently, or to let me configure it for each sources root independently. Steps to reproduce:
It used to work like I want it in the past. It broke with one of the recent updates. I'd greatly appreciate your help.
Hi Goobar,
Indeed, it used to work differently in the previous versions.
I submitted a new report for this issue to our tracking system: https://youtrack.jetbrains.com/issue/IDEA-302497
Responsible developers will look into it shortly.
Feel free to leave additional comments in the issue. See this article if you are not familiar with YouTrack.
Arina Efremova Thanks!