use of org.eclipse.jface.wizard.Wizard 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.eclipse.jface.wizard.Wizard in project tdq-studio-se by Talend.
the class ExportParserRuleAction method run.
@Override
public void run() {
Wizard wizard = isForExchange ? new ExportForExchangeWizard(WorkbenchUtils.getFolder((RepositoryNode) parserRuleFolder).getFullPath().toString()) : new ExportParserRuleWizard(parserRuleFolder, isForExchange);
WizardDialog dialog = new WizardDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), wizard);
wizard.setWindowTitle(getText());
if (WizardDialog.OK == dialog.open()) {
try {
IFolder folder = WorkbenchUtils.getFolder((RepositoryNode) parserRuleFolder);
folder.refreshLocal(IResource.DEPTH_INFINITE, null);
} catch (CoreException e) {
log.error(e, e);
}
}
}
use of org.eclipse.jface.wizard.Wizard in project tdq-studio-se by Talend.
the class AnalyzeColumnCorrelationAction method openStandardAnalysisDialog.
private int openStandardAnalysisDialog(AnalysisType type) {
AnalysisLabelParameter parameter = new AnalysisLabelParameter();
checkSelectedColumn();
if (hasNumberColumn && hasDateColumn) {
// $NON-NLS-1$
MessageUI.openError(DefaultMessagesImpl.getString("AnalyzeColumnCorrelationAction.InvalidOperation"));
return Window.CANCEL;
} else if (hasNumberColumn && !hasDateColumn) {
parameter.setCategoryLabel(AnalysisLabelParameter.NUMBERIC_CORRELATION);
} else if (!hasNumberColumn && hasDateColumn) {
parameter.setCategoryLabel(AnalysisLabelParameter.DATE_CORRELATION);
} else {
parameter.setCategoryLabel(AnalysisLabelParameter.NOMINAL_CORRELATION);
}
Wizard wizard = WizardFactory.createAnalysisWizard(type, parameter);
wizard.setForcePreviousAndNextButtons(true);
WizardDialog dialog = new WizardDialog(null, wizard);
dialog.setPageSize(500, 340);
return dialog.open();
}
use of org.eclipse.jface.wizard.Wizard in project AutoRefactor by JnRouvignac.
the class ChooseRefactoringsWizardHandler method execute.
/**
* Execute.
*
* @param event The event
*
* @return An object
*
* @throws ExecutionException ExecutionException
*/
@Override
public Object execute(final ExecutionEvent event) throws ExecutionException {
final Shell shell = HandlerUtil.getActiveShell(event);
try {
// Retrieve the targeted java element before the menu item is disposed by the
// framework
final Wizard wizard = new ChooseCleanupsWizard(AutoRefactorHandler.getSelectedJavaElements(event));
final WizardDialog dialog = new WizardDialog(shell, wizard);
dialog.open();
} catch (final Exception e) {
Display.getDefault().asyncExec(() -> {
final StringWriter sw = new StringWriter();
final PrintWriter pw = new PrintWriter(sw);
e.printStackTrace(pw);
// $NON-NLS-1$ //$NON-NLS-2$
MessageDialog.openInformation(shell, "Info", "An error has occurred:\n\n" + sw);
});
}
return null;
}
use of org.eclipse.jface.wizard.Wizard in project egit by eclipse.
the class CommitJob method pushUpstream.
private void pushUpstream(final RevCommit commit, final PushMode pushTo) {
final RemoteConfig config = SimpleConfigurePushDialog.getConfiguredRemote(repository);
if (pushTo == PushMode.GERRIT || config == null) {
final Display display = PlatformUI.getWorkbench().getDisplay();
display.asyncExec(new Runnable() {
@Override
public void run() {
Wizard pushWizard = getPushWizard(commit, pushTo);
if (pushWizard != null) {
WizardDialog wizardDialog = new WizardDialog(display.getActiveShell(), pushWizard);
wizardDialog.setHelpAvailable(true);
wizardDialog.open();
}
}
});
} else {
PushOperationUI op = new PushOperationUI(repository, config.getName(), false);
op.start();
}
}
Aggregations