}
GeometryOperationAnimation animation = new GeometryOperationAnimation(
EditGeomPathIterator.getPathIterator(editGeom).toShape(),
new IsBusyStateProvider(handler));
UndoableMapCommand startAnimationCommand = drawfactory.createStartAnimationCommand(
display, Collections.singletonList((IAnimation) animation));
commands.add(startAnimationCommand);
if (isCurrentGeometry(handler, editGeom)) {
if (isCreatingNewFeature(handler)) {
int attributeCount = schema.getAttributeCount();
SimpleFeature feature;
try {
feature = SimpleFeatureBuilder.template(schema, "newFeature"
+ new Random().nextInt());
// feature = SimpleFeatureBuilder.build(schema, new
// Object[attributeCount],"newFeature");
feature.setDefaultGeometry(geom);
} catch (IllegalAttributeException e) {
throw new IllegalStateException(
"Could not create an empty " + schema.getTypeName() + ":" + e, e); //$NON-NLS-1$//$NON-NLS-2$
}
CreateFeatureCommand.runFeatureCreationInterceptors(feature);
// FeaturePanelProcessor panels = ProjectUIPlugin.getDefault()
// .getFeaturePanelProcessor();
// List<FeaturePanelEntry> popup = panels.search(schema);
// if (popup.isEmpty()) {
CreateAndSelectNewFeature newFeatureCommand = new CreateAndSelectNewFeature(
handler.getCurrentGeom(), feature, layer, deselectCreatedFeatures);
commands.add(newFeatureCommand);
// } else {
// CreateDialogAndSelectNewFeature newFeatureCommand = new
// CreateDialogAndSelectNewFeature(
// handler.getCurrentGeom(), feature, layer, deselectCreatedFeatures,
// popup);
// commands.add(newFeatureCommand);
// }
} else {
// not creating it so don't need to set it.
UndoableMapCommand setGeometryCommand = new SetGeometryCommand(editGeom
.getFeatureIDRef().get(), new StaticBlockingProvider<ILayer>(layer),
SetGeometryCommand.DEFAULT, geom);
commands.add(setGeometryCommand);
}
} else {