Просмотр исходного кода

Separate Domains plugins into different features (#916)

Separation of Domains
Andreas Mülder 9 лет назад
Родитель
Сommit
fc5c78b309
100 измененных файлов с 1445 добавлено и 1081 удалено
  1. 21 0
      features/org.yakindu.sct-feature/feature.xml
  2. 0 2
      plugins/org.yakindu.base.types/src/org/yakindu/base/types/typesystem/ITypeSystem.java
  3. 0 1
      plugins/org.yakindu.sct.doc.user/src/user-guide/images/tuto_light_switch_300_statechart_simulator_run_as_statechart_simulation.png
  4. 1 0
      plugins/org.yakindu.sct.doc.user/src/user-guide/images/tuto_light_switch_300_statechart_simulator_run_as_statechart_simulation.png
  5. 0 1
      plugins/org.yakindu.sct.doc.user/src/user-guide/images/tuto_light_switch_310_statechart_simulator_state_off.png
  6. 1 0
      plugins/org.yakindu.sct.doc.user/src/user-guide/images/tuto_light_switch_310_statechart_simulator_state_off.png
  7. 7 0
      plugins/org.yakindu.sct.domain.generic.editor/.classpath
  8. 2 0
      plugins/org.yakindu.sct.domain.generic.editor/.gitignore
  9. 28 0
      plugins/org.yakindu.sct.domain.generic.editor/.project
  10. 7 0
      plugins/org.yakindu.sct.domain.generic.editor/.settings/org.eclipse.jdt.core.prefs
  11. 19 0
      plugins/org.yakindu.sct.domain.generic.editor/META-INF/MANIFEST.MF
  12. 5 0
      plugins/org.yakindu.sct.domain.generic.editor/build.properties
  13. 12 0
      plugins/org.yakindu.sct.domain.generic.editor/plugin.xml
  14. 15 0
      plugins/org.yakindu.sct.domain.generic.editor/pom.xml
  15. 66 0
      plugins/org.yakindu.sct.domain.generic.editor/src/org/yakindu/sct/domain/generic/editor/EditorModuleProvider.java
  16. 1 1
      plugins/org.yakindu.sct.domain.generic/src/org/yakindu/sct/domain/generic/modules/EntryRuleRuntimeModule.java
  17. 1 1
      plugins/org.yakindu.sct.domain.generic/src/org/yakindu/sct/domain/generic/modules/EntryRuleUIModule.java
  18. 59 0
      plugins/org.yakindu.sct.domain.generic.editor/src/org/yakindu/sct/domain/generic/editor/GenericEditorModule.java
  19. 7 0
      plugins/org.yakindu.sct.domain.generic.generator/.classpath
  20. 2 0
      plugins/org.yakindu.sct.domain.generic.generator/.gitignore
  21. 28 0
      plugins/org.yakindu.sct.domain.generic.generator/.project
  22. 7 0
      plugins/org.yakindu.sct.domain.generic.generator/.settings/org.eclipse.jdt.core.prefs
  23. 13 0
      plugins/org.yakindu.sct.domain.generic.generator/META-INF/MANIFEST.MF
  24. 5 0
      plugins/org.yakindu.sct.domain.generic.generator/build.properties
  25. 12 0
      plugins/org.yakindu.sct.domain.generic.generator/plugin.xml
  26. 15 0
      plugins/org.yakindu.sct.domain.generic.generator/pom.xml
  27. 30 0
      plugins/org.yakindu.sct.domain.generic.generator/src/org/yakindu/sct/domain/generic/generator/GeneratorModuleProvider.java
  28. 59 64
      plugins/org.yakindu.sct.domain.generic/src/org/yakindu/sct/domain/generic/modules/GenericSequencerModule.java
  29. 7 0
      plugins/org.yakindu.sct.domain.generic.simulation/.classpath
  30. 1 0
      plugins/org.yakindu.sct.domain.generic.simulation/.gitignore
  31. 28 0
      plugins/org.yakindu.sct.domain.generic.simulation/.project
  32. 7 0
      plugins/org.yakindu.sct.domain.generic.simulation/.settings/org.eclipse.jdt.core.prefs
  33. 13 0
      plugins/org.yakindu.sct.domain.generic.simulation/META-INF/MANIFEST.MF
  34. 5 0
      plugins/org.yakindu.sct.domain.generic.simulation/build.properties
  35. 12 0
      plugins/org.yakindu.sct.domain.generic.simulation/plugin.xml
  36. 15 0
      plugins/org.yakindu.sct.domain.generic.simulation/pom.xml
  37. 6 9
      plugins/org.yakindu.sct.domain.generic/src/org/yakindu/sct/domain/generic/modules/GenericSimulationModule.java
  38. 29 0
      plugins/org.yakindu.sct.domain.generic.simulation/src/org/yakindu/sct/domain/generic/simulation/SimulationModuleProvider.java
  39. 2 13
      plugins/org.yakindu.sct.domain.generic/META-INF/MANIFEST.MF
  40. 8 1
      plugins/org.yakindu.sct.domain.generic/plugin.xml
  41. 3 11
      plugins/org.yakindu.sct.domain.generic/src/org/yakindu/sct/domain/generic/DefaultDomainActivator.java
  42. 0 163
      plugins/org.yakindu.sct.domain.generic/src/org/yakindu/sct/domain/generic/extension/GenericDomainInjectorProvider.java
  43. 0 44
      plugins/org.yakindu.sct.domain.generic/src/org/yakindu/sct/domain/generic/modules/GenericEditorModule.java
  44. 0 34
      plugins/org.yakindu.sct.domain.generic/src/org/yakindu/sct/domain/generic/modules/GenericGeneratorModule.java
  45. 0 54
      plugins/org.yakindu.sct.domain.generic/src/org/yakindu/sct/domain/generic/modules/GenericTypeSystemModule.java
  46. 39 0
      plugins/org.yakindu.sct.domain.generic/src/org/yakindu/sct/domain/generic/modules/ResourceModuleProvider.java
  47. 0 1
      plugins/org.yakindu.sct.domain/META-INF/MANIFEST.MF
  48. 1 0
      plugins/org.yakindu.sct.domain/plugin.xml
  49. 0 10
      plugins/org.yakindu.sct.domain/schema/domain.exsd
  50. 116 0
      plugins/org.yakindu.sct.domain/schema/modules.exsd
  51. 0 8
      plugins/org.yakindu.sct.domain/src/org/yakindu/sct/domain/DomainActivator.java
  52. 64 77
      plugins/org.yakindu.sct.domain/src/org/yakindu/sct/domain/extension/DomainRegistry.java
  53. 47 0
      plugins/org.yakindu.sct.domain/src/org/yakindu/sct/domain/extension/IDomain.java
  54. 0 17
      plugins/org.yakindu.sct.domain/src/org/yakindu/sct/domain/extension/IDomainDescriptor.java
  55. 0 66
      plugins/org.yakindu.sct.domain/src/org/yakindu/sct/domain/extension/IDomainInjectorProvider.java
  56. 23 0
      plugins/org.yakindu.sct.domain/src/org/yakindu/sct/domain/extension/IModuleProvider.java
  57. 162 0
      plugins/org.yakindu.sct.domain/src/org/yakindu/sct/domain/extension/impl/DomainImpl.java
  58. 43 0
      plugins/org.yakindu.sct.domain/src/org/yakindu/sct/domain/extension/impl/ModuleContribution.java
  59. 1 0
      plugins/org.yakindu.sct.generator.builder/.gitignore
  60. 4 1
      plugins/org.yakindu.sct.generator.builder/META-INF/MANIFEST.MF
  61. 33 0
      plugins/org.yakindu.sct.generator.builder/src/org/yakindu/sct/generator/builder/EclipseContextModule.java
  62. 5 3
      plugins/org.yakindu.sct.generator.builder/src/org/yakindu/sct/generator/builder/SCTBuilder.java
  63. 6 1
      plugins/org.yakindu.sct.generator.builder/src/org/yakindu/sct/generator/builder/action/GenerateModelAction.java
  64. 20 14
      plugins/org.yakindu.sct.generator.builder/src/org/yakindu/sct/generator/builder/console/EclipseConsoleLog.java
  65. 0 366
      plugins/org.yakindu.sct.generator.builder/src/org/yakindu/sct/generator/builder/efs/EFSResourceFileSystemAccess.java
  66. 42 0
      plugins/org.yakindu.sct.generator.builder/src/org/yakindu/sct/generator/builder/efs/SCTEclipseResourceFileSystemAccess.java
  67. 3 3
      plugins/org.yakindu.sct.generator.c/src/org/yakindu/sct/generator/c/CCodeGenerator.java
  68. 12 2
      plugins/org.yakindu.sct.generator.c/src/org/yakindu/sct/generator/c/GenArtifactConfigurations.java
  69. 1 0
      plugins/org.yakindu.sct.generator.core/META-INF/MANIFEST.MF
  70. 0 1
      plugins/org.yakindu.sct.generator.core/src/org/yakindu/sct/generator/core/ISGraphGenerator.java
  71. 50 0
      plugins/org.yakindu.sct.generator.core/src/org/yakindu/sct/generator/core/console/IConsoleLogger.java
  72. 22 13
      plugins/org.yakindu.sct.generator.core/src/org/yakindu/sct/generator/core/execution/GeneratorExecutor.java
  73. 14 31
      plugins/org.yakindu.sct.generator.core/src/org/yakindu/sct/generator/core/filesystem/ISCTFileSystemAccess.java
  74. 7 0
      plugins/org.yakindu.sct.generator.core/src/org/yakindu/sct/generator/core/filesystem/ISCTWorkspaceAccess.java
  75. 50 0
      plugins/org.yakindu.sct.generator.core/src/org/yakindu/sct/generator/core/filesystem/SCTJavaIoFileSystemAccess.java
  76. 1 1
      plugins/org.yakindu.sct.generator.core/src/org/yakindu/sct/generator/core/impl/AbstractSExecModelGenerator.java
  77. 14 14
      plugins/org.yakindu.sct.generator.core/src/org/yakindu/sct/generator/core/impl/AbstractSGraphModelGenerator.java
  78. 0 11
      plugins/org.yakindu.sct.generator.core/src/org/yakindu/sct/generator/core/impl/IGeneratorLog.java
  79. 1 1
      plugins/org.yakindu.sct.generator.core/src/org/yakindu/sct/generator/core/library/AbstractDefaultFeatureValueProvider.java
  80. 1 1
      plugins/org.yakindu.sct.generator.cpp/src/org/yakindu/sct/generator/cpp/CppCodeGenerator.java
  81. 1 1
      plugins/org.yakindu.sct.generator.csharp/src/org/yakindu/sct/generator/csharp/CSharpCodeGenerator.java
  82. 15 0
      plugins/org.yakindu.sct.generator.genmodel.ui/src/org/yakindu/sct/generator/genmodel/ui/ws/DefaultSCTWorkspaceAccess.java
  83. 1 1
      plugins/org.yakindu.sct.generator.java/src/org/yakindu/sct/generator/java/JavaCodeGenerator.java
  84. 1 0
      plugins/org.yakindu.sct.generator.runner/.gitignore
  85. 0 1
      plugins/org.yakindu.sct.generator.runner/META-INF/MANIFEST.MF
  86. 6 6
      plugins/org.yakindu.sct.generator.runner/src/org/yakindu/sct/generator/runner/GenericJavaBasedGenerator.java
  87. 1 1
      plugins/org.yakindu.sct.generator.runner/src/org/yakindu/sct/generator/runner/lib/GenericJavaLibraryDefaultValueProvider.java
  88. 1 0
      plugins/org.yakindu.sct.generator.xpand/.gitignore
  89. 2 2
      plugins/org.yakindu.sct.generator.xpand/src/org/yakindu/sct/generator/xpand/AbstractXpandBasedCodeGenerator.java
  90. 7 4
      plugins/org.yakindu.sct.model.resource/META-INF/MANIFEST.MF
  91. 2 1
      plugins/org.yakindu.sct.model.resource/plugin.xml
  92. 45 6
      plugins/org.yakindu.sct.model.resource/src/org/yakindu/sct/model/resource/SCTExecutableExtensionFactory.java
  93. 1 1
      plugins/org.yakindu.sct.model.sgraph/src/org/yakindu/sct/model/sgraph/resource/provider/SCTResourceDescriptionStrategy.java
  94. 5 5
      plugins/org.yakindu.sct.model.resource/src/org/yakindu/sct/model/resource/SCTResourceFactory.java
  95. 3 3
      plugins/org.yakindu.sct.model.stext.ui/src/org/yakindu/sct/model/stext/ui/validation/SCTResourceValidatorImpl.java
  96. 5 0
      plugins/org.yakindu.sct.model.sexec/src/org/yakindu/sct/model/sexec/transformation/IModelSequencer.java
  97. 3 3
      plugins/org.yakindu.sct.model.sexec/src/org/yakindu/sct/model/sexec/transformation/SequenceBuilder.xtend
  98. 3 3
      plugins/org.yakindu.sct.model.sexec/src/org/yakindu/sct/model/sexec/transformation/TraceExtensions.xtend
  99. 2 2
      plugins/org.yakindu.sct.model.sgraph.ui/META-INF/MANIFEST.MF
  100. 0 0
      plugins/org.yakindu.sct.model.sgraph.ui/src/org/yakindu/sct/model/sgraph/ui/labeling/SGraphLabelProvider.java

+ 21 - 0
features/org.yakindu.sct-feature/feature.xml

@@ -271,4 +271,25 @@
          version="0.0.0"
          version="0.0.0"
          unpack="false"/>
          unpack="false"/>
 
 
+   <plugin
+         id="org.yakindu.sct.domain.generic.editor"
+         download-size="0"
+         install-size="0"
+         version="0.0.0"
+         unpack="false"/>
+
+   <plugin
+         id="org.yakindu.sct.domain.generic.generator"
+         download-size="0"
+         install-size="0"
+         version="0.0.0"
+         unpack="false"/>
+
+   <plugin
+         id="org.yakindu.sct.domain.generic.simulation"
+         download-size="0"
+         install-size="0"
+         version="0.0.0"
+         unpack="false"/>
+
 </feature>
 </feature>

+ 0 - 2
plugins/org.yakindu.base.types/src/org/yakindu/base/types/typesystem/ITypeSystem.java

@@ -15,8 +15,6 @@ import java.util.List;
 
 
 import org.yakindu.base.types.Type;
 import org.yakindu.base.types.Type;
 
 
-import com.google.inject.ImplementedBy;
-
 /**
 /**
  * A Implementation of {@link ITypeSystem} defines all existing types and the
  * A Implementation of {@link ITypeSystem} defines all existing types and the
  * type compatibility.
  * type compatibility.

+ 0 - 1
plugins/org.yakindu.sct.doc.user/src/user-guide/images/tuto_light_switch_300_statechart_simulator_run_as_statechart_simulation.png

@@ -1 +0,0 @@
-../../tutorials/images/tuto_light_switch_300_statechart_simulator_run_as_statechart_simulation.png

+ 1 - 0
plugins/org.yakindu.sct.doc.user/src/user-guide/images/tuto_light_switch_300_statechart_simulator_run_as_statechart_simulation.png

@@ -0,0 +1 @@
+../../tutorials/images/tuto_light_switch_300_statechart_simulator_run_as_statechart_simulation.png

+ 0 - 1
plugins/org.yakindu.sct.doc.user/src/user-guide/images/tuto_light_switch_310_statechart_simulator_state_off.png

@@ -1 +0,0 @@
-../../tutorials/images/tuto_light_switch_310_statechart_simulator_state_off.png

+ 1 - 0
plugins/org.yakindu.sct.doc.user/src/user-guide/images/tuto_light_switch_310_statechart_simulator_state_off.png

@@ -0,0 +1 @@
+../../tutorials/images/tuto_light_switch_310_statechart_simulator_state_off.png

+ 7 - 0
plugins/org.yakindu.sct.domain.generic.editor/.classpath

@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"/>
+	<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+	<classpathentry kind="src" path="src"/>
+	<classpathentry kind="output" path="bin"/>
+</classpath>

+ 2 - 0
plugins/org.yakindu.sct.domain.generic.editor/.gitignore

@@ -0,0 +1,2 @@
+/bin/
+/target/

+ 28 - 0
plugins/org.yakindu.sct.domain.generic.editor/.project

@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>org.yakindu.sct.domain.generic.editor</name>
+	<comment></comment>
+	<projects>
+	</projects>
+	<buildSpec>
+		<buildCommand>
+			<name>org.eclipse.jdt.core.javabuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.pde.ManifestBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.pde.SchemaBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+	</buildSpec>
+	<natures>
+		<nature>org.eclipse.pde.PluginNature</nature>
+		<nature>org.eclipse.jdt.core.javanature</nature>
+	</natures>
+</projectDescription>

+ 7 - 0
plugins/org.yakindu.sct.domain.generic.editor/.settings/org.eclipse.jdt.core.prefs

@@ -0,0 +1,7 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
+org.eclipse.jdt.core.compiler.compliance=1.7
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.7

+ 19 - 0
plugins/org.yakindu.sct.domain.generic.editor/META-INF/MANIFEST.MF

@@ -0,0 +1,19 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: YAKINDU Generic Editor Domain
+Bundle-SymbolicName: org.yakindu.sct.domain.generic.editor;singleton:=true
+Bundle-Version: 2.7.1.qualifier
+Bundle-Vendor: statecharts.org
+Bundle-RequiredExecutionEnvironment: JavaSE-1.7
+Require-Bundle: org.yakindu.sct.ui.editor,
+ org.yakindu.sct.domain,
+ com.google.inject,
+ org.eclipse.xtext,
+ org.yakindu.sct.refactoring,
+ org.yakindu.sct.model.stext,
+ org.yakindu.sct.model.stext.ui,
+ org.eclipse.xtext.ui,
+ org.eclipse.xtext.ui.shared,
+ org.yakindu.sct.model.sgraph.ui
+Import-Package: com.google.inject.multibindings;version="1.3.0"
+Export-Package: org.yakindu.sct.domain.generic.editor

+ 5 - 0
plugins/org.yakindu.sct.domain.generic.editor/build.properties

@@ -0,0 +1,5 @@
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+               .,\
+               plugin.xml

+ 12 - 0
plugins/org.yakindu.sct.domain.generic.editor/plugin.xml

@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.4"?>
+<plugin>
+   <extension
+         point="org.yakindu.sct.domain.modules">
+      <Module
+            domainID="org.yakindu.domain.default"
+            feature="org.yakindu.sct.editor"
+            moduleProvider="org.yakindu.sct.domain.generic.editor.EditorModuleProvider">
+      </Module>
+   </extension>
+</plugin>

+ 15 - 0
plugins/org.yakindu.sct.domain.generic.editor/pom.xml

@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project
+	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
+	xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+	<modelVersion>4.0.0</modelVersion>
+	<parent>
+		<groupId>org.yakindu.sct</groupId>
+		<artifactId>org.yakindu.sct.releng</artifactId>
+		<version>2.7.1-SNAPSHOT</version>
+		<relativePath>../../releng/org.yakindu.sct.releng/pom.xml</relativePath>
+	</parent>
+	<artifactId>org.yakindu.sct.domain.generic.editor</artifactId>
+	<groupId>org.yakindu.sct.plugins</groupId>
+	<packaging>eclipse-plugin</packaging>
+</project>

+ 66 - 0
plugins/org.yakindu.sct.domain.generic.editor/src/org/yakindu/sct/domain/generic/editor/EditorModuleProvider.java

@@ -0,0 +1,66 @@
+/**
+ * Copyright (c) 2016 committers of YAKINDU and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     committers of YAKINDU - initial API and implementation
+ */
+package org.yakindu.sct.domain.generic.editor;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.xtext.ui.shared.SharedStateModule;
+import org.yakindu.sct.domain.extension.IModuleProvider;
+import org.yakindu.sct.model.sgraph.State;
+import org.yakindu.sct.model.sgraph.Statechart;
+import org.yakindu.sct.model.sgraph.Transition;
+import org.yakindu.sct.model.stext.STextRuntimeModule;
+import org.yakindu.sct.model.stext.stext.Guard;
+import org.yakindu.sct.model.stext.stext.StateSpecification;
+import org.yakindu.sct.model.stext.stext.StatechartSpecification;
+import org.yakindu.sct.model.stext.stext.TransitionSpecification;
+import org.yakindu.sct.model.stext.ui.STextUiModule;
+import org.yakindu.sct.model.stext.ui.internal.STextActivator;
+
+import com.google.common.collect.ImmutableMap;
+import com.google.inject.Module;
+import com.google.inject.util.Modules;
+
+/**
+ * 
+ * @author andreas muelder - Initial contribution and API
+ * 
+ */
+public class EditorModuleProvider implements IModuleProvider {
+
+	private static final ImmutableMap<String, Class<? extends EObject>> GRAMMAR_RULE_MAP = ImmutableMap.of(
+			Statechart.class.getName(), StatechartSpecification.class, Transition.class.getName(),
+			TransitionSpecification.class, State.class.getName(), StateSpecification.class, Guard.class.getName(),
+			Guard.class);
+
+	@Override
+	public Module getModule(String... options) {
+		if (options.length == 0)
+			return new GenericEditorModule();
+		String semanticTarget = options[0];
+		if (!GRAMMAR_RULE_MAP.containsKey(semanticTarget))
+			throw new IllegalArgumentException(
+					String.format("No grammar rule for semantic target '%s' found", semanticTarget));
+		return getEmbeddedEditorModule(semanticTarget);
+	}
+
+	protected Module getEmbeddedEditorModule(String semanticTarget) {
+		Class<? extends EObject> rule = GRAMMAR_RULE_MAP.get(semanticTarget);
+		return Modules.override(getLanguageModule()).with(new EntryRuleRuntimeModule(rule),
+				new EntryRuleUIModule(rule));
+	}
+
+	protected Module getLanguageModule() {
+		Module uiModule = Modules.override(new STextRuntimeModule())
+				.with(new STextUiModule(STextActivator.getInstance()));
+		return Modules.override(uiModule).with(new SharedStateModule());
+	}
+
+}

+ 1 - 1
plugins/org.yakindu.sct.domain.generic/src/org/yakindu/sct/domain/generic/modules/EntryRuleRuntimeModule.java

@@ -8,7 +8,7 @@
  * Contributors:
  * Contributors:
  *     committers of YAKINDU - initial API and implementation
  *     committers of YAKINDU - initial API and implementation
  */
  */
-package org.yakindu.sct.domain.generic.modules;
+package org.yakindu.sct.domain.generic.editor;
 
 
 import org.eclipse.emf.ecore.EObject;
 import org.eclipse.emf.ecore.EObject;
 import org.eclipse.xtext.parser.IParser;
 import org.eclipse.xtext.parser.IParser;

+ 1 - 1
plugins/org.yakindu.sct.domain.generic/src/org/yakindu/sct/domain/generic/modules/EntryRuleUIModule.java

@@ -8,7 +8,7 @@
  * Contributors:
  * Contributors:
  *     committers of YAKINDU - initial API and implementation
  *     committers of YAKINDU - initial API and implementation
  */
  */
-package org.yakindu.sct.domain.generic.modules;
+package org.yakindu.sct.domain.generic.editor;
 
 
 import org.eclipse.emf.ecore.EObject;
 import org.eclipse.emf.ecore.EObject;
 import org.eclipse.xtext.service.AbstractGenericModule;
 import org.eclipse.xtext.service.AbstractGenericModule;

+ 59 - 0
plugins/org.yakindu.sct.domain.generic.editor/src/org/yakindu/sct/domain/generic/editor/GenericEditorModule.java

@@ -0,0 +1,59 @@
+/**
+ * Copyright (c) 2016 committers of YAKINDU and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     committers of YAKINDU - initial API and implementation
+ */
+package org.yakindu.sct.domain.generic.editor;
+
+import org.eclipse.xtext.service.AbstractGenericModule;
+import org.eclipse.xtext.ui.editor.validation.MarkerCreator;
+import org.eclipse.xtext.ui.validation.MarkerTypeProvider;
+import org.eclipse.xtext.validation.IDiagnosticConverter;
+import org.yakindu.sct.model.sgraph.ui.validation.SCTDiagnosticConverterImpl;
+import org.yakindu.sct.model.sgraph.ui.validation.SCTMarkerCreator;
+import org.yakindu.sct.model.sgraph.ui.validation.SCTMarkerTypeProvider;
+import org.yakindu.sct.refactoring.proposals.RefactoringProposalProvider;
+import org.yakindu.sct.ui.editor.editor.proposals.SmartEditProposalProvider;
+import org.yakindu.sct.ui.editor.proposals.IEditProposalProvider;
+import org.yakindu.sct.ui.editor.providers.DefaultSCTPaletteFactory;
+import org.yakindu.sct.ui.editor.providers.ISCTPaletteFactory;
+
+import com.google.inject.Binder;
+import com.google.inject.multibindings.Multibinder;
+
+/**
+ * 
+ * @author andreas muelder - Initial contribution and API
+ * 
+ */
+public class GenericEditorModule extends AbstractGenericModule {
+
+	public void configure(Binder binder) {
+		super.configure(binder);
+		Multibinder<IEditProposalProvider> proposalProviderBinder = Multibinder.newSetBinder(binder,
+				IEditProposalProvider.class);
+		proposalProviderBinder.addBinding().to(SmartEditProposalProvider.class);
+		proposalProviderBinder.addBinding().to(RefactoringProposalProvider.class);
+	}
+
+	public Class<? extends ISCTPaletteFactory> bindISCTPaletteFactory() {
+		return DefaultSCTPaletteFactory.class;
+	}
+
+	public Class<? extends IDiagnosticConverter> bindIDiagnosticConverter() {
+		return SCTDiagnosticConverterImpl.class;
+	}
+
+	public Class<? extends MarkerCreator> bindMarkerCreator() {
+		return SCTMarkerCreator.class;
+	}
+
+	public Class<? extends MarkerTypeProvider> bindMarkerTypeProvider() {
+		return SCTMarkerTypeProvider.class;
+	}
+}

+ 7 - 0
plugins/org.yakindu.sct.domain.generic.generator/.classpath

@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"/>
+	<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+	<classpathentry kind="src" path="src"/>
+	<classpathentry kind="output" path="bin"/>
+</classpath>

+ 2 - 0
plugins/org.yakindu.sct.domain.generic.generator/.gitignore

@@ -0,0 +1,2 @@
+/bin/
+/target/

+ 28 - 0
plugins/org.yakindu.sct.domain.generic.generator/.project

@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>org.yakindu.sct.domain.generic.generator</name>
+	<comment></comment>
+	<projects>
+	</projects>
+	<buildSpec>
+		<buildCommand>
+			<name>org.eclipse.jdt.core.javabuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.pde.ManifestBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.pde.SchemaBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+	</buildSpec>
+	<natures>
+		<nature>org.eclipse.pde.PluginNature</nature>
+		<nature>org.eclipse.jdt.core.javanature</nature>
+	</natures>
+</projectDescription>

+ 7 - 0
plugins/org.yakindu.sct.domain.generic.generator/.settings/org.eclipse.jdt.core.prefs

@@ -0,0 +1,7 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
+org.eclipse.jdt.core.compiler.compliance=1.7
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.7

+ 13 - 0
plugins/org.yakindu.sct.domain.generic.generator/META-INF/MANIFEST.MF

@@ -0,0 +1,13 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: YAKINDU Generic Generator domain
+Bundle-SymbolicName: org.yakindu.sct.domain.generic.generator;singleton:=true
+Bundle-Version: 2.7.1.qualifier
+Bundle-Vendor: statecharts.org
+Bundle-RequiredExecutionEnvironment: JavaSE-1.7
+Require-Bundle: org.yakindu.sct.domain,
+ com.google.inject,
+ org.eclipse.xtext,
+ org.yakindu.sct.model.sexec,
+ org.yakindu.sct.model.stext
+Export-Package: org.yakindu.sct.domain.generic.generator

+ 5 - 0
plugins/org.yakindu.sct.domain.generic.generator/build.properties

@@ -0,0 +1,5 @@
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+               .,\
+               plugin.xml

+ 12 - 0
plugins/org.yakindu.sct.domain.generic.generator/plugin.xml

@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.4"?>
+<plugin>
+   <extension
+         point="org.yakindu.sct.domain.modules">
+      <Module
+            domainID="org.yakindu.domain.default"
+            feature="org.yakindu.sct.generator"
+            moduleProvider="org.yakindu.sct.domain.generic.generator.GeneratorModuleProvider"></Module>
+   </extension>
+
+</plugin>

+ 15 - 0
plugins/org.yakindu.sct.domain.generic.generator/pom.xml

@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project
+	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
+	xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+	<modelVersion>4.0.0</modelVersion>
+	<parent>
+		<groupId>org.yakindu.sct</groupId>
+		<artifactId>org.yakindu.sct.releng</artifactId>
+		<version>2.7.1-SNAPSHOT</version>
+		<relativePath>../../releng/org.yakindu.sct.releng/pom.xml</relativePath>
+	</parent>
+	<artifactId>org.yakindu.sct.domain.generic.generator</artifactId>
+	<groupId>org.yakindu.sct.plugins</groupId>
+	<packaging>eclipse-plugin</packaging>
+</project>

+ 30 - 0
plugins/org.yakindu.sct.domain.generic.generator/src/org/yakindu/sct/domain/generic/generator/GeneratorModuleProvider.java

@@ -0,0 +1,30 @@
+/**
+ * Copyright (c) 2016 committers of YAKINDU and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * 		committers of YAKINDU - initial API and implementation
+ * 
+ */
+package org.yakindu.sct.domain.generic.generator;
+
+import org.yakindu.sct.domain.extension.IModuleProvider;
+
+import com.google.inject.Module;
+
+/**
+ * 
+ * @author andreas muelder - Initial contribution and API
+ * 
+ */
+public class GeneratorModuleProvider implements IModuleProvider {
+
+	@Override
+	public Module getModule(String... options) {
+		return new GenericGeneratorModule();
+	}
+
+}

+ 59 - 64
plugins/org.yakindu.sct.domain.generic/src/org/yakindu/sct/domain/generic/modules/GenericSequencerModule.java

@@ -1,64 +1,59 @@
-/**
- * Copyright (c) 2015 committers of YAKINDU and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     committers of YAKINDU - initial API and implementation
- */
-package org.yakindu.sct.domain.generic.modules;
-
-import org.eclipse.xtext.naming.IQualifiedNameProvider;
-import org.eclipse.xtext.resource.IResourceDescriptions;
-import org.eclipse.xtext.resource.impl.ResourceSetBasedResourceDescriptions;
-import org.eclipse.xtext.service.AbstractGenericModule;
-import org.yakindu.base.types.inferrer.ITypeSystemInferrer;
-import org.yakindu.base.types.typesystem.GenericTypeSystem;
-import org.yakindu.base.types.typesystem.ITypeSystem;
-import org.yakindu.sct.model.sexec.transformation.IModelSequencer;
-import org.yakindu.sct.model.sexec.transformation.ModelSequencer;
-import org.yakindu.sct.model.sgraph.naming.SGraphNameProvider;
-import org.yakindu.sct.model.stext.inferrer.STextTypeInferrer;
-
-import com.google.inject.Binder;
-import com.google.inject.name.Names;
-
-/**
- * 
- * @author andreas muelder - Initial contribution and API
- * @author Alexander Nyßen (alexander.nyssen@itemis.de) - Refactored to
- *         AbstractGenericModule to allow subclasses to overwrite bindings
- * @author Markus Mühlbrandt - Added binding to DefaultNamingService
- */
-public class GenericSequencerModule extends AbstractGenericModule {
-
-	public static final String ADD_TRACES = "ADD_TRACES";
-
-	public void configure(Binder binder) {
-		super.configure(binder);
-		binder.bind(Boolean.class).annotatedWith(Names.named(ADD_TRACES)).toInstance(Boolean.FALSE);
-	}
-
-	public Class<? extends IModelSequencer> bindIModelSequencer() {
-		return ModelSequencer.class;
-	}
-
-	public Class<? extends IQualifiedNameProvider> bindIQualifiedNameProvider() {
-		return SGraphNameProvider.class;
-	}
-
-	public Class<? extends ITypeSystemInferrer> bindITypeSystemInferrer() {
-		return STextTypeInferrer.class;
-	}
-
-	public Class<? extends ITypeSystem> bindITypesystem() {
-		return GenericTypeSystem.class;
-	}
-
-	public Class<? extends IResourceDescriptions> bindIResourceDescriptions() {
-		return ResourceSetBasedResourceDescriptions.class;
-	}
-
-}
+/**
+ * Copyright (c) 2016 committers of YAKINDU and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * 		committers of YAKINDU - initial API and implementation
+ * 
+ */
+package org.yakindu.sct.domain.generic.generator;
+
+import org.eclipse.xtext.naming.IQualifiedNameProvider;
+import org.eclipse.xtext.parser.IEncodingProvider;
+import org.eclipse.xtext.resource.IResourceDescriptions;
+import org.eclipse.xtext.resource.impl.ResourceSetBasedResourceDescriptions;
+import org.eclipse.xtext.service.AbstractGenericModule;
+import org.yakindu.base.types.inferrer.ITypeSystemInferrer;
+import org.yakindu.base.types.typesystem.GenericTypeSystem;
+import org.yakindu.base.types.typesystem.ITypeSystem;
+import org.yakindu.sct.model.sgraph.naming.SGraphNameProvider;
+import org.yakindu.sct.model.stext.inferrer.STextTypeInferrer;
+
+import com.google.inject.Binder;
+
+/**
+ * @author Johannes Dicks - Initial contribution and API
+ *
+ */
+public class GenericGeneratorModule extends AbstractGenericModule {
+
+	public void configure(Binder binder) {
+		super.configure(binder);
+		binder.bind(ITypeSystem.class).toInstance(getTypeSystem());
+	}
+
+	protected ITypeSystem getTypeSystem() {
+		return GenericTypeSystem.getInstance();
+	}
+
+	public Class<? extends IQualifiedNameProvider> bindIQualifiedNameProvider() {
+		return SGraphNameProvider.class;
+	}
+
+	public Class<? extends ITypeSystemInferrer> bindITypeSystemInferrer() {
+		return STextTypeInferrer.class;
+	}
+
+	public Class<? extends IResourceDescriptions> bindIResourceDescriptions() {
+		return ResourceSetBasedResourceDescriptions.class;
+	}
+	
+	
+	public Class<? extends IEncodingProvider> bindIEncodingProvider() {
+		return IEncodingProvider.Runtime.class;
+	}
+
+}

+ 7 - 0
plugins/org.yakindu.sct.domain.generic.simulation/.classpath

@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"/>
+	<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+	<classpathentry kind="src" path="src"/>
+	<classpathentry kind="output" path="bin"/>
+</classpath>

+ 1 - 0
plugins/org.yakindu.sct.domain.generic.simulation/.gitignore

@@ -0,0 +1 @@
+/bin/

+ 28 - 0
plugins/org.yakindu.sct.domain.generic.simulation/.project

@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>org.yakindu.sct.domain.generic.simulation</name>
+	<comment></comment>
+	<projects>
+	</projects>
+	<buildSpec>
+		<buildCommand>
+			<name>org.eclipse.jdt.core.javabuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.pde.ManifestBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.pde.SchemaBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+	</buildSpec>
+	<natures>
+		<nature>org.eclipse.pde.PluginNature</nature>
+		<nature>org.eclipse.jdt.core.javanature</nature>
+	</natures>
+</projectDescription>

+ 7 - 0
plugins/org.yakindu.sct.domain.generic.simulation/.settings/org.eclipse.jdt.core.prefs

@@ -0,0 +1,7 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
+org.eclipse.jdt.core.compiler.compliance=1.7
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.7

+ 13 - 0
plugins/org.yakindu.sct.domain.generic.simulation/META-INF/MANIFEST.MF

@@ -0,0 +1,13 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: YAKINDU Generic Simulation Domain
+Bundle-SymbolicName: org.yakindu.sct.domain.generic.simulation;singleton:=true
+Bundle-Version: 2.7.1.qualifier
+Bundle-Vendor: statecharts.org
+Bundle-RequiredExecutionEnvironment: JavaSE-1.7
+Require-Bundle: org.yakindu.sct.simulation.core,
+ org.yakindu.sct.domain,
+ org.yakindu.sct.model.stext,
+ org.yakindu.sct.simulation.core.sexec,
+ org.yakindu.sct.model.sexec
+Export-Package: org.yakindu.sct.domain.generic.simulation

+ 5 - 0
plugins/org.yakindu.sct.domain.generic.simulation/build.properties

@@ -0,0 +1,5 @@
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+               .,\
+               plugin.xml

+ 12 - 0
plugins/org.yakindu.sct.domain.generic.simulation/plugin.xml

@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.4"?>
+<plugin>
+   <extension
+         point="org.yakindu.sct.domain.modules">
+      <Module
+            domainID="org.yakindu.domain.default"
+            feature="org.yakindu.sct.simulation"
+            moduleProvider="org.yakindu.sct.domain.generic.simulation.SimulationModuleProvider">
+      </Module>
+   </extension>
+</plugin>

+ 15 - 0
plugins/org.yakindu.sct.domain.generic.simulation/pom.xml

@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project
+	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
+	xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+	<modelVersion>4.0.0</modelVersion>
+	<parent>
+		<groupId>org.yakindu.sct</groupId>
+		<artifactId>org.yakindu.sct.releng</artifactId>
+		<version>2.7.1-SNAPSHOT</version>
+		<relativePath>../../releng/org.yakindu.sct.releng/pom.xml</relativePath>
+	</parent>
+	<artifactId>org.yakindu.sct.domain.generic.simulation</artifactId>
+	<groupId>org.yakindu.sct.plugins</groupId>
+	<packaging>eclipse-plugin</packaging>
+</project>

+ 6 - 9
plugins/org.yakindu.sct.domain.generic/src/org/yakindu/sct/domain/generic/modules/GenericSimulationModule.java

@@ -8,7 +8,7 @@
  * Contributors:
  * Contributors:
  *     committers of YAKINDU - initial API and implementation
  *     committers of YAKINDU - initial API and implementation
  */
  */
-package org.yakindu.sct.domain.generic.modules;
+package org.yakindu.sct.domain.generic.simulation;
 
 
 import org.eclipse.xtext.naming.IQualifiedNameProvider;
 import org.eclipse.xtext.naming.IQualifiedNameProvider;
 import org.eclipse.xtext.resource.IResourceDescriptions;
 import org.eclipse.xtext.resource.IResourceDescriptions;
@@ -21,7 +21,6 @@ import org.yakindu.sct.model.sexec.transformation.IModelSequencer;
 import org.yakindu.sct.model.sexec.transformation.ModelSequencer;
 import org.yakindu.sct.model.sexec.transformation.ModelSequencer;
 import org.yakindu.sct.model.stext.inferrer.STextTypeInferrer;
 import org.yakindu.sct.model.stext.inferrer.STextTypeInferrer;
 import org.yakindu.sct.model.stext.naming.StextNameProvider;
 import org.yakindu.sct.model.stext.naming.StextNameProvider;
-import org.yakindu.sct.simulation.core.engine.ISimulationEngine;
 import org.yakindu.sct.simulation.core.sexec.container.DefaultExecutionContextInitializer;
 import org.yakindu.sct.simulation.core.sexec.container.DefaultExecutionContextInitializer;
 import org.yakindu.sct.simulation.core.sexec.container.DefaultSimulationEngineFactory;
 import org.yakindu.sct.simulation.core.sexec.container.DefaultSimulationEngineFactory;
 import org.yakindu.sct.simulation.core.sexec.container.IExecutionContextInitializer;
 import org.yakindu.sct.simulation.core.sexec.container.IExecutionContextInitializer;
@@ -41,8 +40,6 @@ import com.google.inject.Binder;
 import com.google.inject.name.Names;
 import com.google.inject.name.Names;
 
 
 /**
 /**
- * Default Module used by the {@link ISimulationEngine}. Override bindings to
- * specify custom behavior.
  * 
  * 
  * @author andreas muelder - Initial contribution and API
  * @author andreas muelder - Initial contribution and API
  * 
  * 
@@ -51,7 +48,7 @@ public class GenericSimulationModule extends AbstractGenericModule {
 
 
 	public void configure(Binder binder) {
 	public void configure(Binder binder) {
 		super.configure(binder);
 		super.configure(binder);
-		binder.bind(Boolean.class).annotatedWith(Names.named(GenericSequencerModule.ADD_TRACES)).toInstance(Boolean.TRUE);
+		binder.bind(Boolean.class).annotatedWith(Names.named(IModelSequencer.ADD_TRACES)).toInstance(Boolean.TRUE);
 		binder.bind(ITypeSystem.class).toInstance(getTypeSystem());
 		binder.bind(ITypeSystem.class).toInstance(getTypeSystem());
 	}
 	}
 
 
@@ -70,7 +67,7 @@ public class GenericSimulationModule extends AbstractGenericModule {
 	public Class<? extends IModelSequencer> bindIModelSequencer() {
 	public Class<? extends IModelSequencer> bindIModelSequencer() {
 		return ModelSequencer.class;
 		return ModelSequencer.class;
 	}
 	}
-	
+
 	public Class<? extends IOperationMockup> bindIOperationMockup() {
 	public Class<? extends IOperationMockup> bindIOperationMockup() {
 		return JavaOperationMockup.class;
 		return JavaOperationMockup.class;
 	}
 	}
@@ -89,16 +86,16 @@ public class GenericSimulationModule extends AbstractGenericModule {
 
 
 	public Class<? extends IStatementInterpreter> bindIStatementInterpreter() {
 	public Class<? extends IStatementInterpreter> bindIStatementInterpreter() {
 		return StextStatementInterpreter.class;
 		return StextStatementInterpreter.class;
-	} 
+	}
 
 
 	public Class<? extends IQualifiedNameProvider> bindIQualifiedNameProvider() {
 	public Class<? extends IQualifiedNameProvider> bindIQualifiedNameProvider() {
 		return StextNameProvider.class;
 		return StextNameProvider.class;
 	}
 	}
 
 
-	public Class<? extends ITypeSystemInferrer> bindISTextTypeInferrer() {
+	public Class<? extends ITypeSystemInferrer> bindITypeSystemInferrer() {
 		return STextTypeInferrer.class;
 		return STextTypeInferrer.class;
 	}
 	}
-	
+
 	public Class<? extends IResourceDescriptions> bindIResourceDescriptions() {
 	public Class<? extends IResourceDescriptions> bindIResourceDescriptions() {
 		return ResourceSetBasedResourceDescriptions.class;
 		return ResourceSetBasedResourceDescriptions.class;
 	}
 	}

+ 29 - 0
plugins/org.yakindu.sct.domain.generic.simulation/src/org/yakindu/sct/domain/generic/simulation/SimulationModuleProvider.java

@@ -0,0 +1,29 @@
+/**
+ * Copyright (c) 2016 committers of YAKINDU and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     committers of YAKINDU - initial API and implementation
+ */
+package org.yakindu.sct.domain.generic.simulation;
+
+import org.yakindu.sct.domain.extension.IModuleProvider;
+
+import com.google.inject.Module;
+
+/**
+ * 
+ * @author andreas muelder - Initial contribution and API
+ * 
+ */
+public class SimulationModuleProvider implements IModuleProvider {
+
+	@Override
+	public Module getModule(String... options) {
+		return new GenericSimulationModule();
+	}
+
+}

+ 2 - 13
plugins/org.yakindu.sct.domain.generic/META-INF/MANIFEST.MF

@@ -3,25 +3,14 @@ Bundle-ManifestVersion: 2
 Bundle-Name: YAKINDU Generic Domain
 Bundle-Name: YAKINDU Generic Domain
 Bundle-SymbolicName: org.yakindu.sct.domain.generic;singleton:=true
 Bundle-SymbolicName: org.yakindu.sct.domain.generic;singleton:=true
 Bundle-Version: 2.7.1.qualifier
 Bundle-Version: 2.7.1.qualifier
-Bundle-Activator: org.yakindu.sct.domain.generic.DefaultDomainActivator
+Bundle-Activator: org.yakindu.sct.domain.generic.GenericDomainActivator
 Bundle-Vendor: statecharts.org
 Bundle-Vendor: statecharts.org
 Require-Bundle: org.eclipse.core.runtime,
 Require-Bundle: org.eclipse.core.runtime,
- org.yakindu.sct.model.stext,
  org.yakindu.sct.domain,
  org.yakindu.sct.domain,
- org.yakindu.sct.simulation.core.sexec,
  org.yakindu.sct.model.sexec,
  org.yakindu.sct.model.sexec,
- org.yakindu.sct.simulation.core,
- org.eclipse.xtext.ui,
- org.yakindu.sct.model.stext.ui,
- org.eclipse.xtext.ui.shared,
- org.eclipse.gmf.runtime.notation,
- org.yakindu.sct.ui.editor,
- org.yakindu.base.xtext.utils.gmf,
- org.yakindu.sct.refactoring,
  org.yakindu.sct.generator.core,
  org.yakindu.sct.generator.core,
- org.yakindu.sct.generator.builder
+ org.yakindu.sct.model.stext
 Bundle-RequiredExecutionEnvironment: JavaSE-1.7
 Bundle-RequiredExecutionEnvironment: JavaSE-1.7
 Bundle-ActivationPolicy: lazy
 Bundle-ActivationPolicy: lazy
 Export-Package: org.yakindu.sct.domain.generic,
 Export-Package: org.yakindu.sct.domain.generic,
- org.yakindu.sct.domain.generic.extension,
  org.yakindu.sct.domain.generic.modules
  org.yakindu.sct.domain.generic.modules

+ 8 - 1
plugins/org.yakindu.sct.domain.generic/plugin.xml

@@ -6,9 +6,16 @@
       <Domain
       <Domain
             description="The default domain for YAKINDU Statechart Tools."
             description="The default domain for YAKINDU Statechart Tools."
             domainID="org.yakindu.domain.default"
             domainID="org.yakindu.domain.default"
-            domainModuleProvider="org.yakindu.sct.domain.generic.extension.GenericDomainInjectorProvider"
             image="icons/logo_small.png"
             image="icons/logo_small.png"
             name="Default">
             name="Default">
       </Domain>
       </Domain>
    </extension>
    </extension>
+<extension
+      point="org.yakindu.sct.domain.modules">
+   <Module
+         domainID="org.yakindu.domain.default"
+         feature="org.yakindu.sct.resource"
+         moduleProvider="org.yakindu.sct.domain.generic.modules.ResourceModuleProvider">
+   </Module>
+</extension>
 </plugin>
 </plugin>

+ 3 - 11
plugins/org.yakindu.sct.domain.generic/src/org/yakindu/sct/domain/generic/DefaultDomainActivator.java

@@ -13,7 +13,7 @@ package org.yakindu.sct.domain.generic;
 import org.osgi.framework.BundleActivator;
 import org.osgi.framework.BundleActivator;
 import org.osgi.framework.BundleContext;
 import org.osgi.framework.BundleContext;
 
 
-public class DefaultDomainActivator implements BundleActivator {
+public class GenericDomainActivator implements BundleActivator {
 
 
 	private static BundleContext context;
 	private static BundleContext context;
 
 
@@ -21,20 +21,12 @@ public class DefaultDomainActivator implements BundleActivator {
 		return context;
 		return context;
 	}
 	}
 
 
-	/*
-	 * (non-Javadoc)
-	 * @see org.osgi.framework.BundleActivator#start(org.osgi.framework.BundleContext)
-	 */
 	public void start(BundleContext bundleContext) throws Exception {
 	public void start(BundleContext bundleContext) throws Exception {
-		DefaultDomainActivator.context = bundleContext;
+		GenericDomainActivator.context = bundleContext;
 	}
 	}
 
 
-	/*
-	 * (non-Javadoc)
-	 * @see org.osgi.framework.BundleActivator#stop(org.osgi.framework.BundleContext)
-	 */
 	public void stop(BundleContext bundleContext) throws Exception {
 	public void stop(BundleContext bundleContext) throws Exception {
-		DefaultDomainActivator.context = null;
+		GenericDomainActivator.context = null;
 	}
 	}
 
 
 }
 }

