Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 380299 - scope of navigator actions with respect to selection
Summary: scope of navigator actions with respect to selection
Status: RESOLVED FIXED
Alias: None
Product: Orion
Classification: ECD
Component: Client (show other bugs)
Version: 0.5   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: 0.5 M2   Edit
Assignee: Susan McCourt CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-05-22 12:07 EDT by Susan McCourt CLA
Modified: 2012-05-23 18:09 EDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Susan McCourt CLA 2012-05-22 12:07:09 EDT
Now that we have a selection model and no inline actions, we need to work out the scope of some toolbar actions.

Specifically, in the navigator we have stuff that applies to the "root" and stuff that applies to the selection.  Szymon had some confusion about the behavior of "new file" and "new folder" in the main toolbar.  Currently those refer to the nav root, but he was expecting to be able to select a folder and create something there.

Likewise, the copy/paste applies to nav root but now one would expect to be able to paste into a selection.

Is the right answer to use the selected folder and otherwise use the root if there is no selected folder?
Comment 1 Susan McCourt CLA 2012-05-23 18:09:39 EDT
(In reply to comment #0)
> Is the right answer to use the selected folder and otherwise use the root if
> there is no selected folder?

This is what I elected to do.
Fixed in http://git.eclipse.org/c/orion/org.eclipse.orion.client.git/commit/?id=a17ebf1553aef13161c1913ae7fc2067c3b67fb8

Szymon's comment was that he wanted it to work just like Eclipse, with respect to honoring the selection for things like "new" or "paste."

The things that make us different than eclipse are:
- Eclipse has no "current folder" that you drill into.  You are always at the workspace scope.  So *only* the selection drives the new or paste operations.   We have a valid root scope since the user can drill into folders as deep as they want.
- Eclipse has a prompt for new, so if you have, say, multiple items selected and say "new" it will use the first selection, but it will show you in the wizard what the parent is going to be and give you a chance to change it.  We just do the creation, so if there is ambiguity in the selection, the user currently doesn't know about it ahead of time.

What I chose to do:
- If a single folder is selected, we use that as the target for new folder, new file, and paste.
- If there is not a single folder selected, we use the navigator root as the target.

The user could still be taken by surprise if they have more than one folder selected, or one or more files, or a mix of folder/files.  In those cases, the actions will apply to the nav root.  Alternatives were:
- always prompt the user for the target if there are any folders selected.  Something like:
Do you want me to 
(*) paste/create into all selected folders  (or into Xxx where Xxx is a single selection)
( ) paste/create into Yyy (where Yyy is the root)
- prompt if there are multiple folders selected but otherwise assume the single selection

We may end up needing a prompt but I wanted to see if we could "just do the expected thing" and have no surprises.  We'll see.