Package org.eclipse.core.runtime

Examples of org.eclipse.core.runtime.IStatus


import org.eclipse.jface.viewers.Viewer;

public class StatusTreeContentProvider implements ITreeContentProvider {

    public Object[] getElements(Object inputElement) {
        IStatus rootStatus = (IStatus) inputElement;
        if (rootStatus.isMultiStatus()) {
            return rootStatus.getChildren();
        }
        return new Object[] {
            rootStatus
        };
    }
View Full Code Here


    public void dispose() {}

    public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {}

    public Object[] getChildren(Object parentElement) {
        IStatus status = (IStatus) parentElement;
        return status.getChildren();
    }
View Full Code Here

            return new Status(IStatus.ERROR, Plugin.PLUGIN_ID, 0, "Project location invalid or not specified.", null);
        if (useBndWorkspace && (projectName == null || projectName.length() == 0))
            return new Status(IStatus.ERROR, Plugin.PLUGIN_ID, 0, "Project name must be specified", null);

        // Check valid name
        IStatus nameStatus = JavaPlugin.getWorkspace().validateName(projectName != null ? projectName : "", IResource.PROJECT);
        if (!nameStatus.isOK())
            return nameStatus;

        // Check if project name already exists
        IProject existingProject = JavaPlugin.getWorkspace().getRoot().getProject(projectName);
        if (existingProject.exists())
View Full Code Here

        return Status.OK_STATUS;
    }

    private void validate() {
        IStatus oldStatus = status;
        status = checkStatus();
        propSupport.firePropertyChange(PROP_STATUS, oldStatus, status);
    }
View Full Code Here

                return;
            }

            // Create resolver job and pre-validate
            final ResolveJob job = new ResolveJob(model);
            IStatus validation = job.validateBeforeRun();
            if (!validation.isOK()) {
                String message = "Unable to run the resolver. NB.: the file will still be saved.";
                ErrorDialog.openError(shell, "Resolution Validation Problem", message, validation, IStatus.ERROR | IStatus.WARNING);
                reallySave(monitor);
                return;
            }
View Full Code Here

            }
        });

        locationGroup.addPropertyChangeListener(new PropertyChangeListener() {
            public void propertyChange(PropertyChangeEvent event) {
                IStatus status = locationGroup.getStatus();
                setPageComplete(status.isOK());
                if (status.isOK()) {
                    setErrorMessage(null);
                } else {
                    setErrorMessage(status.getMessage());
                }
            }
        });
    }
View Full Code Here

                setPageComplete(false);
                return;
            }

            // check whether the project name is valid
            @SuppressWarnings("unused")
            final IStatus nameStatus = workspace.validateName(name, IResource.PROJECT);
            if (!nameStatus.isOK()) {
                setErrorMessage(nameStatus.getMessage());
                setPageComplete(false);
                return;
            }

            // check whether project already exists
View Full Code Here

        return validators;
    }

    void validate(Builder builder, List<IValidator> validators) {
        for (IValidator validator : validators) {
            IStatus status = validator.validate(builder);
            if (!status.isOK())
                validationResults.add(status);
        }
    }
View Full Code Here

        return validators;
    }

    void validate(Builder builder, List<IValidator> validators) {
        for (IValidator validator : validators) {
            IStatus status = validator.validate(builder);
            if (!status.isOK())
                validationResults.add(status);
        }
    }
View Full Code Here

import aQute.bnd.osgi.Builder;

public class BsnValidator implements IValidator {

    public IStatus validate(Builder builder) {
        IStatus status = Status.OK_STATUS;

        // Get actual BSN
        String actual = builder.getBsn();

        // Get expected BSN from file name
View Full Code Here

TOP

Related Classes of org.eclipse.core.runtime.IStatus

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.