Revision 5e1d646d
Added by Andreas Müller about 3 years ago
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/descriptive/DescriptiveContentProvider.java | ||
---|---|---|
198 | 198 |
featureTree = TermEditorInput.getDefaultFeatureTree(); |
199 | 199 |
} |
200 | 200 |
|
201 |
|
|
202 | 201 |
return featureTree; |
203 |
|
|
204 |
|
|
205 |
|
|
206 | 202 |
} |
207 | 203 |
|
208 | 204 |
/** |
... | ... | |
212 | 208 |
*/ |
213 | 209 |
protected List<DescriptionBase<?>> getDescriptions(IDescribable<?> parentElement) { |
214 | 210 |
Set<? extends DescriptionBase<?>> elementDescriptions = parentElement.getDescriptions(); |
215 |
List<DescriptionBase<?>> resultDescriptions = new ArrayList<DescriptionBase<?>>();
|
|
211 |
List<DescriptionBase<?>> resultDescriptions = new ArrayList<>(); |
|
216 | 212 |
for(DescriptionBase<?> description : elementDescriptions){ |
217 | 213 |
if(! description.isImageGallery()){ |
218 | 214 |
Set<Marker> descriptionMarkers = description.getMarkers(); |
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/element/AbstractFormSection.java | ||
---|---|---|
123 | 123 |
this.propertyChangeListeners = propertyChangeListeners; |
124 | 124 |
} |
125 | 125 |
|
126 |
/** |
|
127 |
* Setter for the field <code>entity</code>. |
|
128 |
*/ |
|
126 |
@Override |
|
127 |
public ENTITY getEntity() { |
|
128 |
return entity; |
|
129 |
} |
|
129 | 130 |
public void setEntity(ENTITY entity) { |
130 | 131 |
this.entity = entity; |
131 | 132 |
} |
132 | 133 |
|
133 |
/** |
|
134 |
* Getter for the field <code>entity</code>. |
|
135 |
*/ |
|
136 |
@Override |
|
137 |
public ENTITY getEntity() { |
|
138 |
return entity; |
|
139 |
} |
|
140 |
|
|
141 |
/** |
|
142 |
* getToggle |
|
143 |
*/ |
|
144 | 134 |
public ToggleHyperlink getToggle() { |
145 | 135 |
return this.toggle; |
146 | 136 |
} |
147 | 137 |
|
148 |
/** |
|
149 |
* getSection |
|
150 |
*/ |
|
151 | 138 |
public AbstractFormSection<ENTITY> getSection() { |
152 | 139 |
return this; |
153 | 140 |
} |
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/element/CdmFormFactory.java | ||
---|---|---|
1349 | 1349 |
*/ |
1350 | 1350 |
public ToggleableTextElement createToggleableTextField(ICdmFormElement parentElement, String labelString, |
1351 | 1351 |
String initialText, boolean initialState, CacheRelevance relevance, int style) { |
1352 |
|
|
1352 | 1353 |
ToggleableTextElement element = new ToggleableTextElement(this, parentElement, labelString, initialText, |
1353 | 1354 |
initialState, relevance, style | orientation); |
1354 |
|
|
1355 | 1355 |
adapt(element); |
1356 | 1356 |
parentElement.addElement(element); |
1357 | 1357 |
return element; |
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/supplemental/AnnotationSection.java | ||
---|---|---|
22 | 22 |
* |
23 | 23 |
* @author n.hoffmann |
24 | 24 |
* @created Nov 5, 2009 |
25 |
* @version 1.0 |
|
26 | 25 |
*/ |
27 | 26 |
public class AnnotationSection extends AbstractEntityCollectionSection<AnnotatableEntity, Annotation>{ |
28 | 27 |
|
... | ... | |
38 | 37 |
super(cdmFormFactory, conversation, parentElement, "Annotations", style); |
39 | 38 |
} |
40 | 39 |
|
41 |
/** {@inheritDoc} */ |
|
42 | 40 |
@Override |
43 | 41 |
public Annotation createNewElement() { |
44 | 42 |
String text = ""; |
... | ... | |
48 | 46 |
return Annotation.NewInstance(text, type, language); |
49 | 47 |
} |
50 | 48 |
|
51 |
/** {@inheritDoc} */ |
|
52 | 49 |
@Override |
53 | 50 |
public Collection<Annotation> getCollection(AnnotatableEntity entity) { |
54 | 51 |
return entity.getAnnotations(); |
... | ... | |
59 | 56 |
return new DefaultCdmBaseComparator<>(); |
60 | 57 |
} |
61 | 58 |
|
62 |
/** {@inheritDoc} */ |
|
63 | 59 |
@Override |
64 | 60 |
public String getEmptyString() { |
65 | 61 |
return "No annotations yet."; |
66 | 62 |
} |
67 | 63 |
|
68 |
/** {@inheritDoc} */ |
|
69 | 64 |
@Override |
70 | 65 |
protected String getTooltipString() { |
71 | 66 |
return "Create a new annotation"; |
72 | 67 |
} |
73 | 68 |
|
74 |
/** {@inheritDoc} */ |
|
75 | 69 |
@Override |
76 | 70 |
public void addElement(Annotation element) { |
77 | 71 |
getEntity().addAnnotation(element); |
78 | 72 |
} |
79 | 73 |
|
80 |
/** {@inheritDoc} */ |
|
81 | 74 |
@Override |
82 | 75 |
public void removeElement(Annotation element) { |
83 | 76 |
getEntity().removeAnnotation(element); |
84 | 77 |
} |
85 | 78 |
|
86 |
/** |
|
87 |
* {@inheritDoc} |
|
88 |
*/ |
|
89 | 79 |
@Override |
90 | 80 |
public Annotation addExisting() { |
91 | 81 |
// TODO Auto-generated method stub |
92 | 82 |
return null; |
93 | 83 |
} |
94 | 84 |
|
95 |
/** |
|
96 |
* {@inheritDoc} |
|
97 |
*/ |
|
98 | 85 |
@Override |
99 | 86 |
public boolean allowAddExisting() { |
100 | 87 |
// TODO Auto-generated method stub |
101 | 88 |
return false; |
102 | 89 |
} |
103 |
} |
|
90 |
} |
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/view/detail/CdmSectionPart.java | ||
---|---|---|
50 | 50 |
* @author n.hoffmann |
51 | 51 |
* @created Feb 8, 2010 |
52 | 52 |
*/ |
53 |
public class CdmSectionPart<T> extends SectionPart implements
|
|
54 |
IPropertyChangeListener {
|
|
53 |
public class CdmSectionPart<T> extends SectionPart |
|
54 |
implements IPropertyChangeListener {
|
|
55 | 55 |
|
56 | 56 |
public static String EXPANDED = "expanded"; |
57 | 57 |
public static String COLLAPSED = "collapsed"; |
... | ... | |
63 | 63 |
*/ |
64 | 64 |
private Object rootInput; |
65 | 65 |
|
66 |
/** |
|
67 |
* <p> |
|
68 |
* Constructor for CdmSectionPart. |
|
69 |
* </p> |
|
70 |
* |
|
71 |
* @param section |
|
72 |
* a {@link eu.etaxonomy.taxeditor.ui.element.AbstractFormSection} |
|
73 |
* object. |
|
74 |
* @param <T> |
|
75 |
* a T object. |
|
76 |
*/ |
|
77 | 66 |
public CdmSectionPart(AbstractFormSection<T> section) { |
78 | 67 |
super(section); |
79 | 68 |
formSection = section; |
... | ... | |
143 | 132 |
((NomenclaturalStatusSection) formSection) |
144 | 133 |
.setTaxonBase( ((TaxonRelationship)input).getFromTaxon()); |
145 | 134 |
return true; |
146 |
// }else if ((input instanceof TaxonRelationship) |
|
147 |
// && (formSection instanceof ProtologueSection)) { |
|
148 |
// ((ProtologueSection) formSection) |
|
149 |
// .setTaxonBase( ((TaxonRelationship)input).getFromTaxon()); |
|
150 |
// return true; |
|
151 | 135 |
}else if ((input instanceof TaxonRelationship) |
152 | 136 |
&& (formSection instanceof TypeDesignationSection)) { |
153 | 137 |
((TypeDesignationSection) formSection) |
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/view/e4/AbstractCdmDataViewerE4.java | ||
---|---|---|
206 | 206 |
null, |
207 | 207 |
e, |
208 | 208 |
true); |
209 |
|
|
210 | 209 |
} |
211 | 210 |
} |
212 | 211 |
control = null; |
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/view/e4/supplementaldata/SupplementalDataPartE4.java | ||
---|---|---|
6 | 6 |
* The contents of this file are subject to the Mozilla Public License Version 1.1 |
7 | 7 |
* See LICENSE.TXT at the top of this package for the full license terms. |
8 | 8 |
*/ |
9 |
|
|
10 | 9 |
package eu.etaxonomy.taxeditor.view.e4.supplementaldata; |
11 | 10 |
|
12 | 11 |
import java.util.Set; |
... | ... | |
17 | 16 |
import org.eclipse.e4.core.contexts.ContextInjectionFactory; |
18 | 17 |
import org.eclipse.e4.core.contexts.IEclipseContext; |
19 | 18 |
import org.eclipse.e4.core.di.annotations.Optional; |
20 |
import org.eclipse.e4.core.services.log.Logger; |
|
21 | 19 |
import org.eclipse.e4.ui.di.UIEventTopic; |
22 | 20 |
import org.eclipse.e4.ui.model.application.ui.basic.MPart; |
23 | 21 |
import org.eclipse.jface.viewers.IStructuredSelection; |
... | ... | |
44 | 42 |
import eu.etaxonomy.taxeditor.preference.PreferencesUtil; |
45 | 43 |
import eu.etaxonomy.taxeditor.view.e4.AbstractCdmEditorPartE4; |
46 | 44 |
|
47 |
|
|
48 | 45 |
/** |
49 |
* |
|
50 | 46 |
* @author pplitzner |
51 | 47 |
* @since Aug 10, 2017 |
52 |
* |
|
53 | 48 |
*/ |
54 | 49 |
public class SupplementalDataPartE4 extends AbstractCdmEditorPartE4 { |
55 |
@Inject |
|
56 |
private Logger logger; |
|
57 | 50 |
|
58 | 51 |
@Inject |
59 |
public SupplementalDataPartE4() { |
|
60 |
} |
|
52 |
public SupplementalDataPartE4() {} |
|
61 | 53 |
|
62 | 54 |
@PostConstruct |
63 | 55 |
public void create(Composite parent, MPart thisPart, IEclipseContext context) { |
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/view/e4/supplementaldata/SupplementalDataViewerE4.java | ||
---|---|---|
76 | 76 |
} |
77 | 77 |
|
78 | 78 |
destroySections(); |
79 |
|
|
79 | 80 |
//1. Headline |
80 | 81 |
createHeadlineSection(rootElement); |
81 | 82 |
//2. Annotatable entitiy |
Also available in: Unified diff
cleanup