Skip to content
Snippets Groups Projects
Commit 8ed68c2a authored by Daniel Ratiu's avatar Daniel Ratiu
Browse files

befire saving, ensure that library references are up-to-date

refs 1602
parent 5e297c93
No related branches found
No related tags found
No related merge requests found
......@@ -52,7 +52,7 @@ import org.fortiss.tooling.kernel.utils.UniqueIDUtils;
* @author ratiu
* @author $Author: ratiu $
* @version $Rev: 5274 $
* @ConQAT.Rating GREEN Hash: F386E548832F909EE9D1A29BF8B2DFC1
* @ConQAT.Rating YELLOW Hash: AB6843729245B2961222D42F9DB397EB
*/
public class LibraryService extends EObjectAwareServiceBase<ILibraryElementHandler<EObject>>
implements ILibraryService {
......
......@@ -42,6 +42,7 @@ import org.fortiss.tooling.kernel.ToolingKernelActivator;
import org.fortiss.tooling.kernel.extension.IStorageProvider;
import org.fortiss.tooling.kernel.extension.data.ITopLevelElement;
import org.fortiss.tooling.kernel.extension.data.ModelStorageError;
import org.fortiss.tooling.kernel.service.ILibraryService;
import org.fortiss.tooling.kernel.service.IPersistencyService;
import org.fortiss.tooling.kernel.service.listener.IPersistencyServiceListener;
import org.osgi.framework.Bundle;
......@@ -53,7 +54,7 @@ import org.osgi.framework.Bundle;
* @author hoelzl
* @author $Author$
* @version $Rev$
* @ConQAT.Rating GREEN Hash: 50565793AD7B4525071304CB4D545F22
* @ConQAT.Rating YELLOW Hash: 086ACCFAE6CEC64777D6DEC7BB23BADB
*/
public class PersistencyService implements IPersistencyService {
......@@ -121,6 +122,9 @@ public class PersistencyService implements IPersistencyService {
for(ITopLevelElement context : elementCache) {
if(context.isDirty()) {
try {
EObject rootElement = context.getRootModelElement();
ILibraryService.INSTANCE.ensureChildrenLibraryReferenceAreUpToDate(rootElement);
context.doSave(monitor);
} catch(CoreException e) {
error(ToolingKernelActivator.getDefault(), "Error during save operation.", e);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment