New user documentation#154
Conversation
|
Looks fine to me. Do you want to add something on top of it? |
|
I think you're right, each feature should be documented. That would go in a dedicated doc/ folder though. Or docs / ? Or keep them at root / with .md to know they are doc ? I rather have them in dedicated folder, even though it makes links more awkard (starting with Now I don't think we should doc each feature about code, as those are better kept up-to-date with tests. I made it a draft and will think about it once you give your opinion about the location, and the creation of additional test/example classes. Should I make an issue ? This way we can list what we want. |
e2baebc to
8b13b8c
Compare
|
No answer, I put the doc in |
|
Super - sounds good :-) Thanks for your efforts |
|
Usually, I call the order |
|
No, we use docs. No point in being confused, I personally don't care. And I also usually go with docs/ . |
|
@phax can you check the two md files ? Note that I also changed the root readme. |
|
Sounds all fine for me - ready to merge? |
|
I need to add part on using the plugins (in using.md) . edit : plus a part on the general architecture (overview.md) alongside the scripts present, and a part on how to produce new generators (extending.md). |
|
@phax I added tasks at the top. Can you check that you can tick the README ; then check if README changes are correct, untick it if not ? I made a second pass on starting. If you think it's good, tick it please. |
|
Should be good, waiting for a review then I'll do another one too. |
|
|
||
| - The [root pom project](../pom.xml) | ||
| - The [core project](../jcodemodel/pom.xml) lib to generate classes and resources programmatically. | ||
| - The [test project](../jccodemodeltests/pom.xml) validates the *generated* classes behavior. |
| - The [root pom project](../pom.xml) | ||
| - The [core project](../jcodemodel/pom.xml) lib to generate classes and resources programmatically. | ||
| - The [test project](../jccodemodeltests/pom.xml) validates the *generated* classes behavior. | ||
| - The [plugin](../plugin//plugin/pom.xml) to generate java classes in maven |
| - The [plugin](../plugin//plugin/pom.xml) to generate java classes in maven | ||
| - The various [plugin generators](../plugin/generators/pom.xml) to load a JCodeModel in the plugin | ||
| - The [examples](../examples/pom.xml) that showcase how to use JCodeModel, the plugin, the generators. | ||
| - The [beta](../beta/pom.xml) contains projects that may be merged into the core, or other modules, but could also be discarded entirely. |
There was a problem hiding this comment.
Well, we have no beta yet - is that another plan of yours?
There was a problem hiding this comment.
nope, I put that quick. In the "maven hierarchy" discussion I was talking about /externals and /extensions .
Let's remove that for now.
|
|
||
| #### Tabs vs spaces | ||
|
|
||
| This project uses double-space for indentation. If you want to use tabs, you can ask git to modify the files when commiting them and when pulling them. A [specific script](../sh/tabspaces) makes that change, run it from the root project. |
|
|
||
| A generator generates a JCM that the plugin will export when requested. | ||
|
|
||
| - The generator module should be in the [../plugin/generators] submodule, with a module name starting with `GEN ` (in its pom) ; |
|
|
||
| ### First program | ||
|
|
||
| Let's first make a simple program that generates a new, empty class. With [java 25](https://openjdk.org/jeps/445) you can create a file `JCMFirstProgram.java` containing only |
There was a problem hiding this comment.
trust you, no check
| } | ||
| ``` | ||
|
|
||
| Then ask your IDE resolve the names for you. This should add imports at the top of the file |
There was a problem hiding this comment.
But I only have one !
(JK)
|
|
||
| It's actually possible to have maven do two passes of compiling but this is a bad habit as it blurs the visibility of what is generated, embedded, and can lead to issues with non-deterministic approaches. See [stackoverflow](https://stackoverflow.com/questions/21342342/run-maven-compilation-twice) | ||
|
|
||
| #### Regorganising the maven project |
|
|
||
| ```xml | ||
| <project> | ||
| <dependencie> |
| <!-- ph-badge-end --> | ||
|
|
||
| A fork of the com.sun.codemodel 2.7-SNAPSHOT. | ||
| This project provides modeling and exporting java source code at java runtime, either in a pre-processing phase or to acces them using a dynamic Classloader. |
|
Just small bullshit - the rest is super :-D |
Nope, your points are very important. Any small issue can make it difficult to use. |
|
No missing important information ? |
initial :
@phax please make a pass to check if that is clear. The goal is to help other people, not make them more confused :D