<commit_before>package org.yakindu.sct.generator.core;

import org.eclipse.core.resources.IWorkspaceRoot;
import org.eclipse.xtext.generator.JavaIoFileSystemAccess;
import org.yakindu.sct.model.sgen.GeneratorEntry;

import com.google.inject.Inject;
import com.google.inject.Injector;

/**
 *  @author <NAME>
 * 
 */

public abstract class AbstractSGenGenerator implements ISCTGenerator {
	
	@Inject protected IWorkspaceRoot root;
	@Inject protected JavaIoFileSystemAccess fsa;
	@Inject protected Injector injector;

	protected abstract void generateContent(GeneratorEntry entry,
			JavaIoFileSystemAccess fsa, String targetProjectPath);

	public void generate(GeneratorEntry entry) {
		// Does actually nothing
		// generateInternal(entry);
	}



//	private void generateInternal(GeneratorEntry entry) {
//
//
//		 String targetProject = GeneratorUtils.getTargetProject(entry).toString();
//		 targetProject = targetProject.substring(1);
//		
//		 IProject targetProjectRoot = root.getProject(targetProject);
//		
//		 if(targetProjectRoot.exists() && targetProjectRoot.isOpen()){
//		 String targetFolder =
//		 GeneratorUtils.getTargetFolder(entry).toString();
//		 fsa.setOutputPath(IFileSystemAccess.DEFAULT_OUTPUT, targetFolder);
//		
//		 String targetProjectPath = targetProject.replaceAll("\\.", "/");
//		 generateContent(entry, fsa, targetProjectPath);
//		 }
//	}

}<commit_msg>[YAKHMI-870] SCTUnit: Create abstract SGenGenerator for SCTUnit -added generated Code<commit_after>package org.yakindu.sct.generator.core;

import org.eclipse.core.resources.IWorkspaceRoot;
import org.eclipse.xtext.generator.JavaIoFileSystemAccess;
import org.yakindu.sct.model.sgen.GeneratorEntry;

import com.google.inject.Inject;
import com.google.inject.Injector;

/**
 *  @author <NAME>
 * 
 */

public abstract class AbstractSGenGenerator implements ISCTGenerator {
	
	@Inject protected IWorkspaceRoot root;
	@Inject protected JavaIoFileSystemAccess fsa;
	@Inject protected Injector injector;

	protected abstract void generateContent(GeneratorEntry entry,
			JavaIoFileSystemAccess fsa, String targetProjectPath);

	public void generate(GeneratorEntry entry) {
		// Does actually nothing
		// generateInternal(entry);
	} 



//	private void generateInternal(GeneratorEntry entry) {
//
//
//		 String targetProject = GeneratorUtils.getTargetProject(entry).toString();
//		 targetProject = targetProject.substring(1);
//		
//		 IProject targetProjectRoot = root.getProject(targetProject);
//		
//		 if(targetProjectRoot.exists() && targetProjectRoot.isOpen()){
//		 String targetFolder =
//		 GeneratorUtils.getTargetFolder(entry).toString();
//		 fsa.setOutputPath(IFileSystemAccess.DEFAULT_OUTPUT, targetFolder);
//		
//		 String targetProjectPath = targetProject.replaceAll("\\.", "/");
//		 generateContent(entry, fsa, targetProjectPath);
//		 }
//	}

}
{'fraction_non_alphanumeric': 0.1189056471413539, 'fraction_numerical': 0.00175377060680463, 'mean_word_length': 4.692614770459082, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6725905', 'n_tokens_mistral': 874, 'n_tokens_neox': 835, 'n_words': 157}