Examples of IStatus


Examples of org.eclipse.core.runtime.IStatus

        setMessage(null);

        String name = fProjText.getText().trim();
        if (name.length() > 0) {
            IWorkspace workspace = ResourcesPlugin.getWorkspace();
            IStatus status = workspace.validateName(name, IResource.PROJECT);
            if (status.isOK()) {
                IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject(name);
                if (!project.exists()) {
                    setErrorMessage(MessageFormat.format("Project {0} does not exist", new String[] { name}));
                    return false;
                }
                if (!project.isOpen()) {
                    setErrorMessage(MessageFormat.format("Project {0} is closed", new String[] { name}));
                    return false;
                }
            } else {
                setErrorMessage(MessageFormat.format("Illegal project name: {0}", new String[] { status.getMessage()}));
                return false;
            }
        }

        name = fMainText.getText().trim();
View Full Code Here

Examples of org.eclipse.core.runtime.IStatus

    protected void handleFieldChanged(String fieldName) {
        if (fieldName == TARGET_CLASS) {
            fFieldTypeStatus = updateFieldType();
        }
        IStatus status[] = new IStatus[] { fTargetClassStatus, fFieldTypeStatus };
        updateStatus(status);
    }
View Full Code Here

Examples of org.eclipse.core.runtime.IStatus

    protected void handleFieldChanged(String fieldName) {
        if (fieldName == TARGET_CLASS) {
            fArgumentTypesStatus = updateArgumentTypes();
        }
        IStatus status[] = new IStatus[] { fTargetClassStatus, fArgumentTypesStatus };
        updateStatus(status);
    }
View Full Code Here

Examples of org.eclipse.core.runtime.IStatus

        try {
            Bundle bundle = Platform.getBundle("ch.ethz.prose"); //$NON-NLS-1$
            URL url = bundle.getEntry("/");
            return Platform.asLocalURL(url).getPath();
        } catch (IOException e) {
            IStatus status = new Status(IStatus.ERROR, PLUGIN_ID, IStatus.OK,
                    "Could not determine path", e); //$NON-NLS-1$
            throw new CoreException(status);
        }
    }
View Full Code Here

Examples of org.eclipse.core.runtime.IStatus

        String targetClassName = getTargetExceptionName();
        if (targetClassName.length() == 0) {
            // accept the empty field (stands for java.lang.Object)
            return status;
        }
        IStatus val = JavaConventions.validateJavaTypeName(targetClassName);
        if (val.getSeverity() == IStatus.ERROR) {
            status.setError("Target exception name is not valid.");
            return status;
        }
        if (root != null) {
            try {
View Full Code Here

Examples of org.eclipse.core.runtime.IStatus

        private boolean isSourceAttachmentPossible(IPath containerPath,
            IJavaProject javaProject) {
            ClasspathContainerInitializer initializer = JavaCore
                .getClasspathContainerInitializer(containerPath
                    .segment(0));
            IStatus status = initializer.getSourceAttachmentStatus(
                containerPath, javaProject);
            if (status.getCode() == ClasspathContainerInitializer.ATTRIBUTE_NOT_SUPPORTED
                || status.getCode() == ClasspathContainerInitializer.ATTRIBUTE_READ_ONLY) {

                return false;
            }
            return true;
        }
View Full Code Here

Examples of org.eclipse.core.runtime.IStatus

   
    public static void log(Throwable t) {
        Throwable top = t;
        if (t instanceof DebugException) {
            DebugException de = (DebugException) t;
            IStatus status = de.getStatus();
            if (status.getException() != null) {
                top = status.getException();
            }
        }
        log(new Status(IStatus.ERROR, getUniqueIdentifier(),
            INTERNAL_ERROR, "Internal error in Drools Plugin: ", top));       
    }
View Full Code Here

Examples of org.eclipse.core.runtime.IStatus

    }

    public synchronized void replace(Object parent, Object[] children, int offset) {
        if (view != null) {
            if (children.length == 1 && children[0] instanceof DebugException) {
                IStatus status = ((DebugException)children[0]).getStatus();
                if (status != null) {
                    String message = status.getMessage();
                    if (message != null) {
                        view.showMessage(message);
                    }
                }
                return;
View Full Code Here

Examples of org.eclipse.core.runtime.IStatus

    identifier = name.substring(0, index);
    // JSR-175 metadata strongly recommends "package-info.java" as the
    // file in which to store package annotations and
    // the package-level spec (replaces package.html)
    if (!identifier.equals(PACKAGE_INFO)) {
      IStatus status = validateIdentifier(identifier, sourceLevel, complianceLevel);
      if (!status.isOK()) {
        return status;
      }
    }
    IStatus status = ResourcesPlugin.getWorkspace().validateName(name, IResource.FILE);
    if (!status.isOK()) {
      return status;
    }
    return JavaModelStatus.VERIFIED_OK;
  }
View Full Code Here

Examples of org.eclipse.core.runtime.IStatus

    identifier = name.substring(0, index);
    // JSR-175 metadata strongly recommends "package-info.java" as the
    // file in which to store package annotations and
    // the package-level spec (replaces package.html)
    if (!identifier.equals(PACKAGE_INFO)) {
      IStatus status = validateIdentifier(identifier, sourceLevel, complianceLevel);
      if (!status.isOK()) {
        return status;
      }
    }
    IStatus status = ResourcesPlugin.getWorkspace().validateName(name, IResource.FILE);
    if (!status.isOK()) {
      return status;
    }
    return JavaModelStatus.VERIFIED_OK;
  }
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.