+ 0 - 163
plugins/org.yakindu.sct.domain.generic/src/org/yakindu/sct/domain/generic/extension/GenericDomainInjectorProvider.java

@@ -1,163 +0,0 @@
-/**
- * Copyright (c) 2015 committers of YAKINDU and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- * Contributors:
- * 	committers of YAKINDU - initial API and implementation
- * 
- */
-package org.yakindu.sct.domain.generic.extension;
-
-import java.util.HashMap;
-import java.util.Map;
-
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.xtext.ui.shared.SharedStateModule;
-import org.yakindu.sct.domain.extension.IDomainInjectorProvider;
-import org.yakindu.sct.domain.generic.modules.EntryRuleRuntimeModule;
-import org.yakindu.sct.domain.generic.modules.EntryRuleUIModule;
-import org.yakindu.sct.domain.generic.modules.GenericEditorModule;
-import org.yakindu.sct.domain.generic.modules.GenericGeneratorModule;
-import org.yakindu.sct.domain.generic.modules.GenericSequencerModule;
-import org.yakindu.sct.domain.generic.modules.GenericSimulationModule;
-import org.yakindu.sct.domain.generic.modules.GenericTypeSystemModule;
-import org.yakindu.sct.model.sgraph.State;
-import org.yakindu.sct.model.sgraph.Statechart;
-import org.yakindu.sct.model.sgraph.Transition;
-import org.yakindu.sct.model.stext.STextRuntimeModule;
-import org.yakindu.sct.model.stext.stext.Guard;
-import org.yakindu.sct.model.stext.stext.StateSpecification;
-import org.yakindu.sct.model.stext.stext.StatechartSpecification;
-import org.yakindu.sct.model.stext.stext.TransitionSpecification;
-import org.yakindu.sct.model.stext.ui.STextUiModule;
-import org.yakindu.sct.model.stext.ui.internal.STextActivator;
-
-import com.google.inject.Guice;
-import com.google.inject.Injector;
-import com.google.inject.Module;
-import com.google.inject.util.Modules;
-
-/**
- * 
- * @author andreas muelder - Initial contribution and API
- * @author terfloth - added editorInjector
- * 
- */
-public class GenericDomainInjectorProvider implements IDomainInjectorProvider {
-
-	private static final Map<String, Class<? extends EObject>> semanticTargetToRuleMap = new HashMap<String, Class<? extends EObject>>();
-
-	private Injector resourceInjector;
-	private Map<String, Injector> embeddedInjectors = new HashMap<String, Injector>();
-
-	static {
-		semanticTargetToRuleMap.put(Statechart.class.getName(), StatechartSpecification.class);
-		semanticTargetToRuleMap.put(Transition.class.getName(), TransitionSpecification.class);
-		semanticTargetToRuleMap.put(State.class.getName(), StateSpecification.class);
-		semanticTargetToRuleMap.put(Guard.class.getName(), Guard.class);
-	}
-
-	public Module getSharedStateModule() {
-		return new SharedStateModule();
-	}
-
-	public Module getLanguageRuntimeModule() {
-		return new STextRuntimeModule();
-	}
-
-	public Module getLanguageUIModule() {
-		return new STextUiModule(STextActivator.getInstance());
-	}
-
-	public Module getTypeSystemModule() {
-		return new GenericTypeSystemModule();
-	}
-
-	public Module getSimulationModule() {
-		return new GenericSimulationModule();
-	}
-
-	public Module getSequencerModule() {
-		return new GenericSequencerModule();
-	}
-
-	public Module getGeneratorModule(String generatorId) {
-		// currently there is only one module with shared bindings for all code
-		// generators
-		return new GenericGeneratorModule();
-	}
-
-	protected Module getResourceModule() {
-		
-		
-		
-		Module uiModule = Modules.override(getLanguageRuntimeModule()).with(getLanguageUIModule());
-		Module result = Modules.override(uiModule).with(getSharedStateModule());
-		return Modules.override(result).with(getTypeSystemModule());
-	}
-
-	protected Module getEmbeddedEditorModule(Class<? extends EObject> rule) {
-		Module resource = getResourceModule();
-		return Modules.override(resource).with(new EntryRuleRuntimeModule(rule), new EntryRuleUIModule(rule));
-	}
-
-	@Override
-	public Injector getEmbeddedEditorInjector(String semanticTarget) {
-		if (embeddedInjectors.get(semanticTarget) == null) {
-			Class<? extends EObject> rule = semanticTargetToRuleMap.get(semanticTarget);
-			org.eclipse.core.runtime.Assert.isNotNull(rule);
-			embeddedInjectors.put(semanticTarget, Guice.createInjector(getEmbeddedEditorModule(rule)));
-		}
-		return embeddedInjectors.get(semanticTarget);
-	}
-
-	@Override
-	public Injector getResourceInjector() {
-		if (resourceInjector == null)
-			resourceInjector = Guice.createInjector(getResourceModule());
-		return resourceInjector;
-	}
-
-	@Override
-	public Injector getSimulationInjector() {
-		return Guice.createInjector(getSimulationModule());
-	}
-
-	@Override
-	public Injector getSequencerInjector() {
-		return Guice.createInjector(getSequencerModule());
-	}
-
-	@Override
-	public Injector getSequencerInjector(Module overrides) {
-		if (overrides != null) {
-			return Guice.createInjector(Modules.override(getSequencerModule()).with(overrides));
-		}
-		return getSequencerInjector();
-	}
-
-	@Override
-	public Injector getEditorInjector() {
-		return Guice.createInjector(new GenericEditorModule());
-	}
-
-	@Override
-	public Injector getGeneratorInjector(String generatorId) {
-		return getGeneratorInjector(generatorId, null);
-	}
-
-	@Override
-	public Injector getGeneratorInjector(String generatorId, Module baseModule) {
-		Module genModule = getGeneratorModule(generatorId);
-
-		if (baseModule != null) {
-			genModule = Modules.override(baseModule).with(genModule);
-		} 
-		
-		genModule = Modules.override(getSequencerModule()).with(genModule);
-		return Guice.createInjector(genModule);
-	}
-
-}

