// License: GPL. For details, see LICENSE file. package org.openstreetmap.josm.command; import static org.openstreetmap.josm.tools.I18n.trn; import java.util.ArrayList; import java.util.Collection; import java.util.List; import javax.swing.JLabel; import javax.swing.tree.DefaultMutableTreeNode; import javax.swing.tree.MutableTreeNode; import org.openstreetmap.josm.data.osm.OsmPrimitive; import org.openstreetmap.josm.data.osm.PrimitiveData; public class AddPrimitivesCommand extends Command { private final List data = new ArrayList(); public AddPrimitivesCommand(List data) { this.data.addAll(data); } @Override public boolean executeCommand() { List createdPrimitives = new ArrayList(data.size()); for (PrimitiveData pd:data) { createdPrimitives.add(getLayer().data.getPrimitiveById(pd, true)); } for (int i=0; i modified, Collection deleted, Collection added) { // Does nothing because we don't want to create OsmPrimitives. } }