/// <summary> Display command</summary> internal virtual void doDisplay() { try { if (!hasMoreTokens()) doInfoDisplay(); else { // followed by an expression (i.e. a line we just pull in) String s = restOfLine(); // first parse it, then attempt to evaluate the expression ValueExp expr = parseExpression(s); // make sure no assignment if (expr.hasSideEffectsOtherThanGetters()) throw new System.UnauthorizedAccessException(); // it worked so create a new DisplayAction and then add it in DisplayAction b = new DisplayAction(expr, s); b.Enabled = true; displayAdd(b); } } catch (System.UnauthorizedAccessException) { err(LocalizationManager.getLocalizedTextString("noSideEffectsAllowed")); //$NON-NLS-1$ } catch (System.NullReferenceException) { // already handled by parseExpression } }
internal virtual bool displayAdd(DisplayAction a) { return m_displays.Add(a) >= 0; }