[jira] [Updated] (FREEMARKER-64) FM3 Unification and improvement of function-like constructs
[ https://issues.apache.org/jira/browse/FREEMARKER-64?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Daniel Dekany updated FREEMARKER-64: Description: FREEMARKER-63 has introduced {{TemplateFunctionModel}}, which is the type of values that {{#function}} creates. It should also replace {{TemplateMethodModel}} and {{TemplateMethodModelEx}}, so that we have only one interface for function-like things. (If that doesn't work out well, we at least should remove the deprecated {{TemplateMethodModel}}, and then rename {{TemplateMethodModelEx}} to that name. Also, we need to support the explicit selection overloaded Java methods - see in {{CallPlace}}). As {{TemplateFunctionModel}} supports both positional and named parameters, the expression language has to be upgraded to support that too. Things like `?isMethod` and `?isFunction` have to be reworked as well. was: FREEMARKER-63 has introduced {{TemplateFunctionModel}}, which is the type of values that {{#function}} creates. It should also replace {{TemplateMethodModel}} and {{TemplateMethodModelEx}}, so that we have only one interface for function-like things. (If that doesn't work out well, we at least should remove the deprecated {{TemplateMethodModel}}, and renamed {{TemplateMethodModelEx}} to that name. Also, we need to support the explicit selection overloaded Java methods - see in {{CallPlace}}). As {{TemplateFunctionModel}} supports both positional and named parameters, the expression language has to be upgraded to support that too. Things like `?isMethod` and `?isFunction` have to be reworked as well. > FM3 Unification and improvement of function-like constructs > --- > > Key: FREEMARKER-64 > URL: https://issues.apache.org/jira/browse/FREEMARKER-64 > Project: Apache Freemarker > Issue Type: New Feature > Components: engine >Affects Versions: 3.0.0 >Reporter: Daniel Dekany >Assignee: Daniel Dekany > > FREEMARKER-63 has introduced {{TemplateFunctionModel}}, which is the type of > values that {{#function}} creates. It should also replace > {{TemplateMethodModel}} and {{TemplateMethodModelEx}}, so that we have only > one interface for function-like things. (If that doesn't work out well, we at > least should remove the deprecated {{TemplateMethodModel}}, and then rename > {{TemplateMethodModelEx}} to that name. Also, we need to support the explicit > selection overloaded Java methods - see in {{CallPlace}}). > As {{TemplateFunctionModel}} supports both positional and named parameters, > the expression language has to be upgraded to support that too. > Things like `?isMethod` and `?isFunction` have to be reworked as well. -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Updated] (FREEMARKER-64) FM3 Unification and improvement of function-like constructs
[ https://issues.apache.org/jira/browse/FREEMARKER-64?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Daniel Dekany updated FREEMARKER-64: Summary: FM3 Unification and improvement of function-like constructs (was: FM3 Unification of function-like constructs) > FM3 Unification and improvement of function-like constructs > --- > > Key: FREEMARKER-64 > URL: https://issues.apache.org/jira/browse/FREEMARKER-64 > Project: Apache Freemarker > Issue Type: New Feature > Components: engine >Affects Versions: 3.0.0 >Reporter: Daniel Dekany >Assignee: Daniel Dekany > > FREEMARKER-63 has introduced {{TemplateFunctionModel}}, which is the type of > values that {{#function}} creates. It should also replace > {{TemplateMethodModel}} and {{TemplateMethodModelEx}}, so that we have only > one interface for function-like things. (If that doesn't work out well, we at > least should remove the deprecated {{TemplateMethodModel}}, and renamed > {{TemplateMethodModelEx}} to that name. Also, we need to support the explicit > selection overloaded Java methods - see in {{CallPlace}}). > As {{TemplateFunctionModel}} supports both positional and named parameters, > the expression language has to be upgraded to support that too. > Things like `?isMethod` and `?isFunction` have to be reworked as well. -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Updated] (FREEMARKER-64) FM3 Unification of function-like constructs
[ https://issues.apache.org/jira/browse/FREEMARKER-64?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Daniel Dekany updated FREEMARKER-64: Description: FREEMARKER-63 has introduced {{TemplateFunctionModel}}, which is the type of values that {{#function}} creates. It should also replace {{TemplateMethodModel}} and {{TemplateMethodModelEx}}, so that we have only one interface for function-like things. (If that doesn't work out well, we at least should remove the deprecated {{TemplateMethodModel}}, and renamed {{TemplateMethodModelEx}} to that name. Also, we need to support the explicit selection overloaded Java methods - see in {{CallPlace}}). As {{TemplateFunctionModel}} supports both positional and named parameters, the expression language has to be upgraded to support that too. Things like `?isMethod` and `?isFunction` have to be reworked as well. was:FREEMARKER-63 has introduced {{TemplateFunctionModel}}, which is the type of values that {{#function}} creates. It should also replace {{TemplateMethodModel}} and {{TemplateMethodModelEx}}, so that we have only one interface for function-like things. (If that doesn't work out well, we at least should remove the deprecated {{TemplateMethodModel}}, and renamed {{TemplateMethodModelEx}} to that name. Also, we need to support the explicit selection overloaded Java methods - see in {{CallPlace}}). Things like `?isMethod` and `?isFunction` have to be reworked as well. > FM3 Unification of function-like constructs > --- > > Key: FREEMARKER-64 > URL: https://issues.apache.org/jira/browse/FREEMARKER-64 > Project: Apache Freemarker > Issue Type: New Feature > Components: engine >Affects Versions: 3.0.0 >Reporter: Daniel Dekany >Assignee: Daniel Dekany > > FREEMARKER-63 has introduced {{TemplateFunctionModel}}, which is the type of > values that {{#function}} creates. It should also replace > {{TemplateMethodModel}} and {{TemplateMethodModelEx}}, so that we have only > one interface for function-like things. (If that doesn't work out well, we at > least should remove the deprecated {{TemplateMethodModel}}, and renamed > {{TemplateMethodModelEx}} to that name. Also, we need to support the explicit > selection overloaded Java methods - see in {{CallPlace}}). > As {{TemplateFunctionModel}} supports both positional and named parameters, > the expression language has to be upgraded to support that too. > Things like `?isMethod` and `?isFunction` have to be reworked as well. -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Created] (FREEMARKER-64) FM3 Unification of function-like constructs
Daniel Dekany created FREEMARKER-64: --- Summary: FM3 Unification of function-like constructs Key: FREEMARKER-64 URL: https://issues.apache.org/jira/browse/FREEMARKER-64 Project: Apache Freemarker Issue Type: New Feature Components: engine Affects Versions: 3.0.0 Reporter: Daniel Dekany Assignee: Daniel Dekany FREEMARKER-63 has introduced {{TemplateFunctionModel}}, which is the type of values that {{#function}} creates. It should also replace {{TemplateMethodModel}} and {{TemplateMethodModelEx}}, so that we have only one interface for function-like things. (If that doesn't work out well, we at least should remove the deprecated {{TemplateMethodModel}}, and renamed {{TemplateMethodModelEx}} to that name. Also, we need to support the explicit selection overloaded Java methods - see in {{CallPlace}}). Things like `?isMethod` and `?isFunction` have to be reworked as well. -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Commented] (FREEMARKER-63) FM3 Unification and improvement of directive-like constructs
[ https://issues.apache.org/jira/browse/FREEMARKER-63?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16113517#comment-16113517 ] ASF GitHub Bot commented on FREEMARKER-63: -- GitHub user ddekany opened a pull request: https://github.com/apache/incubator-freemarker/pull/30 FREEMARKER-63: Unification and improvement of directive-like constructs Redesigned `TemplateDirectiveModel` now support both by position and by name parameter passing, even mixed in the same call. `#macros`-s also create `TemplateDirectiveModel`-s, and supports defining if a parameter is positional or named. Removed deprecated `TemplateTransformModel`. Added `TemplateFunctionModel`, which meant to replace `TemplateMethodModel` and `TemplateMethodModelEx` in another Jira issue, but for now it's only what `#function` creates. This also supports both positional and named parameters (though the call syntax in the expression language isn't updated in this issue, so it still only can pass positional parameters). `#function` was upgraded to support the same new features as `#macro`. You can merge this pull request into a Git repository by running: $ git pull https://github.com/ddekany/incubator-freemarker FREEMARKER-63 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/incubator-freemarker/pull/30.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #30 commit c28a78bd8dad4bfd3a37a90a26fbb15639d33604 Author: ddekany Date: 2017-07-24T18:26:29Z FREEMARKER-63: Very early state. Until it's fully functional, the new interface is called TemplateDirectiveModel2, and is invoked with <~...> instead of <@...>. Later it will replace TemplateDirectiveModel and the syntax will be <@...>. commit 46c750109ffe9e4c7e52e4c3df94b78c3445f780 Author: ddekany Date: 2017-07-26T21:48:11Z FREEMARKER-63: Very early state. Added support for nested content and loop variables. Added StringToIndexMap, which is used for mapping names to their index in the value arrays (a concept that we use at a few places now). commit fbbfadb443efac2009439564f1d3c664ff8a51b0 Author: ddekany Date: 2017-07-27T16:20:37Z FREEMARKER-63: Very early state. Some cleanups. Temporarily added support for calling legacy ASTDirMacro-s with the also temporary <~...>syntax. commit 146c42572c440dd4ef911d437239d3e54a7fe95b Author: ddekany Date: 2017-07-27T16:43:05Z FREEMARKER-63: Very early state. Simplified capturing assignment implementation commit 1e27397dd9570ac2f48be6100afd2bba7b42b8b8 Author: ddekany Date: 2017-07-27T18:45:01Z Removed the legacy predefined shared variables: "html_escape", "normalize_newlines", "xml_escape", "capture_output", "compress". It had to be done now as TemplateTransformModel will be removed as part of FREEMARKER-63. commit a6399a793f54f531a11a7a9d13b9eb47d648563a Author: ddekany Date: 2017-07-27T19:24:14Z FREEMARKER-63: Bit of API/javadoc cleanup commit 52a5f9eb8881a2c976a2b84ff683d8c11238efca Author: ddekany Date: 2017-07-30T00:04:56Z FREEMARKER-63: Removed TemplateTransformModel and the old TemplateDirectiveModel, renamed TemplateDirectiveModel2 to TemplateDirectiveModel. Removed the temporary `<~...>` syntax; now `<@...>` is used to call the new TemplateDirectiveModel. Lot of API refinement, like introduced ArgumentArrayLayout class. Several test cases won't yet pass... work in progress. commit 126c506984ea1e006b719ebb3ae92a4207c4c9f2 Author: ddekany Date: 2017-07-30T13:57:46Z FREEMARKER-63: Fixed failing test. (Now the test suite passes.) commit 589d9b80e218a39d2ac128b1108952992868cc40 Author: ddekany Date: 2017-07-30T18:38:01Z FREEMARKER-63: Change 1: Replaced the "loop variable" term with the more generic "nested content parameter" term. (In FM2, loop variables were introduced earlier than nested content parameter, so the two term coulnd't be unified. So it's just one less term in FM3.) Change 2: CallPlace.executeNestedContent now requires the nested content paramter value array to have exactly the same length as the number of parameters declared by the caller. commit 5bd19adeb8dd24cde34987c4724c7a5d5d227f52 Author: ddekany Date: 2017-07-30T21:07:29Z FREEMARKER-63: Added isNestedContentSupported() to templateDirectiveModel commit da4c33292d5d73cdfb53613ca64bd0834fcfb5fd Author: ddekany Date: 2017-07-30T21:20:34Z FREEMARKER-63: Removed NestedContentNotSupportedException, as TemplateDirectiveModel.isNestedContentSupported() now takes care of that problem. commit 3cacd9ed04a231af67e3964525fd592b97da1665 Author: ddekany Date: 2017-08-03T21:11:57Z FREEMARKER-63: Lot of refinement in the API-s and implementation. #macro now creates a `TemplateDirectiveModel`, and
[GitHub] incubator-freemarker pull request #30: FREEMARKER-63: Unification and improv...
GitHub user ddekany opened a pull request: https://github.com/apache/incubator-freemarker/pull/30 FREEMARKER-63: Unification and improvement of directive-like constructs Redesigned `TemplateDirectiveModel` now support both by position and by name parameter passing, even mixed in the same call. `#macros`-s also create `TemplateDirectiveModel`-s, and supports defining if a parameter is positional or named. Removed deprecated `TemplateTransformModel`. Added `TemplateFunctionModel`, which meant to replace `TemplateMethodModel` and `TemplateMethodModelEx` in another Jira issue, but for now it's only what `#function` creates. This also supports both positional and named parameters (though the call syntax in the expression language isn't updated in this issue, so it still only can pass positional parameters). `#function` was upgraded to support the same new features as `#macro`. You can merge this pull request into a Git repository by running: $ git pull https://github.com/ddekany/incubator-freemarker FREEMARKER-63 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/incubator-freemarker/pull/30.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #30 commit c28a78bd8dad4bfd3a37a90a26fbb15639d33604 Author: ddekany Date: 2017-07-24T18:26:29Z FREEMARKER-63: Very early state. Until it's fully functional, the new interface is called TemplateDirectiveModel2, and is invoked with <~...> instead of <@...>. Later it will replace TemplateDirectiveModel and the syntax will be <@...>. commit 46c750109ffe9e4c7e52e4c3df94b78c3445f780 Author: ddekany Date: 2017-07-26T21:48:11Z FREEMARKER-63: Very early state. Added support for nested content and loop variables. Added StringToIndexMap, which is used for mapping names to their index in the value arrays (a concept that we use at a few places now). commit fbbfadb443efac2009439564f1d3c664ff8a51b0 Author: ddekany Date: 2017-07-27T16:20:37Z FREEMARKER-63: Very early state. Some cleanups. Temporarily added support for calling legacy ASTDirMacro-s with the also temporary <~...>syntax. commit 146c42572c440dd4ef911d437239d3e54a7fe95b Author: ddekany Date: 2017-07-27T16:43:05Z FREEMARKER-63: Very early state. Simplified capturing assignment implementation commit 1e27397dd9570ac2f48be6100afd2bba7b42b8b8 Author: ddekany Date: 2017-07-27T18:45:01Z Removed the legacy predefined shared variables: "html_escape", "normalize_newlines", "xml_escape", "capture_output", "compress". It had to be done now as TemplateTransformModel will be removed as part of FREEMARKER-63. commit a6399a793f54f531a11a7a9d13b9eb47d648563a Author: ddekany Date: 2017-07-27T19:24:14Z FREEMARKER-63: Bit of API/javadoc cleanup commit 52a5f9eb8881a2c976a2b84ff683d8c11238efca Author: ddekany Date: 2017-07-30T00:04:56Z FREEMARKER-63: Removed TemplateTransformModel and the old TemplateDirectiveModel, renamed TemplateDirectiveModel2 to TemplateDirectiveModel. Removed the temporary `<~...>` syntax; now `<@...>` is used to call the new TemplateDirectiveModel. Lot of API refinement, like introduced ArgumentArrayLayout class. Several test cases won't yet pass... work in progress. commit 126c506984ea1e006b719ebb3ae92a4207c4c9f2 Author: ddekany Date: 2017-07-30T13:57:46Z FREEMARKER-63: Fixed failing test. (Now the test suite passes.) commit 589d9b80e218a39d2ac128b1108952992868cc40 Author: ddekany Date: 2017-07-30T18:38:01Z FREEMARKER-63: Change 1: Replaced the "loop variable" term with the more generic "nested content parameter" term. (In FM2, loop variables were introduced earlier than nested content parameter, so the two term coulnd't be unified. So it's just one less term in FM3.) Change 2: CallPlace.executeNestedContent now requires the nested content paramter value array to have exactly the same length as the number of parameters declared by the caller. commit 5bd19adeb8dd24cde34987c4724c7a5d5d227f52 Author: ddekany Date: 2017-07-30T21:07:29Z FREEMARKER-63: Added isNestedContentSupported() to templateDirectiveModel commit da4c33292d5d73cdfb53613ca64bd0834fcfb5fd Author: ddekany Date: 2017-07-30T21:20:34Z FREEMARKER-63: Removed NestedContentNotSupportedException, as TemplateDirectiveModel.isNestedContentSupported() now takes care of that problem. commit 3cacd9ed04a231af67e3964525fd592b97da1665 Author: ddekany Date: 2017-08-03T21:11:57Z FREEMARKER-63: Lot of refinement in the API-s and implementation. #macro now creates a `TemplateDirectiveModel`, and #function now creates `TemplateFunctionModel` (though the function/method call syntax doesn't yet allow named parameters). Test suite passes. --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. I
[GitHub] incubator-freemarker pull request #29: Fix grammar in InvalidReferenceExcept...
GitHub user SimonLammer opened a pull request: https://github.com/apache/incubator-freemarker/pull/29 Fix grammar in InvalidReferenceException tip You can merge this pull request into a Git repository by running: $ git pull https://github.com/SimonLammer/incubator-freemarker patch-1 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/incubator-freemarker/pull/29.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #29 commit 732fe7660b5c7f4067c32ae823f70905086fa151 Author: Simon Lammer Date: 2017-08-03T11:23:27Z Fix grammar in InvalidReferenceException tip --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---