Closes all tabs of the states editor for a specific sm_id
1711
def close_pages_for_specific_sm_id(self, sm_id):
        """"""
        states_to_be_closed = []
        for state_identifier in self.tabs:
            state_m = self.tabs[state_identifier]["state_m"]
            if state_m.state.get_state_machine().state_machine_id == sm_id:
                states_to_be_closed.append(state_identifier)
        for state_identifier in states_to_be_closed:
            self.close_page(state_identifier, delete=False)
1348132
def close_panel(self):
        
        self.hide()
        self.lineEditReplace.clear()
        self.lineEditSearch.clear()
1200447
private static void closeAllModals_(RootPaneContainer rootPane) {
	synchronized (modals) {
	  Modal modal = modals.get(rootPane);
	  if (modal != null) {
		modal.closeAll();
		modals.remove(rootPane);
	  }
	}
  }
1292951
protected void clearEditor() {

        removeEditOverlays();
        CmsUndoRedoHandler.getInstance().clear();
        m_validationHandler.clear();
        m_entity = null;
        m_entityId = null;
        m_tabInfos = null;
        m_rootHandler = null;
        m_formPanel = null;
        m_formTabs = null;
    }
180989
private void deleteEverythingExceptNSAndSOA(String id, String name) {
    List<ActionOnResourceRecordSet> deletes = new ArrayList<ActionOnResourceRecordSet>();
    ResourceRecordSetList page = api.listResourceRecordSets(id);
    while (!page.isEmpty()) {
      for (ResourceRecordSet<?> rrset : page) {
        if (rrset.type().equals("SOA") || rrset.type().equals("NS") && rrset.name().equals(name)) {
          continue;
        }
        deletes.add(ActionOnResourceRecordSet.delete(rrset));
      }
      if (!deletes.isEmpty()) {
        api.changeResourceRecordSets(id, deletes);
      }
      if (page.next == null) {
        page.clear();
      } else {
        deletes.clear();
        page = api.listResourceRecordSets(id, page.next.name, page.next.type, page.next.identifier);
      }
    }
  }
314027
def close_right(self):
        
        current_widget = self.widget(self.tab_under_menu())
        index = self.indexOf(current_widget)
        if self._try_close_dirty_tabs(tab_range=range(index + 1, self.count())):
            while True:
                widget = self.widget(self.count() - 1)
                if widget != current_widget:
                    self.remove_tab(self.count() - 1)
                else:
                    break
635468
private void removeFromInternalState(Component panel) {
		this.fullTabList.remove(panel);
		if (this.hiddenTabs.remove(panel)) {
			handleHiddenTabListTab();
		}
	}
909838
def reset_dirty_flags(self):
        """"""
        for sm_id, sm in self.state_machines.items():
            sm.marked_dirty = False
33720
private void purge(State state) {
        StateSignature sig = state.getSignature();
        if (sig == null) {
            return;
        }
        if (state.getAcceptance() == Acceptance.TRUE) {
            throw new IllegalStateException("Attempting to purge accepting state");
        }
        if (register.remove(sig) == null) {
            return;
        }
        sig.acceptance = Acceptance.FALSE;
        for (int i = 0; i < alphabetSize; i++) {
            State succ = sig.successors.array[i];
            if (succ != null) {
                purge(succ);
            }
        }
    }
714285
def add_state_editor(self, state_m):
        
        state_identifier = self.get_state_identifier(state_m)

        if state_identifier in self.closed_tabs:
            state_editor_ctrl = self.closed_tabs[state_identifier]['controller']
            state_editor_view = state_editor_ctrl.view
            handler_id = self.closed_tabs[state_identifier]['source_code_changed_handler_id']
            source_code_view_is_dirty = self.closed_tabs[state_identifier]['source_code_view_is_dirty']
            del self.closed_tabs[state_identifier]  # pages not in self.closed_tabs and self.tabs at the same time
        else:
            state_editor_view = StateEditorView()
            if isinstance(state_m, LibraryStateModel):
                state_editor_view['main_notebook_1'].set_current_page(
                    state_editor_view['main_notebook_1'].page_num(state_editor_view.page_dict["Data Linkage"]))
            state_editor_ctrl = StateEditorController(state_m, state_editor_view)
            self.add_controller(state_identifier, state_editor_ctrl)
            if state_editor_ctrl.get_controller('source_ctrl') and state_m.state.get_next_upper_library_root_state() is None:
                # observe changed to set the mark dirty flag
                handler_id = state_editor_view.source_view.get_buffer().connect('changed', self.script_text_changed,
                                                                                state_m)
                self.view.get_top_widget().connect('draw', state_editor_view.source_view.on_draw)
            else:
                handler_id = None
            source_code_view_is_dirty = False

        (tab, inner_label, sticky_button) = create_tab_header('', self.on_tab_close_clicked,
                                                              self.on_toggle_sticky_clicked, state_m)
        set_tab_label_texts(inner_label, state_m, source_code_view_is_dirty)

        state_editor_view.get_top_widget().title_label = inner_label
        state_editor_view.get_top_widget().sticky_button = sticky_button

        page_content = state_editor_view.get_top_widget()
        page_id = self.view.notebook.prepend_page(page_content, tab)
        page = self.view.notebook.get_nth_page(page_id)
        self.view.notebook.set_tab_reorderable(page, True)
        page.show_all()

        self.view.notebook.show()
        self.tabs[state_identifier] = {'page': page, 'state_m': state_m,
                                       'controller': state_editor_ctrl, 'sm_id': self.model.selected_state_machine_id,
                                       'is_sticky': False,
                                       'source_code_view_is_dirty': source_code_view_is_dirty,
                                       'source_code_changed_handler_id': handler_id}
        return page_id
