public static VelocityContext createContext()
{
final VelocityContext context = new VelocityContext();
context.put("esc", new EscapeTool());
context.put("stringutils", new StringUtils());
context.put("annotationutils", new AnnotationUtils());
final IPreferenceStore store = WorkbenchCorePlugin.getDefault().getPreferenceStore();
int maxFieldLength = store.getInt(PreferenceConstants.MAX_FIELD_LENGTH);
if (maxFieldLength == 0) maxFieldLength = Integer.MAX_VALUE;