Details
-
Bug
-
Resolution: Done
-
Major
-
None
-
None
-
devex #117 July 2016
Description
When you press Ctrl+Space after <# or in an expression after foo?, the list of directive names, and especially the list of built-in names shown is very outdated. Instead of maintaining these lists manually, the list of directive names could be get from freemarker.template.Configuration.getSupportedBuiltInDirectiveNames(), and the list of built-in names from Configuration.getSupportedBuiltInNames().
Some complication since 2.3.23 is that the list of names should be filtered based on Template.getActualNamingConvention() (which either returns Configuration.LEGACY_NAMING_CONVENTION or Configuration.CAMEL_CASE_NAMING_CONVENTION). Though the algorithm for that is simple: If a name contains upper case letter then it's camel case. Otherwise, if it contains _ then it belongs to the legacy naming convention. Otherwise if it's a directive name that equals to a lower-cased camel case directive name, then it's legacy naming convention (consider elseIf VS elseif). Otherwise the name belongs to both naming conventions.