boolean (ParametersList parametersList) { // we should remove '-m' parameter, but notify debugger of it // but we can't remove one parameter from group, so we create new parameters group int moduleParamsIndex = parametersList.getParamsGroups().indexOf(parametersList.getParamsGroup(PythonCommandLineState.GROUP_MODULE)); ParamsGroup oldModuleParams = parametersList.removeParamsGroup(moduleParamsIndex); if (oldModuleParams == null) { return false; } boolean isModule = false; ParamsGroup newModuleParams = new ParamsGroup(PythonCommandLineState.GROUP_MODULE); for (String param : oldModuleParams.getParameters()) { if (!param.equals("-m")) { newModuleParams.addParameter(param); } else { isModule = true; } } parametersList.addParamsGroupAt(moduleParamsIndex, newModuleParams); return isModule; }