Hoe Data Explorer Queries automatisch toe te voegen vanuit een Plugin?

btw, the answer to this would also be generally useful for a broader set of problems.