Search in sources :

Example 1 with DelimitedFileWizard

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);
        }
    }
}
Also used : DelimitedFileWizard(org.talend.repository.ui.wizards.metadata.connection.files.delimited.DelimitedFileWizard) Wizard(org.eclipse.jface.wizard.Wizard) DelimitedFileWizard(org.talend.repository.ui.wizards.metadata.connection.files.delimited.DelimitedFileWizard) WizardDialog(org.eclipse.jface.wizard.WizardDialog)

Example 2 with DelimitedFileWizard

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;
}
Also used : ITDQRepositoryService(org.talend.core.ITDQRepositoryService) DatabaseWizard(org.talend.repository.ui.wizards.metadata.connection.database.DatabaseWizard) IWizard(org.eclipse.jface.wizard.IWizard) RepositoryNode(org.talend.repository.model.RepositoryNode) DelimitedFileWizard(org.talend.repository.ui.wizards.metadata.connection.files.delimited.DelimitedFileWizard) WizardDialog(org.eclipse.jface.wizard.WizardDialog)

Aggregations

WizardDialog (org.eclipse.jface.wizard.WizardDialog)2 DelimitedFileWizard (org.talend.repository.ui.wizards.metadata.connection.files.delimited.DelimitedFileWizard)2 IWizard (org.eclipse.jface.wizard.IWizard)1 Wizard (org.eclipse.jface.wizard.Wizard)1 ITDQRepositoryService (org.talend.core.ITDQRepositoryService)1 RepositoryNode (org.talend.repository.model.RepositoryNode)1 DatabaseWizard (org.talend.repository.ui.wizards.metadata.connection.database.DatabaseWizard)1