Community
Participate
Working Groups
Happens frequently to me: 1.) Copy and existing file 2.) Start editing in the open editor 3.) Realize that the "old" file is still open -> curse and until the changes and open the copied file. If the user copies a file, it is very likely that he wants to work on the copy. I suggest we open the copied file in the editor area and give it focus.
The copied file can be huge or the copy has nothing to do with editing itself. If we want to implement something like this, we should ask user after copy "Do you want to open the copied file?"
I agree with Andrey that this shouldn't happen automatically.
For reference, if I copy a file in IntelliJ, it gets opened automatically and the editor gets focus.
Created attachment 267927 [details] Screenshot (In reply to Lars Vogel from comment #3) > For reference, if I copy a file in IntelliJ, it gets opened automatically > and the editor gets focus. Actually IntelliJ has a flag for this on its copy dialog. "Open copy in editor". See screenshot.
I think this needs to be done in the JDT UI repo as the refactoring tools are located here. Adding Noopur. @Noopur, could you give advice how this could fit into the refactoring infrastructure.
This should be applicable to copy/paste of a single file. And it should be consistent in Platform and JDT. We can probably add a preference for that. See org.eclipse.ui.actions.CopyFilesAndFoldersOperation for Platform and org.eclipse.jdt.internal.corext.refactoring.reorg.ReorgPolicyFactory.CopyFilesFoldersAndCusPolicy for JDT.