Feature request : Compile with errors

Hi,
I am long time eclipse user and have been trying out the Idea 6 beta.

I like the integrated eclipse compiler and background compiling but i miss one feature which i really love in eclipse.

Eclipse allows you to run java files even if the project has errors. It converts these errors into runtime errors.

This is extremely useful in the sense that say I have 4 classes and 3 of them are complete. However I am still working on the 4th one and it has errors in it. Now if I want to run and test the rest of the 3 classes I can do so in Eclipse but I cant do the same in Intellij.

It would be great if you could add this feature to Intellj too.

11 comments
Comment actions Permalink

seems like nobody is interested.

0
Comment actions Permalink

Would occasionaly be handy.
The place to add such request is JetBrains's Jira:
http://www.jetbrains.net/jira/browse/IDEA
This has been discussed before, but I haven't found a Jira issue, so go ahead and add it.
Currently Idea is approaching release candidate status, so I doubt there's any chance of this for Idea 6.0.
Also Idea is working with any standard compiler of your choice, so that it may not be possible at all to implement.

0
Comment actions Permalink

You could use 'exclude from compile' to achieve this.

Prashant Deva wrote:

Hi,
I am long time eclipse user and have been trying out the Idea 6 beta.

I like the integrated eclipse compiler and background compiling but i miss one feature which i really love in eclipse.

Eclipse allows you to run java files even if the project has errors. It converts these errors into runtime errors.

This is extremely useful in the sense that say I have 4 classes and 3 of them are complete. However I am still working on the 4th one and it has errors in it. Now if I want to run and test the rest of the 3 classes I can do so in Eclipse but I cant do the same in Intellij.

It would be great if you could add this feature to Intellj too.


--
Martin Fuhrer
Fuhrer Engineering AG
http://www.fuhrer.com

0
Comment actions Permalink

>You could use 'exclude from compile' to achieve this.

What if I am creating a new class and i want to test some of its methods, while other methods are incomplete and have errors?

Also having a 'compile with errors' feature we dont need to explicitly specify exclude from compile and later include it. The user can anyway see if the project has errors just by looking at the tre in the Project view.

0
Comment actions Permalink

This is already possible with Demetra. Go to Settings > Compiler, use the Eclipse compiler and specify "-proceedOnError" as a command line parameter.

Bas

0
Comment actions Permalink

I tried this on the IDEA 6 beta and it still doesnt work.

0
Comment actions Permalink

Well it works for me. Class files are generated on compile even if the source files contain errors. Perhaps you could provide a little bit more information about what you excepted would happen and what the actual result was.

Bas

0
Comment actions Permalink

Well, here is the situation. I need to run a test. The test files are in one specific package of my project. One other package (not being tested) has a class with errors in it. Lets call this class A. I need to run the tests and not care about class A since it is not being tested.

I followeed your suggestion and added the arg for the eclipse compiler.
Now i clicked on run to run the test, but the Make window pops up showing the compilation errors in class A and the test does not run.
Could you tell me how to go ahead with running the test even with the error in class A being there and without going through the whole 'exclude from compilation' thingy?

0
Comment actions Permalink

Edit the Run/Debug Configuration and disable Make before launch.

Bas

0
Comment actions Permalink

I'm shamelessly bumping this thread as it should be a fairly quick fix to add this feature.
http://youtrack.jetbrains.net/issue/IDEA-60936

0
Comment actions Permalink

I just tried that. The problem is that then changes are not compiled at all until Make Project is invoked.That's not really a solution because even intended changes are not included. Eclipse allows you to run an application from your workspace even if there are errors. It will fail on runtime when you invoke functionality that relies on a broken class. That is sufficient most of the time because it allows you to try out some specific things without fixing all the errors.

0

Please sign in to leave a comment.