I need to copy some sections of source code from a pdf-file to a java project using eclipse neon.
Let me give you a quick example of the problem. I have code which looks like the following in the pdf:
import java.sql.Timestamp;
import twitter4j.FilterQuery;
import twitter4j.Status;
import twitter4j.StatusAdapter;
import twitter4j.StatusDeletionNotice;
import twitter4j.StatusListener;
import twitter4j.TwitterException;
import twitter4j.TwitterStream;
import twitter4j.TwitterStreamFactory;
public final class PrintSampleStream extends StatusAdapter {
public static void main(String[] args) throws TwitterException{
...
But in the workspace it is shown like this:
import java.sql.Timestamp; import twitter4j.FilterQuery; import twitter4j.Status; import twitter4j.StatusAdapter; import twitter4j.StatusDeletionNotice; import twitter4j.StatusListener; import twitter4j.TwitterException; import twitter4j.TwitterStream; import twitter4j.TwitterStreamFactory; public final class PrintSampleStream extends StatusAdapter { public static void main(String[] args) throws TwitterException{
How can i format the code and make it readable? Because formatting the code by hand would take too long.
Thanks for any ideas
P.S. CTRL + Shift +F doesn't help