}
private static void buildStructuredQueryPart(Query query, Map<IQueryField, ComboViewer> operators, Map<IQueryField, StructuredViewer> values) {
for (Entry<IQueryField, StructuredViewer> entry : values.entrySet()) {
IQueryField queryField = entry.getKey();
StructuredViewer viewer = entry.getValue();
ComboViewer opCombo = operators.get(queryField);
QueryField definition = queryField instanceof CustomField ? ((CustomField) queryField)
.getQueryField() : (QueryField) queryField;
IStructuredSelection selection = (IStructuredSelection)opCombo.getSelection();
if (selection.getFirstElement() instanceof CompareOperator) {
CompareOperator operator = (CompareOperator)selection.getFirstElement();
selection = (IStructuredSelection)viewer.getSelection();
if (selection.isEmpty()) {
query.addFilter(queryField, definition, operator, ""); //$NON-NLS-1$
} else {
Iterator<?> valIterator = selection.iterator();
while(valIterator.hasNext()) {