@Test public void testCreateDataNode() { CreateNodeAction action; try { action = new CreateNodeAction(null); } catch (InternalError e) { return; } DataChannelDescriptor domain = new DataChannelDescriptor(); domain.setName("aa"); DataNodeDescriptor node = action.buildDataNode(domain); assertNotNull(node); assertNotNull(node.getName()); DataSourceInfo ds1 = new DataSourceInfo(); node.setDataSourceDescriptor(ds1); assertSame("Project DataNode must not wrap the DataSource", ds1, node .getDataSourceDescriptor()); }
public void createDataNode(DataNodeDescriptor node) { DataChannelDescriptor domain = (DataChannelDescriptor) getProjectController().getProject().getRootNode(); domain.getNodeDescriptors().add(node); getProjectController().fireDataNodeEvent(new DataNodeEvent(this, node, MapEvent.ADD)); getProjectController().fireDataNodeDisplayEvent(new DataNodeDisplayEvent(this, domain, node)); }
CreateNodeAction extends CayenneAction { public void createDataNode(DataNodeDescriptor node) { DataChannelDescriptor domain = (DataChannelDescriptor) getProjectController().getProject().getRootNode(); domain.getNodeDescriptors().add(node); getProjectController().fireDataNodeEvent(new DataNodeEvent(this, node, MapEvent.ADD)); getProjectController().fireDataNodeDisplayEvent(new DataNodeDisplayEvent(this, domain, node)); } }
CreateNodeAction extends CayenneAction { public void createDataNode(DataNodeDescriptor node) { DataChannelDescriptor domain = (DataChannelDescriptor) getProjectController().getProject().getRootNode(); domain.getNodeDescriptors().add(node); getProjectController().fireDataNodeEvent(new DataNodeEvent(this, node, MapEvent.ADD)); getProjectController().fireDataNodeDisplayEvent(new DataNodeDisplayEvent(this, domain, node)); } CreateNodeAction(Application application); }
CreateNodeAction extends CayenneAction { public void createDataNode(DataNodeDescriptor node) { DataChannelDescriptor domain = (DataChannelDescriptor) getProjectController().getProject().getRootNode(); domain.getNodeDescriptors().add(node); getProjectController().fireDataNodeEvent(new DataNodeEvent(this, node, MapEvent.ADD)); getProjectController().fireDataNodeDisplayEvent(new DataNodeDisplayEvent(this, domain, node)); } CreateNodeAction(Application application); static String getActionName(); @Override String getIconName(); @Override void performAction(ActionEvent e); void createDataNode(DataNodeDescriptor node); boolean enableForPath(ConfigurationNode object); DataNodeDescriptor buildDataNode(); }
CreateNodeAction extends CayenneAction { public void createDataNode(DataNodeDescriptor node) { DataChannelDescriptor domain = (DataChannelDescriptor) getProjectController().getProject().getRootNode(); domain.getNodeDescriptors().add(node); getProjectController().fireDataNodeEvent(new DataNodeEvent(this, node, MapEvent.ADD)); getProjectController().fireDataNodeDisplayEvent(new DataNodeDisplayEvent(this, domain, node)); } CreateNodeAction(Application application); static String getActionName(); @Override String getIconName(); @Override void performAction(ActionEvent e); void createDataNode(DataNodeDescriptor node); boolean enableForPath(ConfigurationNode object); DataNodeDescriptor buildDataNode();  }