Search in sources :

Example 1 with CreateAttributeAction

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);
}
Also used : CreateNameSpaceAction(org.talend.designer.fileoutputxml.action.CreateNameSpaceAction) FixValueAction(org.talend.designer.fileoutputxml.action.FixValueAction) DisconnectAction(org.talend.designer.fileoutputxml.action.DisconnectAction) DeleteNodeAction(org.talend.designer.fileoutputxml.action.DeleteNodeAction) ImportTreeFromXMLAction(org.talend.designer.fileoutputxml.action.ImportTreeFromXMLAction) SetForLoopAction(org.talend.designer.fileoutputxml.action.SetForLoopAction) CreateAttributeAction(org.talend.designer.fileoutputxml.action.CreateAttributeAction) CreateElementAction(org.talend.designer.fileoutputxml.action.CreateElementAction) RemoveGroupAction(org.talend.designer.fileoutputxml.action.RemoveGroupAction) SetGroupAction(org.talend.designer.fileoutputxml.action.SetGroupAction)

Example 2 with CreateAttributeAction

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);
    }
}
Also used : CreateNameSpaceAction(org.talend.designer.fileoutputxml.action.CreateNameSpaceAction) AddElementDialog(org.talend.metadata.managment.ui.wizard.metadata.xml.dialog.AddElementDialog) CreateAttributeAction(org.talend.designer.fileoutputxml.action.CreateAttributeAction) CreateElementAction(org.talend.designer.fileoutputxml.action.CreateElementAction) FOXUI(org.talend.designer.fileoutputxml.ui.FOXUI)

Aggregations

CreateAttributeAction (org.talend.designer.fileoutputxml.action.CreateAttributeAction)2 CreateElementAction (org.talend.designer.fileoutputxml.action.CreateElementAction)2 CreateNameSpaceAction (org.talend.designer.fileoutputxml.action.CreateNameSpaceAction)2 DeleteNodeAction (org.talend.designer.fileoutputxml.action.DeleteNodeAction)1 DisconnectAction (org.talend.designer.fileoutputxml.action.DisconnectAction)1 FixValueAction (org.talend.designer.fileoutputxml.action.FixValueAction)1 ImportTreeFromXMLAction (org.talend.designer.fileoutputxml.action.ImportTreeFromXMLAction)1 RemoveGroupAction (org.talend.designer.fileoutputxml.action.RemoveGroupAction)1 SetForLoopAction (org.talend.designer.fileoutputxml.action.SetForLoopAction)1 SetGroupAction (org.talend.designer.fileoutputxml.action.SetGroupAction)1 FOXUI (org.talend.designer.fileoutputxml.ui.FOXUI)1 AddElementDialog (org.talend.metadata.managment.ui.wizard.metadata.xml.dialog.AddElementDialog)1