private void applyLibraryOptionsForSelected() { if (myLastSelectedNode instanceof FrameworkSupportNode) { final FrameworkSupportOptionsComponent optionsComponent = myInitializedOptionsComponents.get((FrameworkSupportNode) myLastSelectedNode); if (optionsComponent != null) { final LibraryOptionsPanel optionsPanel = optionsComponent.getLibraryOptionsPanel(); if (optionsPanel != null) { optionsPanel.apply(); } } } }
public void setAssociatedFrameworks() { if (myAssociatedFrameworksPanel == null) return; for (FrameworkSupportNodeBase nodeBase : myAssociatedFrameworks) { if (nodeBase instanceof FrameworkSupportNode) { ((FrameworkSupportNode) nodeBase).getConfigurable().onFrameworkSelectionChanged(true); FrameworkSupportOptionsComponent component = initializeOptionsPanel((FrameworkSupportNode) nodeBase, false); addAssociatedFrameworkComponent(component.getMainPanel(), myAssociatedFrameworksPanel); } else { JPanel panel = initializeGroupPanel((FrameworkGroup<?>) nodeBase.getUserObject(), false); addAssociatedFrameworkComponent(panel, myAssociatedFrameworksPanel); } } }
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; }
@Nullable private LibraryCompositionSettings getLibraryCompositionSettings(FrameworkSupportNode node) { final FrameworkSupportOptionsComponent optionsComponent = myInitializedOptionsComponents.get(node); return optionsComponent != null ? optionsComponent.getLibraryCompositionSettings() : null; }