Project

General

Profile

Revision d37de08a

IDd37de08adba8d2e05635510d48d5ecd7295bc0b8
Parent 05030527
Child fa39cfe4

Added by Katja Luther almost 4 years ago

adaptions for polytomous key editing to avoid null values in children list

View differences:

eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/key/polytomous/PolytomousKeyGraphContentProvider.java
1 1
// $Id$
2 2
/**
3 3
 * Copyright (C) 2007 EDIT
4
 * European Distributed Institute of Taxonomy 
4
 * European Distributed Institute of Taxonomy
5 5
 * http://www.e-taxonomy.eu
6
 * 
6
 *
7 7
 * The contents of this file are subject to the Mozilla Public License Version 1.1
8 8
 * See LICENSE.TXT at the top of this package for the full license terms.
9 9
 */
......
21 21
import eu.etaxonomy.taxeditor.model.PolytomousKeyRelationship;
22 22

  
23 23
/**
24
 * 
24
 *
25 25
 * @author n.hoffmann
26 26
 * @created Mar 30, 2011
27 27
 * @version 1.0
......
55 55
		List<PolytomousKeyNode> children;
56 56

  
57 57
		if (parent instanceof PolytomousKeyNode) {
58
			((PolytomousKeyNode) parent).removeNullValueFromChildren();
58 59
			children = ((PolytomousKeyNode) parent).getChildren();
59 60
		} else if (parent instanceof PolytomousKey) {
60 61
			children = new ArrayList<PolytomousKeyNode>();
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/key/polytomous/operation/DeleteNodeOperation.java
13 13
import eu.etaxonomy.cdm.api.application.ICdmApplicationConfiguration;
14 14
import eu.etaxonomy.cdm.api.service.DeleteResult;
15 15
import eu.etaxonomy.cdm.api.service.IPolytomousKeyNodeService;
16
import eu.etaxonomy.cdm.hibernate.HibernateProxyHelper;
16 17
import eu.etaxonomy.cdm.model.description.PolytomousKeyNode;
17 18
import eu.etaxonomy.taxeditor.bulkeditor.internal.TaxeditorBulkeditorPlugin;
18 19
import eu.etaxonomy.taxeditor.model.MessagingUtils;
......
33 34
	public DeleteNodeOperation(String label, IUndoContext undoContext,
34 35
			PolytomousKeyNode node, IPostOperationEnabled postOperationEnabled) {
35 36
	    super(label, undoContext, node, postOperationEnabled);
37
	    HibernateProxyHelper.deproxy(node, PolytomousKeyNode.class);
36 38
		this.node = node;
37 39
		this.parent = node.getParent();
38 40
	}
......
55 57

  
56 58
		IPolytomousKeyNodeService service = controller.getPolytomousKeyNodeService();
57 59
		DeleteResult result;
60

  
58 61
		if (node.getChildren().size()>0){
59 62
			if(! MessageDialog.openQuestion(null, "Confirm deletion of children", "The selected node has children, do you want to delete them, too?")) {
60 63
				result = service.delete(node.getUuid(), false);

Also available in: Unified diff

Add picture from clipboard (Maximum size: 40 MB)