use of org.talend.metadata.managment.ui.wizard.metadata.xml.node.FOXTreeNode in project tdi-studio-se by Talend.
the class MultiFOXManager method getGroupTable.
@Override
public List<Map<String, String>> getGroupTable() {
List<Map<String, String>> result = new ArrayList<Map<String, String>>();
for (FOXTreeNode rootNode : this.getOriginalNodes()) {
Element groupNode = (Element) TreeUtil.getGroupNode(rootNode);
if (groupNode != null) {
String path = TreeUtil.getPath(groupNode);
//$NON-NLS-1$
tableLoader(groupNode, path.substring(0, path.lastIndexOf("/")), result, groupNode.getDefaultValue());
}
}
return result;
}
use of org.talend.metadata.managment.ui.wizard.metadata.xml.node.FOXTreeNode in project tdi-studio-se by Talend.
the class FOXTargetTreeViewerProvider method updateChildCount.
/*
* (non-Javadoc)
*
* @see org.eclipse.jface.viewers.ILazyTreeContentProvider#updateChildCount(java.lang.Object, int)
*/
@Override
public void updateChildCount(Object element, int currentChildCount) {
int length = 0;
if (element instanceof FOXTreeNode) {
FOXTreeNode node = (FOXTreeNode) element;
length = node.getChildren().size();
} else if (element instanceof List) {
length = nodes.size();
}
viewer.setChildCount(element, length);
}
use of org.talend.metadata.managment.ui.wizard.metadata.xml.node.FOXTreeNode in project tdi-studio-se by Talend.
the class SetGroupAction method selectionChanged.
/*
* (non-Javadoc)
*
* @see
* org.eclipse.ui.actions.SelectionProviderAction#selectionChanged(org.eclipse.jface.viewers.IStructuredSelection)
*/
@Override
public void selectionChanged(IStructuredSelection selection) {
FOXTreeNode node = (FOXTreeNode) this.getStructuredSelection().getFirstElement();
if (node == null) {
this.setEnabled(false);
return;
}
if (((node instanceof Attribute) || node.hasLink()) && this.value) {
this.setEnabled(TreeUtil.checkTreeGoupNode(node));
return;
}
if (node instanceof NameSpaceNode) {
this.setEnabled(false);
return;
}
this.setEnabled(TreeUtil.checkTreeGoupNode(node));
}
use of org.talend.metadata.managment.ui.wizard.metadata.xml.node.FOXTreeNode in project tdi-studio-se by Talend.
the class SetGroupAction method run.
/*
* (non-Javadoc)
*
* @see org.eclipse.jface.action.Action#run()
*/
@Override
public void run() {
FOXTreeNode node = (FOXTreeNode) this.getStructuredSelection().getFirstElement();
if (node.isGroup()) {
return;
}
FOXManager foxManager = foxui.getFoxManager();
FOXTreeNode rootTreeData = foxManager.getRootFOXTreeNode(node);
TreeUtil.clearSubGroupNode(rootTreeData);
// old TreeUtil.clearLoopNode((FOXTreeNode) xmlViewer.getTree().getItem(0).getData());
node.setGroup(true);
// old TreeUtil.guessLoopWithGroup(node);
foxui.updateStatus();
xmlViewer.refresh();
}
use of org.talend.metadata.managment.ui.wizard.metadata.xml.node.FOXTreeNode in project tdi-studio-se by Talend.
the class FOXManager method getRootTable.
public List<Map<String, String>> getRootTable() {
if (currentSchema != null) {
treeData = contents.get(currentSchema);
}
List<Map<String, String>> result = new ArrayList<Map<String, String>>();
FOXTreeNode rootNode = treeData.get(0);
initNodeOrder(rootNode);
if (rootNode != null) {
//$NON-NLS-1$
this.tableLoader((Element) rootNode, "", result, rootNode.getDefaultValue());
}
return result;
}
Aggregations