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