JPanel () { if (myProjectGenerator instanceof PythonProjectGenerator) { // Allow generator to display custom error ((PythonProjectGenerator<?>)myProjectGenerator).setErrorCallback(this::setErrorText); } return createContentPanelWithAdvancedSettingsPanel(); }