SpacesPanelWithoutPreview (CodeStyleSettings settings) { SpacesPanelWithoutPreview spacesPanel = new SpacesPanelWithoutPreview(settings); if (spacesPanel.hasSomethingToShow()) { return spacesPanel; } Disposer.dispose(spacesPanel); return null; }