• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Disabling classes in eclipse

 
Tyson Lindner
Ranch Hand
Posts: 211
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 10259
59
Eclipse IDE Hibernate Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Tyson Lindner
Ranch Hand
Posts: 211
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 3752
62
Chrome Netbeans IDE Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 211
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic