2 * Copyright (C) 2015 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
.store
;
11 import org
.eclipse
.swt
.widgets
.Display
;
13 import eu
.etaxonomy
.cdm
.api
.application
.CdmChangeEvent
;
14 import eu
.etaxonomy
.cdm
.api
.application
.CdmDataChangeService
;
15 import eu
.etaxonomy
.cdm
.api
.application
.ICdmChangeListener
;
22 public class CdmUIDataChangeService
extends CdmDataChangeService
{
25 * @see eu.etaxonomy.taxeditor.store.ICdmDataChangeService#fireChangeEvent(eu.etaxonomy.cdm.api.application.CdmChangeEvent, boolean)
28 public void fireChangeEvent(final CdmChangeEvent event
, boolean async
) {
30 for(final ICdmChangeListener listener
: listeners
) {
31 // Update the user interface asynchronously
33 Display
.getDefault().asyncExec(new Runnable() {
36 listener
.onChange(event
);
40 // Update the user interface synchronously
41 Display
.getDefault().syncExec(new Runnable() {
44 listener
.onChange(event
);