Not saying I would ever need this but how do you comment out an entire class after something like:
public class yadayada extends yadayadasquared {
/**
* Says Hello
**/
public String sayHello() {
return "Hello";
}
}
When there are nicely commented / documented methods within the class?
Let's imagine that it's for only for five minutes to avoid having the whole fork discussion....
And yes, you durned purists, I saw this!
https://stackoverflow.com/questions/123423/do-you-leave-historical-code-commented-out-in-classes-that-you-update
Let's assume this is for a 5 minute test. Repo work for that? Nope. Delete? Love the control-slash suggestion.
Define "entire class".
Select the class's contents, hit Command+/*, and your IDE should single-line comment everything. This way you still have the class available, just without functionality. Or select the entire class. Or rename the file. Or... but ultimately, what's the point? Delete the file.
* Or whatever your IDE's sequence for single-line commenting is.
if using an ide: one can do "ctrl + a", and then do "ctrl + shift + /", and that will comment out all of the code.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With