#NEWLINE# def _get_root( self , path , aliases ) : #NEWLINE# #INDENT# " Return the effective root for a path.\n\n        If the first component of the path matches an alias, then we return\n        the value of the alias.\n\n        e.g. If the aliases are::\n\n            {'MenuBar' : 'envisage.ui.workbench.menubar'}\n\n        and the path is::\n\n           'MenuBar/File/New'\n\n        Then the effective root is::\n\n            'envisage.ui.workbench.menubar'\n\n        If the first component of the path does *not* match an alias, then it\n        is returned as is.\n\n        e.g. If the aliases are::\n\n            {'ToolBar' : 'envisage.ui.workbench.toolbar'}\n\n        and the path is::\n\n           'MenuBar/File/New'\n\n        Then the effective root is::\n\n            'MenuBar'\n\n        " #NEWLINE# components = path . split ( '/' ) #NEWLINE# if ( components [ 0 ] in aliases ) : #NEWLINE# #INDENT# root = aliases [ self [ 0 ] ] #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# root = components [ 0 ] #NEWLINE# #UNINDENT# return root