File Drag and Drop UI Specification
Author: Stanislav Aubrecht
$Revision: 1.1.1.1 $
$Date: 2009/10/29 16:49:53 $
Use Cases and Scenarios
Add Files to Project by Mouse Drag & Drop Operations
User wants to add some file(s) to an open project by dragging them from e.g. a file manager application outside the IDE.
Scenario:
- User starts dragging the files from e.g. a file manager application.
- When the files are dragged over the IDE window, the drag cursor will change from the default NoDrop to Drag-Copy depending on which part of the IDE is currently under the cursor.
- When the files are dragged over Projects or Files view the drag operation is accepted only when the cursor is over a folder node which can accept files (e.g. java package node). In such a case the cursor will change to Drag-Copy and the folder node will be highlighted. Otherwise the cursor is NoDrop.
- If the dragged files are dropped to a folder node that can accept files, the files are copied into that folder.
- If the dropped files are Java source files and the folder node is a Java package node then the appropriate refactoring will take place as a background task to change package names inside the dropped files (same as when moving Java files withing the IDE).
- The original dropped files remain intact in their source location so it is not possible to accidentaly move files to any project folder.
- If the files or any other dragged objects are dropped to a node which cannot accept them then nothing happens and the dragging is finished.
Add Files to Project Using Copy & Paste Operations
User wants to add some file(s) to an open project using Copy & Paste operations via the system clipboard.
Scenario:
- Users selects the files in e.g. file manager and invokes the Copy action (either in file manager's menu or Ctrl+C shortcut).
- User switches back to the IDE and navigates to the folder where the files will be copied to.
- User invokes Paste action - either from the main menu or from folder's popup menu or using Ctrl+V shortcut.
- The files are copied to the selected folder. If the files are Java source files and the folder node is a Java package node then the appropriate refactoring will take place as a background task to change package names inside the copied files (same as when copying Java files withing the IDE).
- The original files remain intact.
- If the selected node cannot accept the files (e.g. it is not a file folder) then the Paste action is disabled.
Move Files to Project Using Cut & Paste Operations
User wants to move some file(s) to an open project using Cut & Paste operations via the system clipboard.
Scenario:
- Users selects the files in e.g. file manager and invokes the Cut action (either in file manager's menu or Ctrl+X shortcut).
- User switches back to the IDE and navigates to the folder where the files will be moved to.
- User invokes Paste action - either from the main menu or from folder's popup menu or using Ctrl+V shortcut.
- The files are moved to the selected folder. If the files are Java source files and the folder node is a Java package node then the appropriate refactoring will take place as a background task to change package names inside the moved files (same as when moving Java files withing the IDE).
- The original files are deleted.
- If the selected node cannot accept the files (e.g. it is not a file folder) then the Paste action is disabled.
Open an Arbitrary File in Editor Using Drag & Drop Operations
User wants to open some file(s) in the editor using drag and drop operation, for example to check the contents of a Java file received in an email.
Scenario:
- User starts dragging the files he/she wants to open.
- When the cursor is over the editor area (i.e. editor window + editor toolbar + editor tabs) the cursor will change to Drag-Copy.
- When the files are dropped into the editor area then the files are opened in new editor tabs in the same way is file menu action File - Open File was used.
Copy or Move a File to a Folder in Some File Manager Application Using Drag & Drop Operations
User wants to copy or move some file from Projects view or from Files view or from Favorites view to some other folder in a some file manager-like application using mouse drag and drop operations.
Scenario:
- User starts dragging the selected file in one of IDE views (Projects, Files or Favorites).
- User drops the file to a folder in a file manager application that supports this type of drag and drop operations.
- Depending on the drag modified (Drag-Move or Drag-Copy) the file is either moved to the selected folder or copied to the selected folder.
- The same applies to folder dragged from the IDE to a file manager applications.
Copy or Move a File to a Folder in Some File Manager Application Using Copy & Paste Operations
User wants to copy or move some file from Projects view or from Files view or from Favorites view to some other folder in a some file manager-like application using Copy and Paste operations.
Scenario:
- User selects the file(s) in one of IDE views (Projects, Files or Favorites).
- User invokes the Copy or Cut action using either keyboard shortcut or using the main menu or popup menu.
- User switches to file manager operation and invokes Paste operation.
- Depending on whether Copy or Paste action was invoked the file(s) is either copied to the selected folder or moved to the selected folder.
- The same applies to folders.
Specification
There are no changes to the current UI, no new menus, no new windows/dialogs, no new actions. When a file is being dragged over the IDE window the mouse cursor will be the OS platform default cursor for the current operation (Drag-Copy/Drag-Move/No-Drag).