コード例 #1
0
 /** {@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
ファイル: PVSnapshot.java プロジェクト: kliv/cs-studio
 @Override
 public int compareTo(PVSnapshot arg) {
   return name.compareTo(arg.getName());
 }