File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes IDEs, Version Control and other tools and the fly likes Disabling classes in eclipse Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » IDEs, Version Control and other tools
Bookmark "Disabling classes in eclipse" Watch "Disabling classes in eclipse" New topic
Author

Disabling classes in eclipse

Tyson Lindner
Ranch Hand

Joined: May 16, 2012
Posts: 172
How do I turn a class off in eclipse? I have bad code in part of my project but I'm trying to run unrelated good code in another part. The bad code has a lot of comments in it so I can't easily just comment it to turn it off. My good code part still runs, I just don't want to see the "error in existing project message" every time, but I still want it there to tell me about errors (just not the errors I know are errors).
Winston Gutkowski
Bartender

Joined: Mar 17, 2011
Posts: 7639
    
  19

Tyson Lindner wrote:How do I turn a class off in eclipse?

By removing it. Or alternatively, moving it.

However, if your project actually runs, why be worried about a few "error in existing project" messages? I get them all the time because I've always got classes 'in the works'.

Unless it actually stops your program from running, my advice: forget it.

Winston

Isn't it funny how there's always time and money enough to do it WRONG?
Articles by Winston can be found here
Tyson Lindner
Ranch Hand

Joined: May 16, 2012
Posts: 172
Winston Gutkowski wrote:
Tyson Lindner wrote:How do I turn a class off in eclipse?

By removing it. Or alternatively, moving it.


Yeah i just created a new project for junk code which seems to solve the problem, but I feel like if there was some sort of switch option it would be a lot easier.
Martin Vajsar
Sheriff

Joined: Aug 22, 2010
Posts: 3610
    
  60

My IDE (Netbeans) has a function for commenting/uncommenting selected lines by placing or removing // in front of them. This always works regardless of any other comments in the selected block of code. I'd expect similar function in nearly any other IDE around.

I don't say this would be good for you, I just react to the "I can't easily just comment it" premise.
Tyson Lindner
Ranch Hand

Joined: May 16, 2012
Posts: 172
Martin Vajsar wrote:My IDE (Netbeans) has a function for commenting/uncommenting selected lines by placing or removing // in front of them. This always works regardless of any other comments in the selected block of code. I'd expect similar function in nearly any other IDE around.

I don't say this would be good for you, I just react to the "I can't easily just comment it" premise.


Yeah that was actually all I was looking for. So I looked a little harder in eclipse and you can just select code and go to source - toggle comments, or just press either ctrl+/ or ctrl+7. Thanks.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Disabling classes in eclipse