Skip to content

Package: ProviderChangeListener

ProviderChangeListener

Coverage

1: /*******************************************************************************
2: * Copyright (c) 2011-2015 EclipseSource Muenchen GmbH and others.
3: *
4: * All rights reserved. This program and the accompanying materials
5: * are made available under the terms of the Eclipse Public License 2.0
6: * which accompanies this distribution, and is available at
7: * https://www.eclipse.org/legal/epl-2.0/
8: *
9: * SPDX-License-Identifier: EPL-2.0
10: *
11: * Contributors:
12: * jfaltermeier - initial API and implementation
13: ******************************************************************************/
14: package org.eclipse.emf.ecp.spi.core;
15:
16: import org.eclipse.emf.common.notify.Notification;
17: import org.eclipse.emf.ecore.EObject;
18:
19: /**
20: * Listener to get informed about changes on project contents by the {@link InternalProvider}.
21: *
22: * @author jfaltermeier
23: * @since 1.7
24: *
25: */
26: public interface ProviderChangeListener {
27:
28:         /**
29:          * Called when there is a new change notification.
30:          *
31:          * @param notification the new notification
32:          */
33:         void notify(Notification notification);
34:
35:         /**
36:          * @param objectToBeDeleted The deleted {@link EObject}
37:          */
38:         void postDelete(EObject objectToBeDeleted);
39:
40:         /**
41:          * @param objectToBeDeleted The deleted {@link EObject}
42:          */
43:         void preDelete(EObject objectToBeDeleted);
44:
45:         /**
46:          * @param objectToBeDeleted The deleted {@link EObject}
47:          * @return if the object can be deleted
48:          */
49:         boolean canDelete(EObject objectToBeDeleted);
50: }