Index: src/org/openide/explorer/view/TreeViewCellEditor.java =================================================================== RCS file: /cvs/openide/src/org/openide/explorer/view/TreeViewCellEditor.java,v retrieving revision 1.31 diff -u -r1.31 TreeViewCellEditor.java --- src/org/openide/explorer/view/TreeViewCellEditor.java 22 Mar 2002 17:58:35 -0000 1.31 +++ src/org/openide/explorer/view/TreeViewCellEditor.java 9 May 2002 15:01:00 -0000 @@ -93,7 +93,7 @@ em.annotate(exc, msg); } - em.notify(exc); + em.notify(ErrorManager.USER, exc); } } } Index: src/org/openide/loaders/Bundle.properties =================================================================== RCS file: /cvs/openide/src/org/openide/loaders/Bundle.properties,v retrieving revision 1.82 diff -u -r1.82 Bundle.properties --- src/org/openide/loaders/Bundle.properties 15 Apr 2002 15:24:58 -0000 1.82 +++ src/org/openide/loaders/Bundle.properties 9 May 2002 15:01:00 -0000 @@ -221,4 +221,4 @@ LBL_loader_display_name=Loader MSG_renameError=This object cannot be renamed from {0} to {1}. - +MSG_NotValidName=Cannot give {0} an empty name. Index: src/org/openide/loaders/DataObject.java =================================================================== RCS file: /cvs/openide/src/org/openide/loaders/DataObject.java,v retrieving revision 1.71 diff -u -r1.71 DataObject.java --- src/org/openide/loaders/DataObject.java 12 Apr 2002 13:16:31 -0000 1.71 +++ src/org/openide/loaders/DataObject.java 9 May 2002 15:01:00 -0000 @@ -22,6 +22,7 @@ import java.beans.*; import java.io.*; import java.lang.reflect.InvocationTargetException; +import java.text.MessageFormat; import java.util.Enumeration; import java.util.Set; import java.util.HashSet; @@ -551,6 +552,13 @@ * @exception IOException if an error occurs */ public final void rename (final String name) throws IOException { + if (name != null && name.trim ().length ()==0) { + IllegalArgumentException iae = new IllegalArgumentException (this.getName ()); + String msg = MessageFormat.format (NbBundle.getMessage (DataObject.class, + "MSG_NotValidName"), new String[] {getName ()}); // NOI18N + ErrorManager.getDefault ().annotate (iae, msg); + throw iae; + } String oldName; final FileObject[] files = new FileObject[2]; // [old, new]