2 * Copyright (C) 2011 EDIT
3 * European Distributed Institute of Taxonomy
4 * http://www.e-taxonomy.eu
6 * The contents of this file are subject to the Mozilla Public License Version 1.1
7 * See LICENSE.TXT at the top of this package for the full license terms.
9 package eu
.etaxonomy
.taxeditor
.editor
;
11 import org
.eclipse
.core
.runtime
.IProgressMonitor
;
12 import org
.eclipse
.ui
.IMemento
;
14 import eu
.etaxonomy
.taxeditor
.model
.ContextListenerAdapter
;
15 import eu
.etaxonomy
.taxeditor
.model
.MessagingUtils
;
16 import eu
.etaxonomy
.taxeditor
.store
.CdmStore
;
17 import eu
.etaxonomy
.taxeditor
.store
.UseObjectStore
;
20 * The context listener will call this class when a new context is started.
21 * It will reset the UseObjectStore to guarantee the static
22 * content of the store will be refreshed each time we load a new context.
25 * @created mar 13, 2012
27 public class UseObjectManager
extends ContextListenerAdapter
{
29 public UseObjectManager() {
30 CdmStore
.getContextManager().addContextListener(this);
35 public void contextRefresh(IProgressMonitor monitor
) {
36 monitor
.subTask("Reset usage data");
37 MessagingUtils
.warn(getClass(), "Reset usage data");
38 UseObjectStore
.reset();
43 public void contextStart(IMemento memento
, IProgressMonitor monitor
) {
44 // monitor.subTask("Starting the Uses View");
45 // MessagingUtils.warn(getClass(), "Starting Uses View warn");
46 UseObjectStore
.reset();