I'm not a regular IDE user, so I speak out of curiosity. Are these kinds of autocompletion actions subject to reasonably easy plug-in overriding? In other words, if a developer is unhappy with default IDE exception handling, can they provide an alternative without spending an eternity deep in the guts of the IDE itself?
Alexey 2001 Honda CBR600F4i (CCS) 2002 Suzuki Bandit 1200S 1992 Kawasaki EX500 http://azinger.blogspot.com http://bsheet.sourceforge.net http://wcollage.sourceforge.net ________________________________ From: Reinier Zwitserloot <[email protected]> To: The Java Posse <[email protected]> Sent: Fri, June 25, 2010 2:25:29 PM Subject: [The Java Posse] Re: NetBeans code completion for logging I just don't get IDEs. Eclipse does something similar (e.printStackTrace() I believe). This, AND what netbeans does, is completely ridiculous. Almost always the wrong thing. The only obvious thing to do when automatically generating an exception handler, is this: catch (CheckedEx e) { throw new RuntimeException("missing handler", e); } That logger action just lets the process continue, while the state is most likely corrupted. Horrible solution. On Jun 25, 3:44 pm, Wildam Martin <[email protected]> wrote: > Hi folks, > > did not test yet on NetBeans 3.9 (update has to wait until I have more > time), NetBeans 3.8 and earlier do create the following on code > completion for exception handling: > try > { > blablabla... > } > catch (FileNotFoundException ex) > { > Logger.getLogger(Cls.class.getName()).log(Level.SEVERE, null, ex); > } > > It generates the catch block and the Logger.getLogger(...) stuff. > > Now in the last news there was a short quotation of a logging line > that (if I got it right) seemed somehow different. > In much older versions of NetBeans the code completion was different > (I think something like System.out.println(ex);). > While I changed that proposal before, after some time I just accepted > the Logger.getLogger(...) style - as it does the logging correct (and > not just dumps it to console). > > Although I read on the internet that this should be ok, as I heard it > differently (although I don't remember in detail) in the last > newscast, I got unsure. > Is the proposal of NetBeans ok here? > And is it the same way in 3.9? > > Best wishes, > > Martin. > -- > Martin Wildam -- You received this message because you are subscribed to the Google Groups "The Java Posse" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/javaposse?hl=en. -- You received this message because you are subscribed to the Google Groups "The Java Posse" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/javaposse?hl=en.
