This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

View | Details | Raw Unified | Return to bug 19772
Collapse All | Expand All

(-)src/org/openide/explorer/view/TreeViewCellEditor.java (-1 / +1 lines)
Lines 93-99 Link Here
93
                        em.annotate(exc, msg);
93
                        em.annotate(exc, msg);
94
                    }
94
                    }
95
                        
95
                        
96
                    em.notify(exc);
96
                    em.notify(ErrorManager.USER, exc);
97
                }
97
                }
98
            }
98
            }
99
        }
99
        }
(-)src/org/openide/loaders/Bundle.properties (-1 / +1 lines)
Lines 221-224 Link Here
221
LBL_loader_display_name=Loader
221
LBL_loader_display_name=Loader
222
222
223
MSG_renameError=This object cannot be renamed from {0} to {1}.
223
MSG_renameError=This object cannot be renamed from {0} to {1}.
224
224
MSG_NotValidName=Cannot give {0} an empty name.
(-)src/org/openide/loaders/DataObject.java (+8 lines)
Lines 22-27 Link Here
22
import java.beans.*;
22
import java.beans.*;
23
import java.io.*;
23
import java.io.*;
24
import java.lang.reflect.InvocationTargetException;
24
import java.lang.reflect.InvocationTargetException;
25
import java.text.MessageFormat;
25
import java.util.Enumeration;
26
import java.util.Enumeration;
26
import java.util.Set;
27
import java.util.Set;
27
import java.util.HashSet;
28
import java.util.HashSet;
Lines 551-556 Link Here
551
    * @exception IOException if an error occurs
552
    * @exception IOException if an error occurs
552
    */
553
    */
553
    public final void rename (final String name) throws IOException {
554
    public final void rename (final String name) throws IOException {
555
        if (name != null && name.trim ().length ()==0) {
556
            IllegalArgumentException iae = new IllegalArgumentException (this.getName ());
557
            String msg = MessageFormat.format (NbBundle.getMessage (DataObject.class,
558
                                  "MSG_NotValidName"), new String[] {getName ()}); // NOI18N
559
            ErrorManager.getDefault ().annotate (iae, msg);
560
            throw iae;
561
        }
554
        String oldName;
562
        String oldName;
555
        final FileObject[] files = new FileObject[2]; // [old, new]
563
        final FileObject[] files = new FileObject[2]; // [old, new]
556
        
564
        

Return to bug 19772