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());
+ FeatureNode parent = ((FeatureTree) composite.getViewer().getInput()).getRoot();
Collection<Feature> additionalFeatures = wizard.getAdditionalFeatures();
for (Feature feature : additionalFeatures) {
CdmStore.getService(IFeatureNodeService.class).addChildFeaturNode(parent, feature);