Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 183875 Details for
Bug 330556
[typing] Indentation is messed up on paste
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read
this important communication.
[patch]
Patch
330556 (text/plain), 2.19 KB, created by
Rajesh
on 2010-11-25 13:32:36 EST
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Rajesh
Created:
2010-11-25 13:32:36 EST
Size:
2.19 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.jdt.ui >Index: ui/org/eclipse/jdt/internal/ui/text/java/JavaAutoIndentStrategy.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/java/JavaAutoIndentStrategy.java,v >retrieving revision 1.123 >diff -u -r1.123 JavaAutoIndentStrategy.java >--- ui/org/eclipse/jdt/internal/ui/text/java/JavaAutoIndentStrategy.java 6 Oct 2010 09:54:40 -0000 1.123 >+++ ui/org/eclipse/jdt/internal/ui/text/java/JavaAutoIndentStrategy.java 25 Nov 2010 18:23:33 -0000 >@@ -677,13 +677,11 @@ > // compute the relative indentation difference from the second line > // (as the first might be partially selected) and use the value to > // indent all other lines. >- boolean isIndentDetected= false; > StringBuffer addition= new StringBuffer(); > int insertLength= 0; > int first= document.computeNumberOfLines(prefix) + firstLine; // don't format first line > int lines= temp.getNumberOfLines(); > int tabLength= getVisualTabLengthPreference(); >- boolean changed= false; > for (int l= first; l < lines; l++) { // we don't change the number of lines while adding indents > > IRegion r= temp.getLineInformation(l); >@@ -701,23 +699,6 @@ > return; // bail out > > insertLength= subtractIndent(correct, current, addition, tabLength); >- if (!isIndentDetected && l != first && temp.get(lineOffset, lineLength).trim().length() != 0) { >- isIndentDetected= true; >- if (insertLength == 0) { >- // no adjustment needed, bail out >- if (firstLine == 0) { >- // but we still need to adjust the first line >- command.offset= newOffset; >- command.length= newLength; >- if (changed) >- break; // still need to get the leading indent of the first line >- } >- return; >- } >- removeJavaStuff(temp); >- } else { >- changed= insertLength != 0; >- } > > // relatively indent all pasted lines > if (insertLength > 0) >@@ -727,6 +708,7 @@ > > } > >+ removeJavaStuff(temp); > temp.stopRewriteSession(session); > newText= temp.get(prefix.length(), temp.getLength() - prefix.length()); >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Flags:
daniel_megert
:
review-
Actions:
View
|
Diff
Attachments on
bug 330556
:
183376
|
183642
|
183875
|
184050
|
184229
|
184390