def update_tool_help(self):
    self.out_text.delete('1.0', tk.END)
    for widget in self.arg_scroll_frame.winfo_children():
        widget.destroy()
    k = wbt.tool_help(self.tool_name)
    self.print_to_output(k)
    if ('proprietary' in wbt.license(self.tool_name).lower()):
        self.view_code_button['state'] = 'disabled'
    else:
        self.view_code_button['state'] = 'enabled'
    j = json.loads(wbt.tool_parameters(self.tool_name))
    param_num = 0
    for p in j['parameters']:
        json_str = json.dumps(p, sort_keys=True, indent=2, separators=(',', ': '))
        pt = p['parameter_type']
        if ('ExistingFileOrFloat' in pt):
            ff = FileOrFloat(json_str, self, self.arg_scroll_frame)
            ff.grid(row=param_num, column=0, sticky=tk.NSEW)
            param_num = (param_num + 1)
        elif (('ExistingFile' in pt) or ('NewFile' in pt) or ('Directory' in pt)):
            fs = FileSelector(json_str, self, self.arg_scroll_frame)
            fs.grid(row=param_num, column=0, sticky=tk.NSEW)
            param_num = (param_num + 1)
        elif ('FileList' in pt):
            b = MultifileSelector(json_str, self, self.arg_scroll_frame)
            b.grid(row=param_num, column=0, sticky=tk.W)
            param_num = (param_num + 1)
        elif ('Boolean' in pt):
            b = BooleanInput(json_str, self.arg_scroll_frame)
            b.grid(row=param_num, column=0, sticky=tk.W)
            param_num = (param_num + 1)
        elif ('OptionList' in pt):
            b = OptionsInput(json_str, self.arg_scroll_frame)
            b.grid(row=param_num, column=0, sticky=tk.W)
            param_num = (param_num + 1)
        elif (('Float' in pt) or ('Integer' in pt) or ('String' in pt) or ('StringOrNumber' in pt) or ('StringList' in pt) or ('VectorAttributeField' in pt)):
            b = DataInput(json_str, self.arg_scroll_frame)
            b.grid(row=param_num, column=0, sticky=tk.NSEW)
            param_num = (param_num + 1)
        else:
            messagebox.showinfo('Error', 'Unsupported parameter type: {}.'.format(pt))
    self.update_args_box()
    self.out_text.see(('%d.%d' % (1, 0)))
def update_tool_help(self):
    self.out_text.delete('1.0', tk.END)
    for widget in self.arg_scroll_frame.winfo_children():
        widget.destroy()
    k = wbt.tool_help(self.tool_name)
    self.print_to_output(k)
    if ('proprietary' in wbt.license(self.tool_name).lower()):
        self.view_code_button['state'] = 'disabled'
    else:
        self.view_code_button['state'] = 'enabled'
    j = json.loads(wbt.tool_parameters(self.tool_name))
    param_num = 0
    for p in j['parameters']:
        json_str = json.dumps(p, sort_keys=True, indent=2, separators=(',', ': '))
        pt = p['parameter_type']
        if ('ExistingFileOrFloat' in pt):
            ff = FileOrFloat(json_str, self, self.arg_scroll_frame)
            ff.grid(row=param_num, column=0, sticky=tk.NSEW)
            param_num = (param_num + 1)
        elif (('ExistingFile' in pt) or ('NewFile' in pt) or ('Directory' in pt)):
            fs = FileSelector(json_str, self, self.arg_scroll_frame)
            fs.grid(row=param_num, column=0, sticky=tk.NSEW)
            param_num = (param_num + 1)
        elif ('FileList' in pt):
            b = MultifileSelector(json_str, self, self.arg_scroll_frame)
            b.grid(row=param_num, column=0, sticky=tk.W)
            param_num = (param_num + 1)
        elif ('Boolean' in pt):
            b = BooleanInput(json_str, self.arg_scroll_frame)
            b.grid(row=param_num, column=0, sticky=tk.W)
            param_num = (param_num + 1)
        elif ('OptionList' in pt):
            b = OptionsInput(json_str, self.arg_scroll_frame)
            b.grid(row=param_num, column=0, sticky=tk.W)
            param_num = (param_num + 1)
        elif (('Float' in pt) or ('Integer' in pt) or ('String' in pt) or ('StringOrNumber' in pt) or ('StringList' in pt) or ('VectorAttributeField' in pt)):
            b = DataInput(json_str, self.arg_scroll_frame)
            b.grid(row=param_num, column=0, sticky=tk.NSEW)
            param_num = (param_num + 1)
        else:
            messagebox.showinfo('Error', 'Unsupported parameter type: {}.'.format(pt))
    self.update_args_box()
    self.out_text.see(('%d.%d' % (1, 0)))