Revision 4f25e642
Added by Katja Luther over 5 years ago
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/preference/wizard/AvailableDistributionWizard.java | ||
---|---|---|
15 | 15 |
import org.apache.commons.collections.CollectionUtils; |
16 | 16 |
import org.apache.commons.lang.StringUtils; |
17 | 17 |
import org.eclipse.jface.preference.IPreferenceStore; |
18 |
import org.eclipse.jface.viewers.CheckboxTreeViewer; |
|
18 | 19 |
import org.eclipse.jface.wizard.Wizard; |
19 | 20 |
|
20 | 21 |
import eu.etaxonomy.cdm.api.conversation.ConversationHolder; |
... | ... | |
51 | 52 |
public boolean performFinish() { |
52 | 53 |
// TODO: get Selection and save in EditorPreferences |
53 | 54 |
if (!checkNoneChecked()) { |
54 |
Object[] checkedElements = aPage.getViewer().getCheckedElements();
|
|
55 |
Object[] grayedElements = aPage.getViewer().getGrayedElements();
|
|
55 |
Object[] checkedElements = ((CheckboxTreeViewer)aPage.getViewer()).getCheckedElements();
|
|
56 |
Object[] grayedElements = ((CheckboxTreeViewer)aPage.getViewer()).getGrayedElements();
|
|
56 | 57 |
ArrayList checkedList = new ArrayList(Arrays.asList(checkedElements)); |
57 | 58 |
ArrayList grayedList = new ArrayList(Arrays.asList(grayedElements)); |
58 | 59 |
checkedList = (ArrayList) CollectionUtils.subtract(checkedList, grayedList); |
... | ... | |
99 | 100 |
|
100 | 101 |
private boolean checkNoneChecked() { |
101 | 102 |
|
102 |
if (aPage.getViewer().getCheckedElements().length == 0) {
|
|
103 |
if (((CheckboxTreeViewer)aPage.getViewer()).getCheckedElements().length == 0) {
|
|
103 | 104 |
aPage.setMessage("Please check at least one item", aPage.WARNING); |
104 | 105 |
return true; |
105 | 106 |
} else { |
... | ... | |
115 | 116 |
} |
116 | 117 |
return conversation; |
117 | 118 |
} |
119 |
|
|
120 |
|
|
118 | 121 |
|
119 | 122 |
/* |
120 | 123 |
* (non-Javadoc) |
Also available in: Unified diff
ref #7063: add vocabulary selection for distribution editor and area selection in editor