Project

General

Profile

« Previous | Next » 

Revision 50e9235a

Added by Niels Hoffmann over 12 years ago

Showing the correct label and improving the mneu

View differences:

eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/concept/handler/CreateConceptRelationHandler.java
27 27
import eu.etaxonomy.taxeditor.editor.Page;
28 28
import eu.etaxonomy.taxeditor.editor.name.TaxonNameEditor;
29 29
import eu.etaxonomy.taxeditor.editor.view.concept.operation.CreateConceptRelationOperation;
30
import eu.etaxonomy.taxeditor.model.TaxonRelationshipTypeInverseContainer;
30 31
import eu.etaxonomy.taxeditor.operation.AbstractPostOperation;
31 32
import eu.etaxonomy.taxeditor.operation.IPostOperationEnabled;
32 33
import eu.etaxonomy.taxeditor.parser.ParseHandler;
......
53 54
		
54 55
		Taxon relatedConcept = TaxonBaseSelectionDialog.selectTaxon(HandlerUtil.getActiveShell(event), editor.getConversationHolder());
55 56
				
56
		TaxonRelationshipType type = (TaxonRelationshipType) ((Event)event.getTrigger()).data;
57
		TaxonRelationshipTypeInverseContainer typeInverseContainer = (TaxonRelationshipTypeInverseContainer) ((Event)event.getTrigger()).data;
57 58
		
58 59
		IWorkbenchPart activePart = HandlerUtil.getActivePart(event);
59 60
		IPostOperationEnabled postOperationEnabled = (activePart instanceof IPostOperationEnabled) ? (IPostOperationEnabled) activePart : null;
60 61
		
61 62
		try {
62 63
			AbstractPostOperation operation = new CreateConceptRelationOperation(event.getCommand().getName(), 
63
					editor.getUndoContext(), editor.getTaxon(), relatedConcept, type, postOperationEnabled);
64
					editor.getUndoContext(), editor.getTaxon(), relatedConcept, typeInverseContainer, postOperationEnabled);
64 65
			EditorUtil.executeOperation(operation);
65 66
		} catch (NotDefinedException e) {
66
			logger.warn("Command name not set");
67
			EditorUtil.warn(getClass(), "Command name not set");
67 68
		}
68 69
		
69 70
		return null;

Also available in: Unified diff