<s> import sys <EOL> class EditorAPI ( object ) : <EOL> def __init__ ( self ) : <EOL> self . _save_settings_job = None <EOL> self . _tools = [ ] <EOL> def add_tool ( self , tool_class ) : <EOL> self . _tools . append ( tool_class ( self ) ) <EOL> def get_current_editor_page ( self ) : <EOL> page = self . notebook . get_current_page ( ) <EOL> return page <EOL> def get_current_editor ( self ) : <EOL> page = self . notebook . get_current_page ( ) <EOL> if page is None : <EOL> return None <EOL> return page . get_text_widget ( ) <EOL> def status_message ( self , string ) : <EOL> self . statusbar . message ( string ) </s>
