void (Object anObject) { if (anObject instanceof Separator) { return; } if (anObject instanceof Type) { hidePopup(); //noinspection unchecked,rawtypes TargetEnvironmentWizard wizard = ((Type)anObject).createWizard(myProject, myDefaultRuntimeType); if (wizard != null && wizard.showAndGet()) { TargetEnvironmentConfiguration newTarget = wizard.getSubject(); TargetEnvironmentsManager.getInstance(myProject).addTarget(newTarget); addTarget(newTarget, 2); setSelectedIndex(2); } return; } super.setSelectedItem(anObject); }