Package org.openstreetmap.josm.command

Examples of org.openstreetmap.josm.command.DeleteCommand


            }
        }

        //Delete all relations in the list
        relFix.remove(relationToKeep);
        commands.add(new DeleteCommand(relFix));
        return new SequenceCommand(tr("Delete duplicate relations"), commands);
    }
View Full Code Here


        }

        //Delete all ways in the list
        //Note: nodes are not deleted, these can be detected and deleted at next pass
        ways.remove(wayToKeep);
        commands.add(new DeleteCommand(ways));
        return new SequenceCommand(tr("Delete duplicate ways"), commands);
    }
View Full Code Here

    }

    @Override
    public Command fixError(TestError testError) {
        if (isFixable(testError)) {
            return new DeleteCommand(testError.getPrimitives());
        }
        return null;
    }
View Full Code Here

            } else {
                cmds.add(new ChangeNodesCommand(w, newNodes));
            }
        }
        if (!waysToDelete.isEmpty()) {
            cmds.add(new DeleteCommand(waysToDelete));
        }
        return cmds;
    }
View Full Code Here

                    cmds.add(new ChangeCommand(targetNode, newTargetNode));
                }
            }
            cmds.addAll(resultion);
            if (!nodesToDelete.isEmpty()) {
                cmds.add(new DeleteCommand(nodesToDelete));
            }
            if (!waysToDelete.isEmpty()) {
                cmds.add(new DeleteCommand(waysToDelete));
            }
            return new SequenceCommand(/* for correct i18n of plural forms - see #9110 */
                    trn("Merge {0} node", "Merge {0} nodes", nodes.size(), nodes.size()), cmds);
        } catch (UserCancelException ex) {
            return null;
View Full Code Here

        }

        commitCommands(marktr("Assemble new polygons"));

        for(Relation rel: relationsToDelete) {
            cmds.add(new DeleteCommand(rel));
        }

        commitCommands(marktr("Delete relations"));

        // Delete the discarded inner ways
View Full Code Here

        Collection<Command> cmds = new LinkedList<>();
        Way newWay = new Way(w);
        newWay.setNodes(newNodes);
        cmds.add(new ChangeCommand(w, newWay));
        cmds.add(new DeleteCommand(delNodes));
        w.getDataSet().clearSelection(delNodes);
        return new SequenceCommand(trn("Simplify Way (remove {0} node)", "Simplify Way (remove {0} nodes)", delNodes.size(), delNodes.size()), cmds);
    }
View Full Code Here

        LinkedList<Way> deletedWays = new LinkedList<>(ways);
        deletedWays.remove(targetWay);

        cmds.add(new ChangeCommand(targetWay, modifiedTargetWay));
        cmds.addAll(resolution);
        cmds.add(new DeleteCommand(deletedWays));
        final SequenceCommand sequenceCommand = new SequenceCommand(/* for correct i18n of plural forms - see #9110 */
                trn("Combine {0} way", "Combine {0} ways", ways.size(), ways.size()), cmds);

        return new Pair<Way, Command>(targetWay, sequenceCommand);
    }
View Full Code Here

TOP

Related Classes of org.openstreetmap.josm.command.DeleteCommand

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.