The key file is save_views.py and the run() method:
1defrun(self): 2"""Run method that loads and starts the plugin""" 3 4ifnotself.pluginIsActive: 5self.pluginIsActive=True 6 7#print "** STARTING SaveViews" 8 9# dockwidget may not exist if:10# first run of plugin11# removed on close (see self.onClosePlugin method)12ifself.dockwidget==None:13# Create the dockwidget (after translation) and keep reference14self.dockwidget=SaveViewsDockWidget()1516# connect to provide cleanup on closing of dockwidget17self.dockwidget.closingPlugin.connect(self.onClosePlugin)1819# show the dockwidget20# TODO: fix to allow choice of dock location21self.iface.addDockWidget(Qt.LeftDockWidgetArea,self.dockwidget)22self.dockwidget.show()