Project

General

Profile

« Previous | Next » 

Revision a5c3b1fd

Added by Katja Luther over 3 years ago

ref #8774: fix character creation

View differences:

eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/descriptiveDataSet/character/CharacterEditor.java
251 251
                    //add new Character to feature tree
252 252
                    CharacterNodeDto nodeDto = new CharacterNodeDto(CharacterDto.fromCharacter(character), parent, 0, parent.getTree(), null, null, null);
253 253
                    nodesToSave.put(character, nodeDto);
254
                    nodesToUpdate.add(nodeDto);
255 254
                    setDirty();
256 255
                    //                    result = CdmStore.getService(IFeatureNodeService.class).createChildFeatureNode(parent.getUuid(), character, vocabulary.getUuid());
257
//                    cdmEntitySession.load(result, true);
258
//                    if(result != null && result.getCdmEntity() != null){
259
//                        tree = (TermTree)((TermNode)result.getCdmEntity()).getGraph();
260
//                    }
256

  
261 257
                }
262 258
                if (tree != null){
263 259
                    characterTreeEditorComposite.setSelectedTree(tree);
......
377 373
                    //default label
378 374
                    label = structureNode.getTerm().getLabel()+" "+propertyNode.getTerm().getLabel();
379 375
                }
380
                Character character = Character.NewInstance(structureNode, structureNode, null, label, abbrevLabel);
376
                Character character = Character.NewInstance(structureNode, propertyNode, null, label, abbrevLabel);
381 377
                characters.add(character);
382 378

  
383 379
            }
......
430 426
    private void initializeTrees() {
431 427
        Object[] expandedElements = characterTreeEditorComposite.getViewer().getExpandedElements();
432 428
        characterTreeEditorComposite.getViewer().getTree().removeAll();
433
//        TermTree tree = (TermTree) characterTreeEditorComposite.getViewer().getInput();
434
//        cdmEntitySession.load(tree, true);
435
//        characterTreeEditorComposite.getViewer().setInput(tree);
436 429
        characterTreeEditorComposite.getViewer().setExpandedElements(expandedElements);
437 430
    }
438 431

  
......
485 478
    @Override
486 479
    public List<TermTreeDto> getRootEntities() {
487 480
        List<TermTreeDto> root = new ArrayList<>();
488
//        cdmEntitySession.load(characterTreeEditorComposite.getFeatureTree(), true);
489 481
        root.add(characterTreeEditorComposite.getFeatureTree());
490 482
        return root;
491 483
    }

Also available in: Unified diff