// commit the conversation and start a new transaction immediately
conversation.commit(true);
- CdmStore.getService(IFeatureTreeService.class).merge(featureTree);
+ CdmStore.getService(IFeatureTreeService.class).saveOrUpdate(featureTree);
this.setDirty(false);
}
WizardDialog dialog = new WizardDialog(shell, wizard);
if (dialog.open() == IStatus.OK) {
- IStructuredSelection selection = (IStructuredSelection) composite.getViewer()
- .getSelection();
- FeatureNode parent = (FeatureNode) (selection.getFirstElement() != null ? selection
- .getFirstElement() : ((FeatureTree) composite.getViewer().getInput())
- .getRoot());
- Collection<Feature> additionalFeatures = wizard
- .getAdditionalFeatures();
- for (Feature feature : additionalFeatures) {
- FeatureNode child = FeatureNode.NewInstance(feature);
- parent.addChild(child);
- CdmStore.getService(IFeatureNodeService.class).save(child);
+ IStructuredSelection selection = (IStructuredSelection) composite.getViewer().getSelection();
+ FeatureNode parent = (FeatureNode) (selection.getFirstElement() != null ? selection.getFirstElement()
+ : ((FeatureTree) composite.getViewer().getInput()).getRoot());
+ Collection<Feature> additionalFeatures = wizard.getAdditionalFeatures();
+ for (Feature feature : additionalFeatures) {
+ CdmStore.getService(IFeatureNodeService.class).addChildFeaturNode(parent, feature);
}
setDirty(true);
composite.getViewer().refresh();
for (Object selectedObject : selection.toArray()) {
FeatureNode featureNode = (FeatureNode) selectedObject;
- FeatureNode parent = featureNode.getParent();
- parent.removeChild(featureNode);
-
CdmStore.getService(IFeatureNodeService.class).deleteFeatureNode(featureNode.getUuid(), new FeatureNodeDeletionConfigurator());
}