Package net.sf.redmine_mylyn.api.query

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


  private void restoreQuery() {
    try {
      Query query = getRedmineQuery();
      if(query != null) {

        QueryFilter queryFilter = query.getQueryFilter(QueryField.STOREDQUERY);
        if(queryFilter!=null) {

          int storedQueryId = RedmineUtil.parseIntegerId(queryFilter.getValues().get(0));
          net.sf.redmine_mylyn.api.model.Query oldValue = getConfiguration().getQueries().getById(storedQueryId);

          if(oldValue != null) {
            titleText.setText(getQuery().getSummary());
            queryViewer.setSelection(new StructuredSelection(oldValue), true);
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;
      }
     
      Text control = entry.getValue();
      ComboViewer operatorCombo = operators.get(queryField);
     
      operatorCombo.setSelection(new StructuredSelection(queryFilter.getOperator()));
      if(queryFilter.getOperator().isValueBased()) {
        control.setEnabled(true);
       
        List<String> filterValues = queryFilter.getValues();
        if(filterValues.size()>0) {
          control.setText(filterValues.get(0));
        }
      }
    }
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;
      }
     
      StructuredViewer viewer = entry.getValue();
      ComboViewer operatorCombo = operators.get(queryField);
     
      operatorCombo.setSelection(new StructuredSelection(queryFilter.getOperator()));
      if(queryFilter.getOperator().isValueBased()) {
        viewer.getControl().setEnabled(true);
       
        List<String> filterValues = queryFilter.getValues();
        if(queryField instanceof QueryField) {
          List<Object> properties = new ArrayList<Object>(filterValues.size());
          for(String value : filterValues) {
            if(RedmineUtil.isInteger(value)) {
              Property property = queryFieldValue2Property(RedmineUtil.parseIntegerId(value), (QueryField)queryField, configuration);
View Full Code Here

TOP

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

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.