From fd95ecd7544247c06de715d7d2e8f8d58cc7ef38 Mon Sep 17 00:00:00 2001 From: Thomas Weber Date: Mon, 20 Mar 2023 16:19:38 +0100 Subject: [PATCH] Add Project Marker file if missing --- .../tools/vitruv/framework/vsum/VirtualModelBuilder.xtend | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/bundles/tools.vitruv.framework.vsum/src/tools/vitruv/framework/vsum/VirtualModelBuilder.xtend b/bundles/tools.vitruv.framework.vsum/src/tools/vitruv/framework/vsum/VirtualModelBuilder.xtend index 88aad23275..3b16eb0373 100644 --- a/bundles/tools.vitruv.framework.vsum/src/tools/vitruv/framework/vsum/VirtualModelBuilder.xtend +++ b/bundles/tools.vitruv.framework.vsum/src/tools/vitruv/framework/vsum/VirtualModelBuilder.xtend @@ -15,6 +15,7 @@ import tools.vitruv.framework.views.ViewTypeRepository import tools.vitruv.framework.vsum.helper.VsumFileSystemLayout import tools.vitruv.framework.vsum.internal.InternalVirtualModel import tools.vitruv.framework.vsum.internal.VirtualModelImpl +import tools.vitruv.change.propagation.ProjectMarker import static com.google.common.base.Preconditions.checkState @@ -96,6 +97,11 @@ class VirtualModelBuilder { fileSystemLayout.prepare() val vsum = new VirtualModelImpl(fileSystemLayout, userInteractor, viewTypeRepository, changeSpecificationRepository) vsum.loadExistingModels() + try { + ProjectMarker.getProjectRootFolder(storageFolder) + } catch (IllegalStateException exception) { + ProjectMarker.markAsProjectRootFolder(storageFolder) + } return vsum } } \ No newline at end of file