use of org.talend.designer.fileoutputxml.managers.FOXManager 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.designer.fileoutputxml.managers.FOXManager in project tdi-studio-se by Talend.
the class SetForLoopAction method run.
/*
* (non-Javadoc)
*
* @see org.eclipse.jface.action.Action#run()
*/
@Override
public void run() {
FOXTreeNode node = (FOXTreeNode) this.getStructuredSelection().getFirstElement();
if (node.isLoop()) {
return;
}
FOXManager foxManager = foxui.getFoxManager();
FOXTreeNode rootTreeData = foxManager.getRootFOXTreeNode(node);
TreeUtil.clearSubGroupNode(node);
// make sure group element is a ancestor of loop, or no group element.
if (TreeUtil.findUpGroupNode(node) == null) {
TreeUtil.clearSubGroupNode(rootTreeData);
}
TreeUtil.clearLoopNode(rootTreeData);
TreeUtil.clearMainNode(rootTreeData);
if (node.isGroup()) {
node.setGroup(false);
}
node.setLoop(true);
if (this.value) {
if (foxui != null && node.isGroup()) {
foxui.updateStatus();
}
TreeUtil.upsetMainNode(node);
xmlViewer.refresh();
} else {
if (foxui != null) {
foxui.updateStatus();
}
TreeUtil.upsetMainNode(node);
xmlViewer.refresh();
}
this.foxui.updateStatus();
}
Aggregations