Triggered after code type has changed.

@author Vova Feldman (@svovaf)
@since  1.1.9.1
429007
function _after_code_type_change() {
            $this->_logger->entrance();

            if ( $this->is_theme() ) {
                // Expire the cache of the previous tabs since the theme may
                // have setting updates after code type has changed.
                $this->_cache->expire( 'tabs' );
                $this->_cache->expire( 'tabs_stylesheets' );
            }

            if ( $this->is_registered() ) {
                if ( ! $this->is_addon() ) {
                    add_action(
                        is_admin() ? 'admin_init' : 'init',
                        array( &$this, '_plugin_code_type_changed' )
                    );
                }

                if ( $this->is_premium() ) {
                    // Purge cached payments after switching to the premium version.
                    // @todo This logic doesn't handle purging the cache for serviceware module upgrade.
                    $this->get_api_user_scope()->purge_cache( "/plugins/{$this->_module_id}/payments.json?include_addons=true" );
                }
            }
        }
903493
function handleTag_code() {
    if ($this->hasParent('pre')) {
      # ignore code blocks inside <pre>
      return;
    }
    if ($this->parser->isStartTag) {
      $this->buffer();
    } else {
      $buffer = $this->unbuffer();
      # use as many backticks as needed
      preg_match_all('#`+#', $buffer, $matches);
      if (!empty($matches[0])) {
        rsort($matches[0]);

        $ticks = '`';
        while (true) {
          if (!in_array($ticks, $matches[0])) {
            break;
          }
          $ticks .= '`';
        }
      } else {
        $ticks = '`';
      }
      if ($buffer[0] == '`' || substr($buffer, -1) == '`') {
        $buffer = ' '.$buffer.' ';
      }
      $this->out($ticks.$buffer.$ticks, true);
    }
  }
390174
function ( type, data ) {
            var el = this.element();
    
            if ( typeof type === 'string' ) {
                $B.event.trigger( el, type, data );
            }
        }
342985
public void compiled(byte[] code) {
        javaByteCode = code;
        //enhancedByteCode = code;
        compiled = true;
        RythmEvents.COMPILED.trigger(engine(), code);
        enhance();
        //compiled(code, false);
    }
471701
public void initListeners() {
        schemaChangedListener.watch(ChangedType.UPDATED, ChangedType.DELETED);
        propertiesChangedListener.watch(ChangedType.UPDATED);
        authenticationChangedListener.watch(ChangedType.UPDATED);
    }
864518
protected function trigger_on_change() {
        $driver = $this->session->getDriver();
        if ($driver instanceof \Moodle\BehatExtension\Driver\MoodleSelenium2Driver) {
            $driver->triggerSynScript(
                $this->field->getXPath(),
                "Syn.trigger('change', {}, {{ELEMENT}})"
            );
        }
    }
510713
@Override
    public void contextChange(int typeOfChange, UOWScope scope) throws IllegalStateException {
        if (tc.isEntryEnabled())
            Tr.entry(tc, "contextChange", new Object[] { typeOfChange, scope, this });

        try {
            // Determine the Tx change type and process.  Ensure we do what
            // we need to do as close to the context switch as possible
            switch (typeOfChange) {
                case PRE_BEGIN:
                    uowPreBegin();
                    break;
                case POST_BEGIN:
                    uowPostBegin(scope);
                    break;
                case PRE_END:
                    uowPreEnd(scope);
                    break;
                case POST_END:
                    uowPostEnd();
                    break;
                default:
                    if (tc.isDebugEnabled())
                        Tr.debug(tc, "Unknown typeOfChange: " + typeOfChange);
            }
        } catch (IllegalStateException ise) {
            if (tc.isEntryEnabled())
                Tr.exit(tc, "contextChange", ise);
            throw ise;
        }

        if (tc.isEntryEnabled())
            Tr.exit(tc, "contextChange");
    }
741690
public function onBeforeWrite()
    {
        /** @var string $currentLocale */
        $currentLocale = FluentState::singleton()->getLocale();
        if (!$currentLocale) {
            return;
        }

        // If the record is not versioned, force change
        if (!$this->owner->hasExtension(FluentVersionedExtension::class)) {
            $this->owner->forceChange();
            return;
        }

        // Force a change if the record doesn't already exist in the current locale
        if (!$this->owner->existsInLocale($currentLocale)) {
            $this->owner->forceChange();
        }
    }
20503
function trigger(eventType, ...args) {

    let event = new Event(event);
    args.length ? event[eventType] = args : null;
    this.dispatchEvent(event);
}
787605
function () {
		var code = this.dom.q ( "code" );
		gui.DOMObserver.suspend (function () {
			Prism.highlightElement ( code );
		});
		this._hotfix ( code );
	}
