diff --git a/Modules/Wrappers/CommandLine/src/otbWrapperCommandLineLauncher.cxx b/Modules/Wrappers/CommandLine/src/otbWrapperCommandLineLauncher.cxx index 5feeacc62c66efec09457e99ff445baac16ed188..a57140e827b3ff2d3f3fd655c066627f71ce7900 100644 --- a/Modules/Wrappers/CommandLine/src/otbWrapperCommandLineLauncher.cxx +++ b/Modules/Wrappers/CommandLine/src/otbWrapperCommandLineLauncher.cxx @@ -721,11 +721,9 @@ std::string CommandLineLauncher::DisplayParameterHelp(const Parameter::Pointer & // Display the type the type ParameterType type = m_Application->GetParameterType(paramKey); - // Discard Group parameters (they don't need a value) - if (type == ParameterType_Group) - { - return ""; - } + std::string bigKey = paramKey; + + unsigned int maxKeySize = GetMaxKeySize(); bool singleSelectionForListView = false; @@ -745,10 +743,6 @@ std::string CommandLineLauncher::DisplayParameterHelp(const Parameter::Pointer & { oss << " "; } - - std::string bigKey = paramKey; - - unsigned int maxKeySize = GetMaxKeySize(); for(unsigned int i=0; i<maxKeySize-paramKey.size(); i++) bigKey.append(" "); @@ -784,6 +778,10 @@ std::string CommandLineLauncher::DisplayParameterHelp(const Parameter::Pointer & { oss << "<string list> "; } + else if(type == ParameterType_Group) + { + oss<< "<group> "; + } else itkExceptionMacro("Not handled parameter type."); @@ -831,30 +829,33 @@ std::string CommandLineLauncher::DisplayParameterHelp(const Parameter::Pointer & oss << "]"; } - if(m_Application->IsMandatory(paramKey)) - { - oss<<" (mandatory"; - } - else + if(type != ParameterType_Group) { - oss<<" (optional"; - if(m_Application->IsParameterEnabled(paramKey)) + if(m_Application->IsMandatory(paramKey)) { - oss<<", on by default"; + oss<<" (mandatory"; } else { - oss<<", off by default"; - } - } + oss<<" (optional"; - if(m_Application->HasValue(paramKey)) - { - oss<<", default value is "<<m_Application->GetParameterAsString(paramKey); + if(m_Application->IsParameterEnabled(paramKey)) + { + oss<<", on by default"; + } + else + { + oss<<", off by default"; + } + } + + if(m_Application->HasValue(paramKey)) + { + oss<<", default value is "<<m_Application->GetParameterAsString(paramKey); + } + oss<<")"; } - oss<<")"; - oss << std::endl; if(longHelp)