Getting the generator output path programmatically
Hi,
inside an editor, how do I get the output path from a `node` or an `editoContext`? I tried the solution in this question:
but using `getOutputPath()` on `Solution` is deprecated...
Please sign in to leave a comment.
Try `solution.getModuleDescriptor().getOutputPath()`.
Could you please add more details about what kind of output path do you need? Generally, it is a model that gets generated into a location, not a node (there could be no output for the node at all), and there might be different 'generation targets', depending on module settings. Check GenerationTargetFacet interface, getOutputLocation(SModel) method. If you're fine with location of regular generated Java files, you can use SModelOperations.getOutputLocation(SModel) utility method, that would look for Java's facet and take its output location for you.