Revision 0680729b
Added by Alex Theys about 12 years ago
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/uses/UsesViewPart.java | ||
---|---|---|
40 | 40 |
import eu.etaxonomy.cdm.model.common.VocabularyEnum; |
41 | 41 |
import eu.etaxonomy.cdm.model.description.DescriptionBase; |
42 | 42 |
import eu.etaxonomy.cdm.model.description.DescriptionElementBase; |
43 |
import eu.etaxonomy.cdm.model.description.Feature; |
|
43 | 44 |
import eu.etaxonomy.cdm.model.description.Modifier; |
44 | 45 |
import eu.etaxonomy.cdm.model.description.State; |
45 | 46 |
import eu.etaxonomy.cdm.model.description.TaxonDescription; |
... | ... | |
53 | 54 |
import eu.etaxonomy.taxeditor.editor.MultiPageTaxonEditor; |
54 | 55 |
import eu.etaxonomy.taxeditor.editor.TaxonEditorInput; |
55 | 56 |
import eu.etaxonomy.taxeditor.editor.definedterm.DefinedTermEditor; |
56 |
import eu.etaxonomy.taxeditor.editor.definedterm.operation.CreateDefinedTermOperation; |
|
57 | 57 |
import eu.etaxonomy.taxeditor.editor.key.AbstractGraphKeyEditor; |
58 | 58 |
import eu.etaxonomy.taxeditor.editor.view.descriptive.DescriptionElementDragListener; |
59 | 59 |
import eu.etaxonomy.taxeditor.editor.view.descriptive.DescriptionElementDropAdapter; |
60 | 60 |
import eu.etaxonomy.taxeditor.editor.view.descriptive.DescriptionElementTransfer; |
61 |
import eu.etaxonomy.taxeditor.editor.view.descriptive.DescriptiveContentProvider; |
|
62 |
import eu.etaxonomy.taxeditor.editor.view.descriptive.DescriptiveLabelProvider; |
|
61 | 63 |
import eu.etaxonomy.taxeditor.editor.view.descriptive.DescriptiveViewerSorter; |
62 | 64 |
import eu.etaxonomy.taxeditor.model.ContextListenerAdapter; |
63 | 65 |
import eu.etaxonomy.taxeditor.model.FeatureNodeContainer; |
... | ... | |
102 | 104 |
private void setupNecessaryItems(IProgressMonitor monitor) { |
103 | 105 |
MarkerType existingMarkertype = (MarkerType) CdmStore.getService(ITermService.class).find(UUID.fromString("2e6e42d9-e92a-41f4-899b-03c0ac64f039")); |
104 | 106 |
TermVocabulary<State> stateVocabulary = (TermVocabulary<State>) CdmStore.getService(IVocabularyService.class).find(UUID.fromString("67430d7c-fd43-4e9d-af5e-d0dca3f74931")); |
107 |
Feature featureUseRecord = (Feature) CdmStore.getService(ITermService.class).find(UUID.fromString("8125a59d-b4d5-4485-89ea-67306297b599")); |
|
105 | 108 |
TermVocabulary<Modifier> countryVocabulary = (TermVocabulary<Modifier>) CdmStore.getService(IVocabularyService.class).find(UUID.fromString("116c51f1-e63a-46f7-a258-e1149a42868b")); |
106 | 109 |
TermVocabulary<Modifier> plantPartVocabulary = (TermVocabulary<Modifier>) CdmStore.getService(IVocabularyService.class).find(UUID.fromString("369914fe-d54b-4063-99ce-abc81d30ad35")); |
107 | 110 |
TermVocabulary<Modifier> humanGroupVocabulary = (TermVocabulary<Modifier>) CdmStore.getService(IVocabularyService.class).find(UUID.fromString("ca46cea5-bdf7-438d-9cd8-e2793d2178dc")); |
... | ... | |
135 | 138 |
e.printStackTrace(); |
136 | 139 |
} |
137 | 140 |
stateVocabulary = TermVocabulary.NewInstance("Use Category", "Use Category", null, termSourceUri); |
138 |
stateVocabulary.setUuid(UUID.fromString("2e6e42d9-e92a-41f4-899b-03c0ac64f039"));
|
|
141 |
stateVocabulary.setUuid(UUID.fromString("67430d7c-fd43-4e9d-af5e-d0dca3f74931"));
|
|
139 | 142 |
State newDummyState = State.NewInstance("Dummy Use Cat", "Dummy Use Cat", null); |
140 | 143 |
State newDummySubCat = State.NewInstance("Dummy Use Sub Cat", "Dummy Use Sub Cat", null); |
141 | 144 |
newDummyState.addIncludes(newDummySubCat); |
... | ... | |
194 | 197 |
CdmStore.getService(IVocabularyService.class).saveOrUpdate(humanGroupVocabulary); |
195 | 198 |
conversation.commit(true); |
196 | 199 |
} |
200 |
/*if(featureUseRecord == null) { |
|
201 |
featureUseRecord = Feature.NewInstance("Use Record", "Use Record", null); |
|
202 |
featureUseRecord.setUuid(UUID.fromString("8125a59d-b4d5-4485-89ea-67306297b599")); |
|
203 |
//featureUseRecord. |
|
204 |
TermVocabulary<Feature> featureVocabulary = (TermVocabulary<Feature>)CdmStore.getService(IVocabularyService.class).find((UUID.fromString("b187d555-f06f-4d65-9e53-da7c93f8eaa8"))); |
|
205 |
featureVocabulary.addTerm(featureUseRecord); |
|
206 |
CdmStore.getService(IVocabularyService.class).saveOrUpdate(featureVocabulary); |
|
207 |
conversation.commit(true); |
|
208 |
|
|
209 |
}*/ |
|
197 | 210 |
|
198 | 211 |
|
199 | 212 |
conversation.close(); |
... | ... | |
230 | 243 |
viewer = new TreeViewer(new Tree(parent, SWT.MULTI | SWT.H_SCROLL |
231 | 244 |
| SWT.V_SCROLL | SWT.FULL_SELECTION)); |
232 | 245 |
|
233 |
viewer.setContentProvider(new UsesContentProvider(featureNodeContainerCache)); |
|
246 |
viewer.setContentProvider(new UsesContentProvider(featureNodeContainerCache)); |
|
247 |
//viewer.setContentProvider(new DescriptiveContentProvider(featureNodeContainerCache)); |
|
234 | 248 |
|
235 | 249 |
//viewer.setInput(descService.listTaxonDescriptions(Taxon, null, null, null, null, null, null)); |
236 | 250 |
|
... | ... | |
321 | 335 |
return; |
322 | 336 |
} |
323 | 337 |
|
324 |
if(part instanceof DefinedTermEditor){ |
|
338 |
/*if(part instanceof DefinedTermEditor){
|
|
325 | 339 |
showEmptyPage(); |
326 | 340 |
return; |
327 |
} |
|
341 |
}*/
|
|
328 | 342 |
|
329 | 343 |
if(part instanceof MultiPageTaxonEditor){ |
330 | 344 |
if(! part.equals(this.part)){ |
Also available in: Unified diff
AT: Comminting bug fixing for TaxEditor, fixing the setup and tree viewer