Examples of StatusInfo


Examples of org.erlide.ui.util.StatusInfo

        }
        return l;
    }

    public static IStatus validatePositiveNumber(final String number) {
        final StatusInfo status = new StatusInfo();
        if (number.length() == 0) {
            status.setError(ErlEditorMessages.ErlEditorPreferencePage_empty_input);
        } else {
            try {
                final int value = Integer.parseInt(number);
                if (value < 0) {
                    status.setError(MessageFormat.format(
                            ErlEditorMessages.ErlEditorPreferencePage_invalid_input,
                            (Object[]) new String[] { number }));
                }
            } catch (final NumberFormatException e) {
                status.setError(MessageFormat.format(
                        ErlEditorMessages.ErlEditorPreferencePage_invalid_input,
                        (Object[]) new String[] { number }));
            }
        }
        return status;
View Full Code Here

Examples of org.erlide.ui.util.StatusInfo

        super(shell);
        setShellStyle(getShellStyle() | SWT.RESIZE);
        fRequestor = requestor;
        fStatuses = new IStatus[5];
        for (int i = 0; i < fStatuses.length; i++) {
            fStatuses[i] = new StatusInfo();
        }
        fEditedRuntime = editedVM;
    }
View Full Code Here

Examples of org.erlide.ui.util.StatusInfo

        setLocationStatus(validateLocation());
        updateStatusLine();
    }

    protected IStatus validateName() {
        final StatusInfo status = new StatusInfo();
        final String name = fName.getText();
        if (name == null || name.trim().length() == 0) {
            status.setError("Enter the runtime's name"); //$NON-NLS-1$
        } else {
            if (fRequestor.isDuplicateName(name)
                    && (fEditedRuntime == null || !name.equals(fEditedRuntime.getName()))) {
                status.setError("The name is already used"); //$NON-NLS-1$
            } else {
                final IStatus s = ResourcesPlugin.getWorkspace().validateName(name,
                        IResource.FILE);
                if (!s.isOK()) {
                    status.setError(MessageFormat.format("Name is invalid: %s",
                            (Object[]) new String[] { s.getMessage() }));
                }
            }
        }
        return status;
View Full Code Here

Examples of org.erlide.ui.util.StatusInfo

        }
        return status;
    }

    protected IStatus validateLocation() {
        final StatusInfo status = new StatusInfo();
        final String loc = fOtpHome.getText();
        if (loc == null || loc.trim().length() == 0) {
            status.setInfo("Enter the installation's location");
        } else {
            final File f = new File(loc);
            if (!f.exists()) {
                status.setError("Location doesn't exist");
            } else if (!f.isDirectory()) {
                status.setError("Location isn't a directory");
            } else if (!RuntimeInfo.validateLocation(loc)) {
                status.setError("Location is not a valid OTP home");
            }
        }
        return status;
    }
View Full Code Here

Examples of org.erlide.ui.util.StatusInfo

        dialogSettings.put(DIALOG_SETTINGS_SHOW_ALL, !selected);
    }

    void doSelectionChanged(final Object[] objects) {
        if (objects.length != 1) {
            updateStatus(new StatusInfo(IStatus.ERROR, "")); //$NON-NLS-1$
            setSelectionResult(null);
        } else {
            updateStatus(new StatusInfo());
            setSelectionResult(objects);
        }
    }
View Full Code Here

Examples of org.jboss.capedwarf.common.data.StatusInfo

*
* @author <a href="mailto:ales.justin@jboss.org">Ales Justin</a>
*/
public abstract class StatusInfoAbstractAction extends JSONAwareAbstractAction<StatusInfo> {
    protected StatusInfo errorResult() {
        return new StatusInfo(Status.ERROR);
    }
View Full Code Here

Examples of org.nbgit.StatusInfo

        sheet.put(ps);
        setSheet(sheet);
    }

    private void refreshHtmlDisplayName() {
        StatusInfo info = node.getInformation();
        int status = info.getStatus();
        // Special treatment: Mergeable status should be annotated as Conflict in Versioning view according to UI spec
        if (status == StatusInfo.STATUS_VERSIONED_MERGE) {
            status = StatusInfo.STATUS_VERSIONED_CONFLICT;
        }
        htmlDisplayName = HtmlFormatter.getInstance().annotateNameHtml(node.getFile().getName(), info, null);
View Full Code Here

Examples of org.python.pydev.plugin.StatusInfo

                    if (dialog.open() == Window.OK) {
                        Object firstResult = dialog.getFirstResult();
                        if (firstResult instanceof IProject) {
                            found[0] = firstResult;
                        } else {
                            found[0] = new CoreException(new StatusInfo(IStatus.ERROR,
                                    "Expected project to be selected."));
                        }
                    }
                }
            });
            if (found[0] == null) {
                return null;
            }
            if (found[0] instanceof IProject) {
                project = (IProject) found[0];
            } else {
                if (found[0] instanceof CoreException) {
                    throw (CoreException) found[0];
                } else {
                    throw new CoreException(new StatusInfo(IStatus.ERROR, "Expected project, found: " + found[0]));
                }
            }
        }
        IInterpreterManager pythonInterpreterManager = getInterpreterManager(project);
        String projName = project.getName();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.