Package org.eclipse.core.runtime

Examples of org.eclipse.core.runtime.SubProgressMonitor.done()


    @SuppressWarnings("deprecation")
    public void run( IProgressMonitor monitor ) throws Exception {
        monitor.beginTask(Messages.WriteFeatureChangesCommand_runTask, 3);
        SubProgressMonitor subProgressMonitor = new SubProgressMonitor(monitor,1);
        editFeature = featureProvider.get(subProgressMonitor);
        subProgressMonitor.done();
        store = storeProvider.get(subProgressMonitor);
        if( editFeature==null || store==null ){
            noChange=true;
            return;
        }
View Full Code Here


        }
           
        SimpleFeatureType featureType = editFeature.getFeatureType();
        FilterFactory factory = CommonFactoryFinder.getFilterFactory(GeoTools.getDefaultHints());
        subProgressMonitor = new SubProgressMonitor(monitor,1);
        subProgressMonitor.done();
        filter = factory.id(FeatureUtils.stringToId(factory, editFeature.getID()));
        FeatureCollection<SimpleFeatureType, SimpleFeature>  results = store.getFeatures(filter);

        FeatureIterator<SimpleFeature> reader = results.features();
        try {
View Full Code Here

        monitor.worked(1);
        try {
            SubProgressMonitor subProgressMonitor = new SubProgressMonitor(monitor, 2);
            FeatureStore<SimpleFeatureType, SimpleFeature> destination = targetLayer.getResource(
                    FeatureStore.class, subProgressMonitor);
            subProgressMonitor.done();
            worked[0] += 2;
            subProgressMonitor = new SubProgressMonitor(monitor, 2);
            FeatureSource<SimpleFeatureType, SimpleFeature> source = sourceLayer.getResource(
                    FeatureSource.class, subProgressMonitor);
            subProgressMonitor.done();
View Full Code Here

            subProgressMonitor.done();
            worked[0] += 2;
            subProgressMonitor = new SubProgressMonitor(monitor, 2);
            FeatureSource<SimpleFeatureType, SimpleFeature> source = sourceLayer.getResource(
                    FeatureSource.class, subProgressMonitor);
            subProgressMonitor.done();
            worked[0] += 2;
            // If no FeatureStore then features can't be copied
            // If no FeatureSource then features can't be copied
            if (destination == null || source == null) {
                targetLayer.setFilter(filter);
View Full Code Here

                monitor.worked(15);
                SubProgressMonitor subMonitor = new SubProgressMonitor(monitor, 80);
                try {
                    process(input, subMonitor);
                } finally {
                    subMonitor.done();
                }
            } catch (IOException e) {
                throw new InvocationTargetException(e);
            } finally {
                if (input != null) {
View Full Code Here

        int steps = (int) ((double) 99 / (double) members.size());
        for( IResolve resolve : members ) {
            try {
                SubProgressMonitor subProgressMonitor = new SubProgressMonitor(monitor, steps);
                resolve.dispose(subProgressMonitor);
                subProgressMonitor.done();
            } catch (Throwable e) {
                ErrorManager.get().displayException(e,
                        "Error disposing members of catalog: " + getIdentifier(), CatalogPlugin.ID); //$NON-NLS-1$
            }
        }
View Full Code Here

                        }
                    }
                } catch (IOException e) {
                    CatalogPlugin.log("Could not search in service:" + serviceID, e);
                } finally {
                    submonitor.done();
                }
                Thread.yield(); // allow other threads to have a go... makes search view more responsive
            }
            return result;
        } finally {
View Full Code Here

                } catch (Throwable t) {
                    // usually indicates an IOException as the service is unable to connect
                    CatalogPlugin.trace("trouble connecting to " + service.getID(), t);
                }
            }
            monitor3.done();
        } finally {
            monitor.done();
        }
        return prioritise(availableServices, monitor); //return a prioritise list
    }
View Full Code Here

                        }
                    }
                } catch (IOException e) {
                    CatalogPlugin.log("Could not search in service:" + serviceID, e);
                } finally {
                    submonitor.done();
                }
                Thread.yield(); // allow other threads to have a go... makes search view more
                                // responsive
            }
            return result;
View Full Code Here

                int steps = (int) ((double) 99 / (double) members.size());
                for( IResolve resolve : members ) {
                    try {
                        SubProgressMonitor subProgressMonitor = new SubProgressMonitor(monitor, steps);
                        resolve.dispose(subProgressMonitor);
                        subProgressMonitor.done();
                    } catch (Throwable e) {
                        ErrorManager
                                .get()
                                .displayException(
                                        e,
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.