use of org.talend.dataprofiler.core.ui.wizard.analysis.connection.ConnectionWizard in project tdq-studio-se by Talend.
the class CreateNewConnectionForMatchAnalysisAction method run.
/*
* (non-Javadoc)
*
* @see org.eclipse.ui.cheatsheets.ICheatSheetAction#run(java.lang.String[],
* org.eclipse.ui.cheatsheets.ICheatSheetManager)
*/
public void run(String[] arg0, ICheatSheetManager arg1) {
ConnectionWizard connectionWizard = new ConnectionWizard(PlatformUI.getWorkbench(), null);
connectionWizard.setForcePreviousAndNextButtons(true);
WizardDialog dialog = new WizardDialog(null, connectionWizard);
dialog.setPageSize(500, 200);
dialog.open();
IEditorPart editor = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getActiveEditor();
if (editor instanceof MatchAnalysisEditor) {
MatchAnalysisDetailsPage masterPage = (MatchAnalysisDetailsPage) ((MatchAnalysisEditor) editor).getMasterPage();
if (masterPage.getAnalysisHandler() != null) {
masterPage.openColumnsSelectionDialog(masterPage.getAnalysisHandler().getConnection());
}
}
}
use of org.talend.dataprofiler.core.ui.wizard.analysis.connection.ConnectionWizard in project tdq-studio-se by Talend.
the class MatchAnalysisDetailsPage method createDataSelectionButtonComp.
private void createDataSelectionButtonComp(Composite parent) {
Composite dataSelectionComp = toolkit.createComposite(parent);
GridLayout dataSelectionCompLayout = new GridLayout(3, Boolean.TRUE);
dataSelectionComp.setLayout(dataSelectionCompLayout);
Button createConnectionBtn = toolkit.createButton(dataSelectionComp, DefaultMessagesImpl.getString("MatchMasterDetailsPage.CreateConnectionButton"), // $NON-NLS-1$
SWT.NONE);
GridDataFactory.fillDefaults().align(SWT.LEFT, SWT.TOP).applyTo(createConnectionBtn);
Button selectDataBtn = toolkit.createButton(dataSelectionComp, DefaultMessagesImpl.getString("MatchMasterDetailsPage.SelectDataButton"), // $NON-NLS-1$
SWT.NONE);
GridDataFactory.fillDefaults().align(SWT.LEFT, SWT.TOP).applyTo(selectDataBtn);
// Button suggestBtn = toolkit.createButton(dataSelectionComp, "Suggest", SWT.NONE);//$NON-NLS-1$
// GridDataFactory.fillDefaults().align(SWT.LEFT, SWT.TOP).applyTo(suggestBtn);
createConnectionBtn.addMouseListener(new MouseAdapter() {
@Override
public void mouseDown(MouseEvent e) {
ConnectionWizard connectionWizard = new ConnectionWizard(PlatformUI.getWorkbench(), dataSampleparentComposite);
connectionWizard.setForcePreviousAndNextButtons(true);
WizardDialog dialog = new WizardDialog(PlatformUI.getWorkbench().getDisplay().getActiveShell(), connectionWizard);
dialog.setPageSize(500, 200);
dialog.open();
}
});
selectDataBtn.addMouseListener(new MouseAdapter() {
@Override
public void mouseDown(MouseEvent e) {
// no need to give the current connection, the called method will find the current selected nodes auto
openColumnsSelectionDialog(null);
}
});
// suggestBtn.addMouseListener(new MouseListener() {
//
// public void mouseDoubleClick(MouseEvent e) {
// // no need to implement
// }
//
// public void mouseDown(MouseEvent e) {
// // no need to give the current connection, the called method will find the current selected nodes auto
// suggestConfiguration();
// }
//
// public void mouseUp(MouseEvent e) {
// // no need to implement
// }
// });
registerEvents(dataSampleparentComposite);
}
use of org.talend.dataprofiler.core.ui.wizard.analysis.connection.ConnectionWizard in project tdq-studio-se by Talend.
the class AbstractAnalysisMetadataPage method createConnectionButton.
/**
* DOC talend Comment method "createConnectionButton".
*
* @param dataPreviewTableCom
*/
protected void createConnectionButton(final Composite dataPreviewTableCom, final Section dataPreviewSection) {
Button createConnectionButton = toolkit.createButton(dataPreviewTableCom, DefaultMessagesImpl.getString("ColumnMasterDetailsPage.createConnectionBtn"), // $NON-NLS-1$
SWT.NONE);
createConnectionButton.addMouseListener(new MouseAdapter() {
@Override
public void mouseDown(MouseEvent e) {
ConnectionWizard connectionWizard = new ConnectionWizard(PlatformUI.getWorkbench(), dataPreviewSection);
connectionWizard.setForcePreviousAndNextButtons(true);
WizardDialog dialog = new WizardDialog(PlatformUI.getWorkbench().getDisplay().getActiveShell(), connectionWizard);
dialog.setPageSize(500, 200);
dialog.open();
}
});
}
Aggregations