use of org.talend.designer.fileoutputxml.action.CreateAttributeAction in project tdi-studio-se by Talend.
the class FOXUI method createAction.
private void createAction() {
//$NON-NLS-1$
createAction = new CreateElementAction(xmlViewer, this, Messages.getString("FOXUI.10"));
//$NON-NLS-1$
createAttributeAction = new CreateAttributeAction(xmlViewer, this, Messages.getString("FOXUI.11"));
//$NON-NLS-1$
createNamespaceAction = new CreateNameSpaceAction(xmlViewer, this, Messages.getString("FOXUI.22"));
// editAction = new EditLabelAction(xmlViewer, "Edit Label");
//$NON-NLS-1$
deleteAction = new DeleteNodeAction(xmlViewer, this, Messages.getString("FOXUI.12"));
//$NON-NLS-1$
disconnectAction = new DisconnectAction(xmlViewer, this, Messages.getString("FOXUI.13"));
//$NON-NLS-1$
fixValueAction = new FixValueAction(xmlViewer, this, Messages.getString("FOXUI.41"));
// disconnectAction.setToolTipText("Disconnect the linker of the current tree node.");
//$NON-NLS-1$
importFromXMLAction = new ImportTreeFromXMLAction(xmlViewer, this, Messages.getString("FOXUI.14"));
// importFromXMLAction
// .setToolTipText("Discard the current tree and then import a hierachy tree from an existing xml file.");
// guessLoopAction = new GuessLoopAction(xmlViewer, Messages.getString("FOXUI.15")); //$NON-NLS-1$
//$NON-NLS-1$
setLoopAction = new SetForLoopAction(xmlViewer, this, Messages.getString("FOXUI.16"), this.getValue());
//$NON-NLS-1$
setGroupAction = new SetGroupAction(xmlViewer, this, Messages.getString("FOXUI.17"), this.getValue());
// removeGroupAction = new RemoveGroupAction(xmlViewer, Messages.getString("FOXUI.18")); //$NON-NLS-1$
//$NON-NLS-1$
removeGroupAction = new RemoveGroupAction(xmlViewer, Messages.getString("FOXUI.18"), this);
}
use of org.talend.designer.fileoutputxml.action.CreateAttributeAction in project tdi-studio-se by Talend.
the class AddTreeNodeButton method handleSelectionEvent.
protected void handleSelectionEvent(TreeSelection selection) {
final FOXUI foxUI = manager.getUiManager().getFoxUI();
if (foxUI != null) {
AddElementDialog dialog = new AddElementDialog(parent.getShell());
if (dialog.open() == Window.CANCEL) {
return;
}
if (AddElementDialog.CREATE_AS_SUBELEMENT.equals(dialog.getSelectValue())) {
CreateElementAction createElement = new CreateElementAction(foxUI.getTreeViewer(), foxUI, "");
createElement.run();
} else if (AddElementDialog.CREATE_AS_ATTRIBUTE.equals(dialog.getSelectValue())) {
CreateAttributeAction createAttr = new CreateAttributeAction(foxUI.getTreeViewer(), foxUI, "");
createAttr.run();
} else if (AddElementDialog.CREATE_AS_NAME_SPACE.equals(dialog.getSelectValue())) {
CreateNameSpaceAction createNameSpace = new CreateNameSpaceAction(foxUI.getTreeViewer(), foxUI, "");
createNameSpace.run();
}
treeViewer.setSelection(selection);
}
}
Aggregations