Copy paste code directly in Eclipse

Recently learned a really cool trick for copy-pasting code in Eclipse.

Lets say you have the following code:

package com.veerasundar.demo;

public class CopyCode {
	private int nothing;
}

Now copy the above code, go to any Eclipse project and right click on source folder and paste. See what happens! Impressive isn't it!?

Here's what Eclipse did: it parsed the clipboard, found that there's a Java code in it, create the necessary package structure for the code to fit in and then copied the code there.

Neat!

Chat with the Author

This post was written by Veera, a software developer by profession and a maker by passion.

You will be taken to twitter.com where you can edit the tweet before posting.

If you liked my writing, you may like my products