Change-Id: I744eb779d246e778fdb7a1f59ea07babf05c354c
Signed-off-by: Philippe Proulx <pproulx@efficios.com>
Reviewed-on: https://git.eclipse.org/r/74336
Reviewed-by: Matthew Khouzam <matthew.khouzam@ericsson.com>
Reviewed-by: Hudson CI
Reviewed-by: Alexandre Montplaisir <alexmonthy@efficios.com>
Tested-by: Alexandre Montplaisir <alexmonthy@efficios.com>
import org.eclipse.core.runtime.jobs.Job;
import org.eclipse.jdt.annotation.Nullable;
import org.eclipse.jface.dialogs.ErrorDialog;
import org.eclipse.core.runtime.jobs.Job;
import org.eclipse.jdt.annotation.Nullable;
import org.eclipse.jface.dialogs.ErrorDialog;
-import org.eclipse.jface.dialogs.IInputValidator;
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.jface.window.Window;
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.jface.window.Window;
Shell shell = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell();
ParameterDialog dialog = new ParameterDialog(shell, Messages.ParameterDialog_ExternalParameters,
Messages.ParameterDialog_ExternalParametersDescription,
Shell shell = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell();
ParameterDialog dialog = new ParameterDialog(shell, Messages.ParameterDialog_ExternalParameters,
Messages.ParameterDialog_ExternalParametersDescription,
- baseCommand,
- PARAM_STRING_VALIDATOR);
if (dialog.open() != Window.OK) {
/* User clicked Cancel, don't run */
return null;
if (dialog.open() != Window.OK) {
/* User clicked Cancel, don't run */
return null;
- private static final IInputValidator PARAM_STRING_VALIDATOR = text -> {
- if (text.isEmpty() || text.matches("[a-zA-Z0-9\\,\\-\\s]+")) { //$NON-NLS-1$
- return null;
- }
- return Messages.ParameterDialog_StringValidatorMessage;
- };
-
/**
* Register a new report
*
/**
* Register a new report
*