Search in sources :

Example 1 with CreateJSONNameSpaceAction

use of org.talend.repository.json.ui.wizards.action.CreateJSONNameSpaceAction in project tdi-studio-se by Talend.

the class AddTreeNodeButton method handleSelectionEvent.

protected void handleSelectionEvent(TreeSelection selection) {
    if (form != null) {
        AddElementDialog dialog = new AddElementDialog(parent.getShell());
        if (dialog.open() == Window.CANCEL) {
            return;
        }
        if (AddElementDialog.CREATE_AS_SUBELEMENT.equals(dialog.getSelectValue())) {
            CreateJSONElementAction createElement = new CreateJSONElementAction(treeViewer, form, "");
            createElement.run();
        } else if (AddElementDialog.CREATE_AS_ATTRIBUTE.equals(dialog.getSelectValue())) {
            CreateJSONAttributeAction createAttr = new CreateJSONAttributeAction(treeViewer, form, "");
            createAttr.run();
        } else if (AddElementDialog.CREATE_AS_NAME_SPACE.equals(dialog.getSelectValue())) {
            CreateJSONNameSpaceAction createNameSpace = new CreateJSONNameSpaceAction(treeViewer, form, "");
            createNameSpace.run();
        }
        treeViewer.setSelection(selection);
    }
}
Also used : CreateJSONElementAction(org.talend.repository.json.ui.wizards.action.CreateJSONElementAction) CreateJSONNameSpaceAction(org.talend.repository.json.ui.wizards.action.CreateJSONNameSpaceAction) AddElementDialog(org.talend.metadata.managment.ui.wizard.metadata.xml.dialog.AddElementDialog) CreateJSONAttributeAction(org.talend.repository.json.ui.wizards.action.CreateJSONAttributeAction)

Example 2 with CreateJSONNameSpaceAction

use of org.talend.repository.json.ui.wizards.action.CreateJSONNameSpaceAction in project tdi-studio-se by Talend.

the class JSONFileOutputStep2Form method createAction.

private void createAction() {
    createAction = new CreateJSONElementAction(JSONViewer, this, "Add Sub-element");
    createAttributeAction = new CreateJSONAttributeAction(JSONViewer, this, "Add Attribute");
    createNamespaceAction = new CreateJSONNameSpaceAction(JSONViewer, this, "Add Name Space");
    deleteAction = new DeleteJSONNodeAction(JSONViewer, this, "Delete");
    disconnectAction = new JSONDisconnectAction(JSONViewer, this, "Disconnect Linker");
    fixValueAction = new FixValueAction(JSONViewer, this, "Set A Fix Value");
    importFromJSONAction = new ImportTreeFromJSONAction(JSONViewer, this, "Import JSON Tree");
    setLoopAction = new SetForJSONLoopAction(JSONViewer, this, "Set As Loop Element");
    setGroupAction = new SetJSONGroupAction(JSONViewer, this, "Set As Group Element");
    removeGroupAction = new RemoveJSONGroupAction(JSONViewer, "Remove Group Element", this);
}
Also used : CreateJSONElementAction(org.talend.repository.json.ui.wizards.action.CreateJSONElementAction) FixValueAction(org.talend.repository.json.ui.wizards.action.FixValueAction) CreateJSONNameSpaceAction(org.talend.repository.json.ui.wizards.action.CreateJSONNameSpaceAction) RemoveJSONGroupAction(org.talend.repository.json.ui.wizards.action.RemoveJSONGroupAction) CreateJSONAttributeAction(org.talend.repository.json.ui.wizards.action.CreateJSONAttributeAction) JSONDisconnectAction(org.talend.repository.json.ui.wizards.action.JSONDisconnectAction) SetJSONGroupAction(org.talend.repository.json.ui.wizards.action.SetJSONGroupAction) DeleteJSONNodeAction(org.talend.repository.json.ui.wizards.action.DeleteJSONNodeAction) ImportTreeFromJSONAction(org.talend.repository.json.ui.wizards.action.ImportTreeFromJSONAction) SetForJSONLoopAction(org.talend.repository.json.ui.wizards.action.SetForJSONLoopAction)

Aggregations

CreateJSONAttributeAction (org.talend.repository.json.ui.wizards.action.CreateJSONAttributeAction)2 CreateJSONElementAction (org.talend.repository.json.ui.wizards.action.CreateJSONElementAction)2 CreateJSONNameSpaceAction (org.talend.repository.json.ui.wizards.action.CreateJSONNameSpaceAction)2 AddElementDialog (org.talend.metadata.managment.ui.wizard.metadata.xml.dialog.AddElementDialog)1 DeleteJSONNodeAction (org.talend.repository.json.ui.wizards.action.DeleteJSONNodeAction)1 FixValueAction (org.talend.repository.json.ui.wizards.action.FixValueAction)1 ImportTreeFromJSONAction (org.talend.repository.json.ui.wizards.action.ImportTreeFromJSONAction)1 JSONDisconnectAction (org.talend.repository.json.ui.wizards.action.JSONDisconnectAction)1 RemoveJSONGroupAction (org.talend.repository.json.ui.wizards.action.RemoveJSONGroupAction)1 SetForJSONLoopAction (org.talend.repository.json.ui.wizards.action.SetForJSONLoopAction)1 SetJSONGroupAction (org.talend.repository.json.ui.wizards.action.SetJSONGroupAction)1