• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Disabling classes in eclipse

 
Ranch Hand
Posts: 211
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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).
 
Bartender
Posts: 10780
71
Hibernate Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Sheriff
Posts: 3837
66
Netbeans IDE Oracle Firefox Browser
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
reply
    Bookmark Topic Watch Topic
  • New Topic