+ 0 - 44
plugins/org.yakindu.sct.domain.generic/src/org/yakindu/sct/domain/generic/modules/GenericEditorModule.java

@@ -1,44 +0,0 @@
-/**
- * Copyright (c) 2015 committers of YAKINDU and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- * Contributors:
- * 	committers of YAKINDU - initial API and implementation
- * 
- */
-package org.yakindu.sct.domain.generic.modules;
-
-import org.eclipse.xtext.service.AbstractGenericModule;
-import org.yakindu.sct.refactoring.proposals.RefactoringProposalProvider;
-import org.yakindu.sct.ui.editor.editor.proposals.SmartEditProposalProvider;
-import org.yakindu.sct.ui.editor.proposals.IEditProposalProvider;
-import org.yakindu.sct.ui.editor.providers.DefaultSCTPaletteFactory;
-import org.yakindu.sct.ui.editor.providers.ISCTPaletteFactory;
-
-import com.google.inject.Binder;
-import com.google.inject.multibindings.Multibinder;
-
-/**
- * This module registers services that are intended to be used by the graphical editor.
- * 
- * @author terfloth
- * @author muelder - add palette factory
- * @author dicks - add outline factory
- *
- */
-public class GenericEditorModule extends AbstractGenericModule {
-
-	public void configure(Binder binder) {
-		super.configure(binder);
-		
-		Multibinder<IEditProposalProvider> proposalProviderBinder = Multibinder.newSetBinder(binder, IEditProposalProvider.class);
-	    proposalProviderBinder.addBinding().to(SmartEditProposalProvider.class);
-	    proposalProviderBinder.addBinding().to(RefactoringProposalProvider.class);
-	}
-	
-	public Class<? extends ISCTPaletteFactory> bindISCTPaletteFactory() {
-		return DefaultSCTPaletteFactory.class;
-	}
-}

+ 0 - 34
plugins/org.yakindu.sct.domain.generic/src/org/yakindu/sct/domain/generic/modules/GenericGeneratorModule.java

@@ -1,34 +0,0 @@
-/**
- * Copyright (c) 2016 committers of YAKINDU and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * 		committers of YAKINDU - initial API and implementation
- * 
- */
-package org.yakindu.sct.domain.generic.modules;
-
-import org.eclipse.xtext.service.AbstractGenericModule;
-import org.yakindu.sct.generator.builder.console.EclipseConsoleLog;
-import org.yakindu.sct.generator.builder.efs.EFSResourceFileSystemAccess;
-import org.yakindu.sct.generator.core.filesystem.ISCTFileSystemAccess;
-import org.yakindu.sct.generator.core.impl.IGeneratorLog;
-
-/**
- * @author Johannes Dicks - Initial contribution and API
- *
- */
-public class GenericGeneratorModule extends AbstractGenericModule {
-
-	public Class<? extends ISCTFileSystemAccess> bindISCTFileSystemAccess() {
-		return EFSResourceFileSystemAccess.class;
-	}
-
-	public Class<? extends IGeneratorLog> bindIGeneratorLog() {
-		return EclipseConsoleLog.class;
-	}
-
-}

+ 0 - 54
plugins/org.yakindu.sct.domain.generic/src/org/yakindu/sct/domain/generic/modules/GenericTypeSystemModule.java

@@ -1,54 +0,0 @@
-/**
- * Copyright (c) 2011 committers of YAKINDU and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     committers of YAKINDU - initial API and implementation
- */
-package org.yakindu.sct.domain.generic.modules;
-
-import org.eclipse.xtext.service.AbstractGenericModule;
-import org.yakindu.base.base.BasePackage;
-import org.yakindu.base.types.inferrer.ITypeSystemInferrer;
-import org.yakindu.base.types.typesystem.GenericTypeSystem;
-import org.yakindu.base.types.typesystem.ITypeSystem;
-import org.yakindu.sct.model.stext.inferrer.STextTypeInferrer;
-
-import com.google.inject.Binder;
-import com.google.inject.name.Names;
-
-/**
- * 
- * Default Module used for type contribution and type inference. Override
- * bindings to specify custom behavior.
- * 
- * @author andreas muelder - Initial contribution and API
- * 
- */
-public class GenericTypeSystemModule extends AbstractGenericModule {
-
-	public static final String DOMAIN_ID = "domainId";
-
-	@Override
-	public void configure(Binder binder) {
-		super.configure(binder);
-		binder.bind(String.class).annotatedWith(Names.named(DOMAIN_ID)).toInstance(getDomainID());
-		binder.bind(ITypeSystem.class).toInstance(getTypeSystem());
-	}
-
-	protected String getDomainID() {
-		return BasePackage.Literals.DOMAIN_ELEMENT__DOMAIN_ID.getDefaultValueLiteral();
-	}
-	
-	protected ITypeSystem getTypeSystem() {
-		return GenericTypeSystem.getInstance();
-	}
-
-	public Class<? extends ITypeSystemInferrer> bindITypeSystemInferrer() {
-		return STextTypeInferrer.class;
-	}
-
-}

+ 39 - 0
plugins/org.yakindu.sct.domain.generic/src/org/yakindu/sct/domain/generic/modules/ResourceModuleProvider.java

@@ -0,0 +1,39 @@
+/** 
+ * Copyright (c) 2016 committers of YAKINDU and others. 
+ * All rights reserved. This program and the accompanying materials 
+ * are made available under the terms of the Eclipse Public License v1.0 
+ * which accompanies this distribution, and is available at 
+ * http://www.eclipse.org/legal/epl-v10.html 
+ * Contributors:
+ * committers of YAKINDU - initial API and implementation
+ *
+*/
+package org.yakindu.sct.domain.generic.modules;
+
+import org.eclipse.emf.ecore.resource.Resource;
+import org.yakindu.sct.domain.extension.IModuleProvider;
+import org.yakindu.sct.model.stext.STextRuntimeModule;
+import org.yakindu.sct.model.stext.resource.StextResource;
+
+import com.google.inject.Binder;
+import com.google.inject.Module;
+import com.google.inject.util.Modules;
+
+/**
+ * 
+ * @author andreas muelder - Initial contribution and API
+ * 
+ */
+public class ResourceModuleProvider implements IModuleProvider {
+
+	@Override
+	public Module getModule(String... options) {
+		return Modules.combine(new STextRuntimeModule(), new Module() {
+			@Override
+			public void configure(Binder binder) {
+				binder.bind(Resource.class).to(StextResource.class);
+			}
+		});
+	}
+
+}

+ 0 - 1
plugins/org.yakindu.sct.domain/META-INF/MANIFEST.MF

@@ -15,4 +15,3 @@ Bundle-ActivationPolicy: lazy
 Export-Package: org.yakindu.sct.domain,
 Export-Package: org.yakindu.sct.domain,
  org.yakindu.sct.domain.extension
  org.yakindu.sct.domain.extension
 Bundle-ClassPath: .
 Bundle-ClassPath: .
-Import-Package: com.google.inject.multibindings;version="1.3.0"

+ 1 - 0
plugins/org.yakindu.sct.domain/plugin.xml

@@ -2,4 +2,5 @@
 <?eclipse version="3.4"?>
 <?eclipse version="3.4"?>
 <plugin>
 <plugin>
    <extension-point id="org.yakindu.sct.domain" name="org.yakindu.sct.domain" schema="schema/domain.exsd"/>
    <extension-point id="org.yakindu.sct.domain" name="org.yakindu.sct.domain" schema="schema/domain.exsd"/>
+   <extension-point id="org.yakindu.sct.domain.modules" name="org.yakindu.sct.domain.modules" schema="schema/modules.exsd"/>
 </plugin>
 </plugin>

+ 0 - 10
plugins/org.yakindu.sct.domain/schema/domain.exsd

