From 7121e282da97554c284ec3383069935fe327604e Mon Sep 17 00:00:00 2001 From: x03daop Date: Tue, 14 Jun 2016 14:46:47 +0200 Subject: [PATCH] Script execution --- plugins/DataFile.java | 42 ------------------------------------------ script/local.py | 1 + 2 files changed, 1 insertion(+), 42 deletions(-) delete mode 100644 plugins/DataFile.java diff --git a/plugins/DataFile.java b/plugins/DataFile.java deleted file mode 100644 index c7810199..00000000 --- a/plugins/DataFile.java +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright (c) 2014 Paul Scherrer Institute. All rights reserved. - */ - -import ch.psi.pshell.ui.Plugin; -import javax.swing.Timer; -import java.awt.event.ActionEvent; -import java.util.logging.Level; - -/** - * - */ -public class DataFile implements Plugin { - Timer timer; - - @Override - public void onInitialize(int runCount) { - if (timer != null) { - timer.stop(); - } - getView().getStatusBar().getAuxLabel().setForeground(new java.awt.Color(100, 100, 100)); - timer = new Timer(2000, (ActionEvent e) -> { - try { - onTimer(); - } catch (Exception ex) { - getLogger().log(Level.FINE, null, ex); - } - }); - timer.start(); - - } - - - void onTimer(){ - String file = getController().getDataManager().getLastOutput(); - if (getState().isNormal() && (file !=null)){ - getView().getStatusBar().setAuxMessage(file); - } else { - getView().getStatusBar().setAuxMessage(""); - } - } -} diff --git a/script/local.py b/script/local.py index e7fb7afd..3f6fef83 100644 --- a/script/local.py +++ b/script/local.py @@ -191,6 +191,7 @@ diag_channels.append(ManipulatorTempA) diag_channels.append(ManipulatorTempB) diag_channels.append(ManipulatorCoolFlow) diag_channels.append(ManipulatorCoolFlowSet) +diag_channels.append(MonoGrating) def get_diag_name(diag): return ch.psi.utils.Str.toTitleCase(diag.getName()).replace(" ", "")