@@ -98,6 +98,16 @@ export class Katacoda extends Runner {
9898 let params = command . parameters ;
9999 let cobiGenTemplates = params [ 1 ] . join ( "," ) ;
100100
101+ let javaFilePath = new String ( params [ 0 ] ) ;
102+ let entity = javaFilePath . slice ( javaFilePath . lastIndexOf ( "/" ) + 1 , javaFilePath . lastIndexOf ( "." ) ) . replace ( "Entity" , "" ) ;
103+
104+ // remove the last two directories of the path to the entity class
105+ let tmpPath = javaFilePath . split ( "/" ) . splice ( 0 , javaFilePath . match ( / \/ / g) . length - 2 ) . join ( "/" ) ;
106+ let generatedFiles = [ ] ;
107+ generatedFiles . push ( "devonfw/workspaces/main/" + tmpPath + "/logic/base/usecase/Abstract" + entity + "Uc.java" ) ;
108+ generatedFiles . push ( "devonfw/workspaces/main/" + tmpPath + "/service/impl/rest/" + entity + "managementRestServiceImpl.java" ) ;
109+ generatedFiles . push ( "devonfw/workspaces/main/" + tmpPath + "/dataaccess/api/repo/" + entity + "Repository.java" ) ;
110+
101111 this . renderTemplate ( path . join ( "scripts" , "installCobiGenPlugin.sh" ) , path . join ( this . setupDir , "installCobiGenPlugin.sh" ) , { vsixFile : "cobigen-0.0.1.vsix" , pluginName : "cobigen" } ) ;
102112 this . setupScripts . push ( {
103113 "name" : "Install CobiGen plugin" ,
@@ -109,7 +119,7 @@ export class Katacoda extends Runner {
109119 "title" : "CobiGen Java" ,
110120 "text" : "step" + this . stepsCount + ".md"
111121 } ) ;
112- this . renderTemplate ( "cobiGenJava.md" , this . outputPathTutorial + "step" + ( this . stepsCount ++ ) + ".md" , { text : step . text , textAfter : step . textAfter , javaFile : params [ 0 ] , cobiGenTemplates : cobiGenTemplates } ) ;
122+ this . renderTemplate ( "cobiGenJava.md" , this . outputPathTutorial + "step" + ( this . stepsCount ++ ) + ".md" , { text : step . text , textAfter : step . textAfter , javaFile : params [ 0 ] , cobiGenTemplates : cobiGenTemplates , generatedFiles : generatedFiles } ) ;
113123 return null ;
114124 }
115125
0 commit comments