@Nullable private Facet getSelectedFacet() { final Object selectedObject = myStructureConfigurable.getSelectedObject(); if (selectedObject instanceof Facet) { return (Facet) selectedObject; } return null; }
@Nullable private Module getSelectedModule() { final Object selected = myStructureConfigurable.getSelectedObject(); if (selected instanceof Module) { return (Module) selected; } if (selected instanceof Facet) { return ((Facet) selected).getModule(); } return null; }