Project

General

Profile

« Previous | Next » 

Revision df79e53c

Added by Katja Luther almost 7 years ago

code cleaning

View differences:

eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/newWizard/NewTaxonNodeWizard.java
108 108
        if(getSelection() != null){
109 109
            Object selectedObject = getSelection().getFirstElement();
110 110
            if(selectedObject instanceof ITaxonTreeNode){
111
                ITaxonTreeNode treeNode = (ITaxonTreeNode) selectedObject;
112

  
113
                if(treeNode instanceof Classification){
114
                    //FIXME can this ever happen?
115
                    return CdmStore.getService(IClassificationService.class).load(treeNode.getUuid());
116
                }
117
                else if(treeNode instanceof TaxonNode){
118
                	TaxonNode node =  CdmStore.getService(ITaxonNodeService.class).load(treeNode.getUuid());
119
                	if(node.getTaxon()!=null){
120
                	    //FIXME this taxon is not used. Do we need this call?
121
                	    Taxon taxon = (Taxon) CdmStore.getService(ITaxonService.class).load(node.getTaxon().getUuid());
122
                	}
123
                	else if(node.getClassification()!=null){
124
                	    return CdmStore.getService(IClassificationService.class).load(node.getClassification().getUuid());
125
                	}
126
                    return node;
127
                }
111
            	ITaxonTreeNode treeNode = (ITaxonTreeNode) selectedObject;
112

  
113
            	if(treeNode instanceof TaxonNode){
114
	            	TaxonNode node =  CdmStore.getService(ITaxonNodeService.class).load(treeNode.getUuid());
115
	            	if(node.getTaxon()!=null){
116
	            	    //FIXME this taxon is not used. Do we need this call?
117
	            	    Taxon taxon = (Taxon) CdmStore.getService(ITaxonService.class).load(node.getTaxon().getUuid());
118
	            	}
119
	            	else if(node.getClassification()!=null){
120
	            	    return CdmStore.getService(IClassificationService.class).load(node.getClassification().getUuid());
121
	            	}
122
	                return node;
123
            	}
128 124
            }
129 125
        }
130 126

  

Also available in: Unified diff