super("Plot Signal");
}
@Override
public void actionPerformed(ActionEvent e) {
JTextComponent tc = getTextComponent(e);
String signalName = null;
// Get the name of the signal to plot. If there is a selection, use that as the signal name,
// otherwise, scan for a signalname around the caret
try {
int selStart = tc.getSelectionStart();
int selEnd = tc.getSelectionEnd();
if (selStart != selEnd) {
signalName = tc.getText(selStart, selEnd - selStart);
}
else {
signalName = getSignalNameAtCaret(tc);
}
}