Community
Participate
Working Groups
It should be possible to use the cut operation on a file in the project explorer.
This bug seems complicated. I put the results of a quick analysis. Hope this helps: The "Cut" action is not present nor Project Explorer, neither in Package Explorer, at least in Eclipse 4.6, 4.5.2, and 3.8. To model the Cut action we will need to combine a Copy + Delete(callback), where: - "Cut" is equivalent to copy until we complete the paste operation successfully. - "Paste" should be seen as an atomic operation, integrating the O.S.-Paste with a callback to Eclipse-Delete. (1) One of the challenges is we have to get notified by the O.S. when the user "paste" the content, and if the "OS-paste" complete successfully, we have to return the control to eclipse, to trigger the "Atomic" delete of the resource on Navigator. - Honestly, I don't know if this is feasible. At line 134 of CopyAction (org.eclipse.ui.internal.navigator.resources.actions), we can read the clipboard does not support callbacks. Any suggestion here would be useful (2) Another challenge is related to the nature of the Copy command, which is implemented by many different commands, depending on the nature of the project. E.g., if you copy a file from a General Project, you execute org.eclipse.ui.internal.navigator.resources.actions.CopyAction . Instead, if you copy from a Java Project, you execute org.eclipse.jdt.internal.ui.refactoring.reorg.CopyToClipboardAction However, this second point is a minor obstacle w.r.t. (1). Thread calls suspended when copying from a General Project CopyAction.run() line: 103 CopyAction(BaseSelectionListenerAction).runWithEvent(Event) line: 167 TextActionHandler$CopyActionHandler.runWithEvent(Event) line: 248 ActionHandler.execute(ExecutionEvent) line: 118 E4HandlerProxy.execute(IEclipseContext, Map, Event, IEvaluationContext) line: 90 Thread calls suspended on copying from a Java Project CopyToClipboardAction.run(IStructuredSelection) line: 109 CopyToClipboardAction(SelectionDispatchAction).dispatchRun(ISelection) line: 271 CopyToClipboardAction(SelectionDispatchAction).run() line: 249 CopyToClipboardAction(Action).runWithEvent(Event) line: 473 ActionHandler.execute(ExecutionEvent) line: 118 E4HandlerProxy.execute(IEclipseContext, Map, Event, IEvaluationContext) line: 90
There's a move command that we could reuse. A possibility could be to configure the selected resources on Cut, and to invoke Move using the resources that were cut as source and the selection as target
Putting it on the radar for 4.7, as this is a big usability issue.
I think using a move resources command could do the trick as mentioned by Mickael. Would this be an OK approach to use?
(In reply to Andrew Obuchowicz from comment #4) > I think using a move resources command could do the trick as mentioned by > Mickael. Would this be an OK approach to use? +1