@@ -0,0 +1,1368 @@
+package org.yakindu.sct.generator.core;%0A%0Aimport org.eclipse.core.resources.IWorkspaceRoot;%0Aimport org.eclipse.xtext.generator.JavaIoFileSystemAccess;%0Aimport org.yakindu.sct.model.sgen.GeneratorEntry;%0A%0Aimport com.google.inject.Inject;%0Aimport com.google.inject.Injector;%0A%0A/**%0A *  @author oliver bohl%0A * %0A */%0A%0Apublic abstract class AbstractSGenGenerator implements ISCTGenerator %7B%0A%09%0A%09@Inject protected IWorkspaceRoot root;%0A%09@Inject protected JavaIoFileSystemAccess fsa;%0A%09@Inject protected Injector injector;%0A%0A%09protected abstract void generateContent(GeneratorEntry entry,%0A%09%09%09JavaIoFileSystemAccess fsa, String targetProjectPath);%0A%0A%09public void generate(GeneratorEntry entry) %7B%0A%09%09// Does actually nothing%0A%09%09// generateInternal(entry);%0A%09%7D%0A%0A%0A%0A//%09private void generateInternal(GeneratorEntry entry) %7B%0A//%0A//%0A//%09%09 String targetProject = GeneratorUtils.getTargetProject(entry).toString();%0A//%09%09 targetProject = targetProject.substring(1);%0A//%09%09%0A//%09%09 IProject targetProjectRoot = root.getProject(targetProject);%0A//%09%09%0A//%09%09 if(targetProjectRoot.exists() && targetProjectRoot.isOpen())%7B%0A//%09%09 String targetFolder =%0A//%09%09 GeneratorUtils.getTargetFolder(entry).toString();%0A//%09%09 fsa.setOutputPath(IFileSystemAccess.DEFAULT_OUTPUT, targetFolder);%0A//%09%09%0A//%09%09 String targetProjectPath = targetProject.replaceAll(%22%5C%5C.%22, %22/%22);%0A//%09%09 generateContent(entry, fsa, targetProjectPath);%0A//%09%09 %7D%0A//%09%7D%0A%0A%7D%0A

Create abstract SGenGenerator for SCTUnit -extracted same code from Generators to AbstractSCTUnitGenerator