What's the best way to package and share OQL queries [message #656031] |
Wed, 23 February 2011 19:57 |
Krishna R Messages: 5 Registered: February 2011 |
Junior Member |
|
|
Hello,
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)
throws Exception
{
OQLQuery queryObject = new OQLQuery();
queryObject.snapshot = this.snapshot;
queryObject.queryString = "SELECT s, toString(s) from java.lang.String ";
return queryObject.execute(listener);
}
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!
Thank you,
Krishna
|
|
|
|
Powered by
FUDForum. Page generated in 0.03567 seconds