I can not seem to find a way to do this? I have a file named X in some folder, I want to create Y with the same contents in the same directory. The way I do in eclipse is to select the file and ^C, ^P, eclipse prompts for the new name.
UPDATE
Apparently this problem only occurs if compilation unit contains more than one type.
Go to the location of the document you want to duplicate. Right-click the file, and click Open as copy. A new file opens and is named Copy of Document, Document 2, or similar. In the new file that opens, click the File tab, then click Save As.
You can either right-click the file and select Copy, then right-click the folder and select Paste.... Or you can start dragging the file, hold down the shift key, the arrow cursor will get a little + on it to indicate you're making a copy, and drop it in the same folder.
Pressing Function key+F5 will duplicate selected file, which will prompt you to enter a name.
You will be prompted for a new name.
Works for classes too:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With