Please use the Apache issue tracking system for new NetBeans issues (https://issues.apache.org/jira/projects/NETBEANS0/issues) !!
View | Details | Raw Unified | Return to bug 20872 | Differences between
and this patch

Collapse All | Expand All

(-)openide/src/org/openide/explorer/propertysheet/PropertyPanel.java (-12 / +23 lines)
 Lines 823-829    Link Here 
823
            ErrorManager.getDefault().annotate( e,
823
            ErrorManager.getDefault().annotate( e,
824
                    getString("PS_ExcIn") +
824
                    getString("PS_ExcIn") +
825
                    " " + editor.getClass ().getName () + // NOI18N
825
                    " " + editor.getClass ().getName () + // NOI18N
826
                    " " + getString ("PS_Editor") + "."
826
                    " " + getString ("PS_Editor") + "." // NOI18N
827
            );
827
            );
828
            c = getTextView(getExceptionString(e));
828
            c = getTextView(getExceptionString(e));
829
        }
829
        }
 Lines 1112-1118    Link Here 
1112
            return getString("CTL_NoPropertyEditor");
1112
            return getString("CTL_NoPropertyEditor");
1113
        }
1113
        }
1114
        if (clazz.isArray()) {
1114
        if (clazz.isArray()) {
1115
            return "[" + getString ("PS_ArrayOf") +" " +
1115
            return "[" + getString ("PS_ArrayOf") +" " + // NOI18N
1116
                   getTypeString(clazz.getComponentType()) + "]"; // NOI18N
1116
                   getTypeString(clazz.getComponentType()) + "]"; // NOI18N
1117
        }
1117
        }
1118
        return "[" + clazz.getName() + "]"; // NOI18N
1118
        return "[" + clazz.getName() + "]"; // NOI18N
 Lines 1145-1151    Link Here 
1145
        }
1145
        }
1146
1146
1147
        if (existsCustomEditor) {
1147
        if (existsCustomEditor) {
1148
            panel.add(getCustomizeButton(), BorderLayout.EAST); // NOI18N
1148
            panel.add(getCustomizeButton(), BorderLayout.EAST);
1149
        }
1149
        }
1150
        
1150
        
1151
        panel.setToolTipText(getPanelToolTipText());
1151
        panel.setToolTipText(getPanelToolTipText());
 Lines 1189-1210    Link Here 
1189
     * <code>setAsText</code> or <code>setValue</code> call 
1189
     * <code>setAsText</code> or <code>setValue</code> call 
1190
     * on <code>editor</code>. Helper method. */
1190
     * on <code>editor</code>. Helper method. */
1191
    private void notifyExceptionWhileSettingProperty(Exception iae) {
1191
    private void notifyExceptionWhileSettingProperty(Exception iae) {
1192
        if (getPreferences () == 0){
1193
            PropertyPanel.notifyUser (iae, descriptor.getDisplayName ());
1194
        } else {
1195
            ErrorManager.getDefault ().notify (ErrorManager.INFORMATIONAL, iae);
1196
        }
1197
    }
1198
1199
    /** Processes <code>Exception</code> thrown from 
1200
     * <code>setAsText</code> or <code>setValue</code> call 
1201
     * on <code>editor</code>. Helper method. */
1202
    static void notifyUser(Exception iae, String propertyName) {
1192
        
1203
        
1193
        String userMessage = extractLocalizedMessage(iae);
1204
        String userMessage = extractLocalizedMessage (iae);
1194
        
1205
        
1195
        if ((userMessage == null) && (iae instanceof InvocationTargetException)) {
1206
        if ((userMessage == null) && (iae instanceof InvocationTargetException)) {
1196
            userMessage = extractLocalizedMessage(
1207
            userMessage = extractLocalizedMessage(
1197
                ((InvocationTargetException)iae).getTargetException());
1208
                ((InvocationTargetException)iae).getTargetException());
1198
        }
1209
        }
1199
        ErrorManager em = ErrorManager.getDefault();
1210
        ErrorManager em = ErrorManager.getDefault ();
1200
        if ((userMessage != null) && (getPreferences() == 0)){
1211
        if ((userMessage != null)){
1201
            em.annotate(iae, NbBundle.getMessage(PropertyPanel.class,
1212
            em.annotate (iae, NbBundle.getMessage(PropertyPanel.class,
1202
		    "FMT_ErrorSettingProperty", userMessage,
1213
		    "FMT_ErrorSettingProperty", userMessage,
1203
		    descriptor.getDisplayName()
1214
		    propertyName
1204
            ));
1215
            ));
1205
            em.notify(ErrorManager.USER, iae);
1216
            em.notify (ErrorManager.USER, iae);
1206
        } else {
1217
        } else {
1207
            em.notify(ErrorManager.INFORMATIONAL, iae);
1218
            em.notify (ErrorManager.INFORMATIONAL, iae);
1208
        }
1219
        }
1209
    }
1220
    }
1210
1221
 Lines 1988-1998    Link Here 
1988
                int j = 0;
1999
                int j = 0;
