@Override
        public void handleEvent(Event event) {
          if (getShell() != null
              && currentExpressionEditor != null
              && currentExpressionEditor.provideDialogTray()
              && getTray() == null) {
            final DialogTray tray = currentExpressionEditor.createDialogTray();
            openTray(tray);

          } else {
            closeTray();
          }
        }
 @Override
 public void setIsPageFlowContext(boolean isPageFlowContext) {
   this.isPageFlowContext = isPageFlowContext;
   if (currentExpressionEditor != null) {
     currentExpressionEditor.setIsPageFlowContext(isPageFlowContext);
   }
 }
 @Override
 protected void okPressed() {
   if (currentExpressionEditor != null) {
     currentExpressionEditor.okPressed();
   }
   super.okPressed();
 }
 @Override
 public boolean close() {
   if (getTray() != null) {
     closeTray();
   }
   if (currentExpressionEditor != null) {
     currentExpressionEditor.dispose();
   }
   return super.close();
 }
 @Override
 protected Button createButton(Composite parent, int id, String label, boolean defaultButton) {
   final Button button = super.createButton(parent, id, label, defaultButton);
   if (id == OK) {
     if (currentExpressionEditor != null) {
       button.setEnabled(currentExpressionEditor.canFinish());
     }
   }
   return button;
 }
  protected void showContent(String type) {
    IExpressionProvider provider =
        ExpressionEditorService.getInstance().getExpressionProvider(type);

    Assert.isNotNull(provider);

    for (Control c : contentComposite.getChildren()) {
      c.dispose();
    }

    if (currentExpressionEditor != null) {
      currentExpressionEditor.dispose();
    }

    currentExpressionEditor = provider.getExpressionEditor(inputExpression, context);
    currentExpressionEditor.setIsPageFlowContext(isPageFlowContext);
    if (currentExpressionEditor != null) {
      currentExpressionEditor.createExpressionEditor(contentComposite, isPassword);
      contentComposite.layout(true, true);
      if (helpControl != null) {
        //				helpControl.setVisible(currentExpressionEditor.provideDialogTray());
        helpControl.setVisible(false);
        if (currentExpressionEditor.provideDialogTray()) {
          ToolItem item = ((ToolBar) helpControl).getItem(0);
          item.setSelection(true);
          openTrayListener.handleEvent(new Event());
        } else if (getTray() != null) {
          closeTray();
        }
      }
      if (dataBindingContext != null) {
        dataBindingContext.dispose();
      }
      dataBindingContext = new EMFDataBindingContext();

      UpdateValueStrategy selectionToExpressionType = new UpdateValueStrategy();
      IConverter convert =
          new Converter(IExpressionProvider.class, String.class) {

            @Override
            public Object convert(Object arg0) {
              return ((IExpressionProvider) arg0).getExpressionType();
            }
          };
      selectionToExpressionType.setConverter(convert);

      if (domain != null) {
        domain
            .getCommandStack()
            .execute(
                SetCommand.create(
                    domain, inputExpression, ExpressionPackage.Literals.EXPRESSION__TYPE, type));
      } else {
        inputExpression.setType(type);
      }
      currentExpressionEditor.bindExpression(
          dataBindingContext, context, inputExpression, viewerTypeFilters, expressionViewer);
      currentExpressionEditor.addListener(
          new Listener() {
            @Override
            public void handleEvent(Event event) {
              Button okButton = getButton(OK);
              if (okButton != null && !okButton.isDisposed()) {
                okButton.setEnabled(currentExpressionEditor.canFinish());
              }
            }
          });
      DialogSupport.create(this, dataBindingContext);
    }
  }