'Apply configuration file\'s plugin settings'

def apply_plugin_settings(self, options):

    if (self.editorstacks is not None):
        color_scheme_n = 'color_scheme_name'
        color_scheme_o = self.get_color_scheme()
        currentline_n = 'highlight_current_line'
        currentline_o = self.get_option(currentline_n)
        currentcell_n = 'highlight_current_cell'
        currentcell_o = self.get_option(currentcell_n)
        occurrence_n = 'occurrence_highlighting'
        occurrence_o = self.get_option(occurrence_n)
        occurrence_timeout_n = 'occurrence_highlighting/timeout'
        occurrence_timeout_o = self.get_option(occurrence_timeout_n)
        focus_to_editor_n = 'focus_to_editor'
        focus_to_editor_o = self.get_option(focus_to_editor_n)
        for editorstack in self.editorstacks:
            if (color_scheme_n in options):
                editorstack.set_color_scheme(color_scheme_o)
            if (currentline_n in options):
                editorstack.set_highlight_current_line_enabled(currentline_o)
            if (currentcell_n in options):
                editorstack.set_highlight_current_cell_enabled(currentcell_o)
            if (occurrence_n in options):
                editorstack.set_occurrence_highlighting_enabled(occurrence_o)
            if (occurrence_timeout_n in options):
                editorstack.set_occurrence_highlighting_timeout(occurrence_timeout_o)
            if (focus_to_editor_n in options):
                editorstack.set_focus_to_editor(focus_to_editor_o)
        fpsorting_n = 'fullpath_sorting'
        fpsorting_o = self.get_option(fpsorting_n)
        tabbar_n = 'show_tab_bar'
        tabbar_o = self.get_option(tabbar_n)
        classfuncdropdown_n = 'show_class_func_dropdown'
        classfuncdropdown_o = self.get_option(classfuncdropdown_n)
        linenb_n = 'line_numbers'
        linenb_o = self.get_option(linenb_n)
        blanks_n = 'blank_spaces'
        blanks_o = self.get_option(blanks_n)
        edgeline_n = 'edge_line'
        edgeline_o = self.get_option(edgeline_n)
        edgelinecols_n = 'edge_line_columns'
        edgelinecols_o = self.get_option(edgelinecols_n)
        wrap_n = 'wrap'
        wrap_o = self.get_option(wrap_n)
        indentguides_n = 'indent_guides'
        indentguides_o = self.get_option(indentguides_n)
        tabindent_n = 'tab_always_indent'
        tabindent_o = self.get_option(tabindent_n)
        ibackspace_n = 'intelligent_backspace'
        ibackspace_o = self.get_option(ibackspace_n)
        removetrail_n = 'always_remove_trailing_spaces'
        removetrail_o = self.get_option(removetrail_n)
        autocomp_n = 'codecompletion/auto'
        autocomp_o = self.get_option(autocomp_n)
        case_comp_n = 'codecompletion/case_sensitive'
        case_comp_o = self.get_option(case_comp_n)
        enter_key_n = 'codecompletion/enter_key'
        enter_key_o = self.get_option(enter_key_n)
        calltips_n = 'calltips'
        calltips_o = self.get_option(calltips_n)
        gotodef_n = 'go_to_definition'
        gotodef_o = self.get_option(gotodef_n)
        closepar_n = 'close_parentheses'
        closepar_o = self.get_option(closepar_n)
        close_quotes_n = 'close_quotes'
        close_quotes_o = self.get_option(close_quotes_n)
        add_colons_n = 'add_colons'
        add_colons_o = self.get_option(add_colons_n)
        autounindent_n = 'auto_unindent'
        autounindent_o = self.get_option(autounindent_n)
        indent_chars_n = 'indent_chars'
        indent_chars_o = self.get_option(indent_chars_n)
        tab_stop_width_spaces_n = 'tab_stop_width_spaces'
        tab_stop_width_spaces_o = self.get_option(tab_stop_width_spaces_n)
        help_n = 'connect_to_oi'
        help_o = CONF.get('help', 'connect/editor')
        todo_n = 'todo_list'
        todo_o = self.get_option(todo_n)
        pyflakes_n = 'code_analysis/pyflakes'
        pyflakes_o = self.get_option(pyflakes_n)
        pep8_n = 'code_analysis/pep8'
        pep8_o = self.get_option(pep8_n)
        rt_analysis_n = 'realtime_analysis'
        rt_analysis_o = self.get_option(rt_analysis_n)
        rta_timeout_n = 'realtime_analysis/timeout'
        rta_timeout_o = self.get_option(rta_timeout_n)
        finfo = self.get_current_finfo()
        if (fpsorting_n in options):
            if (self.outlineexplorer is not None):
                self.outlineexplorer.explorer.set_fullpath_sorting(fpsorting_o)
            for window in self.editorwindows:
                window.editorwidget.outlineexplorer.set_fullpath_sorting(fpsorting_o)
        for editorstack in self.editorstacks:
            if (fpsorting_n in options):
                editorstack.set_fullpath_sorting_enabled(fpsorting_o)
            if (tabbar_n in options):
                editorstack.set_tabbar_visible(tabbar_o)
            if (classfuncdropdown_n in options):
                editorstack.set_classfunc_dropdown_visible(classfuncdropdown_o)
            if (linenb_n in options):
                editorstack.set_linenumbers_enabled(linenb_o, current_finfo=finfo)
            if (blanks_n in options):
                editorstack.set_blanks_enabled(blanks_o)
                self.showblanks_action.setChecked(blanks_o)
            if (edgeline_n in options):
                editorstack.set_edgeline_enabled(edgeline_o)
            if (edgelinecols_n in options):
                editorstack.set_edgeline_columns(edgelinecols_o)
            if (indentguides_n in options):
                editorstack.set_indent_guides(indentguides_o)
            if (wrap_n in options):
                editorstack.set_wrap_enabled(wrap_o)
            if (tabindent_n in options):
                editorstack.set_tabmode_enabled(tabindent_o)
            if (ibackspace_n in options):
                editorstack.set_intelligent_backspace_enabled(ibackspace_o)
            if (removetrail_n in options):
                editorstack.set_always_remove_trailing_spaces(removetrail_o)
            if (autocomp_n in options):
                editorstack.set_codecompletion_auto_enabled(autocomp_o)
            if (case_comp_n in options):
                editorstack.set_codecompletion_case_enabled(case_comp_o)
            if (enter_key_n in options):
                editorstack.set_codecompletion_enter_enabled(enter_key_o)
            if (calltips_n in options):
                editorstack.set_calltips_enabled(calltips_o)
            if (gotodef_n in options):
                editorstack.set_go_to_definition_enabled(gotodef_o)
            if (closepar_n in options):
                editorstack.set_close_parentheses_enabled(closepar_o)
            if (close_quotes_n in options):
                editorstack.set_close_quotes_enabled(close_quotes_o)
            if (add_colons_n in options):
                editorstack.set_add_colons_enabled(add_colons_o)
            if (autounindent_n in options):
                editorstack.set_auto_unindent_enabled(autounindent_o)
            if (indent_chars_n in options):
                editorstack.set_indent_chars(indent_chars_o)
            if (tab_stop_width_spaces_n in options):
                editorstack.set_tab_stop_width_spaces(tab_stop_width_spaces_o)
            if (help_n in options):
                editorstack.set_help_enabled(help_o)
            if (todo_n in options):
                editorstack.set_todolist_enabled(todo_o, current_finfo=finfo)
            if (pyflakes_n in options):
                editorstack.set_pyflakes_enabled(pyflakes_o, current_finfo=finfo)
            if (pep8_n in options):
                editorstack.set_pep8_enabled(pep8_o, current_finfo=finfo)
            if (rt_analysis_n in options):
                editorstack.set_realtime_analysis_enabled(rt_analysis_o)
            if (rta_timeout_n in options):
                editorstack.set_realtime_analysis_timeout(rta_timeout_o)
        if (finfo is not None):
            if ((todo_n in options) and todo_o):
                finfo.run_todo_finder()
            if ((pyflakes_n in options) or (pep8_n in options)):
                finfo.run_code_analysis(pyflakes_o, pep8_o)
