use of org.talend.repository.json.ui.wizards.JSONWizard in project tdi-studio-se by Talend.
the class CreateJSONAction method doRun.
@Override
protected void doRun() {
if (repositoryNode == null) {
repositoryNode = getCurrentRepositoryNode();
}
if (isToolbar()) {
if (repositoryNode != null && repositoryNode.getContentType() != JSONRepositoryNodeType.JSON) {
repositoryNode = null;
}
if (repositoryNode == null) {
repositoryNode = getRepositoryNodeForDefault(JSONRepositoryNodeType.JSON);
}
}
WizardDialog wizardDialog = null;
JSONWizard jsonWizard = null;
try {
if (isToolbar()) {
init(repositoryNode);
jsonWizard = new JSONWizard(PlatformUI.getWorkbench(), creation, repositoryNode, getExistingNames());
// hdfs.setToolBar(true);
wizardDialog = new WizardDialog(Display.getCurrent().getActiveShell(), jsonWizard);
} else {
jsonWizard = new JSONWizard(PlatformUI.getWorkbench(), creation, repositoryNode, getExistingNames());
wizardDialog = new WizardDialog(Display.getCurrent().getActiveShell(), jsonWizard);
}
wizardDialog.setPageSize(WIZARD_WIDTH, WIZARD_HEIGHT);
wizardDialog.create();
wizardDialog.open();
} finally {
if (jsonWizard != null) {
jsonWizard.deleteTemFile();
}
}
}
Aggregations