|What's the best way to package and share OQL queries [message #656031]
||Wed, 23 February 2011 19:57
| Krishna R
Registered: February 2011
What is the best way to share OQL queries with others? I have written a bunch of queries which do some stuff, unfortunately there are a lot of people who don't know much about writing the queries, neither the classnames, but are interested in the results.
I have written some queries and packaged into plugins, but I didn't find the way how to package OQL queries into plugins.
I experimented with "org.eclipse.mat.inspections.OQLQuery" by writing an IQuery implementation that does the following:
public IResult execute(IProgressListener listener)
OQLQuery queryObject = new OQLQuery();
queryObject.snapshot = this.snapshot;
queryObject.queryString = "SELECT s, toString(s) from java.lang.String ";
This didn't work initially (failed with a ClassNotFound for OQLQuery class), I made it to work by modifying Manifest file in MAT api jar, and added "org.eclipse.mat.inspections" package to Export-packages.
Agree that this is not the right way, but would like to know what is the cleanest way to do the same.
Any pointers would be helpful!
Powered by FUDForum
. Page generated in 0.02351 seconds