TreeSelection sel = (TreeSelection)viewer.getSelection();
if(sel.getFirstElement() instanceof TreeParentNode){
TreeParentNode selNode = (TreeParentNode)sel.getFirstElement();
if(selNode.getType().equals(FrameworkManager.COLDSPRING)){
CSAddBeanDialog addDialog = new CSAddBeanDialog(viewer.getControl().getShell());
if(addDialog.open() == IDialogConstants.OK_ID){
String id = addDialog.getCfcName().getText();
String className = addDialog.getCfcExtends().getText();
System.out.println("Dialog says " + id + " " + className);
Document document = selNode.getDocument();
Element child = document.getRootElement();
//Bean Element
Element newBean = new Element("bean");
newBean.setAttribute("id", addDialog.getCfcName().getText());
newBean.setAttribute("class", addDialog.getCfcExtends().getText());
child.addContent(newBean);
XMLOutputter outputter = new XMLOutputter();
try {