Closed hohwille closed 5 years ago
We have the ability to get a type by fqn or Class. It is also possible to create a type on the fly but this is rather tricky to do:
context.getSource().getRootPackage().getChildren().getOrCreateFile(path, add, init).getType()
No beginner will be able to figure out such API call by himself easily. It would therefore be nice to have a method CodeContext.getOrCreateType(String fqn, boolean add).
CodeContext.getOrCreateType(String fqn, boolean add)
Done.
We have the ability to get a type by fqn or Class. It is also possible to create a type on the fly but this is rather tricky to do:
No beginner will be able to figure out such API call by himself easily. It would therefore be nice to have a method
CodeContext.getOrCreateType(String fqn, boolean add)
.