963741
public function execute($code = null) {

		if(null !== $code && false === ('-' . intval($code) == '-' . $code)) {
			return trigger_error(sprintf('Argument 1 passed to %s() must be of the type integer, "%s" given', __METHOD__, gettype($code)), E_USER_ERROR);
		}

		$this -> setUrl();

		if(null !== $this -> seconds) {
			return Response :: addHeader('refresh', sprintf('%d;url=%s', $this -> seconds, $this -> url), $code);
		}

		Response :: addHeader('Location', $this -> url, $code);
	}
876943
public void detectChanges() {
        if (engine.isProdMode()) return;
        // Now check for file modification
        List<TemplateClass> modifieds = new ArrayList<TemplateClass>();
        for (TemplateClass tc : engine.classes().all()) {
            if (tc.refresh()) modifieds.add(tc);
        }
        Set<TemplateClass> modifiedWithDependencies = new HashSet<TemplateClass>();
        modifiedWithDependencies.addAll(modifieds);
        List<ClassDefinition> newDefinitions = new ArrayList<ClassDefinition>();
        boolean dirtySig = false;
        for (TemplateClass tc : modifiedWithDependencies) {
            if (tc.compile() == null) {
                engine.classes().remove(tc);
                currentState = new TemplateClassloaderState();//show others that we have changed..
            } else {
                int sigChecksum = tc.sigChecksum;
                tc.enhance();
                if (sigChecksum != tc.sigChecksum) {
                    dirtySig = true;
                }
                newDefinitions.add(new ClassDefinition(tc.javaClass, tc.enhancedByteCode));
                currentState = new TemplateClassloaderState();//show others that we have changed..
            }
        }
        if (!newDefinitions.isEmpty()) {
            throw new ClassReloadException("Need Reload");
        }
        // Check signature (variable name & annotations aware !)
        if (dirtySig) {
            throw new ClassReloadException("Signature change !");
        }

        // Now check if there is new classCache or removed classCache
        int hash = computePathHash();
        if (hash != this.pathHash) {
            // Remove class for deleted files !!
            for (TemplateClass tc : engine.classes().all()) {
                if (!tc.templateResource.isValid()) {
                    engine.classes().remove(tc);
                    currentState = new TemplateClassloaderState();//show others that we have changed..
                }
            }
            throw new ClassReloadException("Path has changed");
        }
    }
416547
def _dep_changed(self, dep, code_changed=False, value_changed=False):
        
        self.changed(code_changed, value_changed)
709602
function changeDelegatedHandler(eventOptions = {}) {
    const { key } = eventOptions;
    const def = defs.get(this);

    if (key && key in def.keys) {
        triggerOne(this, '_asterisk:set', eventOptions);
    }
}
727196
@MustBeLocked (ELockType.WRITE)
  protected final void markAsChanged ()
  {
    // Just remember that something changed
    internalSetPendingChanges (true);
    if (internalIsAutoSaveEnabled ())
    {
      // Auto save
      if (_writeToFile ().isSuccess ())
        internalSetPendingChanges (false);
      else
      {
        if (LOGGER.isErrorEnabled ())
          LOGGER.error ("The DAO of class " +
                        getClass ().getName () +
                        " still has pending changes after markAsChanged!");
      }
    }
  }
781200
function somethingChanged() {
                // don't fire events if the editor is readOnly as they are false detections
                if (editor.readOnly)
                    return;

                if (timer)
                    return;

                timer = setTimeout(function () {
                    timer = 0;
                    editor.fire('change');
                }, editor.config.minimumChangeMilliseconds || 100);
            }
301636
function (changes) {
            if (this.__isStopped) {
                this.__queuedChanges = changes.concat(this.__queuedChanges);
                return;
            }

            var sorted = this.__sortPaths();
            // var loaded = this.__textLoaded;
            var totalSelectors = 0;
            var styleBuilders = {};
            var utilsArray = ariaUtilsArray;

            for (var i = 0, len = sorted.length; i < len; i += 1) {
                var cssPath = sorted[i];
                var styleTagId = this.__styleTagAssociation[cssPath];

                if (!utilsArray.contains(changes, styleTagId)) {
                    // This tag shouldn't be updated
                    continue;
                } else if (!styleBuilders[styleTagId]) {
                    styleBuilders[styleTagId] = [];
                }

                styleBuilders[styleTagId].push("/**", cssPath, "**/", this.__textLoaded[cssPath].text);

                totalSelectors += this.__textLoaded[cssPath].lines || 0;
            }

            // IE only allows 4096 selectors, warn the user on any browser
            if (totalSelectors > 4000) {
                this.$logWarn(this.CSSTEMPLATE_MAX_SELECTORS_REACHED);
            }

            return this.__reloadStyleTags(styleBuilders);
            // returning something is important for unit tests
        }