use of org.talend.repository.ui.wizards.metadata.connection.files.delimited.DelimitedFileWizard in project tdq-studio-se by Talend.
the class EditFileDelimitedAction method run.
/*
* (non-Jsdoc)
*
* @see org.eclipse.jface.action.Action#run()
*/
@Override
public void run() {
if (node != null) {
Wizard wizard = new DelimitedFileWizard(PlatformUI.getWorkbench(), false, (RepositoryNode) node, null);
WizardDialog dialog = new WizardDialog(null, wizard);
if (Window.OK == dialog.open()) {
CorePlugin.getDefault().refreshDQView(node);
}
}
}
use of org.talend.repository.ui.wizards.metadata.connection.files.delimited.DelimitedFileWizard in project tdq-studio-se by Talend.
the class ConnectionTypePage method getNextPage.
@Override
public IWizardPage getNextPage() {
RepositoryNode node = null;
IWizard nextWizard = null;
// make the next wizard do not open the created connection
ITDQRepositoryService tdqRepService = (ITDQRepositoryService) GlobalServiceRegister.getDefault().getService(ITDQRepositoryService.class);
tdqRepService.setIsOpenConnectionEditorAfterCreate(Boolean.TRUE);
int selectionIndex = connectionType.getSelectionIndex();
switch(selectionIndex) {
case // db
0:
node = (RepositoryNode) RepositoryNodeHelper.getMetadataFolderNode(EResourceConstant.DB_CONNECTIONS);
nextWizard = new DatabaseWizard(PlatformUI.getWorkbench(), true, node, null);
break;
case // file
1:
node = (RepositoryNode) RepositoryNodeHelper.getMetadataFolderNode(EResourceConstant.FILEDELIMITED);
nextWizard = new DelimitedFileWizard(PlatformUI.getWorkbench(), true, node, null);
break;
default:
break;
}
WizardDialog dialog = new WizardDialog(null, nextWizard);
dialog.setPageSize(550, 550);
if (WizardDialog.OK == dialog.open()) {
publishSelectDataEvent(nextWizard, tdqRepService);
}
// make it back to initial value if cancel it
tdqRepService.setIsOpenConnectionEditorAfterCreate(Boolean.FALSE);
return null;
}
Aggregations