@@ -80,16 +80,6 @@
                </documentation>
                </documentation>
             </annotation>
             </annotation>
          </attribute>
          </attribute>
-         <attribute name="domainModuleProvider" type="string" use="required">
-            <annotation>
-               <documentation>
-                  
-               </documentation>
-               <appinfo>
-                  <meta.attribute kind="java" basedOn=":org.yakindu.sct.domain.extension.IDomainModuleProvider"/>
-               </appinfo>
-            </annotation>
-         </attribute>
       </complexType>
       </complexType>
    </element>
    </element>
 
 

+ 116 - 0
plugins/org.yakindu.sct.domain/schema/modules.exsd

@@ -0,0 +1,116 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<!-- Schema file written by PDE -->
+<schema targetNamespace="org.yakindu.sct.domain" xmlns="http://www.w3.org/2001/XMLSchema">
+<annotation>
+      <appinfo>
+         <meta.schema plugin="org.yakindu.sct.domain" id="org.yakindu.sct.domain.injector" name="org.yakindu.sct.domain.injector"/>
+      </appinfo>
+      <documentation>
+         [Enter description of this extension point.]
+      </documentation>
+   </annotation>
+
+   <element name="extension">
+      <annotation>
+         <appinfo>
+            <meta.element />
+         </appinfo>
+      </annotation>
+      <complexType>
+         <sequence minOccurs="1" maxOccurs="unbounded">
+            <element ref="Module"/>
+         </sequence>
+         <attribute name="point" type="string" use="required">
+            <annotation>
+               <documentation>
+                  
+               </documentation>
+            </annotation>
+         </attribute>
+         <attribute name="id" type="string">
+            <annotation>
+               <documentation>
+                  
+               </documentation>
+            </annotation>
+         </attribute>
+         <attribute name="name" type="string">
+            <annotation>
+               <documentation>
+                  
+               </documentation>
+               <appinfo>
+                  <meta.attribute translatable="true"/>
+               </appinfo>
+            </annotation>
+         </attribute>
+      </complexType>
+   </element>
+
+   <element name="Module">
+      <complexType>
+         <attribute name="domainID" type="string">
+            <annotation>
+               <documentation>
+                  
+               </documentation>
+            </annotation>
+         </attribute>
+         <attribute name="feature" type="string">
+            <annotation>
+               <documentation>
+                  
+               </documentation>
+            </annotation>
+         </attribute>
+         <attribute name="moduleProvider" type="string">
+            <annotation>
+               <documentation>
+                  
+               </documentation>
+               <appinfo>
+                  <meta.attribute kind="java" basedOn=":org.yakindu.sct.domain.extension.IModuleProvider"/>
+               </appinfo>
+            </annotation>
+         </attribute>
+      </complexType>
+   </element>
+
+   <annotation>
+      <appinfo>
+         <meta.section type="since"/>
+      </appinfo>
+      <documentation>
+         [Enter the first release in which this extension point appears.]
+      </documentation>
+   </annotation>
+
+   <annotation>
+      <appinfo>
+         <meta.section type="examples"/>
+      </appinfo>
+      <documentation>
+         [Enter extension point usage example here.]
+      </documentation>
+   </annotation>
+
+   <annotation>
+      <appinfo>
+         <meta.section type="apiinfo"/>
+      </appinfo>
+      <documentation>
+         [Enter API information here.]
+      </documentation>
+   </annotation>
+
+   <annotation>
+      <appinfo>
+         <meta.section type="implementation"/>
+      </appinfo>
+      <documentation>
+         [Enter information about supplied implementation of this extension point.]
+      </documentation>
+   </annotation>
+
+
+</schema>

+ 0 - 8
plugins/org.yakindu.sct.domain/src/org/yakindu/sct/domain/DomainActivator.java

@@ -21,18 +21,10 @@ public class DomainActivator implements BundleActivator {
 		return context;
 		return context;
 	}
 	}
 
 
-	/*
-	 * (non-Javadoc)
-	 * @see org.osgi.framework.BundleActivator#start(org.osgi.framework.BundleContext)
-	 */
 	public void start(BundleContext bundleContext) throws Exception {
 	public void start(BundleContext bundleContext) throws Exception {
 		DomainActivator.context = bundleContext;
 		DomainActivator.context = bundleContext;
 	}
 	}
 
 
-	/*
-	 * (non-Javadoc)
-	 * @see org.osgi.framework.BundleActivator#stop(org.osgi.framework.BundleContext)
-	 */
 	public void stop(BundleContext bundleContext) throws Exception {
 	public void stop(BundleContext bundleContext) throws Exception {
 		DomainActivator.context = null;
 		DomainActivator.context = null;
 	}
 	}

+ 64 - 77
plugins/org.yakindu.sct.domain/src/org/yakindu/sct/domain/extension/DomainRegistry.java

@@ -12,6 +12,7 @@ package org.yakindu.sct.domain.extension;
 
 
 import java.io.IOException;
 import java.io.IOException;
 import java.net.URL;
 import java.net.URL;
+import java.util.ArrayList;
 import java.util.List;
 import java.util.List;
 import java.util.NoSuchElementException;
 import java.util.NoSuchElementException;
 
 
@@ -29,6 +30,8 @@ import org.eclipse.xtext.EcoreUtil2;
 import org.osgi.framework.Bundle;
 import org.osgi.framework.Bundle;
 import org.yakindu.base.base.BasePackage;
 import org.yakindu.base.base.BasePackage;
 import org.yakindu.base.base.DomainElement;
 import org.yakindu.base.base.DomainElement;
+import org.yakindu.sct.domain.extension.impl.DomainImpl;
+import org.yakindu.sct.domain.extension.impl.ModuleContribution;
 
 
 import com.google.common.base.Predicate;
 import com.google.common.base.Predicate;
 import com.google.common.collect.Iterables;
 import com.google.common.collect.Iterables;
@@ -40,95 +43,38 @@ import com.google.common.collect.Lists;
  */
  */
 public class DomainRegistry {
 public class DomainRegistry {
 
 
-	private static final String EXTENSION_POINT_ID = "org.yakindu.sct.domain";
+	private static final String DOMAIN_EXTENSION_POINT_ID = "org.yakindu.sct.domain";
+	private static final String MODULES_EXTENSION_POINT_ID = "org.yakindu.sct.domain.modules";
+
 	private static final String DOMAIN_ID = "domainID";
 	private static final String DOMAIN_ID = "domainID";
 	private static final String DESCRIPTION = "description";
 	private static final String DESCRIPTION = "description";
 	private static final String IMAGE = "image";
 	private static final String IMAGE = "image";
 	private static final String NAME = "name";
 	private static final String NAME = "name";
-	private static final String MODULE_PROVIDER = "domainModuleProvider";
+
+	private static final String FEATURE = "feature";
+	private static final String MODULE_PROVIDER = "moduleProvider";
 
 
 	private DomainRegistry() {
 	private DomainRegistry() {
 	}
 	}
 
 
-	private static List<IDomainDescriptor> descriptors;
-
-	private static final class ConfigElementDomainDescriptor implements IDomainDescriptor {
-
-		private final IConfigurationElement configElement;
-
-		private URL image;
-
-		private IDomainInjectorProvider injectorProvider;
-
-		ConfigElementDomainDescriptor(IConfigurationElement configElement) {
-			this.configElement = configElement;
-		}
-
-		@Override
-		public String getDomainID() {
-			return configElement.getAttribute(DOMAIN_ID);
-		}
-
-		@Override
-		public String getName() {
-			return configElement.getAttribute(NAME);
-		}
+	private static List<IDomain> domainDescriptors;
 
 
-		@Override
-		public String getDescription() {
-			return configElement.getAttribute(DESCRIPTION);
-		}
-
-		@Override
-		public IDomainInjectorProvider getDomainInjectorProvider() {
-			if (injectorProvider == null) {
-				try {
-					injectorProvider = (IDomainInjectorProvider) configElement
-							.createExecutableExtension(MODULE_PROVIDER);
-				} catch (CoreException e) {
-					e.printStackTrace();
-				}
-			}
-			return injectorProvider;
-		}
-
-		@Override
-		public URL getImagePath() {
-			if (image != null)
-				return image;
-			String path = configElement.getAttribute(IMAGE);
-			if (path == null)
-				return null;
-			Bundle extensionBundle = Platform.getBundle(configElement.getContributor().getName());
-			image = extensionBundle.getEntry(path);
-			return image;
-		}
-	}
-
-	public static List<IDomainDescriptor> getDomainDescriptors() {
-		if (descriptors == null) {
-			descriptors = Lists.newArrayList();
+	public static List<IDomain> getDomains() {
+		if (domainDescriptors == null) {
+			domainDescriptors = Lists.newArrayList();
 			if (Platform.isRunning()) {
 			if (Platform.isRunning()) {
 				initFromExtensions();
 				initFromExtensions();
 			}
 			}
 		}
 		}
-		return descriptors;
+		return domainDescriptors;
 	}
 	}
 
 
-	protected static void initFromExtensions() {
-		IConfigurationElement[] configurationElements = Platform.getExtensionRegistry()
-				.getConfigurationElementsFor(EXTENSION_POINT_ID);
-		for (IConfigurationElement iConfigurationElement : configurationElements) {
-			descriptors.add(new ConfigElementDomainDescriptor(iConfigurationElement));
-		}
-	}
-
-	public static IDomainDescriptor getDomainDescriptor(final String id) {
+	public static IDomain getDomain(final String id) {
 		final String defaultDomainID = BasePackage.Literals.DOMAIN_ELEMENT__DOMAIN_ID.getDefaultValueLiteral();
 		final String defaultDomainID = BasePackage.Literals.DOMAIN_ELEMENT__DOMAIN_ID.getDefaultValueLiteral();
 		try {
 		try {
-			return Iterables.find(getDomainDescriptors(), new Predicate<IDomainDescriptor>() {
+			return Iterables.find(getDomains(), new Predicate<IDomain>() {
 				@Override
 				@Override
-				public boolean apply(IDomainDescriptor input) {
+				public boolean apply(IDomain input) {
 					return input.getDomainID().equals(id != null ? id : defaultDomainID);
 					return input.getDomainID().equals(id != null ? id : defaultDomainID);
 				}
 				}
 			});
 			});
@@ -137,18 +83,17 @@ public class DomainRegistry {
 				throw new IllegalArgumentException("No default domain found!");
 				throw new IllegalArgumentException("No default domain found!");
 			}
 			}
 			System.err.println("Could not find domain descriptor for id " + id + " - > using default domain");
 			System.err.println("Could not find domain descriptor for id " + id + " - > using default domain");
-			return getDomainDescriptor(defaultDomainID);
+			return getDomain(defaultDomainID);
 		}
 		}
 	}
 	}
 
 
-	public static IDomainDescriptor getDomainDescriptor(EObject object) {
+	public static IDomain getDomain(EObject object) {
 		DomainElement domainElement = EcoreUtil2.getContainerOfType(object, DomainElement.class);
 		DomainElement domainElement = EcoreUtil2.getContainerOfType(object, DomainElement.class);
-		String domainID = domainElement != null
-				? domainElement.getDomainID()
+		String domainID = domainElement != null ? domainElement.getDomainID()
 				: BasePackage.Literals.DOMAIN_ELEMENT__DOMAIN_ID.getDefaultValueLiteral();
 				: BasePackage.Literals.DOMAIN_ELEMENT__DOMAIN_ID.getDefaultValueLiteral();
-		return getDomainDescriptor(domainID);
+		return getDomain(domainID);
 	}
 	}
-	
+
 	public static String determineDomainID(URI uri) {
 	public static String determineDomainID(URI uri) {
 		String result = BasePackage.Literals.DOMAIN_ELEMENT__DOMAIN_ID.getDefaultValueLiteral();
 		String result = BasePackage.Literals.DOMAIN_ELEMENT__DOMAIN_ID.getDefaultValueLiteral();
 		if (URIConverter.INSTANCE.exists(uri, null)) {
 		if (URIConverter.INSTANCE.exists(uri, null)) {
@@ -168,4 +113,46 @@ public class DomainRegistry {
 		}
 		}
 		return result;
 		return result;
 	}
 	}
+
+	protected static void initFromExtensions() {
+		List<ModuleContribution> moduleDescriptors = new ArrayList<>();
+		IConfigurationElement[] configurationElements = Platform.getExtensionRegistry()
+				.getConfigurationElementsFor(MODULES_EXTENSION_POINT_ID);
+		for (IConfigurationElement element : configurationElements) {
+			moduleDescriptors.add(createModuleContribution(element));
+		}
+		configurationElements = Platform.getExtensionRegistry().getConfigurationElementsFor(DOMAIN_EXTENSION_POINT_ID);
+		for (IConfigurationElement iConfigurationElement : configurationElements) {
+			domainDescriptors.add(createDomain(iConfigurationElement, moduleDescriptors));
+		}
+	}
+
+	protected static ModuleContribution createModuleContribution(IConfigurationElement element) {
+		IModuleProvider provider;
+		try {
+			provider = (IModuleProvider) element.createExecutableExtension(MODULE_PROVIDER);
+			return new ModuleContribution(element.getAttribute(DOMAIN_ID), element.getAttribute(FEATURE), provider);
+		} catch (CoreException e) {
+			e.printStackTrace();
+		}
+		return null;
+	}
+
+	protected static IDomain createDomain(final IConfigurationElement element, List<ModuleContribution> allModules) {
+		String path = element.getAttribute(IMAGE);
+		URL image = null;
+		if (path != null) {
+			Bundle extensionBundle = Platform.getBundle(element.getContributor().getName());
+			image = extensionBundle.getEntry(path);
+		}
+		return new DomainImpl(element.getAttribute(DOMAIN_ID), element.getAttribute(NAME),
+				element.getAttribute(DESCRIPTION), image,
+				Iterables.filter(allModules, new Predicate<ModuleContribution>() {
+					@Override
+					public boolean apply(ModuleContribution input) {
+						return input.getDomainID().equals(element.getAttribute(DOMAIN_ID));
+					}
+				}));
+	}
+
 }
 }

+ 47 - 0
plugins/org.yakindu.sct.domain/src/org/yakindu/sct/domain/extension/IDomain.java

@@ -0,0 +1,47 @@
+/**
+ * Copyright (c) 2016 committers of YAKINDU and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * Contributors:
+ * 	committers of YAKINDU - initial API and implementation
+ * 
+ */
+package org.yakindu.sct.domain.extension;
+
+import java.net.URL;
+
+import com.google.inject.Injector;
+import com.google.inject.Module;
+
+/**
+ * @author andreas muelder - Initial contribution and API
+ * 
+ */
+public interface IDomain {
+
+	public static final String FEATURE_EDITOR = "org.yakindu.sct.editor";
+	public static final String FEATURE_SIMULATION = "org.yakindu.sct.simulation";
+	public static final String FEATURE_GENERATOR = "org.yakindu.sct.generator";
+	public static final String FEATURE_RESOURCE = "org.yakindu.sct.resource";
+
+	String getDomainID();
+
+	String getName();
+
+	String getDescription();
+
+	/**
+	 * Injector instances are cached for the features and the specified options
+	 */
+	Injector getInjector(String feature, String... options);
+
+	/**
+	 * when an overrides Module is provided, injectors are not cached
+	 */
+	Injector getInjector(String feature, Module overrides, String... options);
+
+	URL getImagePath();
+
+}

+ 0 - 17
plugins/org.yakindu.sct.domain/src/org/yakindu/sct/domain/extension/IDomainDescriptor.java

@@ -1,17 +0,0 @@
-package org.yakindu.sct.domain.extension;
-
-import java.net.URL;
-
-public interface IDomainDescriptor {
-
-	String getDomainID();
-
-	String getName();
-
-	String getDescription();
-
-	IDomainInjectorProvider getDomainInjectorProvider();
-
-	URL getImagePath();
-
-}

+ 0 - 66
plugins/org.yakindu.sct.domain/src/org/yakindu/sct/domain/extension/IDomainInjectorProvider.java

@@ -1,66 +0,0 @@
-/**
- * Copyright (c) 2015 committers of YAKINDU and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- * Contributors:
- * 	committers of YAKINDU - initial API and implementation
- * 
- */
-package org.yakindu.sct.domain.extension;
-
-import com.google.inject.Injector;
-import com.google.inject.Module;
-
-/**
- * @author andreas muelder - Initial contribution and API
- * @author terfloth
- * 
- */
-public interface IDomainInjectorProvider {
-
-	/**
-	 * Returns the injector used for injection the {@link AbstractSCTResource}
-	 * 
-	 */
-	public Injector getResourceInjector();
-
-	/**
-	 * Returns the injector for the Simulation engine
-	 */
-	public Injector getSimulationInjector();
-
-	/**
-	 * Returns the Injector for the model sequencing without overriding existing
-	 * bindings.
-	 */
-	public Injector getSequencerInjector();
-
-	/**
-	 * Returns the Injector for the model sequencing, giving precedence to those
-	 * bindings in the overrides module.
-	 */
-	public Injector getSequencerInjector(Module overrides);
-
-	/**
-	 * Injector used to create the embedded in-diagram Xtext Editor
-	 * 
-	 * @param elementKey
-	 *            A key indicating for which element the in-diagram editor
-	 *            should be created, i.e. State, Statechart or Transition
-	 */
-	public Injector getEmbeddedEditorInjector(String elementKey);
-
-	/**
-	 * Returns an injector for all editor and UI related stuff.
-	 */
-	public Injector getEditorInjector();
-
-	/**
-	 * @param generatorId
-	 */
-	public Injector getGeneratorInjector(String generatorId);
-	
-	public Injector getGeneratorInjector(String generatorId, Module overrides);
-}

+ 23 - 0
plugins/org.yakindu.sct.domain/src/org/yakindu/sct/domain/extension/IModuleProvider.java

@@ -0,0 +1,23 @@
+/**
+ * Copyright (c) 2016 committers of YAKINDU and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * Contributors:
+ * 	committers of YAKINDU - initial API and implementation
+ * 
+ */
+package org.yakindu.sct.domain.extension;
+
+import com.google.inject.Module;
+
+/**
+ * @author andreas muelder - Initial contribution and API
+ * 
+ */
+public interface IModuleProvider {
+
+	public Module getModule(String... options) throws IllegalArgumentException;
+
+}

+ 162 - 0
plugins/org.yakindu.sct.domain/src/org/yakindu/sct/domain/extension/impl/DomainImpl.java

@@ -0,0 +1,162 @@
+/**
+ * Copyright (c) 2016 committers of YAKINDU and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * Contributors:
+ * 	committers of YAKINDU - initial API and implementation
+ * 
+ */
+package org.yakindu.sct.domain.extension.impl;
+
+import java.net.URL;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+import java.util.concurrent.ExecutionException;
+
+import org.yakindu.sct.domain.extension.IDomain;
+
+import com.google.common.cache.CacheBuilder;
+import com.google.common.cache.CacheLoader;
+import com.google.common.cache.LoadingCache;
+import com.google.inject.Guice;
+import com.google.inject.Injector;
+import com.google.inject.Module;
+import com.google.inject.util.Modules;
+
+/**
+ * @author andreas muelder - Initial contribution and API
+ * 
+ */
+public class DomainImpl implements IDomain {
+
+	private String domainID;
+	private String name;
+	private String description;
+	private URL imagePath;
+	private Iterable<ModuleContribution> modules;
+	private LoadingCache<CacheKey, Injector> injectorCache;
+
+	protected static class CacheKey {
+		private String feature;
+		private String[] options;
+
+		public CacheKey(String feature, String[] options) {
+			this.feature = feature;
+			this.options = options;
+		}
+
+		@Override
+		public int hashCode() {
+			final int prime = 31;
+			int result = 1;
+			result = prime * result + ((feature == null) ? 0 : feature.hashCode());
+			result = prime * result + Arrays.hashCode(options);
+			return result;
+		}
+
+		@Override
+		public boolean equals(Object obj) {
+			if (this == obj)
+				return true;
+			if (obj == null)
+				return false;
+			if (getClass() != obj.getClass())
+				return false;
+			CacheKey other = (CacheKey) obj;
+			if (feature == null) {
+				if (other.feature != null)
+					return false;
+			} else if (!feature.equals(other.feature))
+				return false;
+			if (!Arrays.equals(options, other.options))
+				return false;
+			return true;
+		}
+
+		public String getFeature() {
+			return feature;
+		}
+
+		public String[] getOptions() {
+			return options;
+		}
+
+	}
+
+	public DomainImpl(String domainID, String name, String description, URL imagePath,
+			Iterable<ModuleContribution> modules) {
+		this.domainID = domainID;
+		this.name = name;
+		this.description = description;
+		this.imagePath = imagePath;
+		this.modules = modules;
+		initializeCache();
+
+	}
+
+	protected void initializeCache() {
+		injectorCache = CacheBuilder.newBuilder().build(new CacheLoader<CacheKey, Injector>() {
+			@Override
+			public Injector load(CacheKey key) throws Exception {
+				return createInjector(key.getFeature(), key.getOptions());
+			}
+		});
+	}
+
+	@Override
+	public String getDomainID() {
+		return domainID;
+	}
+
+	@Override
+	public String getName() {
+		return name;
+	}
+
+	@Override
+	public String getDescription() {
+		return description;
+	}
+
+	@Override
+	public URL getImagePath() {
+		return imagePath;
+	}
+
+	@Override
+	public Injector getInjector(String feature, String... options) {
+		try {
+			Injector result = injectorCache.get(new CacheKey(feature, options));
+			return result;
+		} catch (ExecutionException e) {
+			e.printStackTrace();
+		}
+		return Guice.createInjector();
+	}
+
+	@Override
+	public Injector getInjector(String feature, Module overrides, String... options) {
+		return createInjector(feature, overrides, options);
+	}
+
+	public Injector createInjector(String feature, String... options) {
+		return getInjector(feature, null, options);
+	}
+
+	public Injector createInjector(String feature, Module overrides, String... options) {
+		List<Module> modules = new ArrayList<>();
+		for (ModuleContribution module : this.modules) {
+			if (feature.equals(module.getFeature())) {
+				modules.add(module.getModuleProvider().getModule(options));
+			}
+		}
+		Module result = Modules.combine(modules);
+		if (overrides != null)
+			result = Modules.override(result).with(overrides);
+		return Guice.createInjector(result);
+	}
+
+}

