Notify tree view about state machine selection
348315
def state_machine_selection_changed(self, state_machine_m, signal_name, signal_msg):
        """"""
        if self.CORE_ELEMENT_CLASS in signal_msg.arg.affected_core_element_classes:
            self.update_selection_sm_prior()
1129958
public void displaySelectedURL()
    {
        dispFinished = false;
        if (treeCompWindow != null)
        {
            treeCompWindow.setVisible(false);
            treeCompWindow.dispose();
            treeCompWindow = null;
        }
        
        try {
            int i = rendererCombo.getSelectedIndex();
            if (i != -1)
            {
                BoxTreeProvider btp = rendererCombo.getItemAt(i);
                Page page = proc.renderPage(btp, ((ParamsPanel) rendererParamsPanel).getParams());
                setPage(page);
                
                if (segmAutorunCheckbox.isSelected())
                {
                    segmentPage();
                }
                if (logicalAutorunCheckbox.isSelected())
                {
                    buildLogicalTree();
                }
            }
        } catch (Exception e) {
            System.err.println("*** Error: "+e.getMessage());
            e.printStackTrace();
        }
    }
368768
def notify_state_name_change(self, model, prop_name, info):
        
        # avoid updates or checks because of execution status updates
        if is_execution_status_update_notification_from_state_machine_model(prop_name, info):
            return

        overview = NotificationOverview(info, False, self.__class__.__name__)
        changed_model = overview['model'][-1]
        method_name = overview['method_name'][-1]
        if isinstance(changed_model, AbstractStateModel) and method_name in ['name', 'script_text']:
            self.update_tab_label(changed_model)
1181717
function notify(gobj, source) {
	const state = gobj.__gawk__;

	if (source === undefined) {
		source = gobj;
	}

	// if we're paused, add this object to the list of objects that may have changed
	if (state.queue) {
		state.queue.add(gobj);
		return;
	}

	// notify all of this object's listeners
	if (state.listeners) {
		for (const [ listener, filter ] of state.listeners) {
			if (filter) {
				const { found, obj } = filterObject(gobj, filter);

				// compute the hash of the stringified value
				const hash = hashValue(obj);

				// check if the value changed
				if ((found && !state.previous) || (state.previous && hash !== state.previous.get(listener))) {
					listener(obj, source);
				}

				if (!state.previous) {
					state.previous = new WeakMap();
				}

				state.previous.set(listener, hash);
			} else {
				listener(gobj, source);
			}
		}
	}

	// notify all of this object's parents
	if (state.parents) {
		for (const parent of state.parents) {
			notify(parent, source);
		}
	}
}
538172
function () {
			var oModel = this._oDialog.getModel("view"),
				oTreeData = oModel.getProperty("/DebugModules")[0],
				sDisplayCount;
			oModel.setProperty("/CustomDebugMode", this._treeHelper.toDebugInfo(oTreeData));
			oModel.setProperty("/DebugModuleSelectionCount", this._treeHelper.getSelectionCount(oTreeData));
			sDisplayCount = oModel.getProperty("/DebugModuleSelectionCount").toString();
			oModel.setProperty("/DebugModulesTitle", this._getText("TechInfo.DebugModulesConfigPopup.SelectionCounter", sDisplayCount));
		}
932858
def watch(self, flag):
        """"""
        lib.EnvSetDefmessageHandlerWatch(
            self._env, int(flag), self._cls, self._idx)
489494
private void setSelectionStateOfAll(State state)
    {
        Objects.requireNonNull(state, "The state may not be null");
        List<Object> allNodes = JTrees.getAllNodes(getModel());
        for (Object node : allNodes)
        {
            setSelectionState(node, state);
        }
    }
840839
function (state) {
          // Keep locals around.
          inactiveStates[state.self.name] = state;
          // Notify states they are being Inactivated (i.e., a different
          // sticky state tree is now active).
          state.self.status = 'inactive';
          if (state.self.onInactivate)
            $injector.invoke(state.self.onInactivate, state.self, state.locals.globals);
        }
435103
private void setSelectionState(Object node, State state, boolean propagate)
    {
        Objects.requireNonNull(state, "The state may not be null");
        Objects.requireNonNull(node, "The node may not be null");
        State oldState = selectionStates.put(node, state);
        if (!state.equals(oldState))
        {
            fireStateChanged(node, oldState, state);
            if (propagate)
            {
                updateSelection(node);
            }
        }
        repaint();
    }
