@tripsnek/tmf
Version:
TypeScript Modeling Framework - A TypeScript port of the Eclipse Modeling Framework (EMF)
28 lines • 941 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.TGeneratorUtils = void 0;
const tgen_utils_1 = require("./tgen-utils");
/**
* Responsible for generating a default (empty) utils file for an EPackage.
* The utils file is intended to contain package-specific utility functions
* and is manually maintained by developers after generation.
*
* @author dtuohy
*/
class TGeneratorUtils {
generateUtilsContents(pkg) {
const utilsClassName = tgen_utils_1.TGenUtils.capitalize(pkg.getName()) + 'Utils';
return `/**
* Utility functions for the ${pkg.getName()} package.
*
* This file is generated as an empty template and is intended to be
* manually maintained. Add package-specific utility functions here.
*/
export class ${utilsClassName} {
// Add utility methods here
}
`;
}
}
exports.TGeneratorUtils = TGeneratorUtils;
//# sourceMappingURL=tgenerator-utils.js.map