/**
   * Updates the ACIDE - A Configurable IDE console menu components visibility with the menu
   * configuration.
   */
  public void updateComponentsVisibility() {

    AcideMenuItemConfiguration nameConfiguration;
    AcideMenuItemConfiguration nameFieldsConfiguration;
    AcideMenuItemConfiguration nameFieldsTypesConfiguration;

    _showDetailsSubmenuConfiguration =
        AcideMenuItemsConfiguration.getInstance()
            .getSubmenu(AcideConfigurationMenu.CONFIGURATION_MENU_NAME)
            .getSubmenu(AcideDatabasePanelMenu.DATABASE_MENU_NAME)
            .getSubmenu(SHOW_DETAILS_NAME);

    // Sets the name menu item to visible or not visible
    nameConfiguration = _showDetailsSubmenuConfiguration.getItem(SHOW_NAME_NAME);
    _nameMenuItem.setVisible(nameConfiguration.isVisible());

    // Sets the name fields menu item to visible or not visible
    nameFieldsConfiguration = _showDetailsSubmenuConfiguration.getItem(SHOW_NAME_FIELDS_NAME);
    _nameFieldsMenuItem.setVisible(nameFieldsConfiguration.isVisible());

    // Sets the name fields types menu item to visible or not visible
    nameFieldsTypesConfiguration =
        _showDetailsSubmenuConfiguration.getItem(SHOW_NAME_FIELDS_TYPES_NAME);
    _nameFieldsTypesMenuItem.setVisible(nameFieldsTypesConfiguration.isVisible());

    Iterator<AcideMenuObjectConfiguration> it = _insertedObjects.iterator();
    while (it.hasNext()) {
      AcideMenuObjectConfiguration ob = it.next();
      if (ob.isSubmenu()) {
        _insertedMenus.get(ob.getName()).updateComponentsVisibility();
        _insertedMenus.get(ob.getName()).setVisible(ob.isVisible());
      } else {
        _insertedItems.get(ob.getName()).setVisible(ob.isVisible());
      }
    }

    // Sets the console menu to visible or not visible
    _showDetailsSubmenuConfiguration.setVisible(
        _nameMenuItem.isVisible()
            || _nameFieldsMenuItem.isVisible()
            || _nameFieldsTypesMenuItem.isVisible());
    _showDetailsSubmenuConfiguration.setErasable(false);

    try {
      // Save the configuration for the menu that could have been modified
      AcideMenuConfiguration.getInstance()
          .saveMenuConfigurationFile("./configuration/menu/lastModified.menuConfig");

      // Gets the the ACIDE - A Configurable IDE current menu
      // configuration
      String currentMenuConfiguration =
          AcideResourceManager.getInstance().getProperty("currentMenuConfiguration");

      if (!currentMenuConfiguration.endsWith("lastModified.menuConfig")
          && !currentMenuConfiguration.endsWith("newMenu.menuConfig")) {

        // Updates the the ACIDE - A Configurable IDE previous
        // menu
        // configuration
        AcideResourceManager.getInstance()
            .setProperty("previousMenuConfiguration", currentMenuConfiguration);
      }

      // Updates the the ACIDE - A Configurable IDE current menu
      // configuration
      AcideResourceManager.getInstance()
          .setProperty("currentMenuConfiguration", "./configuration/menu/lastModified.menuConfig");
    } catch (Exception exception2) {

      // Updates the log
      AcideLog.getLog().error(exception2.getMessage());
      exception2.printStackTrace();
    }
  }
  /** Builds the ACIDE - A Configurable IDE components. */
  private void buildComponents() {

    if (!AcideMenuItemsConfiguration.getInstance()
        .getMenuItemsManager()
        .getSubmenu(AcideConfigurationMenu.CONFIGURATION_MENU_NAME)
        .getSubmenu(AcideDatabasePanelMenu.DATABASE_MENU_NAME)
        .hasSubmenu(SHOW_DETAILS_NAME)) {
      AcideMenuItemsConfiguration.getInstance()
          .getMenuItemsManager()
          .getSubmenu(AcideConfigurationMenu.CONFIGURATION_MENU_NAME)
          .getSubmenu(AcideDatabasePanelMenu.DATABASE_MENU_NAME)
          .insertObject(new AcideMenuSubmenuConfiguration(SHOW_DETAILS_NAME));
    }

    Iterator<Object> it =
        AcideMenuItemsConfiguration.getInstance()
            .getMenuItemsManager()
            .getSubmenu(AcideConfigurationMenu.CONFIGURATION_MENU_NAME)
            .getSubmenu(AcideDatabasePanelMenu.DATABASE_MENU_NAME)
            .getItemsManager()
            .getSubmenu(SHOW_DETAILS_NAME)
            .getItemsManager()
            .managerIterator();

    while (it.hasNext()) {
      AcideMenuObjectConfiguration ob = (AcideMenuObjectConfiguration) it.next();
      String name = ob.getName();
      if (isOriginal(name)) {
        _insertedObjects.add(ob);
        if (ob.isSubmenu()) {
          AcideMenuSubmenuConfiguration obSubmenu = (AcideMenuSubmenuConfiguration) ob;
          _insertedMenus.put(ob.getName(), new AcideInsertedMenu(obSubmenu));
        } else {
          AcideMenuItemConfiguration obItem = (AcideMenuItemConfiguration) ob;
          _insertedItems.put(
              obItem.getName(),
              new AcideInsertedItem(IconsUtils.getIcon(obItem.getImage()), obItem));
        }
      }
    }

    _nameMenuItem = new JCheckBoxMenuItem();

    // Sets the name menu item name
    _nameMenuItem.setName(SHOW_NAME_NAME);

    _nameMenuItem.setSelected(false);

    _nameFieldsMenuItem = new JCheckBoxMenuItem();

    // Sets the name fields menu item name
    _nameFieldsMenuItem.setName(SHOW_NAME_FIELDS_NAME);

    _nameFieldsMenuItem.setSelected(false);

    _nameFieldsTypesMenuItem = new JCheckBoxMenuItem();

    // Sets the name fields types menu item name
    _nameFieldsTypesMenuItem.setName(SHOW_NAME_FIELDS_TYPES_NAME);

    _nameFieldsTypesMenuItem.setSelected(false);
  }