freemarker.template.Configuration.setTabSize()方法的使用及代码示例

x33g5p2x  于2022-01-18 转载在 其他  
字(1.8k)|赞(0)|评价(0)|浏览(131)

本文整理了Java中freemarker.template.Configuration.setTabSize()方法的一些代码示例,展示了Configuration.setTabSize()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Configuration.setTabSize()方法的具体详情如下:
包路径:freemarker.template.Configuration
类名称:Configuration
方法名:setTabSize

Configuration.setTabSize介绍

[英]Sets the assumed display width of the tab character (ASCII 9), which influences the column number shown in error messages (or the column number you get through other API-s). So for example if the users edit templates in an editor where the tab width is set to 4, you should set this to 4 so that the column numbers printed by FreeMarker will match the column number shown in the editor. This setting doesn't affect the output of templates, as a tab in the template will remain a tab in the output too. If you set this setting to 1, then tab characters will be kept in the return value of Template#getSource(int,int,int,int), otherwise they will be replaced with the appropriate number of spaces.
[中]设置制表符的假定显示宽度(ASCII 9),该宽度会影响错误消息中显示的列号(或通过其他API获得的列号)。例如,如果用户在编辑器中编辑模板,其中选项卡宽度设置为4,则应将其设置为4,以便FreeMarker打印的列号与编辑器中显示的列号匹配。此设置不会影响模板的输出,因为模板中的选项卡也将保留为输出中的选项卡。如果将此设置设置为1,则制表符将保留在Template#getSource(int,int,int,int)的返回值中,否则将替换为适当数量的空格。

代码示例

代码示例来源:origin: org.freemarker/freemarker

setTabSize(Integer.parseInt(value));
} else if (INCOMPATIBLE_IMPROVEMENTS_KEY_SNAKE_CASE.equals(name)
    || INCOMPATIBLE_IMPROVEMENTS_KEY_CAMEL_CASE.equals(name)) {

代码示例来源:origin: org.freemarker/freemarker-gae

setTabSize(Integer.parseInt(value));
} else if (INCOMPATIBLE_IMPROVEMENTS_KEY_SNAKE_CASE.equals(name)
    || INCOMPATIBLE_IMPROVEMENTS_KEY_CAMEL_CASE.equals(name)) {

代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.freemarker

setTabSize(Integer.parseInt(value));
} else if (INCOMPATIBLE_IMPROVEMENTS_KEY_SNAKE_CASE.equals(name)
    || INCOMPATIBLE_IMPROVEMENTS_KEY_CAMEL_CASE.equals(name)) {

相关文章

Configuration类方法