docs: def register_view(self, view):
          """Called when the View was registered
  
          Can be used e.g. to connect signals. Here, the destroy signal is connected to close the application
          """
          super(StateEditorController, self).register_view(view)
          view.prepare_the_labels()  # the preparation of the labels is done here to take into account plugin hook changes
          view['add_input_port_button'].connect('clicked', self.inputs_ctrl.on_add)
          view['add_output_port_button'].connect('clicked', self.outputs_ctrl.on_add)
          if isinstance(self.model, ContainerStateModel):
              view['add_scoped_variable_button'].connect('clicked', self.scopes_ctrl.on_add)
  
          view['remove_input_port_button'].connect('clicked', self.inputs_ctrl.on_remove)
          view['remove_output_port_button'].connect('clicked', self.outputs_ctrl.on_remove)
          if isinstance(self.model, ContainerStateModel):
              view['remove_scoped_variable_button'].connect('clicked', self.scopes_ctrl.on_remove)
  
          if isinstance(self.model, LibraryStateModel) or self.model.state.get_next_upper_library_root_state():
              view['add_input_port_button'].set_sensitive(False)
              view['remove_input_port_button'].set_sensitive(False)
              view['add_output_port_button'].set_sensitive(False)
              view['remove_output_port_button'].set_sensitive(False)
              view['add_scoped_variable_button'].set_sensitive(False)
              view['remove_scoped_variable_button'].set_sensitive(False)
  
          view.inputs_view.show()
          view.outputs_view.show()
          view.scopes_view.show()
          view.outcomes_view.show()
          view.transitions_view.show()
          view.data_flows_view.show()
  
          # show scoped variables if show content is enabled -> if disabled the tab stays and indicates a container state
          if isinstance(self.model, LibraryStateModel) and not self.model.show_content():
              view.scopes_view.hide()
              view.linkage_overview.scope_view.hide()
  
          # Container states do not have a source editor and library states does not show there source code
          # Thus, for those states we do not have to add the source controller and can hide the source code tab
          # logger.info("init state: {0}".format(model))
          lib_with_and_ES_as_root = isinstance(self.model, LibraryStateModel) and \
                                    not isinstance(self.model.state_copy, ContainerStateModel)
          if not isinstance(self.model, ContainerStateModel) and not isinstance(self.model, LibraryStateModel) or \
                  lib_with_and_ES_as_root:
              view.source_view.show()
              if isinstance(self.model, LibraryStateModel) and not self.model.show_content():
                  view.remove_source_tab()
              view.remove_scoped_variables_tab()
          else:
              view.scopes_view.show()
              if isinstance(self.model, LibraryStateModel) and \
                      (not self.model.show_content() or not isinstance(self.model.state_copy, ContainerStateModel)):
                  view.remove_scoped_variables_tab()
              view.remove_source_tab()
  
          if global_gui_config.get_config_value("SEMANTIC_DATA_MODE", False):
              view.bring_tab_to_the_top('Semantic Data')
          else:
              if isinstance(self.model.state, LibraryState):
                  view.bring_tab_to_the_top('Description')
              else:
                  view.bring_tab_to_the_top('Linkage Overview')
  
          if isinstance(self.model, ContainerStateModel):
              self.scopes_ctrl.reload_scoped_variables_list_store()
  
          plugins.run_hook("post_state_editor_register_view", self)