1222101
def refresh_state_machines(self, state_machine_ids):
        
        # remember current selected state machine id
        currently_selected_sm_id = None
        if self.model.get_selected_state_machine_model():
            currently_selected_sm_id = self.model.get_selected_state_machine_model().state_machine.state_machine_id

        # create a dictionary from state machine id to state machine path and one for tab page number for recovery
        state_machine_path_by_sm_id = {}
        page_num_by_sm_id = {}
        for sm_id, sm in self.model.state_machine_manager.state_machines.items():
            # the sm.base_path is only None if the state machine has never been loaded or saved before
            if sm_id in state_machine_ids and sm.file_system_path is not None:
                state_machine_path_by_sm_id[sm_id] = sm.file_system_path
                page_num_by_sm_id[sm_id] = self.get_page_num(sm_id)

        # close all state machine in list and remember if one was not closed
        for sm_id in state_machine_ids:
            was_closed = self.on_close_clicked(None, self.model.state_machines[sm_id], None, force=True)
            if not was_closed and sm_id in page_num_by_sm_id:
                logger.info("State machine with id {0} will not be re-open because was not closed.".format(sm_id))
                del state_machine_path_by_sm_id[sm_id]
                del page_num_by_sm_id[sm_id]

        # reload state machines from file system
        try:
            self.model.state_machine_manager.open_state_machines(state_machine_path_by_sm_id)
        except AttributeError as e:
            logger.warning("Not all state machines were re-open because {0}".format(e))
        import rafcon.gui.utils
        rafcon.gui.utils.wait_for_gui()  # TODO check again this is needed  to secure that all sm-models are generated

        # recover tab arrangement
        self.rearrange_state_machines(page_num_by_sm_id)

        # recover initial selected state machine and case handling if now state machine is open anymore
        if currently_selected_sm_id:
            # case if only unsaved state machines are open
            if currently_selected_sm_id in self.model.state_machine_manager.state_machines:
                self.set_active_state_machine(currently_selected_sm_id)
185474
function( editor, dialogName, tabName ) {
			var cfg = editor.config.removeDialogTabs;

			return !( cfg && cfg.match( new RegExp( '(?:^|;)' + dialogName + ':' + tabName + '(?:$|;)', 'i' ) ) );
		}
68098
void closeAllChoices() {

        if (m_choice != null) {
            m_choice.hide();
        }
        m_choice = null;
        for (CmsChoiceSubmenu submenu : new ArrayList<CmsChoiceSubmenu>(m_submenus)) {
            removeSubmenu(submenu);
        }
    }
328377
function() {
            var navHash = utils.parseNavHash();

            openSpoiler($(navHash));

            //Close other closed by default sections
            for (var i = 0; i < sectionsOnPage.length; i++) {
                var t = $(sectionsOnPage[i]);
                var tID = t.attr('id');

                if (t.attr('data-def-stat') === 'closed' && navHash !== '#' + tID) {
                    closeSpoiler(t);
                }
            }

            if (navHash !== '') {
                utils.scrollToSection(navHash);
            }
        }
52169
private void clearMemberData()
   {
      m_reader = null;
      m_eventManager = null;
      m_file = null;
      m_root = null;
      m_resourceMap = null;
      m_projectDir = null;
      m_viewDir = null;
      m_outlineCodeVarData = null;
      m_outlineCodeVarMeta = null;
      m_projectProps = null;
      m_fontBases = null;
      m_taskSubProjects = null;
      m_parentTasks = null;
      m_taskOrder = null;
      m_nullTaskOrder = null;
   }
242643
def closeEvent(self, event):
        
        dirty_widgets = []
        for w in self.widgets(include_clones=False):
            if w.dirty:
                dirty_widgets.append(w)
        filenames = []
        for w in dirty_widgets:
            if os.path.exists(w.file.path):
                filenames.append(w.file.path)
            else:
                filenames.append(w.documentTitle())
        if len(filenames) == 0:
            self.close_all()
            return
        dlg = DlgUnsavedFiles(self, files=filenames)
        if dlg.exec_() == dlg.Accepted:
            if not dlg.discarded:
                for item in dlg.listWidget.selectedItems():
                    filename = item.text()
                    widget = None
                    for widget in dirty_widgets:
                        if widget.file.path == filename or \
                                widget.documentTitle() == filename:
                            break
                    tw = widget.parent_tab_widget
                    tw.save_widget(widget)
                    tw.remove_tab(tw.indexOf(widget))
            self.close_all()
        else:
            event.ignore()
895957
private void cleanUpAction() {

        try {
            m_model.deleteDescriptorIfNecessary();
        } catch (CmsException e) {
            LOG.error(m_messages.key(Messages.ERR_DELETING_DESCRIPTOR_0), e);
        }
        // unlock resource
        m_model.unlock();
    }