Project

General

Profile

Revision 259ce092

ID259ce09206978cfdccd1a59755af34001be578f2
Parent 95d1ab8c
Child c3bb7840

Added by Patrick Plitzner over 3 years ago

ref #6909 Add navigator context listening

View differences:

eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/navigator/e4/TaxonNavigatorE4.java
54 54
import eu.etaxonomy.cdm.persistence.hibernate.CdmDataChangeMap;
55 55
import eu.etaxonomy.taxeditor.model.AbstractUtility;
56 56
import eu.etaxonomy.taxeditor.model.DataChangeBridge;
57
import eu.etaxonomy.taxeditor.model.IContextListener;
57 58
import eu.etaxonomy.taxeditor.model.IDataChangeBehavior;
58 59
import eu.etaxonomy.taxeditor.navigation.NavigationUtil;
59 60
import eu.etaxonomy.taxeditor.navigation.l10n.Messages;
......
78 79
 */
79 80
public class TaxonNavigatorE4 implements
80 81
		IPostOperationEnabled, IConversationEnabled, Observer,
81
		ICdmEntitySessionEnabled, ICdmChangeListener {
82
		ICdmEntitySessionEnabled, ICdmChangeListener, IContextListener {
82 83

  
83 84
    private static final String RESTORING_TAXON_NAVIGATOR = Messages.TaxonNavigator_RESTORE;
84 85

  
......
105 106

  
106 107
	@Inject
107 108
    public TaxonNavigatorE4() {
109
	    CdmStore.getContextManager().addContextListener(this);
108 110
    }
109 111

  
110 112
	@PostConstruct
......
120 122

  
121 123
	    viewer.setContentProvider(new TaxonNavigatorContentProviderE4());
122 124
        viewer.setLabelProvider(new TaxonNavigatorLabelProviderE4());
123
        viewer.setInput(getInitialInput());
124 125

  
125 126
        //propagate selection
126 127
        selectionChangedListener = (event -> selService.setSelection(AbstractUtility.getElementsFromSelectionChangedEvent(event)));
......
170 171
		    CdmApplicationState.getCurrentDataChangeService().register(this);
171 172
		}
172 173
		CdmStore.getLoginManager().addObserver(this);
174
        viewer.setInput(getInitialInput());
173 175
	}
174 176

  
175 177
	/**
......
400 402
         propertyPathsMap.put("childNodes", taxonNodePropertyPaths); //$NON-NLS-1$
401 403
        return propertyPathsMap;
402 404
    }
405

  
406
    /**
407
     * {@inheritDoc}
408
     */
409
    @Override
410
    public void contextAboutToStop(IMemento memento, IProgressMonitor monitor) {
411
        // TODO Auto-generated method stub
412

  
413
    }
414

  
415
    /**
416
     * {@inheritDoc}
417
     */
418
    @Override
419
    public void contextStop(IMemento memento, IProgressMonitor monitor) {
420
    }
421

  
422
    /**
423
     * {@inheritDoc}
424
     */
425
    @Override
426
    public void contextStart(IMemento memento, IProgressMonitor monitor) {
427
        if(viewer!=null){
428
            init();
429
        }
430
    }
431

  
432
    /**
433
     * {@inheritDoc}
434
     */
435
    @Override
436
    public void contextRefresh(IProgressMonitor monitor) {
437
    }
438

  
439
    /**
440
     * {@inheritDoc}
441
     */
442
    @Override
443
    public void workbenchShutdown(IMemento memento, IProgressMonitor monitor) {
444
    }
403 445
}

Also available in: Unified diff

Add picture from clipboard (Maximum size: 40 MB)