/** {@inheritDoc} */
 @Override
 public void execute(List<PVSnapshot> pvs) throws Exception {
   final String dir;
   try {
     dir = Preferences.getCommandDirectory();
   } catch (Exception ex) {
     Activator.getLogger().log(Level.SEVERE, "Can not find command directory", ex);
     return;
   }
   if (command.contains("*")) { // List PVs and their alarm severity
     final StringBuilder buf = new StringBuilder();
     for (PVSnapshot pv : pvs) {
       if (buf.length() > 0) buf.append(" ");
       buf.append(pv.getPath());
       buf.append(" ");
       buf.append(pv.getSeverity().name());
     }
     final String expanded_command = command.replace("*", buf.toString());
     execCmd(dir, expanded_command, wait);
   } else execCmd(dir, command, wait);
 }
示例#2
0
 @Override
 public int compareTo(PVSnapshot arg) {
   return name.compareTo(arg.getName());
 }