• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Copy/paste issues

 
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
In learning java I'll sometimes (not often) copy code from a web page and paste it into Eclipse so I can test it out.
For example I wanted to copy the code I found here:
http://www.javaworld.com/community/node/8339

In order to test out inner classes and improve my understanding of that feature.
When I copy the code and go to paste it, instead of breaking it apart, line by line, it gives me one very long line.
Is there a way to keep this from happening?
Many thanks.
 
author & internet detective
Posts: 41860
908
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
It works for me copying from Safari into TextEdit on a Mac. What are you copying from/into?
 
Bartender
Posts: 4179
22
IntelliJ IDE Python Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
It is probably a side effect of either your browser on the way you are copying (example selecting bits of HTML that confuses the IDE). You can try CTRL+SHIFT+F in Eclipse to let it format the code for you. Should prevent the need to worry about the copy/paste problem.
 
Charles Angemeyer
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Ctrl-Shift-F worked great. Thank you very much.
(I'm using a Windows machine).
 
Marshal
Posts: 79177
377
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
It should work the same on a *nix machine or a Mac.
I think this discussion would fit better in our IDEs forum: moving.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic