Ejemplo n.º 1
0
  @Override
  protected void okPressed() {
    this.valid = isValid();
    if (this.valid) {
      final boolean sideEffects = this.sideEffectsProp.getValue2().booleanValue();
      final boolean canBeCashed = this.canBeCachedProp.getValue2().booleanValue();
      final Query query = this.strategy.createQuery(canBeCashed, sideEffects, this.queryContext);
      final IWithResultDialogCallback<IQueryCreationResult> callback = getCallback();
      callback.commited(
          new IQueryCreationResult() {
            public Query getQuery() {
              return query;
            }

            public String getLabel() {
              return GetQueryDialog.this.getConclusionText();
            }
          });
    }
    super.okPressed();
  }
Ejemplo n.º 2
0
 @Override
 protected void cancelPressed() {
   final IWithResultDialogCallback<IQueryCreationResult> callback = getCallback();
   callback.canceled(null);
   super.cancelPressed();
 }