@Override
public void applyTo(IRepositoryQuery repositoryQuery) {
repositoryQuery.setSummary(getQueryTitle());
Query query = new Query();
net.sf.redmine_mylyn.api.model.Query selectedQuery = getSelectedQuery();
query.addFilter(QueryField.STOREDQUERY, CompareOperator.IS, ""+selectedQuery.getId()); //$NON-NLS-1$
if(selectedQuery.getProjectId()>=1) {
query.addFilter(QueryField.PROJECT, CompareOperator.IS, ""+selectedQuery.getProjectId()); //$NON-NLS-1$
}
try {
repositoryQuery.setUrl(query.toUrl(getTaskRepository().getCharacterEncoding()));
} catch (RedmineApiErrorException e) {
IStatus status = RedmineUiPlugin.toStatus(e, Messages.ERRMSG_QUERY_CREATION_FAILED);
StatusHandler.log(status);
setErrorMessage(status.getMessage());
}