249490
def get_view_selection(self):
        """"""
        if not self.MODEL_STORAGE_ID:
            return None, None

        # avoid selection requests on empty tree views -> case warnings in gtk3
        if len(self.store) == 0:
            paths = []
        else:
            model, paths = self._tree_selection.get_selected_rows()

        # get all related models for selection from respective tree store field
        selected_model_list = []
        for path in paths:
            model = self.store[path][self.MODEL_STORAGE_ID]
            selected_model_list.append(model)
        return self._tree_selection, selected_model_list
852206
def _notify(p, **data):
    """"""
    message = data.get("message")
    if not message and not sys.stdin.isatty():
        message = click.get_text_stream("stdin").read()
    data["message"] = message

    data = clean_data(data)

    ctx = click.get_current_context()
    if ctx.obj.get("env_prefix"):
        data["env_prefix"] = ctx.obj["env_prefix"]

    rsp = p.notify(**data)
    rsp.raise_on_errors()
    click.secho(f"Succesfully sent a notification to {p.name}!", fg="green")
795847
public void visitSelect(JCFieldAccess tree) {
            if ((tree.name == names._this || tree.name == names._super) &&
                tree.selected.type.tsym != clazz &&
                outerThisStack.head != null)
                visitSymbol(outerThisStack.head);
            super.visitSelect(tree);
        }
1155039
def refresh_all(force=False):
    
    state_machines_editor_ctrl = rafcon.gui.singleton.main_window_controller.get_controller('state_machines_editor_ctrl')
    states_editor_ctrl = rafcon.gui.singleton.main_window_controller.get_controller('states_editor_ctrl')

    if force:
        pass  # no checks direct refresh
    else:

        # check if a state machine is still running
        if not is_state_machine_stopped_to_proceed(root_window=states_editor_ctrl.get_root_window()):
            return

        # check if the a dirty flag is still set
        all_tabs = list(states_editor_ctrl.tabs.values())
        all_tabs.extend(states_editor_ctrl.closed_tabs.values())
        dirty_source_editor = [tab_dict['controller'] for tab_dict in all_tabs if
                               tab_dict['source_code_view_is_dirty'] is True]
        if state_machine_manager.has_dirty_state_machine() or dirty_source_editor:

            message_string = "Are you sure you want to reload the libraries and all state machines?\n\n" \
                             "The following elements have been modified and not saved. " \
                             "These changes will get lost:"
            for sm_id, sm in state_machine_manager.state_machines.items():
                if sm.marked_dirty:
                    message_string = "%s\n* State machine #%s and name '%s'" % (
                        message_string, str(sm_id), sm.root_state.name)
            for ctrl in dirty_source_editor:
                message_string = "%s\n* Source code of state with name '%s' and path '%s'" % (
                    message_string, ctrl.model.state.name, ctrl.model.state.get_path())
            dialog = RAFCONButtonDialog(message_string, ["Reload anyway", "Cancel"],
                                        message_type=Gtk.MessageType.WARNING, parent=states_editor_ctrl.get_root_window())
            response_id = dialog.run()
            dialog.destroy()
            if response_id == 1:  # Reload anyway
                pass
            else:
                logger.debug("Refresh canceled")
                return

    library_manager.clean_loaded_libraries()
    refresh_libraries()
    states_editor_ctrl.close_all_pages()
    state_machines_editor_ctrl.refresh_all_state_machines()
895083
def _notification_stmt(self, stmt: Statement, sctx: SchemaContext) -> None:
        """"""
        self._handle_child(NotificationNode(), stmt, sctx)
1235896
def _on_selection(self):
        
        if self.value and os.path.isdir(self.value):
            self._populate_list(self.value)
        elif self._external_notification:
            self._external_notification()
1152794
private void considerNotify(ObserverWrapper observer) {
        if (!observer.mActive) {
            return;
        }
        // Check latest state b4 dispatch. Maybe it changed state but we didn't get the event yet.
        //
        // we still first check observer.active to keep it as the entrance for events. So even if
        // the observer moved to an active state, if we've not received that event, we better not
        // notify for a more predictable notification order.
        if (!observer.shouldBeActive()) {
            observer.activeStateChanged(false);
            return;
        }
        if (observer.mLastVersion >= mVersion) {
            return;
        }
        observer.mLastVersion = mVersion;
        //noinspection unchecked
        observer.mObserver.onChanged((T) mData);
    }
484809
private void fireStateChanged(Object node, State oldState, State newState)
    {
        for (StateListener stateListener : stateListeners)
        {
            stateListener.stateChanged(node, oldState, newState);
        }
    }