private TokenMgrError newNameConventionMismatchException(Token tok) { return new TokenMgrError( "Naming convention mismatch. " + "Identifiers that are part of the template language (not the user specified ones) " + (initialNamingConvention == Configuration.AUTO_DETECT_NAMING_CONVENTION ? "must consistently use the same naming convention within the same template. This template uses " : "must use the configured naming convention, which is the ") + (namingConvention == Configuration.CAMEL_CASE_NAMING_CONVENTION ? "camel case naming convention (like: exampleName) " : (namingConvention == Configuration.LEGACY_NAMING_CONVENTION ? "legacy naming convention (directive (tag) names are like examplename, " + "everything else is like example_name) " : "??? (internal error)" )) + (namingConventionEstabilisher != null ? "estabilished by auto-detection at " + _MessageUtil.formatPosition( namingConventionEstabilisher.beginLine, namingConventionEstabilisher.beginColumn) + " by token " + StringUtil.jQuote(namingConventionEstabilisher.image.trim()) : "") + ", but the problematic token, " + StringUtil.jQuote(tok.image.trim()) + ", uses a different convention.", TokenMgrError.LEXICAL_ERROR, tok.beginLine, tok.beginColumn, tok.endLine, tok.endColumn); }
private static String formatLocation( String preposition, String templateSourceName, String macroOrFuncName, boolean isFunction, int line, int column) { String templateDesc; if (line < 0) { templateDesc = "?eval-ed string"; macroOrFuncName = null; } else { templateDesc = templateSourceName != null ? "template " + StringUtil.jQuoteNoXSS(templateSourceName) : "nameless template"; } return "in " + templateDesc + (macroOrFuncName != null ? " in " + (isFunction ? "function " : "macro ") + StringUtil.jQuote(macroOrFuncName) : "") + " " + preposition + " " + formatPosition(line, column); }
private TokenMgrError newNameConventionMismatchException(Token tok) { return new TokenMgrError( "Naming convention mismatch. " + "Identifiers that are part of the template language (not the user specified ones) " + (initialNamingConvention == Configuration.AUTO_DETECT_NAMING_CONVENTION ? "must consistently use the same naming convention within the same template. This template uses " : "must use the configured naming convention, which is the ") + (namingConvention == Configuration.CAMEL_CASE_NAMING_CONVENTION ? "camel case naming convention (like: exampleName) " : (namingConvention == Configuration.LEGACY_NAMING_CONVENTION ? "legacy naming convention (directive (tag) names are like examplename, " + "everything else is like example_name) " : "??? (internal error)" )) + (namingConventionEstabilisher != null ? "estabilished by auto-detection at " + _MessageUtil.formatPosition( namingConventionEstabilisher.beginLine, namingConventionEstabilisher.beginColumn) + " by token " + StringUtil.jQuote(namingConventionEstabilisher.image.trim()) : "") + ", but the problematic token, " + StringUtil.jQuote(tok.image.trim()) + ", uses a different convention.", TokenMgrError.LEXICAL_ERROR, tok.beginLine, tok.beginColumn, tok.endLine, tok.endColumn); }
private TokenMgrError newNameConventionMismatchException(Token tok) { return new TokenMgrError( "Naming convention mismatch. " + "Identifiers that are part of the template language (not the user specified ones) " + (initialNamingConvention == Configuration.AUTO_DETECT_NAMING_CONVENTION ? "must consistently use the same naming convention within the same template. This template uses " : "must use the configured naming convention, which is the ") + (namingConvention == Configuration.CAMEL_CASE_NAMING_CONVENTION ? "camel case naming convention (like: exampleName) " : (namingConvention == Configuration.LEGACY_NAMING_CONVENTION ? "legacy naming convention (directive (tag) names are like examplename, " + "everything else is like example_name) " : "??? (internal error)" )) + (namingConventionEstabilisher != null ? "estabilished by auto-detection at " + _MessageUtil.formatPosition( namingConventionEstabilisher.beginLine, namingConventionEstabilisher.beginColumn) + " by token " + StringUtil.jQuote(namingConventionEstabilisher.image.trim()) : "") + ", but the problematic token, " + StringUtil.jQuote(tok.image.trim()) + ", uses a different convention.", TokenMgrError.LEXICAL_ERROR, tok.beginLine, tok.beginColumn, tok.endLine, tok.endColumn); }
private static String formatLocation( String preposition, String templateSourceName, String macroOrFuncName, boolean isFunction, int line, int column) { String templateDesc; if (line < 0) { templateDesc = "?eval-ed string"; macroOrFuncName = null; } else { templateDesc = templateSourceName != null ? "template " + StringUtil.jQuoteNoXSS(templateSourceName) : "nameless template"; } return "in " + templateDesc + (macroOrFuncName != null ? " in " + (isFunction ? "function " : "macro ") + StringUtil.jQuote(macroOrFuncName) : "") + " " + preposition + " " + formatPosition(line, column); }
private static String formatLocation( String preposition, String templateSourceName, String macroOrFuncName, boolean isFunction, int line, int column) { String templateDesc; if (line < 0) { templateDesc = "?eval-ed string"; macroOrFuncName = null; } else { templateDesc = templateSourceName != null ? "template " + StringUtil.jQuoteNoXSS(templateSourceName) : "nameless template"; } return "in " + templateDesc + (macroOrFuncName != null ? " in " + (isFunction ? "function " : "macro ") + StringUtil.jQuote(macroOrFuncName) : "") + " " + preposition + " " + formatPosition(line, column); }