Package org.eclipse.jface.dialogs

Examples of org.eclipse.jface.dialogs.IInputValidator


    }

    @Override
    protected Object run( final Presentation context )
    {
        final IInputValidator inputValidator = new IInputValidator()
        {
            public String isValid( final String text )
            {
                if( text == null )
                {
View Full Code Here


     * @param search
     *      the Search to rename
     */
    protected void renameSearch( final ISearch search )
    {
        IInputValidator validator = new IInputValidator()
        {
            public String isValid( String newName )
            {
                if ( search.getName().equals( newName ) )
                    return null;
View Full Code Here

     * @param bookmark
     *      the Bookmark to rename
     */
    protected void renameBookmark( final IBookmark bookmark )
    {
        IInputValidator validator = new IInputValidator()
        {
            public String isValid( String newName )
            {
                if ( bookmark.getName().equals( newName ) )
                    return null;
View Full Code Here

     * @param connection
     *      the Connection to rename
     */
    private void renameConnection( final Connection connection )
    {
        IInputValidator validator = new IInputValidator()
        {
            public String isValid( String newName )
            {
                if ( connection.getName().equals( newName ) )
                {
View Full Code Here

     * @param connectionFolder
     *      the ConnectionFolder to rename
     */
    private void renameConnectionFolder( final ConnectionFolder connectionFolder )
    {
        IInputValidator validator = new IInputValidator()
        {
            public String isValid( String newName )
            {
                if ( connectionFolder.getName().equals( newName ) )
                {
View Full Code Here

        InputDialog dialog = new InputDialog(super.getShell(),
                                            Messages.getString("name.conflict"), //$NON-NLS-1$
                                            MessageFormat.format(Messages.getString("name.conflict.request"), //$NON-NLS-1$
                                                                new Object[] { conflictingFile.getName() }),
                                            Messages.getString("copy.of") + conflictingFile.getName(), //$NON-NLS-1$
        new IInputValidator() {
            public String isValid(String newText) {
                IFile temp = root.getFile(basePath.append(newText));
                if (temp == null
                   || !temp.exists()) {
                    return null;
View Full Code Here

        }

        public void run() {
            InputDialog d = new InputDialog(PyAction.getShell(), "Enter number of columns",
                    "Enter the number of columns to be used for the name.", ""
                            + PyCoveragePreferences.getNameNumberOfColumns(), new IInputValidator() {

                        public String isValid(String newText) {
                            if (newText.trim().length() == 0) {
                                return "Please enter a number > 5";
                            }
View Full Code Here

     */
    @Override
    protected String queryNewResourceName(final IResource resource) {
        final IWorkspace workspace = IDEWorkbenchPlugin.getPluginWorkspace();
        final IPath prefix = resource.getFullPath().removeLastSegments(1);
        IInputValidator validator = new IInputValidator() {
            public String isValid(String string) {
                if (resource.getName().equals(string)) {
                    return IDEWorkbenchMessages.RenameResourceAction_nameMustBeDifferent;
                }
                IStatus status = workspace.validateName(string, resource.getType());
View Full Code Here

        display.syncExec(new Runnable() {

            public void run() {

                //ask the filters to the user
                IInputValidator validator = null;

                IPreferenceStore prefs = PydevPlugin.getDefault().getPreferenceStore();
                InputDialog dialog = new InputDialog(display.getActiveShell(), "Custom Filters",

                "Enter the filters (separated by comma. E.g.: \"__init__.py, *.xyz\").\n" + "\n"
View Full Code Here

            @Override
            protected String[] getNewInputObject() {
                InputDialog d = new InputDialog(getShell(), "New entry",
                        "Add the entry in the format path_to_replace,new_path or path,DONTASK.", "",
                        new IInputValidator() {
                            public String isValid(String newText) {
                                String[] splitted = StringUtils.splitAndRemoveEmptyTrimmed(newText, ',').toArray(
                                        new String[0]);
                                if (splitted.length != 2) {
                                    return "Input must have 2 paths separated by a comma.";
View Full Code Here

TOP

Related Classes of org.eclipse.jface.dialogs.IInputValidator

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.