<commit_before>package org.yakindu.sct.generator.java

import com.google.inject.Inject
import org.eclipse.xtext.generator.IFileSystemAccess
import org.yakindu.sct.model.sexec.ExecutionFlow
import org.yakindu.sct.model.sgen.GeneratorEntry
import org.yakindu.sct.generator.core.library.ICoreLibraryHelper
import static org.yakindu.sct.generator.core.filesystem.ISCTFileSystemAccess.*

class ITracing {
	@Inject extension Naming
	@Inject extension GenmodelEntries
	
	@Inject ICoreLibraryHelper outletFeatureHelper

	def generateTracing(ExecutionFlow flow, GeneratorEntry entry, IFileSystemAccess fsa) {
		if(outletFeatureHelper.getSkipLibraryFiles(entry)) {
			return
		}
		if (outletFeatureHelper.getLibraryTargetFolderValue(entry) !== null) {
			// generate into library target folder in case one is specified, as the contents are static
			fsa.generateFile(entry.basePackagePath + '/' + traceInterface.java,
				LIBRARY_TARGET_FOLDER_OUTPUT, content(entry))
		} else if (outletFeatureHelper.getApiTargetFolderValue(entry) !== null) {
			// generate into API target folder in case one is specified, as it is an interface
			fsa.generateFile(entry.basePackagePath + '/' + traceInterface.java,
				API_TARGET_FOLDER_OUTPUT, content(entry))
		} else {
			// use default target folder path in case no library or API target folder is specified (the file will be overwritten there)
			fsa.generateFile(entry.basePackagePath + '/' + traceInterface.java, content(entry))
		}
//		fsa.generateFile(entry.basePackagePath + '/' + traceInterface.java, content(entry))
	}

	def private content(GeneratorEntry entry) '''
	package tracingjava;
	
	public interface «traceInterface»<T> {
		abstract void stateEntered(T state);
		abstract void stateExited(T state);
	}
	'''
}
<commit_msg>usinge correct base package for ITracing<commit_after>package org.yakindu.sct.generator.java

import com.google.inject.Inject
import org.eclipse.xtext.generator.IFileSystemAccess
import org.yakindu.sct.model.sexec.ExecutionFlow
import org.yakindu.sct.model.sgen.GeneratorEntry
import org.yakindu.sct.generator.core.library.ICoreLibraryHelper
import static org.yakindu.sct.generator.core.filesystem.ISCTFileSystemAccess.*

class ITracing {
	@Inject extension Naming
	@Inject extension GenmodelEntries
	
	@Inject ICoreLibraryHelper outletFeatureHelper

	def generateTracing(ExecutionFlow flow, GeneratorEntry entry, IFileSystemAccess fsa) {
		if(outletFeatureHelper.getSkipLibraryFiles(entry)) {
			return
		}
		if (outletFeatureHelper.getLibraryTargetFolderValue(entry) !== null) {
			// generate into library target folder in case one is specified, as the contents are static
			fsa.generateFile(entry.basePackagePath + '/' + traceInterface.java,
				LIBRARY_TARGET_FOLDER_OUTPUT, content(entry))
		} else if (outletFeatureHelper.getApiTargetFolderValue(entry) !== null) {
			// generate into API target folder in case one is specified, as it is an interface
			fsa.generateFile(entry.basePackagePath + '/' + traceInterface.java,
				API_TARGET_FOLDER_OUTPUT, content(entry))
		} else {
			// use default target folder path in case no library or API target folder is specified (the file will be overwritten there)
			fsa.generateFile(entry.basePackagePath + '/' + traceInterface.java, content(entry))
		}
	}
	
	def content(GeneratorEntry entry) {
		content(entry.licenseText, entry.basePackageName)
	}

	def private content(String licenceText, String basePackage) '''
	«licenceText»
	package «basePackage»;
	
	public interface «traceInterface»<T> {
		abstract void stateEntered(T state);
		abstract void stateExited(T state);
	}
	'''
}

{'fraction_non_alphanumeric': 0.09128745837957825, 'fraction_numerical': 0.0, 'mean_word_length': 5.226252158894646, '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': '3114380', 'n_tokens_mistral': 1146, 'n_tokens_neox': 1077, 'n_words': 270}