Author: scabanovich
Date: 2009-04-07 10:47:44 -0400 (Tue, 07 Apr 2009)
New Revision: 14571
Modified:
trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/loaders/impl/PropertiesLoader.java
Log:
JBIDE-3833
Modified:
trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/loaders/impl/PropertiesLoader.java
===================================================================
---
trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/loaders/impl/PropertiesLoader.java 2009-04-07
13:04:36 UTC (rev 14570)
+++
trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/loaders/impl/PropertiesLoader.java 2009-04-07
14:47:44 UTC (rev 14571)
@@ -77,7 +77,7 @@
continue;
}
if(s.equals("\n")) {
- if(state < 2) sb.append(s); else lineEnd.append(s);
+ if(state != 2) sb.append(s); else lineEnd.append(s);
if(state == 0) {
state = 1;
} else if(state == 2) {
@@ -228,13 +228,21 @@
StringTokenizer st = new StringTokenizer(dirtyvalue, INTERNAL_SEPARATOR, true);
StringBuffer cv = new StringBuffer();
StringBuffer dv = new StringBuffer();
+ String rightWhites = "";
while(st.hasMoreTokens()) {
String t = st.nextToken();
if(t.equals(INTERNAL_SEPARATOR)) {
- dv.append("\\\n");
+ if(rightWhites.length() > 0) {
+ cv.append(rightWhites);
+ rightWhites = "";
+ }
+ dv.append("\\");
} else {
if(t.startsWith("#")) cv.append("\\");
- cv.append(t.trim());
+ String app = t.trim();
+ int off = t.indexOf(app);
+ rightWhites = t.substring(off + app.length());
+ cv.append(app);
dv.append(t);
}
}
Show replies by date