# Path: commands/query_completions.py
# def get_index_file(open_tab):
#     db_table = rf_table_name(normalise_path(open_tab))
#     index_name = get_index_name(db_table)
#     index_file = path.join(
#         get_setting(SettingObject.index_dir),
#         index_name
#     )
#     if not path.exists(index_file):
#         index_file = None
#     return index_file


import sublime_plugin
import sublime
from ..setting.setting import get_setting
from ..setting.setting import SettingObject
from .query_completions import get_index_file
from ..command_helper.utils.get_text import get_line
from ..command_helper.noralize_cell import ReturnKeywordAndObject
from ..command_helper.get_metadata import get_rf_table_separator
from ..command_helper.get_documentation import GetKeywordDocumentation



class ShowKeywordDocumentation(sublime_plugin.TextCommand):

    def run(self, edit):
        w = sublime.active_window()
        panel = w.create_output_panel('kw_documentation')
        open_tab = self.view.file_name()

# Path: commands/query_completions.py
# def get_index_file(open_tab):
#     db_table = rf_table_name(normalise_path(open_tab))
#     index_name = get_index_name(db_table)
#     index_file = path.join(
#         get_setting(SettingObject.index_dir),
#         index_name
#     )
#     if not path.exists(index_file):
#         index_file = None
#     return index_file


# Path: commands/show_documentation.py
import sublime_plugin
import sublime
from ..setting.setting import get_setting
from ..setting.setting import SettingObject
from .query_completions import get_index_file
from ..command_helper.utils.get_text import get_line
from ..command_helper.noralize_cell import ReturnKeywordAndObject
from ..command_helper.get_metadata import get_rf_table_separator
from ..command_helper.get_documentation import GetKeywordDocumentation



class ShowKeywordDocumentation(sublime_plugin.TextCommand):

    def run(self, edit):
        w = sublime.active_window()
        panel = w.create_output_panel('kw_documentation')
        open_tab = self.view.file_name()

        index_file = get_index_file(open_tab)