+ 43 - 0
plugins/org.yakindu.sct.domain/src/org/yakindu/sct/domain/extension/impl/ModuleContribution.java

@@ -0,0 +1,43 @@
+/**
+ * Copyright (c) 2016 committers of YAKINDU and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * Contributors:
+ * 	committers of YAKINDU - initial API and implementation
+ * 
+ */
+package org.yakindu.sct.domain.extension.impl;
+
+import org.yakindu.sct.domain.extension.IModuleProvider;
+
+/**
+ * @author andreas muelder - Initial contribution and API
+ * 
+ */
+public class ModuleContribution {
+
+	private String domainID;
+	private String feature;
+	private IModuleProvider provider;
+
+	public ModuleContribution(String domainID, String feature, IModuleProvider provider) {
+		this.domainID = domainID;
+		this.feature = feature;
+		this.provider = provider;
+	}
+
+	public String getDomainID() {
+		return domainID;
+	}
+
+	public String getFeature() {
+		return feature;
+	}
+
+	public IModuleProvider getModuleProvider() {
+		return provider;
+	}
+
+}

+ 1 - 0
plugins/org.yakindu.sct.generator.builder/.gitignore

@@ -1 +1,2 @@
 /bin/
 /bin/
+/target/

+ 4 - 1
plugins/org.yakindu.sct.generator.builder/META-INF/MANIFEST.MF

@@ -13,7 +13,10 @@ Require-Bundle: org.eclipse.ui,
  org.yakindu.sct.generator.genmodel,
  org.yakindu.sct.generator.genmodel,
  org.yakindu.sct.domain,
  org.yakindu.sct.domain,
  org.eclipse.jdt.core,
  org.eclipse.jdt.core,
- org.eclipse.ui.console
+ org.eclipse.ui.console,
+ org.yakindu.sct.generator.core,
+ org.eclipse.xtext.builder,
+ org.eclipse.xtext.ui.shared
 Bundle-RequiredExecutionEnvironment: JavaSE-1.7
 Bundle-RequiredExecutionEnvironment: JavaSE-1.7
 Bundle-ActivationPolicy: lazy
 Bundle-ActivationPolicy: lazy
 Export-Package: org.yakindu.sct.generator.builder,
 Export-Package: org.yakindu.sct.generator.builder,

+ 33 - 0
plugins/org.yakindu.sct.generator.builder/src/org/yakindu/sct/generator/builder/EclipseContextModule.java

@@ -0,0 +1,33 @@
+/**
+ * Copyright (c) 2016 committers of YAKINDU and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * Contributors:
+ * 	committers of YAKINDU - initial API and implementation
+ * 
+ */
+package org.yakindu.sct.generator.builder;
+
+import org.yakindu.sct.generator.builder.console.EclipseConsoleLogger;
+import org.yakindu.sct.generator.builder.efs.SCTEclipseResourceFileSystemAccess;
+import org.yakindu.sct.generator.core.console.IConsoleLogger;
+import org.yakindu.sct.generator.core.filesystem.ISCTFileSystemAccess;
+
+import com.google.inject.Binder;
+import com.google.inject.Module;
+
+/**
+ * 
+ * @author andreas muelder - Initial contribution and API
+ */
+public class EclipseContextModule implements Module {
+
+	@Override
+	public void configure(Binder binder) {
+		binder.bind(IConsoleLogger.class).to(EclipseConsoleLogger.class);
+		binder.bind(ISCTFileSystemAccess.class).to(SCTEclipseResourceFileSystemAccess.class);
+
+	}
+}

+ 5 - 3
plugins/org.yakindu.sct.generator.builder/src/org/yakindu/sct/generator/builder/SCTBuilder.java

@@ -35,6 +35,7 @@ import org.eclipse.emf.ecore.resource.ResourceSet;
 import org.eclipse.emf.ecore.resource.impl.ResourceSetImpl;
 import org.eclipse.emf.ecore.resource.impl.ResourceSetImpl;
 import org.eclipse.emf.ecore.util.EcoreUtil;
 import org.eclipse.emf.ecore.util.EcoreUtil;
 import org.eclipse.jface.preference.IPreferenceStore;
 import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.xtext.ui.shared.SharedStateModule;
 import org.yakindu.sct.generator.core.GeneratorActivator;
 import org.yakindu.sct.generator.core.GeneratorActivator;
 import org.yakindu.sct.generator.core.execution.GeneratorExecutor;
 import org.yakindu.sct.generator.core.execution.GeneratorExecutor;
 import org.yakindu.sct.model.sgen.GeneratorEntry;
 import org.yakindu.sct.model.sgen.GeneratorEntry;
@@ -44,6 +45,7 @@ import org.yakindu.sct.model.sgraph.Statechart;
 import com.google.common.base.Predicate;
 import com.google.common.base.Predicate;
 import com.google.common.collect.Iterables;
 import com.google.common.collect.Iterables;
 import com.google.common.collect.Sets;
 import com.google.common.collect.Sets;
+import com.google.inject.util.Modules;
 
 
 /**
 /**
  * 
  * 
@@ -217,13 +219,13 @@ public class SCTBuilder extends IncrementalProjectBuilder {
 
 
 	protected void executeGenmodelGenerator(IResource resource) {
 	protected void executeGenmodelGenerator(IResource resource) {
 		IFile file = resource.getProject().getFile(resource.getProjectRelativePath());
 		IFile file = resource.getProject().getFile(resource.getProjectRelativePath());
-		final GeneratorModel model = GenModelLoader
-				.load(file);
+		final GeneratorModel model = GenModelLoader.load(file);
 		if (model != null) {
 		if (model != null) {
 			Job generatorJob = new Job("Execute SCT Genmodel " + file.getName()) {
 			Job generatorJob = new Job("Execute SCT Genmodel " + file.getName()) {
 				@Override
 				@Override
 				protected IStatus run(IProgressMonitor monitor) {
 				protected IStatus run(IProgressMonitor monitor) {
-					new GeneratorExecutor().executeGenerator(model);
+					new GeneratorExecutor().executeGenerator(model,
+							Modules.combine(new SharedStateModule(), new EclipseContextModule()));
 					return Status.OK_STATUS;
 					return Status.OK_STATUS;
 				}
 				}
 			};
 			};

+ 6 - 1
plugins/org.yakindu.sct.generator.builder/src/org/yakindu/sct/generator/builder/action/GenerateModelAction.java

@@ -32,12 +32,16 @@ import org.eclipse.swt.widgets.Shell;
 import org.eclipse.ui.IObjectActionDelegate;
 import org.eclipse.ui.IObjectActionDelegate;
 import org.eclipse.ui.IWorkbenchPart;
 import org.eclipse.ui.IWorkbenchPart;
 import org.eclipse.ui.PlatformUI;
 import org.eclipse.ui.PlatformUI;
+import org.eclipse.xtext.ui.shared.SharedStateModule;
 import org.yakindu.sct.generator.builder.BuilderActivator;
 import org.yakindu.sct.generator.builder.BuilderActivator;
+import org.yakindu.sct.generator.builder.EclipseContextModule;
 import org.yakindu.sct.generator.builder.GenModelLoader;
 import org.yakindu.sct.generator.builder.GenModelLoader;
 import org.yakindu.sct.generator.core.GeneratorActivator;
 import org.yakindu.sct.generator.core.GeneratorActivator;
 import org.yakindu.sct.generator.core.execution.GeneratorExecutor;
 import org.yakindu.sct.generator.core.execution.GeneratorExecutor;
 import org.yakindu.sct.model.sgen.GeneratorModel;
 import org.yakindu.sct.model.sgen.GeneratorModel;
 
 
+import com.google.inject.util.Modules;
+
 /**
 /**
  * 
  * 
  * @author andreas muelder - Initial contribution and API
  * @author andreas muelder - Initial contribution and API
@@ -64,7 +68,8 @@ public class GenerateModelAction implements IObjectActionDelegate {
 			Job generatorJob = new Job("Execute SCT Genmodel " + file.getName()) {
 			Job generatorJob = new Job("Execute SCT Genmodel " + file.getName()) {
 				@Override
 				@Override
 				protected IStatus run(IProgressMonitor monitor) {
 				protected IStatus run(IProgressMonitor monitor) {
-					new GeneratorExecutor().executeGenerator(model);
+					new GeneratorExecutor().executeGenerator(model,
+							Modules.combine(new SharedStateModule(), new EclipseContextModule()));
 					return Status.OK_STATUS;
 					return Status.OK_STATUS;
 				}
 				}
 			};
 			};

+ 20 - 14
plugins/org.yakindu.sct.generator.builder/src/org/yakindu/sct/generator/builder/console/EclipseConsoleLog.java

@@ -11,6 +11,7 @@
  */
  */
 package org.yakindu.sct.generator.builder.console;
 package org.yakindu.sct.generator.builder.console;
 
 
+import java.io.IOException;
 import java.io.PrintWriter;
 import java.io.PrintWriter;
 
 
 import org.eclipse.core.runtime.Platform;
 import org.eclipse.core.runtime.Platform;
@@ -20,22 +21,22 @@ import org.eclipse.ui.console.IConsole;
 import org.eclipse.ui.console.IConsoleManager;
 import org.eclipse.ui.console.IConsoleManager;
 import org.eclipse.ui.console.MessageConsole;
 import org.eclipse.ui.console.MessageConsole;
 import org.eclipse.ui.console.MessageConsoleStream;
 import org.eclipse.ui.console.MessageConsoleStream;
-import org.yakindu.sct.generator.core.impl.IGeneratorLog;
+import org.yakindu.sct.generator.core.console.IConsoleLogger;
 
 
 /**
 /**
  * @author Johannes Dicks - Initial contribution and API
  * @author Johannes Dicks - Initial contribution and API
  */
  */
