Project

General

Profile

« Previous | Next » 

Revision 0858c777

Added by Katja Luther almost 3 years ago

ref #8471: disable computed descriptions

View differences:

eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/descriptive/e4/handler/DynamicFeatureMenuE4.java
55 55
        Object selectedElement = selection.getFirstElement();
56 56

  
57 57
        if (selectedElement instanceof DescriptionBase<?>) {
58
            if (((DescriptionBase<?>) selectedElement).isComputed()){
59
                items.remove(menu);
60
                return;
61
            }
58 62
            TermTree<?> featureTree = getFeatureTree((DescriptionBase<?>) selectedElement);
59 63

  
60 64
            for (TermNode<?> childNode : featureTree.getRootChildren()) {
61 65
                createMenuItem(menu, childNode.getTerm(), globalLanguage);
62 66
            }
63 67
        } else if (selectedElement instanceof FeatureNodeContainer) {
68
            if (((FeatureNodeContainer) selectedElement).getDescription().isComputed()){
69
                items.remove(menu);
70
                return;
71
            }
64 72
            TermNode<?> featureNode = ((FeatureNodeContainer) selectedElement)
65 73
                    .getFeatureNode();
66 74

  
......
78 86
            }
79 87

  
80 88
        } else if (selectedElement instanceof DescriptionElementBase) {
89
            if (((DescriptionElementBase) selectedElement).getInDescription().isComputed()){
90
                items.remove(menu);
91
                return;
92
            }
81 93
            Feature feature = ((DescriptionElementBase) selectedElement)
82 94
                    .getFeature();
83 95
            createMenuItem(menu, feature, globalLanguage);

Also available in: Unified diff