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.
I had a directory in favorites. I selected it and hit delete, thinking that would delete it from favorites. I almost hit the 'yes' button before I realized it was asking me if I wanted to delete the files themselves. DEL should just remove it from favorites.
Favorites view is just customizable view over regular filesystem where Delete action does delete of the file. If you want to remove root from Favorites view, please use 'Remove from Favorites' action. Delete on any other place in IDE does just delete and there is no reason why on one particular root it should do something else. It would be just more confusing.
Do not have strong opinion (using Favorites sporadically). But I rather understand it (from the user's POV) that one is creating kind of 'symbolic links' to file system and I also pressed 'Delete' when I first tried to 'remove a link' from the Favorites. In this sense deleting link should not delete the underlaying directory. Just as in Linux/Unix based systems. I would reconsider this, since might be dangerous. IMHO there are not too much users who wants to really delete directory (like your $HOME - which is there by default) from favorites. Jano? (was there before - so rather enhancement)
So it would mean that doing Delete on any root in the Favorites view would remove it from favorites and doing Delete on any sub-node of the same root would really mean delete from disk - doesn't seem to be consistent. User might then think that if delete on root means remove from favorites that it also means the same for any sub-node, which is not the case. Comparing this view with symbolic link is not really correct because symlink is in fact new node on filesystem (and as such it can be deleted without affecting original node), but showing selected folder in some view just shows the same node that is on filesystem just without visual clutter of other folders.
> So it would mean that doing Delete on any root in the Favorites view would remove it from favorites and doing Delete > on any sub-node of the same root would really mean delete from disk - doesn't seem to be consistent. Is consistent for few decades in Linux/Unix. > User might then think that if delete on root means remove from favorites that it also means the same for any sub-node, > which is not the case. I do not thing like 'the user' described above. Might because I'm using Linux and you Windows. That's why I CCed Jano ;) > Comparing this view with symbolic link is not really correct because symlink is in fact new node on filesystem (and as > such it can be deleted without affecting original node), but showing selected folder in some view just shows the same > node that is on filesystem just without visual clutter of other folders. Again it depends. Above seems rather implementer's POV. BTW seems to me that Favorites reads content of $USER_DIR/config/Favorites directory which contains files which contain 'links' (URL) to file system. So also from implementer's POV it seems to be a link :) I just see natural to view root nodes in Favorites as links. If as designed I can live with it.
> Is consistent for few decades in Linux/Unix. Yes, but you are dealing with *new* node that was explicitly created as link and that shows itself as link in 'ls' or in commander. In Favorites view it's not link it's just the same node shown selectively. The action is called 'Add to Favorites' and not 'Create a link in Favorites'. > I just see natural to view root nodes in Favorites as links. OK, then it must be obvious from the look of the node, that it's special node (created as link) and that it behaves in different way than other nodes. It cannot be based on feeling. If we change overall UI of the node we can think about changing Delete action semantics in Favorites view.
> OK, then it must be obvious from the look of the node, that it's special node (created as link) Yup, sounds good.
Giving a favorites window 'rm -rf /a/directory' functionality seems weird. I'd suggest that delete should only remove from favorites, and should just pop up a warning on anything that can't be removed (subdirectories etc). You cannot delete files or direct from the Favorites window unless you do something like an explicit 'delete this file/directory' right-mouse menu option. Or just rename it to something like SelectedFiles. Calling it 'favorites' to me implies that it's something other than just a file viewer.
I would suggest: 1. Root nodes have a "shortcut" badge applied to them, as on Windows. 2. Delete on root nodes removes link, does not touch original folder. 3. Delete on subnodes really deletes them. This would I think be reasonably consistent with both Windows and Unix user interfaces.
I just wanted to write the same as Jesse in his previous comment. If the folder is differentiated (a link badge) then there should be no confusion in Delete key behaving differently. I also agree that Delete on root nodes should just remove from favorites.