public ConnectorEditor(Module Module) {
    super();
    this.Module = HybridbpmUI.getDevelopmentAPI().getModuleById(Module.getId());
    ;

    btnRun.setIcon(FontAwesome.PLAY);
    replaceComponent(horizontalSplitPanel, codeEditorLayout);
    btnParameters.setIcon(FontAwesome.WRENCH);
    buttonBar.addComponent(btnParameters, 0);
    buttonBar.addComponent(btnRun, 0);

    codeEditorLayout.setSizeFull();
    codeEditorLayout.addStyleName("code");
    codeEditorLayout.setMargin(new MarginInfo(false, false, false, true));

    binder.setItemDataSource(this.Module);
    binder.bind(codeEditor, "code");

    switch (Module.getType()) {
      case CONNECTOR:
        codeEditor.setCaption("Code");
        codeEditor.setMode(AceMode.groovy);
        codeEditor.setTheme(AceTheme.textmate);
        codeEditor.setShowGutter(true);
        codeEditor.setSizeFull();
        break;
    }
  }
 private void save() {
   try {
     binder.commit();
     Module = HybridbpmUI.getDevelopmentAPI().saveModule(Module);
     binder.setItemDataSource(Module);
   } catch (FieldGroup.CommitException ex) {
     logger.log(Level.SEVERE, ex.getMessage(), ex);
   }
 }
 @Override
 public void windowClose(Window.CloseEvent e) {
   Module = HybridbpmUI.getDevelopmentAPI().getModuleById(Module.getId());
   binder.setItemDataSource(Module);
 }