Skip to content

Commit

Permalink
added action message generation
Browse files Browse the repository at this point in the history
  • Loading branch information
benmaidel authored and fmessmer committed Jul 30, 2018
1 parent bd6818d commit 6f64de8
Showing 1 changed file with 21 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,27 @@ public void generate(File outputDirectory, Collection<String> packages,
for (File directory : packagePath) {
topicDefinitionFileProvider.addDirectory(directory);
serviceDefinitionFileProvider.addDirectory(directory);

//ugly hack for action definitions
String dir = directory.getAbsolutePath();
String actionDir = dir + "/action";
File actionFile = new File(actionDir);
if(actionFile.exists()) {
int idx = dir.indexOf("src");
if(idx >= 0){
String subDir = dir.substring(idx);
dir = dir.replace(subDir,"devel/share/");
String[] splits = directory.getAbsolutePath().split("/");
if(splits.length >0){
dir += splits[splits.length-1];
File newFileDir = new File(dir);
if(newFileDir.exists()){
topicDefinitionFileProvider.addDirectory(newFileDir);
}
}
}
}

}
topicDefinitionFileProvider.update();
serviceDefinitionFileProvider.update();
Expand Down

0 comments on commit 6f64de8

Please sign in to comment.