I have asked the question on https://yellowgrass.org/question/Spoofax/17;but I still feel confused about it.I used to generate multiple files using the srategy:
generate-java:
(selected, position, ast, path, project-path) -> None();
handle := (path, “w”);
(selected, handle);
fclose

But each file generated are all related to the entire file.
I want to generate files and each file depend on part of the source file.
Eg:The source file is module example

entity User {
name : String
password : String
homepage : URL
}

entity BlogPosting {
poster : User
body : String
}

entity URL {
location : String
}
How can I generate three java entity files(URL.java,BlogPosting .java,User.java)? URL.java is related to “entity URL”,BlogPosting.java is related to “entity BlogPosting” and User.java is related to entity User.
Guido Wachsmuth has tell me how to do,but I am still unclear,Would you please be more detailed?Thank you very much!

Asked by ZJG on 20 March 2013 at 07:26