Revision e598b1c7
Added by Katja Luther almost 8 years ago
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/checklist/ChecklistEditor.java | ||
---|---|---|
99 | 99 |
*/ |
100 | 100 |
private static final String CHECKLIST_EDITOR_MEMENTO_KEY = "checklistEditor"; |
101 | 101 |
|
102 |
|
|
103 |
|
|
104 |
|
|
102 | 105 |
private class ChecklistJob extends Job { |
103 | 106 |
|
104 | 107 |
private List<TaxonNode> taxonNodes; |
... | ... | |
110 | 113 |
super(title); |
111 | 114 |
this.taxonNodes = listTaxonNodes; |
112 | 115 |
|
116 |
|
|
113 | 117 |
} |
114 | 118 |
|
115 | 119 |
/* |
... | ... | |
187 | 191 |
|
188 | 192 |
private final ICdmEntitySession cdmEntitySession; |
189 | 193 |
|
194 |
private ChecklistLabelProvider labelProvider; |
|
195 |
|
|
190 | 196 |
private SortedSet<DefinedTermBase> terms = null; |
191 | 197 |
private ToolItem toolItem; |
192 | 198 |
private ChecklistDropdownSelectionListener dropListener; |
... | ... | |
213 | 219 |
*/ |
214 | 220 |
public ChecklistEditor() { |
215 | 221 |
cdmEntitySession = CdmStore.getCurrentSessionManager().newSession(this, true); |
222 |
|
|
216 | 223 |
} |
217 | 224 |
|
218 | 225 |
/** {@inheritDoc} */ |
... | ... | |
222 | 229 |
taxonNodeService = CdmStore.getService(ITaxonNodeService.class); |
223 | 230 |
selectionService = getSite().getWorkbenchWindow().getSelectionService(); |
224 | 231 |
selectionService.addSelectionListener(this); |
232 |
viewer = new TableViewer(parent, SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL | SWT.FULL_SELECTION); |
|
233 |
labelProvider = new ChecklistLabelProvider(this.viewer); |
|
234 |
terms = labelProvider.getNamedAreas(); |
|
225 | 235 |
filter = new ChecklistEditorFilter(); |
226 |
ChecklistLabelProvider labelProvider = new ChecklistLabelProvider(); |
|
227 |
terms = (SortedSet<DefinedTermBase>) labelProvider.getTermsOrderedByLabels(labelProvider.getNamedAreas(), |
|
228 |
CdmStore.getDefaultLanguage()); |
|
229 | 236 |
createTopComposite(parent); |
230 | 237 |
loadDataInput(); |
231 | 238 |
} |
... | ... | |
241 | 248 |
|
242 | 249 |
final Text searchText = createSearchBar(parent); |
243 | 250 |
createToolbar(parent); |
244 |
viewer = new TableViewer(parent, SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL | SWT.FULL_SELECTION); |
|
251 |
|
|
245 | 252 |
getSite().setSelectionProvider(viewer); |
246 | 253 |
|
247 | 254 |
final ModifyListener modifyListener = new ChecklistModifyListener(viewer, filter, searchText); |
... | ... | |
254 | 261 |
createTable(); |
255 | 262 |
|
256 | 263 |
viewer.setContentProvider(new ChecklistContentProvider()); |
257 |
viewer.setLabelProvider(new ChecklistLabelProvider(viewer));
|
|
264 |
viewer.setLabelProvider(this.labelProvider);
|
|
258 | 265 |
comparator = new ChecklistEditorComparator(); |
259 | 266 |
viewer.setComparator(comparator); |
260 | 267 |
|
... | ... | |
351 | 358 |
column.getColumn().setResizable(true); |
352 | 359 |
column.getColumn().setMoveable(true); |
353 | 360 |
column.getColumn().addSelectionListener(getSelectionAdapter(column.getColumn(), columnIndex)); |
354 |
if (columnIndex == 1) {
|
|
361 |
if (columnIndex == 0) {
|
|
355 | 362 |
table.setSortColumn(column.getColumn()); |
356 | 363 |
} |
357 | 364 |
if (columnIndex == 2) { |
358 | 365 |
/** uncommented it for now because no rank editing is wanted **/ |
359 | 366 |
// column.setEditingSupport(new RankEditingSupport(viewer, this)); |
360 | 367 |
} |
361 |
if (columnIndex >= 4) {
|
|
368 |
if (columnIndex >= 3) {
|
|
362 | 369 |
//read PrefrenceStore to setWidth according to last saved state |
363 | 370 |
if(restoreValuesForColumnWidth.get(columnIndex)){ |
364 | 371 |
column.getColumn().setWidth(100); |
365 | 372 |
}else{ |
366 |
column.getColumn().setWidth(0); |
|
373 |
column.getColumn().setWidth(100);
|
|
367 | 374 |
} |
368 | 375 |
column.setEditingSupport(new DistributionEditingSupport(viewer, this, columnIndex)); |
369 | 376 |
} |
... | ... | |
383 | 390 |
List<Integer> bounds) { |
384 | 391 |
Map<Integer, Boolean> restoreColumnWidth = new HashMap<Integer, Boolean>(); |
385 | 392 |
if (terms != null) { |
386 |
int columnIndex = 4;
|
|
393 |
int columnIndex = 3;
|
|
387 | 394 |
for (DefinedTermBase<DefinedTermBase> term : terms) { |
388 | 395 |
if(term != null){ |
389 | 396 |
restoreColumnWidth.put(columnIndex, PreferencesUtil.getPreferenceStore().getBoolean(term.getUuid().toString())); |
390 |
titles.add(term.getTitleCache()); |
|
397 |
if (PreferencesUtil.isShowIdInVocabularyInChecklistEditor()){ |
|
398 |
if (term.getIdInVocabulary() != null){ |
|
399 |
titles.add(term.getIdInVocabulary()); |
|
400 |
} else{ |
|
401 |
titles.add(term.getTitleCache()); |
|
402 |
} |
|
403 |
}else{ |
|
404 |
titles.add(term.getTitleCache()); |
|
405 |
} |
|
391 | 406 |
bounds.add(200); |
392 | 407 |
columnIndex++; |
393 | 408 |
} |
... | ... | |
427 | 442 |
TaxonNode taxonNode = checklistEditorInput.getTaxonNode(); |
428 | 443 |
if (classification != null && taxonNode == null) { |
429 | 444 |
countNodes = taxonNodeService.countAllNodesForClassification(classification); |
430 |
statusLabel.setText("Anzahl der Elemente: " + (countNodes != null ? countNodes : "uknown")); |
|
445 |
statusLabel.setText("Anzahl der Elemente: " + (countNodes != null ? countNodes : "unknown"));
|
|
431 | 446 |
// This should not kill the view nor the editor if something goes |
432 | 447 |
// wrong |
433 | 448 |
// TODO: don't load the whole taxonNode Object but rather a small |
... | ... | |
505 | 520 |
Table table = viewer.getTable(); |
506 | 521 |
table.setRedraw(false); |
507 | 522 |
SortedSet<DefinedTermBase> oldTerms = terms; |
508 |
ChecklistLabelProvider labelProvider = new ChecklistLabelProvider(); |
|
509 |
terms = (SortedSet<DefinedTermBase>) labelProvider.getTermsOrderedByLabels(labelProvider.getNamedAreas(), CdmStore.getDefaultLanguage()); |
|
510 |
SortedSet<DefinedTermBase> newTerms = terms; |
|
523 |
|
|
524 |
// if (PreferencesUtil.isShowIdInVocabularyInChecklistEditor()){ |
|
525 |
// |
|
526 |
// } else{ |
|
527 |
// terms = (SortedSet<DefinedTermBase>) labelProvider.getTermsOrderedByLabels(labelProvider.getNamedAreas(), CdmStore.getDefaultLanguage()); |
|
528 |
// } |
|
529 |
SortedSet<DefinedTermBase> newTerms = labelProvider.getNamedAreas(); |
|
511 | 530 |
toolItem.removeSelectionListener(dropListener); |
512 | 531 |
hideDistributionColumns(oldTerms); |
513 | 532 |
createToolbarItems(); |
... | ... | |
517 | 536 |
addTableViewerColumn(term.getTitleCache(), 200, count); |
518 | 537 |
acitivateNewColumnInDropDownMenu(term); |
519 | 538 |
} |
520 |
viewer.setLabelProvider(new ChecklistLabelProvider(viewer));
|
|
539 |
viewer.setLabelProvider(labelProvider);
|
|
521 | 540 |
getService().schedule(new ChecklistJob("loading Taxa", selectedTaxonNodes), Job.LONG); |
522 | 541 |
table.setRedraw(true); |
523 | 542 |
viewer.refresh(); |
... | ... | |
793 | 812 |
// TODO Auto-generated method stub |
794 | 813 |
return null; |
795 | 814 |
} |
815 |
|
|
816 |
/** |
|
817 |
* @return the labelProvider |
|
818 |
*/ |
|
819 |
public ChecklistLabelProvider getLabelProvider() { |
|
820 |
return labelProvider; |
|
821 |
} |
|
796 | 822 |
} |
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/checklist/ChecklistLabelProvider.java | ||
---|---|---|
12 | 12 |
|
13 | 13 |
import java.util.ArrayList; |
14 | 14 |
import java.util.Arrays; |
15 |
import java.util.HashSet; |
|
15 | 16 |
import java.util.List; |
17 |
import java.util.Set; |
|
16 | 18 |
import java.util.SortedSet; |
17 | 19 |
import java.util.TreeSet; |
18 | 20 |
import java.util.UUID; |
... | ... | |
29 | 31 |
import eu.etaxonomy.cdm.hibernate.HibernateProxyHelper; |
30 | 32 |
import eu.etaxonomy.cdm.model.common.DefinedTermBase; |
31 | 33 |
import eu.etaxonomy.cdm.model.common.Language; |
34 |
import eu.etaxonomy.cdm.model.common.TermIdInVocabularyComparator; |
|
32 | 35 |
import eu.etaxonomy.cdm.model.common.TermLanguageComparator; |
33 | 36 |
import eu.etaxonomy.cdm.model.description.DescriptionElementBase; |
34 | 37 |
import eu.etaxonomy.cdm.model.description.Distribution; |
... | ... | |
48 | 51 |
|
49 | 52 |
public static final String DEFAULT_ENTRY = ""; |
50 | 53 |
private IDescriptionService descriptionService; |
51 |
private final List<DefinedTermBase<?>> namedAreas;
|
|
54 |
private final SortedSet<DefinedTermBase> namedAreas;
|
|
52 | 55 |
TableViewer viewer = null; |
53 | 56 |
|
54 | 57 |
/** |
... | ... | |
92 | 95 |
//TODO load areas by this list |
93 | 96 |
|
94 | 97 |
List<TaxonDescription> listTaxonDescriptions = descriptionService.listTaxonDescriptions(taxon, null, null, null, null, null, DESC_INIT_STRATEGY);; |
95 |
NonViralName<?> nonVirlaName = HibernateProxyHelper.deproxy(taxon.getName(), NonViralName.class);
|
|
98 |
NonViralName<?> nonViralName = HibernateProxyHelper.deproxy(taxon.getName(), NonViralName.class);
|
|
96 | 99 |
|
97 | 100 |
switch (columnIndex) { |
98 | 101 |
case 0: |
99 | 102 |
String taxonName = null; |
100 |
taxonName = (nonVirlaName != null) ? nonVirlaName.getNameCache() : null;
|
|
103 |
taxonName = (nonViralName != null) ? nonViralName.getNameCache() : null;
|
|
101 | 104 |
return (taxonName != null) ? taxonName : DEFAULT_ENTRY; |
102 | 105 |
|
103 | 106 |
case 1: |
104 | 107 |
String authorship = null; |
105 |
authorship = (nonVirlaName != null) ? nonVirlaName.getAuthorshipCache() : null;
|
|
108 |
authorship = (nonViralName != null) ? nonViralName.getAuthorshipCache() : null;
|
|
106 | 109 |
return (authorship != null) ? authorship : DEFAULT_ENTRY; |
107 | 110 |
// case 2: |
108 | 111 |
// String ref = null; |
... | ... | |
125 | 128 |
for (TaxonDescription td : listTaxonDescriptions) { |
126 | 129 |
for (DescriptionElementBase deb : td.getElements()) { |
127 | 130 |
if (deb instanceof Distribution) { |
128 |
Distribution distribution = (Distribution) deb; |
|
129 |
String area = distribution.toString(); |
|
131 |
Distribution distribution = HibernateProxyHelper.deproxy(deb, Distribution.class); |
|
132 |
String area = null; |
|
133 |
if (distribution.getArea() != null ){ |
|
134 |
if (PreferencesUtil.isShowIdInVocabularyInChecklistEditor()){ |
|
135 |
area = distribution.getArea().getIdInVocabulary(); |
|
136 |
}else{ |
|
137 |
area = distribution.getArea().getTitleCache(); |
|
138 |
} |
|
139 |
}else{ |
|
140 |
continue; |
|
141 |
} |
|
142 |
|
|
130 | 143 |
if(viewer != null){ |
131 | 144 |
TableColumn column = viewer.getTable().getColumn(columnIndex); |
132 | 145 |
if (area.equalsIgnoreCase(column.getText())) { |
133 |
return (distribution.getStatus().getTitleCache() != null)?distribution.getStatus().getTitleCache():DEFAULT_ENTRY; |
|
134 |
} |
|
146 |
return (distribution.getStatus().getTitleCache() != null)?distribution.getStatus().getTitleCache():DEFAULT_ENTRY; |
|
147 |
} |
|
148 |
|
|
135 | 149 |
} |
136 | 150 |
} |
137 | 151 |
} |
... | ... | |
145 | 159 |
"descriptions.*", "description.state" }); |
146 | 160 |
|
147 | 161 |
|
148 |
private List<DefinedTermBase<?>> loadNamedAreas() {
|
|
162 |
private SortedSet<DefinedTermBase> loadNamedAreas() {
|
|
149 | 163 |
IPreferenceStore preferenceStore = PreferencesUtil.getPreferenceStore(); |
150 | 164 |
String values = preferenceStore.getString(PreferencesUtil.DISTRIBUTION_AREA_OCCURENCE_STATUS); |
151 | 165 |
if (values != null && values != "") { |
152 | 166 |
String[] split = values.split(","); |
153 | 167 |
List<String> listValue = Arrays.asList(split); |
154 |
ArrayList<DefinedTermBase<?>> termlist = new ArrayList<DefinedTermBase<?>>(); |
|
168 |
List<DefinedTermBase> termlist = new ArrayList<DefinedTermBase>(); |
|
169 |
Set<UUID> uuidList = new HashSet<UUID>(); |
|
170 |
UUID uuid; |
|
155 | 171 |
for(String s : listValue){ |
156 |
UUID uuid = UUID.fromString(s); |
|
157 |
ITermService service = CdmStore.getService(ITermService.class); |
|
158 |
DefinedTermBase definedTermBase = service.load(uuid); |
|
159 |
termlist.add(definedTermBase); |
|
172 |
uuid = UUID.fromString(s); |
|
173 |
uuidList.add(uuid); |
|
174 |
|
|
160 | 175 |
} |
161 |
return termlist; |
|
176 |
ITermService service = CdmStore.getService(ITermService.class); |
|
177 |
termlist = service.find(uuidList); |
|
178 |
|
|
179 |
return getTermsOrderedByIdInVocabulary(termlist); |
|
162 | 180 |
} |
163 | 181 |
return null; |
164 | 182 |
} |
... | ... | |
176 | 194 |
/** |
177 | 195 |
* @return the namedAreas |
178 | 196 |
*/ |
179 |
public List<DefinedTermBase<?>> getNamedAreas() {
|
|
197 |
public SortedSet<DefinedTermBase> getNamedAreas() {
|
|
180 | 198 |
return namedAreas; |
181 | 199 |
} |
200 |
|
|
201 |
/** |
|
202 |
* @param namedAreas |
|
203 |
* @param defaultLanguage |
|
204 |
* @return |
|
205 |
*/ |
|
206 |
public SortedSet<DefinedTermBase> getTermsOrderedByIdInVocabulary(List<DefinedTermBase> namedAreas) { |
|
207 |
TermIdInVocabularyComparator comp = new TermIdInVocabularyComparator(); |
|
208 |
|
|
209 |
SortedSet result = new TreeSet(comp); |
|
210 |
if(namedAreas != null){ |
|
211 |
result.addAll(namedAreas); |
|
212 |
} |
|
213 |
return result; |
|
214 |
} |
|
182 | 215 |
} |
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/checklist/edit/DistributionEditingSupport.java | ||
---|---|---|
26 | 26 |
import eu.etaxonomy.cdm.model.location.NamedArea; |
27 | 27 |
import eu.etaxonomy.cdm.model.taxon.Taxon; |
28 | 28 |
import eu.etaxonomy.taxeditor.editor.view.checklist.ChecklistEditor; |
29 |
import eu.etaxonomy.taxeditor.editor.view.checklist.ChecklistLabelProvider;
|
|
29 |
import eu.etaxonomy.taxeditor.preference.PreferencesUtil;
|
|
30 | 30 |
import eu.etaxonomy.taxeditor.store.CdmStore; |
31 | 31 |
|
32 | 32 |
public final class DistributionEditingSupport extends EditingSupport { |
... | ... | |
71 | 71 |
Taxon taxon = (Taxon) element; |
72 | 72 |
Distribution distributionForColumn = getDistributionForColumn(taxon); |
73 | 73 |
if (distributionForColumn != null) { |
74 |
distributionForColumn.getStatus().getTitleCache(); |
|
74 |
return distributionForColumn.getStatus().getTitleCache();
|
|
75 | 75 |
} |
76 | 76 |
// return PresenceAbsenceTerms |
77 | 77 |
} |
... | ... | |
91 | 91 |
createDistributionForColumn(taxon, occurenceStatus); |
92 | 92 |
} |
93 | 93 |
// viewer.update(distribution, null); |
94 |
viewer.update(element, null); |
|
95 |
viewer.refresh(); |
|
96 |
editor.setDirty(true); |
|
94 |
// viewer.update(element, null);
|
|
95 |
// viewer.refresh();
|
|
96 |
// editor.setDirty(true);
|
|
97 | 97 |
editor.changed(element); |
98 | 98 |
viewer.refresh(); |
99 | 99 |
} |
... | ... | |
115 | 115 |
for (DescriptionElementBase deb : td.getElements()) { |
116 | 116 |
if (deb instanceof Distribution) { |
117 | 117 |
Distribution distribution = (Distribution) deb; |
118 |
if (column.getText().equalsIgnoreCase(distribution.getArea().getTitleCache())) { |
|
119 |
return distribution; |
|
118 |
if (distribution.getArea() != null){ |
|
119 |
if (PreferencesUtil.isShowIdInVocabularyInChecklistEditor()){ |
|
120 |
if (column.getText().equalsIgnoreCase(distribution.getArea().getIdInVocabulary())) { |
|
121 |
return distribution; |
|
122 |
} |
|
123 |
}else{ |
|
124 |
if (column.getText().equalsIgnoreCase(distribution.getArea().getTitleCache())) { |
|
125 |
return distribution; |
|
126 |
} |
|
127 |
} |
|
120 | 128 |
} |
121 | 129 |
} |
122 | 130 |
} |
... | ... | |
127 | 135 |
private void createDistributionForColumn(Taxon taxon, PresenceAbsenceTerm occurenceStatus) { |
128 | 136 |
TableColumn column = viewer.getTable().getColumn(columnIndex); |
129 | 137 |
|
130 |
ChecklistLabelProvider labelProvider = new ChecklistLabelProvider(); |
|
131 |
List<DefinedTermBase<?>> namedAreas = labelProvider.getNamedAreas(); |
|
132 |
SortedSet<DefinedTermBase<?>> terms = (SortedSet<DefinedTermBase<?>>) labelProvider.getTermsOrderedByLabels( |
|
133 |
namedAreas, CdmStore.getDefaultLanguage()); |
|
138 |
SortedSet<DefinedTermBase> namedAreas = this.editor.getLabelProvider().getNamedAreas(); |
|
134 | 139 |
|
135 |
if (terms != null) { |
|
136 |
for (DefinedTermBase term : terms) { |
|
137 |
if (column.getText().equalsIgnoreCase(term.getTitleCache())) { |
|
140 |
|
|
141 |
if (namedAreas != null) { |
|
142 |
for (DefinedTermBase term : namedAreas) { |
|
143 |
boolean sameArea = true; |
|
144 |
if (!PreferencesUtil.isShowIdInVocabularyInChecklistEditor()){ |
|
145 |
sameArea = column.getText().equalsIgnoreCase(term.getTitleCache()); |
|
146 |
} else{ |
|
147 |
sameArea = column.getText().equalsIgnoreCase(term.getIdInVocabulary()); |
|
148 |
} |
|
149 |
if (sameArea) { |
|
138 | 150 |
NamedArea area = (NamedArea) term; |
139 | 151 |
Distribution distribution = Distribution.NewInstance(area, occurenceStatus); |
140 | 152 |
Set<TaxonDescription> descriptions = taxon.getDescriptions(); |
141 |
if (descriptions != null) {
|
|
153 |
if (!descriptions.isEmpty()) {
|
|
142 | 154 |
for (TaxonDescription desc : descriptions) { |
143 | 155 |
// add to first taxon description |
144 | 156 |
desc.addElement(distribution); |
... | ... | |
147 | 159 |
} else {// there are no TaxonDescription yet. |
148 | 160 |
TaxonDescription td = TaxonDescription.NewInstance(taxon); |
149 | 161 |
td.addElement(distribution); |
162 |
break; |
|
150 | 163 |
} |
151 | 164 |
} |
152 | 165 |
} |
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/preference/IPreferenceKeys.java | ||
---|---|---|
151 | 151 |
|
152 | 152 |
public static final String DISTRIBUTION_AREA_OCCURENCE_STATUS_GRAYED = "eu.etaxonomy.taxeditor.checklist.distributionAreaStatusGrayed"; |
153 | 153 |
|
154 |
public static final String CHECKLIST_ID_IN_VOCABULARY = "eu.etaxonomy.taxeditor.checklist.checklistIdInVocabulary"; |
|
155 |
|
|
154 | 156 |
public static final String SHOW_ADVANCED_MEDIA_SECTION = "eu.etaxonomy.taxeditor.media.showAdvancedMedia"; |
155 | 157 |
public static final String SHOW_SIMPLE_NAME_DETAILS_SECTION = "eu.etaxonomy.taxeditor.name.showSimpleName"; |
156 | 158 |
|
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/preference/PreferencesUtil.java | ||
---|---|---|
80 | 80 |
public static final String P2_REPOSITORIES_DELIM = ","; |
81 | 81 |
public static final String P2_REPOSITORY_FIELDS_DELIM = ";"; |
82 | 82 |
|
83 |
|
|
84 |
|
|
83 | 85 |
/** |
84 | 86 |
* <p> |
85 | 87 |
* getPreferenceStore |
... | ... | |
397 | 399 |
getPreferenceStore().setDefault(OPENURL_IMAGE_MAX_WIDTH, "1000"); |
398 | 400 |
getPreferenceStore().setDefault(OPENURL_IMAGE_MAX_HEIGHT, "1000"); |
399 | 401 |
getPreferenceStore().setDefault(IPreferenceKeys.DISTRIBUTION_AREA_PREFRENCES_ACTIVE, false); |
402 |
getPreferenceStore().setDefault(CHECKLIST_ID_IN_VOCABULARY, true); |
|
400 | 403 |
} |
401 | 404 |
|
402 | 405 |
/** |
... | ... | |
836 | 839 |
getPreferenceStore().setValue(IS_SHOW_UP_WIDGET_IS_DISPOSED, selection); |
837 | 840 |
} |
838 | 841 |
|
842 |
/** |
|
843 |
* @return |
|
844 |
*/ |
|
845 |
public static boolean isShowIdInVocabularyInChecklistEditor() { |
|
846 |
return getPreferenceStore().getBoolean(IPreferenceKeys.CHECKLIST_ID_IN_VOCABULARY); |
|
847 |
} |
|
848 |
public static void setShowIdInVocabularyInChecklistEditor(boolean selection) { |
|
849 |
getPreferenceStore().setValue(CHECKLIST_ID_IN_VOCABULARY, selection); |
|
850 |
} |
|
839 | 851 |
|
840 | 852 |
|
841 | 853 |
} |
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/preference/wizard/AvailableDistributionPage.java | ||
---|---|---|
247 | 247 |
this.viewer.setGrayed(element, false); |
248 | 248 |
int length = tcp.getChildren(element).length; |
249 | 249 |
if(length>1){ |
250 |
this.viewer.expandToLevel(element, CheckboxTreeViewer.ALL_LEVELS); |
|
250 | 251 |
this.viewer.setSubtreeChecked(element, checked); |
251 | 252 |
} |
252 | 253 |
} |
Also available in: Unified diff
changes to fix the checklist editor