public void init(IViewPart view) {
this.view = view;
}
public void run(IAction action) {
IQueryAdapter adapter = (IQueryAdapter)view.getAdapter(IQueryAdapter.class);
if(adapter!=null) {
if(action.isChecked())
adapter.addQuery(query);
else
adapter.removeQuery(query);
}
}