r396 - trunk/nuiton-processor/src/main/java/org/nuiton/processor/filters
Author: mfortun Date: 2011-07-27 18:18:42 +0200 (Wed, 27 Jul 2011) New Revision: 396 Url: http://nuiton.org/repositories/revision/processor/396 Log: * allow "parenthese" to be override, "parenthese" are use to open and close writeString declaration Modified: trunk/nuiton-processor/src/main/java/org/nuiton/processor/filters/GeneratorTemplatesFilterIn.java Modified: trunk/nuiton-processor/src/main/java/org/nuiton/processor/filters/GeneratorTemplatesFilterIn.java =================================================================== --- trunk/nuiton-processor/src/main/java/org/nuiton/processor/filters/GeneratorTemplatesFilterIn.java 2011-07-27 14:54:13 UTC (rev 395) +++ trunk/nuiton-processor/src/main/java/org/nuiton/processor/filters/GeneratorTemplatesFilterIn.java 2011-07-27 16:18:42 UTC (rev 396) @@ -56,6 +56,10 @@ protected String endParenthese = EMPTY_STRING; + protected String closingWriterChar; + + protected String openingWriterChar; + protected String endCar; protected String stringDelim; @@ -110,11 +114,29 @@ this.parent = parent; } + public String getClosingWriterChar() { + return closingWriterChar; + } + + public void setClosingWriterChar(String closingWriterChar) { + this.closingWriterChar = closingWriterChar; + } + + public String getOpeningWriterChar() { + return openingWriterChar; + } + + public void setOpeningWriterChar(String openingWriterChar) { + this.openingWriterChar = openingWriterChar; + } + public GeneratorTemplatesFilterIn(GeneratorTemplatesFilter parent) { this.parent = parent; endCar=";"; stringDelim="\""; concacChar="+"; + openingWriterChar ="("; + closingWriterChar = ")"; } /** @@ -127,8 +149,8 @@ @Override protected String performInFilter(String ch) { if (parent.writeParentheses) { - beginParenthese = "("; - endParenthese = ")"+ endCar; + beginParenthese = openingWriterChar; + endParenthese = closingWriterChar+ endCar; } else { beginParenthese = EMPTY_STRING; endParenthese = EMPTY_STRING; @@ -161,8 +183,8 @@ @Override protected String performOutFilter(String ch) { if (parent.writeParentheses) { - beginParenthese = "("; - endParenthese = ")"+ endCar; + beginParenthese = openingWriterChar; + endParenthese = closingWriterChar+ endCar; } else { beginParenthese = EMPTY_STRING; endParenthese = EMPTY_STRING;
participants (1)
-
mfortun@users.nuiton.org