@function
@public

Initialize tokens passed as options to plugin.

@param {Object} [optionTokens = {}] The defined tokens
331385
function init (optionTokens = {}) {
  Object.keys(optionTokens).forEach((key) => assign(key, optionTokens[key]))
}
333737
protected void initOptions() {
        if (null != toolOptions && !optionsHaveInited) {
            for (CLIToolOptions toolOpts : toolOptions) {
                toolOpts.addOptions(options);
            }
            optionsHaveInited=true;
        }
    }
1083021
function init (optionPresets = {}, optionFormats = {}) {
  Object.keys(optionPresets).forEach((key) => preset(key, optionPresets[key]))
  Object.keys(optionFormats).forEach((key) => assign(key, optionFormats[key]))
}
641002
def parse_declarations(input = @tokens, options = {})
      input = TokenScanner.new(input) unless input.is_a?(TokenScanner)
      consume_declarations(input, options)
    end
1129774
function select_token (token) {
          if (!$(input).data("settings").disabled) {
              token.addClass($(input).data("settings").classes.selectedToken);
              selected_token = token.get(0);

              // Hide input box
              input_box.val("");

              // Hide dropdown if it is visible (eg if we clicked to select token)
              hide_dropdown();
          }
      }
1081643
protected function _initOptions()
    {
        $options = [];

        if ($this->preset) {
            $options = CKEditorPresets::getPresets($this->preset);
        }

        $this->clientOptions = ArrayHelper::merge((array) $options, $this->clientOptions);
    }
1233117
function init(options) {
		//Prep and extend the options
		if (options && (options.allowPageScroll === undefined && (options.swipe !== undefined || options.swipeStatus !== undefined))) {
			options.allowPageScroll = NONE;
		}
		
        //Check for deprecated options
		//Ensure that any old click handlers are assigned to the new tap, unless we have a tap
		if(options.click!==undefined && options.tap===undefined) {
		    options.tap = options.click;
		}

		if (!options) {
			options = {};
		}
		
        //pass empty object so we dont modify the defaults
		options = $.extend({}, $.fn.swipe.defaults, options);

		//For each element instantiate the plugin
		return this.each(function () {
			var $this = $(this);

			//Check we havent already initialised the plugin
			var plugin = $this.data(PLUGIN_NS);

			if (!plugin) {
				plugin = new TouchSwipe(this, options);
				$this.data(PLUGIN_NS, plugin);
			}
		});
	}
291731
private void initAccessTokens(String accessToken, String refreshToken, Long expireTime) {
		this.accessToken = accessToken;
		this.expireTime = expireTime;		
		if (refreshToken != null) {
			this.refreshToken = refreshToken;
		}
	}
783946
function(options) {
      options = options || { };
      
      this.callSuper('initialize', options);
      
      this.set('width', options.width || 100)
          .set('height', options.height || 100);
    }
375670
def initOptions(self, options):
        
        self.setAutoIndent(             options.value('autoIndent'))
        self.setIndentationsUseTabs(    options.value('indentationsUseTabs'))
        self.setTabIndents(             options.value('tabIndents'))
        self.setTabWidth(               options.value('tabWidth'))
        
        self.setCaretLineVisible(       options.value('showCaretLine'))
        self.setShowWhitespaces(        options.value('showWhitespaces'))
        self.setMarginLineNumbers( 0,   options.value('showLineNumbers'))
        self.setIndentationGuides(      options.value('showIndentations'))
        self.setEolVisibility(          options.value('showEndlines'))
        
        if options.value('showLimitColumn'):
            self.setEdgeMode(self.EdgeLine)
            self.setEdgeColumn(options.value('limitColumn'))
        else:
            self.setEdgeMode(self.EdgeNone)
        
        if options.value('showLineWrap'):
            self.setWrapMode(self.WrapWord)
        else:
            self.setWrapMode(self.WrapNone)
        
        # set the autocompletion source
        if options.value('autoComplete'):
            self.setAutoCompletionSource(QsciScintilla.AcsAll)
        else:
            self.setAutoCompletionSource(QsciScintilla.AcsNone)
        
        self.setAutoCompletionThreshold(options.value('autoCompleteThreshold'))
        
        # update the font information
        font = options.value('documentFont')
        font.setPointSize(options.value('documentFontSize'))
        self.setFont(font)
        
        # udpate the lexer
        lexer = self.lexer()
        if lexer:
            lexer.setFont(font)
        
        # create the margin font option
        mfont = options.value('documentMarginFont')
        mfont.setPointSize(font.pointSize() - 2)
        self.setMarginsFont(mfont)
        self.setMarginWidth(0, QFontMetrics(mfont).width('0000000') + 5)