1989
                if (model instanceof ExPropertyModel) {
2000
                if (model instanceof ExPropertyModel) {
1990
                    Object[] beans = ((ExPropertyModel)model).getBeans();
2001
                    Object[] beans = ((ExPropertyModel)model).getBeans();
1991
                    String delimiter = getString("ACSD_BeanListDelimiter");
2002
                    String delimiter = getString("ACSD_BeanListDelimiter"); // NOI18N
1992
                    for (int i = 0; i < beans.length; i++) {
2003
                    for (int i = 0; i < beans.length; i++) {
1993
                        if (beans[i] instanceof Node) {
2004
                        if (beans[i] instanceof Node) {
1994
                            Node n = ((Node)beans[i]);
2005
                            Node n = ((Node)beans[i]);
1995
                            beansList = ((beansList == null) ? "" : beansList + delimiter) + n.getDisplayName();
2006
                            beansList = ((beansList == null) ? "" : beansList + delimiter) + n.getDisplayName(); // NOI18N
1996
                            j++;
2007
                            j++;
1997
                        }
2008
                        }
1998
                    }
2009
                    }
(-)openide/src/org/openide/explorer/propertysheet/PropertyDialogManager.java (-26 / +10 lines)
 Lines 275-300    Link Here 
275
                                component).getPropertyValue();
275
                                component).getPropertyValue();
276
                            model.setValue(newValue);
276
                            model.setValue(newValue);
277
                        } catch (java.lang.reflect.InvocationTargetException ite) {
277
                        } catch (java.lang.reflect.InvocationTargetException ite) {
278
                            if (ite.getTargetException() != null) {
278
                            PropertyPanel.notifyUser (ite, prop==null?"":prop.getDisplayName ()); // NOI18N
279
                                PropertyDialogManager.notify(ite.getTargetException());
280
                            } else {
281
                                PropertyDialogManager.notify(ite);
282
                            }
283
                        } catch (IllegalStateException ise) {
279
                        } catch (IllegalStateException ise) {
284
                            notifyUser(ise);
280
                            notifyUser (ise);
285
                        }
281
                        }
286
                    }
282
                    }
287
                    else if ((env!=null)&&(!env.isChangeImmediate())) {
283
                    else if ((env!=null)&&(!env.isChangeImmediate())) {
288
                        try {
284
                        try {
289
                            model.setValue(lastValueFromEditor);
285
                            model.setValue(lastValueFromEditor);
290
                        } catch (java.lang.reflect.InvocationTargetException ite) {
286
                        } catch (java.lang.reflect.InvocationTargetException ite) {
291
                            if (ite.getTargetException() != null) {
287
                            PropertyPanel.notifyUser (ite, prop==null?"":prop.getDisplayName ()); // NOI18N
292
                                PropertyDialogManager.notify(ite.getTargetException());
293
                            } else {
294
                                PropertyDialogManager.notify(ite);
295
                            }
296
                        } catch (IllegalStateException ise) {
288
                        } catch (IllegalStateException ise) {
297
                            notifyUser(ise);
289
                            notifyUser (ise);
298
                        }
290
                        }
299
                    }
291
                    }
300
                }
292
                }
 Lines 382-390    Link Here 
382
                try {
374
                try {
383
                    prop.restoreDefaultValue();
375
                    prop.restoreDefaultValue();
384
                } catch (IllegalAccessException iae) {
376
                } catch (IllegalAccessException iae) {
385
                    notify(iae);
377
                    PropertyPanel.notifyUser (iae, prop.getDisplayName ());
386
                } catch (java.lang.reflect.InvocationTargetException ite) {
378
                } catch (java.lang.reflect.InvocationTargetException ite) {
387
                    notify(ite);
379
                    PropertyPanel.notifyUser (ite, prop.getDisplayName ());
388
                }
380
                }
389
            }
381
            }
390
        }
382
        }
 Lines 402-415    Link Here 
402
                        component).getPropertyValue();
394
                        component).getPropertyValue();
403
                    model.setValue(newValue);
395
                    model.setValue(newValue);
404
                } catch (java.lang.reflect.InvocationTargetException ite) {
396
                } catch (java.lang.reflect.InvocationTargetException ite) {
405
                    if (ite.getTargetException() != null) {
397
                    PropertyPanel.notifyUser (ite, prop==null?"":prop.getDisplayName ()); // NOI18N
406
                        notify(ite.getTargetException());
407
                    } else {
408
                        notify(ite);
409
                    }
410
                    return;
398
                    return;
411
                } catch (IllegalStateException ise) {
399
                } catch (IllegalStateException ise) {
412
                    notifyUser(ise);
400
                    notifyUser (ise);
413
                    return;
401
                    return;
414
                }
402
                }
415
            }
403
            }
 Lines 417-430    Link Here 
417
                try {
405
                try {
418
                    model.setValue(lastValueFromEditor);
406
                    model.setValue(lastValueFromEditor);
419
                } catch (java.lang.reflect.InvocationTargetException ite) {
407
                } catch (java.lang.reflect.InvocationTargetException ite) {
420
                    if (ite.getTargetException() != null) {
408
                    PropertyPanel.notifyUser (ite, prop==null?"":prop.getDisplayName ()); // NOI18N
421
                        notify(ite.getTargetException());
422
                    } else {
423
                        notify(ite);
424
                    }
425
                    return;
409
                    return;
426
                } catch (IllegalStateException ise) {
410
                } catch (IllegalStateException ise) {
427
                    notifyUser(ise);
411
                    notifyUser (ise);
428
                    return;
412
                    return;
429
                }
413
                }
430
            }
414
            }

Return to bug 20872
By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo