Some questions: javadoc, additional baselang-generator, packages
1. Is it possible to create javadoc-like comments in baselang?
e.g. author etc in ClassConcepts
2. Is it possible to add a further generator to baselang to generate e.g. a javadoc-like documentation or C#-Code?
3. Is ist possible to influence the package-structure of the generated java-output? The "virtual package" in the source-model is not used.
e.g. author etc in ClassConcepts
2. Is it possible to add a further generator to baselang to generate e.g. a javadoc-like documentation or C#-Code?
3. Is ist possible to influence the package-structure of the generated java-output? The "virtual package" in the source-model is not used.
Please sign in to leave a comment.
The 2nd one is resolved. It is possible. Just add another "language engaged on generation"
But another question appeared:
4. Is there a html-language? Could it be based on xml (xhtml)?
There's an addition to baselang called baselang.javadoc...
4. AFAIK, not in public MPS distribution.
The package name comes from:
base text gen component "BaseLanguageTextGen" - operation fileHeader
append ${"package " + getPackageName(cls) + ";"} \n \n {/*Generated by MPS */} \n ;Btw. great idea to hardcode "generated by mps"!!!
And then in the same text gen component:
protected string getPackageName(node<Classifier> cls) { return cls/.getModel().getSModelReference().getLongName(); }So as i see it, there's no way to override this method...
I also need this feature (dynamically set package of generated file).
Motivation:
I am migrating existing code to generated code. The old code is being used by code written by hand. As the package structure is quite fixed I can't just generate everithing to one directory.
By the way: MPS-5962
could you file the request?
The only workaround would be to just subconcept the ClassConcept and define your own textgen or generator for it. (Actually I'm not sure, if you need to override it.)
But still the folder structure would be wrong...
What is the @export annotation?
Can you change the output-models fqname? Can you create several models?
AFAIK, not. Currently you can only generate something in a scope of single model, but my idea was to originally put everything into a model with proper name..