Example #1
0
  private String substituteDatadir(String template) {

    if (StringUtils.contains(template, "$datadir$")) {
      template =
          StringUtils.replace(template, "$datadir$", PathConstructor.createFromDefaultProperty());
    }

    return template;
  }
 public void initialisation() {
   if (eventAdminName != null) {
     eventAdmin = Finder.getInstance().find(eventAdminName);
   }
   property.addPropertyChangeListener(this);
   if (eventAdmin != null) {
     eventAdmin.addIObserver(this);
   }
   if (property.getPropertyName().equals(LocalProperties.GDA_DATAWRITER_DIR)) {
     String currentPath = PathConstructor.createFromProperty(LocalProperties.GDA_DATAWRITER_DIR);
     viewer.setSelection(new StructuredSelection(currentPath));
   } else {
     viewer.setSelection(new StructuredSelection(LocalProperties.get(property.getPropertyName())));
   }
   currentSelection = (IStructuredSelection) (viewer.getSelection());
 }