Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » Java Development Tools (JDT) » Pasting indents inappropriately
Pasting indents inappropriately [message #149147] Wed, 17 March 2004 20:22 Go to next message
Macpherson is currently offline MacphersonFriend
Messages: 73
Registered: July 2009
Member
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 08:16 Go to previous messageGo to next message
Tom Hofmann is currently offline Tom HofmannFriend
Messages: 770
Registered: July 2009
Senior Member
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 22:45 Go to previous messageGo to next message
Macpherson is currently offline MacphersonFriend
Messages: 73
Registered: July 2009
Member
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 12:41 Go to previous message
Tom Hofmann is currently offline Tom HofmannFriend
Messages: 770
Registered: July 2009
Senior Member
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: Wed Nov 13 18:09:55 GMT 2024

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

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

Back to the top