WizardPopup (WizardPopup parent, PopupStep step, Object parentValue) { if (step instanceof ListPopupStep) { return new ListPopupImpl(getProject(), parent, (ListPopupStep)step, parentValue); } else if (step instanceof TreePopupStep) { return new TreePopupImpl(getProject(), parent, (TreePopupStep)step, parentValue); } else { throw new IllegalArgumentException(step.getClass().toString()); } }