/*******************************************************************************
 * Copyright (c) 2008-2011 Chair for Applied Software Engineering,
 * Technische Universitaet Muenchen.
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 * 
 * Contributors:
 ******************************************************************************/
package org.eclipse.emf.emfstore.client.model.impl;

import org.eclipse.emf.emfstore.client.model.WorkspaceManager;
import org.eclipse.emf.emfstore.client.model.observers.SaveStateChangedObserver;

/**
 * Notifies SaveStateChangedObservers about changes of the project space save state.
 * 
 * @author User
 * 
 */
public class ProjectSpaceSaveStateNotifier implements IDEObjectCollectionDirtyStateListener {

	private final ProjectSpaceBase projectSpace;

	/**
	 * Default constructor.
	 * 
	 * @param projectSpace the project space to notify for
	 */
	public ProjectSpaceSaveStateNotifier(ProjectSpaceBase projectSpace) {
		this.projectSpace = projectSpace;

	}

	/**
	 * {@inheritDoc}
	 * 
	 * @see org.eclipse.emf.emfstore.client.model.impl.IDEObjectCollectionDirtyStateListener#notifyAboutDirtyStateChange()
	 */
	public void notifyAboutDirtyStateChange() {
		WorkspaceManager.getObserverBus().notify(SaveStateChangedObserver.class)
			.saveStateChanged(projectSpace, projectSpace.hasUnsavedChanges());
	}

}
@@ -73,16 +73,17 @@
 ********
+%0D
 %0A * Copy
@@ -141,16 +141,17 @@
 neering,
+%0D
 %0A * Tech
@@ -179,16 +179,17 @@
 uenchen.
+%0D
 %0A * All 
@@ -248,16 +248,17 @@
 aterials
+%0D
 %0A * are 
@@ -322,16 +322,17 @@
 nse v1.0
+%0D
 %0A * whic
@@ -383,16 +383,17 @@
 lable at
+%0D
 %0A * http
@@ -429,20 +429,22 @@
 v10.html
+%0D
 %0A * 
+%0D
 %0A * Cont
@@ -452,16 +452,17 @@
 ibutors:
+%0D
 %0A ******
@@ -534,16 +534,17 @@
 *******/
+%0D
 %0Apackage
@@ -587,17 +587,19 @@
 el.impl;
-%0A
+%0D%0A%0D
 %0Aimport 
@@ -653,16 +653,17 @@
 Manager;
+%0D
 %0Aimport 
@@ -739,13 +739,16 @@
 ver;
-%0A
+%0D%0A%0D
 %0A/**
+%0D
 %0A * 
@@ -828,20 +828,22 @@
 e state.
+%0D
 %0A * 
+%0D
 %0A * @aut
@@ -850,20 +850,26 @@
 hor 
-User
+mkoegel%0D
 %0A * 
+%0D
 %0A */
+%0D
 %0Apub
@@ -958,17 +958,19 @@
 stener %7B
-%0A
+%0D%0A%0D
 %0A%09privat
@@ -1007,22 +1007,25 @@
 ctSpace;
-%0A
+%0D%0A%0D
 %0A%09/**
+%0D
 %0A%09 * Def
@@ -1041,21 +1041,23 @@
 tructor.
+%0D
 %0A%09 * 
+%0D
 %0A%09 * @pa
@@ -1104,21 +1104,23 @@
 tify for
+%0D
 %0A%09 */
+%0D
 %0A%09public
@@ -1182,16 +1182,17 @@
 Space) %7B
+%0D
 %0A%09%09this.
@@ -1223,18 +1223,23 @@
 ace;
-%0A%0A%09%7D%0A
+%0D%0A%0D%0A%09%7D%0D%0A%0D
 %0A%09/**
+%0D
 %0A%09 *
@@ -1252,21 +1252,23 @@
 eritDoc%7D
+%0D
 %0A%09 * 
+%0D
 %0A%09 * @se
@@ -1379,21 +1379,23 @@
 Change()
+%0D
 %0A%09 */
+%0D
 %0A%09public
@@ -1431,16 +1431,17 @@
 ange() %7B
+%0D
 %0A%09%09Works
@@ -1507,16 +1507,17 @@
 r.class)
+%0D
 %0A%09%09%09.sav
@@ -1582,10 +1582,13 @@
 ());
+%0D
 %0A%09%7D
-%0A
+%0D%0A%0D
 %0A%7D

set author tag