Commit bf26b9d1 authored by Johannes Eder's avatar Johannes Eder
Browse files

Cleaned project 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 e73a89f3
......@@ -3,7 +3,7 @@ ExternalFileUtils.java 4171a41060407cd4f19c99fcaf1ebfb9a390134a GREEN
FileUtils.java e2e2c54ae8d2e4b7718e35d27358c798ca5657dc GREEN
FunctionScopeUtils.java 054c92406affa0c0ad8ac7a067de9608d0bbca2b GREEN
LibraryModelElementFactory.java ed73c5a23f27b61a67aeeccaece64ca5e0f69dcb GREEN
ProjectModelElementFactory.java 2f8662998f99a30e4fe2b4f4fb734ff6c196d652 GREEN
ProjectModelElementFactory.java aeeb971911522ba8b5ab6c8a6399dd7a59b09bc1 YELLOW
ProjectUtils.java e11d8af800fbda94d017c23b6dd1918c08413b82 GREEN
TypeScopeUtils.java 54f2397f0d6720c90948ccc295f1a63b7319daac GREEN
VariableScopeUtils.java 031591687c2461a990d0534cf4ed4d6df39b1551 GREEN
......@@ -15,23 +15,17 @@
+--------------------------------------------------------------------------*/
package org.fortiss.af3.project.utils;
import static org.fortiss.tooling.base.utils.ConstraintsBaseUtils.initializeConstraintBasedProcess;
import org.fortiss.af3.project.AF3ProjectActivator;
import org.fortiss.af3.project.model.AF3ProjectFactory;
import org.fortiss.af3.project.model.FileProject;
import org.fortiss.af3.project.model.ParameterDefinition;
import org.fortiss.af3.project.model.ProjectConfiguration;
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.ConstraintBasedDevelopmentProcess;
import org.fortiss.af3.project.model.development.DevelopmentFactory;
import org.fortiss.af3.project.model.development.DummyDevelopmentProcess;
import org.fortiss.af3.project.model.development.IDevelopmentProcess;
import org.fortiss.af3.project.model.execution.ExecutionConfiguration;
import org.fortiss.af3.project.model.execution.ExecutionConfigurationStore;
import org.fortiss.af3.project.model.execution.ExecutionFactory;
import org.fortiss.af3.project.model.typesystem.DummyTypeSystem;
import org.fortiss.af3.project.model.typesystem.ITypeSystem;
import org.fortiss.af3.project.model.typesystem.TypesystemFactory;
import org.osgi.framework.Version;
......@@ -55,31 +49,21 @@ public final class ProjectModelElementFactory {
/** Creates a new {@link ProjectConfiguration}. */
public static ProjectConfiguration createProjectConfiguration() {
return createProjectConfiguration(createDummyTypeSystem(), createDummyDevelopmentProcess());
}
/** Creates a new {@link DummyDevelopmentProcess}. */
public static IDevelopmentProcess createDummyDevelopmentProcess() {
return DevelopmentFactory.eINSTANCE.createDummyDevelopmentProcess();
return createProjectConfiguration(createDummyTypeSystem());
}
/** Creates a new {@link DummyDevelopmentProcess}. */
/** Creates a new {@link DummyTypeSystem}. */
public static ITypeSystem createDummyTypeSystem() {
return TypesystemFactory.eINSTANCE.createDummyTypeSystem();
}
/** Creates a new {@link ProjectConfiguration}. */
public static ProjectConfiguration createProjectConfiguration(ITypeSystem ts,
IDevelopmentProcess proc) {
public static ProjectConfiguration createProjectConfiguration(ITypeSystem ts) {
ProjectConfiguration config = AF3ProjectFactory.eINSTANCE.createProjectConfiguration();
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;
}
......@@ -97,15 +81,6 @@ public final class ProjectModelElementFactory {
return execConf;
}
/** Creates a new {@link ConstraintBasedDevelopmentProcess}. */
public static ConstraintBasedDevelopmentProcess
createConstraintBasedDevelopmentProcess(DevelopmentProcessConfiguration dpc) {
ConstraintBasedDevelopmentProcess cbp =
DevelopmentFactory.eINSTANCE.createConstraintBasedDevelopmentProcess();
initializeConstraintBasedProcess(cbp, dpc);
return cbp;
}
/** Creates a {@link ParameterDefinition}. */
public static ParameterDefinition createParameterDefinition() {
return AF3ProjectFactory.eINSTANCE.createParameterDefinition();
......
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