Earlier quoted context omitted.
What if that terrorist was launching rockets from that apartment? Would it be justified then? These things aren't black-and-white. I don't want to be the person who says how much collateral damage is okay.
Israel has a proven ability to do precision strikes on apartment buildings that would basically only target the terrorist - we've seen them do this - but they choose to level entire buildings instead. You can probably figure out why they choose that option.
Wars don't end when one side gets yelled at. They either end with diplomacy or victory.