16893
private void init() {
        if (initialized) return;

        // Initialise variables
        setTokenizer(new CharacterTokenizer(Arrays.asList(',', ';'), ","));
        Editable text = getText();
        assert null != text;
        spanWatcher = new TokenSpanWatcher();
        textWatcher = new TokenTextWatcher();
        hiddenContent = null;
        countSpan = new CountSpan();

        // Initialise TextChangedListeners
        addListeners();

        setTextIsSelectable(false);
        setLongClickable(false);

        //In theory, get the soft keyboard to not supply suggestions. very unreliable
        setInputType(getInputType() |
                InputType.TYPE_TEXT_FLAG_NO_SUGGESTIONS |
                InputType.TYPE_TEXT_FLAG_AUTO_COMPLETE);
        setHorizontallyScrolling(false);

        // Listen to IME action keys
        setOnEditorActionListener(this);

        // Initialise the text filter (listens for the split chars)
        setFilters(new InputFilter[]{new InputFilter() {
            @Override
            public CharSequence filter(CharSequence source, int start, int end,
                                       Spanned dest, int destinationStart, int destinationEnd) {
                if (internalEditInProgress) {
                    return null;
                }

                // Token limit check
                if (tokenLimit != -1 && getObjects().size() == tokenLimit) {
                    return "";
                }

                //Detect split characters, remove them and complete the current token instead
                if (tokenizer.containsTokenTerminator(source)) {
                    //Only perform completion if we don't allow free form text, or if there's enough
                    //content to believe this should be a token
                    if (preventFreeFormText || currentCompletionText().length() > 0) {
                        performCompletion();
                        return "";
                    }
                }

                //We need to not do anything when we would delete the prefix
                if (destinationStart < prefix.length()) {
                    //when setText is called, which should only be called during restoring,
                    //destinationStart and destinationEnd are 0. If not checked, it will clear out
                    //the prefix.
                    //This is why we need to return null in this if condition to preserve state.
                    if (destinationStart == 0 && destinationEnd == 0) {
                        return null;
                    } else if (destinationEnd <= prefix.length()) {
                        //Don't do anything
                        return prefix.subSequence(destinationStart, destinationEnd);
                    } else {
                        //Delete everything up to the prefix
                        return prefix.subSequence(destinationStart, prefix.length());
                    }
                }
                return null;
            }
        }});

        initialized = true;
    }
1374312
@Override
    protected void initializeTokenStream( DdlTokenStream tokens ) {
        super.initializeTokenStream(tokens);
        tokens.registerKeyWords(CUSTOM_KEYWORDS);
        tokens.registerStatementStartPhrase(ALTER_PHRASES);
        tokens.registerStatementStartPhrase(CREATE_PHRASES);
        tokens.registerStatementStartPhrase(DROP_PHRASES);
        tokens.registerStatementStartPhrase(SET_PHRASES);
        tokens.registerStatementStartPhrase(MISC_PHRASES);
    }
1283277
def initialize_plugin(plugin, plugin_info, options = {})
      options = {
        :log => @log
      }.merge(options)

      unless @plugin_chain.empty?
        options.merge!(:previous_plugin => @plugin_chain.last[:plugin])
      end

      plugin.init(@config, @appliance_config, plugin_info, options)

      # Execute callbacks if implemented
      #
      # Order is very important
      [:after_init, :validate, :after_validate].each do |callback|
        plugin.send(callback) if plugin.respond_to?(callback)
      end

      param = nil

      # For operating system plugins we need to inject appliance definition.
      if plugin_info[:type] == :os
        param = @appliance_definition
      end

      @plugin_chain << {:plugin => plugin, :param => param}
    end
252039
function(options) {
        // compile regular expressions once instead of every time they are used
        this.regExes = {
            trimSpace: (/^\s*|\s*$/g),
            removeSpace: (/\s*/g),
            splitSpace: (/\s+/),
            trimComma: (/\s*,\s*/g)
        };
        OpenLayers.Format.XML.prototype.initialize.apply(this, [options]);
    }
135631
function(options) {
      options = options || { };

      this.callSuper('initialize', options);

      this.set('rx', options.rx || 0);
      this.set('ry', options.ry || 0);

      this.set('width', this.get('rx') * 2);
      this.set('height', this.get('ry') * 2);
    }
446930
def init_options(args = nil)
      @args = case args
              when nil    then []
              when String then args.split
              else             args
              end

      @options = load_config || {}

      Kat.options(@args).tap do |o|
        @options.merge!(o) { |k, ov, nv| o["#{ k }_given".intern] ? nv : ov }
      end

      Kat::Colour.colour = @options[:colour]
    rescue NoMethodError => e
      @options = {}
      warn "Wrong config file format: #{ e }"
    end
1136194
protected function initMethods()
    {
        if (empty($this->methods)) {
            return;
        }

        if (!is_array($this->methods)) {
            throw new InvalidConfigException('The "methods" option are not an array');
        }

        foreach ($this->methods as $methodName => $handler) {
            $function = $handler instanceof JsExpression ? $handler : new JsExpression($handler);
            $this->clientOptions['methods'][$methodName] = $function;
        }
    }