Package net.sf.redmine_mylyn.api.query

Examples of net.sf.redmine_mylyn.api.query.IQueryField


    return query;
  }
 
  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;
View Full Code Here


    }
  }

  private static void buildTextQueryPart(Query query, Map<IQueryField, ComboViewer> operators,  Map<IQueryField, Text> values) {
    for (Entry<IQueryField, Text> entry : values.entrySet()) {
      IQueryField queryField = entry.getKey();
      Text text = entry.getValue();
      ComboViewer opCombo = operators.get(queryField);
     
      IStructuredSelection selection = (IStructuredSelection)opCombo.getSelection();
      if (selection.getFirstElement() instanceof CompareOperator) {
View Full Code Here

    }
  }
 
  public static void restoreTextQueryPart(Query query, Configuration configuration, Map<IQueryField, ComboViewer> operators,  Map<IQueryField, Text> values) {
    for(Entry<IQueryField, Text> entry : values.entrySet()) {
      IQueryField queryField = entry.getKey();
      QueryFilter queryFilter = query.getQueryFilter(queryField);
      if(queryFilter==null) {
        continue;
      }
     
View Full Code Here

    }
  }

  public static void restoreStructuredQueryPart(Query query, Configuration configuration, Map<IQueryField, ComboViewer> operators,  Map<IQueryField, StructuredViewer> values) {
    for(Entry<IQueryField, StructuredViewer> entry : values.entrySet()) {
      IQueryField queryField = entry.getKey();
      QueryFilter queryFilter = query.getQueryFilter(queryField);
      if(queryFilter==null) {
        continue;
      }
     
View Full Code Here

    Project project = getSelectedProject();
    boolean enabled = project!=null;
    Set<Integer> matchingCustomFieldIds = findAvailableCustomFields(project);
   
    for (Entry<IQueryField, ComboViewer> entry : searchOperators.entrySet()) {
      IQueryField queryField = entry.getKey();
      Control control = entry.getValue().getControl();
     
      if(queryField instanceof CustomField) {
        control.setEnabled(matchingCustomFieldIds.contains(((CustomField)queryField).getId()));
      } else {
        control.setEnabled(enabled || queryField.isCrossProjectUsable());
      }
    }
   
  }
View Full Code Here

    listGridData.widthHint = 85;
   
    IQueryField[] fields = lstSearchValues.keySet().toArray(new IQueryField[lstSearchValues.size()]);
   
    for(int i=1; i<=fields.length; i++) {
      IQueryField queryField = fields[i-1];

      Label label = new Label(composite, SWT.NONE);
      label.setText(queryField.getLabel());
      label.setLayoutData(commonGridData);
     
      Control control = lstSearchValues.get(queryField).getControl();
      control.setParent(composite);
      control.setLayoutData(listGridData);

      if (i % columns == 0 || i == lstSearchValues.size()) {
        int sv = (i % columns == 0) ? i - columns : i - i % columns;
        if (i % columns != 0) {
          listGridData = new GridData();
          listGridData.verticalSpan = 2;
          listGridData.heightHint = 100;
          listGridData.horizontalSpan = (columns-(i % columns)) * 2 +1;
          listGridData.widthHint = 85;
          control.setLayoutData(listGridData);
        }
        for (int j = sv; j < i; j++) {
          IQueryField tmpSearchField = fields[j];
         
          ComboViewer combo = lstSearchOperators.get(tmpSearchField);
          combo.getControl().setParent(composite);
          combo.getControl().setLayoutData(commonGridData);
        }
View Full Code Here

TOP

Related Classes of net.sf.redmine_mylyn.api.query.IQueryField

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.