You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@uima.apache.org by pk...@apache.org on 2013/02/06 15:13:41 UTC
svn commit: r1442973 -
/uima/sandbox/textmarker/trunk/textmarker-ep-ide/src/main/java/org/apache/uima/textmarker/ide/ui/text/TextMarkerAutoEditStrategy.java
Author: pkluegl
Date: Wed Feb 6 14:13:40 2013
New Revision: 1442973
URL: http://svn.apache.org/viewvc?rev=1442973&view=rev
Log:
[UIMA-2604]
- use only leading ws for indent
Modified:
uima/sandbox/textmarker/trunk/textmarker-ep-ide/src/main/java/org/apache/uima/textmarker/ide/ui/text/TextMarkerAutoEditStrategy.java
Modified: uima/sandbox/textmarker/trunk/textmarker-ep-ide/src/main/java/org/apache/uima/textmarker/ide/ui/text/TextMarkerAutoEditStrategy.java
URL: http://svn.apache.org/viewvc/uima/sandbox/textmarker/trunk/textmarker-ep-ide/src/main/java/org/apache/uima/textmarker/ide/ui/text/TextMarkerAutoEditStrategy.java?rev=1442973&r1=1442972&r2=1442973&view=diff
==============================================================================
--- uima/sandbox/textmarker/trunk/textmarker-ep-ide/src/main/java/org/apache/uima/textmarker/ide/ui/text/TextMarkerAutoEditStrategy.java (original)
+++ uima/sandbox/textmarker/trunk/textmarker-ep-ide/src/main/java/org/apache/uima/textmarker/ide/ui/text/TextMarkerAutoEditStrategy.java Wed Feb 6 14:13:40 2013
@@ -807,8 +807,9 @@ public class TextMarkerAutoEditStrategy
String commonIndent = temp.get(firstLineOffset, c.offset - firstLineOffset);
if(StringUtils.isNotBlank(commonIndent)) {
// do not copy non whitespace content as indent
- commonIndent = commonIndent.replaceAll(".", " ");
- // if only withspaces count as indent then trim the end and use the delta as indent
+ // and only use leading white spaces
+ String notWSContent = commonIndent.replaceAll("^\\s+", "");
+ commonIndent = StringUtils.removeEnd(commonIndent, notWSContent);
}
line++;
try {