repo
stringlengths
5
67
path
stringlengths
4
116
func_name
stringlengths
0
58
original_string
stringlengths
52
373k
language
stringclasses
1 value
code
stringlengths
52
373k
code_tokens
list
docstring
stringlengths
4
11.8k
docstring_tokens
list
sha
stringlengths
40
40
url
stringlengths
86
226
partition
stringclasses
1 value
eclipse/orion.client
bundles/org.eclipse.orion.client.ui/web/orion/selection.js
function(onDone) { var result = Array.isArray(this._selections) ? this._selections.slice() : []; if (typeof onDone === "function") { //$NON-NLS-0$ onDone(result); } return result; }
javascript
function(onDone) { var result = Array.isArray(this._selections) ? this._selections.slice() : []; if (typeof onDone === "function") { //$NON-NLS-0$ onDone(result); } return result; }
[ "function", "(", "onDone", ")", "{", "var", "result", "=", "Array", ".", "isArray", "(", "this", ".", "_selections", ")", "?", "this", ".", "_selections", ".", "slice", "(", ")", ":", "[", "]", ";", "if", "(", "typeof", "onDone", "===", "\"function\"...
Obtains all current selections and passes them to the provided function. @param {Function} onDone The function to invoke with the selections. Deprecated: just use the return value instead. @returns {Array}
[ "Obtains", "all", "current", "selections", "and", "passes", "them", "to", "the", "provided", "function", "." ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.ui/web/orion/selection.js#L54-L60
train
eclipse/orion.client
bundles/org.eclipse.orion.client.webtools/web/htmlparser2/parser.js
inherits
function inherits(ctor, sctor) { ctor.prototype = Object.create(sctor.prototype); ctor._super = sctor; }
javascript
function inherits(ctor, sctor) { ctor.prototype = Object.create(sctor.prototype); ctor._super = sctor; }
[ "function", "inherits", "(", "ctor", ",", "sctor", ")", "{", "ctor", ".", "prototype", "=", "Object", ".", "create", "(", "sctor", ".", "prototype", ")", ";", "ctor", ".", "_super", "=", "sctor", ";", "}" ]
ORION shim for node.js util.inherits
[ "ORION", "shim", "for", "node", ".", "js", "util", ".", "inherits" ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.webtools/web/htmlparser2/parser.js#L175-L178
train
eclipse/orion.client
bundles/org.eclipse.orion.client.editor/web/orion/editor/eventTarget.js
function(type, listener, useCapture) { if (!this._eventTypes) { this._eventTypes = {}; } var state = this._eventTypes[type]; if (!state) { state = this._eventTypes[type] = {level: 0, listeners: []}; } var listeners = state.listeners; listeners.push({listener: listener, useCapture: useCapture}); ...
javascript
function(type, listener, useCapture) { if (!this._eventTypes) { this._eventTypes = {}; } var state = this._eventTypes[type]; if (!state) { state = this._eventTypes[type] = {level: 0, listeners: []}; } var listeners = state.listeners; listeners.push({listener: listener, useCapture: useCapture}); ...
[ "function", "(", "type", ",", "listener", ",", "useCapture", ")", "{", "if", "(", "!", "this", ".", "_eventTypes", ")", "{", "this", ".", "_eventTypes", "=", "{", "}", ";", "}", "var", "state", "=", "this", ".", "_eventTypes", "[", "type", "]", ";"...
Adds an event listener to this event target. @param {String} type The event type. @param {Function|EventListener} listener The function or the EventListener that will be executed when the event happens. @param {Boolean} [useCapture=false] <code>true</code> if the listener should be trigged in the capture phase. @see ...
[ "Adds", "an", "event", "listener", "to", "this", "event", "target", "." ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.editor/web/orion/editor/eventTarget.js#L46-L54
train
eclipse/orion.client
bundles/org.eclipse.orion.client.ui/web/orion/webui/dropdown.js
function(mouseEvent /* optional */) { var actionTaken = false; if (!this.isVisible()) { this.dispatchEvent({type: "triggered", dropdown: this, event: mouseEvent}); //$NON-NLS-0$ if (this._populate) { this.empty(); this._populate(this._dropdownNode); } var items = this.getItems(); if ...
javascript
function(mouseEvent /* optional */) { var actionTaken = false; if (!this.isVisible()) { this.dispatchEvent({type: "triggered", dropdown: this, event: mouseEvent}); //$NON-NLS-0$ if (this._populate) { this.empty(); this._populate(this._dropdownNode); } var items = this.getItems(); if ...
[ "function", "(", "mouseEvent", "/* optional */", ")", "{", "var", "actionTaken", "=", "false", ";", "if", "(", "!", "this", ".", "isVisible", "(", ")", ")", "{", "this", ".", "dispatchEvent", "(", "{", "type", ":", "\"triggered\"", ",", "dropdown", ":", ...
Open the dropdown.
[ "Open", "the", "dropdown", "." ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.ui/web/orion/webui/dropdown.js#L198-L253
train
eclipse/orion.client
bundles/org.eclipse.orion.client.ui/web/orion/webui/dropdown.js
function(mouseEvent) {//Sub classes can override this to position the drop down differently. this._dropdownNode.style.left = ""; this._dropdownNode.style.top = ""; if(this._positioningNode) { this._dropdownNode.style.left = this._positioningNode.offsetLeft + "px"; return; } var bounds = l...
javascript
function(mouseEvent) {//Sub classes can override this to position the drop down differently. this._dropdownNode.style.left = ""; this._dropdownNode.style.top = ""; if(this._positioningNode) { this._dropdownNode.style.left = this._positioningNode.offsetLeft + "px"; return; } var bounds = l...
[ "function", "(", "mouseEvent", ")", "{", "//Sub classes can override this to position the drop down differently.", "this", ".", "_dropdownNode", ".", "style", ".", "left", "=", "\"\"", ";", "this", ".", "_dropdownNode", ".", "style", ".", "top", "=", "\"\"", ";", ...
This method positions the dropdown menu. The specified mouseEvent is ignored. However, subclasses can override this method if they wish to take the mouse position contained in the mouse event into account. @param {MouseEvent} mouseEvent
[ "This", "method", "positions", "the", "dropdown", "menu", ".", "The", "specified", "mouseEvent", "is", "ignored", ".", "However", "subclasses", "can", "override", "this", "method", "if", "they", "wish", "to", "take", "the", "mouse", "position", "contained", "i...
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.ui/web/orion/webui/dropdown.js#L282-L308
train
eclipse/orion.client
bundles/org.eclipse.orion.client.ui/web/orion/webui/dropdown.js
function(restoreFocus) { var actionTaken = false; if (this.isVisible()) { this._triggerNode.classList.remove("dropdownTriggerOpen"); //$NON-NLS-0$ this._triggerNode.setAttribute("aria-expanded", "false"); //$NON-NLS-1$ //$NON-NLS-0$ if (this._selectionClass) { this._triggerNode.classList.remove(t...
javascript
function(restoreFocus) { var actionTaken = false; if (this.isVisible()) { this._triggerNode.classList.remove("dropdownTriggerOpen"); //$NON-NLS-0$ this._triggerNode.setAttribute("aria-expanded", "false"); //$NON-NLS-1$ //$NON-NLS-0$ if (this._selectionClass) { this._triggerNode.classList.remove(t...
[ "function", "(", "restoreFocus", ")", "{", "var", "actionTaken", "=", "false", ";", "if", "(", "this", ".", "isVisible", "(", ")", ")", "{", "this", ".", "_triggerNode", ".", "classList", ".", "remove", "(", "\"dropdownTriggerOpen\"", ")", ";", "//$NON-NLS...
Close the dropdown.
[ "Close", "the", "dropdown", "." ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.ui/web/orion/webui/dropdown.js#L325-L353
train
eclipse/orion.client
bundles/org.eclipse.orion.client.ui/web/orion/webui/dropdown.js
function(item, direction, select) { while (item.parentNode && (document !== item.parentNode) && item.parentNode.getAttribute("role") !== "menubar") { item = item.parentNode; } if (!item.parentNode || document === item.parentNode) { return; // item is not in a menubar } var trigger = item.childNo...
javascript
function(item, direction, select) { while (item.parentNode && (document !== item.parentNode) && item.parentNode.getAttribute("role") !== "menubar") { item = item.parentNode; } if (!item.parentNode || document === item.parentNode) { return; // item is not in a menubar } var trigger = item.childNo...
[ "function", "(", "item", ",", "direction", ",", "select", ")", "{", "while", "(", "item", ".", "parentNode", "&&", "(", "document", "!==", "item", ".", "parentNode", ")", "&&", "item", ".", "parentNode", ".", "getAttribute", "(", "\"role\"", ")", "!==", ...
Closes the menubar menu containing the specified item and opens the menu next to it in the specified direction. @param {Object} item An item within a menu @param {Integer} direction Either KEY.RIGHT or KEY.LEFT typed by user @param {Boolean} select If true, select the first item
[ "Closes", "the", "menubar", "menu", "containing", "the", "specified", "item", "and", "opens", "the", "menu", "next", "to", "it", "in", "the", "specified", "direction", "." ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.ui/web/orion/webui/dropdown.js#L504-L534
train
eclipse/orion.client
bundles/org.eclipse.orion.client.ui/web/orion/webui/dropdown.js
function(item) { var itemToSelect = item || this.getItems()[0]; if (itemToSelect) { if (this._selectedItem) { this._selectedItem.classList.remove("dropdownMenuItemSelected"); //$NON-NLS-0$ } this._selectedItem = itemToSelect; this._selectedItem.classList.add("dropdownMenuItemSelected")...
javascript
function(item) { var itemToSelect = item || this.getItems()[0]; if (itemToSelect) { if (this._selectedItem) { this._selectedItem.classList.remove("dropdownMenuItemSelected"); //$NON-NLS-0$ } this._selectedItem = itemToSelect; this._selectedItem.classList.add("dropdownMenuItemSelected")...
[ "function", "(", "item", ")", "{", "var", "itemToSelect", "=", "item", "||", "this", ".", "getItems", "(", ")", "[", "0", "]", ";", "if", "(", "itemToSelect", ")", "{", "if", "(", "this", ".", "_selectedItem", ")", "{", "this", ".", "_selectedItem", ...
Selects the specified dropdown menu item or the first dropdown menu item if none is specified. @param {Object} item The dropdown menu item that should be selected. See @ref getItems() for details. Optional.
[ "Selects", "the", "specified", "dropdown", "menu", "item", "or", "the", "first", "dropdown", "menu", "item", "if", "none", "is", "specified", "." ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.ui/web/orion/webui/dropdown.js#L541-L568
train
eclipse/orion.client
bundles/org.eclipse.orion.client.ui/web/orion/webui/dropdown.js
function(text, innerNodeType) { var li = createMenuItem(text, innerNodeType); this._dropdownNode.appendChild(li); return li; }
javascript
function(text, innerNodeType) { var li = createMenuItem(text, innerNodeType); this._dropdownNode.appendChild(li); return li; }
[ "function", "(", "text", ",", "innerNodeType", ")", "{", "var", "li", "=", "createMenuItem", "(", "text", ",", "innerNodeType", ")", ";", "this", ".", "_dropdownNode", ".", "appendChild", "(", "li", ")", ";", "return", "li", ";", "}" ]
Creates a new menu item and appends it to the bottom of this dropdown. @param {String} text The text to display inside the new menu item. Optional. @param {String} innerNodeType The type of the inner node to create. The default is "span". Optional. @returns {Object} The top-most new element that was created
[ "Creates", "a", "new", "menu", "item", "and", "appends", "it", "to", "the", "bottom", "of", "this", "dropdown", "." ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.ui/web/orion/webui/dropdown.js#L605-L609
train
eclipse/orion.client
bundles/org.eclipse.orion.client.ui/web/orion/webui/dropdown.js
createMenuItem
function createMenuItem(text, innerNodeType) { innerNodeType = innerNodeType === undefined ? "span" : innerNodeType; //$NON-NLS-0$ var element = document.createElement(innerNodeType); //$NON-NLS-0$ element.className = "dropdownMenuItem"; //$NON-NLS-0$ element.setAttribute("role", "menuitem"); //$NON-NLS-0...
javascript
function createMenuItem(text, innerNodeType) { innerNodeType = innerNodeType === undefined ? "span" : innerNodeType; //$NON-NLS-0$ var element = document.createElement(innerNodeType); //$NON-NLS-0$ element.className = "dropdownMenuItem"; //$NON-NLS-0$ element.setAttribute("role", "menuitem"); //$NON-NLS-0...
[ "function", "createMenuItem", "(", "text", ",", "innerNodeType", ")", "{", "innerNodeType", "=", "innerNodeType", "===", "undefined", "?", "\"span\"", ":", "innerNodeType", ";", "//$NON-NLS-0$", "var", "element", "=", "document", ".", "createElement", "(", "innerN...
Creates a new menu item and returns it to the caller. @param {String} text The text to display inside the new menu item. Optional. @param {String} innerNodeType The type of the inner node to create. The default is "span". Optional. @returns {Object} The top-most new element that was created
[ "Creates", "a", "new", "menu", "item", "and", "returns", "it", "to", "the", "caller", "." ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.ui/web/orion/webui/dropdown.js#L628-L649
train
eclipse/orion.client
bundles/org.eclipse.orion.client.ui/web/orion/webui/dropdown.js
appendKeyBindingString
function appendKeyBindingString(element, keyBindingString) { var span = document.createElement("span"); //$NON-NLS-0$ span.classList.add("dropdownKeyBinding"); //$NON-NLS-0$ span.appendChild(document.createTextNode(keyBindingString)); element.appendChild(span); }
javascript
function appendKeyBindingString(element, keyBindingString) { var span = document.createElement("span"); //$NON-NLS-0$ span.classList.add("dropdownKeyBinding"); //$NON-NLS-0$ span.appendChild(document.createTextNode(keyBindingString)); element.appendChild(span); }
[ "function", "appendKeyBindingString", "(", "element", ",", "keyBindingString", ")", "{", "var", "span", "=", "document", ".", "createElement", "(", "\"span\"", ")", ";", "//$NON-NLS-0$", "span", ".", "classList", ".", "add", "(", "\"dropdownKeyBinding\"", ")", "...
Appends the specified keyBindingString to the specified menu item. @param {Object} element The menu item to append the keybinding string to. Required. @param {String} keyBindingString The keybinding string to append. Required.
[ "Appends", "the", "specified", "keyBindingString", "to", "the", "specified", "menu", "item", "." ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.ui/web/orion/webui/dropdown.js#L666-L671
train
eclipse/orion.client
bundles/org.eclipse.orion.client.ui/web/orion/webui/dropdown.js
addScrollButtons
function addScrollButtons() { var dropdown = this; if(!this._topScrollButton && !this._bottomScrollButton) { // if scroll buttons haven't been made yet this._topScrollButton = document.createElement("button"); this._bottomScrollButton = document.createElement("button"); this._topScrollButton.classList.add...
javascript
function addScrollButtons() { var dropdown = this; if(!this._topScrollButton && !this._bottomScrollButton) { // if scroll buttons haven't been made yet this._topScrollButton = document.createElement("button"); this._bottomScrollButton = document.createElement("button"); this._topScrollButton.classList.add...
[ "function", "addScrollButtons", "(", ")", "{", "var", "dropdown", "=", "this", ";", "if", "(", "!", "this", ".", "_topScrollButton", "&&", "!", "this", ".", "_bottomScrollButton", ")", "{", "// if scroll buttons haven't been made yet", "this", ".", "_topScrollButt...
Adds scrolling feature to a list
[ "Adds", "scrolling", "feature", "to", "a", "list" ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.ui/web/orion/webui/dropdown.js#L676-L728
train
eclipse/orion.client
bundles/org.eclipse.orion.client.ui/web/orion/webui/dropdown.js
updateScrollButtonVisibility
function updateScrollButtonVisibility(hideAll) { if (hideAll && this._topScrollButton && this._bottomScrollButton) { this._topScrollButton.style.display = "none"; this._bottomScrollButton.style.display = "none"; } else if (!hideAll) { if (this._dropdownNode.scrollTop > 0) { this._topScrollButton.sty...
javascript
function updateScrollButtonVisibility(hideAll) { if (hideAll && this._topScrollButton && this._bottomScrollButton) { this._topScrollButton.style.display = "none"; this._bottomScrollButton.style.display = "none"; } else if (!hideAll) { if (this._dropdownNode.scrollTop > 0) { this._topScrollButton.sty...
[ "function", "updateScrollButtonVisibility", "(", "hideAll", ")", "{", "if", "(", "hideAll", "&&", "this", ".", "_topScrollButton", "&&", "this", ".", "_bottomScrollButton", ")", "{", "this", ".", "_topScrollButton", ".", "style", ".", "display", "=", "\"none\"",...
Hides or shows the scroll buttons @param {Boolean} hideAll True if hiding both buttons. Required.
[ "Hides", "or", "shows", "the", "scroll", "buttons" ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.ui/web/orion/webui/dropdown.js#L734-L753
train
eclipse/orion.client
bundles/org.eclipse.orion.client.ui/web/orion/webui/dropdown.js
positionScrollButtons
function positionScrollButtons() { this._topScrollButton.style.width = this._dropdownNode.clientWidth + 1 + "px"; this._bottomScrollButton.style.width = this._dropdownNode.clientWidth + 1 + "px"; this._topScrollButton.style.top = this._dropdownNode.style.top; this._topScrollButton.style.left = this._topScrollBu...
javascript
function positionScrollButtons() { this._topScrollButton.style.width = this._dropdownNode.clientWidth + 1 + "px"; this._bottomScrollButton.style.width = this._dropdownNode.clientWidth + 1 + "px"; this._topScrollButton.style.top = this._dropdownNode.style.top; this._topScrollButton.style.left = this._topScrollBu...
[ "function", "positionScrollButtons", "(", ")", "{", "this", ".", "_topScrollButton", ".", "style", ".", "width", "=", "this", ".", "_dropdownNode", ".", "clientWidth", "+", "1", "+", "\"px\"", ";", "this", ".", "_bottomScrollButton", ".", "style", ".", "widt...
Positions the top and bottom scroll buttons according to where the dropdown list is positioned
[ "Positions", "the", "top", "and", "bottom", "scroll", "buttons", "according", "to", "where", "the", "dropdown", "list", "is", "positioned" ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.ui/web/orion/webui/dropdown.js#L758-L765
train
eclipse/orion.client
bundles/org.eclipse.orion.client.core/web/orion/bidiFormat.js
function (text, type, args, isRtl, locale) { return getHandler(type).format(text, args, isRtl, true, locale); }
javascript
function (text, type, args, isRtl, locale) { return getHandler(type).format(text, args, isRtl, true, locale); }
[ "function", "(", "text", ",", "type", ",", "args", ",", "isRtl", ",", "locale", ")", "{", "return", "getHandler", "(", "type", ")", ".", "format", "(", "text", ",", "args", ",", "isRtl", ",", "true", ",", "locale", ")", ";", "}" ]
Returns the HTML representation of a given structured text @param text - the structured text @param type - could be one of filepath, url, email @param args - pass additional arguments to the handler. generally null. @param isRtl - indicates if the GUI is mirrored @param locale - the browser locale
[ "Returns", "the", "HTML", "representation", "of", "a", "given", "structured", "text" ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.core/web/orion/bidiFormat.js#L1319-L1321
train
eclipse/orion.client
bundles/org.eclipse.orion.client.core/web/orion/bidiFormat.js
function (element, type, args, isRtl, locale) { return attachElement(element, type, args, isRtl, locale); }
javascript
function (element, type, args, isRtl, locale) { return attachElement(element, type, args, isRtl, locale); }
[ "function", "(", "element", ",", "type", ",", "args", ",", "isRtl", ",", "locale", ")", "{", "return", "attachElement", "(", "element", ",", "type", ",", "args", ",", "isRtl", ",", "locale", ")", ";", "}" ]
Handle Structured text correct display for a given HTML element. @param element - the element : should be of type div contenteditable=true @param type - could be one of filepath, url, email @param args - pass additional arguments to the handler. generally null. @param isRtl - indicates if the GUI is mirrored @param lo...
[ "Handle", "Structured", "text", "correct", "display", "for", "a", "given", "HTML", "element", "." ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.core/web/orion/bidiFormat.js#L1330-L1332
train
eclipse/orion.client
bundles/org.eclipse.orion.client.javascript/web/eslint/lib/config/config-ops.js
function(env) { var envConfig = this.createEmptyConfig(); if (env) { envConfig.env = env; Object.keys(env).filter(function(name) { return env[name]; }).forEach(function(name) { var environment = Environments.name; if (environment) { if (environment.globals) { assign(en...
javascript
function(env) { var envConfig = this.createEmptyConfig(); if (env) { envConfig.env = env; Object.keys(env).filter(function(name) { return env[name]; }).forEach(function(name) { var environment = Environments.name; if (environment) { if (environment.globals) { assign(en...
[ "function", "(", "env", ")", "{", "var", "envConfig", "=", "this", ".", "createEmptyConfig", "(", ")", ";", "if", "(", "env", ")", "{", "envConfig", ".", "env", "=", "env", ";", "Object", ".", "keys", "(", "env", ")", ".", "filter", "(", "function"...
Creates an environment config based on the specified environments. @param {Object<string,boolean>} env The environment settings. @returns {Object} A configuration object with the appropriate rules and globals set.
[ "Creates", "an", "environment", "config", "based", "on", "the", "specified", "environments", "." ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.javascript/web/eslint/lib/config/config-ops.js#L51-L77
train
eclipse/orion.client
bundles/org.eclipse.orion.client.javascript/web/eslint/lib/config/config-ops.js
function(config) { if (config.env && typeof config.env === "object") { return this.merge(this.createEnvironmentConfig(config.env), config); } return config; }
javascript
function(config) { if (config.env && typeof config.env === "object") { return this.merge(this.createEnvironmentConfig(config.env), config); } return config; }
[ "function", "(", "config", ")", "{", "if", "(", "config", ".", "env", "&&", "typeof", "config", ".", "env", "===", "\"object\"", ")", "{", "return", "this", ".", "merge", "(", "this", ".", "createEnvironmentConfig", "(", "config", ".", "env", ")", ",",...
Given a config with environment settings, applies the globals and ecmaFeatures to the configuration and returns the result. @param {Object} config The configuration information. @returns {Object} The updated configuration information.
[ "Given", "a", "config", "with", "environment", "settings", "applies", "the", "globals", "and", "ecmaFeatures", "to", "the", "configuration", "and", "returns", "the", "result", "." ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.javascript/web/eslint/lib/config/config-ops.js#L85-L91
train
eclipse/orion.client
bundles/org.eclipse.orion.client.javascript/web/eslint/lib/config/config-ops.js
function(ruleConfig) { var severity = Array.isArray(ruleConfig) ? ruleConfig[0] : ruleConfig; if (typeof severity === "string") { severity = RULE_SEVERITY[severity.toLowerCase()] || 0; } return typeof severity === "number" && severity === 2; }
javascript
function(ruleConfig) { var severity = Array.isArray(ruleConfig) ? ruleConfig[0] : ruleConfig; if (typeof severity === "string") { severity = RULE_SEVERITY[severity.toLowerCase()] || 0; } return typeof severity === "number" && severity === 2; }
[ "function", "(", "ruleConfig", ")", "{", "var", "severity", "=", "Array", ".", "isArray", "(", "ruleConfig", ")", "?", "ruleConfig", "[", "0", "]", ":", "ruleConfig", ";", "if", "(", "typeof", "severity", "===", "\"string\"", ")", "{", "severity", "=", ...
Determines if the severity for the given rule configuration represents an error. @param {int|string|Array} ruleConfig The configuration for an individual rule. @returns {boolean} True if the rule represents an error, false if not.
[ "Determines", "if", "the", "severity", "for", "the", "given", "rule", "configuration", "represents", "an", "error", "." ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.javascript/web/eslint/lib/config/config-ops.js#L238-L247
train
eclipse/orion.client
bundles/org.eclipse.orion.client.javascript/web/eslint/lib/config/config-ops.js
function(ruleConfig) { var severity = Array.isArray(ruleConfig) ? ruleConfig[0] : ruleConfig; if (typeof severity === "string") { severity = severity.toLowerCase(); } return VALID_SEVERITIES.indexOf(severity) !== -1; }
javascript
function(ruleConfig) { var severity = Array.isArray(ruleConfig) ? ruleConfig[0] : ruleConfig; if (typeof severity === "string") { severity = severity.toLowerCase(); } return VALID_SEVERITIES.indexOf(severity) !== -1; }
[ "function", "(", "ruleConfig", ")", "{", "var", "severity", "=", "Array", ".", "isArray", "(", "ruleConfig", ")", "?", "ruleConfig", "[", "0", "]", ":", "ruleConfig", ";", "if", "(", "typeof", "severity", "===", "\"string\"", ")", "{", "severity", "=", ...
Checks whether a given config has valid severity or not. @param {number|string|Array} ruleConfig - The configuration for an individual rule. @returns {boolean} `true` if the configuration has valid severity.
[ "Checks", "whether", "a", "given", "config", "has", "valid", "severity", "or", "not", "." ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.javascript/web/eslint/lib/config/config-ops.js#L254-L261
train
eclipse/orion.client
bundles/org.eclipse.orion.client.ui/web/shell/paramType-file.js
function(promise, result, output, isProgress) { var element = document.createElement("div"); //$NON-NLS-0$ var waitCount = 0; var successFn = function(file) { this.callback = function() { var string = i18nUtil.formatMessage( messages["WroteMsg"], typeof(file) === "string" ? file : ...
javascript
function(promise, result, output, isProgress) { var element = document.createElement("div"); //$NON-NLS-0$ var waitCount = 0; var successFn = function(file) { this.callback = function() { var string = i18nUtil.formatMessage( messages["WroteMsg"], typeof(file) === "string" ? file : ...
[ "function", "(", "promise", ",", "result", ",", "output", ",", "isProgress", ")", "{", "var", "element", "=", "document", ".", "createElement", "(", "\"div\"", ")", ";", "//$NON-NLS-0$", "var", "waitCount", "=", "0", ";", "var", "successFn", "=", "function...
This function handles results of this custom type returned from commands.
[ "This", "function", "handles", "results", "of", "this", "custom", "type", "returned", "from", "commands", "." ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.ui/web/shell/paramType-file.js#L232-L333
train
eclipse/orion.client
bundles/org.eclipse.orion.client.ui/web/orion/compare/diffParser.js
function(hunkRangeNo ){ var lastToken = " "; //$NON-NLS-0$ var startNo = this._hunkRanges[hunkRangeNo][0] + 1; var endNo = (hunkRangeNo === (this._hunkRanges.length - 1) ) ? this._diffContents.length : this._hunkRanges[hunkRangeNo+1][0]; var oCursor = 0; var nCursor = 0; var oBlkStart = this._hunkRan...
javascript
function(hunkRangeNo ){ var lastToken = " "; //$NON-NLS-0$ var startNo = this._hunkRanges[hunkRangeNo][0] + 1; var endNo = (hunkRangeNo === (this._hunkRanges.length - 1) ) ? this._diffContents.length : this._hunkRanges[hunkRangeNo+1][0]; var oCursor = 0; var nCursor = 0; var oBlkStart = this._hunkRan...
[ "function", "(", "hunkRangeNo", ")", "{", "var", "lastToken", "=", "\" \"", ";", "//$NON-NLS-0$", "var", "startNo", "=", "this", ".", "_hunkRanges", "[", "hunkRangeNo", "]", "[", "0", "]", "+", "1", ";", "var", "endNo", "=", "(", "hunkRangeNo", "===", ...
read line by line in a hunk range
[ "read", "line", "by", "line", "in", "a", "hunk", "range" ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.ui/web/orion/compare/diffParser.js#L221-L307
train
eclipse/orion.client
bundles/org.eclipse.orion.client.ui/web/orion/compare/diffParser.js
function(body , retVal){ if( body ){ var number = parseInt(body, 10); retVal.push( number >= 0 ? number : 1); } else { retVal.push(1); } }
javascript
function(body , retVal){ if( body ){ var number = parseInt(body, 10); retVal.push( number >= 0 ? number : 1); } else { retVal.push(1); } }
[ "function", "(", "body", ",", "retVal", ")", "{", "if", "(", "body", ")", "{", "var", "number", "=", "parseInt", "(", "body", ",", "10", ")", ";", "retVal", ".", "push", "(", "number", ">=", "0", "?", "number", ":", "1", ")", ";", "}", "else", ...
In many versions of GNU diff, each range can omit the comma and trailing value s, in which case s defaults to 1.
[ "In", "many", "versions", "of", "GNU", "diff", "each", "range", "can", "omit", "the", "comma", "and", "trailing", "value", "s", "in", "which", "case", "s", "defaults", "to", "1", "." ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.ui/web/orion/compare/diffParser.js#L394-L401
train
eclipse/orion.client
modules/orionode/lib/graceful-cluster/graceful-cluster.js
checkRestartQueue
function checkRestartQueue() { // Kill one worker only if maximum count are working. if (restartQueue.length > 0 && listeningWorkersCount === workersCount && !currentRestartingPid) { var pid = restartQueue.shift(); try { // Store process id to ...
javascript
function checkRestartQueue() { // Kill one worker only if maximum count are working. if (restartQueue.length > 0 && listeningWorkersCount === workersCount && !currentRestartingPid) { var pid = restartQueue.shift(); try { // Store process id to ...
[ "function", "checkRestartQueue", "(", ")", "{", "// Kill one worker only if maximum count are working.", "if", "(", "restartQueue", ".", "length", ">", "0", "&&", "listeningWorkersCount", "===", "workersCount", "&&", "!", "currentRestartingPid", ")", "{", "var", "pid", ...
Prevent killing all workers at same time when restarting.
[ "Prevent", "killing", "all", "workers", "at", "same", "time", "when", "restarting", "." ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/modules/orionode/lib/graceful-cluster/graceful-cluster.js#L54-L78
train
eclipse/orion.client
modules/orionode/lib/graceful-cluster/graceful-cluster.js
fork
function fork() { cluster.fork().on('message', function(message) { if (message.cmd === 'restart' && message.pid && restartQueue.indexOf(message.pid) === -1) { // When worker asks to restart gracefully in cluster, then add it to restart queue. log('Clus...
javascript
function fork() { cluster.fork().on('message', function(message) { if (message.cmd === 'restart' && message.pid && restartQueue.indexOf(message.pid) === -1) { // When worker asks to restart gracefully in cluster, then add it to restart queue. log('Clus...
[ "function", "fork", "(", ")", "{", "cluster", ".", "fork", "(", ")", ".", "on", "(", "'message'", ",", "function", "(", "message", ")", "{", "if", "(", "message", ".", "cmd", "===", "'restart'", "&&", "message", ".", "pid", "&&", "restartQueue", ".",...
Create fork with 'on restart' message event listener.
[ "Create", "fork", "with", "on", "restart", "message", "event", "listener", "." ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/modules/orionode/lib/graceful-cluster/graceful-cluster.js#L81-L90
train
eclipse/orion.client
modules/orionode/lib/graceful-cluster/graceful-cluster.js
checkIfNoWorkersAndExit
function checkIfNoWorkersAndExit() { if (!currentWorkersCount) { log('Cluster graceful shutdown: done.'); if (shutdownTimer) clearTimeout(shutdownTimer); exitFunction(); } else { log('Cluster graceful shutdown: wait ' + currentWorke...
javascript
function checkIfNoWorkersAndExit() { if (!currentWorkersCount) { log('Cluster graceful shutdown: done.'); if (shutdownTimer) clearTimeout(shutdownTimer); exitFunction(); } else { log('Cluster graceful shutdown: wait ' + currentWorke...
[ "function", "checkIfNoWorkersAndExit", "(", ")", "{", "if", "(", "!", "currentWorkersCount", ")", "{", "log", "(", "'Cluster graceful shutdown: done.'", ")", ";", "if", "(", "shutdownTimer", ")", "clearTimeout", "(", "shutdownTimer", ")", ";", "exitFunction", "(",...
Check if has alive workers and exit.
[ "Check", "if", "has", "alive", "workers", "and", "exit", "." ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/modules/orionode/lib/graceful-cluster/graceful-cluster.js#L98-L106
train
eclipse/orion.client
bundles/org.eclipse.orion.client.webtools/web/csslint/csslint.js
function(){ /* * media_query_list * : S* [media_query [ ',' S* media_query ]* ]? * ; */ var tokenStream = this._tokenStream, mediaList = []; this._readWhitespace(); ...
javascript
function(){ /* * media_query_list * : S* [media_query [ ',' S* media_query ]* ]? * ; */ var tokenStream = this._tokenStream, mediaList = []; this._readWhitespace(); ...
[ "function", "(", ")", "{", "/*\n * media_query_list\n * : S* [media_query [ ',' S* media_query ]* ]?\n * ;\n */", "var", "tokenStream", "=", "this", ".", "_tokenStream", ",", "mediaList", "=", "[", "]", ";", "this"...
CSS3 Media Queries
[ "CSS3", "Media", "Queries" ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.webtools/web/csslint/csslint.js#L1408-L1427
train
eclipse/orion.client
bundles/org.eclipse.orion.client.webtools/web/csslint/csslint.js
function(){ /* * ruleset * : selectors_group * '{' S* declaration? [ ';' S* declaration? ]* '}' S* * ; */ var tokenStream = this._tokenStream, tt, selecto...
javascript
function(){ /* * ruleset * : selectors_group * '{' S* declaration? [ ';' S* declaration? ]* '}' S* * ; */ var tokenStream = this._tokenStream, tt, selecto...
[ "function", "(", ")", "{", "/*\n * ruleset\n * : selectors_group\n * '{' S* declaration? [ ';' S* declaration? ]* '}' S*\n * ;\n */", "var", "tokenStream", "=", "this", ".", "_tokenStream", ",", "tt", "...
Augmented with CSS3 Selectors
[ "Augmented", "with", "CSS3", "Selectors" ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.webtools/web/csslint/csslint.js#L1990-L2068
train
eclipse/orion.client
bundles/org.eclipse.orion.client.webtools/web/csslint/csslint.js
function(checkStart, readMargins){ /* * Reads the pattern * S* '{' S* declaration [ ';' S* declaration ]* '}' S* * or * S* '{' S* [ declaration | margin ]? [ ';' S* [ declaration | margin ]? ]* '}' S* * Note that this i...
javascript
function(checkStart, readMargins){ /* * Reads the pattern * S* '{' S* declaration [ ';' S* declaration ]* '}' S* * or * S* '{' S* [ declaration | margin ]? [ ';' S* [ declaration | margin ]? ]* '}' S* * Note that this i...
[ "function", "(", "checkStart", ",", "readMargins", ")", "{", "/*\n * Reads the pattern\n * S* '{' S* declaration [ ';' S* declaration ]* '}' S*\n * or\n * S* '{' S* [ declaration | margin ]? [ ';' S* [ declaration | margin ]? ]* '}' S*\n ...
Not part of CSS grammar, but this pattern occurs frequently in the official CSS grammar. Split out here to eliminate duplicate code. @param {Boolean} checkStart Indicates if the rule should check for the left brace at the beginning. @param {Boolean} readMargins Indicates if the rule should check for margin patterns. @r...
[ "Not", "part", "of", "CSS", "grammar", "but", "this", "pattern", "occurs", "frequently", "in", "the", "official", "CSS", "grammar", ".", "Split", "out", "here", "to", "eliminate", "duplicate", "code", "." ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.webtools/web/csslint/csslint.js#L3244-L3321
train
eclipse/orion.client
bundles/org.eclipse.orion.client.webtools/web/csslint/csslint.js
function(){ var tokenStream = this._tokenStream, ws = ""; while(tokenStream.match(Tokens.S)){ ws += tokenStream.token().value; } return ws; }
javascript
function(){ var tokenStream = this._tokenStream, ws = ""; while(tokenStream.match(Tokens.S)){ ws += tokenStream.token().value; } return ws; }
[ "function", "(", ")", "{", "var", "tokenStream", "=", "this", ".", "_tokenStream", ",", "ws", "=", "\"\"", ";", "while", "(", "tokenStream", ".", "match", "(", "Tokens", ".", "S", ")", ")", "{", "ws", "+=", "tokenStream", ".", "token", "(", ")", "....
In some cases, you can end up with two white space tokens in a row. Instead of making a change in every function that looks for white space, this function is used to match as much white space as necessary. @method _readWhitespace @return {String} The white space if found, empty string if not. @private
[ "In", "some", "cases", "you", "can", "end", "up", "with", "two", "white", "space", "tokens", "in", "a", "row", ".", "Instead", "of", "making", "a", "change", "in", "every", "function", "that", "looks", "for", "white", "space", "this", "function", "is", ...
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.webtools/web/csslint/csslint.js#L3332-L3342
train
eclipse/orion.client
bundles/org.eclipse.orion.client.webtools/web/csslint/csslint.js
function(token){ throw new SyntaxError("Unexpected token '" + token.value + "' at line " + token.startLine + ", col " + token.startCol + ".", token.startLine, token.startCol); }
javascript
function(token){ throw new SyntaxError("Unexpected token '" + token.value + "' at line " + token.startLine + ", col " + token.startCol + ".", token.startLine, token.startCol); }
[ "function", "(", "token", ")", "{", "throw", "new", "SyntaxError", "(", "\"Unexpected token '\"", "+", "token", ".", "value", "+", "\"' at line \"", "+", "token", ".", "startLine", "+", "\", col \"", "+", "token", ".", "startCol", "+", "\".\"", ",", "token",...
Throws an error when an unexpected token is found. @param {Object} token The token that was found. @method _unexpectedToken @return {void} @private
[ "Throws", "an", "error", "when", "an", "unexpected", "token", "is", "found", "." ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.webtools/web/csslint/csslint.js#L3352-L3354
train
eclipse/orion.client
bundles/org.eclipse.orion.client.webtools/web/csslint/csslint.js
SelectorSubPart
function SelectorSubPart(text, type, line, col) { SyntaxUnit.call(this, text, line, col, Parser.SELECTOR_SUB_PART_TYPE); /** * The type of modifier. * @type String * @property type */ this.type = type; /** * Some subparts have arguments, this represents them. * @type Arr...
javascript
function SelectorSubPart(text, type, line, col) { SyntaxUnit.call(this, text, line, col, Parser.SELECTOR_SUB_PART_TYPE); /** * The type of modifier. * @type String * @property type */ this.type = type; /** * Some subparts have arguments, this represents them. * @type Arr...
[ "function", "SelectorSubPart", "(", "text", ",", "type", ",", "line", ",", "col", ")", "{", "SyntaxUnit", ".", "call", "(", "this", ",", "text", ",", "line", ",", "col", ",", "Parser", ".", "SELECTOR_SUB_PART_TYPE", ")", ";", "/**\n * The type of modifie...
Represents a selector modifier string, meaning a class name, element name, element ID, pseudo rule, etc. @namespace parserlib.css @class SelectorSubPart @extends parserlib.util.SyntaxUnit @constructor @param {String} text The text representation of the unit. @param {String} type The type of selector modifier. @param {i...
[ "Represents", "a", "selector", "modifier", "string", "meaning", "a", "class", "name", "element", "name", "element", "ID", "pseudo", "rule", "etc", "." ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.webtools/web/csslint/csslint.js#L4599-L4617
train
eclipse/orion.client
bundles/org.eclipse.orion.client.webtools/web/csslint/csslint.js
function(other) { var comps = ["a", "b", "c", "d"], i, len; for (i=0, len=comps.length; i < len; i++) { if (this[comps[i]] < other[comps[i]]) { return -1; } else if (this[comps[i]] > other[comps[i]]) { return 1; } }...
javascript
function(other) { var comps = ["a", "b", "c", "d"], i, len; for (i=0, len=comps.length; i < len; i++) { if (this[comps[i]] < other[comps[i]]) { return -1; } else if (this[comps[i]] > other[comps[i]]) { return 1; } }...
[ "function", "(", "other", ")", "{", "var", "comps", "=", "[", "\"a\"", ",", "\"b\"", ",", "\"c\"", ",", "\"d\"", "]", ",", "i", ",", "len", ";", "for", "(", "i", "=", "0", ",", "len", "=", "comps", ".", "length", ";", "i", "<", "len", ";", ...
Compare this specificity to another. @param {Specificity} other The other specificity to compare to. @return {int} -1 if the other specificity is larger, 1 if smaller, 0 if equal. @method compare
[ "Compare", "this", "specificity", "to", "another", "." ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.webtools/web/csslint/csslint.js#L4657-L4670
train
eclipse/orion.client
bundles/org.eclipse.orion.client.webtools/web/csslint/csslint.js
function(c, startLine, startCol) { var reader = this._reader, comparison = c + reader.read(), tt = Tokens.type(comparison) || Tokens.CHAR; return this.createToken(tt, comparison, startLine, startCol); }
javascript
function(c, startLine, startCol) { var reader = this._reader, comparison = c + reader.read(), tt = Tokens.type(comparison) || Tokens.CHAR; return this.createToken(tt, comparison, startLine, startCol); }
[ "function", "(", "c", ",", "startLine", ",", "startCol", ")", "{", "var", "reader", "=", "this", ".", "_reader", ",", "comparison", "=", "c", "+", "reader", ".", "read", "(", ")", ",", "tt", "=", "Tokens", ".", "type", "(", "comparison", ")", "||",...
Produces a comparison token based on the given character and location in the stream. The next character must be read and is already known to be an equals sign. @param {String} c The character for the token. @param {int} startLine The beginning line for the character. @param {int} startCol The beginning column for the c...
[ "Produces", "a", "comparison", "token", "based", "on", "the", "given", "character", "and", "location", "in", "the", "stream", ".", "The", "next", "character", "must", "be", "read", "and", "is", "already", "known", "to", "be", "an", "equals", "sign", "." ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.webtools/web/csslint/csslint.js#L5209-L5215
train
eclipse/orion.client
bundles/org.eclipse.orion.client.webtools/web/csslint/csslint.js
function(first, startLine, startCol) { var reader = this._reader, value = this.readNumber(first), ident, tt = Tokens.NUMBER, c = reader.peek(); if (isIdentStart(c)) { ident = this.readName(reader.read()); value += ide...
javascript
function(first, startLine, startCol) { var reader = this._reader, value = this.readNumber(first), ident, tt = Tokens.NUMBER, c = reader.peek(); if (isIdentStart(c)) { ident = this.readName(reader.read()); value += ide...
[ "function", "(", "first", ",", "startLine", ",", "startCol", ")", "{", "var", "reader", "=", "this", ".", "_reader", ",", "value", "=", "this", ".", "readNumber", "(", "first", ")", ",", "ident", ",", "tt", "=", "Tokens", ".", "NUMBER", ",", "c", "...
Produces a number token based on the given character and location in the stream. This may return a token of NUMBER, EMS, EXS, LENGTH, ANGLE, TIME, FREQ, DIMENSION, or PERCENTAGE. @param {String} first The first character for the token. @param {int} startLine The beginning line for the character. @param {int} startCol T...
[ "Produces", "a", "number", "token", "based", "on", "the", "given", "character", "and", "location", "in", "the", "stream", ".", "This", "may", "return", "a", "token", "of", "NUMBER", "EMS", "EXS", "LENGTH", "ANGLE", "TIME", "FREQ", "DIMENSION", "or", "PERCE...
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.webtools/web/csslint/csslint.js#L5426-L5457
train
eclipse/orion.client
bundles/org.eclipse.orion.client.webtools/web/csslint/csslint.js
function(first, startLine, startCol) { var value = first + this.readWhitespace(); return this.createToken(Tokens.S, value, startLine, startCol); }
javascript
function(first, startLine, startCol) { var value = first + this.readWhitespace(); return this.createToken(Tokens.S, value, startLine, startCol); }
[ "function", "(", "first", ",", "startLine", ",", "startCol", ")", "{", "var", "value", "=", "first", "+", "this", ".", "readWhitespace", "(", ")", ";", "return", "this", ".", "createToken", "(", "Tokens", ".", "S", ",", "value", ",", "startLine", ",", ...
Produces a S token based on the specified information. Since whitespace may have multiple characters, this consumes all whitespace characters into a single token. @param {String} first The first character in the token. @param {int} startLine The beginning line for the character. @param {int} startCol The beginning colu...
[ "Produces", "a", "S", "token", "based", "on", "the", "specified", "information", ".", "Since", "whitespace", "may", "have", "multiple", "characters", "this", "consumes", "all", "whitespace", "characters", "into", "a", "single", "token", "." ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.webtools/web/csslint/csslint.js#L5579-L5582
train
eclipse/orion.client
bundles/org.eclipse.orion.client.webtools/web/csslint/csslint.js
function(first) { var reader = this._reader, url = first || "", c; for (c = reader.peek(); c; c = reader.peek()) { // Note that the grammar at // https://www.w3.org/TR/CSS2/grammar.html#scanner // incorrectly includes the backslash charac...
javascript
function(first) { var reader = this._reader, url = first || "", c; for (c = reader.peek(); c; c = reader.peek()) { // Note that the grammar at // https://www.w3.org/TR/CSS2/grammar.html#scanner // incorrectly includes the backslash charac...
[ "function", "(", "first", ")", "{", "var", "reader", "=", "this", ".", "_reader", ",", "url", "=", "first", "||", "\"\"", ",", "c", ";", "for", "(", "c", "=", "reader", ".", "peek", "(", ")", ";", "c", ";", "c", "=", "reader", ".", "peek", "(...
This method never fails, although it may return an empty string.
[ "This", "method", "never", "fails", "although", "it", "may", "return", "an", "empty", "string", "." ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.webtools/web/csslint/csslint.js#L5704-L5730
train
eclipse/orion.client
bundles/org.eclipse.orion.client.webtools/web/csslint/csslint.js
SyntaxError
function SyntaxError(message, line, col) { Error.call(this); this.name = this.constructor.name; /** * The column at which the error occurred. * @type int * @property col */ this.col = col; /** * The line at which the error occurred. * @type int * @property line ...
javascript
function SyntaxError(message, line, col) { Error.call(this); this.name = this.constructor.name; /** * The column at which the error occurred. * @type int * @property col */ this.col = col; /** * The line at which the error occurred. * @type int * @property line ...
[ "function", "SyntaxError", "(", "message", ",", "line", ",", "col", ")", "{", "Error", ".", "call", "(", "this", ")", ";", "this", ".", "name", "=", "this", ".", "constructor", ".", "name", ";", "/**\n * The column at which the error occurred.\n * @type ...
Type to use when a syntax error occurs. @class SyntaxError @namespace parserlib.util @constructor @param {String} message The error message. @param {int} line The line at which the error occurred. @param {int} col The column at which the error occurred.
[ "Type", "to", "use", "when", "a", "syntax", "error", "occurs", "." ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.webtools/web/csslint/csslint.js#L7038-L7063
train
eclipse/orion.client
bundles/org.eclipse.orion.client.webtools/web/csslint/csslint.js
function(index) { var total = index, tt; if (index > 0) { //TODO: Store 5 somewhere if (index > 5) { throw new Error("Too much lookahead."); } //get all those tokens while (total) { tt = this.get(); ...
javascript
function(index) { var total = index, tt; if (index > 0) { //TODO: Store 5 somewhere if (index > 5) { throw new Error("Too much lookahead."); } //get all those tokens while (total) { tt = this.get(); ...
[ "function", "(", "index", ")", "{", "var", "total", "=", "index", ",", "tt", ";", "if", "(", "index", ">", "0", ")", "{", "//TODO: Store 5 somewhere", "if", "(", "index", ">", "5", ")", "{", "throw", "new", "Error", "(", "\"Too much lookahead.\"", ")",...
Looks ahead a certain number of tokens and returns the token type at that position. This will throw an error if you lookahead past the end of input, past the size of the lookahead buffer, or back past the first token in the lookahead buffer. @param {int} The index of the token type to retrieve. 0 for the current token,...
[ "Looks", "ahead", "a", "certain", "number", "of", "tokens", "and", "returns", "the", "token", "type", "at", "that", "position", ".", "This", "will", "throw", "an", "error", "if", "you", "lookahead", "past", "the", "end", "of", "input", "past", "the", "si...
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.webtools/web/csslint/csslint.js#L7438-L7472
train
eclipse/orion.client
bundles/org.eclipse.orion.client.webtools/web/csslint/csslint.js
applyEmbeddedRuleset
function applyEmbeddedRuleset(text, ruleset) { var valueMap, embedded = text && text.match(embeddedRuleset), rules = embedded && embedded[1]; if (rules) { valueMap = { "true": 2, // true is error "": 1, // blank is warning ...
javascript
function applyEmbeddedRuleset(text, ruleset) { var valueMap, embedded = text && text.match(embeddedRuleset), rules = embedded && embedded[1]; if (rules) { valueMap = { "true": 2, // true is error "": 1, // blank is warning ...
[ "function", "applyEmbeddedRuleset", "(", "text", ",", "ruleset", ")", "{", "var", "valueMap", ",", "embedded", "=", "text", "&&", "text", ".", "match", "(", "embeddedRuleset", ")", ",", "rules", "=", "embedded", "&&", "embedded", "[", "1", "]", ";", "if"...
Returns a ruleset object based on embedded rules. @param {String} text A string of css containing embedded rules. @param {Object} ruleset A ruleset object to modify. @return {Object} A ruleset object. @method getEmbeddedRuleset
[ "Returns", "a", "ruleset", "object", "based", "on", "embedded", "rules", "." ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.webtools/web/csslint/csslint.js#L7913-L7940
train
eclipse/orion.client
bundles/org.eclipse.orion.client.webtools/web/csslint/csslint.js
Reporter
function Reporter(lines, ruleset, allow, ignore) { "use strict"; /** * List of messages being reported. * @property messages * @type String[] */ this.messages = []; /** * List of statistics being reported. * @property stats * @type String[] */ this.stats = [...
javascript
function Reporter(lines, ruleset, allow, ignore) { "use strict"; /** * List of messages being reported. * @property messages * @type String[] */ this.messages = []; /** * List of statistics being reported. * @property stats * @type String[] */ this.stats = [...
[ "function", "Reporter", "(", "lines", ",", "ruleset", ",", "allow", ",", "ignore", ")", "{", "\"use strict\"", ";", "/**\n * List of messages being reported.\n * @property messages\n * @type String[]\n */", "this", ".", "messages", "=", "[", "]", ";", "/**...
An instance of Report is used to report results of the verification back to the main API. @class Reporter @constructor @param {String[]} lines The text lines of the source. @param {Object} ruleset The set of rules to work with, including if they are errors or warnings. @param {Object} explicitly allowed lines @param {[...
[ "An", "instance", "of", "Report", "is", "used", "to", "report", "results", "of", "the", "verification", "back", "to", "the", "main", "API", "." ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.webtools/web/csslint/csslint.js#L8141-L8193
train
eclipse/orion.client
bundles/org.eclipse.orion.client.webtools/web/csslint/csslint.js
function(message, line, col, rule, data) { "use strict"; var err = { type : "error", line : line, col : col, message : message, evidence: this.lines[line-1], rule : rule || {} }; if (data) { err...
javascript
function(message, line, col, rule, data) { "use strict"; var err = { type : "error", line : line, col : col, message : message, evidence: this.lines[line-1], rule : rule || {} }; if (data) { err...
[ "function", "(", "message", ",", "line", ",", "col", ",", "rule", ",", "data", ")", "{", "\"use strict\"", ";", "var", "err", "=", "{", "type", ":", "\"error\"", ",", "line", ":", "line", ",", "col", ":", "col", ",", "message", ":", "message", ",",...
Report an error. @param {String} message The message to store. @param {int} line The line number. @param {int} col The column number. @param {Object} rule The rule this message relates to. @param {Object} data An optional object to pass message data through @method error ORION Include NLS data in message
[ "Report", "an", "error", "." ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.webtools/web/csslint/csslint.js#L8210-L8224
train
eclipse/orion.client
bundles/org.eclipse.orion.client.webtools/web/csslint/csslint.js
function(message, line, col, rule, data) { "use strict"; // Check if rule violation should be allowed if (this.allow.hasOwnProperty(line) && this.allow[line].hasOwnProperty(rule.id)) { return; } var ignore = false; CSSLint.Util.forEach(this.ignore, function ...
javascript
function(message, line, col, rule, data) { "use strict"; // Check if rule violation should be allowed if (this.allow.hasOwnProperty(line) && this.allow[line].hasOwnProperty(rule.id)) { return; } var ignore = false; CSSLint.Util.forEach(this.ignore, function ...
[ "function", "(", "message", ",", "line", ",", "col", ",", "rule", ",", "data", ")", "{", "\"use strict\"", ";", "// Check if rule violation should be allowed", "if", "(", "this", ".", "allow", ".", "hasOwnProperty", "(", "line", ")", "&&", "this", ".", "allo...
Report an issue. @param {String} message The message to store. @param {int} line The line number. @param {int} col The column number. @param {Object} rule The rule this message relates to. @param {Object} data An optional object to pass message data through @method report ORION Include NLS data in message, allow info s...
[ "Report", "an", "issue", "." ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.webtools/web/csslint/csslint.js#L8250-L8286
train
eclipse/orion.client
bundles/org.eclipse.orion.client.webtools/web/csslint/csslint.js
function(message, rule) { "use strict"; this.messages.push({ type : "error", rollup : true, message : message, rule : rule }); }
javascript
function(message, rule) { "use strict"; this.messages.push({ type : "error", rollup : true, message : message, rule : rule }); }
[ "function", "(", "message", ",", "rule", ")", "{", "\"use strict\"", ";", "this", ".", "messages", ".", "push", "(", "{", "type", ":", "\"error\"", ",", "rollup", ":", "true", ",", "message", ":", "message", ",", "rule", ":", "rule", "}", ")", ";", ...
Report some rollup error information. @param {String} message The message to store. @param {Object} rule The rule this message relates to. @method rollupError
[ "Report", "some", "rollup", "error", "information", "." ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.webtools/web/csslint/csslint.js#L8314-L8322
train
eclipse/orion.client
bundles/org.eclipse.orion.client.webtools/web/csslint/csslint.js
function(message, rule, data) { "use strict"; var err = { type : "warning", rollup : true, message : message, rule : rule }; if(data) { err.data = data; } this.messages.push(err); }
javascript
function(message, rule, data) { "use strict"; var err = { type : "warning", rollup : true, message : message, rule : rule }; if(data) { err.data = data; } this.messages.push(err); }
[ "function", "(", "message", ",", "rule", ",", "data", ")", "{", "\"use strict\"", ";", "var", "err", "=", "{", "type", ":", "\"warning\"", ",", "rollup", ":", "true", ",", "message", ":", "message", ",", "rule", ":", "rule", "}", ";", "if", "(", "d...
Report some rollup warning information. @param {String} message The message to store. @param {Object} rule The rule this message relates to. @param {Object} data An optional object to pass message data through @method rollupWarn ORION Include NLS data in message
[ "Report", "some", "rollup", "warning", "information", "." ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.webtools/web/csslint/csslint.js#L8332-L8344
train
eclipse/orion.client
bundles/org.eclipse.orion.client.webtools/web/csslint/csslint.js
function() { "use strict"; var ret = ""; if (this.json.length > 0) { if (this.json.length === 1) { ret = JSON.stringify(this.json[0]); } else { ret = JSON.stringify(this.json); } } return ret; }
javascript
function() { "use strict"; var ret = ""; if (this.json.length > 0) { if (this.json.length === 1) { ret = JSON.stringify(this.json[0]); } else { ret = JSON.stringify(this.json); } } return ret; }
[ "function", "(", ")", "{", "\"use strict\"", ";", "var", "ret", "=", "\"\"", ";", "if", "(", "this", ".", "json", ".", "length", ">", "0", ")", "{", "if", "(", "this", ".", "json", ".", "length", "===", "1", ")", "{", "ret", "=", "JSON", ".", ...
Return content to be printed after all file results. @return {String} to append after all results
[ "Return", "content", "to", "be", "printed", "after", "all", "file", "results", "." ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.webtools/web/csslint/csslint.js#L10865-L10876
train
eclipse/orion.client
bundles/org.eclipse.orion.client.ui/web/orion/compare/diffTreeNavigator.js
DiffTreeNavigator
function DiffTreeNavigator(charOrWordDiff, oldEditor, newEditor, oldDiffBlockFeeder, newDiffBlockFeeder, curveRuler) { this._root = {type: "root", children: []}; //$NON-NLS-0$ this._initialized = false; this.initAll(charOrWordDiff, oldEditor, newEditor, oldDiffBlockFeeder, newDiffBlockFeeder, curveRuler); }
javascript
function DiffTreeNavigator(charOrWordDiff, oldEditor, newEditor, oldDiffBlockFeeder, newDiffBlockFeeder, curveRuler) { this._root = {type: "root", children: []}; //$NON-NLS-0$ this._initialized = false; this.initAll(charOrWordDiff, oldEditor, newEditor, oldDiffBlockFeeder, newDiffBlockFeeder, curveRuler); }
[ "function", "DiffTreeNavigator", "(", "charOrWordDiff", ",", "oldEditor", ",", "newEditor", ",", "oldDiffBlockFeeder", ",", "newDiffBlockFeeder", ",", "curveRuler", ")", "{", "this", ".", "_root", "=", "{", "type", ":", "\"root\"", ",", "children", ":", "[", "...
Creates a new diff tree model. A diff tree model represents a tree structure of diffs. The top level children represents all the diff blocks based on lines, where each diff block contains a list of word level diffs. @name orion.DiffTreeNavigator.DiffTreeNavigator @class A tree model based iterator component. @param {l...
[ "Creates", "a", "new", "diff", "tree", "model", ".", "A", "diff", "tree", "model", "represents", "a", "tree", "structure", "of", "diffs", ".", "The", "top", "level", "children", "represents", "all", "the", "diff", "blocks", "based", "on", "lines", "where",...
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.ui/web/orion/compare/diffTreeNavigator.js#L29-L33
train
eclipse/orion.client
bundles/org.eclipse.orion.client.ui/web/orion/compare/diffTreeNavigator.js
function(changeIndex) { var count = 0; var blockIndex = 0; if (0 <= changeIndex) { // iterate through blocks looking for the one that contains // the change with the specified changeIndex while (blockIndex < this._root.children.length) { var numChangesInCurrentBlock = this._root.children[...
javascript
function(changeIndex) { var count = 0; var blockIndex = 0; if (0 <= changeIndex) { // iterate through blocks looking for the one that contains // the change with the specified changeIndex while (blockIndex < this._root.children.length) { var numChangesInCurrentBlock = this._root.children[...
[ "function", "(", "changeIndex", ")", "{", "var", "count", "=", "0", ";", "var", "blockIndex", "=", "0", ";", "if", "(", "0", "<=", "changeIndex", ")", "{", "// iterate through blocks looking for the one that contains ", "// the change with the specified changeIndex", ...
Goes to the change at the specified changeIndex in the current file. @param[in] changeIndex The index of the desired change in the current file.
[ "Goes", "to", "the", "change", "at", "the", "specified", "changeIndex", "in", "the", "current", "file", "." ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.ui/web/orion/compare/diffTreeNavigator.js#L335-L354
train
eclipse/orion.client
bundles/org.eclipse.orion.client.ui/web/orion/explorers/explorerNavHandler.js
function(e) { this.iterate(false, false, e.shiftKey, true); if(!this._ctrlKeyOn(e) && !e.shiftKey){ this.setSelection(this.currentModel(), false, true); } e.preventDefault(); return false; }
javascript
function(e) { this.iterate(false, false, e.shiftKey, true); if(!this._ctrlKeyOn(e) && !e.shiftKey){ this.setSelection(this.currentModel(), false, true); } e.preventDefault(); return false; }
[ "function", "(", "e", ")", "{", "this", ".", "iterate", "(", "false", ",", "false", ",", "e", ".", "shiftKey", ",", "true", ")", ";", "if", "(", "!", "this", ".", "_ctrlKeyOn", "(", "e", ")", "&&", "!", "e", ".", "shiftKey", ")", "{", "this", ...
Up arrow key iterates the current row backward. If control key is on, browser's scroll up behavior takes over. If shift key is on, it toggles the check box and iterates backward.
[ "Up", "arrow", "key", "iterates", "the", "current", "row", "backward", ".", "If", "control", "key", "is", "on", "browser", "s", "scroll", "up", "behavior", "takes", "over", ".", "If", "shift", "key", "is", "on", "it", "toggles", "the", "check", "box", ...
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.ui/web/orion/explorers/explorerNavHandler.js#L731-L738
train
eclipse/orion.client
bundles/org.eclipse.orion.client.ui/web/orion/explorers/explorerNavHandler.js
function(e) { if(this._shouldMoveColumn(e)){ this.moveColumn(null, 1); e.preventDefault(); return true; } var curModel = this._modelIterator.cursor(); if(!curModel){ return false; } if(this.isExpandable(curModel)){ if(!this.isExpanded(curModel)){ this.explorer.myTree.expand(cu...
javascript
function(e) { if(this._shouldMoveColumn(e)){ this.moveColumn(null, 1); e.preventDefault(); return true; } var curModel = this._modelIterator.cursor(); if(!curModel){ return false; } if(this.isExpandable(curModel)){ if(!this.isExpanded(curModel)){ this.explorer.myTree.expand(cu...
[ "function", "(", "e", ")", "{", "if", "(", "this", ".", "_shouldMoveColumn", "(", "e", ")", ")", "{", "this", ".", "moveColumn", "(", "null", ",", "1", ")", ";", "e", ".", "preventDefault", "(", ")", ";", "return", "true", ";", "}", "var", "curMo...
Right arrow key expands the current row if it is expandable and collapsed.
[ "Right", "arrow", "key", "expands", "the", "current", "row", "if", "it", "is", "expandable", "and", "collapsed", "." ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.ui/web/orion/explorers/explorerNavHandler.js#L793-L813
train
eclipse/orion.client
bundles/org.eclipse.orion.client.ui/web/orion/explorers/explorerNavHandler.js
function(e) { if (!e.target.classList.contains("treeTableRow")) return; if(this.setSelection(this.currentModel(), true, true)) { e.preventDefault(); } }
javascript
function(e) { if (!e.target.classList.contains("treeTableRow")) return; if(this.setSelection(this.currentModel(), true, true)) { e.preventDefault(); } }
[ "function", "(", "e", ")", "{", "if", "(", "!", "e", ".", "target", ".", "classList", ".", "contains", "(", "\"treeTableRow\"", ")", ")", "return", ";", "if", "(", "this", ".", "setSelection", "(", "this", ".", "currentModel", "(", ")", ",", "true", ...
Space key toggles the check box on the current row if the renderer uses check box
[ "Space", "key", "toggles", "the", "check", "box", "on", "the", "current", "row", "if", "the", "renderer", "uses", "check", "box" ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.ui/web/orion/explorers/explorerNavHandler.js#L820-L825
train
eclipse/orion.client
bundles/org.eclipse.orion.client.ui/web/orion/explorers/explorerNavHandler.js
function(e) { var currentGrid = this.getCurrentGrid(this._modelIterator.cursor()); if(currentGrid){ if(currentGrid.widget){ if(typeof currentGrid.onClick === "function"){ //$NON-NLS-0$ currentGrid.onClick(); } else if(typeof currentGrid.widget.focus === "function"){ //$NON-NLS-0$ current...
javascript
function(e) { var currentGrid = this.getCurrentGrid(this._modelIterator.cursor()); if(currentGrid){ if(currentGrid.widget){ if(typeof currentGrid.onClick === "function"){ //$NON-NLS-0$ currentGrid.onClick(); } else if(typeof currentGrid.widget.focus === "function"){ //$NON-NLS-0$ current...
[ "function", "(", "e", ")", "{", "var", "currentGrid", "=", "this", ".", "getCurrentGrid", "(", "this", ".", "_modelIterator", ".", "cursor", "(", ")", ")", ";", "if", "(", "currentGrid", ")", "{", "if", "(", "currentGrid", ".", "widget", ")", "{", "i...
Enter key simulates a href call if the current row has an href link rendered. The render has to provide the getRowActionElement function that returns the href DIV.
[ "Enter", "key", "simulates", "a", "href", "call", "if", "the", "current", "row", "has", "an", "href", "link", "rendered", ".", "The", "render", "has", "to", "provide", "the", "getRowActionElement", "function", "that", "returns", "the", "href", "DIV", "." ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.ui/web/orion/explorers/explorerNavHandler.js#L828-L866
train
eclipse/orion.client
bundles/org.eclipse.orion.client.ui/web/orion/explorers/explorerNavHandler.js
function(model) { var rowDiv = this.getRowDiv(model); if (this.isExpandable(model) && this.isExpanded(model)) { this._modelIterator.collapse(model); this.explorer.myTree.toggle(rowDiv.id); // collapse tree visually } rowDiv.classList.remove("checkedRow"); //$NON-NLS-0$ rowDiv.classList.add("disab...
javascript
function(model) { var rowDiv = this.getRowDiv(model); if (this.isExpandable(model) && this.isExpanded(model)) { this._modelIterator.collapse(model); this.explorer.myTree.toggle(rowDiv.id); // collapse tree visually } rowDiv.classList.remove("checkedRow"); //$NON-NLS-0$ rowDiv.classList.add("disab...
[ "function", "(", "model", ")", "{", "var", "rowDiv", "=", "this", ".", "getRowDiv", "(", "model", ")", ";", "if", "(", "this", ".", "isExpandable", "(", "model", ")", "&&", "this", ".", "isExpanded", "(", "model", ")", ")", "{", "this", ".", "_mode...
Disables the specified model making it no longer respond to user input such as mouse click or key presses. The CSS style of corresponding row node is also modified to reflect its disabled state. @param {Object} model
[ "Disables", "the", "specified", "model", "making", "it", "no", "longer", "respond", "to", "user", "input", "such", "as", "mouse", "click", "or", "key", "presses", ".", "The", "CSS", "style", "of", "corresponding", "row", "node", "is", "also", "modified", "...
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.ui/web/orion/explorers/explorerNavHandler.js#L885-L894
train
eclipse/orion.client
bundles/org.eclipse.orion.client.ui/web/orion/explorers/explorerNavHandler.js
function(model) { var rowDiv = this.getRowDiv(model); if (rowDiv) { rowDiv.classList.remove("disabledNavRow"); //$NON-NLS-0$ this.setIsNotSelectable(model, false); } }
javascript
function(model) { var rowDiv = this.getRowDiv(model); if (rowDiv) { rowDiv.classList.remove("disabledNavRow"); //$NON-NLS-0$ this.setIsNotSelectable(model, false); } }
[ "function", "(", "model", ")", "{", "var", "rowDiv", "=", "this", ".", "getRowDiv", "(", "model", ")", ";", "if", "(", "rowDiv", ")", "{", "rowDiv", ".", "classList", ".", "remove", "(", "\"disabledNavRow\"", ")", ";", "//$NON-NLS-0$", "this", ".", "se...
Enables the specified model. @param {Object} model
[ "Enables", "the", "specified", "model", "." ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.ui/web/orion/explorers/explorerNavHandler.js#L910-L916
train
eclipse/orion.client
bundles/org.eclipse.orion.client.ui/web/orion/explorers/explorerNavHandler.js
function(modelItem, rowDomNode){ var modelId = this._model.getId(modelItem); this._dict[modelId] = {model: modelItem, rowDomNode: rowDomNode}; }
javascript
function(modelItem, rowDomNode){ var modelId = this._model.getId(modelItem); this._dict[modelId] = {model: modelItem, rowDomNode: rowDomNode}; }
[ "function", "(", "modelItem", ",", "rowDomNode", ")", "{", "var", "modelId", "=", "this", ".", "_model", ".", "getId", "(", "modelItem", ")", ";", "this", ".", "_dict", "[", "modelId", "]", "=", "{", "model", ":", "modelItem", ",", "rowDomNode", ":", ...
Add a row to the dictionary. @param {Object} modelItem The model item object that represent a row. @param {domNode} rowDomNode optional The DOM node that represent a row. If
[ "Add", "a", "row", "to", "the", "dictionary", "." ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.ui/web/orion/explorers/explorerNavHandler.js#L942-L945
train
eclipse/orion.client
bundles/org.eclipse.orion.client.ui/web/orion/explorers/explorerNavHandler.js
function(modelItem, lazyCreate) { if(!modelItem){ return null; } var modelId = this._model.getId(modelItem); if(this._dict[modelId]){ if(!this._dict[modelId].gridChildren && lazyCreate){ this._dict[modelId].gridChildren = []; } return this._dict[modelId].gridChildren; } return nul...
javascript
function(modelItem, lazyCreate) { if(!modelItem){ return null; } var modelId = this._model.getId(modelItem); if(this._dict[modelId]){ if(!this._dict[modelId].gridChildren && lazyCreate){ this._dict[modelId].gridChildren = []; } return this._dict[modelId].gridChildren; } return nul...
[ "function", "(", "modelItem", ",", "lazyCreate", ")", "{", "if", "(", "!", "modelItem", ")", "{", "return", "null", ";", "}", "var", "modelId", "=", "this", ".", "_model", ".", "getId", "(", "modelItem", ")", ";", "if", "(", "this", ".", "_dict", "...
Get the grid navigation holder from a row navigation model. @param {Object} modelItem The model item object that represent a row. @returns {Array} The .gridChildren property of the value keyed by the model id.
[ "Get", "the", "grid", "navigation", "holder", "from", "a", "row", "navigation", "model", "." ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.ui/web/orion/explorers/explorerNavHandler.js#L961-L973
train
eclipse/orion.client
bundles/org.eclipse.orion.client.ui/web/orion/explorers/explorerNavHandler.js
function(modelItem) { if(!modelItem){ return null; } var modelId = this._model.getId(modelItem); if(this._dict[modelId]){ this._dict[modelId].gridChildren = null; } }
javascript
function(modelItem) { if(!modelItem){ return null; } var modelId = this._model.getId(modelItem); if(this._dict[modelId]){ this._dict[modelId].gridChildren = null; } }
[ "function", "(", "modelItem", ")", "{", "if", "(", "!", "modelItem", ")", "{", "return", "null", ";", "}", "var", "modelId", "=", "this", ".", "_model", ".", "getId", "(", "modelItem", ")", ";", "if", "(", "this", ".", "_dict", "[", "modelId", "]",...
Initialize the grid navigation holder to null. @param {Object} modelItem The model item object that represent a row.
[ "Initialize", "the", "grid", "navigation", "holder", "to", "null", "." ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.ui/web/orion/explorers/explorerNavHandler.js#L979-L987
train
eclipse/orion.client
bundles/org.eclipse.orion.client.ui/web/gcli/gcli/ui/fields.js
BlankField
function BlankField(type, options) { Field.call(this, type, options); this.element = util.createElement(this.document, 'div'); this.onFieldChange = util.createEvent('BlankField.onFieldChange'); }
javascript
function BlankField(type, options) { Field.call(this, type, options); this.element = util.createElement(this.document, 'div'); this.onFieldChange = util.createEvent('BlankField.onFieldChange'); }
[ "function", "BlankField", "(", "type", ",", "options", ")", "{", "Field", ".", "call", "(", "this", ",", "type", ",", "options", ")", ";", "this", ".", "element", "=", "util", ".", "createElement", "(", "this", ".", "document", ",", "'div'", ")", ";"...
For use with delegate types that do not yet have anything to resolve to. BlankFields are not for general use.
[ "For", "use", "with", "delegate", "types", "that", "do", "not", "yet", "have", "anything", "to", "resolve", "to", ".", "BlankFields", "are", "not", "for", "general", "use", "." ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.ui/web/gcli/gcli/ui/fields.js#L226-L232
train
eclipse/orion.client
bundles/org.eclipse.orion.client.ui/web/orion/progress.js
ProgressService
function ProgressService(serviceRegistry, operationsClient, commandRegistry, progressMonitorClass, preferenceService){ this._serviceRegistry = serviceRegistry; this._serviceRegistration = serviceRegistry.registerService("orion.page.progress", this); //$NON-NLS-0$ this._commandRegistry = commandRegistry; this._...
javascript
function ProgressService(serviceRegistry, operationsClient, commandRegistry, progressMonitorClass, preferenceService){ this._serviceRegistry = serviceRegistry; this._serviceRegistration = serviceRegistry.registerService("orion.page.progress", this); //$NON-NLS-0$ this._commandRegistry = commandRegistry; this._...
[ "function", "ProgressService", "(", "serviceRegistry", ",", "operationsClient", ",", "commandRegistry", ",", "progressMonitorClass", ",", "preferenceService", ")", "{", "this", ".", "_serviceRegistry", "=", "serviceRegistry", ";", "this", ".", "_serviceRegistration", "=...
Service for tracking operations changes @class Service for tracking operations changes @name orion.progress.ProgressService @param {orion.serviceregistry.ServiceRegistry} serviceRegistry @param {orion.operationsclient.OperationsClient} operationsClient
[ "Service", "for", "tracking", "operations", "changes" ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.ui/web/orion/progress.js#L155-L167
train
eclipse/orion.client
bundles/org.eclipse.orion.client.ui/web/gcli/gcli/cli.js
isSimple
function isSimple(typed) { for (var i = 0; i < typed.length; i++) { var c = typed.charAt(i); if (c === ' ' || c === '"' || c === '\'' || c === '{' || c === '}' || c === '\\') { return false; } } return true; }
javascript
function isSimple(typed) { for (var i = 0; i < typed.length; i++) { var c = typed.charAt(i); if (c === ' ' || c === '"' || c === '\'' || c === '{' || c === '}' || c === '\\') { return false; } } return true; }
[ "function", "isSimple", "(", "typed", ")", "{", "for", "(", "var", "i", "=", "0", ";", "i", "<", "typed", ".", "length", ";", "i", "++", ")", "{", "var", "c", "=", "typed", ".", "charAt", "(", "i", ")", ";", "if", "(", "c", "===", "' '", "|...
If the input has no spaces, quotes, braces or escapes, we can take the fast track.
[ "If", "the", "input", "has", "no", "spaces", "quotes", "braces", "or", "escapes", "we", "can", "take", "the", "fast", "track", "." ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.ui/web/gcli/gcli/cli.js#L1519-L1528
train
eclipse/orion.client
bundles/org.eclipse.orion.client.javascript/web/eslint/lib/rules/no-else-return.js
naiveHasReturn
function naiveHasReturn(node) { if (node.type === "BlockStatement") { var body = node.body, lastChildNode = body[body.length - 1]; return lastChildNode && checkForReturn(lastChildNode); } return checkForReturn(node); }
javascript
function naiveHasReturn(node) { if (node.type === "BlockStatement") { var body = node.body, lastChildNode = body[body.length - 1]; return lastChildNode && checkForReturn(lastChildNode); } return checkForReturn(node); }
[ "function", "naiveHasReturn", "(", "node", ")", "{", "if", "(", "node", ".", "type", "===", "\"BlockStatement\"", ")", "{", "var", "body", "=", "node", ".", "body", ",", "lastChildNode", "=", "body", "[", "body", ".", "length", "-", "1", "]", ";", "r...
Naive return checking, does not iterate through the whole BlockStatement because we make the assumption that the ReturnStatement will be the last node in the body of the BlockStatement. @param {Node} node The consequent/alternate node @returns {boolean} True if it has a return
[ "Naive", "return", "checking", "does", "not", "iterate", "through", "the", "whole", "BlockStatement", "because", "we", "make", "the", "assumption", "that", "the", "ReturnStatement", "will", "be", "the", "last", "node", "in", "the", "body", "of", "the", "BlockS...
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.javascript/web/eslint/lib/rules/no-else-return.js#L51-L59
train
eclipse/orion.client
bundles/org.eclipse.orion.client.javascript/web/eslint/lib/config/rules.js
importPlugin
function importPlugin(pluginRules, pluginName) { Object.keys(pluginRules).forEach(function(ruleId) { var qualifiedRuleId = pluginName + "/" + ruleId, rule = pluginRules[ruleId]; define(qualifiedRuleId, rule); }); }
javascript
function importPlugin(pluginRules, pluginName) { Object.keys(pluginRules).forEach(function(ruleId) { var qualifiedRuleId = pluginName + "/" + ruleId, rule = pluginRules[ruleId]; define(qualifiedRuleId, rule); }); }
[ "function", "importPlugin", "(", "pluginRules", ",", "pluginName", ")", "{", "Object", ".", "keys", "(", "pluginRules", ")", ".", "forEach", "(", "function", "(", "ruleId", ")", "{", "var", "qualifiedRuleId", "=", "pluginName", "+", "\"/\"", "+", "ruleId", ...
Registers all given rules of a plugin. @param {Object} pluginRules A key/value map of rule definitions. @param {string} pluginName The name of the plugin without prefix (`eslint-plugin-`). @returns {void}
[ "Registers", "all", "given", "rules", "of", "a", "plugin", "." ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.javascript/web/eslint/lib/config/rules.js#L52-L59
train
eclipse/orion.client
bundles/org.eclipse.orion.client.javascript/web/javascript/javascriptProject.js
_updateMap
function _updateMap(arr, state) { if(Array.isArray(arr)) { arr.forEach(function(file) { var f, toQ, toN, n; switch(state) { case 'onCreated': { n = file.result ? file.result.Name : undefined; f = file.result ? file.result.Location : undefined; break; } case 'onDel...
javascript
function _updateMap(arr, state) { if(Array.isArray(arr)) { arr.forEach(function(file) { var f, toQ, toN, n; switch(state) { case 'onCreated': { n = file.result ? file.result.Name : undefined; f = file.result ? file.result.Location : undefined; break; } case 'onDel...
[ "function", "_updateMap", "(", "arr", ",", "state", ")", "{", "if", "(", "Array", ".", "isArray", "(", "arr", ")", ")", "{", "arr", ".", "forEach", "(", "function", "(", "file", ")", "{", "var", "f", ",", "toQ", ",", "toN", ",", "n", ";", "swit...
Update the backing map @param {Array.<String>} arr The array to walk @param {String} state The state, one of: onModified, onDeleted, onCreated
[ "Update", "the", "backing", "map" ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.javascript/web/javascript/javascriptProject.js#L862-L894
train
eclipse/orion.client
bundles/org.eclipse.orion.client.ui/web/orion/searchClient.js
Searcher
function Searcher(options) { this._registry= options.serviceRegistry; this._commandService = options.commandService; this._fileClient = options.fileService; //TODO clean up the search client API. Make any helper private this._registry.registerService("orion.core.search.client", this); //$NON-NLS-1$ }
javascript
function Searcher(options) { this._registry= options.serviceRegistry; this._commandService = options.commandService; this._fileClient = options.fileService; //TODO clean up the search client API. Make any helper private this._registry.registerService("orion.core.search.client", this); //$NON-NLS-1$ }
[ "function", "Searcher", "(", "options", ")", "{", "this", ".", "_registry", "=", "options", ".", "serviceRegistry", ";", "this", ".", "_commandService", "=", "options", ".", "commandService", ";", "this", ".", "_fileClient", "=", "options", ".", "fileService",...
Creates a new search client. @param {Object} options The options object @param {orion.serviceregistry.ServiceRegistry} options.serviceRegistry The service registry @name orion.searchClient.Searcher @class Provides API for searching the workspace.
[ "Creates", "a", "new", "search", "client", "." ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.ui/web/orion/searchClient.js#L30-L36
train
eclipse/orion.client
bundles/org.eclipse.orion.client.ui/web/orion/searchClient.js
function(meta, useParentLocation){ var locationName = ""; var noneRootMeta = null; this._setLocationbyURL(meta); this._searchRootLocation = meta.WorkspaceLocation || this._fileClient.fileServiceRootURL(meta.Location); if(useParentLocation && meta && meta.Parents && meta.Parents.length > 0){ if(usePar...
javascript
function(meta, useParentLocation){ var locationName = ""; var noneRootMeta = null; this._setLocationbyURL(meta); this._searchRootLocation = meta.WorkspaceLocation || this._fileClient.fileServiceRootURL(meta.Location); if(useParentLocation && meta && meta.Parents && meta.Parents.length > 0){ if(usePar...
[ "function", "(", "meta", ",", "useParentLocation", ")", "{", "var", "locationName", "=", "\"\"", ";", "var", "noneRootMeta", "=", "null", ";", "this", ".", "_setLocationbyURL", "(", "meta", ")", ";", "this", ".", "_searchRootLocation", "=", "meta", ".", "W...
Used to update "selectd" and "project" search scope based on the file or folder selected.
[ "Used", "to", "update", "selectd", "and", "project", "search", "scope", "based", "on", "the", "file", "or", "folder", "selected", "." ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.ui/web/orion/searchClient.js#L55-L96
train
eclipse/orion.client
bundles/org.eclipse.orion.client.ui/web/orion/searchClient.js
function(searchParams, generateMatches, generateMeta) { try { return this.getFileClient().search(searchParams).then(function(jsonData) { var searchResult = this.convert(jsonData, searchParams); return this._generateMatches(searchParams, searchResult, generateMatches).then(function() { return this...
javascript
function(searchParams, generateMatches, generateMeta) { try { return this.getFileClient().search(searchParams).then(function(jsonData) { var searchResult = this.convert(jsonData, searchParams); return this._generateMatches(searchParams, searchResult, generateMatches).then(function() { return this...
[ "function", "(", "searchParams", ",", "generateMatches", ",", "generateMeta", ")", "{", "try", "{", "return", "this", ".", "getFileClient", "(", ")", ".", "search", "(", "searchParams", ")", ".", "then", "(", "function", "(", "jsonData", ")", "{", "var", ...
Runs a search and displays the results under the given DOM node. @public @param {Object} searchParams The search parameters. @param {Function(JSONObject)} Callback function that receives the results of the query.
[ "Runs", "a", "search", "and", "displays", "the", "results", "under", "the", "given", "DOM", "node", "." ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.ui/web/orion/searchClient.js#L188-L219
train
eclipse/orion.client
bundles/org.eclipse.orion.client.ui/web/orion/searchClient.js
function(keyword, nameSearch, useRoot, advancedOptions, searchScope) { var searchOn = useRoot ? this.getSearchRootLocation(): this.getSearchLocation(searchScope); if (nameSearch) { //assume implicit trailing wildcard if there isn't one already //var wildcard= (/\*$/.test(keyword) ? "" : "*"); //$NON-NLS-...
javascript
function(keyword, nameSearch, useRoot, advancedOptions, searchScope) { var searchOn = useRoot ? this.getSearchRootLocation(): this.getSearchLocation(searchScope); if (nameSearch) { //assume implicit trailing wildcard if there isn't one already //var wildcard= (/\*$/.test(keyword) ? "" : "*"); //$NON-NLS-...
[ "function", "(", "keyword", ",", "nameSearch", ",", "useRoot", ",", "advancedOptions", ",", "searchScope", ")", "{", "var", "searchOn", "=", "useRoot", "?", "this", ".", "getSearchRootLocation", "(", ")", ":", "this", ".", "getSearchLocation", "(", "searchScop...
Returns a query object for search. The return value has the propertyies of resource and parameters. @param {String} keyword The text to search for, or null when searching purely on file name @param {Boolean} [nameSearch] The name of a file to search for @param {Boolean} [useRoot] If true, do not use the location proper...
[ "Returns", "a", "query", "object", "for", "search", ".", "The", "return", "value", "has", "the", "propertyies", "of", "resource", "and", "parameters", "." ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.ui/web/orion/searchClient.js#L293-L323
train
eclipse/orion.client
bundles/org.eclipse.orion.client.git/web/orion/git/gitCommands.js
displayErrorOnStatus
function displayErrorOnStatus(error) { var display = {}; display.Severity = "Error"; //$NON-NLS-0$ display.HTML = false; try { var resp = JSON.parse(error.responseText); display.Message = resp.DetailedMessage ? resp.DetailedMessage : (resp.Message ? resp.Message : messages["Problem while p...
javascript
function displayErrorOnStatus(error) { var display = {}; display.Severity = "Error"; //$NON-NLS-0$ display.HTML = false; try { var resp = JSON.parse(error.responseText); display.Message = resp.DetailedMessage ? resp.DetailedMessage : (resp.Message ? resp.Message : messages["Problem while p...
[ "function", "displayErrorOnStatus", "(", "error", ")", "{", "var", "display", "=", "{", "}", ";", "display", ".", "Severity", "=", "\"Error\"", ";", "//$NON-NLS-0$", "display", ".", "HTML", "=", "false", ";", "try", "{", "var", "resp", "=", "JSON", ".", ...
make warning go away
[ "make", "warning", "go", "away" ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.git/web/orion/git/gitCommands.js#L1438-L1452
train
eclipse/orion.client
bundles/org.eclipse.orion.client.git/web/orion/git/gitCommands.js
function(data) { if (data && data.handler.changedItem) { data.handler.changedItem(); } else { explorer.changedItem(); } }
javascript
function(data) { if (data && data.handler.changedItem) { data.handler.changedItem(); } else { explorer.changedItem(); } }
[ "function", "(", "data", ")", "{", "if", "(", "data", "&&", "data", ".", "handler", ".", "changedItem", ")", "{", "data", ".", "handler", ".", "changedItem", "(", ")", ";", "}", "else", "{", "explorer", ".", "changedItem", "(", ")", ";", "}", "}" ]
used both as confirm and remotePrompter dialogs callback
[ "used", "both", "as", "confirm", "and", "remotePrompter", "dialogs", "callback" ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.git/web/orion/git/gitCommands.js#L2371-L2377
train
eclipse/orion.client
bundles/org.eclipse.orion.client.ui/web/plugins/languages/docker/dockerAssist.js
calculateTruePrefix
function calculateTruePrefix(buffer, offset, escapeCharacter) { var char = buffer.charAt(offset - 1); switch (char) { case '\n': var escapedPrefix = ""; for (var i = offset - 1; i >= 0; i--) { if (buffer.charAt(i) === '\n') { if (buffer.charAt(i - 1) === escapeCharacter) { i--; ...
javascript
function calculateTruePrefix(buffer, offset, escapeCharacter) { var char = buffer.charAt(offset - 1); switch (char) { case '\n': var escapedPrefix = ""; for (var i = offset - 1; i >= 0; i--) { if (buffer.charAt(i) === '\n') { if (buffer.charAt(i - 1) === escapeCharacter) { i--; ...
[ "function", "calculateTruePrefix", "(", "buffer", ",", "offset", ",", "escapeCharacter", ")", "{", "var", "char", "=", "buffer", ".", "charAt", "(", "offset", "-", "1", ")", ";", "switch", "(", "char", ")", "{", "case", "'\\n'", ":", "var", "escapedPrefi...
Walks back in the text buffer to calculate the true prefix of the current text caret offset. Orion's provided prefix does not include symbols but we do want to consider that a prefix in Dockerfiles. @param buffer the content of the opened file @param offset the current text caret's offset @param escapeCharacter the es...
[ "Walks", "back", "in", "the", "text", "buffer", "to", "calculate", "the", "true", "prefix", "of", "the", "current", "text", "caret", "offset", ".", "Orion", "s", "provided", "prefix", "does", "not", "include", "symbols", "but", "we", "do", "want", "to", ...
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.ui/web/plugins/languages/docker/dockerAssist.js#L251-L300
train
eclipse/orion.client
modules/orionode/lib/sharedWorkspace.js
checkCollabServerToken
function checkCollabServerToken(authorization) { if (authorization.substr(0, 7) !== "Bearer ") { return false; } try { var decoded = jwt.verify(authorization.substr(7), options.configParams.get("orion.jwt.secret")); return true; } catch (ex) { return false; } }
javascript
function checkCollabServerToken(authorization) { if (authorization.substr(0, 7) !== "Bearer ") { return false; } try { var decoded = jwt.verify(authorization.substr(7), options.configParams.get("orion.jwt.secret")); return true; } catch (ex) { return false; } }
[ "function", "checkCollabServerToken", "(", "authorization", ")", "{", "if", "(", "authorization", ".", "substr", "(", "0", ",", "7", ")", "!==", "\"Bearer \"", ")", "{", "return", "false", ";", "}", "try", "{", "var", "decoded", "=", "jwt", ".", "verify"...
Check the JWT token for collab server
[ "Check", "the", "JWT", "token", "for", "collab", "server" ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/modules/orionode/lib/sharedWorkspace.js#L42-L52
train
eclipse/orion.client
bundles/org.eclipse.orion.client.ui/web/plugins/filePlugin/GitHubFileImpl.js
function(child, branchNameOrSha, asSha) { var _this = this; var shaValue = asSha ? branchNameOrSha : branchNameOrSha + "&path=" + child.CommitPath; return xhr("GET", _this._repoURL.href + "/commits?sha=" + shaValue + "&per_page=1", {//https://developer.github.com/v3/#pagination headers: this._headers, ...
javascript
function(child, branchNameOrSha, asSha) { var _this = this; var shaValue = asSha ? branchNameOrSha : branchNameOrSha + "&path=" + child.CommitPath; return xhr("GET", _this._repoURL.href + "/commits?sha=" + shaValue + "&per_page=1", {//https://developer.github.com/v3/#pagination headers: this._headers, ...
[ "function", "(", "child", ",", "branchNameOrSha", ",", "asSha", ")", "{", "var", "_this", "=", "this", ";", "var", "shaValue", "=", "asSha", "?", "branchNameOrSha", ":", "branchNameOrSha", "+", "\"&path=\"", "+", "child", ".", "CommitPath", ";", "return", ...
Inject commit information to an item. The item can be either meta data or an item form the return list of fetchChildren. CommitInfo { Author: {Name: "string", Email: "email@addre.ss", Date: milliseconds(integer) }, Committer: {Name: "string", Email: "email@addre.ss", Date: milliseconds(integer) }, Message: "string", U...
[ "Inject", "commit", "information", "to", "an", "item", ".", "The", "item", "can", "be", "either", "meta", "data", "or", "an", "item", "form", "the", "return", "list", "of", "fetchChildren", "." ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.ui/web/plugins/filePlugin/GitHubFileImpl.js#L278-L309
train
eclipse/orion.client
bundles/org.eclipse.orion.client.javascript/web/eslint/lib/rules/no-implicit-coercion.js
isDoubleLogicalNegating
function isDoubleLogicalNegating(node) { return node.operator === "!" && node.argument.type === "UnaryExpression" && node.argument.operator === "!"; }
javascript
function isDoubleLogicalNegating(node) { return node.operator === "!" && node.argument.type === "UnaryExpression" && node.argument.operator === "!"; }
[ "function", "isDoubleLogicalNegating", "(", "node", ")", "{", "return", "node", ".", "operator", "===", "\"!\"", "&&", "node", ".", "argument", ".", "type", "===", "\"UnaryExpression\"", "&&", "node", ".", "argument", ".", "operator", "===", "\"!\"", ";", "}...
Checks whether or not a node is a double logical negating. @param {ASTNode} node - An UnaryExpression node to check. @returns {boolean} Whether or not the node is a double logical negating.
[ "Checks", "whether", "or", "not", "a", "node", "is", "a", "double", "logical", "negating", "." ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.javascript/web/eslint/lib/rules/no-implicit-coercion.js#L40-L44
train
eclipse/orion.client
bundles/org.eclipse.orion.client.javascript/web/eslint/lib/rules/no-implicit-coercion.js
isAppendEmptyString
function isAppendEmptyString(node) { return node.operator === "+=" && node.right.type === "Literal" && node.right.value === ""; }
javascript
function isAppendEmptyString(node) { return node.operator === "+=" && node.right.type === "Literal" && node.right.value === ""; }
[ "function", "isAppendEmptyString", "(", "node", ")", "{", "return", "node", ".", "operator", "===", "\"+=\"", "&&", "node", ".", "right", ".", "type", "===", "\"Literal\"", "&&", "node", ".", "right", ".", "value", "===", "\"\"", ";", "}" ]
Checks whether or not a node is appended with an empty string. @param {ASTNode} node - An AssignmentExpression node to check. @returns {boolean} Whether or not the node is appended with an empty string.
[ "Checks", "whether", "or", "not", "a", "node", "is", "appended", "with", "an", "empty", "string", "." ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.javascript/web/eslint/lib/rules/no-implicit-coercion.js#L124-L126
train
eclipse/orion.client
bundles/org.eclipse.orion.client.javascript/web/eslint/lib/rules/no-implicit-coercion.js
getOtherOperand
function getOtherOperand(node, value) { if (node.left.type === "Literal" && node.left.value === value) { return node.right; } return node.left; }
javascript
function getOtherOperand(node, value) { if (node.left.type === "Literal" && node.left.value === value) { return node.right; } return node.left; }
[ "function", "getOtherOperand", "(", "node", ",", "value", ")", "{", "if", "(", "node", ".", "left", ".", "type", "===", "\"Literal\"", "&&", "node", ".", "left", ".", "value", "===", "value", ")", "{", "return", "node", ".", "right", ";", "}", "retur...
Gets a node that is the left or right operand of a node, is not the specified literal. @param {ASTNode} node - A BinaryExpression node to get. @param {any} value - A literal value to check. @returns {ASTNode} A node that is the left or right operand of the node, is not the specified literal.
[ "Gets", "a", "node", "that", "is", "the", "left", "or", "right", "operand", "of", "a", "node", "is", "not", "the", "specified", "literal", "." ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.javascript/web/eslint/lib/rules/no-implicit-coercion.js#L134-L139
train
eclipse/orion.client
bundles/org.eclipse.orion.client.javascript/web/eslint/lib/load-rules-async.js
isInsideOfStorableFunction
function isInsideOfStorableFunction(id, rhsNode) { var funcNode = getUpperFunction(id); return ( funcNode && isInside(funcNode, rhsNode) && isStorableFunction(funcNode, rhsNode) ); }
javascript
function isInsideOfStorableFunction(id, rhsNode) { var funcNode = getUpperFunction(id); return ( funcNode && isInside(funcNode, rhsNode) && isStorableFunction(funcNode, rhsNode) ); }
[ "function", "isInsideOfStorableFunction", "(", "id", ",", "rhsNode", ")", "{", "var", "funcNode", "=", "getUpperFunction", "(", "id", ")", ";", "return", "(", "funcNode", "&&", "isInside", "(", "funcNode", ",", "rhsNode", ")", "&&", "isStorableFunction", "(", ...
Checks whether a given Identifier node exists inside of a function node which can be used later. "can be used later" means: - the function is assigned to a variable. - the function is bound to a property and the object can be used later. - the function is bound as an argument of a function call. If a reference exists...
[ "Checks", "whether", "a", "given", "Identifier", "node", "exists", "inside", "of", "a", "function", "node", "which", "can", "be", "used", "later", "." ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.javascript/web/eslint/lib/load-rules-async.js#L1907-L1914
train
eclipse/orion.client
bundles/org.eclipse.orion.client.collab/web/orion/collab/collabSocket.js
CollabSocket
function CollabSocket(hubUrl, sessionId) { var self = this; this.socket = io.connect( hubUrl+ "?sessionId=" +sessionId, { path: "/socket.io/" }); this.socket.on('connect', function() { self.dispatchEvent({ type: 'ready' }); }); this....
javascript
function CollabSocket(hubUrl, sessionId) { var self = this; this.socket = io.connect( hubUrl+ "?sessionId=" +sessionId, { path: "/socket.io/" }); this.socket.on('connect', function() { self.dispatchEvent({ type: 'ready' }); }); this....
[ "function", "CollabSocket", "(", "hubUrl", ",", "sessionId", ")", "{", "var", "self", "=", "this", ";", "this", ".", "socket", "=", "io", ".", "connect", "(", "hubUrl", "+", "\"?sessionId=\"", "+", "sessionId", ",", "{", "path", ":", "\"/socket.io/\"", "...
Collab socket client @class @constructor @param {string} sessionId
[ "Collab", "socket", "client" ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.collab/web/orion/collab/collabSocket.js#L28-L65
train
eclipse/orion.client
bundles/org.eclipse.orion.client.ui/web/orion/outliner.js
OutlineRenderer
function OutlineRenderer (options, explorer, title, inputManager) { this.explorer = explorer; this._init(options); this.title = title; this.inputManager = inputManager; }
javascript
function OutlineRenderer (options, explorer, title, inputManager) { this.explorer = explorer; this._init(options); this.title = title; this.inputManager = inputManager; }
[ "function", "OutlineRenderer", "(", "options", ",", "explorer", ",", "title", ",", "inputManager", ")", "{", "this", ".", "explorer", "=", "explorer", ";", "this", ".", "_init", "(", "options", ")", ";", "this", ".", "title", "=", "title", ";", "this", ...
determines how many milliseconds we will wait for the outline service to compute and return an outline before considering it timed out
[ "determines", "how", "many", "milliseconds", "we", "will", "wait", "for", "the", "outline", "service", "to", "compute", "and", "return", "an", "outline", "before", "considering", "it", "timed", "out" ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.ui/web/orion/outliner.js#L35-L40
train
eclipse/orion.client
bundles/org.eclipse.orion.client.ui/web/orion/outliner.js
function() { if (!this._isActive()) { return; } this._filterInput.value = ""; //$NON-NLS-0$ lib.empty(this._outlineNode); // display spinner while outline is being calculated var spinner = document.createElement("span"); //$NON-NLS-0$ spinner.classList.add("modelDecorationSprite"); //$N...
javascript
function() { if (!this._isActive()) { return; } this._filterInput.value = ""; //$NON-NLS-0$ lib.empty(this._outlineNode); // display spinner while outline is being calculated var spinner = document.createElement("span"); //$NON-NLS-0$ spinner.classList.add("modelDecorationSprite"); //$N...
[ "function", "(", ")", "{", "if", "(", "!", "this", ".", "_isActive", "(", ")", ")", "{", "return", ";", "}", "this", ".", "_filterInput", ".", "value", "=", "\"\"", ";", "//$NON-NLS-0$", "lib", ".", "empty", "(", "this", ".", "_outlineNode", ")", "...
Invokes the outline service to produce an outline
[ "Invokes", "the", "outline", "service", "to", "produce", "an", "outline" ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.ui/web/orion/outliner.js#L447-L477
train
eclipse/orion.client
bundles/org.eclipse.orion.client.ui/web/orion/outliner.js
function(provider) { var isActive = this._slideout.isVisible() && (this === this._slideout.getCurrentViewMode()); if (isActive && provider) { isActive = (provider.getProperty("id") === this.providerId); //$NON-NLS-0$ if (isActive) { isActive = (provider.getProperty("name") === this.providerName); //$...
javascript
function(provider) { var isActive = this._slideout.isVisible() && (this === this._slideout.getCurrentViewMode()); if (isActive && provider) { isActive = (provider.getProperty("id") === this.providerId); //$NON-NLS-0$ if (isActive) { isActive = (provider.getProperty("name") === this.providerName); //$...
[ "function", "(", "provider", ")", "{", "var", "isActive", "=", "this", ".", "_slideout", ".", "isVisible", "(", ")", "&&", "(", "this", "===", "this", ".", "_slideout", ".", "getCurrentViewMode", "(", ")", ")", ";", "if", "(", "isActive", "&&", "provid...
Returns a boolean indicating whether the outliner is visible. @param {orion.serviceregistry.ServiceReference} provider Optional. If specified this function will only return true if the currently selected provider matches the one passed in. @return true if the outliner is visible, false otherwise
[ "Returns", "a", "boolean", "indicating", "whether", "the", "outliner", "is", "visible", "." ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.ui/web/orion/outliner.js#L589-L598
train
eclipse/orion.client
bundles/org.eclipse.orion.client.ui/web/orion/outliner.js
function(fileContentType, title) { if (!fileContentType) return; var lspServer = this.languageServerRegistry.getServerByContentType(fileContentType); var filteredProviders = null; var _self = this; if (lspServer) { filteredProviders = []; filteredProviders.push(lspServer); } else { var all...
javascript
function(fileContentType, title) { if (!fileContentType) return; var lspServer = this.languageServerRegistry.getServerByContentType(fileContentType); var filteredProviders = null; var _self = this; if (lspServer) { filteredProviders = []; filteredProviders.push(lspServer); } else { var all...
[ "function", "(", "fileContentType", ",", "title", ")", "{", "if", "(", "!", "fileContentType", ")", "return", ";", "var", "lspServer", "=", "this", ".", "languageServerRegistry", ".", "getServerByContentType", "(", "fileContentType", ")", ";", "var", "filteredPr...
Called when the inputManager's contentType has changed, so we need to look up the capable outline providers. @param {String} fileContentType @param {String} title TODO this is deprecated, should be removed along with "pattern" property of outliners.
[ "Called", "when", "the", "inputManager", "s", "contentType", "has", "changed", "so", "we", "need", "to", "look", "up", "the", "capable", "outline", "providers", "." ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.ui/web/orion/outliner.js#L680-L715
train
eclipse/orion.client
bundles/org.eclipse.orion.client.ui/web/orion/searchModel.js
getReplacedFileContent
function getReplacedFileContent(newContentHolder, updating, fileItem) { mSearchUtils.generateNewContents(updating, fileItem.contents, newContentHolder, fileItem, this._searchHelper.params.replace, this._searchHelper.inFileQuery.searchStrLength); newContentHolder.lineDelim = this._lineDelimiter; }
javascript
function getReplacedFileContent(newContentHolder, updating, fileItem) { mSearchUtils.generateNewContents(updating, fileItem.contents, newContentHolder, fileItem, this._searchHelper.params.replace, this._searchHelper.inFileQuery.searchStrLength); newContentHolder.lineDelim = this._lineDelimiter; }
[ "function", "getReplacedFileContent", "(", "newContentHolder", ",", "updating", ",", "fileItem", ")", "{", "mSearchUtils", ".", "generateNewContents", "(", "updating", ",", "fileItem", ".", "contents", ",", "newContentHolder", ",", "fileItem", ",", "this", ".", "_...
Get the replaced file contents by a given file model. Sync call. Required function. @param {Object} newContentHolder The returned replaced file content holder. The content holder has to have a property called "contents". It can be either type of the below: String type: the pure contents of the file Array type: the line...
[ "Get", "the", "replaced", "file", "contents", "by", "a", "given", "file", "model", ".", "Sync", "call", ".", "Required", "function", "." ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.ui/web/orion/searchModel.js#L539-L542
train
eclipse/orion.client
bundles/org.eclipse.orion.client.ui/web/orion/searchModel.js
writeReplacedContents
function writeReplacedContents(reportList){ var promises = []; var validFileList = this.getValidFileList(); validFileList.forEach(function(fileItem) { promises.push(this._writeOneFile(fileItem, reportList)); }.bind(this)); return Deferred.all(promises, function(error) { return {_error: error}; ...
javascript
function writeReplacedContents(reportList){ var promises = []; var validFileList = this.getValidFileList(); validFileList.forEach(function(fileItem) { promises.push(this._writeOneFile(fileItem, reportList)); }.bind(this)); return Deferred.all(promises, function(error) { return {_error: error}; ...
[ "function", "writeReplacedContents", "(", "reportList", ")", "{", "var", "promises", "=", "[", "]", ";", "var", "validFileList", "=", "this", ".", "getValidFileList", "(", ")", ";", "validFileList", ".", "forEach", "(", "function", "(", "fileItem", ")", "{",...
Write the replace file contents. Required function. @param {Array} reportList The array of the report items. Each item of the reportList contains the following properties model: the file item matchesReplaced: The number of matches that replaced in this file status: "pass" or "failed" message: Optional. The error messag...
[ "Write", "the", "replace", "file", "contents", ".", "Required", "function", "." ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.ui/web/orion/searchModel.js#L555-L562
train
eclipse/orion.client
bundles/org.eclipse.orion.client.javascript/web/eslint/lib/rules/no-invalid-this.js
isReflectApply
function isReflectApply(node) { return node.type === "MemberExpression" && node.object.type === "Identifier" && node.object.name === "Reflect" && node.property.type === "Identifier" && node.property.name === "apply" && node.computed === false; }
javascript
function isReflectApply(node) { return node.type === "MemberExpression" && node.object.type === "Identifier" && node.object.name === "Reflect" && node.property.type === "Identifier" && node.property.name === "apply" && node.computed === false; }
[ "function", "isReflectApply", "(", "node", ")", "{", "return", "node", ".", "type", "===", "\"MemberExpression\"", "&&", "node", ".", "object", ".", "type", "===", "\"Identifier\"", "&&", "node", ".", "object", ".", "name", "===", "\"Reflect\"", "&&", "node"...
Checks whether or not a node is 'Reclect.apply'. @param {ASTNode} node - A node to check. @returns {boolean} Whether or not the node is a 'Reclect.apply'.
[ "Checks", "whether", "or", "not", "a", "node", "is", "Reclect", ".", "apply", "." ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.javascript/web/eslint/lib/rules/no-invalid-this.js#L42-L49
train
eclipse/orion.client
bundles/org.eclipse.orion.client.javascript/web/eslint/lib/rules/no-invalid-this.js
isES5Constructor
function isES5Constructor(node) { return node.id && node.id.name[0] !== node.id.name[0].toLocaleLowerCase(); }
javascript
function isES5Constructor(node) { return node.id && node.id.name[0] !== node.id.name[0].toLocaleLowerCase(); }
[ "function", "isES5Constructor", "(", "node", ")", "{", "return", "node", ".", "id", "&&", "node", ".", "id", ".", "name", "[", "0", "]", "!==", "node", ".", "id", ".", "name", "[", "0", "]", ".", "toLocaleLowerCase", "(", ")", ";", "}" ]
Checks whether or not a node is a constructor. @param {ASTNode} node - A function node to check. @returns {boolean} Wehether or not a node is a constructor.
[ "Checks", "whether", "or", "not", "a", "node", "is", "a", "constructor", "." ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.javascript/web/eslint/lib/rules/no-invalid-this.js#L92-L95
train
eclipse/orion.client
bundles/org.eclipse.orion.client.javascript/web/eslint/lib/rules/no-invalid-this.js
function(node) { var current = stack.getCurrent(); if (current && !current.valid) { context.report(node, ProblemMessages.noInvalidThis); } }
javascript
function(node) { var current = stack.getCurrent(); if (current && !current.valid) { context.report(node, ProblemMessages.noInvalidThis); } }
[ "function", "(", "node", ")", "{", "var", "current", "=", "stack", ".", "getCurrent", "(", ")", ";", "if", "(", "current", "&&", "!", "current", ".", "valid", ")", "{", "context", ".", "report", "(", "node", ",", "ProblemMessages", ".", "noInvalidThis"...
Reports if 'this' of the current context is invalid.
[ "Reports", "if", "this", "of", "the", "current", "context", "is", "invalid", "." ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.javascript/web/eslint/lib/rules/no-invalid-this.js#L322-L328
train
eclipse/orion.client
bundles/org.eclipse.orion.client.editor/web/orion/editor/editor.js
function() { BaseEditor.prototype.destroy.call(this); this._textViewFactory = this._undoStackFactory = this._textDNDFactory = this._annotationFactory = this._foldingRulerFactory = this._lineNumberRulerFactory = this._contentAssistFactory = this._keyBindingFactory = this._hoverFactory = this._zoomRulerFact...
javascript
function() { BaseEditor.prototype.destroy.call(this); this._textViewFactory = this._undoStackFactory = this._textDNDFactory = this._annotationFactory = this._foldingRulerFactory = this._lineNumberRulerFactory = this._contentAssistFactory = this._keyBindingFactory = this._hoverFactory = this._zoomRulerFact...
[ "function", "(", ")", "{", "BaseEditor", ".", "prototype", ".", "destroy", ".", "call", "(", "this", ")", ";", "this", ".", "_textViewFactory", "=", "this", ".", "_undoStackFactory", "=", "this", ".", "_textDNDFactory", "=", "this", ".", "_annotationFactory"...
Destroys the editor.
[ "Destroys", "the", "editor", "." ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.editor/web/orion/editor/editor.js#L327-L332
train
eclipse/orion.client
bundles/org.eclipse.orion.client.editor/web/orion/editor/editor.js
function(start, end) { var annotationModel = this.getAnnotationModel(); if(annotationModel) { var foldingAnnotation = new mAnnotations.FoldingAnnotation(start, end, this.getTextView().getModel()); annotationModel.addAnnotation(foldingAnnotation); return foldingAnnotation; } return null; }
javascript
function(start, end) { var annotationModel = this.getAnnotationModel(); if(annotationModel) { var foldingAnnotation = new mAnnotations.FoldingAnnotation(start, end, this.getTextView().getModel()); annotationModel.addAnnotation(foldingAnnotation); return foldingAnnotation; } return null; }
[ "function", "(", "start", ",", "end", ")", "{", "var", "annotationModel", "=", "this", ".", "getAnnotationModel", "(", ")", ";", "if", "(", "annotationModel", ")", "{", "var", "foldingAnnotation", "=", "new", "mAnnotations", ".", "FoldingAnnotation", "(", "s...
Creates and add a FoldingAnnotation to the editor. @param {Number} start The start offset of the annotation in the text model. @param {Number} end The end offset of the annotation in the text model. @returns {orion.editor.FoldingAnnotation} The FoldingAnnotation added to the editor.
[ "Creates", "and", "add", "a", "FoldingAnnotation", "to", "the", "editor", "." ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.editor/web/orion/editor/editor.js#L398-L406
train
eclipse/orion.client
bundles/org.eclipse.orion.client.editor/web/orion/editor/editor.js
function() { if (!this._textView) { return null; } var model = this._textView.getModel(); if (model.getBaseModel) { model = model.getBaseModel(); } return model; }
javascript
function() { if (!this._textView) { return null; } var model = this._textView.getModel(); if (model.getBaseModel) { model = model.getBaseModel(); } return model; }
[ "function", "(", ")", "{", "if", "(", "!", "this", ".", "_textView", ")", "{", "return", "null", ";", "}", "var", "model", "=", "this", ".", "_textView", ".", "getModel", "(", ")", ";", "if", "(", "model", ".", "getBaseModel", ")", "{", "model", ...
Returns the base text model of this editor. @returns {orion.editor.TextModel}
[ "Returns", "the", "base", "text", "model", "of", "this", "editor", "." ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.editor/web/orion/editor/editor.js#L454-L463
train
eclipse/orion.client
bundles/org.eclipse.orion.client.editor/web/orion/editor/editor.js
function(visible, force) { if (this._annotationRulerVisible === visible && !force) { return; } this._annotationRulerVisible = visible; if (!this._annotationRuler) { return; } var textView = this._textView; if (visible) { textView.addRuler(this._annotationRuler, 0); } else { textView.removeRule...
javascript
function(visible, force) { if (this._annotationRulerVisible === visible && !force) { return; } this._annotationRulerVisible = visible; if (!this._annotationRuler) { return; } var textView = this._textView; if (visible) { textView.addRuler(this._annotationRuler, 0); } else { textView.removeRule...
[ "function", "(", "visible", ",", "force", ")", "{", "if", "(", "this", ".", "_annotationRulerVisible", "===", "visible", "&&", "!", "force", ")", "{", "return", ";", "}", "this", ".", "_annotationRulerVisible", "=", "visible", ";", "if", "(", "!", "this"...
Sets whether the annotation ruler is visible. @param {Boolean} visible <code>true</code> to show ruler, <code>false</code> otherwise
[ "Sets", "whether", "the", "annotation", "ruler", "is", "visible", "." ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.editor/web/orion/editor/editor.js#L532-L542
train
eclipse/orion.client
bundles/org.eclipse.orion.client.editor/web/orion/editor/editor.js
function(visible, force) { if (this._foldingRulerVisible === visible && !force) { return; } if (!visible) { var textActions = this.getTextActions(); if (textActions) { textActions.expandAnnotations(true); } } this._foldingRulerVisible = visible; if (!this._foldingRuler) { return; } va...
javascript
function(visible, force) { if (this._foldingRulerVisible === visible && !force) { return; } if (!visible) { var textActions = this.getTextActions(); if (textActions) { textActions.expandAnnotations(true); } } this._foldingRulerVisible = visible; if (!this._foldingRuler) { return; } va...
[ "function", "(", "visible", ",", "force", ")", "{", "if", "(", "this", ".", "_foldingRulerVisible", "===", "visible", "&&", "!", "force", ")", "{", "return", ";", "}", "if", "(", "!", "visible", ")", "{", "var", "textActions", "=", "this", ".", "getT...
Sets whether the folding ruler is visible. @param {Boolean} visible <code>true</code> to show ruler, <code>false</code> otherwise
[ "Sets", "whether", "the", "folding", "ruler", "is", "visible", "." ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.editor/web/orion/editor/editor.js#L548-L565
train
eclipse/orion.client
bundles/org.eclipse.orion.client.editor/web/orion/editor/editor.js
function(visible, force) { if (this._lineNumberRulerVisible === visible && !force) { return; } this._lineNumberRulerVisible = visible; if (!this._lineNumberRuler) { return; } var textView = this._textView; if (visible) { textView.addRuler(this._lineNumberRuler, !this._annotationRulerVisible ? 0 : 1);...
javascript
function(visible, force) { if (this._lineNumberRulerVisible === visible && !force) { return; } this._lineNumberRulerVisible = visible; if (!this._lineNumberRuler) { return; } var textView = this._textView; if (visible) { textView.addRuler(this._lineNumberRuler, !this._annotationRulerVisible ? 0 : 1);...
[ "function", "(", "visible", ",", "force", ")", "{", "if", "(", "this", ".", "_lineNumberRulerVisible", "===", "visible", "&&", "!", "force", ")", "{", "return", ";", "}", "this", ".", "_lineNumberRulerVisible", "=", "visible", ";", "if", "(", "!", "this"...
Sets whether the line numbering ruler is visible. @param {Boolean} visible <code>true</code> to show ruler, <code>false</code> otherwise
[ "Sets", "whether", "the", "line", "numbering", "ruler", "is", "visible", "." ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.editor/web/orion/editor/editor.js#L571-L581
train
eclipse/orion.client
bundles/org.eclipse.orion.client.editor/web/orion/editor/editor.js
function(visible, force) { if (this._overviewRulerVisible === visible && !force) { return; } this._overviewRulerVisible = visible; if (!this._overviewRuler) { return; } var textView = this._textView; if (visible) { textView.addRuler(this._overviewRuler); } else { textView.removeRuler(this._ove...
javascript
function(visible, force) { if (this._overviewRulerVisible === visible && !force) { return; } this._overviewRulerVisible = visible; if (!this._overviewRuler) { return; } var textView = this._textView; if (visible) { textView.addRuler(this._overviewRuler); } else { textView.removeRuler(this._ove...
[ "function", "(", "visible", ",", "force", ")", "{", "if", "(", "this", ".", "_overviewRulerVisible", "===", "visible", "&&", "!", "force", ")", "{", "return", ";", "}", "this", ".", "_overviewRulerVisible", "=", "visible", ";", "if", "(", "!", "this", ...
Sets whether the overview ruler is visible. @param {Boolean} visible <code>true</code> to show ruler, <code>false</code> otherwise
[ "Sets", "whether", "the", "overview", "ruler", "is", "visible", "." ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.editor/web/orion/editor/editor.js#L587-L597
train
eclipse/orion.client
bundles/org.eclipse.orion.client.editor/web/orion/editor/editor.js
function(visible, force) { if (this._zoomRulerVisible === visible && !force) { return; } this._zoomRulerVisible = visible; if (!this._zoomRuler) { return; } var textView = this._textView; if (visible) { textView.addRuler(this._zoomRuler); } else { textView.removeRuler(this._zoomRuler); } ...
javascript
function(visible, force) { if (this._zoomRulerVisible === visible && !force) { return; } this._zoomRulerVisible = visible; if (!this._zoomRuler) { return; } var textView = this._textView; if (visible) { textView.addRuler(this._zoomRuler); } else { textView.removeRuler(this._zoomRuler); } ...
[ "function", "(", "visible", ",", "force", ")", "{", "if", "(", "this", ".", "_zoomRulerVisible", "===", "visible", "&&", "!", "force", ")", "{", "return", ";", "}", "this", ".", "_zoomRulerVisible", "=", "visible", ";", "if", "(", "!", "this", ".", "...
Sets whether the zoom ruler is visible. @param {Boolean} visible <code>true</code> to show ruler, <code>false</code> otherwise
[ "Sets", "whether", "the", "zoom", "ruler", "is", "visible", "." ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.editor/web/orion/editor/editor.js#L603-L613
train
eclipse/orion.client
bundles/org.eclipse.orion.client.editor/web/orion/editor/editor.js
function(types) { if (textUtil.compare(this._annotationTypesVisible, types)) return; this._annotationTypesVisible = types; if (!this._annotationRuler || !this._textView || !this._annotationRulerVisible) { return; } this._annotationRuler.setAnnotationTypeVisible(types); this._textView.redrawLines(0, undef...
javascript
function(types) { if (textUtil.compare(this._annotationTypesVisible, types)) return; this._annotationTypesVisible = types; if (!this._annotationRuler || !this._textView || !this._annotationRulerVisible) { return; } this._annotationRuler.setAnnotationTypeVisible(types); this._textView.redrawLines(0, undef...
[ "function", "(", "types", ")", "{", "if", "(", "textUtil", ".", "compare", "(", "this", ".", "_annotationTypesVisible", ",", "types", ")", ")", "return", ";", "this", ".", "_annotationTypesVisible", "=", "types", ";", "if", "(", "!", "this", ".", "_annot...
Sets which annotations types are shown in the annotation ruler. Annotations are visible by default. @param {Object} types a hash table mapping annotation type to visibility (i.e. AnnotationType.ANNOTATION_INFO -> true). @since 14.0
[ "Sets", "which", "annotations", "types", "are", "shown", "in", "the", "annotation", "ruler", ".", "Annotations", "are", "visible", "by", "default", "." ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.editor/web/orion/editor/editor.js#L621-L627
train
eclipse/orion.client
bundles/org.eclipse.orion.client.editor/web/orion/editor/editor.js
function(types) { if (textUtil.compare(this._overviewAnnotationTypesVisible, types)) return; this._overviewAnnotationTypesVisible = types; if (!this._overviewRuler || !this._textView || !this._overviewRulerVisible) { return; } this._overviewRuler.setAnnotationTypeVisible(types); this._textView.redrawLine...
javascript
function(types) { if (textUtil.compare(this._overviewAnnotationTypesVisible, types)) return; this._overviewAnnotationTypesVisible = types; if (!this._overviewRuler || !this._textView || !this._overviewRulerVisible) { return; } this._overviewRuler.setAnnotationTypeVisible(types); this._textView.redrawLine...
[ "function", "(", "types", ")", "{", "if", "(", "textUtil", ".", "compare", "(", "this", ".", "_overviewAnnotationTypesVisible", ",", "types", ")", ")", "return", ";", "this", ".", "_overviewAnnotationTypesVisible", "=", "types", ";", "if", "(", "!", "this", ...
Sets which annotations types are shown in the overview ruler. Annotations are visible by default. @param {Object} types a hash table mapping annotation type to visibility (i.e. AnnotationType.ANNOTATION_INFO -> true). @since 14.0
[ "Sets", "which", "annotations", "types", "are", "shown", "in", "the", "overview", "ruler", ".", "Annotations", "are", "visible", "by", "default", "." ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.editor/web/orion/editor/editor.js#L635-L641
train
eclipse/orion.client
bundles/org.eclipse.orion.client.editor/web/orion/editor/editor.js
function(types) { if (textUtil.compare(this._textAnnotationTypesVisible, types)) return; this._textAnnotationTypesVisible = types; if (!this._annotationStyler || !this._textView) { return; } this._annotationStyler.setAnnotationTypeVisible(types); this._textView.redrawLines(0, undefined); }
javascript
function(types) { if (textUtil.compare(this._textAnnotationTypesVisible, types)) return; this._textAnnotationTypesVisible = types; if (!this._annotationStyler || !this._textView) { return; } this._annotationStyler.setAnnotationTypeVisible(types); this._textView.redrawLines(0, undefined); }
[ "function", "(", "types", ")", "{", "if", "(", "textUtil", ".", "compare", "(", "this", ".", "_textAnnotationTypesVisible", ",", "types", ")", ")", "return", ";", "this", ".", "_textAnnotationTypesVisible", "=", "types", ";", "if", "(", "!", "this", ".", ...
Sets which annotations types are shown in the text. Annotations are visible by default. @param {Object} types a hash table mapping annotation type to visibility (i.e. AnnotationType.ANNOTATION_INFO -> true). @since 14.0
[ "Sets", "which", "annotations", "types", "are", "shown", "in", "the", "text", ".", "Annotations", "are", "visible", "by", "default", "." ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.editor/web/orion/editor/editor.js#L649-L655
train
eclipse/orion.client
bundles/org.eclipse.orion.client.editor/web/orion/editor/editor.js
function(line) { // Find any existing annotation var annotationModel = this.getAnnotationModel(); var textModel = this.getModel(); if (textModel.getBaseModel) { textModel = textModel.getBaseModel(); } var type = AT.ANNOTATION_HIGHLIGHTED_LINE; var annotations = annotationModel.getAnnotations(0,...
javascript
function(line) { // Find any existing annotation var annotationModel = this.getAnnotationModel(); var textModel = this.getModel(); if (textModel.getBaseModel) { textModel = textModel.getBaseModel(); } var type = AT.ANNOTATION_HIGHLIGHTED_LINE; var annotations = annotationModel.getAnnotations(0,...
[ "function", "(", "line", ")", "{", "// Find any existing annotation", "var", "annotationModel", "=", "this", ".", "getAnnotationModel", "(", ")", ";", "var", "textModel", "=", "this", ".", "getModel", "(", ")", ";", "if", "(", "textModel", ".", "getBaseModel",...
Highlight a line. @param {number} line
[ "Highlight", "a", "line", "." ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.editor/web/orion/editor/editor.js#L930-L956
train
eclipse/orion.client
bundles/org.eclipse.orion.client.editor/web/orion/editor/editor.js
function() { var annotationModel = this.getAnnotationModel(); var textModel = this.getModel(); if (textModel.getBaseModel) { textModel = textModel.getBaseModel(); } var type = AT.ANNOTATION_HIGHLIGHTED_LINE; var annotations = annotationModel.getAnnotations(0, textModel.getCharCount()); var remo...
javascript
function() { var annotationModel = this.getAnnotationModel(); var textModel = this.getModel(); if (textModel.getBaseModel) { textModel = textModel.getBaseModel(); } var type = AT.ANNOTATION_HIGHLIGHTED_LINE; var annotations = annotationModel.getAnnotations(0, textModel.getCharCount()); var remo...
[ "function", "(", ")", "{", "var", "annotationModel", "=", "this", ".", "getAnnotationModel", "(", ")", ";", "var", "textModel", "=", "this", ".", "getModel", "(", ")", ";", "if", "(", "textModel", ".", "getBaseModel", ")", "{", "textModel", "=", "textMod...
Unhightlight the highlighted line
[ "Unhightlight", "the", "highlighted", "line" ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.editor/web/orion/editor/editor.js#L961-L980
train
eclipse/orion.client
bundles/org.eclipse.orion.client.editor/web/orion/editor/editor.js
function(diffs) { this.showAnnotations(diffs, [ AT.ANNOTATION_DIFF_ADDED, AT.ANNOTATION_DIFF_MODIFIED, AT.ANNOTATION_DIFF_DELETED ], null, function(annotation) { if(annotation.type === "added")//$NON-NLS-0$ return AT.ANNOTATION_DIFF_ADDED; else if (annotation.type === "modified")//$NON-NL...
javascript
function(diffs) { this.showAnnotations(diffs, [ AT.ANNOTATION_DIFF_ADDED, AT.ANNOTATION_DIFF_MODIFIED, AT.ANNOTATION_DIFF_DELETED ], null, function(annotation) { if(annotation.type === "added")//$NON-NLS-0$ return AT.ANNOTATION_DIFF_ADDED; else if (annotation.type === "modified")//$NON-NL...
[ "function", "(", "diffs", ")", "{", "this", ".", "showAnnotations", "(", "diffs", ",", "[", "AT", ".", "ANNOTATION_DIFF_ADDED", ",", "AT", ".", "ANNOTATION_DIFF_MODIFIED", ",", "AT", ".", "ANNOTATION_DIFF_DELETED", "]", ",", "null", ",", "function", "(", "an...
Display git diff annotation on the editor's annotation ruler and overview ruler. @param diffs [] with types "added", "modified", "deleted" Each property in diffs contains an array of objects { lineStart, lineEnd } that provides the starting and ending line index for the specified property.
[ "Display", "git", "diff", "annotation", "on", "the", "editor", "s", "annotation", "ruler", "and", "overview", "ruler", "." ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.editor/web/orion/editor/editor.js#L1478-L1490
train