@Test public void testSubUpdate() throws Exception { System.out.println("subUpdate"); AcmeGraph instance = new AcmeGraph(dummyUI); instance.update(); Graph graph = instance.getGraphLayer().getGraph(); Node server0 = graph.nodes.get("ZNewsSys.Server0"); assertNotNull(server0); Node server1 = graph.nodes.get("ZNewsSys.Server1"); assertNotNull(server1); String port = server0.ports.get(0); assertEquals("ZNewsSys.Server0.http0", port); Node connector = graph.nodes.get("ZNewsSys.httpConn_0_0"); assertNotNull(connector); Edge attachment = graph.edges.get("ZNewsSys.Client1.p0 to httpConn_0_0.req"); assertNotNull(attachment); }
@Override protected void subUpdate() { IAcmeSystem newSystem = (IAcmeSystem) ModelHelper .getElementFromQualifiedName(model, currentSystem.getQualifiedName()); if (newSystem != null) { currentSystem = newSystem; } else { currentSystem = model; Logger.getLogger(AcmeGraph.class.getName()).log(Level.INFO, "The system {0} doesn''t exists. " + "Switch to top-level system.", currentSystem.getQualifiedName()); } Graph graph = createGraph(); graphLayer.setGraph(graph); }
AcmeGraph extends AcmeModelView { @Override protected void subUpdate() { IAcmeSystem newSystem = (IAcmeSystem) ModelHelper .getElementFromQualifiedName(model, currentSystem.getQualifiedName()); if (newSystem != null) { currentSystem = newSystem; } else { currentSystem = model; Logger.getLogger(AcmeGraph.class.getName()).log(Level.INFO, "The system {0} doesn''t exists. " + "Switch to top-level system.", currentSystem.getQualifiedName()); } Graph graph = createGraph(); graphLayer.setGraph(graph); } }
AcmeGraph extends AcmeModelView { @Override protected void subUpdate() { IAcmeSystem newSystem = (IAcmeSystem) ModelHelper .getElementFromQualifiedName(model, currentSystem.getQualifiedName()); if (newSystem != null) { currentSystem = newSystem; } else { currentSystem = model; Logger.getLogger(AcmeGraph.class.getName()).log(Level.INFO, "The system {0} doesn''t exists. " + "Switch to top-level system.", currentSystem.getQualifiedName()); } Graph graph = createGraph(); graphLayer.setGraph(graph); } AcmeGraph(AbstractRainbowVaadinUI ui); }
AcmeGraph extends AcmeModelView { @Override protected void subUpdate() { IAcmeSystem newSystem = (IAcmeSystem) ModelHelper .getElementFromQualifiedName(model, currentSystem.getQualifiedName()); if (newSystem != null) { currentSystem = newSystem; } else { currentSystem = model; Logger.getLogger(AcmeGraph.class.getName()).log(Level.INFO, "The system {0} doesn''t exists. " + "Switch to top-level system.", currentSystem.getQualifiedName()); } Graph graph = createGraph(); graphLayer.setGraph(graph); } AcmeGraph(AbstractRainbowVaadinUI ui); IAcmeSystem getCurrentSystem(); void setCurrentSystem(IAcmeSystem system); void resetGraph(); }
AcmeGraph extends AcmeModelView { @Override protected void subUpdate() { IAcmeSystem newSystem = (IAcmeSystem) ModelHelper .getElementFromQualifiedName(model, currentSystem.getQualifiedName()); if (newSystem != null) { currentSystem = newSystem; } else { currentSystem = model; Logger.getLogger(AcmeGraph.class.getName()).log(Level.INFO, "The system {0} doesn''t exists. " + "Switch to top-level system.", currentSystem.getQualifiedName()); } Graph graph = createGraph(); graphLayer.setGraph(graph); } AcmeGraph(AbstractRainbowVaadinUI ui); IAcmeSystem getCurrentSystem(); void setCurrentSystem(IAcmeSystem system); void resetGraph();  }