boolean () { OrderEntry entry = myClasspathPanel.getSelectedEntry(); if (!(entry instanceof ModuleOrderEntry)) return false; Module module = ((ModuleOrderEntry)entry).getModule(); if (module == null) return false; ModuleRootModel model = myClasspathPanel.getModuleConfigurationState().getModulesProvider().getRootModel(module); return model.getSourceRootUrls().length == 0; }