Package org.apache.directory.studio.connection.core

Examples of org.apache.directory.studio.connection.core.StudioProgressMonitor$CancelEvent


                // create new entry
                RDN rdn = entryToCopy.getRdn();
                IEntry newEntry = new Entry( parent, rdn );

                // change RDN if entry already exists
                StudioProgressMonitor testMonitor = new StudioProgressMonitor( monitor );
                IEntry testEntry = parent.getBrowserConnection().getEntry( newEntry.getDn(), testMonitor );
                if ( testEntry != null )
                {
                    String rdnValue = rdn.getValue();
                    String newRdnValue = BrowserCoreMessages.bind( BrowserCoreMessages.copy_n_of_s, "", rdnValue ); //$NON-NLS-1$
View Full Code Here


    /**
     * @see org.eclipse.core.runtime.jobs.Job#run(org.eclipse.core.runtime.IProgressMonitor)
     */
    protected final IStatus run( IProgressMonitor ipm )
    {
        StudioProgressMonitor monitor = new StudioProgressMonitor( externalProgressMonitor == null ? ipm
            : externalProgressMonitor );

        // execute job
        if ( !monitor.errorsReported() )
        {
            try
            {
                executeAsyncJob( monitor );
            }
            catch ( Exception e )
            {
                monitor.reportError( e );
            }
            finally
            {
                monitor.done();
                ipm.done();
            }
        }

        // error handling
        if ( monitor.isCanceled() )
        {
            // System.out.println("Job: CANCEL+CANCEL");
            externalResult = Status.CANCEL_STATUS;
            return Status.CANCEL_STATUS;
        }
        else if ( monitor.errorsReported() )
        {
            externalResult = monitor.getErrorStatus( getErrorMessage() );
            if ( externalProgressMonitor == null )
            {
                // System.out.println("Job: ERROR+ERROR");
                return externalResult;
            }
View Full Code Here


    protected final IStatus run( IProgressMonitor ipm )
    {

        StudioProgressMonitor monitor = new StudioProgressMonitor( externalProgressMonitor == null ? ipm
            : externalProgressMonitor );

        // ensure that connections are opened
        Connection[] connections = getConnections();
        for ( int i = 0; i < connections.length; i++ )
        {
            if ( connections[i] != null && !connections[i].getJNDIConnectionWrapper().isConnected() )
            {
                monitor.setTaskName( Messages.bind( Messages.jobs__open_connections_task, new String[]
                    { connections[i].getName() } ) );
                monitor.worked( 1 );

                connections[i].getJNDIConnectionWrapper().connect( monitor );
                connections[i].getJNDIConnectionWrapper().bind( monitor );
                ConnectionEventRegistry.fireConnectionOpened( connections[i], this );
            }
        }
       
        // execute job
        if ( !monitor.errorsReported() )
        {
            try
            {
                executeAsyncJob( monitor );
            }
            catch ( Exception e )
            {
                monitor.reportError( e );
            }
            finally
            {
                monitor.done();
                ipm.done();
            }
        }

        // error handling
        if ( monitor.isCanceled() )
        {
            // System.out.println("Job: CANCEL+CANCEL");
            externalResult = Status.CANCEL_STATUS;
            return Status.CANCEL_STATUS;
        }
        else if ( monitor.errorsReported() )
        {
            externalResult = monitor.getErrorStatus( getErrorMessage() );
            if ( externalProgressMonitor == null )
            {
                // System.out.println("Job: ERROR+ERROR");
                return externalResult;
            }
View Full Code Here

                {
                    ApacheDSSchemaExporter exporter = new ApacheDSSchemaExporter();
                    try
                    {
                        exporter.exportSchema( orderedSchemas, dependenciesComputer, project.getConnection().getJNDIConnectionWrapper(),
                            new StudioProgressMonitor( monitor ) );
                    }
                    catch ( NamingException e )
                    {
                        // TODO Auto-generated catch block
                        e.printStackTrace();
View Full Code Here

                // create new entry
                RDN rdn = entryToCopy.getRdn();
                IEntry newEntry = new Entry( parent, rdn );

                // change RDN if entry already exists
                StudioProgressMonitor testMonitor = new StudioProgressMonitor( monitor );
                IEntry testEntry = parent.getBrowserConnection().getEntry( newEntry.getDn(), testMonitor );
                if ( testEntry != null )
                {
                    String rdnValue = rdn.getValue();
                    String newRdnValue = BrowserCoreMessages.bind( BrowserCoreMessages.copy_n_of_s, "", rdnValue ); //$NON-NLS-1$
View Full Code Here

TOP

Related Classes of org.apache.directory.studio.connection.core.StudioProgressMonitor$CancelEvent

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.