Commit 3a7fabb3 authored by Johannes Eder's avatar Johannes Eder
Browse files

cleaned up libraray model element factory

Issue-Ref: 3891
Issue-Url: https://af3-developer.fortiss.org/issues/3891

Signed-off-by: Johannes Eder's avatarJohannes Eder <eder@fortiss.org>
parent bf26b9d1
......@@ -2,7 +2,7 @@ ConstraintsProjectUtils.java 12d6fee43787c40692ace50aac0dbefb1c6bb092 GREEN
ExternalFileUtils.java 4171a41060407cd4f19c99fcaf1ebfb9a390134a GREEN
FileUtils.java e2e2c54ae8d2e4b7718e35d27358c798ca5657dc GREEN
FunctionScopeUtils.java 054c92406affa0c0ad8ac7a067de9608d0bbca2b GREEN
LibraryModelElementFactory.java ed73c5a23f27b61a67aeeccaece64ca5e0f69dcb GREEN
LibraryModelElementFactory.java a5a30a0e6b274d220c397d9bf0f14756d49bd19f YELLOW
ProjectModelElementFactory.java aeeb971911522ba8b5ab6c8a6399dd7a59b09bc1 YELLOW
ProjectUtils.java e11d8af800fbda94d017c23b6dd1918c08413b82 GREEN
TypeScopeUtils.java 54f2397f0d6720c90948ccc295f1a63b7319daac GREEN
......
......@@ -15,16 +15,13 @@
+--------------------------------------------------------------------------*/
package org.fortiss.af3.project.utils;
import static org.fortiss.af3.project.utils.ProjectModelElementFactory.createDummyDevelopmentProcess;
import static org.fortiss.af3.project.utils.ProjectModelElementFactory.createDummyTypeSystem;
import org.fortiss.af3.project.model.AF3ProjectFactory;
import org.fortiss.af3.project.model.FileLibrary;
import org.fortiss.af3.project.model.LibraryProjectConfiguration;
import org.fortiss.af3.project.model.configuration.ConfigurationFactory;
import org.fortiss.af3.project.model.configuration.DevelopmentProcessConfiguration;
import org.fortiss.af3.project.model.configuration.TypeSystemConfiguration;
import org.fortiss.af3.project.model.development.IDevelopmentProcess;
import org.fortiss.af3.project.model.typesystem.ITypeSystem;
/**
......@@ -38,25 +35,19 @@ public final class LibraryModelElementFactory {
public static FileLibrary createFileLibrary(String name) {
FileLibrary library = AF3ProjectFactory.eINSTANCE.createFileLibrary();
library.setName(name);
LibraryProjectConfiguration pc = createLibraryProjectConfiguration(createDummyTypeSystem(),
createDummyDevelopmentProcess());
LibraryProjectConfiguration pc = createLibraryProjectConfiguration(createDummyTypeSystem());
library.getRootElements().add(pc);
return library;
}
/** Creates a new {@link LibraryProjectConfiguration}. */
public static LibraryProjectConfiguration createLibraryProjectConfiguration(ITypeSystem ts,
IDevelopmentProcess proc) {
public static LibraryProjectConfiguration createLibraryProjectConfiguration(ITypeSystem ts) {
LibraryProjectConfiguration config =
AF3ProjectFactory.eINSTANCE.createLibraryProjectConfiguration();
TypeSystemConfiguration tsConfig =
ConfigurationFactory.eINSTANCE.createTypeSystemConfiguration();
config.getConfigurationElements().add(tsConfig);
tsConfig.setTypesystem(ts);
DevelopmentProcessConfiguration dpConfig =
ConfigurationFactory.eINSTANCE.createDevelopmentProcessConfiguration();
config.getConfigurationElements().add(dpConfig);
dpConfig.setDevelopment(proc);
return config;
}
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment