@@ -0,0 +1,1391 @@
+package org.geomajas.plugin.editing.client.operation;%0A%0Aimport org.geomajas.geometry.Geometry;%0Aimport org.geomajas.plugin.editing.client.service.GeometryEditService;%0Aimport org.geomajas.plugin.editing.client.service.GeometryEditState;%0Aimport org.geomajas.plugin.editing.client.service.GeometryIndex;%0A%0Apublic class ChangeInsertingStateOperation implements GeometryIndexOperation %7B%0A%0A%09private final GeometryEditService service;%0A%0A%09private final GeometryEditState previousState;%0A%0A%09private final GeometryEditState state;%0A%0A%09private GeometryIndex index;%0A%0A%09/**%0A%09 * Initialize this operation with an indexing service.%0A%09 * %0A%09 * @param service geometry index service.%0A%09 * @param child The child geometry to insert.%0A%09 */%0A%09public ChangeInsertingStateOperation(GeometryEditService service, GeometryEditState state) %7B%0A%09%09this.service = service;%0A%09%09this.state = state;%0A%09%09previousState = service.getEditingState();%0A%09%7D%0A%0A%09@Override%0A%09public Geometry execute(Geometry geometry, GeometryIndex index) throws GeometryOperationFailedException %7B%0A%09%09this.index = index;%0A%09%09if(state == GeometryEditState.INSERTING) %7B%0A%09%09%09service.setInsertIndex(index);%0A%09%09%7D%0A%09%09service.setEditingState(state);%0A%09%09return geometry;%0A%09%7D%0A%0A%09@Override%0A%09public GeometryIndexOperation getInverseOperation() %7B%0A%09%09return new ChangeInsertingStateOperation(service, previousState);%0A%09%7D%0A%0A%09@Override%0A%09public GeometryIndex getGeometryIndex() %7B%0A%09%09return index;%0A%09%7D%0A%0A%7D

add operation for stop/restart inserting