private String paramHRef(String symbolName, String value) { return Fixture.gray("<a href=\"#" + symbolName + "\">" + value + "</a>"); }
@Override public void doCell(Fixture fixture, Parse cell) { try { executeIfNeeded(); Object valueObj = getValue(); String symbolValue = String.valueOf(valueObj); String symbolName = cell.text(); if (valueObj instanceof Object[]) { // <ARRAY> Store return value as array. Fixture.setSymbol(symbolName, valueObj); symbolValue = Arrays.toString((Object[]) valueObj); } else { Fixture.setSymbol(symbolName, symbolValue); } cell.addToBody(Fixture.gray("<a id=\"" + symbolName + "\"> = " + symbolValue + "</a>")); } catch (Exception e) { handleException(fixture, cell, e); } }
@Override public void doCell(Fixture fixture, Parse cell) { try { //TODO-MdM hmm... somehow this needs to regulated by the fixture. if (fixture instanceof ColumnFixture) ((ColumnFixture) fixture).executeIfNeeded(); Object valueObj = adapter.get(); //...might be validly null String symbolValue = valueObj == null ? "null" : valueObj.toString(); String symbolName = cell.text(); Fixture.setSymbol(symbolName, symbolValue); cell.addToBody(Fixture.gray(" = " + symbolValue)); } catch (Exception e) { fixture.exception(cell, e); } } }
@Override public void doCell(Fixture fixture, Parse cell) { try { //TODO-MdM hmm... somehow this needs to regulated by the fixture. if (fixture instanceof ColumnFixture) ((ColumnFixture) fixture).executeIfNeeded(); Object valueObj = adapter.get(); //...might be validly null String symbolValue = valueObj == null ? "null" : valueObj.toString(); String symbolName = cell.text(); Fixture.setSymbol(symbolName, symbolValue); cell.addToBody(Fixture.gray(" = " + symbolValue)); } catch (Exception e) { fixture.exception(cell, e); } } }
@Override public void doCell(Fixture fixture, Parse cell) throws Exception { String symbolName = cell.text(); if (!Fixture.hasSymbol(symbolName)) fixture.exception(cell, new FitFailureException("No such symbol: " + symbolName)); else { String value = (String) Fixture.getSymbol(symbolName); if (adapter.field != null) { adapter.set(adapter.parse(value)); cell.addToBody(Fixture.gray(" = " + value)); } if (adapter.method != null) { cell.body = value; fixture.check(cell, adapter); } } } }
@Override public void doCell(Fixture fixture, Parse cell) throws Exception { String symbolName = cell.text(); if (!Fixture.hasSymbol(symbolName)) fixture.exception(cell, new FitFailureException("No such symbol: " + symbolName)); else { String value = (String) Fixture.getSymbol(symbolName); if (adapter.field != null) { adapter.set(adapter.parse(value)); cell.addToBody(Fixture.gray(" = " + value)); } if (adapter.method != null) { cell.body = value; fixture.check(cell, adapter); } } } }