[jbosstools-issues] [JBoss JIRA] Updated: (JBIDE-2787) can't support "<#include" tag for parse all marcos for freemarker library

super watano (JIRA) jira-events at lists.jboss.org
Thu Sep 18 09:44:21 EDT 2008


     [ https://jira.jboss.org/jira/browse/JBIDE-2787?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

super watano updated JBIDE-2787:
--------------------------------

    Attachment: MacroInstance.java


> can't support "<#include" tag for parse all marcos for freemarker library
> -------------------------------------------------------------------------
>
>                 Key: JBIDE-2787
>                 URL: https://jira.jboss.org/jira/browse/JBIDE-2787
>             Project: Tools (JBoss Tools)
>          Issue Type: Bug
>          Components: FreeMarker
>         Environment: eclipse 3.4
>            Reporter: super watano
>         Attachments: ConfigurationManager.java, MacroInstance.java
>
>
> there is one freemarker library file "a.ftl". in the "a.ftl" file, it use code "<#include "b.ftl" />" to include "b.ftl". In this way, when Content Assist list all marcos, it only get all marcos from "a.ftl" and can't get from "b.ftl".
>      for this bug, I read all related codes, I find it only parse "#marco" for ftl file, the "#include" can't be supported now. so I need other temp solution for this case. I try to add the two ftl file into freemarker library as same namespace "w" on ".freemarker-ide.xml". but it only can get all marcos from the last ftl file. I read all related codes, I find it use the namespace to the key of Map on "org.jboss.ide.eclipse.freemarker.configuration.ConfigurationManager", It only support one namespace at one time. So I hack this codes, before add a MacroLibrary into the Map, I will check the Map, if it contain the current namespace, I will append some "_" char in the namespace begain, and use this new namespace for key to add  MacroLibrary into the Map. When the Content Assist need list all marcos by file "org.jboss.ide.eclipse.freemarker.model.MacroInstance" on line 109, I will remove all begins "_" char for namespace.
>      I know this is a bad solution for this case, but it can fixed this bug. I sincerely hope you can fix this bug by a good solution.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the jbosstools-issues mailing list