Called when the source text for a script has been updated.
508478
@Override
    public void updateSourceText(Dim.SourceInfo sourceInfo) {
        RunProxy proxy = new RunProxy(this, RunProxy.UPDATE_SOURCE_TEXT);
        proxy.sourceInfo = sourceInfo;
        SwingUtilities.invokeLater(proxy);
    }
930495
private void updateValidation() {

        boolean changed = false;
        changed |= CmsVaadinUtils.updateComponentError(m_textField, null);
        String path = getValue();
        if (!CmsStringUtil.isEmptyOrWhitespaceOnly(path)) {
            if (!m_cms.existsResource(path, CmsResourceFilter.IGNORE_EXPIRATION)) {
                ErrorMessage error = new UserError(
                    CmsVaadinUtils.getMessageText(Messages.GUI_MODULES_MODULE_RESOURCE_NOT_FOUND_0),
                    ContentMode.TEXT,
                    ErrorLevel.WARNING);
                changed |= CmsVaadinUtils.updateComponentError(m_textField, error);
            }
        }
        if (changed) {
            fireEvent(new Component.ErrorEvent(null, this));
        }
    }
1265436
function editorUpdate() {
    if (editor.binding) {
      if ('hold' === generator.clientUpdateFragmentText(editor.binding, editor.$edit.val())) {
        editor.holding = true;
      }
    }
  }
387031
def _update(self, data):
      '''
      '''
      self.bullet = data['bullet']
      self.level = data['level']
      self.text = WikiText(data['text_raw'],
                           data['text_rendered'])
75463
def on_value_changed(self, text):
        
        d = self.declaration
        with self.widget.get_member('text').suppressed(self.widget):
            d.text = text
426855
def js_update_text(self, selector, new_value, by=By.CSS_SELECTOR,
                       timeout=settings.LARGE_TIMEOUT):
        
        if self.timeout_multiplier and timeout == settings.LARGE_TIMEOUT:
            timeout = self.__get_new_timeout(timeout)
        self.set_value(
            selector, new_value, by=by, timeout=timeout)
304089
def update
      @script_author.user_id = current_user.id
      @script_author.org_id = current_user.org_id
      if @script_author.update(script_author_params)
          redirect_to script_authors_url, notice: 'Author was successfully updated.'
          else
            render :edit
      end
    end
475272
function() {
            var
              activeText   = text.active   || $module.data(metadata.storedText),
              inactiveText = text.inactive || $module.data(metadata.storedText)
            ;
            if( module.is.textEnabled() ) {
              if( module.is.active() && activeText) {
                module.verbose('Resetting active text', activeText);
                module.update.text(activeText);
              }
              else if(inactiveText) {
                module.verbose('Resetting inactive text', activeText);
                module.update.text(inactiveText);
              }
            }
          }
887847
function (fullpath, publname) {

    var curr_time = new Date();

    // store script if modified for first time
    if (fullpath !== undefined && publname !== undefined) {

        if (l_modified_scripts.hasOwnProperty(fullpath) === false) {
                            
            LOG.warn('script modified: ' + fullpath, l_name);
            l_modified_scripts[fullpath] = {
                time: new Date(curr_time.getTime() + l_reloadTime * 1000),
                name: publname
            };
        }
        // if already stored, ignore this request
        else
            return;
    }
    else {

        // check queue for scripts that can be safely reloaded
        for (var path in l_modified_scripts) {
        
            // check if wait time has expired
            if (curr_time - l_modified_scripts[path].time > 0) {

                // get public name
                var name = l_modified_scripts[path].name;
                var notify_msg = 'reloading [' + name + '] from: ' + path;
				LOG.warn(notify_msg, l_name);
				
				// send e-mail notify to project admin (only if specified)
				if (SR.Settings.NOTIFY_SCRIPT_RELOAD === true)
					UTIL.notifyAdmin('script reloading', notify_msg);

				// save current script in cache as backup
				var backup_script = require.cache[path];

                // NOTE: if 'path' is incorrect, may not delete successfully, and new script won't load
                delete require.cache[path];
				
				// NOTE: this will show false
				//LOG.warn('after delete, has path: ' + require.cache.hasOwnProperty(path), l_name);
				
                // NOTE: something can go wrong if the script is corrupt
                try {
                    // re-require
					if (l_args.hasOwnProperty(path)) {
						LOG.warn('args exist..', l_name);
						require(path)(l_args[path]);
						l_loaded[name] = require.cache[path];
					}
					else {
                    	l_loaded[name] = require(path);
						SR.Handler.add(l_loaded[name]);						
					}						
				}
                catch (e) {
					LOG.error('reload error: ', l_name);
					LOG.error(UTIL.dumpError(e), l_name);
					
					LOG.warn('restoring old script...', l_name);
					require.cache[path] = backup_script;
					l_loaded[name] = require.cache[path];
					
					// this will show 'true'
					//LOG.warn('after restore, has path: ' + require.cache.hasOwnProperty(path), l_name);         
                }

                // remove file record
                delete l_modified_scripts[path];
            }
        }
    }

    // reload myself to check later if there are scripts to be loaded
    if (Object.keys(l_modified_scripts).length > 0) {
        var timeout = l_reloadTime * 1.5 * 1000;
        LOG.sys('automatic reloading after: ' + timeout + ' ms', l_name);
        setTimeout(l_loadScript, timeout);
    }        
}
655382
def script_update(self, script: str, params: Union[dict, None], doc_id: str):
        
        body = {
            'script': {
                'source': script,
                'lang': 'painless'
            }
        }
        if params is not None:
            body['script']['params'] = params
        self.instance.update(self.index, self.doc_type, doc_id, body=body)
1124070
void saveScript() throws IOException {
		// We'll always try to read it in with the default next time its loaded
		this.charset = ExtensionScript.DEFAULT_CHARSET;
		try ( BufferedWriter bw = Files.newBufferedWriter(file.toPath(), charset)) {
			bw.append(getContents());
		}
		this.lastModified = file.lastModified();
	}
8239
def text_changed(self):
        """"""
        # Save text as bytes, if it was initially bytes
        if self.is_binary:
            self.text = to_binary_string(self.edit.toPlainText(), 'utf8')
        else:
            self.text = to_text_string(self.edit.toPlainText())
        if self.btn_save_and_close:
            self.btn_save_and_close.setEnabled(True)
            self.btn_save_and_close.setAutoDefault(True)
            self.btn_save_and_close.setDefault(True)
305546
function(oldRange, newRange, oldText, newText)
    {
        if (!this._internalTextChangeMode)
            this._textModel.resetUndoStack();
        this._mainPanel.textChanged(oldRange, newRange);
        this._gutterPanel.textChanged(oldRange, newRange);
        this._updatePanelOffsets();
    }
758485
public function onUpdate() {
    
    if (file_exists($this->savedTimestampPath)) {
      $readTimestamp = file_get_contents($this->savedTimestampPath);
      if ($readTimestamp != $this->savedTimestamp) {
        foreach ($this->clients as $sendto) {
          $sendto->send($readTimestamp);
        }
        $this->savedTimestamp = $readTimestamp;
      }
    }
    
  }
720513
function update(message) {
	clearLine(stdout, 0); // Clear current STDOUT line
	cursorTo(stdout, 0); // Place cursor at the start
	stdout.write(message.toString());
}
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);
            }
763992
def on_modified(self, event):
        
        if not self._event_error:
            self.logger.info(u"Change detected from an edit on: %s",
                             event.src_path)

            self.compile_dependencies(event.src_path)