private void initializeUserDirectives(){
  userDirectives=new ArrayList<>();
  IEclipsePreferences preferences=VelocityCorePlugin.getPreferences();
  String directives=preferences.get(IPreferencesConstants.VELOCITY_USER_DIRECTIVES,"");
  StringTokenizer st=new StringTokenizer(directives,",\n\r");
  while (st.hasMoreElements()) {
    String directive=(String)st.nextElement();
    String name=directive.substring(0,directive.indexOf(' '));
    int type=(directive.endsWith("[Block]") ? Directive.BLOCK : Directive.LINE);
    userDirectives.add('#' + name);
    addDirective(new VelocityDirective(name,type));
  }
}

private void initializeUserDirectives ( ) { userDirectives = new ArrayList < > ( ) ; IEclipsePreferences preferences = VelocityCorePlugin . getPreferences ( ) ; String directives = preferences . get ( IPreferencesConstants . VELOCITY_USER_DIRECTIVES , "" ) ; StringTokenizer st = new StringTokenizer ( directives , ",\n\r" ) ; while ( st . hasMoreElements ( ) ) { String directive = ( String ) st . nextElement ( ) ; String name = directive . substring ( 0 , directive . indexOf ( ' ' ) ) ; int type = ( directive . endsWith ( "[Block]" ) ? Directive . BLOCK : Directive . LINE ) ; userDirectives . add ( '#' + name ) ; addDirective ( new VelocityDirective ( name , type ) ) ; } }
this methods initializes all user directives .
