3 * Copyright (C) 2007 EDIT
4 * European Distributed Institute of Taxonomy
5 * http://www.e-taxonomy.eu
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.
11 package eu
.etaxonomy
.taxeditor
.editor
.view
.checklist
;
13 import java
.util
.ArrayList
;
14 import java
.util
.Arrays
;
15 import java
.util
.Collections
;
16 import java
.util
.HashMap
;
17 import java
.util
.List
;
19 import java
.util
.SortedSet
;
21 import org
.apache
.log4j
.Logger
;
22 import org
.eclipse
.core
.runtime
.IProgressMonitor
;
23 import org
.eclipse
.core
.runtime
.IStatus
;
24 import org
.eclipse
.core
.runtime
.Status
;
25 import org
.eclipse
.core
.runtime
.jobs
.Job
;
26 import org
.eclipse
.jface
.viewers
.ISelection
;
27 import org
.eclipse
.jface
.viewers
.StructuredViewer
;
28 import org
.eclipse
.jface
.viewers
.TableViewer
;
29 import org
.eclipse
.jface
.viewers
.TableViewerColumn
;
30 import org
.eclipse
.swt
.SWT
;
31 import org
.eclipse
.swt
.events
.ModifyListener
;
32 import org
.eclipse
.swt
.events
.SelectionAdapter
;
33 import org
.eclipse
.swt
.events
.SelectionEvent
;
34 import org
.eclipse
.swt
.layout
.GridData
;
35 import org
.eclipse
.swt
.layout
.GridLayout
;
36 import org
.eclipse
.swt
.widgets
.Composite
;
37 import org
.eclipse
.swt
.widgets
.Display
;
38 import org
.eclipse
.swt
.widgets
.Label
;
39 import org
.eclipse
.swt
.widgets
.Menu
;
40 import org
.eclipse
.swt
.widgets
.MenuItem
;
41 import org
.eclipse
.swt
.widgets
.Table
;
42 import org
.eclipse
.swt
.widgets
.TableColumn
;
43 import org
.eclipse
.swt
.widgets
.Text
;
44 import org
.eclipse
.swt
.widgets
.ToolBar
;
45 import org
.eclipse
.swt
.widgets
.ToolItem
;
46 import org
.eclipse
.ui
.IEditorInput
;
47 import org
.eclipse
.ui
.IEditorSite
;
48 import org
.eclipse
.ui
.IMemento
;
49 import org
.eclipse
.ui
.ISelectionListener
;
50 import org
.eclipse
.ui
.ISelectionService
;
51 import org
.eclipse
.ui
.IWorkbenchPart
;
52 import org
.eclipse
.ui
.PartInitException
;
53 import org
.eclipse
.ui
.part
.EditorPart
;
54 import org
.eclipse
.ui
.progress
.IWorkbenchSiteProgressService
;
56 import eu
.etaxonomy
.cdm
.api
.conversation
.ConversationHolder
;
57 import eu
.etaxonomy
.cdm
.api
.conversation
.IConversationEnabled
;
58 import eu
.etaxonomy
.cdm
.api
.service
.ITaxonNodeService
;
59 import eu
.etaxonomy
.cdm
.hibernate
.HibernateProxyHelper
;
60 import eu
.etaxonomy
.cdm
.model
.common
.DefinedTermBase
;
61 import eu
.etaxonomy
.cdm
.model
.taxon
.Classification
;
62 import eu
.etaxonomy
.cdm
.model
.taxon
.Taxon
;
63 import eu
.etaxonomy
.cdm
.model
.taxon
.TaxonNode
;
64 import eu
.etaxonomy
.cdm
.persistence
.hibernate
.CdmDataChangeMap
;
65 import eu
.etaxonomy
.taxeditor
.editor
.EditorUtil
;
66 import eu
.etaxonomy
.taxeditor
.editor
.SimpleSelectionProvider
;
67 import eu
.etaxonomy
.taxeditor
.editor
.view
.checklist
.edit
.DistributionEditingSupport
;
68 import eu
.etaxonomy
.taxeditor
.editor
.view
.checklist
.filter
.ChecklistEditorFilter
;
69 import eu
.etaxonomy
.taxeditor
.editor
.view
.checklist
.listener
.ChecklistDropdownSelectionListener
;
70 import eu
.etaxonomy
.taxeditor
.editor
.view
.checklist
.listener
.ChecklistFocusListener
;
71 import eu
.etaxonomy
.taxeditor
.editor
.view
.checklist
.listener
.ChecklistModifyListener
;
72 import eu
.etaxonomy
.taxeditor
.model
.IContextListener
;
73 import eu
.etaxonomy
.taxeditor
.model
.IDirtyMarkable
;
74 import eu
.etaxonomy
.taxeditor
.model
.IPartContentHasDetails
;
75 import eu
.etaxonomy
.taxeditor
.model
.IPartContentHasFactualData
;
76 import eu
.etaxonomy
.taxeditor
.preference
.PreferencesUtil
;
77 import eu
.etaxonomy
.taxeditor
.preference
.Resources
;
78 import eu
.etaxonomy
.taxeditor
.store
.CdmStore
;
82 * ChecklistViewPart class.
89 public class ChecklistEditor
extends EditorPart
implements ISelectionListener
, IPartContentHasFactualData
, IConversationEnabled
,
90 IContextListener
, IPartContentHasDetails
, IDirtyMarkable
{//, ICdmEntitySessionEnabled {
92 private static final Logger logger
= Logger
.getLogger(ChecklistEditor
.class);
94 * Key used for storing Checklist Editor View
96 private static final String CHECKLIST_EDITOR_MEMENTO_KEY
= "checklistEditor";
101 private class ChecklistJob
extends Job
{
103 private List
<TaxonNode
> taxonNodes
;
108 public ChecklistJob(String title
, List
<TaxonNode
> listTaxonNodes
) {
110 this.taxonNodes
= listTaxonNodes
;
118 * @see org.eclipse.core.runtime.jobs.Job#run(org.eclipse.core.runtime.
122 public IStatus
run(final IProgressMonitor monitor
) {
124 logger
.debug("Begin of eclipse core runtime Job to Retrieve datasources");
125 monitor
.beginTask("Retrieving TaxonNodes", taxonNodes
.size() + 1);
127 final List
<Taxon
> taxonList
= new ArrayList
<Taxon
>();
129 for (TaxonNode taxonNode
: taxonNodes
) {
130 HibernateProxyHelper hh
= new HibernateProxyHelper();
131 Taxon taxon
= hh
.deproxy(taxonNode
.getTaxon(), Taxon
.class);
132 taxonList
.add(taxon
);
135 Display
.getDefault().asyncExec(new Runnable() {
139 viewer
.setInput(taxonList
);
148 return Status
.OK_STATUS
;
154 * <code>ID="eu.etaxonomy.taxeditor.store.datasource"{trunked}</code>
156 public static String ID
= "eu.etaxonomy.taxeditor.editor.view.checklist.ChecklistEditor";
158 private TableViewer viewer
;
160 private String partNameCache
;
162 private IWorkbenchSiteProgressService service
;
164 private ITaxonNodeService taxonNodeService
;
166 private ChecklistEditorComparator comparator
;
168 private ChecklistEditorInput checklistEditorInput
;
170 private SimpleSelectionProvider simpleSelectionProvider
;
172 private ISelectionService selectionService
;
174 private ConversationHolder conversation
;
176 private Integer countNodes
;
178 private List
<TaxonNode
> selectedTaxonNodes
;
180 private boolean dirty
;
182 private ChecklistEditorFilter filter
;
184 private Menu headerMenu
;
186 private Label statusLabel
;
188 // private final ICdmEntitySession cdmEntitySession;
190 private ChecklistLabelProvider labelProvider
;
192 private SortedSet
<DefinedTermBase
> terms
= null;
193 private ToolItem toolItem
;
194 private ChecklistDropdownSelectionListener dropListener
;
197 * @return the selectedTaxonNodes
199 public List
<TaxonNode
> getSelectedTaxonNodes() {
200 return selectedTaxonNodes
;
204 * @param selectedTaxonNodes
205 * the selectedTaxonNodes to set
207 public void setSelectedTaxonNodes(List
<TaxonNode
> selectedTaxonNodes
) {
208 this.selectedTaxonNodes
= selectedTaxonNodes
;
213 * Constructor for CdmDataSourceViewPart.
216 public ChecklistEditor() {
217 //cdmEntitySession = CdmStore.getCurrentSessionManager().newSession(this, true);
223 public void createPartControl(Composite parent
) {
224 service
= (IWorkbenchSiteProgressService
) getSite().getAdapter(IWorkbenchSiteProgressService
.class);
225 taxonNodeService
= CdmStore
.getService(ITaxonNodeService
.class);
226 selectionService
= getSite().getWorkbenchWindow().getSelectionService();
227 selectionService
.addSelectionListener(this);
228 viewer
= new TableViewer(parent
, SWT
.MULTI
| SWT
.H_SCROLL
| SWT
.V_SCROLL
| SWT
.FULL_SELECTION
);
229 labelProvider
= new ChecklistLabelProvider(this.viewer
);
230 terms
= labelProvider
.getNamedAreas();
231 filter
= new ChecklistEditorFilter();
232 createTopComposite(parent
);
239 private void createTopComposite(Composite parent
) {
240 GridLayout gridLayout
= new GridLayout(3, false);
241 gridLayout
.marginWidth
= 0;
242 gridLayout
.marginHeight
= 0;
243 parent
.setLayout(gridLayout
);
245 final Text searchText
= createSearchBar(parent
);
246 createToolbar(parent
);
248 getSite().setSelectionProvider(viewer
);
250 final ModifyListener modifyListener
= new ChecklistModifyListener(viewer
, filter
, searchText
);
252 searchText
.addFocusListener(new ChecklistFocusListener(searchText
, modifyListener
));
253 searchText
.addModifyListener(modifyListener
);
254 createGridDataForViewerLayout();
256 viewer
.addFilter(filter
);
259 viewer
.setContentProvider(new ChecklistContentProvider());
260 viewer
.setLabelProvider(this.labelProvider
);
261 comparator
= new ChecklistEditorComparator();
262 viewer
.setComparator(comparator
);
264 createStatusBar(parent
);
267 private void createGridDataForViewerLayout() {
268 GridData gridData
= new GridData();
269 gridData
.verticalAlignment
= GridData
.FILL
;
270 gridData
.horizontalSpan
= 3;
271 gridData
.grabExcessHorizontalSpace
= true;
272 gridData
.grabExcessVerticalSpace
= true;
273 gridData
.horizontalAlignment
= GridData
.FILL
;
274 viewer
.getControl().setLayoutData(gridData
);
281 private Text
createSearchBar(Composite parent
) {
282 Label searchLabel
= new Label(parent
, SWT
.NONE
);
283 searchLabel
.setText("Search: ");
284 final Text searchText
= new Text(parent
, SWT
.BORDER
| SWT
.SEARCH
| SWT
.ICON_SEARCH
| SWT
.CANCEL
);
285 searchText
.setLayoutData(new GridData(GridData
.GRAB_HORIZONTAL
| GridData
.HORIZONTAL_ALIGN_FILL
));
286 searchText
.setForeground(EditorUtil
.getColor(Resources
.SEARCH_VIEW_FOREGROUND
));
287 searchText
.setText("type filter text");
294 private void createToolbar(Composite parent
) {
295 ToolBar toolBar
= new ToolBar(parent
, SWT
.NONE
);
296 toolItem
= new ToolItem(toolBar
, SWT
.DROP_DOWN
| SWT
.BORDER
);
297 toolItem
.setText("Distribution Status");
298 toolItem
.setToolTipText("Show Distribution Status for selected Areas");
299 createToolbarItems();
300 toolItem
.addSelectionListener(dropListener
);
304 private void createToolbarItems() {
305 dropListener
= new ChecklistDropdownSelectionListener(toolItem
, this, terms
);
306 for (DefinedTermBase
<DefinedTermBase
> term
: terms
) {
308 dropListener
.add(term
);
313 private void createStatusBar(Composite composite
) {
314 GridData gridData
= new GridData();
315 gridData
.horizontalSpan
= 3;
316 gridData
.grabExcessHorizontalSpace
= true;
317 gridData
.horizontalAlignment
= GridData
.FILL
;
319 statusLabel
= new Label(composite
, SWT
.LEFT
);
320 statusLabel
.setText("Anzahl der Elemente: " + (countNodes
!= null ? countNodes
: "uknown"));
321 statusLabel
.setLayoutData(gridData
);
324 private void createTable() {
325 Table table
= viewer
.getTable();//new Table(parent, viewer.getTable().getStyle());
326 List
<String
> titles
= new ArrayList
<String
>();
327 List
<Integer
> bounds
= new ArrayList
<Integer
>();
328 if (PreferencesUtil
.isShowRankInChecklistEditor()){
329 Collections
.addAll(titles
, "Taxon", "Rank");
330 Collections
.addAll(bounds
, 300, 200);
332 Collections
.addAll(titles
, "Taxon");
333 Collections
.addAll(bounds
, 300);
337 Map
<Integer
, Boolean
> restoreValuesForColumnWidth
= restoreValuesForColumnWidth(titles
, bounds
);
338 createInitalDistributionColumns(table
, titles
, bounds
, restoreValuesForColumnWidth
);
339 table
.setSortDirection(SWT
.DOWN
);
340 table
.setHeaderVisible(true);
341 table
.setLinesVisible(true);
344 * This method creates initially the distribution columns for a table. It should only be called for creation.<br>
347 *<b>Notice:</b> If you want to add additional columns later please use <b>addTableViewerColumn()</b>
352 * @param restoreValuesForColumnWidth
354 private void createInitalDistributionColumns(Table table
,
355 List
<String
> titles
, List
<Integer
> bounds
, Map
<Integer
, Boolean
> restoreValuesForColumnWidth
) {
356 for (int columnIndex
= 0; columnIndex
< titles
.size(); columnIndex
++) {
357 TableViewerColumn column
= new TableViewerColumn(viewer
, SWT
.NONE
);
358 column
.getColumn().setText(titles
.get(columnIndex
));
359 column
.getColumn().setWidth(bounds
.get(columnIndex
));
360 column
.getColumn().setResizable(true);
361 column
.getColumn().setMoveable(true);
362 column
.getColumn().addSelectionListener(getSelectionAdapter(column
.getColumn(), columnIndex
));
363 if (columnIndex
== 0) {
364 table
.setSortColumn(column
.getColumn());
366 if (columnIndex
== 1 && PreferencesUtil
.isShowRankInChecklistEditor()) {
367 /** uncommented it for now because no rank editing is wanted **/
368 // column.setEditingSupport(new RankEditingSupport(viewer, this));
370 if ((columnIndex
== 1 && !PreferencesUtil
.isShowRankInChecklistEditor()) || columnIndex
>= 2 ) {
371 //read PrefrenceStore to setWidth according to last saved state
372 if(restoreValuesForColumnWidth
.get(columnIndex
)){
373 column
.getColumn().setWidth(50);
375 column
.getColumn().setWidth(50);
377 column
.setEditingSupport(new DistributionEditingSupport(viewer
, this, columnIndex
));
383 * This methods loads the last opened distribution columns for the table viewer from the prefrence store.<br>
385 * <b>Notice:</b> It adds also the TitleCache to the titles list for the header of each column.<p>
389 * @return Map<Integer, Boolean>
391 private Map
<Integer
, Boolean
> restoreValuesForColumnWidth(List
<String
> titles
,
392 List
<Integer
> bounds
) {
393 Map
<Integer
, Boolean
> restoreColumnWidth
= new HashMap
<Integer
, Boolean
>();
396 if (PreferencesUtil
.isShowRankInChecklistEditor()){
401 for (DefinedTermBase
<DefinedTermBase
> term
: terms
) {
403 restoreColumnWidth
.put(columnIndex
, PreferencesUtil
.getPreferenceStore().getBoolean(term
.getUuid().toString()));
404 if (PreferencesUtil
.isShowIdInVocabularyInChecklistEditor()){
405 if (term
.getIdInVocabulary() != null){
406 titles
.add(term
.getIdInVocabulary());
408 titles
.add(term
.getTitleCache());
411 titles
.add(term
.getTitleCache());
418 return restoreColumnWidth
;
422 * This method adds new DistributionColumns to an existing table.
429 private TableViewerColumn
addTableViewerColumn(String title
, int bound
, final int colNumber
) {
430 final TableViewerColumn viewerColumn
= new TableViewerColumn(viewer
, SWT
.NONE
);
431 final TableColumn column
= viewerColumn
.getColumn();
432 column
.setText(title
);
433 column
.setWidth(200);
434 viewerColumn
.setEditingSupport(new DistributionEditingSupport(viewer
, this, colNumber
));
435 column
.setResizable(true);
436 column
.setMoveable(true);
444 * pull data from database and set input for view
447 private void loadDataInput() {
448 Classification classification
= checklistEditorInput
.getClassification();
449 TaxonNode taxonNode
= checklistEditorInput
.getTaxonNode();
450 if (classification
!= null && taxonNode
== null) {
451 countNodes
= taxonNodeService
.countAllNodesForClassification(classification
);
452 statusLabel
.setText("Anzahl der Elemente: " + (countNodes
!= null ? countNodes
: "unknown"));
453 // This should not kill the view nor the editor if something goes
455 // TODO: don't load the whole taxonNode Object but rather a small
456 // and simple Solution
457 // FIXME: May be don't open classification which are greater than
459 selectedTaxonNodes
= taxonNodeService
.listAllNodesForClassification(classification
, 0, countNodes
);
460 getService().schedule(new ChecklistJob("loading Taxa", selectedTaxonNodes
), Job
.LONG
);
462 if (taxonNode
!= null) {
463 selectedTaxonNodes
= taxonNodeService
.loadChildNodesOfTaxonNode(taxonNode
, NODE_INIT_STRATEGY
, true, null);
464 getService().schedule(new ChecklistJob("loading Taxa", selectedTaxonNodes
), Job
.LONG
);
470 public void dispose() {
471 this.checklistEditorInput
.dispose();
473 conversation
.unregisterForDataStoreChanges(this);
474 conversation
.close();
480 public void setFocus() {
482 viewer
.getControl().setFocus();
488 * @see org.eclipse.ui.part.WorkbenchPart#showBusy(boolean)
492 public void showBusy(boolean busy
) {
493 super.showBusy(busy
);
494 // viewer.getTable().setEnabled(!busy);
496 partNameCache
= getPartName();
497 setPartName("Loading " + countNodes
+ " Taxa...");
499 if (partNameCache
!= null) {
500 setPartName(partNameCache
);
507 * Getter for the field <code>viewer</code>.
510 * @return a {@link org.eclipse.jface.viewers.StructuredViewer} object.
512 public StructuredViewer
getViewer() {
516 public void refresh() {
521 * This method should only be called for adding new Distribution columns and reloading the table.<br>
522 * It will hide the old distribution column and load the newly added columns.<br>
524 * <b>Notice:</b> for data update please use <b>refresh()</b>
527 @SuppressWarnings({ "unchecked", "rawtypes" })
528 public void reload(){
529 //create new Items for Dropdown menue
530 Table table
= viewer
.getTable();
531 table
.setRedraw(false);
532 SortedSet
<DefinedTermBase
> oldTerms
= terms
;
534 // if (PreferencesUtil.isShowIdInVocabularyInChecklistEditor()){
537 // terms = (SortedSet<DefinedTermBase>) labelProvider.getTermsOrderedByLabels(labelProvider.getNamedAreas(), CdmStore.getDefaultLanguage());
539 SortedSet
<DefinedTermBase
> newTerms
= labelProvider
.getNamedAreas();
540 toolItem
.removeSelectionListener(dropListener
);
541 hideDistributionColumns(oldTerms
);
542 createToolbarItems();
543 toolItem
.addSelectionListener(dropListener
);
544 for(DefinedTermBase term
:newTerms
){
545 int count
= viewer
.getTable().getColumnCount();
546 addTableViewerColumn(term
.getTitleCache(), 200, count
);
547 acitivateNewColumnInDropDownMenu(term
);
549 viewer
.setLabelProvider(labelProvider
);
550 getService().schedule(new ChecklistJob("loading Taxa", selectedTaxonNodes
), Job
.LONG
);
551 table
.setRedraw(true);
555 private void acitivateNewColumnInDropDownMenu(DefinedTermBase term
) {
556 Menu menu
= dropListener
.getMenu();
557 MenuItem
[] items
= menu
.getItems();
558 for(MenuItem item
: items
){
559 if(item
.getText().equalsIgnoreCase(term
.getTitleCache())){
560 item
.setSelection(true);
561 PreferencesUtil
.getPreferenceStore().setValue(term
.getUuid().toString(), true);
566 private void hideDistributionColumns(SortedSet
<DefinedTermBase
> oldTerms
) {
567 TableColumn
[] columns
= viewer
.getTable().getColumns();
568 for(int i
=4; i
<columns
.length
; i
++){
570 columns
[i
].dispose();
571 Menu menu
= dropListener
.getMenu();
572 int itemCount
= menu
.getItemCount();
573 MenuItem item
= menu
.getItem(i
-3);
574 item
.setSelection(false);
576 if(oldTerms
!= null){
577 for(DefinedTermBase term
: oldTerms
){
578 PreferencesUtil
.getPreferenceStore().setValue(term
.getUuid().toString(), false);
585 * Getter for the field <code>service</code>.
588 * @return the service
590 public IWorkbenchSiteProgressService
getService() {
594 private SelectionAdapter
getSelectionAdapter(final TableColumn column
, final int index
) {
595 SelectionAdapter selectionAdapter
= new SelectionAdapter() {
597 public void widgetSelected(SelectionEvent e
) {
598 comparator
.setColumn(index
);
599 int dir
= viewer
.getTable().getSortDirection();
600 if (viewer
.getTable().getSortColumn() == column
) {
601 dir
= dir
== SWT
.UP ? SWT
.DOWN
: SWT
.UP
;
605 viewer
.getTable().setSortDirection(dir
);
606 viewer
.getTable().setSortColumn(column
);
610 return selectionAdapter
;
614 public void doSave(IProgressMonitor monitor
) {
616 monitor
.beginTask("Saving Editor", 1);
617 if (!conversation
.isBound()) {
620 CdmStore
.getService(ITaxonNodeService
.class).merge(selectedTaxonNodes
, true);
621 //this.checklistEditorInput.merge();
622 conversation
.commit(true);
632 public void doSaveAs() {
636 public void init(IEditorSite site
, IEditorInput input
) throws PartInitException
{
639 if (input
instanceof ChecklistEditorInput
) {
640 checklistEditorInput
= (ChecklistEditorInput
) input
;
641 setPartName(getPartName() + ": " + checklistEditorInput
.getName());
642 conversation
= checklistEditorInput
.getConversation();
643 conversation
.registerForDataStoreChanges(this);
645 simpleSelectionProvider
= new SimpleSelectionProvider();
646 getSite().setSelectionProvider(simpleSelectionProvider
);
651 public boolean isSaveAsAllowed() {
658 * @see org.eclipse.ui.ISelectionListener#selectionChanged(org.eclipse.ui.
659 * IWorkbenchPart, org.eclipse.jface.viewers.ISelection)
662 public void selectionChanged(IWorkbenchPart part
, ISelection selection
) {
673 * eu.etaxonomy.taxeditor.model.IContextListener#contextAboutToStop(org.
674 * eclipse.ui.IMemento, org.eclipse.core.runtime.IProgressMonitor)
678 public void contextAboutToStop(IMemento memento
, IProgressMonitor monitor
) {
686 * eu.etaxonomy.taxeditor.model.IContextListener#contextStop(org.eclipse
687 * .ui.IMemento, org.eclipse.core.runtime.IProgressMonitor)
690 public void contextStop(IMemento memento
, IProgressMonitor monitor
) {
691 // IStructuredSelection sel = (IStructuredSelection) this.viewer.getSelection();
692 // if (sel.isEmpty()) {
695 // memento = memento.createChild("tree-selections");
696 // Iterator iter = sel.iterator();
697 // while (iter.hasNext()) {
698 // String nodeName = (String) iter.next();
699 // memento.createChild("selected-nodes", nodeName);
707 * eu.etaxonomy.taxeditor.model.IContextListener#contextStart(org.eclipse
708 * .ui.IMemento, org.eclipse.core.runtime.IProgressMonitor)
711 public void contextStart(IMemento memento
, IProgressMonitor monitor
) {
719 * eu.etaxonomy.taxeditor.model.IContextListener#contextRefresh(org.eclipse
720 * .core.runtime.IProgressMonitor)
723 public void contextRefresh(IProgressMonitor monitor
) {
730 * eu.etaxonomy.taxeditor.model.IContextListener#workbenchShutdown(org.eclipse
731 * .ui.IMemento, org.eclipse.core.runtime.IProgressMonitor)
734 public void workbenchShutdown(IMemento memento
, IProgressMonitor monitor
) {
735 conversation
.clear();
736 conversation
.close();
740 private static final List
<String
> NODE_INIT_STRATEGY
= Arrays
.asList(new String
[] { "descriptions",
741 "descriptions.*", "description.state", "feature", "feature.*", "childNodes", "childNodes.taxon",
742 "childNodes.taxon.name", "taxonNodes", "taxonNodes.*", "taxonNodes.taxon.*", "taxon.*",
743 "taxon.descriptions", "taxon.sec", "taxon.name.*", "terms", "name.*",
744 "name.rank.representations", "name.status.type.representations", "stateData.$" });
750 * eu.etaxonomy.taxeditor.model.IDirtyMarkableSelectionProvider#changed(
754 public void changed(Object element
) {
755 if (element
!= null) {
756 viewer
.update(element
, null);
758 firePropertyChange(PROP_DIRTY
);
763 * @see eu.etaxonomy.taxeditor.model.IDirtyMarkableSelectionProvider#forceDirty()
766 public void forceDirty() {
770 public void setDirty(boolean dirty
) {
772 firePropertyChange(PROP_DIRTY
);
778 * @see org.eclipse.ui.forms.editor.FormEditor#isDirty()
781 public boolean isDirty() {
786 * @see eu.etaxonomy.taxeditor.session.ICdmEntitySessionEnabled#getCdmEntitySession()
791 // * @see eu.etaxonomy.taxeditor.session.ICdmEntitySessionEnabled#getRootEntities()
794 // public <T extends CdmBase> Collection<T> getRootEntities() {
795 // // TODO Auto-generated method stub
800 // * @see eu.etaxonomy.taxeditor.session.ICdmEntitySessionEnabled#getPropertyPathsMap()
803 // public Map<Object, List<String>> getPropertyPathsMap() {
804 // // TODO Auto-generated method stub
809 * @return the labelProvider
811 public ChecklistLabelProvider
getLabelProvider() {
812 return labelProvider
;
816 * @see eu.etaxonomy.cdm.persistence.hibernate.ICdmPostDataChangeObserver#update(eu.etaxonomy.cdm.persistence.hibernate.CdmDataChangeMap)
819 public void update(CdmDataChangeMap arg0
) {
820 // TODO Auto-generated method stub
825 * @see eu.etaxonomy.cdm.api.conversation.IConversationEnabled#getConversationHolder()
828 public ConversationHolder
getConversationHolder() {