|
|
|
@ -11,7 +11,6 @@ import xyz.wbsite.dbtool.javafx.tool.ResponseReader;
|
|
|
|
|
import xyz.wbsite.dbtool.javafx.tool.Tool;
|
|
|
|
|
|
|
|
|
|
import java.io.File;
|
|
|
|
|
import java.io.IOException;
|
|
|
|
|
import java.util.ArrayList;
|
|
|
|
|
import java.util.HashMap;
|
|
|
|
|
import java.util.HashSet;
|
|
|
|
@ -221,41 +220,35 @@ public class ApiCallable implements Callable {
|
|
|
|
|
Matcher matcher = compile.matcher(s);
|
|
|
|
|
|
|
|
|
|
if (matcher.find()) {
|
|
|
|
|
String Package = matcher.group(1);
|
|
|
|
|
String EntName = matcher.group(2);
|
|
|
|
|
entNames.add(EntName);
|
|
|
|
|
|
|
|
|
|
List<File> files = Tool.findEntity(this.module, EntName + ".java");
|
|
|
|
|
|
|
|
|
|
for (File file : files) {
|
|
|
|
|
try {
|
|
|
|
|
EntityReader entReader = new EntityReader(file);
|
|
|
|
|
generateEntity(entReader);
|
|
|
|
|
} catch (IOException e) {
|
|
|
|
|
e.printStackTrace();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
List<String> reqNames = new ArrayList<>();
|
|
|
|
|
for (String depReqName : reader.getDeptReqList()) {
|
|
|
|
|
if (depReqName.matches("(.*\\.req)\\.(.*)")) {
|
|
|
|
|
Pattern compile = Pattern.compile("(.*\\.req)\\.(.*)");
|
|
|
|
|
Matcher matcher = compile.matcher(depReqName);
|
|
|
|
|
if (matcher.find()) {
|
|
|
|
|
String Package = matcher.group(1);
|
|
|
|
|
String ReqName = matcher.group(2);
|
|
|
|
|
entNames.add(depReqName);
|
|
|
|
|
List<File> files = Tool.findRequest(this.module, depReqName + ".java");
|
|
|
|
|
|
|
|
|
|
for (File file : files) {
|
|
|
|
|
try {
|
|
|
|
|
RequestReader reqReader = new RequestReader(file);
|
|
|
|
|
generateRequest(reqReader);
|
|
|
|
|
} catch (IOException e) {
|
|
|
|
|
e.printStackTrace();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
List<File> files = Tool.findRequest(this.module, depReqName + ".java");
|
|
|
|
|
for (File file : files) {
|
|
|
|
|
generateRequest(new RequestReader(file));
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -304,12 +297,8 @@ public class ApiCallable implements Callable {
|
|
|
|
|
List<File> files = Tool.findEntity(this.module, EntName + ".java");
|
|
|
|
|
|
|
|
|
|
for (File file : files) {
|
|
|
|
|
try {
|
|
|
|
|
EntityReader entReader = new EntityReader(file);
|
|
|
|
|
generateEntity(entReader);
|
|
|
|
|
} catch (IOException e) {
|
|
|
|
|
e.printStackTrace();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|