freemarker-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ddekany <...@git.apache.org>
Subject [GitHub] incubator-freemarker pull request #30: FREEMARKER-63: Unification and improv...
Date Thu, 03 Aug 2017 21:20:04 GMT
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 <ddekany@apache.org>
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 <ddekany@apache.org>
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 <ddekany@apache.org>
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 <ddekany@apache.org>
Date:   2017-07-27T16:43:05Z

    FREEMARKER-63:  Very early state. Simplified capturing assignment implementation

commit 1e27397dd9570ac2f48be6100afd2bba7b42b8b8
Author: ddekany <ddekany@apache.org>
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 <ddekany@apache.org>
Date:   2017-07-27T19:24:14Z

    FREEMARKER-63:  Bit of API/javadoc cleanup

commit 52a5f9eb8881a2c976a2b84ff683d8c11238efca
Author: ddekany <ddekany@apache.org>
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 <ddekany@apache.org>
Date:   2017-07-30T13:57:46Z

    FREEMARKER-63: Fixed failing test. (Now the test suite passes.)

commit 589d9b80e218a39d2ac128b1108952992868cc40
Author: ddekany <ddekany@apache.org>
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 <ddekany@apache.org>
Date:   2017-07-30T21:07:29Z

    FREEMARKER-63: Added isNestedContentSupported() to templateDirectiveModel

commit da4c33292d5d73cdfb53613ca64bd0834fcfb5fd
Author: ddekany <ddekany@apache.org>
Date:   2017-07-30T21:20:34Z

    FREEMARKER-63: Removed NestedContentNotSupportedException, as TemplateDirectiveModel.isNestedContentSupported()
now takes care of that problem.

commit 3cacd9ed04a231af67e3964525fd592b97da1665
Author: ddekany <ddekany@apache.org>
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. 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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message