Revision dcec2a45
Added by Katja Luther almost 9 years ago
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/media/MediaContentProvider.java | ||
---|---|---|
72 | 72 |
} |
73 | 73 |
else if (parentElement instanceof DescriptionBase) { |
74 | 74 |
if (((DescriptionBase) parentElement).isImageGallery()) { |
75 |
return getImages((DescriptionBase) parentElement).toArray(); |
|
75 |
List<Media> images = getImages((DescriptionBase) parentElement); |
|
76 |
if (images != null){ |
|
77 |
return images.toArray(); |
|
78 |
} |
|
79 |
return null; |
|
80 |
|
|
76 | 81 |
} |
77 | 82 |
} |
78 | 83 |
else if (parentElement instanceof DerivedUnit){ |
... | ... | |
111 | 116 |
/** {@inheritDoc} */ |
112 | 117 |
@Override |
113 | 118 |
public boolean hasChildren(Object element) { |
119 |
if (getChildren(element)== null) { |
|
120 |
return false; |
|
121 |
} |
|
114 | 122 |
return (getChildren(element).length > 0); |
115 | 123 |
} |
116 | 124 |
|
... | ... | |
139 | 147 |
if(elements.size() > 1){ |
140 | 148 |
MessagingUtils.error(this.getClass(), "There should be one and only one description element to hold the images. Found: " + elements.size() + " InDescription ID: " + description.getUuid(), null); |
141 | 149 |
} |
150 |
if (!elements.isEmpty()){ |
|
151 |
DescriptionElementBase element = elements.iterator().next(); |
|
152 |
return element.getMedia(); |
|
153 |
} |
|
142 | 154 |
|
143 |
DescriptionElementBase element = elements.iterator().next(); |
|
144 |
|
|
145 |
return element.getMedia(); |
|
155 |
|
|
146 | 156 |
} |
147 | 157 |
return null; |
148 | 158 |
} |
Also available in: Unified diff
#4855 add MoveSynonymToAnotherAcceptedTaxonHandler and some clean up of the plugin.xml especially the delete