Is it possible to compile just one file, seems to parse many others.........
Hi-
I'm currently evaluating IntelliJ and so far love it. I do however find it frustrating that when I try to compile one file it Loads/Parses about 300 others.
Anyway to just compile the single file? I'm using jikes.
Thanks!
Dave
Please sign in to leave a comment.
f9 or choose compile ]]> from the build menu
Note, however, that if the file being compiled depends on other files, the compiler will pick them also.
--
Best regards,
Eugene Zhuravlev
JetBrains, Inc, http://www.intellij.com
"Develop with pleasure!"
"charles decroes" <spam@decroes.com> wrote in message news:4590796.1042039357185.JavaMail.jrun@is.intellij.net...
>
That's what I'm finding, when using NetBeans I was able to just compile the one file and liked that feature. If I have just rebuilt the entire project and know that everything is up to date it's frustrating to do the dependency check every time.
Dave
This is javac that does dependency check in this case, not IDEA.
In your original post you probably meant "compile only modified files and those that depend on them". Then you should use ctrl-F9
(make).
In fact, there are 3 types of compilation:
1. Rebuild Project - rebuilds everything from the scratch
2. Make Project - compile only modified with dependencies -
3. Compile particular file/package/set of files -
--
Best regards,
Eugene Zhuravlev
JetBrains, Inc, http://www.intellij.com
"Develop with pleasure!"
"Dave Brown" <jiveadmin@jetbrains.com> wrote in message news:2998631.1042044170870.JavaMail.jrun@is.intellij.net...
rebuilt the entire project and know that everything is up to date it's frustrating to do the dependency check every time.
>
Actually, I was just referring to a single file.
I did however track down the problem, due to my companies initial setup of compiling the class files to the source directory. When using jikes for some reason if the out path and source directory were that same IntelliJ would always reparse the source files. When I changed the out and src dirs to be different it worked fine.
Dave
Eugene Zhuravlev wrote:
There is another problem with Make Project. If two class files share a single source file,
the second file always is considered modified.
IMO in this case Idea should try to figure the source file for the file and compare the
timestamps like it does for the normal classes.
Regards,
Dimiter
I'm not sure I understood your problem. We are talking about modified source files, not class files.
--
Best regards,
Eugene Zhuravlev
JetBrains, Inc, http://www.intellij.com
"Develop with pleasure!"
"dimiter" <dimiter@blue-edge.bg> wrote in message news:avjggv$15p$1@is.intellij.net...
>
>
>
>
Eugene Zhuravlev wrote:
This is another problem, but I found it somewhat related to the subject.
When you Make Project, IDEA scans the list of source files and compares the timestamps
with the timestamps of the class files. (or at least I assume so)
In our source tree there is situation where several classes are defined in a single source
file. Every time when I try to Make Project, IDEA recompiles these classes even though
nothing has changed.
I.e. it possible to compile just one file, seems to parse many others...
Win2k, single source tree, compile to sources
regards,
Dimiter
No it does not. Comparing source file timestamps to the class file timestamps would be incorrect.
IDEA compares the timestamp of the source file to the saved timestamp of that file. If the timestamps differ, the source file is
considered to be modified.
If the source is modified, it should be recompiled. If the file being compiled contains declarations for several classes, all of
them will be recompiled - this is simply how javac or jikes work.
Are you sure the timestamp of the source file is not changed?
--
Best regards,
Eugene Zhuravlev
JetBrains, Inc, http://www.intellij.com
"Develop with pleasure!"
Eugene Zhuravlev wrote:
>>In our source tree there is situation where several classes are defined in a single source
>>file. Every time when I try to Make Project, IDEA recompiles these classes even though
>>nothing has changed.
Yes, I'm sure. Though I can't tell you why does it happen.
I tried to create sample project, but it works there, though for our production procect on
each Make Project IDEA consistently recompiles 43 classes in 10 files.
This happens even if I hit Make Project two times in a row.
-- dimiter
production procect on
One time it happened to me, the sources being compiled where in the wrong
dir.
For example: package a.b.c in dir a.b.d.
Idea seemed not to like this.
Yep, this was the case for Dimiter also: we found this out in a private conversation.
--
Best regards,
Eugene Zhuravlev
JetBrains, Inc, http://www.intellij.com
"Develop with pleasure!"
"Carlos Costa e Silva" <carlos@keysoft.pt> wrote in message news:avut52$r80$1@is.intellij.net...
>
>
>
>
>
Try to get some life in a really old thread here :)
I have one question regaring the different ways of compiling . The Make Projekt is nice but I'd like a option to Make a specific class. This should mean that it compiles one particular class and all classes dependent from that one. Today when I use Make Project I also have to wait for compiling all classes in the project my coworkers have changed in othereplaces in the package structure and this is not always a nice thing. Is this possible?
/H
It's possible to invoke make on the whole project or on a module. "compile" (ctrl-shift-F9) invokes compiler only on the files that
were explicitly selected. See previous threads in this group discussing this behaviour.
--
Best regards,
Eugene Zhuravlev
Software Developer
JetBrains Inc.
http://www.jetbrains.com
"Develop with pleasure!"
"Humpe" <no_mail@jetbrains.com> wrote in message news:4692617.1081950878837.JavaMail.javamailuser@localhost...
>
class. This should mean that it compiles one particular class and all classes dependent from that one. Today when I use Make Project
I also have to wait for compiling all classes in the project my coworkers have changed in othereplaces in the package structure and
this is not always a nice thing. Is this possible?
>