@AutoGenerated
  private HorizontalLayout buildWorkAreaLayout() {
    // common part: create layout
    workAreaLayout = new HorizontalLayout();
    workAreaLayout.setImmediate(false);
    workAreaLayout.setWidth("100.0%");
    workAreaLayout.setHeight("100.0%");
    workAreaLayout.setMargin(false);

    // availableModulesComponent
    availableModulesComponent = new AvailableModulesComponent();
    availableModulesComponent.setImmediate(false);
    availableModulesComponent.setWidth("-1px");
    availableModulesComponent.setHeight("100.0%");
    workAreaLayout.addComponent(availableModulesComponent);

    // configuratedModulesComponent
    configuratedModulesComponent = new ConfiguratedModulesComponent();
    configuratedModulesComponent.setImmediate(false);
    configuratedModulesComponent.setWidth("100.0%");
    configuratedModulesComponent.setHeight("100.0%");
    workAreaLayout.addComponent(configuratedModulesComponent);
    workAreaLayout.setExpandRatio(configuratedModulesComponent, 1.0f);

    return workAreaLayout;
  }
 private void initView() {
   try {
     availableModulesComponent.loadData(menuCommandResourceService, moduleService);
     configuratedModulesComponent.loadData(
         menuWorkbenchService,
         moduleService,
         menuFolderResourceService,
         menuCommandResourceService);
   } catch (Exception e) {
     // TODO Auto-generated catch block
     e.printStackTrace();
   }
 }
  /**
   * The constructor should first build the main layout, set the composition root and then do any
   * custom initialization.
   *
   * <p>The constructor will not be automatically regenerated by the visual editor.
   *
   * @throws Exception
   */
  public ConfiguratorView(IWorkbenchContext context, IViewContainer viewContainer) {
    this.context = context;
    this.viewContainer = viewContainer;

    buildMainLayout();
    setCompositionRoot(mainLayout);

    // TODO add user code here
    this.moduleService = ConfiguratorViewContainer.getModuleService();
    this.menuWorkbenchService = ConfiguratorViewContainer.getMenuWorkbenchService();
    this.menuFolderResourceService = ConfiguratorViewContainer.getMenuFolderResourceService();
    this.menuCommandResourceService = ConfiguratorViewContainer.getMenuCommandResourceService();

    workAreaLayout.setMargin(true);
    workAreaLayout.setSpacing(true);

    configuratedModulesComponent.addListener(this);

    // initialize datasource views
    initView();
  }