Skip to main content



      Home
Home » Language IDEs » Java Development Tools (JDT) » Pasting indents inappropriately
Pasting indents inappropriately [message #149147] Wed, 17 March 2004 15:22 Go to next message
Eclipse UserFriend
What's up with the paste operation? It puts the first line in the correct
position then indents everything else. Any ideas?

TIA,

Rod
Re: Pasting indents inappropriately [message #149593 is a reply to message #149147] Thu, 18 March 2004 03:16 Go to previous messageGo to next message
Eclipse UserFriend
Rod Macpherson wrote:
> What's up with the paste operation? It puts the first line in the correct
> position then indents everything else. Any ideas?

What build? Can you paste an example?

Smart paste just tries to guess the correct indent for the first two
lines and shifts the remaining lines the same amount as the second line.

The idea behind this is to preserve the original formatting, but shift
the pasted code to the indentation level of where you paste.

-tom
Re: Pasting indents inappropriately [message #150177 is a reply to message #149593] Mon, 22 March 2004 17:45 Go to previous messageGo to next message
Eclipse UserFriend
Say I cut this:

private void foo()
{
bar();
}

When pasting this I get the following bogus indents. First line is correct,
subsequents are not.

private void foo()
{
bar();
}
Re: Pasting indents inappropriately [message #151293 is a reply to message #150177] Mon, 29 March 2004 07:41 Go to previous message
Eclipse UserFriend
this works for me - you probably need to set your code formatter
preferences according to your coding style.

-tom

Rod Macpherson wrote:
> Say I cut this:
>
> private void foo()
> {
> bar();
> }
>
> When pasting this I get the following bogus indents. First line is correct,
> subsequents are not.
>
> private void foo()
> {
> bar();
> }
>
>
>
>
Previous Topic:TemplateStore
Next Topic:Loading .class file as resource
Goto Forum:
  


Current Time: Sun Jun 08 01:01:20 EDT 2025

Powered by FUDForum. Page generated in 0.26201 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top