Project

General

Profile

Revision 04e5e29a

ID04e5e29a58b8ba472a4fc30558e89d9d1d1ee9d0
Parent adacf42f
Child 9122a3ce

Added by Patrick Plitzner over 3 years ago

minor refactoring

View differences:

eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/descriptiveDataSet/character/CharacterEditor.java
30 30
import org.eclipse.jface.viewers.ISelectionChangedListener;
31 31
import org.eclipse.jface.viewers.IStructuredSelection;
32 32
import org.eclipse.jface.viewers.SelectionChangedEvent;
33
import org.eclipse.jface.viewers.TreePath;
33 34
import org.eclipse.jface.viewers.TreeSelection;
34 35
import org.eclipse.swt.SWT;
35 36
import org.eclipse.swt.custom.SashForm;
......
220 221
                        Character character = Character.NewInstance(structureNode, propertyNode, "", label, label);
221 222
                        character = HibernateProxyHelper.deproxy(CdmStore.getService(ITermService.class).merge(character), Character.class);
222 223

  
223
                        //add new Character to feature tree
224
                        FeatureNode parent = ((FeatureTree) characterTreeEditorComposite.getViewer().getInput()).getRoot();
225
                        CdmStore.getService(IFeatureNodeService.class).addChildFeatureNode(parent.getUuid(), character.getUuid());
224
                        addCharacterSorted(character);
226 225
                    }
227 226
                }
228 227

  
......
232 231
        });
233 232
    }
234 233

  
234
    private void addCharacterSorted(Character character){
235
        //add new Character to feature tree
236
        FeatureNode parent = ((FeatureTree) characterTreeEditorComposite.getViewer().getInput()).getRoot();
237
        CdmStore.getService(IFeatureNodeService.class).addChildFeatureNode(parent.getUuid(), character.getUuid());
238
    }
239

  
235 240
    @Override
236 241
    @Persist
237 242
    public void save(IProgressMonitor monitor){

Also available in: Unified diff

Add picture from clipboard (Maximum size: 40 MB)