-public class EclipseConsoleLog implements IGeneratorLog {
-	
+public class EclipseConsoleLogger implements IConsoleLogger {
+
 	public static final String SCT_GENERATOR_CONSOLE = "SCT Generator Console";
 	public static final String SCT_GENERATOR_CONSOLE = "SCT Generator Console";
-	
+
 	private MessageConsoleStream info;
 	private MessageConsoleStream info;
 	private MessageConsoleStream error;
 	private MessageConsoleStream error;
-	
-	public EclipseConsoleLog() {
+
+	public EclipseConsoleLogger() {
 		init();
 		init();
 	}
 	}
-	
+
 	public void init() {
 	public void init() {
 		if (Platform.isRunning()) {
 		if (Platform.isRunning()) {
 			info = getConsole().newMessageStream();
 			info = getConsole().newMessageStream();
@@ -51,19 +52,24 @@ public class EclipseConsoleLog implements IGeneratorLog {
 		for (int i = 0; i < existing.length; i++) {
 		for (int i = 0; i < existing.length; i++) {
 			if (SCT_GENERATOR_CONSOLE.equals(existing[i].getName())) {
 			if (SCT_GENERATOR_CONSOLE.equals(existing[i].getName())) {
 				return (MessageConsole) existing[i];
 				return (MessageConsole) existing[i];
-			} 
+			}
 		}
 		}
 		MessageConsole myConsole = new MessageConsole(SCT_GENERATOR_CONSOLE, null);
 		MessageConsole myConsole = new MessageConsole(SCT_GENERATOR_CONSOLE, null);
-		conMan.addConsoles(new IConsole[]{myConsole});
+		conMan.addConsoles(new IConsole[] { myConsole });
 		return myConsole;
 		return myConsole;
 	}
 	}
-	public void close() throws Throwable {
-		info.close();
-		error.close();
+
+	public void close() {
+		try {
+			info.close();
+			error.close();
+		} catch (IOException e) {
+			e.printStackTrace();
+		}
 	}
 	}
 
 
 	@Override
 	@Override
-	public void writeToConsole(Throwable t) {
+	public void logError(Throwable t) {
 		if (error != null && !error.isClosed() && PlatformUI.isWorkbenchRunning()) {
 		if (error != null && !error.isClosed() && PlatformUI.isWorkbenchRunning()) {
 			PrintWriter printWriter = new PrintWriter(error);
 			PrintWriter printWriter = new PrintWriter(error);
 			t.printStackTrace(printWriter);
 			t.printStackTrace(printWriter);
@@ -73,7 +79,7 @@ public class EclipseConsoleLog implements IGeneratorLog {
 	}
 	}
 
 
 	@Override
 	@Override
-	public void writeToConsole(String line) {
+	public void log(String line) {
 		if (info != null && !info.isClosed() && PlatformUI.isWorkbenchRunning()) {
 		if (info != null && !info.isClosed() && PlatformUI.isWorkbenchRunning()) {
 			info.println(line);
 			info.println(line);
 		}
 		}

+ 0 - 366
plugins/org.yakindu.sct.generator.builder/src/org/yakindu/sct/generator/builder/efs/EFSResourceFileSystemAccess.java

@@ -1,366 +0,0 @@
-/** 
- * Copyright (c) 2015 committers of YAKINDU and others. 
- * All rights reserved. This program and the accompanying materials 
- * are made available under the terms of the Eclipse Public License v1.0 
- * which accompanies this distribution, and is available at 
- * http://www.eclipse.org/legal/epl-v10.html 
- * Contributors:
- * committers of YAKINDU - initial API and implementation
- *
-*/
-package org.yakindu.sct.generator.builder.efs;
-
-import static org.yakindu.sct.generator.core.library.ICoreLibraryConstants.OUTLET_FEATURE_TARGET_PROJECT;
-
-import java.io.BufferedInputStream;
-import java.io.File;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.UnsupportedEncodingException;
-
-import org.eclipse.core.resources.IContainer;
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IFolder;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.emf.common.util.URI;
-import org.eclipse.jdt.core.JavaCore;
-import org.eclipse.xtext.generator.AbstractFileSystemAccess2;
-import org.eclipse.xtext.generator.IFileSystemAccess;
-import org.eclipse.xtext.generator.OutputConfiguration;
-import org.eclipse.xtext.util.RuntimeIOException;
-import org.eclipse.xtext.util.StringInputStream;
-import org.yakindu.sct.generator.core.filesystem.ISCTFileSystemAccess;
-import org.yakindu.sct.generator.core.library.ICoreLibraryHelper;
-import org.yakindu.sct.model.sgen.GeneratorEntry;
-
-import com.google.inject.Inject;
-
-/**
- * 
- * @author Johannes Dicks - Initial contribution and API
- * 
- */
-public class EFSResourceFileSystemAccess extends AbstractFileSystemAccess2 implements ISCTFileSystemAccess {
-
-	private IProject project;
-	@Inject
-	ICoreLibraryHelper outletFeatureHelper;
-
-	public void refreshTargetProject(GeneratorEntry entry) {
-		if (Platform.isRunning()) {
-
-			try {
-				IProject project = getTargetProject(entry);
-				if (project != null && project.isAccessible())
-					project.refreshLocal(IResource.DEPTH_INFINITE, new NullProgressMonitor());
-			} catch (CoreException e) {
-				throw new RuntimeException(e);
-			}
-		}
-	}
-
-	/**
-	 * Returns an IProject for the configured target project. The
-	 * {@link IProject} is returned even if the project does not exist yet.
-	 * 
-	 * @param entry
-	 * @return
-	 */
-	public IProject getTargetProject(GeneratorEntry entry) {
-		String stringValue = outletFeatureHelper.getTargetProjectValue(entry).getStringValue();
-		if (Platform.isRunning()) {
-			IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject(stringValue);
-			return project;
-		} else
-			throw new IllegalStateException("Eclipse Platform not running.");
-	}
-
-	/**
-	 */
-	public String getEncoding(IFile file) throws CoreException {
-		return file.getCharset(true);
-	}
-
-	/**
-	 * Copy of
-	 * {@link org.eclipse.xtext.builder.EclipseResourceFileSystemAccess2#getContainer}
-	 * 
-	 * @param outputConfig
-	 * @return
-	 * @see {@link org.eclipse.xtext.builder.EclipseResourceFileSystemAccess2}
-	 */
-	public IContainer getContainer(OutputConfiguration outputConfig, IProject project) {
-		String path = outputConfig.getOutputDirectory();
-		if (isRootPath(path) || project == null) {
-			return project;
-		}
-		return project.getFolder(new Path(path));
-	}
-
-	public boolean isRootPath(String path) {
-		return (".".equals(path) || "/".equals(path) || "./".equals(path) || "".equals(path));
-	}
-
-	public void createContainer(IContainer container) {
-		try {
-			ensureExists(container);
-		} catch (CoreException e) {
-			throw new RuntimeException(e);
-		}
-
-	}
-
-	public IFile getFile(String fileName, OutputConfiguration config, IProject iProject) {
-		IContainer container = getContainer(config, iProject);
-		if (container != null) {
-			IFile result = container.getFile(new Path(fileName));
-			refreshFileSilently(result, new NullProgressMonitor());
-			return result;
-		}
-		return null;
-	}
-
-	private void refreshFileSilently(IFile result, NullProgressMonitor nullProgressMonitor) {
-		try {
-			result.refreshLocal(IResource.DEPTH_ZERO, new NullProgressMonitor());
-		} catch (CoreException c) {
-			// ignore
-		}
-	}
-
-	public boolean hasContentsChanged(IFile file, StringInputStream newContent) {
-		boolean contentChanged = false;
-		BufferedInputStream oldContent = null;
-		try {
-			oldContent = new BufferedInputStream(file.getContents());
-			int newByte = newContent.read();
-			int oldByte = oldContent.read();
-			while (newByte != -1 && oldByte != -1 && newByte == oldByte) {
-				newByte = newContent.read();
-				oldByte = oldContent.read();
-			}
-			contentChanged = newByte != oldByte;
-		} catch (CoreException e) {
-			contentChanged = true;
-		} catch (IOException e) {
-			contentChanged = true;
-		} finally {
-			if (oldContent != null) {
-				try {
-					oldContent.close();
-				} catch (IOException e) {
-					// ignore
-				}
-			}
-		}
-		return contentChanged;
-	}
-
-	public void setDerived(IFile file, boolean isDerived) throws CoreException {
-		file.setDerived(isDerived, new NullProgressMonitor());
-	}
-
-	public void ensureParentExists(IFile file) throws CoreException {
-		if (!file.exists()) {
-			ensureExists(file.getParent());
-		}
-
-	}
-
-	public StringInputStream getInputStream(String contentsAsString, String encoding) {
-		try {
-			return new StringInputStream(contentsAsString, encoding);
-		} catch (UnsupportedEncodingException e) {
-			throw new RuntimeIOException(e);
-		}
-	}
-
-	protected void ensureExists(IContainer container) throws CoreException {
-		if (container.exists())
-			return;
-		if (container instanceof IFolder) {
-			ensureExists(container.getParent());
-			((IFolder) container).create(true, true, new NullProgressMonitor());
-		}
-	}
-
-	@Override
-	public void setOutputPath(String outputName, String path) {
-		super.setOutputPath(outputName, path);
-		boolean isTargetProject = trySetTargetProject(outputName, path);
-		// otherwise java classpath extension will fail, MSG?
-		IProject project = getProject();
-		if (!isTargetProject && isValidProject(project)) {
-			if (hasJavaNature(project) && hasClasspath(project)) {
-				new ClasspathChanger().addFolderToClassPath(project, path);
-			}
-		}
-	}
-
-	protected IProject getProject() {
-		return project;
-	}
-
-	protected boolean trySetTargetProject(String outputName, String path) {
-		if (outputName.equals(OUTLET_FEATURE_TARGET_PROJECT)) {
-			IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject(path);
-			if (!project.exists()) {
-				createProject(project);
-			}
-			setProject(project);
-			return true;
-		}
-		return false;
-	}
-
-	protected void setProject(IProject project) {
-		this.project = project;
-	}
-
-	protected boolean isValidProject(IProject project) {
-		return project != null && project.exists();
-	}
-
-	public boolean hasJavaNature(IProject project) {
-		try {
-			String[] natures = project.getDescription().getNatureIds();
-			for (String s : natures) {
-				if (s.equals(JavaCore.NATURE_ID))
-					return true;
-			}
-		} catch (CoreException e1) {
-			e1.printStackTrace();
-		}
-		return false;
-	}
-
-	public boolean hasClasspath(IProject project) {
-		return project.getFile(".classpath").exists();
-	}
-
-	/**
-	 * The default implementation only creates a new default project. Clients
-	 * may override if they want to contribute generator specific project setup
-	 */
-	protected void createProject(IProject project) {
-		if (!project.exists()) {
-			try {
-				NullProgressMonitor monitor = new NullProgressMonitor();
-				project.create(monitor);
-				project.open(monitor);
-			} catch (CoreException e) {
-				e.printStackTrace();
-			}
-		}
-	}
-
-	public void generateFile(String fileName, String outputName, CharSequence contents) {
-
-		OutputConfiguration outputConfig = getOutputConfig(outputName);
-
-		IContainer container = getContainer(outputConfig, getProject());
-
-		if (container == null || !container.exists()) {
-			if (outputConfig.isCreateOutputDirectory()) {
-				createContainer(container);
-
-			} else {
-				return;
-			}
-		}
-
-		IFile file = getFile(fileName, getOutputConfig(outputName), getProject());
-		CharSequence postProcessedContent = postProcess(fileName, outputName, contents);
-		String contentsAsString = postProcessedContent.toString();
-		if (file.exists()) {
-			if (outputConfig.isOverrideExistingResources()) {
-				try {
-					StringInputStream newContent = getInputStream(contentsAsString, getEncoding(file));
-					if (hasContentsChanged(file, newContent)) {
-						newContent.reset();
-						file.setContents(newContent, true, true, null);
-						if (file.isDerived() != outputConfig.isSetDerivedProperty()) {
-							setDerived(file, outputConfig.isSetDerivedProperty());
-						}
-					}
-				} catch (CoreException e) {
-					throw new RuntimeException(e);
-				}
-			}
-		} else {
-			try {
-				ensureParentExists(file);
-				file.create(getInputStream(contentsAsString, getEncoding(file)), true, null);
-				if (outputConfig.isSetDerivedProperty()) {
-					setDerived(file, true);
-				}
-			} catch (CoreException e) {
-				throw new RuntimeException(e);
-			}
-		}
-	}
-
-	@Override
-	public IFileSystemAccess getIFileSystemAccess() {
-		return this;
-	}
-
-	@Override
-	public void afterGeneration() {
-		IProject project = getProject();
-		if (isValidProject(project)) {
-			try {
-				project.refreshLocal(IProject.DEPTH_INFINITE, new NullProgressMonitor());
-			} catch (CoreException e) {
-				e.printStackTrace();
-			}
-		}
-	}
-
-	@Override
-	public URI getURI(String path) {
-		URI uri = super.getURI(path);
-		if (uri == null) {
-			IFile file = ResourcesPlugin.getWorkspace().getRoot().getFile(Path.fromPortableString(path));
-			if (file != null) {
-				uri = URI.createFileURI(file.getLocationURI().getPath());
-			}
-		}
-		return uri;
-	}
-
-	@Override
-	public void generateFile(String fileName, String outputCfgName, InputStream content) throws RuntimeIOException {
-		throw new UnsupportedOperationException();
-	}
-
-	@Override
-	public InputStream readBinaryFile(String fileName, String outputCfgName) throws RuntimeIOException {
-		throw new UnsupportedOperationException();
-	}
-
-	@Override
-	public CharSequence readTextFile(String fileName, String outputCfgName) throws RuntimeIOException {
-		throw new UnsupportedOperationException();
-	}
-
-	@Override
-	public URI getURI(String path, String outputConfiguration) {
-		OutputConfiguration outputConfig = getOutputConfig(outputConfiguration);
-		String outputDir = outputConfig.getOutputDirectory();
-		if (isRootPath(outputDir) && isRootPath(path)) {
-			return URI.createFileURI(getProject().getLocationURI().getPath());
-		}
-		IFile file = getProject().getFile(outputDir + File.separator + path);
-		if (file != null) {
-			return URI.createFileURI(file.getLocationURI().getPath());
-		}
-		return super.getURI(path);
-	}
-}

+ 42 - 0
plugins/org.yakindu.sct.generator.builder/src/org/yakindu/sct/generator/builder/efs/SCTEclipseResourceFileSystemAccess.java

@@ -0,0 +1,42 @@
+/** 
+ * Copyright (c) 2015 committers of YAKINDU and others. 
+ * All rights reserved. This program and the accompanying materials 
+ * are made available under the terms of the Eclipse Public License v1.0 
+ * which accompanies this distribution, and is available at 
+ * http://www.eclipse.org/legal/epl-v10.html 
+ * Contributors:
+ * committers of YAKINDU - initial API and implementation
+ *
+*/
+package org.yakindu.sct.generator.builder.efs;
+
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IWorkspace;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.xtext.builder.EclipseResourceFileSystemAccess2;
+import org.yakindu.sct.generator.core.filesystem.ISCTFileSystemAccess;
+
+import com.google.inject.Inject;
+import com.google.inject.Singleton;
+
+/**
+ * 
+ * @author Johannes Dicks - Initial contribution and API
+ * 
+ */
+@Singleton
+public class SCTEclipseResourceFileSystemAccess extends EclipseResourceFileSystemAccess2 implements ISCTFileSystemAccess {
+
+	@Inject
+	private IWorkspace ws;
+
+	public SCTEclipseResourceFileSystemAccess() {
+		setMonitor(new NullProgressMonitor());
+	}
+
+	public void setContext(String projectName) {
+		IProject project = ws.getRoot().getProject(projectName);
+		super.setProject(project);
+	}
+
+}

+ 3 - 3
plugins/org.yakindu.sct.generator.c/src/org/yakindu/sct/generator/c/CCodeGenerator.java

@@ -12,13 +12,13 @@
  */
  */
 package org.yakindu.sct.generator.c;
 package org.yakindu.sct.generator.c;
 
 
-import org.yakindu.sct.domain.generic.modules.GenericSequencerModule;
 import org.yakindu.sct.generator.c.features.ICFeatureConstants;
 import org.yakindu.sct.generator.c.features.ICFeatureConstants;
 import org.yakindu.sct.generator.c.types.CTypeSystemAccess;
 import org.yakindu.sct.generator.c.types.CTypeSystemAccess;
 import org.yakindu.sct.generator.core.impl.AbstractSExecModelGenerator;
 import org.yakindu.sct.generator.core.impl.AbstractSExecModelGenerator;
 import org.yakindu.sct.generator.core.types.ICodegenTypeSystemAccess;
 import org.yakindu.sct.generator.core.types.ICodegenTypeSystemAccess;
 import org.yakindu.sct.model.sexec.ExecutionFlow;
 import org.yakindu.sct.model.sexec.ExecutionFlow;
 import org.yakindu.sct.model.sexec.naming.INamingService;
 import org.yakindu.sct.model.sexec.naming.INamingService;
+import org.yakindu.sct.model.sexec.transformation.IModelSequencer;
 import org.yakindu.sct.model.sgen.FeatureConfiguration;
 import org.yakindu.sct.model.sgen.FeatureConfiguration;
 import org.yakindu.sct.model.sgen.GeneratorEntry;
 import org.yakindu.sct.model.sgen.GeneratorEntry;
 import org.yakindu.sct.model.sgraph.Statechart;
 import org.yakindu.sct.model.sgraph.Statechart;
@@ -63,7 +63,7 @@ public class CCodeGenerator extends AbstractSExecModelGenerator {
 		if (coreFeatureHelper.isDumpSexec(entry)) {
 		if (coreFeatureHelper.isDumpSexec(entry)) {
 			dumpSexec(entry, flow);
 			dumpSexec(entry, flow);
 		}
 		}
-		delegate.generate(flow, entry, sctFsa.getIFileSystemAccess(), artifactConfigs);
+		delegate.generate(flow, entry, sctFsa, artifactConfigs);
 	}
 	}
 
 
 	@Override
 	@Override
@@ -98,7 +98,7 @@ public class CCodeGenerator extends AbstractSExecModelGenerator {
 								&& tracingFeatureConfiguration
 								&& tracingFeatureConfiguration
 										.getParameterValue(ICFeatureConstants.PARAMETER_TRACING_EXIT_STATE)
 										.getParameterValue(ICFeatureConstants.PARAMETER_TRACING_EXIT_STATE)
 										.getBooleanValue() == true))) {
 										.getBooleanValue() == true))) {
-					binder.bind(Boolean.class).annotatedWith(Names.named(GenericSequencerModule.ADD_TRACES))
+					binder.bind(Boolean.class).annotatedWith(Names.named(IModelSequencer.ADD_TRACES))
 							.toInstance(Boolean.TRUE);
 							.toInstance(Boolean.TRUE);
 				}
 				}
 			}
 			}

+ 12 - 2
plugins/org.yakindu.sct.generator.c/src/org/yakindu/sct/generator/c/GenArtifactConfigurations.java

@@ -124,16 +124,26 @@ public class GenArtifactConfigurations implements IGenArtifactConfigurations {
 		
 		
 		Path targetPath = new Path(target);
 		Path targetPath = new Path(target);
 		if (targetPath.isAbsolute()) {
 		if (targetPath.isAbsolute()) {
-			return relativePath(target, baseUri.toFileString());
+			return relativePath(target, relative(baseUri));
 		}
 		}
 		
 		
 		URI absUri = getURI(target);
 		URI absUri = getURI(target);
 		if (absUri != null) {
 		if (absUri != null) {
-			return relativePath(absUri.toFileString(), baseUri.toFileString());
+			return relativePath(relative(absUri), relative(baseUri));
 		}
 		}
 		throw new IllegalArgumentException(MessageFormat.format(MSG_LOCATION_NOT_FOUND, target));
 		throw new IllegalArgumentException(MessageFormat.format(MSG_LOCATION_NOT_FOUND, target));
 	}
 	}
 	
 	
+	protected String relative(URI uri){
+		if(uri.isFile()){
+			return uri.toFileString();
+		}
+		else if(uri.isPlatform()){
+			return uri.toPlatformString(true);
+		}
+		throw new IllegalArgumentException("Unknown URI " + uri);
+	}
+	
 	protected String relativePath(String to, String from) {
 	protected String relativePath(String to, String from) {
 		IPath basePath = new Path(from);
 		IPath basePath = new Path(from);
 		IPath toPath = new Path(to);
 		IPath toPath = new Path(to);

+ 1 - 0
plugins/org.yakindu.sct.generator.core/META-INF/MANIFEST.MF

@@ -17,6 +17,7 @@ Require-Bundle: org.yakindu.sct.model.sexec;visibility:=reexport,
 Bundle-RequiredExecutionEnvironment: JavaSE-1.7
 Bundle-RequiredExecutionEnvironment: JavaSE-1.7
 Bundle-ActivationPolicy: lazy
 Bundle-ActivationPolicy: lazy
 Export-Package: org.yakindu.sct.generator.core,
 Export-Package: org.yakindu.sct.generator.core,
+ org.yakindu.sct.generator.core.console,
  org.yakindu.sct.generator.core.execution,
  org.yakindu.sct.generator.core.execution,
  org.yakindu.sct.generator.core.extensions,
  org.yakindu.sct.generator.core.extensions,
  org.yakindu.sct.generator.core.filesystem,
  org.yakindu.sct.generator.core.filesystem,

+ 0 - 1
plugins/org.yakindu.sct.generator.core/src/org/yakindu/sct/generator/core/ISGraphGenerator.java

@@ -20,7 +20,6 @@ import org.yakindu.sct.model.sgraph.Statechart;
  * @author andreas muelder - Initial contribution and API
  * @author andreas muelder - Initial contribution and API
  * 
  * 
  */
  */
-
 public interface ISGraphGenerator {
 public interface ISGraphGenerator {
 
 
 	void generate(Statechart statechart, GeneratorEntry entry, IFileSystemAccess fsa);
 	void generate(Statechart statechart, GeneratorEntry entry, IFileSystemAccess fsa);

+ 50 - 0
plugins/org.yakindu.sct.generator.core/src/org/yakindu/sct/generator/core/console/IConsoleLogger.java

@@ -0,0 +1,50 @@
+/** 
+ * Copyright (c) 2016 committers of YAKINDU and others. 
+ * All rights reserved. This program and the accompanying materials 
+ * are made available under the terms of the Eclipse Public License v1.0 
+ * which accompanies this distribution, and is available at 
+ * http://www.eclipse.org/legal/epl-v10.html 
+ * Contributors:
+ * committers of YAKINDU - initial API and implementation
+ *
+*/
+package org.yakindu.sct.generator.core.console;
+
+import org.yakindu.sct.generator.core.console.IConsoleLogger.DefaultConsoleLogger;
+
+import com.google.inject.ImplementedBy;
+
+/**
+ * 
+ * @author andreas muelder - Initial contribution and API
+ * 
+ */
+@ImplementedBy(DefaultConsoleLogger.class)
+public interface IConsoleLogger {
+
+	void logError(Throwable t);
+
+	void log(String line);
+
+	void close();
+
+	public class DefaultConsoleLogger implements IConsoleLogger {
+
+		@Override
+		public void logError(Throwable t) {
+			System.err.println(t);
+		}
+
+		@Override
+		public void log(String line) {
+			System.out.println(line);
+		}
+
+		@Override
+		public void close() {
+			// Nothing to do
+		}
+
+	}
+
+}

+ 22 - 13
plugins/org.yakindu.sct.generator.core/src/org/yakindu/sct/generator/core/execution/GeneratorExecutor.java

@@ -1,5 +1,5 @@
 /**
 /**
- * Copyright (c) 2016 committers of YAKINDU and others.
+ * Copyright (c) 2011 committers of YAKINDU and others.
  * All rights reserved. This program and the accompanying materials
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
  * which accompanies this distribution, and is available at
@@ -16,7 +16,7 @@ import org.eclipse.emf.ecore.util.EcoreUtil;
 import org.yakindu.base.types.typesystem.AbstractTypeSystem;
 import org.yakindu.base.types.typesystem.AbstractTypeSystem;
 import org.yakindu.base.types.typesystem.ITypeSystem;
 import org.yakindu.base.types.typesystem.ITypeSystem;
 import org.yakindu.sct.domain.extension.DomainRegistry;
 import org.yakindu.sct.domain.extension.DomainRegistry;
-import org.yakindu.sct.domain.extension.IDomainDescriptor;
+import org.yakindu.sct.domain.extension.IDomain;
 import org.yakindu.sct.generator.core.ISCTGenerator;
 import org.yakindu.sct.generator.core.ISCTGenerator;
 import org.yakindu.sct.generator.core.extensions.GeneratorExtensions;
 import org.yakindu.sct.generator.core.extensions.GeneratorExtensions;
 import org.yakindu.sct.generator.core.extensions.IGeneratorDescriptor;
 import org.yakindu.sct.generator.core.extensions.IGeneratorDescriptor;
@@ -24,28 +24,36 @@ import org.yakindu.sct.generator.core.impl.AbstractSGraphModelGenerator;
 import org.yakindu.sct.model.sgen.GeneratorEntry;
 import org.yakindu.sct.model.sgen.GeneratorEntry;
 import org.yakindu.sct.model.sgen.GeneratorModel;
 import org.yakindu.sct.model.sgen.GeneratorModel;
 
 
+import com.google.inject.Binder;
 import com.google.inject.Injector;
 import com.google.inject.Injector;
 import com.google.inject.Module;
 import com.google.inject.Module;
+import com.google.inject.util.Modules;
 
 
 /**
 /**
  * 
  * 
  * @author andreas muelder - Initial contribution and API
  * @author andreas muelder - Initial contribution and API
  * @author holger willebrandt - refactoring
  * @author holger willebrandt - refactoring
- * @author markus mühlbrandt - added executeGenerator for generator models
+ * @author markus muehlbrandt - added executeGenerator for generator models
  */
  */
 public class GeneratorExecutor {
 public class GeneratorExecutor {
 
 
-	public void executeGenerator(GeneratorModel model) {
-
+	public void executeGenerator(GeneratorModel model, Module overrides) {
 		final EList<GeneratorEntry> entries = model.getEntries();
 		final EList<GeneratorEntry> entries = model.getEntries();
-
 		for (GeneratorEntry generatorEntry : entries) {
 		for (GeneratorEntry generatorEntry : entries) {
-			final ISCTGenerator generator = getGenerator(model, generatorEntry);
+			final ISCTGenerator generator = getGenerator(model, generatorEntry, overrides);
 			generator.generate(generatorEntry);
 			generator.generate(generatorEntry);
 		}
 		}
 	}
 	}
+	
+	public void executeGenerator(GeneratorModel model) {
+		executeGenerator(model, new Module() {
+			@Override
+			public void configure(Binder binder) {
+			}
+		});
+	}
 
 
-	protected ISCTGenerator getGenerator(GeneratorModel model, GeneratorEntry entry) {
+	protected ISCTGenerator getGenerator(GeneratorModel model, GeneratorEntry entry, Module overrides) {
 		String generatorId = model.getGeneratorId();
 		String generatorId = model.getGeneratorId();
 		IGeneratorDescriptor description = GeneratorExtensions.getGeneratorDescriptor(generatorId);
 		IGeneratorDescriptor description = GeneratorExtensions.getGeneratorDescriptor(generatorId);
 		if (description == null)
 		if (description == null)
@@ -53,13 +61,13 @@ public class GeneratorExecutor {
 		final ISCTGenerator generator = description.createGenerator();
 		final ISCTGenerator generator = description.createGenerator();
 		if (generator == null)
 		if (generator == null)
 			throw new RuntimeException("Failed to create Generator instance for ID:" + generatorId);
 			throw new RuntimeException("Failed to create Generator instance for ID:" + generatorId);
-		IDomainDescriptor domainDescriptor = DomainRegistry.getDomainDescriptor(entry.getElementRef());
-		Module overridesModule = null;
+		IDomain domain = DomainRegistry.getDomain(entry.getElementRef());
+		Module overridesModule = overrides;
 		if (generator instanceof AbstractSGraphModelGenerator) {
 		if (generator instanceof AbstractSGraphModelGenerator) {
-			overridesModule = ((AbstractSGraphModelGenerator) generator).getOverridesModule(entry);
+			overridesModule = Modules.combine(overridesModule,
+					((AbstractSGraphModelGenerator) generator).getOverridesModule(entry));
 		}
 		}
-		Injector injector = domainDescriptor.getDomainInjectorProvider().getGeneratorInjector(model.getGeneratorId(),
-				overridesModule);
+		Injector injector = domain.getInjector(IDomain.FEATURE_GENERATOR, overridesModule, model.getGeneratorId());
 		injector.injectMembers(generator);
 		injector.injectMembers(generator);
 
 
 		// TODO: refactor location for adding type system resource.
 		// TODO: refactor location for adding type system resource.
@@ -72,4 +80,5 @@ public class GeneratorExecutor {
 
 
 		return generator;
 		return generator;
 	}
 	}
+
 }
 }

+ 14 - 31
plugins/org.yakindu.sct.generator.core/src/org/yakindu/sct/generator/core/filesystem/ISCTFileSystemAccess.java

@@ -13,38 +13,30 @@ package org.yakindu.sct.generator.core.filesystem;
 
 
 import java.util.Map;
 import java.util.Map;
 
 
-import org.eclipse.emf.common.util.URI;
 import org.eclipse.xtext.generator.IFileSystemAccess;
 import org.eclipse.xtext.generator.IFileSystemAccess;
+import org.eclipse.xtext.generator.IFileSystemAccessExtension2;
 import org.eclipse.xtext.generator.OutputConfiguration;
 import org.eclipse.xtext.generator.OutputConfiguration;
 
 
+import com.google.inject.ImplementedBy;
+
 /**
 /**
- * Is meant to be some kind of bridge between file system
- * mappings within SCT (SGEN) & the xtext.generator.IFileSystemAccess.
+ * Is meant to be some kind of bridge between file system mappings within SCT
+ * (SGEN) & the xtext.generator.IFileSystemAccess.
  *
  *
- * The SCT M2T generators use the minimal functionality provided by the
- * basic interface xtext.generator.IFileSystemAccess during transformation.
+ * The SCT M2T generators use the minimal functionality provided by the basic
+ * interface xtext.generator.IFileSystemAccess during transformation.
  * 
  * 
  * @see {@link org.eclipse.xtext.generator.IFileSystemAccess}
  * @see {@link org.eclipse.xtext.generator.IFileSystemAccess}
  * 
  * 
  * @author Johannes Dicks - Initial contribution and API
  * @author Johannes Dicks - Initial contribution and API
  *
  *
  */
  */
-public interface ISCTFileSystemAccess {
-	
+@ImplementedBy(SCTJavaIoFileSystemAccess.class)
+public interface ISCTFileSystemAccess extends IFileSystemAccess, IFileSystemAccessExtension2{
+
 	String TARGET_FOLDER_OUTPUT = IFileSystemAccess.DEFAULT_OUTPUT;
 	String TARGET_FOLDER_OUTPUT = IFileSystemAccess.DEFAULT_OUTPUT;
 	String LIBRARY_TARGET_FOLDER_OUTPUT = "LIBRARY_TARGET_FOLDER";
 	String LIBRARY_TARGET_FOLDER_OUTPUT = "LIBRARY_TARGET_FOLDER";
 	String API_TARGET_FOLDER_OUTPUT = "API_TARGET_FOLDER";
 	String API_TARGET_FOLDER_OUTPUT = "API_TARGET_FOLDER";
-	
-	
-	/**
-	 * Provides an absolute URI for further processing.
-	 * 
-	 * @param string
-	 * @return
-	 */
-	URI getURI(String path);
-	
-	URI getURI(String path, String outputName);
 
 
 	/**
 	/**
 	 * Add an output path for an output name.
 	 * Add an output path for an output name.
@@ -53,7 +45,7 @@ public interface ISCTFileSystemAccess {
 	 * @param stringValue
 	 * @param stringValue
 	 */
 	 */
 	void setOutputPath(String outputName, String relativePath);
 	void setOutputPath(String outputName, String relativePath);
-	
+
 	/**
 	/**
 	 * Set the default output path.
 	 * Set the default output path.
 	 * 
 	 * 
@@ -61,19 +53,10 @@ public interface ISCTFileSystemAccess {
 	 * @see IFileSystemAccess#DEFAULT_OUTPUT
 	 * @see IFileSystemAccess#DEFAULT_OUTPUT
 	 */
 	 */
 	void setOutputPath(String relativePath);
 	void setOutputPath(String relativePath);
+
+	Map<String, OutputConfiguration> getOutputConfigurations();
 	
 	
+	public void setContext(String projectName);
 	
 	
-	Map<String, OutputConfiguration> getOutputConfigurations();
-	/**
-	 * For convenience... and compatibility reasons, might be removed in further
-	 * versions
-	 * @return
-	 */
-	IFileSystemAccess getIFileSystemAccess();
-
-	/**
-	 * A hook to execute actions after generation.
-	 */
-	void afterGeneration();
 
 
 }
 }

+ 7 - 0
plugins/org.yakindu.sct.generator.core/src/org/yakindu/sct/generator/core/filesystem/ISCTWorkspaceAccess.java

@@ -29,6 +29,8 @@ public interface ISCTWorkspaceAccess {
 
 
 	boolean fileExists(String projectName, String folderPath);
 	boolean fileExists(String projectName, String folderPath);
 
 
+	void refreshProject(String projectName);
+
 	/**
 	/**
 	 *
 	 *
 	 * @author Andreas Mülder - Initial contribution and API
 	 * @author Andreas Mülder - Initial contribution and API
@@ -56,5 +58,10 @@ public interface ISCTWorkspaceAccess {
 			return true;
 			return true;
 		}
 		}
 
 
+		@Override
+		public void refreshProject(String projectName) {
+			// Nothing to do
+		}
+
 	}
 	}
 }
 }

+ 50 - 0
plugins/org.yakindu.sct.generator.core/src/org/yakindu/sct/generator/core/filesystem/SCTJavaIoFileSystemAccess.java

@@ -0,0 +1,50 @@
+/**
+ * Copyright (c) 2016 committers of YAKINDU and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * 		committers of YAKINDU - initial API and implementation
+ * 
+ */
+package org.yakindu.sct.generator.core.filesystem;
+
+import java.io.File;
+
+import org.eclipse.xtext.generator.JavaIoFileSystemAccess;
+import org.eclipse.xtext.util.RuntimeIOException;
+import org.yakindu.sct.generator.core.filesystem.ISCTFileSystemAccess;
+
+import com.google.inject.Inject;
+import com.google.inject.name.Named;
+
+/**
+ * @author Johannes Dicks - Initial contribution and API
+ *
+ */
+public class SCTJavaIoFileSystemAccess extends JavaIoFileSystemAccess implements ISCTFileSystemAccess {
+
+public static final String BASE_DIR = "filesystemAccess.absolute.baseDir";
+	
+	@Inject
+	@Named(BASE_DIR)
+	protected String absoluteBaseDir;
+
+	public void setContext(String projectName) {
+		// Nothing to do
+	}
+
+	@Override
+	public void setOutputPath(String outputName, String path) {
+		super.setOutputPath(outputName, absoluteBaseDir + File.separator + path);
+	}
+	@Override
+	public void generateFile(String fileName, String outputConfigName, CharSequence contents)
+			throws RuntimeIOException {
+		File file = getFile(fileName, outputConfigName);
+		System.out.println("generting to " + file.getAbsoluteFile().toPath());
+		super.generateFile(fileName, outputConfigName, contents);
+	}
+}

+ 1 - 1
plugins/org.yakindu.sct.generator.core/src/org/yakindu/sct/generator/core/impl/AbstractSExecModelGenerator.java

@@ -69,7 +69,7 @@ public abstract class AbstractSExecModelGenerator extends AbstractSGraphModelGen
 	protected void runGenerator(Statechart statechart, GeneratorEntry entry) {
 	protected void runGenerator(Statechart statechart, GeneratorEntry entry) {
 		if (this instanceof IExecutionFlowGenerator) {
 		if (this instanceof IExecutionFlowGenerator) {
 			IExecutionFlowGenerator flowGenerator = (IExecutionFlowGenerator) this;
 			IExecutionFlowGenerator flowGenerator = (IExecutionFlowGenerator) this;
-			flowGenerator.generate(createExecutionFlow(statechart, entry), entry, sctFsa.getIFileSystemAccess());
+			flowGenerator.generate(createExecutionFlow(statechart, entry), entry, sctFsa);
 		}
 		}
 		super.runGenerator(statechart, entry);
 		super.runGenerator(statechart, entry);
 	}
 	}

+ 14 - 14
plugins/org.yakindu.sct.generator.core/src/org/yakindu/sct/generator/core/impl/AbstractSGraphModelGenerator.java

@@ -20,7 +20,9 @@ import org.eclipse.xtext.generator.IFileSystemAccess;
 import org.eclipse.xtext.generator.OutputConfiguration;
 import org.eclipse.xtext.generator.OutputConfiguration;
 import org.yakindu.sct.generator.core.ISCTGenerator;
 import org.yakindu.sct.generator.core.ISCTGenerator;
 import org.yakindu.sct.generator.core.ISGraphGenerator;
 import org.yakindu.sct.generator.core.ISGraphGenerator;
+import org.yakindu.sct.generator.core.console.IConsoleLogger;
 import org.yakindu.sct.generator.core.filesystem.ISCTFileSystemAccess;
 import org.yakindu.sct.generator.core.filesystem.ISCTFileSystemAccess;
+import org.yakindu.sct.generator.core.filesystem.ISCTWorkspaceAccess;
 import org.yakindu.sct.generator.core.library.ICoreLibraryHelper;
 import org.yakindu.sct.generator.core.library.ICoreLibraryHelper;
 import org.yakindu.sct.model.sexec.ExecutionFlow;
 import org.yakindu.sct.model.sexec.ExecutionFlow;
 import org.yakindu.sct.model.sgen.FeatureParameterValue;
 import org.yakindu.sct.model.sgen.FeatureParameterValue;
@@ -43,16 +45,18 @@ import com.google.inject.util.Modules;
 public abstract class AbstractSGraphModelGenerator implements ISCTGenerator {
 public abstract class AbstractSGraphModelGenerator implements ISCTGenerator {
 
 
 	@Inject
 	@Inject
-	protected IGeneratorLog log;
+	protected IConsoleLogger log;
 	@Inject
 	@Inject
 	protected ICoreLibraryHelper coreFeatureHelper;
 	protected ICoreLibraryHelper coreFeatureHelper;
 	@Inject
 	@Inject
 	protected ISCTFileSystemAccess sctFsa;
 	protected ISCTFileSystemAccess sctFsa;
+	@Inject
+	protected ISCTWorkspaceAccess wsAccess;
 
 
 	protected void runGenerator(Statechart statechart, GeneratorEntry entry) {
 	protected void runGenerator(Statechart statechart, GeneratorEntry entry) {
 		if (this instanceof ISGraphGenerator) {
 		if (this instanceof ISGraphGenerator) {
 			ISGraphGenerator graphGenerator = (ISGraphGenerator) this;
 			ISGraphGenerator graphGenerator = (ISGraphGenerator) this;
-			graphGenerator.generate(statechart, entry, sctFsa.getIFileSystemAccess());
+			graphGenerator.generate(statechart, entry, sctFsa);
 		}
 		}
 	}
 	}
 
 
@@ -80,9 +84,9 @@ public abstract class AbstractSGraphModelGenerator implements ISCTGenerator {
 				logStart(entry);
 				logStart(entry);
 				prepareGenerator(entry);
 				prepareGenerator(entry);
 				doGenerate(entry);
 				doGenerate(entry);
-				log.writeToConsole("Done.");
+				log.log("Done.");
 			} catch (Exception e) {
 			} catch (Exception e) {
-				log.writeToConsole(e);
+				log.logError(e);
 			} finally {
 			} finally {
 				finishGenerator(entry);
 				finishGenerator(entry);
 			}
 			}
@@ -96,8 +100,7 @@ public abstract class AbstractSGraphModelGenerator implements ISCTGenerator {
 	 */
 	 */
 	protected void logStart(GeneratorEntry entry) {
 	protected void logStart(GeneratorEntry entry) {
 		Statechart statechart = (Statechart) entry.getElementRef();
 		Statechart statechart = (Statechart) entry.getElementRef();
-		log.writeToConsole(
-				String.format("Generating %s %s ...", Statechart.class.getSimpleName(), statechart.getName()));
+		log.log(String.format("Generating %s %s ...", Statechart.class.getSimpleName(), statechart.getName()));
 	}
 	}
 
 
 	/**
 	/**
@@ -124,7 +127,7 @@ public abstract class AbstractSGraphModelGenerator implements ISCTGenerator {
 	protected boolean canHandle(GeneratorEntry entry) {
 	protected boolean canHandle(GeneratorEntry entry) {
 		EObject elementRef = entry.getElementRef();
 		EObject elementRef = entry.getElementRef();
 		if (elementRef == null || !(elementRef instanceof Statechart)) {
 		if (elementRef == null || !(elementRef instanceof Statechart)) {
-			log.writeToConsole("No Statechart selected in genmodel (" + entry + ")");
+			log.log("No Statechart selected in genmodel (" + entry + ")");
 			return false;
 			return false;
 		}
 		}
 		return true;
 		return true;
@@ -143,7 +146,7 @@ public abstract class AbstractSGraphModelGenerator implements ISCTGenerator {
 	 * case sub-classes will call super implementations.
 	 * case sub-classes will call super implementations.
 	 */
 	 */
 	protected void finishGenerator(GeneratorEntry entry) {
 	protected void finishGenerator(GeneratorEntry entry) {
-		sctFsa.afterGeneration();
+		wsAccess.refreshProject(coreFeatureHelper.getTargetProjectValue(entry).getStringValue());
 	}
 	}
 
 
 	/**
 	/**
@@ -185,8 +188,7 @@ public abstract class AbstractSGraphModelGenerator implements ISCTGenerator {
 	 * implementation.
 	 * implementation.
 	 */
 	 */
 	protected void initFileSystemAccess(GeneratorEntry entry) {
 	protected void initFileSystemAccess(GeneratorEntry entry) {
-
-		// set target project value, NECESSARY
+		sctFsa.setContext(coreFeatureHelper.getTargetProjectValue(entry).getStringValue());
 		initFsaTargetProject(entry);
 		initFsaTargetProject(entry);
 		initDefaultOutput(entry);
 		initDefaultOutput(entry);
 		initLibraryTargetFolder(entry);
 		initLibraryTargetFolder(entry);
@@ -196,8 +198,7 @@ public abstract class AbstractSGraphModelGenerator implements ISCTGenerator {
 	protected void initLibraryTargetFolder(GeneratorEntry entry) {
 	protected void initLibraryTargetFolder(GeneratorEntry entry) {
 		FeatureParameterValue libraryTargetFolderValue = coreFeatureHelper.getLibraryTargetFolderValue(entry);
 		FeatureParameterValue libraryTargetFolderValue = coreFeatureHelper.getLibraryTargetFolderValue(entry);
 		if (libraryTargetFolderValue != null) {
 		if (libraryTargetFolderValue != null) {
-			sctFsa.setOutputPath(LIBRARY_TARGET_FOLDER_OUTPUT,
-					libraryTargetFolderValue.getStringValue());
+			sctFsa.setOutputPath(LIBRARY_TARGET_FOLDER_OUTPUT, libraryTargetFolderValue.getStringValue());
 		}
 		}
 
 
 		OutputConfiguration librarytargetFolderOutputConfiguration = sctFsa.getOutputConfigurations()
 		OutputConfiguration librarytargetFolderOutputConfiguration = sctFsa.getOutputConfigurations()
@@ -214,8 +215,7 @@ public abstract class AbstractSGraphModelGenerator implements ISCTGenerator {
 	protected void initApiTargetFolder(GeneratorEntry entry) {
 	protected void initApiTargetFolder(GeneratorEntry entry) {
 		FeatureParameterValue apiTargetFolderValue = coreFeatureHelper.getApiTargetFolderValue(entry);
 		FeatureParameterValue apiTargetFolderValue = coreFeatureHelper.getApiTargetFolderValue(entry);
 		if (apiTargetFolderValue != null) {
 		if (apiTargetFolderValue != null) {
-			sctFsa.setOutputPath(API_TARGET_FOLDER_OUTPUT,
-					apiTargetFolderValue.getStringValue());
+			sctFsa.setOutputPath(API_TARGET_FOLDER_OUTPUT, apiTargetFolderValue.getStringValue());
 		}
 		}
 		OutputConfiguration apiTargetFolderOutputConfiguration = sctFsa.getOutputConfigurations()
 		OutputConfiguration apiTargetFolderOutputConfiguration = sctFsa.getOutputConfigurations()
 				.get(API_TARGET_FOLDER_OUTPUT);
 				.get(API_TARGET_FOLDER_OUTPUT);

+ 0 - 11
plugins/org.yakindu.sct.generator.core/src/org/yakindu/sct/generator/core/impl/IGeneratorLog.java

@@ -1,11 +0,0 @@
-package org.yakindu.sct.generator.core.impl;
-
-public interface IGeneratorLog {
-
-	void writeToConsole(Throwable t);
-
-	void writeToConsole(String line);
-
-	void close() throws Throwable;
-
-}

+ 1 - 1
plugins/org.yakindu.sct.generator.core/src/org/yakindu/sct/generator/core/library/AbstractDefaultFeatureValueProvider.java

@@ -82,4 +82,4 @@ public abstract class AbstractDefaultFeatureValueProvider implements IDefaultFea
 	protected IStatus warning(String msg) {
 	protected IStatus warning(String msg) {
 		return new Status(IStatus.WARNING, GeneratorActivator.PLUGIN_ID, msg);
 		return new Status(IStatus.WARNING, GeneratorActivator.PLUGIN_ID, msg);
 	}
 	}
-}
+}

+ 1 - 1
plugins/org.yakindu.sct.generator.cpp/src/org/yakindu/sct/generator/cpp/CppCodeGenerator.java

@@ -55,7 +55,7 @@ public class CppCodeGenerator extends AbstractSExecModelGenerator {
 		if (coreFeatureHelper.isDumpSexec(entry)) {
 		if (coreFeatureHelper.isDumpSexec(entry)) {
 			dumpSexec(entry, flow);
 			dumpSexec(entry, flow);
 		}
 		}
-		delegate.generate(flow, entry, sctFsa.getIFileSystemAccess(), artifactConfigs);
+		delegate.generate(flow, entry, sctFsa, artifactConfigs);
 	}
 	}
 
 
 	@Override
 	@Override

+ 1 - 1
plugins/org.yakindu.sct.generator.csharp/src/org/yakindu/sct/generator/csharp/CSharpCodeGenerator.java

@@ -33,7 +33,7 @@ public class CSharpCodeGenerator extends AbstractSExecModelGenerator {
 		if (coreFeatureHelper.isDumpSexec(entry)) {
 		if (coreFeatureHelper.isDumpSexec(entry)) {
 			dumpSexec(entry, flow);
 			dumpSexec(entry, flow);
 		}
 		}
-		delegate.generate(flow, entry, sctFsa.getIFileSystemAccess());
+		delegate.generate(flow, entry, sctFsa);
 	}
 	}
 
 
 	@Override
 	@Override

+ 15 - 0
plugins/org.yakindu.sct.generator.genmodel.ui/src/org/yakindu/sct/generator/genmodel/ui/ws/DefaultSCTWorkspaceAccess.java

@@ -1,7 +1,11 @@
 package org.yakindu.sct.generator.genmodel.ui.ws;
 package org.yakindu.sct.generator.genmodel.ui.ws;
 
 
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IResource;
 import org.eclipse.core.resources.ResourcesPlugin;
 import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.CoreException;
 import org.eclipse.core.runtime.IPath;
 import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.NullProgressMonitor;
 import org.eclipse.core.runtime.Path;
 import org.eclipse.core.runtime.Path;
 import org.yakindu.sct.generator.core.filesystem.ISCTWorkspaceAccess;
 import org.yakindu.sct.generator.core.filesystem.ISCTWorkspaceAccess;
 
 
@@ -41,4 +45,15 @@ public class DefaultSCTWorkspaceAccess implements ISCTWorkspaceAccess {
 		}
 		}
 	}
 	}
 
 
+	@Override
+	public void refreshProject(String projectName) {
+		try {
+			IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject(projectName);
+			if (project != null && project.isAccessible())
+				project.refreshLocal(IResource.DEPTH_INFINITE, new NullProgressMonitor());
+		} catch (CoreException e) {
+			throw new RuntimeException(e);
+		}
+	}
+
 }
 }

+ 1 - 1
plugins/org.yakindu.sct.generator.java/src/org/yakindu/sct/generator/java/JavaCodeGenerator.java

@@ -38,7 +38,7 @@ public class JavaCodeGenerator extends AbstractJavaCodeGenerator {
 			dumpSexec(entry, flow);
 			dumpSexec(entry, flow);
 		}
 		}
 
 
-		delegate.generate(flow, entry, sctFsa.getIFileSystemAccess());
+		delegate.generate(flow, entry, sctFsa);
 	}
 	}
 
 
 	@Override
 	@Override

+ 1 - 0
plugins/org.yakindu.sct.generator.runner/.gitignore

@@ -1 +1,2 @@
 /bin/
 /bin/
+/target/

+ 0 - 1
plugins/org.yakindu.sct.generator.runner/META-INF/MANIFEST.MF

@@ -10,7 +10,6 @@ Require-Bundle: org.eclipse.core.runtime,
  org.yakindu.sct.generator.genmodel,
  org.yakindu.sct.generator.genmodel,
  org.yakindu.sct.commons,
  org.yakindu.sct.commons,
  org.eclipse.jdt.core,
  org.eclipse.jdt.core,
- org.eclipse.core.resources,
  org.eclipse.emf.workspace
  org.eclipse.emf.workspace
 Bundle-RequiredExecutionEnvironment: JavaSE-1.7
 Bundle-RequiredExecutionEnvironment: JavaSE-1.7
 Bundle-ActivationPolicy: lazy
 Bundle-ActivationPolicy: lazy

+ 6 - 6
plugins/org.yakindu.sct.generator.runner/src/org/yakindu/sct/generator/runner/GenericJavaBasedGenerator.java

@@ -67,8 +67,8 @@ public class GenericJavaBasedGenerator extends AbstractSExecModelGenerator {
 				}
 				}
 			} catch (Exception e) {
 			} catch (Exception e) {
 				e.printStackTrace();
 				e.printStackTrace();
-				log.writeToConsole("Overriding module not found: " + overridingModuleClass);
-				log.writeToConsole(e);
+				log.log("Overriding module not found: " + overridingModuleClass);
+				log.logError(e);
 			}
 			}
 		}
 		}
 		return defaultModule;
 		return defaultModule;
@@ -104,19 +104,19 @@ public class GenericJavaBasedGenerator extends AbstractSExecModelGenerator {
 
 
 			if (delegate instanceof IExecutionFlowGenerator) {
 			if (delegate instanceof IExecutionFlowGenerator) {
 				IExecutionFlowGenerator flowGenerator = (IExecutionFlowGenerator) delegate;
 				IExecutionFlowGenerator flowGenerator = (IExecutionFlowGenerator) delegate;
-				flowGenerator.generate(flow, entry, sctFsa.getIFileSystemAccess());
+				flowGenerator.generate(flow, entry, sctFsa);
 			}
 			}
 			if (iType.isInstance(delegate)) {
 			if (iType.isInstance(delegate)) {
 				IExecutionFlowGenerator flowGenerator = (IExecutionFlowGenerator) delegate;
 				IExecutionFlowGenerator flowGenerator = (IExecutionFlowGenerator) delegate;
-				flowGenerator.generate(flow, entry, sctFsa.getIFileSystemAccess());
+				flowGenerator.generate(flow, entry, sctFsa);
 			}
 			}
 			if (delegate instanceof ISGraphGenerator) {
 			if (delegate instanceof ISGraphGenerator) {
 				ISGraphGenerator graphGenerator = (ISGraphGenerator) delegate;
 				ISGraphGenerator graphGenerator = (ISGraphGenerator) delegate;
-				graphGenerator.generate(statechart, entry, sctFsa.getIFileSystemAccess());
+				graphGenerator.generate(statechart, entry, sctFsa);
 			}
 			}
 		} catch (Exception e) {
 		} catch (Exception e) {
 			e.printStackTrace();
 			e.printStackTrace();
-			log.writeToConsole(e);
+			log.logError(e);
 		}
 		}
 	}
 	}
 
 

