branch develop updated (7953302 -> 59789a8)
This is an automated email from the git hooks/post-receive script. New change to branch develop in repository jaxx. See https://gitlab.nuiton.org/nuiton/jaxx.git from 7953302 [jgitflow-maven-plugin]Updating develop poms back to pre merge state new 5fdf271 Let's consume the constructor body as a simple node with the code new cfc9ab0 Improve test to check that the raw body is well generated in java file new 59789a8 Fixes #3999 \o/ Merge branch 'feature/3999' into develop The 3 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "adds" were already present in the repository and have only been added to this reference. Detailed log of new commits: commit 59789a8daeee8d2026e76ac2381386daa28fff9d Merge: 7953302 cfc9ab0 Author: Tony CHEMIT <chemit@codelutin.com> Date: Tue Aug 2 12:59:23 2016 +0200 Fixes #3999 \o/ Merge branch 'feature/3999' into develop commit cfc9ab031b9698735a2d6f648550fcc9010ff409 Author: Tony CHEMIT <chemit@codelutin.com> Date: Tue Aug 2 12:59:06 2016 +0200 Improve test to check that the raw body is well generated in java file commit 5fdf271d20ae5f5f549ad01c36c91b0280a15bc3 Author: Tony CHEMIT <chemit@codelutin.com> Date: Tue Aug 2 12:58:39 2016 +0200 Let's consume the constructor body as a simple node with the code Summary of changes: .../java/jaxx/compiler/java/parser/JavaParser.java | 25 +++++++++++++++++++++- .../java/org/nuiton/jaxx/plugin/LambdaTest.java | 2 ++ .../org/nuiton/jaxx/plugin/lambdaTest/Lambda.jaxx | 11 +++++++++- 3 files changed, 36 insertions(+), 2 deletions(-) -- To stop receiving notification emails like this one, please contact nuiton.org SCM administrator <admin+scm@nuiton.org>.
This is an automated email from the git hooks/post-receive script. New commit to branch develop in repository jaxx. See https://gitlab.nuiton.org/nuiton/jaxx.git commit 5fdf271d20ae5f5f549ad01c36c91b0280a15bc3 Author: Tony CHEMIT <chemit@codelutin.com> Date: Tue Aug 2 12:58:39 2016 +0200 Let's consume the constructor body as a simple node with the code --- .../java/jaxx/compiler/java/parser/JavaParser.java | 25 +++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/jaxx-compiler/src/main/java/jaxx/compiler/java/parser/JavaParser.java b/jaxx-compiler/src/main/java/jaxx/compiler/java/parser/JavaParser.java index fc2d9b5..02e65b5 100644 --- a/jaxx-compiler/src/main/java/jaxx/compiler/java/parser/JavaParser.java +++ b/jaxx-compiler/src/main/java/jaxx/compiler/java/parser/JavaParser.java @@ -1951,9 +1951,17 @@ public class JavaParser/*@bgen(jjtree)*/ implements JavaParserTreeConstants, Jav } else { ; } + + // >>> -------------------------- Only keep one node with text for constructor body + + StringBuilder constructoRawBody = new StringBuilder(); // We do not care about what is inside the constructor, let's allow java 8 lambdas! int lbraceNb = 1;// 1 left brace consumed // while all the left braces have not been closed + SimpleNode jjtBody = new SimpleNode(JJTSTATEMENT); + jjtree.openNodeScope(jjtBody); + jjtreeOpenNodeScope(jjtBody); + while (lbraceNb > 0) { switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { case LBRACE: // new left brace opened @@ -1965,8 +1973,23 @@ public class JavaParser/*@bgen(jjtree)*/ implements JavaParserTreeConstants, Jav default: break; } - jj_consume_token(jj_ntk); + Token token = jj_consume_token(jj_ntk); + if (lbraceNb > 0) { + if (token.specialToken !=null) { + constructoRawBody.append(token.specialToken); + } + constructoRawBody.append(token.image); + } } + Token bodyToken = new Token(); + bodyToken.image = constructoRawBody.toString(); + jjtBody.firstToken = bodyToken; + + jjtree.closeNodeScope(jjtBody, true); + jjtreeCloseNodeScope(jjtBody); + + // <<< -------------------------- Only keep one node with text for constructor body + } catch (Throwable jjte000) { if (jjtc000) { jjtree.clearNodeScope(jjtn000); -- To stop receiving notification emails like this one, please contact nuiton.org SCM administrator <admin+scm@nuiton.org>.
This is an automated email from the git hooks/post-receive script. New commit to branch develop in repository jaxx. See https://gitlab.nuiton.org/nuiton/jaxx.git commit cfc9ab031b9698735a2d6f648550fcc9010ff409 Author: Tony CHEMIT <chemit@codelutin.com> Date: Tue Aug 2 12:59:06 2016 +0200 Improve test to check that the raw body is well generated in java file --- .../src/test/java/org/nuiton/jaxx/plugin/LambdaTest.java | 2 ++ .../resources/org/nuiton/jaxx/plugin/lambdaTest/Lambda.jaxx | 11 ++++++++++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/jaxx-maven-plugin/src/test/java/org/nuiton/jaxx/plugin/LambdaTest.java b/jaxx-maven-plugin/src/test/java/org/nuiton/jaxx/plugin/LambdaTest.java index 6c5746c..c161a63 100644 --- a/jaxx-maven-plugin/src/test/java/org/nuiton/jaxx/plugin/LambdaTest.java +++ b/jaxx-maven-plugin/src/test/java/org/nuiton/jaxx/plugin/LambdaTest.java @@ -34,6 +34,8 @@ public class LambdaTest extends JaxxBaseTest { public void Lambda() throws Exception { getMojo().execute(); assertNumberJaxxFiles(1); + checkPattern(getMojo(), "Raw Body Code Here", true); + checkPattern(getMojo(), "Raw Body Code Here2", true); } } diff --git a/jaxx-maven-plugin/src/test/resources/org/nuiton/jaxx/plugin/lambdaTest/Lambda.jaxx b/jaxx-maven-plugin/src/test/resources/org/nuiton/jaxx/plugin/lambdaTest/Lambda.jaxx index ff8cc9b..4ba37ff 100644 --- a/jaxx-maven-plugin/src/test/resources/org/nuiton/jaxx/plugin/lambdaTest/Lambda.jaxx +++ b/jaxx-maven-plugin/src/test/resources/org/nuiton/jaxx/plugin/lambdaTest/Lambda.jaxx @@ -19,4 +19,13 @@ <http://www.gnu.org/licenses/lgpl-3.0.html>. #L% --> -<JLabel/> +<JLabel> + + <script><![CDATA[ + public Lambda() { + System.out.println("Raw Body Code Here"); + System.out.println("Raw Body Code Here2"); + //Raw Body Code Here + }]]> + </script> +</JLabel> -- To stop receiving notification emails like this one, please contact nuiton.org SCM administrator <admin+scm@nuiton.org>.
This is an automated email from the git hooks/post-receive script. New commit to branch develop in repository jaxx. See https://gitlab.nuiton.org/nuiton/jaxx.git commit 59789a8daeee8d2026e76ac2381386daa28fff9d Merge: 7953302 cfc9ab0 Author: Tony CHEMIT <chemit@codelutin.com> Date: Tue Aug 2 12:59:23 2016 +0200 Fixes #3999 \o/ Merge branch 'feature/3999' into develop .../java/jaxx/compiler/java/parser/JavaParser.java | 25 +++++++++++++++++++++- .../java/org/nuiton/jaxx/plugin/LambdaTest.java | 2 ++ .../org/nuiton/jaxx/plugin/lambdaTest/Lambda.jaxx | 11 +++++++++- 3 files changed, 36 insertions(+), 2 deletions(-) -- To stop receiving notification emails like this one, please contact nuiton.org SCM administrator <admin+scm@nuiton.org>.
participants (1)
-
nuiton.org scm