Package org.locationtech.udig.project.command

Examples of org.locationtech.udig.project.command.PostDeterminedEffectCommand


                        if( c==null )
                            continue;
                        IProgressMonitor submonitor = new SubProgressMonitor(monitor, 10);
                        c.setMap(getMap());
                        if (c instanceof PostDeterminedEffectCommand) {
                            PostDeterminedEffectCommand command = (PostDeterminedEffectCommand) c;
                            if( command.execute(submonitor) )
                                commandsRan.add(command);
                        }else{
                        c.run(submonitor);
                        commandsRan.add(c);
                        }
                        submonitor.done();
                    }catch(Exception e){
                        behaviour.handleError(handler, e, c);
                    }
                }
            }
        }else{
            monitor.beginTask(getName(), commandsRan.size()*12);
            monitor.worked(2);
            for( UndoableMapCommand command : commandsRan ) {
                command.setMap(getMap());
                IProgressMonitor submonitor = new SubProgressMonitor(monitor, 10);
                if (command instanceof PostDeterminedEffectCommand) {
                    ((PostDeterminedEffectCommand)command).execute(submonitor);
                }else{
                    command.run(submonitor);
                }
                submonitor.done();
            }
        }
        monitor.done();
View Full Code Here


       
        UndoableMapCommand command = behavior.getCommand(handler, event, EventType.RELEASED);
       
        command.setMap((Map) handler.getContext().getMap());
        if (command instanceof PostDeterminedEffectCommand) {
            PostDeterminedEffectCommand c = (PostDeterminedEffectCommand) command;
            c.execute(new NullProgressMonitor());
        }else{
            command.run(new NullProgressMonitor());
        }
       
        assertEquals("Current shape should equal new hole", editGeom.getHoles().get(0), handler.getCurrentShape()); //$NON-NLS-1$
View Full Code Here

                        if( c==null )
                            continue;
                        c.setMap(getMap());
                        IProgressMonitor submonitor = new SubProgressMonitor(monitor, 10);
                        if (c instanceof PostDeterminedEffectCommand) {
                            PostDeterminedEffectCommand command = (PostDeterminedEffectCommand) c;
                            if( command.execute(submonitor) )
                                commandsRan.add(command);
                        }else{
                        c.run(submonitor);
                        commandsRan.add(c);
                        }
                        submonitor.done();
                    }catch(Exception e){
                      EditPlugin.trace( e.getClass().getName()+" executing "+c+":"+e.getMessage(), e);
                        behaviour.handleError(handler, e, c);
                    }
                }
            }
        }else{
            monitor.beginTask(getName(), commandsRan.size()*12);
            monitor.worked(2);
            for( UndoableMapCommand command : commandsRan ) {
                command.setMap(getMap());
                IProgressMonitor submonitor = new SubProgressMonitor(monitor, 10);
                if (command instanceof PostDeterminedEffectCommand) {
                    ((PostDeterminedEffectCommand)command).execute(submonitor);
                }else{
                    command.run(submonitor);
                }
                submonitor.done();
            }
        }
        return !commandsRan.isEmpty();
View Full Code Here

TOP

Related Classes of org.locationtech.udig.project.command.PostDeterminedEffectCommand

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.