+ 1 - 1
plugins/org.yakindu.sct.generator.runner/src/org/yakindu/sct/generator/runner/lib/GenericJavaLibraryDefaultValueProvider.java

@@ -81,4 +81,4 @@ public class GenericJavaLibraryDefaultValueProvider extends AbstractDefaultFeatu
 	protected IProject getProject(EObject contextElement) {
 	protected IProject getProject(EObject contextElement) {
 		return WorkspaceSynchronizer.getFile(contextElement.eResource()).getProject();
 		return WorkspaceSynchronizer.getFile(contextElement.eResource()).getProject();
 	}
 	}
-}
+}

+ 1 - 0
plugins/org.yakindu.sct.generator.xpand/.gitignore

@@ -1 +1,2 @@
 /bin/
 /bin/
+/target/

+ 2 - 2
plugins/org.yakindu.sct.generator.xpand/src/org/yakindu/sct/generator/xpand/AbstractXpandBasedCodeGenerator.java

@@ -68,7 +68,7 @@ public abstract class AbstractXpandBasedCodeGenerator extends AbstractSExecModel
 
 
 		String templatePath = getTemplatePath();
 		String templatePath = getTemplatePath();
 
 
-		log.writeToConsole("Executing Template " + templatePath);
+		log.log("Executing Template " + templatePath);
 		XpandExecutionContext context = createXpandContext(entry, output);
 		XpandExecutionContext context = createXpandContext(entry, output);
 		XpandFacade facade = XpandFacade.create(context);
 		XpandFacade facade = XpandFacade.create(context);
 
 
