private void updateOptionsPanel() { final FrameworkSupportNodeBase node = getSelectedNode(); if (node instanceof FrameworkSupportNode) { FrameworkSupportNode frameworkSupportNode = (FrameworkSupportNode) node; initializeOptionsPanel(frameworkSupportNode, true); showCard(frameworkSupportNode.getId()); UIUtil.setEnabled(myOptionsPanel, frameworkSupportNode.isChecked(), true); frameworkSupportNode.getConfigurable().onFrameworkSelectionChanged(node.isChecked()); } else if (node instanceof FrameworkGroupNode) { FrameworkGroup<?> group = ((FrameworkGroupNode) node).getUserObject(); initializeGroupPanel(group, true); showCard(group.getId()); UIUtil.setEnabled(myOptionsPanel, true, true); } else { showCard(EMPTY_CARD); } }
private FrameworkSupportOptionsComponent initializeOptionsPanel( final FrameworkSupportNode node, boolean addToOptions) { FrameworkSupportOptionsComponent component = myInitializedOptionsComponents.get(node); if (component == null) { final FrameworkSupportNodeBase parentNode = node.getParentNode(); if (parentNode instanceof FrameworkSupportNode) { initializeOptionsPanel((FrameworkSupportNode) parentNode, addToOptions); } else if (parentNode instanceof FrameworkGroupNode) { initializeGroupPanel(((FrameworkGroupNode) parentNode).getUserObject(), addToOptions); } component = new FrameworkSupportOptionsComponent( myModel, myLibrariesContainer, this, node.getUserObject(), node.getConfigurable()); if (addToOptions) { myOptionsPanel.add(node.getId(), wrapInScrollPane(component.getMainPanel())); } myInitializedOptionsComponents.put(node, component); } return component; }