JComponent () { myScopePanel.setBorder(IdeBorderFactory.createTitledBorder( CodeInsightBundle.message("analysis.scope.title", myAnalysisNoun))); myProjectButton.setText(JavaBundle.message("cyclic.dependencies.scope.dialog.project.button", myAnalysisVerb)); ButtonGroup group = new ButtonGroup(); group.add(myProjectButton); if (myModuleName != null) { myModuleButton.setText(JavaBundle.message("cyclic.dependencies.scope.dialog.module.button", myAnalysisVerb, myModuleName)); group.add(myModuleButton); } myModuleButton.setVisible(myModuleName != null); mySelectedScopeButton.setVisible(mySelectedScope != null); if (mySelectedScope != null) { mySelectedScopeButton.setText(mySelectedScope.getShortenName()); group.add(mySelectedScopeButton); } if (mySelectedScope != null) { mySelectedScopeButton.setSelected(true); } else if (myModuleName != null) { myModuleButton.setSelected(true); } else { myProjectButton.setSelected(true); } return myWholePanel; }