@@ -92,7 +92,7 @@ public abstract class AbstractXpandBasedCodeGenerator extends AbstractSExecModel
 			facade.evaluate(templatePath, statechart, entry);
 			facade.evaluate(templatePath, statechart, entry);
 		}
 		}
 		if (!generatorFound) {
 		if (!generatorFound) {
-			log.writeToConsole("!!! No matching define in Template found.");
+			log.log("!!! No matching define in Template found.");
 		}
 		}
 
 
 	}
 	}

+ 7 - 4
plugins/org.yakindu.sct.model.resource/META-INF/MANIFEST.MF

@@ -8,11 +8,14 @@ Bundle-Activator: org.yakindu.sct.model.resource.Activator
 Require-Bundle: org.eclipse.ui,
 Require-Bundle: org.eclipse.ui,
  org.eclipse.core.runtime,
  org.eclipse.core.runtime,
  org.yakindu.sct.model.sgraph;visibility:=reexport,
  org.yakindu.sct.model.sgraph;visibility:=reexport,
- org.yakindu.sct.model.stext,
  org.eclipse.xtext.ui,
  org.eclipse.xtext.ui,
- org.yakindu.sct.model.stext.ui,
  org.yakindu.sct.domain,
  org.yakindu.sct.domain,
- org.eclipse.emf.ecore.xmi
+ org.eclipse.emf.ecore.xmi,
+ org.eclipse.xtext.ui.shared,
+ org.yakindu.sct.model.sgraph.ui,
+ org.yakindu.sct.model.stext.ui,
+ org.yakindu.sct.model.stext
 Bundle-RequiredExecutionEnvironment: JavaSE-1.7
 Bundle-RequiredExecutionEnvironment: JavaSE-1.7
 Bundle-ActivationPolicy: lazy
 Bundle-ActivationPolicy: lazy
-Export-Package: org.yakindu.sct.model.resource
+Export-Package: org.yakindu.sct.model.resource,
+ org.yakindu.sct.model.resource.validation

+ 2 - 1
plugins/org.yakindu.sct.model.resource/plugin.xml

@@ -11,11 +11,12 @@
       </parser>
       </parser>
    </extension>
    </extension>
 
 
-   <!-- Resource Provider -->
+   <!-- Resource Provider      -->
  <extension point="org.eclipse.xtext.extension_resourceServiceProvider">
  <extension point="org.eclipse.xtext.extension_resourceServiceProvider">
         <resourceServiceProvider
         <resourceServiceProvider
            class="org.yakindu.sct.model.resource.SCTExecutableExtensionFactory:org.eclipse.xtext.ui.resource.generic.EmfResourceUIServiceProvider"
            class="org.yakindu.sct.model.resource.SCTExecutableExtensionFactory:org.eclipse.xtext.ui.resource.generic.EmfResourceUIServiceProvider"
             uriExtension="sct">
             uriExtension="sct">
         </resourceServiceProvider>
         </resourceServiceProvider>
     </extension>
     </extension>
+
 </plugin>
 </plugin>

+ 45 - 6
plugins/org.yakindu.sct.model.resource/src/org/yakindu/sct/model/resource/SCTExecutableExtensionFactory.java

@@ -1,5 +1,5 @@
 /**
 /**
- * Copyright (c) 2015 committers of YAKINDU and others.
+ * Copyright (c) 2016 committers of YAKINDU and others.
  * All rights reserved. This program and the accompanying materials
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
  * which accompanies this distribution, and is available at
@@ -9,24 +9,63 @@
  */
  */
 package org.yakindu.sct.model.resource;
 package org.yakindu.sct.model.resource;
 
 
+import org.eclipse.xtext.Constants;
+import org.eclipse.xtext.naming.IQualifiedNameProvider;
+import org.eclipse.xtext.parser.IEncodingProvider;
+import org.eclipse.xtext.resource.IDefaultResourceDescriptionStrategy;
+import org.eclipse.xtext.ui.editor.validation.MarkerCreator;
 import org.eclipse.xtext.ui.guice.AbstractGuiceAwareExecutableExtensionFactory;
 import org.eclipse.xtext.ui.guice.AbstractGuiceAwareExecutableExtensionFactory;
+import org.eclipse.xtext.ui.label.DefaultDescriptionLabelProvider;
+import org.eclipse.xtext.ui.shared.SharedStateModule;
+import org.eclipse.xtext.ui.validation.MarkerTypeProvider;
+import org.eclipse.xtext.validation.IDiagnosticConverter;
+import org.eclipse.xtext.validation.IResourceValidator;
 import org.osgi.framework.Bundle;
 import org.osgi.framework.Bundle;
-import org.yakindu.sct.model.stext.ui.internal.STextActivator;
+import org.yakindu.sct.model.resource.validation.SCTResourceValidatorImpl;
+import org.yakindu.sct.model.sgraph.ui.validation.SCTDiagnosticConverterImpl;
+import org.yakindu.sct.model.sgraph.ui.validation.SCTMarkerCreator;
+import org.yakindu.sct.model.sgraph.ui.validation.SCTMarkerTypeProvider;
+import org.yakindu.sct.model.stext.naming.StextNameProvider;
 
 
+import com.google.inject.Binder;
+import com.google.inject.Guice;
 import com.google.inject.Injector;
 import com.google.inject.Injector;
+import com.google.inject.Module;
+import com.google.inject.name.Names;
 
 
+/**
+ * 
+ * @author andreas muelder - Initial contribution and API
+ * 
+ */
 public class SCTExecutableExtensionFactory extends AbstractGuiceAwareExecutableExtensionFactory {
 public class SCTExecutableExtensionFactory extends AbstractGuiceAwareExecutableExtensionFactory {
 
 
 	@Override
 	@Override
 	protected Bundle getBundle() {
 	protected Bundle getBundle() {
-		return STextActivator.getInstance().getBundle();
+		return Activator.getDefault().getBundle();
 	}
 	}
 
 
 	@Override
 	@Override
 	protected Injector getInjector() {
 	protected Injector getInjector() {
-		// TODO: Remove dependency to SText here, provide resourceProvider
-		// extension somewhere else....
-		return STextActivator.getInstance().getInjector(STextActivator.ORG_YAKINDU_SCT_MODEL_STEXT_STEXT);
+		// TODO: Provide a sharedDomainModule via DomainRegistry to allow
+		// overriding of generic bindings
+		return Guice.createInjector(new SharedStateModule(), new Module() {
+			@Override
+			public void configure(Binder binder) {
+				binder.bind(IResourceValidator.class).to(SCTResourceValidatorImpl.class);
+				binder.bind(String.class).annotatedWith(Names.named(Constants.FILE_EXTENSIONS)).toInstance("sct");
+				binder.bind(IEncodingProvider.class).to(IEncodingProvider.Runtime.class);
+				binder.bind(IQualifiedNameProvider.class).to(StextNameProvider.class);
+				binder.bind(org.eclipse.jface.viewers.ILabelProvider.class)
+						.annotatedWith(org.eclipse.xtext.ui.resource.ResourceServiceDescriptionLabelProvider.class)
+						.to(DefaultDescriptionLabelProvider.class);
+				binder.bind(IDefaultResourceDescriptionStrategy.class).to(SCTResourceDescriptionStrategy.class);
+				
+				binder.bind(MarkerCreator.class).to(SCTMarkerCreator.class);
+				binder.bind(MarkerTypeProvider.class).to(SCTMarkerTypeProvider.class);
+				binder.bind(IDiagnosticConverter.class).to(SCTDiagnosticConverterImpl.class);
+			}
+		});
 	}
 	}
 
 
 }
 }

+ 1 - 1
plugins/org.yakindu.sct.model.sgraph/src/org/yakindu/sct/model/sgraph/resource/provider/SCTResourceDescriptionStrategy.java

@@ -8,7 +8,7 @@
  * 	committers of YAKINDU - initial API and implementation
  * 	committers of YAKINDU - initial API and implementation
  * 
  * 
  */
  */
-package org.yakindu.sct.model.sgraph.resource.provider;
+package org.yakindu.sct.model.resource;
 
 
 import org.eclipse.emf.ecore.EObject;
 import org.eclipse.emf.ecore.EObject;
 import org.eclipse.emf.ecore.util.EcoreUtil;
 import org.eclipse.emf.ecore.util.EcoreUtil;

+ 5 - 5
plugins/org.yakindu.sct.model.resource/src/org/yakindu/sct/model/resource/SCTResourceFactory.java

@@ -18,7 +18,7 @@ import org.eclipse.emf.ecore.resource.impl.ResourceSetImpl;
 import org.eclipse.emf.ecore.xmi.impl.XMIResourceFactoryImpl;
 import org.eclipse.emf.ecore.xmi.impl.XMIResourceFactoryImpl;
 import org.eclipse.emf.ecore.xmi.impl.XMIResourceImpl;
 import org.eclipse.emf.ecore.xmi.impl.XMIResourceImpl;
 import org.yakindu.sct.domain.extension.DomainRegistry;
 import org.yakindu.sct.domain.extension.DomainRegistry;
-import org.yakindu.sct.domain.extension.IDomainDescriptor;
+import org.yakindu.sct.domain.extension.IDomain;
 
 
 import com.google.inject.Injector;
 import com.google.inject.Injector;
 
 
@@ -30,16 +30,16 @@ public class SCTResourceFactory extends XMIResourceFactoryImpl {
 	@Override
 	@Override
 	public Resource createResource(URI uri) {
 	public Resource createResource(URI uri) {
 
 
-		// if file is not existing, AND no generic/default domain is available, resource creation will fail
+		// if file is not existing, AND no generic/default domain is available,
+		// resource creation will fail
 		if (!URIConverter.INSTANCE.exists(uri, null)) {
 		if (!URIConverter.INSTANCE.exists(uri, null)) {
 			return new XMIResourceImpl(uri);
 			return new XMIResourceImpl(uri);
 		}
 		}
 
 
 		String determinedDomainID = DomainRegistry.determineDomainID(uri);
 		String determinedDomainID = DomainRegistry.determineDomainID(uri);
-		IDomainDescriptor domainDescriptor = DomainRegistry.getDomainDescriptor(determinedDomainID);
-		Injector injector = domainDescriptor.getDomainInjectorProvider().getResourceInjector();
+		IDomain domain = DomainRegistry.getDomain(determinedDomainID);
+		Injector injector = domain.getInjector(IDomain.FEATURE_RESOURCE);
 		Resource resource = injector.getInstance(Resource.class);
 		Resource resource = injector.getInstance(Resource.class);
-
 		ResourceSet set = new ResourceSetImpl();
 		ResourceSet set = new ResourceSetImpl();
 		set.getResources().add(resource);
 		set.getResources().add(resource);
 		resource.setURI(uri);
 		resource.setURI(uri);

+ 3 - 3
plugins/org.yakindu.sct.model.stext.ui/src/org/yakindu/sct/model/stext/ui/validation/SCTResourceValidatorImpl.java

@@ -8,16 +8,16 @@
  * 	committers of YAKINDU - initial API and implementation
  * 	committers of YAKINDU - initial API and implementation
  * 
  * 
  */
  */
-package org.yakindu.sct.model.stext.ui.validation;
+package org.yakindu.sct.model.resource.validation;
 
 
 import org.eclipse.emf.ecore.EObject;
 import org.eclipse.emf.ecore.EObject;
 import org.eclipse.emf.ecore.resource.Resource;
 import org.eclipse.emf.ecore.resource.Resource;
-import org.eclipse.gmf.runtime.notation.Diagram;
 import org.eclipse.xtext.util.CancelIndicator;
 import org.eclipse.xtext.util.CancelIndicator;
 import org.eclipse.xtext.util.IAcceptor;
 import org.eclipse.xtext.util.IAcceptor;
 import org.eclipse.xtext.validation.CheckMode;
 import org.eclipse.xtext.validation.CheckMode;
 import org.eclipse.xtext.validation.Issue;
 import org.eclipse.xtext.validation.Issue;
 import org.eclipse.xtext.validation.ResourceValidatorImpl;
 import org.eclipse.xtext.validation.ResourceValidatorImpl;
+import org.yakindu.sct.model.sgraph.Statechart;
 import org.yakindu.sct.model.sgraph.resource.AbstractSCTResource;
 import org.yakindu.sct.model.sgraph.resource.AbstractSCTResource;
 
 
 /**
 /**
@@ -38,7 +38,7 @@ public class SCTResourceValidatorImpl extends ResourceValidatorImpl {
 	protected void validate(Resource resource, final CheckMode mode, final CancelIndicator monitor,
 	protected void validate(Resource resource, final CheckMode mode, final CancelIndicator monitor,
 			IAcceptor<Issue> acceptor) {
 			IAcceptor<Issue> acceptor) {
 		for (EObject ele : resource.getContents()) {
 		for (EObject ele : resource.getContents()) {
-			if (ele instanceof Diagram) {
+			if (!(ele instanceof Statechart)) {
 				continue;
 				continue;
 			}
 			}
 			if (!monitor.isCanceled()) {
 			if (!monitor.isCanceled()) {

+ 5 - 0
plugins/org.yakindu.sct.model.sexec/src/org/yakindu/sct/model/sexec/transformation/IModelSequencer.java

@@ -14,7 +14,12 @@ import org.yakindu.base.types.validation.IValidationIssueAcceptor;
 import org.yakindu.sct.model.sexec.ExecutionFlow;
 import org.yakindu.sct.model.sexec.ExecutionFlow;
 import org.yakindu.sct.model.sgraph.Statechart;
 import org.yakindu.sct.model.sgraph.Statechart;
 
 
+import com.google.inject.ImplementedBy;
+
+@ImplementedBy(ModelSequencer.class)
 public interface IModelSequencer {
 public interface IModelSequencer {
+	
+	public static final String ADD_TRACES = "ADD_TRACES";
 
 
 	public ExecutionFlow transform(Statechart statechart, IValidationIssueAcceptor acceptor);
 	public ExecutionFlow transform(Statechart statechart, IValidationIssueAcceptor acceptor);
 	
 	

+ 3 - 3
plugins/org.yakindu.sct.model.sexec/src/org/yakindu/sct/model/sexec/transformation/SequenceBuilder.xtend

@@ -52,9 +52,9 @@ class SequenceBuilder {
 
 
 	@Inject extension ITypeValueProvider 
 	@Inject extension ITypeValueProvider 
 
 
-	@Inject
-	@Named("ADD_TRACES")
-	boolean _addTraceSteps
+	@Inject(optional=true)
+	@Named(IModelSequencer.ADD_TRACES)
+	boolean _addTraceSteps = false
 
 
 	static String DEFAULT_SEQUENCE_NAME = "default"
 	static String DEFAULT_SEQUENCE_NAME = "default"
 
 

+ 3 - 3
plugins/org.yakindu.sct.model.sexec/src/org/yakindu/sct/model/sexec/transformation/TraceExtensions.xtend

@@ -24,9 +24,9 @@ class TraceExtensions {
 	@Inject extension SexecExtensions sexec
 	@Inject extension SexecExtensions sexec
 	@Inject extension SexecElementMapping mapping
 	@Inject extension SexecElementMapping mapping
 
 
-	@Inject
-	@Named("ADD_TRACES") 
-	boolean _addTraceSteps
+	@Inject(optional = true)
+	@Named(IModelSequencer.ADD_TRACES) 
+	boolean _addTraceSteps = false
 	
 	
 	def isAddTraceSteps() {
 	def isAddTraceSteps() {
 		_addTraceSteps
 		_addTraceSteps

+ 2 - 2
plugins/org.yakindu.sct.model.sgraph.ui/META-INF/MANIFEST.MF

@@ -11,8 +11,8 @@ Require-Bundle: org.eclipse.ui,
  org.eclipse.xtext.ui,
  org.eclipse.xtext.ui,
  org.eclipse.xtext.ui.shared,
  org.eclipse.xtext.ui.shared,
  org.apache.commons.lang,
  org.apache.commons.lang,
- org.eclipse.gmf.runtime.emf.core
+ org.eclipse.gmf.runtime.emf.core,
+ org.eclipse.gmf.runtime.notation
 Bundle-RequiredExecutionEnvironment: JavaSE-1.7
 Bundle-RequiredExecutionEnvironment: JavaSE-1.7
 Export-Package: org.yakindu.sct.model.sgraph.ui,
 Export-Package: org.yakindu.sct.model.sgraph.ui,
- org.yakindu.sct.model.sgraph.ui.refactoring,
  org.yakindu.sct.model.sgraph.ui.validation
  org.yakindu.sct.model.sgraph.ui.validation

+ 0 - 0
plugins/org.yakindu.sct.model.sgraph.ui/src/org/yakindu/sct/model/sgraph/ui/labeling/SGraphLabelProvider.java


Некоторые файлы не были показаны из-за большого количества измененных файлов