]
Denis Golovin updated JBIDE-20386:
----------------------------------
Fix Version/s: 4.3.x
Autocompleation uses very outdated data
---------------------------------------
Key: JBIDE-20386
URL:
https://issues.jboss.org/browse/JBIDE-20386
Project: Tools (JBoss Tools)
Issue Type: Bug
Components: freemarker
Reporter: Daniel Dekany
Assignee: Denis Golovin
Fix For: 4.3.x
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.