Package org.eclipse.core.runtime

Examples of org.eclipse.core.runtime.IStatus


        return new Status(IStatus.ERROR, NewBuilder.PLUGIN_ID, flag.getValue(), s, null);
    }

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

        try {
            IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject(builder.getBase().getName());
            IJavaProject javaProject = JavaCore.create(project);
            Map<String,String> sourceOutputLocations = JavaProjectUtils.getSourceOutputLocations(javaProject);
View Full Code Here


        return new Status(IStatus.WARNING, NewBuilder.PLUGIN_ID, flag.getValue(), s, null);
    }

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

        try {
            IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject(builder.getBase().getName());
            IJavaProject javaProject = JavaCore.create(project);
View Full Code Here

    /*
     * @see org.eclipse.jdt.ui.wizards.NewContainerWizardPage#containerChanged()
     */
    @Override
    protected IStatus containerChanged() {
        IStatus status = super.containerChanged();
        IPackageFragmentRoot root = getPackageFragmentRoot();
        if ((fTypeKind == ANNOTATION_TYPE || fTypeKind == ENUM_TYPE) && !status.matches(IStatus.ERROR)) {
            if (root != null && !JavaModelUtil.is50OrHigher(root.getJavaProject())) {
                // error as createType will fail otherwise (bug 96928)
                return new StatusInfo(IStatus.ERROR, Messages.format(NewWizardMessages.NewTypeWizardPage_warning_NotJDKCompliant, BasicElementLabels.getJavaElementName(root.getJavaProject().getElementName())));
            }
            if (fTypeKind == ENUM_TYPE) {
View Full Code Here

        IJavaProject project = root != null ? root.getJavaProject() : null;

        String packName = getPackageText();
        if (packName.length() > 0) {
            IStatus val = validatePackageName(packName, project);
            if (val.getSeverity() == IStatus.ERROR) {
                status.setError(Messages.format(NewWizardMessages.NewTypeWizardPage_error_InvalidPackageName, val.getMessage()));
                return status;
            } else if (val.getSeverity() == IStatus.WARNING) {
                status.setWarning(Messages.format(NewWizardMessages.NewTypeWizardPage_warning_DiscouragedPackageName, val.getMessage()));
                // continue
            }
        } else {
            status.setWarning(NewWizardMessages.NewTypeWizardPage_warning_DefaultPackageDiscouraged);
        }
View Full Code Here

            status.setError(NewWizardMessages.NewTypeWizardPage_error_QualifiedName);
            return status;
        }

        IJavaProject project = getJavaProject();
        IStatus val = validateJavaTypeName(typeName, project);
        if (val.getSeverity() == IStatus.ERROR) {
            status.setError(Messages.format(NewWizardMessages.NewTypeWizardPage_error_InvalidTypeName, val.getMessage()));
            return status;
        } else if (val.getSeverity() == IStatus.WARNING) {
            status.setWarning(Messages.format(NewWizardMessages.NewTypeWizardPage_warning_TypeNameDiscouraged, val.getMessage()));
            // continue checking
        }

        // must not exist
        if (!isEnclosingTypeSelected()) {
View Full Code Here

    @Override
    public IStatus validateDrop(Object target, int operation,
            TransferData transferType) {
        if (target instanceof JcrNode) {
            JcrNode jcrNode = (JcrNode)target;
            IStatus result = jcrNode.validateDrop(operation, transferType);
            if (!result.isOK()) {
                // check for details to be shown in the status bar
                final String message = result.getMessage();
                if (message!=null && message.trim().length()>0) {
                    StatusLineUtils.setErrorMessage(2000, message);
                } else {
                    StatusLineUtils.resetErrorMessage();
                }
View Full Code Here

            return Status.CANCEL_STATUS;
        }
        JcrNode node = (JcrNode)aTarget;
        if (LocalSelectionTransfer.getTransfer().isSupportedType(aDropAdapter.getCurrentTransfer())) {
            try {
                IStatus status = node.handleDrop(aDropTargetEvent.data, aDropTargetEvent.detail);
                if (!status.isOK()) {
                    final String message = status.getMessage();
                    if (message!=null && message.trim().length()>0) {
                        StatusLineUtils.setErrorMessage(5000, message);
                    }
                }
                return status;
View Full Code Here

        {
            public void widgetSelected( SelectionEvent e )
            {
                Connection connection = getTestConnection();
                CheckBindRunnable runnable = new CheckBindRunnable( connection );
                IStatus status = RunnableContextRunner.execute( runnable, runnableContext, true );
                if ( status.isOK() )
                {
                    MessageDialog.openInformation( Display.getDefault().getActiveShell(), Messages
                        .getString( "AuthenticationParameterPage.CheckAuthentication" ), //$NON-NLS-1$
                        Messages.getString( "AuthenticationParameterPage.AuthenticationSuccessfull" ) ); //$NON-NLS-1$
                }
View Full Code Here

        {
            throw new CoreException( new Status( IStatus.ERROR, BrowserUIConstants.PLUGIN_ID, Messages
                .getString( "LdifEntryEditorDocumentProvider.InvalidDN" ) ) ); //$NON-NLS-1$
        }

        IStatus status = input.saveSharedWorkingCopy( false, editor );
        if ( status != null && !status.isOK() )
        {
            BrowserUIPlugin.getDefault().getLog().log( status );
            throw new CoreException( status );
        }
    }
View Full Code Here

                    if ( search.getBrowserConnection() != null )
                    {
                        search.setSearchResults( null );
                        SearchRunnable runnable = new SearchRunnable( new ISearch[]
                            { search } );
                        IStatus status = RunnableContextRunner.execute( runnable, getContainer(), true );
                        if ( status.isOK() )
                        {
                            ISearchResult[] srs = search.getSearchResults();
                            dns = new LdapDN[srs.length];
                            for ( int i = 0; i < srs.length; i++ )
                            {
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.