I've been working on the editor today and had some thoughts.
1. it would be nice to trigger the auto-completion when the user hits
"space" - I didn't see an easy way to do it in the editor class
2. it would be nice to further filter the auto-completion so it only shows
the phrases for that particular object. right now I show all matching
phrases. In order to be able to filter by object, the DSL format would need
to be extended to include more metadata. currently each entry looks like
this.
[when]- is empty=userId == userid, recommendation == null
In the example I created, userId is an attribute of many objects and is used
to to join between them. if we extend the format so that
object.attributemappings have extra metadata like below, the DSL
utility can then group the
mappings by object type.
[when][com.my.Reponse]- is empty=userId == userid, recommendation == null
The response object looks like this
public class Response {
private String userId;
private Recommendation recommendation;
}
the customer object
public class Customer {
private String first;
private String middle;
private String last;
private String userId;
private String emailAddress;
}
obviously, if the format is extended, it could cause backward compatability
issues.
peter
Show replies by date