<s> import wx <EOL> from robotide . usages . UsageRunner import Usages <EOL> from robotide . publish . messages import RideItemNameChanged <EOL> from . kweditor import KeywordEditor <EOL> from . editors import _RobotTableEditor , FindUsagesHeader <EOL> class TestCaseEditor ( _RobotTableEditor ) : <EOL> _settings_open_id = '<STR_LIT>' <EOL> def _populate ( self ) : <EOL> self . header = self . _create_header ( self . controller . name ) <EOL> self . sizer . Add ( self . header , <NUM_LIT:0> , wx . EXPAND | wx . ALL , <NUM_LIT:5> ) <EOL> self . _add_settings ( ) <EOL> self . sizer . Add ( ( <NUM_LIT:0> , <NUM_LIT:10> ) ) <EOL> self . _create_kweditor ( ) <EOL> self . plugin . subscribe ( self . _name_changed , RideItemNameChanged ) <EOL> def _create_kweditor ( self ) : <EOL> self . kweditor = KeywordEditor ( self , self . controller , self . _tree ) <EOL> self . sizer . Add ( self . kweditor , <NUM_LIT:1> , wx . EXPAND | wx . ALL , <NUM_LIT:2> ) <EOL> self . _editors . append ( self . kweditor ) <EOL> def _name_changed ( self , data ) : <EOL> if data . item == self . controller : <EOL> self . header . SetLabel ( data . item . name ) <EOL> def close ( self ) : <EOL> for editor in self . _editors : <EOL> editor . close ( ) <EOL> _RobotTableEditor . close ( self ) <EOL> self . kweditor . close ( ) <EOL> self . plugin . unsubscribe ( self . _name_changed , RideItemNameChanged ) <EOL> def save ( self ) : <EOL> self . kweditor . save ( ) <EOL> def undo ( self ) : <EOL> self . kweditor . OnUndo ( ) <EOL> def redo ( self ) : <EOL> self . kweditor . OnRedo ( ) <EOL> def cut ( self ) : <EOL> self . kweditor . OnCut ( ) <EOL> def copy ( self ) : <EOL> self . kweditor . OnCopy ( ) <EOL> def paste ( self ) : <EOL> self . kweditor . OnPaste ( ) <EOL> def insert ( self ) : <EOL> self . kweditor . OnInsert ( ) <EOL> def insert_cells ( self ) : <EOL> self . kweditor . OnInsertCells ( ) <EOL> def delete_cells ( self ) : <EOL> self . kweditor . OnDeleteCells ( ) <EOL> def insert_rows ( self ) : <EOL> self . kweditor . OnInsertRows ( ) <EOL> def delete_rows ( self ) : <EOL> self . kweditor . OnDeleteRows ( ) <EOL> def delete ( self ) : <EOL> self . kweditor . OnDelete ( ) <EOL> def comment ( self ) : <EOL> self . kweditor . OnCommentRows ( ) <EOL> def uncomment ( self ) : <EOL> self . kweditor . OnUncommentRows ( ) <EOL> def show_content_assist ( self ) : <EOL> self . kweditor . show_content_assist ( ) <EOL> def view ( self ) : <EOL> _RobotTableEditor . view ( self ) <EOL> self . kweditor . SetFocus ( ) <EOL> class UserKeywordEditor ( TestCaseEditor ) : <EOL> _settings_open_id = '<STR_LIT>' <EOL> def _create_header ( self , name ) : <EOL> def cb ( event ) : <EOL> Usages ( self . controller , self . _tree . highlight ) . show ( ) <EOL> return FindUsagesHeader ( self , name , cb ) </s>
