Revision c6fe549a
Added by Patrick Plitzner about 10 years ago
- simplified code/refactoring
- fixing warnings
.gitattributes | ||
---|---|---|
1303 | 1303 |
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/element/SelectionArbitrator.java -text |
1304 | 1304 |
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/element/TextActionElement.java -text |
1305 | 1305 |
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/element/TextWithLabelElement.java -text |
1306 |
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/element/TextWithLabelElement2.java -text |
|
1306 | 1307 |
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/element/TimePeriodElement.java -text |
1307 | 1308 |
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/element/ToggleableTextElement.java -text |
1308 | 1309 |
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/element/UriWithLabelElement.java -text |
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/element/AbstractCdmFormElement.java | ||
---|---|---|
1 | 1 |
/** |
2 |
*
|
|
2 |
* |
|
3 | 3 |
*/ |
4 | 4 |
package eu.etaxonomy.taxeditor.ui.element; |
5 | 5 |
|
... | ... | |
16 | 16 |
import org.eclipse.swt.widgets.Control; |
17 | 17 |
import org.eclipse.ui.forms.widgets.Section; |
18 | 18 |
|
19 |
import eu.etaxonomy.taxeditor.store.StoreUtil;
|
|
19 |
import eu.etaxonomy.taxeditor.model.AbstractUtility;
|
|
20 | 20 |
|
21 | 21 |
/** |
22 | 22 |
* <p>Abstract AbstractCdmFormElement class.</p> |
... | ... | |
24 | 24 |
* @author n.hoffmann |
25 | 25 |
* @version $Id: $ |
26 | 26 |
*/ |
27 |
public abstract class AbstractCdmFormElement implements IPropertyChangeEmitter, ICdmFormElement {
|
|
27 |
public abstract class AbstractCdmFormElement implements ICdmFormElement { |
|
28 | 28 |
|
29 | 29 |
protected CdmFormFactory formFactory; |
30 | 30 |
|
31 | 31 |
private List<IPropertyChangeListener> propertyChangeListeners; |
32 | 32 |
|
33 | 33 |
private Composite layoutComposite; |
34 |
|
|
35 |
private Set<Control> controls = new HashSet<Control>(); |
|
36 |
|
|
37 |
private Set<ICdmFormElement> elements = new HashSet<ICdmFormElement>(); |
|
34 |
|
|
35 |
private final Set<Control> controls = new HashSet<Control>();
|
|
36 |
|
|
37 |
private final Set<ICdmFormElement> elements = new HashSet<ICdmFormElement>();
|
|
38 | 38 |
private ICdmFormElement parentElement; |
39 | 39 |
|
40 | 40 |
private Color persistentBackgroundColor; |
41 |
|
|
42 |
|
|
41 |
|
|
42 |
|
|
43 | 43 |
/** |
44 | 44 |
* <p>Constructor for AbstractCdmFormElement.</p> |
45 | 45 |
* |
... | ... | |
50 | 50 |
this.layoutComposite = layoutComposite; |
51 | 51 |
this.formFactory = formFactory; |
52 | 52 |
} |
53 |
|
|
53 |
|
|
54 | 54 |
/** |
55 | 55 |
* <p>Constructor for AbstractCdmFormElement.</p> |
56 | 56 |
* |
... | ... | |
62 | 62 |
this.parentElement = formElement; |
63 | 63 |
// addControl(layoutComposite); |
64 | 64 |
} |
65 |
|
|
65 |
|
|
66 | 66 |
/** |
67 | 67 |
* <p>Getter for the field <code>formFactory</code>.</p> |
68 | 68 |
* |
... | ... | |
71 | 71 |
public CdmFormFactory getFormFactory() { |
72 | 72 |
return formFactory; |
73 | 73 |
} |
74 |
|
|
74 |
|
|
75 | 75 |
/** |
76 | 76 |
* Delegates the focus to <code>this</code> elements main input control |
77 | 77 |
*/ |
78 | 78 |
public void setFocus(){ |
79 |
// Override in subclasses where needed
|
|
79 |
// Override in subclasses where needed |
|
80 | 80 |
} |
81 |
|
|
81 |
|
|
82 | 82 |
/** |
83 | 83 |
* Returns all Controls that are managed by this element |
84 | 84 |
* |
85 | 85 |
* @return a {@link java.util.Set} object. |
86 | 86 |
*/ |
87 |
public Set<Control> getControls(){ |
|
87 |
@Override |
|
88 |
public Set<Control> getControls(){ |
|
88 | 89 |
return controls; |
89 | 90 |
} |
90 |
|
|
91 |
|
|
91 | 92 |
/** |
92 | 93 |
* adds the control to the set of controls that are managed by this element |
93 | 94 |
* |
... | ... | |
96 | 97 |
protected void addControl(Control child){ |
97 | 98 |
controls.add(child); |
98 | 99 |
} |
99 |
|
|
100 |
|
|
100 | 101 |
/** |
101 | 102 |
* <p>removeControl</p> |
102 | 103 |
* |
... | ... | |
105 | 106 |
protected void removeControl(Control child){ |
106 | 107 |
controls.remove(child); |
107 | 108 |
} |
108 |
|
|
109 |
|
|
109 | 110 |
/** |
110 | 111 |
* <p>Getter for the field <code>elements</code>.</p> |
111 | 112 |
* |
112 | 113 |
* @return a {@link java.util.Set} object. |
113 | 114 |
*/ |
114 |
public Set<ICdmFormElement> getElements(){ |
|
115 |
@Override |
|
116 |
public Set<ICdmFormElement> getElements(){ |
|
115 | 117 |
return elements; |
116 | 118 |
} |
117 |
|
|
119 |
|
|
118 | 120 |
/** |
119 | 121 |
* <p>Getter for the field <code>parentElement</code>.</p> |
120 | 122 |
* |
121 | 123 |
* @return a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement} object. |
122 | 124 |
*/ |
123 |
public ICdmFormElement getParentElement(){ |
|
125 |
@Override |
|
126 |
public ICdmFormElement getParentElement(){ |
|
124 | 127 |
return parentElement; |
125 | 128 |
} |
126 |
|
|
129 |
|
|
127 | 130 |
/** {@inheritDoc} */ |
128 |
public void addElement(ICdmFormElement element){ |
|
131 |
@Override |
|
132 |
public void addElement(ICdmFormElement element){ |
|
129 | 133 |
elements.add(element); |
130 | 134 |
} |
131 |
|
|
135 |
|
|
132 | 136 |
/** |
133 | 137 |
* <p>removeElement</p> |
134 | 138 |
* |
... | ... | |
137 | 141 |
protected void removeElement(ICdmFormElement element){ |
138 | 142 |
elements.remove(element); |
139 | 143 |
} |
140 |
|
|
144 |
|
|
141 | 145 |
/** |
142 | 146 |
* <p>removeElements</p> |
143 | 147 |
*/ |
144 |
public void removeElements(){ |
|
148 |
@Override |
|
149 |
public void removeElements(){ |
|
145 | 150 |
for(ICdmFormElement childElement : getElements()){ |
146 | 151 |
// recursion |
147 | 152 |
childElement.removeElements(); |
148 |
|
|
153 |
|
|
149 | 154 |
// unregister selection arbitrator |
150 | 155 |
if(childElement instanceof ISelectableElement){ |
151 | 156 |
SelectionArbitrator selectionArbitrator = ((ISelectableElement) childElement).getSelectionArbitrator(); |
... | ... | |
153 | 158 |
formFactory.destroySelectionArbitrator(selectionArbitrator); |
154 | 159 |
} |
155 | 160 |
} |
156 |
|
|
161 |
|
|
157 | 162 |
// unregister from property changes |
158 |
if(childElement instanceof IPropertyChangeListener){ |
|
159 |
formFactory.removePropertyChangeListener((IPropertyChangeListener) childElement); |
|
160 |
} |
|
161 |
|
|
163 |
formFactory.removePropertyChangeListener(childElement); |
|
164 |
|
|
162 | 165 |
// dispose of the controls |
163 | 166 |
removeControls(childElement); |
164 | 167 |
} |
165 | 168 |
removeControls(this); |
166 | 169 |
elements.clear(); |
167 | 170 |
} |
168 |
|
|
171 |
|
|
169 | 172 |
private void removeControls(ICdmFormElement element){ |
170 | 173 |
if(element instanceof Section){ |
171 | 174 |
((Section) element).dispose(); |
... | ... | |
183 | 186 |
} |
184 | 187 |
} |
185 | 188 |
} |
186 |
|
|
189 |
|
|
187 | 190 |
/** |
188 | 191 |
* <p>Getter for the field <code>layoutComposite</code>.</p> |
189 | 192 |
* |
190 | 193 |
* @return a {@link org.eclipse.swt.widgets.Composite} object. |
191 | 194 |
*/ |
192 |
public Composite getLayoutComposite() { |
|
195 |
@Override |
|
196 |
public Composite getLayoutComposite() { |
|
193 | 197 |
return layoutComposite; |
194 | 198 |
} |
195 |
|
|
199 |
|
|
196 | 200 |
/** |
197 | 201 |
* <p>Setter for the field <code>layoutComposite</code>.</p> |
198 | 202 |
* |
... | ... | |
201 | 205 |
public void setLayoutComposite(Composite layoutComposite){ |
202 | 206 |
this.layoutComposite = layoutComposite; |
203 | 207 |
} |
204 |
|
|
208 |
|
|
205 | 209 |
/* (non-Javadoc) |
206 | 210 |
* @see eu.etaxonomy.taxeditor.forms.ICdmFormComposite#getPropertyChangeListeners() |
207 | 211 |
*/ |
... | ... | |
210 | 214 |
* |
211 | 215 |
* @return a {@link java.util.Set} object. |
212 | 216 |
*/ |
213 |
public List<IPropertyChangeListener> getPropertyChangeListeners() { |
|
217 |
@Override |
|
218 |
public List<IPropertyChangeListener> getPropertyChangeListeners() { |
|
214 | 219 |
return propertyChangeListeners; |
215 | 220 |
} |
216 |
|
|
221 |
|
|
217 | 222 |
/* (non-Javadoc) |
218 | 223 |
* @see eu.etaxonomy.taxeditor.forms.ICdmFormComposite#setPropertyChangeListeners(org.eclipse.core.runtime.ListenerList) |
219 | 224 |
*/ |
220 | 225 |
/** {@inheritDoc} */ |
221 |
public void setPropertyChangeListeners(List<IPropertyChangeListener> propertyChangeListeners){ |
|
226 |
@Override |
|
227 |
public void setPropertyChangeListeners(List<IPropertyChangeListener> propertyChangeListeners){ |
|
222 | 228 |
this.propertyChangeListeners = propertyChangeListeners; |
223 | 229 |
} |
224 |
|
|
230 |
|
|
225 | 231 |
/* (non-Javadoc) |
226 | 232 |
* @see eu.etaxonomy.taxeditor.forms.IPropertyChangeEmitter#firePropertyChangeEvent() |
227 | 233 |
*/ |
... | ... | |
229 | 235 |
* @see eu.etaxonomy.taxeditor.forms.ICdmFormComposite#firePropertyChangeEvent(org.eclipse.jface.util.PropertyChangeEvent) |
230 | 236 |
*/ |
231 | 237 |
/** {@inheritDoc} */ |
232 |
public void firePropertyChangeEvent(CdmPropertyChangeEvent event) { |
|
238 |
@Override |
|
239 |
public void firePropertyChangeEvent(CdmPropertyChangeEvent event) { |
|
233 | 240 |
Assert.isNotNull(propertyChangeListeners, "Property change listeners are not present"); |
234 | 241 |
|
235 | 242 |
try{ |
... | ... | |
237 | 244 |
((IPropertyChangeListener)listener).propertyChange(event); |
238 | 245 |
} |
239 | 246 |
}catch(ConcurrentModificationException e){ |
240 |
// There are two cases that produce a CME.
|
|
247 |
// There are two cases that produce a CME. |
|
241 | 248 |
// Described here: http://dev.e-taxonomy.eu/trac/ticket/2363#comment:2 |
242 | 249 |
// and here: http://dev.e-taxonomy.eu/trac/ticket/2438 |
243 | 250 |
// Ignoring the CME because nothing bad is happening |
244 |
StoreUtil.warn(getClass(), "ConcurrentModificationException. Can be ignored.");
|
|
251 |
AbstractUtility.warn(getClass(), "ConcurrentModificationException. Can be ignored.");
|
|
245 | 252 |
} |
246 | 253 |
} |
247 |
|
|
254 |
|
|
248 | 255 |
/** |
249 | 256 |
* Fires a {@link CdmPropertyChangeEvent} with the given object as source. |
250 |
*
|
|
257 |
* |
|
251 | 258 |
* @param object the object on which the property changed |
252 | 259 |
*/ |
253 | 260 |
public void firePropertyChangeEvent(Object object){ |
254 | 261 |
firePropertyChangeEvent(object, null); |
255 | 262 |
} |
256 |
|
|
263 |
|
|
257 | 264 |
/** |
258 | 265 |
* Fires a {@link CdmPropertyChangeEvent} with the given object as source also containing the |
259 | 266 |
* originating event |
260 |
*
|
|
267 |
* |
|
261 | 268 |
* @param object the object on which the property changed |
262 | 269 |
* @param originatingEvent the originating event |
263 | 270 |
*/ |
264 | 271 |
public void firePropertyChangeEvent(Object object, PropertyChangeEvent originatingEvent){ |
265 | 272 |
firePropertyChangeEvent(new CdmPropertyChangeEvent(object, originatingEvent)); |
266 | 273 |
} |
267 |
|
|
274 |
|
|
268 | 275 |
|
269 | 276 |
/** |
270 | 277 |
* {@inheritDoc} |
... | ... | |
275 | 282 |
* Implementations should also check for null PropertyChangeEvents and return immediately in that case. |
276 | 283 |
* @see eu.etaxonomy.taxeditor.ui.element.ICdmFormElement#propertyChange(org.eclipse.jface.util.PropertyChangeEvent) |
277 | 284 |
*/ |
278 |
public void propertyChange(PropertyChangeEvent event) { |
|
285 |
@Override |
|
286 |
public void propertyChange(PropertyChangeEvent event) { |
|
279 | 287 |
// implement in subclasses |
280 | 288 |
} |
281 |
|
|
289 |
|
|
282 | 290 |
/** {@inheritDoc} */ |
283 |
public boolean containsFormElement(ICdmFormElement formElement){ |
|
291 |
@Override |
|
292 |
public boolean containsFormElement(ICdmFormElement formElement){ |
|
284 | 293 |
if(formElement == this){ |
285 | 294 |
return true; |
286 | 295 |
}else{ |
... | ... | |
293 | 302 |
return false; |
294 | 303 |
} |
295 | 304 |
} |
296 |
|
|
305 |
|
|
297 | 306 |
/* |
298 | 307 |
* (non-Javadoc) |
299 | 308 |
* @see eu.etaxonomy.taxeditor.forms.ICdmFormElement#refresh() |
... | ... | |
301 | 310 |
/** |
302 | 311 |
* <p>refresh</p> |
303 | 312 |
*/ |
304 |
public void refresh() { |
|
305 |
// empty default implementation |
|
313 |
@Override |
|
314 |
public void refresh() { |
|
315 |
// empty default implementation |
|
306 | 316 |
} |
307 |
|
|
317 |
|
|
308 | 318 |
|
309 | 319 |
/** {@inheritDoc} */ |
310 | 320 |
@Override |
... | ... | |
313 | 323 |
element.setBackground(color); |
314 | 324 |
} |
315 | 325 |
} |
316 |
|
|
326 |
|
|
317 | 327 |
@Override |
318 | 328 |
public void setPersistentBackground(Color color) { |
319 | 329 |
persistentBackgroundColor = color; |
320 | 330 |
setBackground(color); |
321 | 331 |
} |
322 |
|
|
332 |
|
|
323 | 333 |
@Override |
324 | 334 |
public Color getPersistentBackground() { |
325 | 335 |
return persistentBackgroundColor; |
326 | 336 |
} |
327 |
|
|
337 |
|
|
328 | 338 |
public Color getColor(String colorId){ |
329 |
return StoreUtil.getColor(colorId);
|
|
339 |
return AbstractUtility.getColor(colorId);
|
|
330 | 340 |
} |
331 | 341 |
} |
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/element/TextWithLabelElement2.java | ||
---|---|---|
1 |
// $Id$ |
|
2 |
/** |
|
3 |
* Copyright (C) 2013 EDIT |
|
4 |
* European Distributed Institute of Taxonomy |
|
5 |
* http://www.e-taxonomy.eu |
|
6 |
* |
|
7 |
* The contents of this file are subject to the Mozilla Public License Version 1.1 |
|
8 |
* See LICENSE.TXT at the top of this package for the full license terms. |
|
9 |
*/ |
|
10 |
package eu.etaxonomy.taxeditor.ui.element; |
|
11 |
|
|
12 |
import org.eclipse.swt.widgets.Composite; |
|
13 |
|
|
14 |
/** |
|
15 |
* @author pplitzner |
|
16 |
* @date 11.06.2013 |
|
17 |
* |
|
18 |
*/ |
|
19 |
public class TextWithLabelElement2 extends Composite { |
|
20 |
|
|
21 |
/** |
|
22 |
* Create the composite. |
|
23 |
* @param parent |
|
24 |
* @param style |
|
25 |
*/ |
|
26 |
public TextWithLabelElement2(Composite parent, int style) { |
|
27 |
super(parent, style); |
|
28 |
|
|
29 |
} |
|
30 |
|
|
31 |
@Override |
|
32 |
protected void checkSubclass() { |
|
33 |
// Disable the check that prevents subclassing of SWT components |
|
34 |
} |
|
35 |
} |
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/AbstractCdmDetailElement.java | ||
---|---|---|
21 | 21 |
import eu.etaxonomy.cdm.model.name.TaxonNameBase; |
22 | 22 |
import eu.etaxonomy.cdm.model.taxon.TaxonBase; |
23 | 23 |
import eu.etaxonomy.cdm.persistence.hibernate.CdmDataChangeMap; |
24 |
import eu.etaxonomy.taxeditor.store.StoreUtil;
|
|
24 |
import eu.etaxonomy.taxeditor.model.AbstractUtility;
|
|
25 | 25 |
import eu.etaxonomy.taxeditor.ui.element.AbstractCdmFormElement; |
26 | 26 |
import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory; |
27 | 27 |
import eu.etaxonomy.taxeditor.ui.element.CdmPropertyChangeEvent; |
... | ... | |
265 | 265 |
*/ |
266 | 266 |
public void handleException(CdmPropertyChangeEvent event) { |
267 | 267 |
// override this in subclasses if you want to deal with the error |
268 |
StoreUtil.error(event.getSource().getClass(), event.getException());
|
|
268 |
AbstractUtility.error(event.getSource().getClass(), event.getException());
|
|
269 | 269 |
} |
270 | 270 |
|
271 | 271 |
/** |
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/name/NonViralNameDetailSection.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 |
*/ |
... | ... | |
11 | 11 |
package eu.etaxonomy.taxeditor.ui.section.name; |
12 | 12 |
|
13 | 13 |
import org.eclipse.jface.action.Action; |
14 |
import org.eclipse.jface.action.IAction; |
|
14 | 15 |
import org.eclipse.jface.action.ToolBarManager; |
15 | 16 |
import org.eclipse.jface.viewers.ISelectionProvider; |
16 | 17 |
import org.eclipse.swt.SWT; |
... | ... | |
20 | 21 |
import eu.etaxonomy.cdm.hibernate.HibernateProxyHelper; |
21 | 22 |
import eu.etaxonomy.cdm.model.name.NonViralName; |
22 | 23 |
import eu.etaxonomy.cdm.model.taxon.TaxonBase; |
23 |
import eu.etaxonomy.taxeditor.store.StoreUtil;
|
|
24 |
import eu.etaxonomy.taxeditor.model.AbstractUtility;
|
|
24 | 25 |
import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory; |
26 |
import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory.DetailType; |
|
25 | 27 |
import eu.etaxonomy.taxeditor.ui.element.CdmPropertyChangeEvent; |
26 | 28 |
import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement; |
27 |
import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory.DetailType; |
|
28 | 29 |
import eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailSection; |
29 | 30 |
import eu.etaxonomy.taxeditor.ui.section.ITaxonBaseDetailSection; |
30 | 31 |
|
... | ... | |
53 | 54 |
ICdmFormElement parentElement, ISelectionProvider selectionProvider, int style) { |
54 | 55 |
super(formFactory, conversation, parentElement, selectionProvider, style); |
55 | 56 |
} |
56 |
|
|
57 |
|
|
57 | 58 |
/* (non-Javadoc) |
58 | 59 |
* @see eu.etaxonomy.taxeditor.section.AbstractCdmDetailSection#createToolbar() |
59 | 60 |
*/ |
60 | 61 |
@Override |
61 | 62 |
protected Control createToolbar() { |
62 | 63 |
ToolBarManager toolBarManager = new ToolBarManager(SWT.FLAT); |
63 |
|
|
64 |
|
|
64 | 65 |
if(getEntity() != null && checkForMultipleNameUsages(getEntity())){ |
65 |
|
|
66 |
Action cloneAction = new Action("Clone", Action.AS_PUSH_BUTTON){ |
|
67 |
public void run() { |
|
68 |
boolean confirm = StoreUtil.confirmDialog("Confirm cloning", "Do you really want to clone the name?"); |
|
69 |
|
|
66 |
|
|
67 |
Action cloneAction = new Action("Clone", IAction.AS_PUSH_BUTTON){ |
|
68 |
@Override |
|
69 |
public void run() { |
|
70 |
boolean confirm = AbstractUtility.confirmDialog("Confirm cloning", "Do you really want to clone the name?"); |
|
71 |
|
|
70 | 72 |
if(confirm){ |
71 | 73 |
NonViralName clonedName; |
72 | 74 |
clonedName = (NonViralName) getEntity().clone(); |
... | ... | |
76 | 78 |
// EditorUtil.getActiveMultiPageTaxonEditor().r |
77 | 79 |
firePropertyChangeEvent(new CdmPropertyChangeEvent(NonViralNameDetailSection.this, null)); |
78 | 80 |
} |
79 |
|
|
81 |
|
|
80 | 82 |
}; |
81 | 83 |
}; |
82 |
|
|
84 |
|
|
83 | 85 |
cloneAction.setToolTipText("Clone the name if you do not want to edit the shared instance"); |
84 |
|
|
86 |
|
|
85 | 87 |
toolBarManager.add(cloneAction); |
86 |
|
|
88 |
|
|
87 | 89 |
} |
88 | 90 |
return toolBarManager.createControl(this); |
89 | 91 |
} |
90 |
|
|
92 |
|
|
91 | 93 |
|
92 | 94 |
/** |
93 |
* @param nonViralName
|
|
94 |
*
|
|
95 |
* @param nonViralName |
|
96 |
* |
|
95 | 97 |
*/ |
96 | 98 |
private boolean checkForMultipleNameUsages(NonViralName nonViralName) { |
97 | 99 |
return nonViralName.getTaxonBases().size() != 1; |
98 | 100 |
} |
99 |
|
|
101 |
|
|
100 | 102 |
/* (non-Javadoc) |
101 | 103 |
* @see eu.etaxonomy.taxeditor.section.AbstractCdmDetailSection#getDetailType() |
102 | 104 |
*/ |
... | ... | |
119 | 121 |
* @see eu.etaxonomy.taxeditor.section.ITaxonDetailSection#setTaxon(eu.etaxonomy.cdm.model.taxon.TaxonBase) |
120 | 122 |
*/ |
121 | 123 |
/** {@inheritDoc} */ |
122 |
public void setTaxonBase(TaxonBase taxon) { |
|
124 |
@Override |
|
125 |
public void setTaxonBase(TaxonBase taxon) { |
|
123 | 126 |
taxonBase = taxon; |
124 | 127 |
NonViralName name = (NonViralName) HibernateProxyHelper.deproxy(taxon.getName()); |
125 | 128 |
setEntity(name); |
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/view/AbstractCdmViewPart.java | ||
---|---|---|
60 | 60 |
selectionService.addSelectionListener(this); |
61 | 61 |
|
62 | 62 |
pageBook = new PageBook(parent, SWT.NULL); |
63 |
createViewerComposite(pageBook); |
|
63 |
//create viewerComposite |
|
64 |
viewerComposite = new SashForm(pageBook, SWT.HORIZONTAL); |
|
64 | 65 |
createViewer(viewerComposite); |
65 | 66 |
|
66 | 67 |
// Page 2: Nothing selected |
... | ... | |
165 | 166 |
@Override |
166 | 167 |
public ConversationHolder getConversationHolder() { |
167 | 168 |
if(part != null) { |
169 |
//FIXME what if part is not an IConversationEnabled? ClassCastException? |
|
168 | 170 |
return ((IConversationEnabled) part).getConversationHolder(); |
169 | 171 |
} |
170 | 172 |
|
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/view/detail/DetailsViewer.java | ||
---|---|---|
230 | 230 |
createMediaElementSection(rootElement); |
231 | 231 |
|
232 | 232 |
} else if (input instanceof DerivedUnitFacade) { |
233 |
createDerivedUnitBaseElementSection(rootElement);
|
|
233 |
createFOSection(rootElement);
|
|
234 | 234 |
|
235 | 235 |
} else if (input instanceof FeatureNodeContainer) { |
236 | 236 |
createFeatureDistributionSection(rootElement); |
Also available in: Unified diff