<s> """<STR_LIT>""" <EOL> from envisage . api import Plugin <EOL> from pyface . workbench . api import Perspective , PerspectiveItem <EOL> from pyface . workbench . api import TraitsUIView <EOL> from traits . api import List <EOL> class LorenzPerspective ( Perspective ) : <EOL> """<STR_LIT>""" <EOL> name = '<STR_LIT>' <EOL> show_editor_area = False <EOL> contents = [ <EOL> PerspectiveItem ( id = '<STR_LIT>' ) , <EOL> PerspectiveItem ( id = '<STR_LIT>' ) <EOL> ] <EOL> class LorenzUIPlugin ( Plugin ) : <EOL> """<STR_LIT>""" <EOL> PERSPECTIVES = '<STR_LIT>' <EOL> VIEWS = '<STR_LIT>' <EOL> id = '<STR_LIT>' <EOL> name = '<STR_LIT>' <EOL> perspectives = List ( contributes_to = PERSPECTIVES ) <EOL> def _perspectives_default ( self ) : <EOL> """<STR_LIT>""" <EOL> return [ LorenzPerspective ] <EOL> views = List ( contributes_to = VIEWS ) <EOL> def _views_default ( self ) : <EOL> """<STR_LIT>""" <EOL> return [ self . _create_data_view , self . _create_plot2d_view ] <EOL> def _create_data_view ( self , ** traits ) : <EOL> """<STR_LIT>""" <EOL> from acme . lorenz . api import DataView , Lorenz <EOL> data_view = TraitsUIView ( <EOL> id = '<STR_LIT>' , <EOL> name = '<STR_LIT>' , <EOL> obj = DataView ( lorenz = self . application . get_service ( Lorenz ) ) , <EOL> ** traits <EOL> ) <EOL> return data_view <EOL> def _create_plot2d_view ( self , ** traits ) : <EOL> """<STR_LIT>""" <EOL> from acme . lorenz . api import Lorenz , Plot2DView <EOL> plot2d_view = TraitsUIView ( <EOL> id = '<STR_LIT>' , <EOL> name = '<STR_LIT>' , <EOL> obj = Plot2DView ( lorenz = self . application . get_service ( Lorenz ) ) , <EOL> ** traits <EOL> ) <EOL> return plot2d_view </s>
