use of org.talend.repository.json.ui.wizards.action.CreateJSONElementAction 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);
}
}
use of org.talend.repository.json.ui.wizards.action.CreateJSONElementAction 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);
}
Aggregations