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.

Bug 114179 - hitting delete in favorites should remove the item from favorites, not delete it
Summary: hitting delete in favorites should remove the item from favorites, not delete it
Status: REOPENED
Alias: None
Product: platform
Classification: Unclassified
Component: Favorites (show other bugs)
Version: 6.x
Hardware: All All
: P2 blocker (vote)
Assignee: Ondrej Vrabec
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-08-30 00:17 UTC by jamespb
Modified: 2010-10-07 10:59 UTC (History)
2 users (show)

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description jamespb 2007-08-30 00:17:37 UTC
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.
Comment 1 Milan Kubec 2007-08-30 08:45:22 UTC
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.
Comment 2 Martin Krauskopf 2007-08-30 09:30:27 UTC
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)
Comment 3 Milan Kubec 2007-08-30 09:46:12 UTC
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.
Comment 4 Martin Krauskopf 2007-08-30 10:08:48 UTC
> 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.
Comment 5 Milan Kubec 2007-08-30 10:50:44 UTC
> 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.
Comment 6 Martin Krauskopf 2007-08-30 11:01:27 UTC
> OK, then it must be obvious from the look of the node, that it's special node (created as link)

Yup, sounds good.
Comment 7 jamespb 2007-08-30 15:20:07 UTC
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.
Comment 8 Jesse Glick 2007-08-30 16:35:19 UTC
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.
Comment 9 jrojcek 2007-08-30 16:48:17 UTC
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.