You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If there are multiple input elements selected, e.g., Java files, CobiGen will be started in batch mode. The generation preview will be constrained to the first selected input element. It does not preview the generation for each element of the selection or of a complex input. The selection of the files to be generated will be generated for each input element analogously afterwards.
2
-
3
-
Thus the color encoding differs also a little bit:
4
-
5
-
- yellow: files, which are configured to be merged.
6
-
7
-
- red: files, which are not configured with any merge strategy and thus will be created if the file does not exist or overwritten if the file already exists
8
-
1
+
If there are multiple input elements selected, e.g., Java files, CobiGen will be started in batch mode. The generation preview will be constrained to the first selected input element. It does not preview the generation for each element of the selection or of a complex input. The selection of the files to be generated will be generated for each input element analogously afterwards.
2
+
3
+
Thus the color encoding differs also a little bit:
4
+
5
+
- yellow: files, which are configured to be merged.
6
+
7
+
- red: files, which are not configured with any merge strategy and thus will be created if the file does not exist or overwritten if the file already exists
8
+
9
9
- no color: files, which will be ignored during generation
* Execute the below command to know available CobiGen Commands
2
-
3
-
`cobigen `{{execute T1}}
4
-
5
-
*[generate, g]: Command used for code generation.
6
-
To know more about implementation of this command you can follow https://katacoda.com/devonfw/scenarios/cobigen.
7
-
8
-
*[adapt-templates, a]: Generates a new templates folder next to the Cobigen CLI and stores its location inside a configuration file. After executing this command, the CLI will attempt to use the specified Templates folder.
9
-
10
-
`cobigen a`{{execute T1}}
11
-
1
+
* Execute the below command to know available CobiGen Commands
2
+
3
+
`cobigen `{{execute T1}}
4
+
5
+
*[generate, g]: Command used for code generation.
6
+
To know more about implementation of this command you can follow https://katacoda.com/devonfw/scenarios/cobigen.
7
+
8
+
*[adapt-templates, a]: Generates a new templates folder next to the Cobigen CLI and stores its location inside a configuration file. After executing this command, the CLI will attempt to use the specified Templates folder.
9
+
10
+
`cobigen a`{{execute T1}}
11
+
12
12
To get more information about rest of all the command visit on https://devonfw.com/website/pages/docs/master-cobigen.asciidoc_cobigen-cli.html
Select CobiGen Eclipse Plug-in → Next → Next → accept the license → Finish → OK → Yes
6
-
7
-
* Once installed, a new menu entry named "CobiGen" will show up in the Package Explorer’s context menu. In the sub menu there will the Generate command, which may ask you to update the templates, and then you can start the generation wizard of CobiGen.
8
-
1
+
Insert the update site of your interest into the filed Work with and press Add
Select CobiGen Eclipse Plug-in → Next → Next → accept the license → Finish → OK → Yes
6
+
7
+
* Once installed, a new menu entry named "CobiGen" will show up in the Package Explorer’s context menu. In the sub menu there will the Generate command, which may ask you to update the templates, and then you can start the generation wizard of CobiGen.
8
+
9
9
* You can adapt the templates by clicking on Adapt Templates which will give you the possibility to import the CobiGen_Templates automatically so that you can modified them.
However, you might face some errors while using CobiGen. So, we recommend to perform a Health Check for CobiGen Templates for better experience.
3
-
4
-
To get more information on Health Check for CobiGen Templates visit on https://devonfw.com/website/pages/docs/master-cobigen.asciidoc_eclipse-integration.html#cobigen-eclipse_usage.asciidoc_health-check
5
-
6
-
## Troubleshooting CLI
7
-
When generating code from a Java file, CobiGen makes use of Java reflection for generating templates. In order to do that, the CLI needs to find the compiled source code of your project.
8
-
9
-
If you find an error like Compiled class foo\bar\EmployeeEntity.java has not been found, it means you need to run "mvn clean install" on the input project so that a new target folder gets created with the needed compiled sources.
10
-
11
-
## Conclusion
12
-
From this tutorial you have learned the following:
13
-
* You can do CobiGen set up in your system.
14
-
* You can use the CobiGen CLI commands to generate the code.
15
-
* You can now integrate CobiGen with Eclipse and generate your crud services.
16
-
* Now you know how to use CobiGen in a particular project with Eclipse as well as CLI.
17
-
1
+
## Health Check
2
+
However, you might face some errors while using CobiGen. So, we recommend to perform a Health Check for CobiGen Templates for better experience.
3
+
4
+
To get more information on Health Check for CobiGen Templates visit on https://devonfw.com/website/pages/docs/master-cobigen.asciidoc_eclipse-integration.html#cobigen-eclipse_usage.asciidoc_health-check
5
+
6
+
## Troubleshooting CLI
7
+
When generating code from a Java file, CobiGen makes use of Java reflection for generating templates. In order to do that, the CLI needs to find the compiled source code of your project.
8
+
9
+
If you find an error like Compiled class foo\bar\EmployeeEntity.java has not been found, it means you need to run "mvn clean install" on the input project so that a new target folder gets created with the needed compiled sources.
10
+
11
+
## Conclusion
12
+
From this tutorial you have learned the following:
13
+
* You can do CobiGen set up in your system.
14
+
* You can use the CobiGen CLI commands to generate the code.
15
+
* You can now integrate CobiGen with Eclipse and generate your crud services.
16
+
* Now you know how to use CobiGen in a particular project with Eclipse as well as CLI.
17
+
18
18
More information about CobiGen on https://devonfw.com/website/pages/docs/master-cobigen.asciidoc.html
Selecting the menu entry Generate the generation wizard will be opened.
2
-
3
-
The left side of the wizard shows all available increments, which can be selected to be generated. Increments are a container like concept encompassing multiple files to be generated, which should result in a semantically closed generation output. The type of modification of each file will be encoded into following color scheme if the files are selected for generation:
4
-
5
-
- green: files, which are currently non-existent in the file system. These files will be created during generation
6
-
7
-
- yellow: files, which are currently existent in the file system and which are configured to be merged with generated contents.
8
-
9
-
- red: files, which are currently existent in the file system. These files will be overwritten if manually selected.
10
-
1
+
Selecting the menu entry Generate the generation wizard will be opened.
2
+
3
+
The left side of the wizard shows all available increments, which can be selected to be generated. Increments are a container like concept encompassing multiple files to be generated, which should result in a semantically closed generation output. The type of modification of each file will be encoded into following color scheme if the files are selected for generation:
4
+
5
+
- green: files, which are currently non-existent in the file system. These files will be created during generation
6
+
7
+
- yellow: files, which are currently existent in the file system and which are configured to be merged with generated contents.
8
+
9
+
- red: files, which are currently existent in the file system. These files will be overwritten if manually selected.
10
+
11
11
- no color: files, which are currently existent in the file system. Additionally files, which were unselected and thus will be ignored during generation.
0 commit comments