/** Calls all delegates. */ public Annotation[] findAnnotations(Throwable t) { for (ErrorManager em : delegates) { Annotation[] res = em.findAnnotations(t); if ((res != null) && (res.length > 0)) { return res; } } return new Annotation[0]; }
/** Calls all delegates. */ public Annotation[] findAnnotations(Throwable t) { for (ErrorManager em : delegates) { Annotation[] res = em.findAnnotations(t); if ((res != null) && (res.length > 0)) { return res; } } return new Annotation[0]; }
/** Calls all delegates. */ public Annotation[] findAnnotations(Throwable t) { for (ErrorManager em : delegates) { Annotation[] res = em.findAnnotations(t); if ((res != null) && (res.length > 0)) { return res; } } return new Annotation[0]; }
/** Calls all delegates. */ public Annotation[] findAnnotations(Throwable t) { for (ErrorManager em : delegates) { Annotation[] res = em.findAnnotations(t); if ((res != null) && (res.length > 0)) { return res; } } return new Annotation[0]; }
/** Calls all delegates. */ public Annotation[] findAnnotations (Throwable t) { for (Iterator i = delegates.iterator(); i.hasNext(); ) { ErrorManager em = (ErrorManager)i.next(); Annotation[] res = em.findAnnotations(t); if ((res != null) && (res.length > 0)) { return res; } } return new Annotation[0]; }
/** Calls all delegates. */ public Annotation[] findAnnotations (Throwable t) { for (Iterator i = delegates.iterator(); i.hasNext(); ) { ErrorManager em = (ErrorManager)i.next(); Annotation[] res = em.findAnnotations(t); if ((res != null) && (res.length > 0)) { return res; } } return new Annotation[0]; }
/** Processes <code>Throwable</code> thrown from <code>setAsText</code> * or <code>setValue</code> call on <code>editor</code>. Helper method. */ private static void processThrowable(Throwable throwable, String title, Object newValue) { //Copied from old PropertyPanel impl if(throwable instanceof ThreadDeath) { throw (ThreadDeath)throwable; } ErrorManager em = ErrorManager.getDefault(); ErrorManager.Annotation[] anns = em.findAnnotations(throwable); if (((anns == null) || (anns.length==0)) && (throwable.getLocalizedMessage() != throwable.getMessage())) { //XXX See issue 34569 String msg = MessageFormat.format(NbBundle.getMessage(PropUtils.class, "FMT_ErrorSettingProperty"), new Object[] {newValue, title}); //NOI18N em.annotate(throwable, ErrorManager.USER, msg, throwable.getLocalizedMessage(), throwable, new java.util.Date()); } else if (throwable instanceof NumberFormatException) { //Handle NFE's from the core sun.beans property editors w/o raising stack traces em.annotate(throwable, ErrorManager.USER, throwable.getMessage(), MessageFormat.format(NbBundle.getMessage ( PropUtils.class, "FMT_BAD_NUMBER_FORMAT"), //NOI18N new Object[]{newValue}), null, null); } em.notify(throwable); }
/** Processes <code>Throwable</code> thrown from <code>setAsText</code> * or <code>setValue</code> call on <code>editor</code>. Helper method. */ private static void processThrowable(Throwable throwable, String title, Object newValue) { //Copied from old PropertyPanel impl if(throwable instanceof ThreadDeath) { throw (ThreadDeath)throwable; } ErrorManager em = ErrorManager.getDefault(); ErrorManager.Annotation[] anns = em.findAnnotations(throwable); if (((anns == null) || (anns.length==0)) && (throwable.getLocalizedMessage() != throwable.getMessage())) { //XXX See issue 34569 String msg = MessageFormat.format(NbBundle.getMessage(PropUtils.class, "FMT_ErrorSettingProperty"), new Object[] {newValue, title}); //NOI18N em.annotate(throwable, ErrorManager.USER, msg, throwable.getLocalizedMessage(), throwable, new java.util.Date()); } else if (throwable instanceof NumberFormatException) { //Handle NFE's from the core sun.beans property editors w/o raising stack traces em.annotate(throwable, ErrorManager.USER, throwable.getMessage(), MessageFormat.format(NbBundle.getMessage ( PropUtils.class, "FMT_BAD_NUMBER_FORMAT"), //NOI18N new Object[]{newValue}), null, null); } em.notify(throwable); }
ErrorManager.Annotation[] anns = em.findAnnotations(throwable);
ErrorManager.Annotation[] anns = em.findAnnotations(throwable);
ErrorManager.Annotation[] ann = em.findAnnotations(e);
ErrorManager.Annotation[] ann = em.findAnnotations(e);
ErrorManager.Annotation[] an = em.findAnnotations(e); String userMessage = null; if (an != null) {
ErrorManager.Annotation[] an = em.findAnnotations(e); String userMessage = null; if (an != null) {
ErrorManager.Annotation[] anns = err.findAnnotations(newEx); if (anns == null || anns.length == 0) {
boolean needToAnnotate = true; ErrorManager em = ErrorManager.getDefault (); ErrorManager.Annotation[] ann = em.findAnnotations(exc);
boolean needToAnnotate = true; ErrorManager em = ErrorManager.getDefault (); ErrorManager.Annotation[] ann = em.findAnnotations(exc);
boolean needToAnnotate = true; ErrorManager em = ErrorManager.getDefault (); ErrorManager.Annotation[] ann = em.findAnnotations(exc);
message = e.getLocalizedMessage (); } else { ErrorManager.Annotation[] arr = ErrorManager.getDefault ().findAnnotations (e); if (arr != null) { for (int i = 0; i < arr.length; i++) {
boolean needToAnnotate = true; ErrorManager em = ErrorManager.getDefault (); ErrorManager.Annotation[] ann = em.findAnnotations(exc);