id
int32
0
58k
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
14,500
eclipse/orion.client
bundles/org.eclipse.orion.client.editor/web/orion/editor/rulers.js
function(lineIndex, e) { if (!this._currentClickGroup) { this._setCurrentGroup(-1); } if (this._hoverTimeout) { window.clearTimeout(this._hoverTimeout); this._hoverTimeout = null; } }
javascript
function(lineIndex, e) { if (!this._currentClickGroup) { this._setCurrentGroup(-1); } if (this._hoverTimeout) { window.clearTimeout(this._hoverTimeout); this._hoverTimeout = null; } }
[ "function", "(", "lineIndex", ",", "e", ")", "{", "if", "(", "!", "this", ".", "_currentClickGroup", ")", "{", "this", ".", "_setCurrentGroup", "(", "-", "1", ")", ";", "}", "if", "(", "this", ".", "_hoverTimeout", ")", "{", "window", ".", "clearTime...
This event is sent when the mouse pointer exits a line annotation. @event @param {Number} lineIndex the line index of the annotation under the pointer. @param {DOMEvent} e the mouse out event. @callback
[ "This", "event", "is", "sent", "when", "the", "mouse", "pointer", "exits", "a", "line", "annotation", "." ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.editor/web/orion/editor/rulers.js#L437-L446
14,501
eclipse/orion.client
bundles/org.eclipse.orion.client.editor/web/orion/editor/rulers.js
LineNumberRuler
function LineNumberRuler (annotationModel, rulerLocation, rulerStyle, oddStyle, evenStyle) { Ruler.call(this, annotationModel, rulerLocation, "page", rulerStyle); //$NON-NLS-0$ this._oddStyle = oddStyle || {style: {backgroundColor: "white"}}; //$NON-NLS-0$ this._evenStyle = evenStyle || {style: {backgroundColor: ...
javascript
function LineNumberRuler (annotationModel, rulerLocation, rulerStyle, oddStyle, evenStyle) { Ruler.call(this, annotationModel, rulerLocation, "page", rulerStyle); //$NON-NLS-0$ this._oddStyle = oddStyle || {style: {backgroundColor: "white"}}; //$NON-NLS-0$ this._evenStyle = evenStyle || {style: {backgroundColor: ...
[ "function", "LineNumberRuler", "(", "annotationModel", ",", "rulerLocation", ",", "rulerStyle", ",", "oddStyle", ",", "evenStyle", ")", "{", "Ruler", ".", "call", "(", "this", ",", "annotationModel", ",", "rulerLocation", ",", "\"page\"", ",", "rulerStyle", ")",...
Constructs a new line numbering ruler. @param {orion.editor.AnnotationModel} annotationModel the annotation model for the ruler. @param {String} [rulerLocation="left"] the location for the ruler. @param {orion.editor.Style} [rulerStyle=undefined] the style for the ruler. @param {orion.editor.Style} [oddStyle={style: {...
[ "Constructs", "a", "new", "line", "numbering", "ruler", "." ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.editor/web/orion/editor/rulers.js#L782-L788
14,502
eclipse/orion.client
bundles/org.eclipse.orion.client.core/web/orion/URITemplate.js
function(params) { var result = []; for (var i = 0; i < this._templateComponents.length; i++) { result.push(this._templateComponents[i].expand(params)); } return result.join(""); }
javascript
function(params) { var result = []; for (var i = 0; i < this._templateComponents.length; i++) { result.push(this._templateComponents[i].expand(params)); } return result.join(""); }
[ "function", "(", "params", ")", "{", "var", "result", "=", "[", "]", ";", "for", "(", "var", "i", "=", "0", ";", "i", "<", "this", ".", "_templateComponents", ".", "length", ";", "i", "++", ")", "{", "result", ".", "push", "(", "this", ".", "_t...
Expands this URITemplate to a URI. @param {Object} params The parameters to use for expansion. This object is a map of keys (variable names) to values (the variable's value in the <a href="http://tools.ietf.org/html/rfc6570#section-3.2.1">expansion algorithm</a>). @returns {String} The resulting URI.
[ "Expands", "this", "URITemplate", "to", "a", "URI", "." ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.core/web/orion/URITemplate.js#L215-L221
14,503
eclipse/orion.client
bundles/org.eclipse.orion.client.ui/web/orion/sites/SiteEditor.js
function(items, userData) { var selfHostingConfig = this._siteClient.getSelfHostingConfig(); var self = this; var dialog = new ConvertToSelfHostingDialog({ serviceRegistry: this.serviceRegistry, fileClient: this.fileClient, siteClient: this._siteClient, selfHostingConfig: selfHostingConfig, func:...
javascript
function(items, userData) { var selfHostingConfig = this._siteClient.getSelfHostingConfig(); var self = this; var dialog = new ConvertToSelfHostingDialog({ serviceRegistry: this.serviceRegistry, fileClient: this.fileClient, siteClient: this._siteClient, selfHostingConfig: selfHostingConfig, func:...
[ "function", "(", "items", ",", "userData", ")", "{", "var", "selfHostingConfig", "=", "this", ".", "_siteClient", ".", "getSelfHostingConfig", "(", ")", ";", "var", "self", "=", "this", ";", "var", "dialog", "=", "new", "ConvertToSelfHostingDialog", "(", "{"...
Special feature for setting up self-hosting
[ "Special", "feature", "for", "setting", "up", "self", "-", "hosting" ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.ui/web/orion/sites/SiteEditor.js#L344-L367
14,504
eclipse/orion.client
bundles/org.eclipse.orion.client.ui/web/orion/sites/SiteEditor.js
function(location) { var deferred = new Deferred(); this._busyWhile(deferred, messages["Loading..."]); this._siteClient.loadSiteConfiguration(location).then( function(siteConfig) { this._setSiteConfiguration(siteConfig); this.setDirty(false); deferred.resolve(siteConfig); }.bind(this), functi...
javascript
function(location) { var deferred = new Deferred(); this._busyWhile(deferred, messages["Loading..."]); this._siteClient.loadSiteConfiguration(location).then( function(siteConfig) { this._setSiteConfiguration(siteConfig); this.setDirty(false); deferred.resolve(siteConfig); }.bind(this), functi...
[ "function", "(", "location", ")", "{", "var", "deferred", "=", "new", "Deferred", "(", ")", ";", "this", ".", "_busyWhile", "(", "deferred", ",", "messages", "[", "\"Loading...\"", "]", ")", ";", "this", ".", "_siteClient", ".", "loadSiteConfiguration", "(...
Loads site configuration from a URL into the editor. @param {String} location URL of the site configuration to load. @returns {orion.Promise} A promise, resolved when the editor has loaded & refreshed itself.
[ "Loads", "site", "configuration", "from", "a", "URL", "into", "the", "editor", "." ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.ui/web/orion/sites/SiteEditor.js#L374-L387
14,505
eclipse/orion.client
bundles/org.eclipse.orion.client.ui/web/orion/sites/SiteEditor.js
function(site) { this._detachListeners(); this._modelListeners = this._modelListeners || []; var editor = this; function bindText(widget, modelField) { function commitWidgetValue(event) { var value = widget.value; //$NON-NLS-0$ var oldValue = site[modelField]; site[modelField] = value; var i...
javascript
function(site) { this._detachListeners(); this._modelListeners = this._modelListeners || []; var editor = this; function bindText(widget, modelField) { function commitWidgetValue(event) { var value = widget.value; //$NON-NLS-0$ var oldValue = site[modelField]; site[modelField] = value; var i...
[ "function", "(", "site", ")", "{", "this", ".", "_detachListeners", "(", ")", ";", "this", ".", "_modelListeners", "=", "this", ".", "_modelListeners", "||", "[", "]", ";", "var", "editor", "=", "this", ";", "function", "bindText", "(", "widget", ",", ...
Hook up listeners that perform form widget -> model updates. @param site {SiteConfiguration}
[ "Hook", "up", "listeners", "that", "perform", "form", "widget", "-", ">", "model", "updates", "." ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.ui/web/orion/sites/SiteEditor.js#L497-L522
14,506
eclipse/orion.client
bundles/org.eclipse.orion.client.ui/web/orion/sites/SiteEditor.js
function(refreshUI) { refreshUI = typeof refreshUI === "undefined" ? true : refreshUI; //$NON-NLS-0$ var siteConfig = this._siteConfiguration; // Omit the HostingStatus field from the object we send since it's likely to be updated from the // sites page, and we don't want to overwrite var status = siteConfig....
javascript
function(refreshUI) { refreshUI = typeof refreshUI === "undefined" ? true : refreshUI; //$NON-NLS-0$ var siteConfig = this._siteConfiguration; // Omit the HostingStatus field from the object we send since it's likely to be updated from the // sites page, and we don't want to overwrite var status = siteConfig....
[ "function", "(", "refreshUI", ")", "{", "refreshUI", "=", "typeof", "refreshUI", "===", "\"undefined\"", "?", "true", ":", "refreshUI", ";", "//$NON-NLS-0$", "var", "siteConfig", "=", "this", ".", "_siteConfiguration", ";", "// Omit the HostingStatus field from the ob...
Callback when 'save' is clicked. @Override @returns True to allow save to proceed, false to prevent it.
[ "Callback", "when", "save", "is", "clicked", "." ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.ui/web/orion/sites/SiteEditor.js#L550-L572
14,507
eclipse/orion.client
bundles/org.eclipse.orion.client.ui/web/orion/webui/RichDropdown.js
RichDropdown
function RichDropdown(options) { this._parentNode = options.parentNode; this._buttonName = options.buttonName; this._id = options.id || "dropDown"; this._buttonDecorator = options.buttonDecorator; this._populateFunction = options.populateFunction; this._noDropdownArrow = options.noDropdownArrow; th...
javascript
function RichDropdown(options) { this._parentNode = options.parentNode; this._buttonName = options.buttonName; this._id = options.id || "dropDown"; this._buttonDecorator = options.buttonDecorator; this._populateFunction = options.populateFunction; this._noDropdownArrow = options.noDropdownArrow; th...
[ "function", "RichDropdown", "(", "options", ")", "{", "this", ".", "_parentNode", "=", "options", ".", "parentNode", ";", "this", ".", "_buttonName", "=", "options", ".", "buttonName", ";", "this", ".", "_id", "=", "options", ".", "id", "||", "\"dropDown\"...
Creates a generic RichDropdown which can be appended to any dom node. @param {DOMNode} options.parentNode The DOM node which this rich dropdown will be appended to @param {Function} options.populateFunction The function which will populate the dropdown when it is opened (see @ref orion.webui.dropdown) @param {String} ...
[ "Creates", "a", "generic", "RichDropdown", "which", "can", "be", "appended", "to", "any", "dom", "node", "." ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.ui/web/orion/webui/RichDropdown.js#L29-L37
14,508
eclipse/orion.client
bundles/org.eclipse.orion.client.ui/web/orion/webui/RichDropdown.js
function(name, decorator, title) { var titleText = title || ""; //$NON-NLS-0$ lib.empty(this._dropdownTriggerButtonLabel); if (decorator) { this._dropdownTriggerButtonLabel.appendChild(decorator); } var nameNode = document.createTextNode(name); this._dropdownTriggerButtonLabel.app...
javascript
function(name, decorator, title) { var titleText = title || ""; //$NON-NLS-0$ lib.empty(this._dropdownTriggerButtonLabel); if (decorator) { this._dropdownTriggerButtonLabel.appendChild(decorator); } var nameNode = document.createTextNode(name); this._dropdownTriggerButtonLabel.app...
[ "function", "(", "name", ",", "decorator", ",", "title", ")", "{", "var", "titleText", "=", "title", "||", "\"\"", ";", "//$NON-NLS-0$\r", "lib", ".", "empty", "(", "this", ".", "_dropdownTriggerButtonLabel", ")", ";", "if", "(", "decorator", ")", "{", "...
Sets the text label displayed in this dropdown's trigger button @param {String} name The string to display on the dropdown trigger button. @param {DOMNode} decorator Optional. A dom node which will be placed in front of the button name. @param {String} title Optional. A string to display as the dropdown trigger button'...
[ "Sets", "the", "text", "label", "displayed", "in", "this", "dropdown", "s", "trigger", "button" ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.ui/web/orion/webui/RichDropdown.js#L92-L104
14,509
eclipse/orion.client
bundles/org.eclipse.orion.client.ui/web/orion/webui/RichDropdown.js
function(labelNode) { labelNode.id = this._dropdownTriggerButtonLabel.id; this._dropdownTriggerButton.replaceChild(labelNode, this._dropdownTriggerButtonLabel); this._dropdownTriggerButtonLabel = labelNode; }
javascript
function(labelNode) { labelNode.id = this._dropdownTriggerButtonLabel.id; this._dropdownTriggerButton.replaceChild(labelNode, this._dropdownTriggerButtonLabel); this._dropdownTriggerButtonLabel = labelNode; }
[ "function", "(", "labelNode", ")", "{", "labelNode", ".", "id", "=", "this", ".", "_dropdownTriggerButtonLabel", ".", "id", ";", "this", ".", "_dropdownTriggerButton", ".", "replaceChild", "(", "labelNode", ",", "this", ".", "_dropdownTriggerButtonLabel", ")", "...
Replaces this dropdown's default trigger button label node with the one specified. @param {DOMNode} labelNode A dom node which will replace the dropdownTriggerButtonLabel
[ "Replaces", "this", "dropdown", "s", "default", "trigger", "button", "label", "node", "with", "the", "one", "specified", "." ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.ui/web/orion/webui/RichDropdown.js#L111-L115
14,510
eclipse/orion.client
bundles/org.eclipse.orion.client.ui/web/orion/webui/RichDropdown.js
function() { if (this._dropdownTriggerButton) { if (this._dropdownTriggerButton.dropdown) { this._dropdownTriggerButton.dropdown.destroy(); this._dropdownTriggerButton.dropdown = null; } this._dropdownTriggerButton = null; } }
javascript
function() { if (this._dropdownTriggerButton) { if (this._dropdownTriggerButton.dropdown) { this._dropdownTriggerButton.dropdown.destroy(); this._dropdownTriggerButton.dropdown = null; } this._dropdownTriggerButton = null; } }
[ "function", "(", ")", "{", "if", "(", "this", ".", "_dropdownTriggerButton", ")", "{", "if", "(", "this", ".", "_dropdownTriggerButton", ".", "dropdown", ")", "{", "this", ".", "_dropdownTriggerButton", ".", "dropdown", ".", "destroy", "(", ")", ";", "this...
Destroys this dropdown and cleans up its resources.
[ "Destroys", "this", "dropdown", "and", "cleans", "up", "its", "resources", "." ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.ui/web/orion/webui/RichDropdown.js#L127-L135
14,511
eclipse/orion.client
bundles/org.eclipse.orion.client.ui/web/orion/dialogs.js
function(msg, onDone, node, title) { if(node){ this._commandRegistry.confirmWithButtons(node, msg,[{label:"OK",callback:function(){ onDone(true); },type:"ok"},{label:"Cancel",callback:function(){ onDone(false); },type:"cancel"}]); }else{ var dialog = new mConfirmDialog.ConfirmDial...
javascript
function(msg, onDone, node, title) { if(node){ this._commandRegistry.confirmWithButtons(node, msg,[{label:"OK",callback:function(){ onDone(true); },type:"ok"},{label:"Cancel",callback:function(){ onDone(false); },type:"cancel"}]); }else{ var dialog = new mConfirmDialog.ConfirmDial...
[ "function", "(", "msg", ",", "onDone", ",", "node", ",", "title", ")", "{", "if", "(", "node", ")", "{", "this", ".", "_commandRegistry", ".", "confirmWithButtons", "(", "node", ",", "msg", ",", "[", "{", "label", ":", "\"OK\"", ",", "callback", ":",...
Prompts the user for configuration, and executes the provided function when done. @param {String} message The confirmation message @param {Function} onDone The function to invoke upon confirmation.
[ "Prompts", "the", "user", "for", "configuration", "and", "executes", "the", "provided", "function", "when", "done", "." ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.ui/web/orion/dialogs.js#L35-L57
14,512
eclipse/orion.client
bundles/org.eclipse.orion.client.collab/web/orion/collab/collabClient.js
CollabClient
function CollabClient(editor, inputManager, fileClient, serviceRegistry, commandRegistry, preferences) { mCollabFileCommands.createFileCommands(serviceRegistry, commandRegistry, fileClient); this.editor = editor; this.inputManager = inputManager; this.fileClient = fileClient; this.preferences = preferences; ...
javascript
function CollabClient(editor, inputManager, fileClient, serviceRegistry, commandRegistry, preferences) { mCollabFileCommands.createFileCommands(serviceRegistry, commandRegistry, fileClient); this.editor = editor; this.inputManager = inputManager; this.fileClient = fileClient; this.preferences = preferences; ...
[ "function", "CollabClient", "(", "editor", ",", "inputManager", ",", "fileClient", ",", "serviceRegistry", ",", "commandRegistry", ",", "preferences", ")", "{", "mCollabFileCommands", ".", "createFileCommands", "(", "serviceRegistry", ",", "commandRegistry", ",", "fil...
Creates a new collaboration client. @class @name orion.collabClient.CollabClient
[ "Creates", "a", "new", "collaboration", "client", "." ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.collab/web/orion/collab/collabClient.js#L61-L108
14,513
eclipse/orion.client
bundles/org.eclipse.orion.client.collab/web/orion/collab/collabClient.js
function(callback) { var self = this; var userService = this.serviceRegistry.getService("orion.core.user"); var authServices = this.serviceRegistry.getServiceReferences("orion.core.auth"); var authService = this.serviceRegistry.getService(authServices[0]); authService.getUser().then(function(jsonData) {...
javascript
function(callback) { var self = this; var userService = this.serviceRegistry.getService("orion.core.user"); var authServices = this.serviceRegistry.getServiceReferences("orion.core.auth"); var authService = this.serviceRegistry.getService(authServices[0]); authService.getUser().then(function(jsonData) {...
[ "function", "(", "callback", ")", "{", "var", "self", "=", "this", ";", "var", "userService", "=", "this", ".", "serviceRegistry", ".", "getService", "(", "\"orion.core.user\"", ")", ";", "var", "authServices", "=", "this", ".", "serviceRegistry", ".", "getS...
Initialize client name and id @param {function} callback
[ "Initialize", "client", "name", "and", "id" ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.collab/web/orion/collab/collabClient.js#L132-L149
14,514
eclipse/orion.client
bundles/org.eclipse.orion.client.collab/web/orion/collab/collabClient.js
function(e) { this.location = e.input.resource; this.updateSelfFileAnnotation(); this.destroyOT(); this.sendCurrentLocation(); if (e.metadata.Attributes) { var projectSessionID = e.metadata.Attributes.hubID; if (this.projectSessionID !== projectSessionID) { this.projectSessionID = projectSes...
javascript
function(e) { this.location = e.input.resource; this.updateSelfFileAnnotation(); this.destroyOT(); this.sendCurrentLocation(); if (e.metadata.Attributes) { var projectSessionID = e.metadata.Attributes.hubID; if (this.projectSessionID !== projectSessionID) { this.projectSessionID = projectSes...
[ "function", "(", "e", ")", "{", "this", ".", "location", "=", "e", ".", "input", ".", "resource", ";", "this", ".", "updateSelfFileAnnotation", "(", ")", ";", "this", ".", "destroyOT", "(", ")", ";", "this", ".", "sendCurrentLocation", "(", ")", ";", ...
Input changed handler
[ "Input", "changed", "handler" ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.collab/web/orion/collab/collabClient.js#L154-L166
14,515
eclipse/orion.client
bundles/org.eclipse.orion.client.collab/web/orion/collab/collabClient.js
function(clientId, contextP, url, editing) { var peer = this.getPeer(clientId); // Peer might be loading. Once it is loaded, this annotation will be automatically updated, // so we can safely leave it blank. var name = (peer && peer.name) ? peer.name : 'Unknown'; var color = (peer && peer.color) ? peer.c...
javascript
function(clientId, contextP, url, editing) { var peer = this.getPeer(clientId); // Peer might be loading. Once it is loaded, this annotation will be automatically updated, // so we can safely leave it blank. var name = (peer && peer.name) ? peer.name : 'Unknown'; var color = (peer && peer.color) ? peer.c...
[ "function", "(", "clientId", ",", "contextP", ",", "url", ",", "editing", ")", "{", "var", "peer", "=", "this", ".", "getPeer", "(", "clientId", ")", ";", "// Peer might be loading. Once it is loaded, this annotation will be automatically updated,", "// so we can safely l...
Add or update a record of collaborator file annotation and request to update UI @param {string} clientId @param {string} url @param {boolean} editing
[ "Add", "or", "update", "a", "record", "of", "collaborator", "file", "annotation", "and", "request", "to", "update", "UI" ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.collab/web/orion/collab/collabClient.js#L192-L203
14,516
eclipse/orion.client
bundles/org.eclipse.orion.client.collab/web/orion/collab/collabClient.js
function() { var self = this; if (!this.collabFileAnnotationsUpdateTimeoutId) { // No delayed update is assigned. Assign one. // This is necessary because we don't want duplicate UI action within a short period. this.collabFileAnnotationsUpdateTimeoutId = setTimeout(function() { self.collabFileAn...
javascript
function() { var self = this; if (!this.collabFileAnnotationsUpdateTimeoutId) { // No delayed update is assigned. Assign one. // This is necessary because we don't want duplicate UI action within a short period. this.collabFileAnnotationsUpdateTimeoutId = setTimeout(function() { self.collabFileAn...
[ "function", "(", ")", "{", "var", "self", "=", "this", ";", "if", "(", "!", "this", ".", "collabFileAnnotationsUpdateTimeoutId", ")", "{", "// No delayed update is assigned. Assign one.", "// This is necessary because we don't want duplicate UI action within a short period.", "...
Request a file annotation UI update
[ "Request", "a", "file", "annotation", "UI", "update" ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.collab/web/orion/collab/collabClient.js#L220-L254
14,517
eclipse/orion.client
bundles/org.eclipse.orion.client.collab/web/orion/collab/collabClient.js
function(peer) { if (this.peers[peer.id]) { // Update this.peers[peer.id] = peer; } else { // Add this.peers[peer.id] = peer; } if (this.collabHasFileAnnotation(peer.id)) { var annotation = this.getCollabFileAnnotation(peer.id); this.addOrUpdateCollabFileAnnotation(peer.id, contextPa...
javascript
function(peer) { if (this.peers[peer.id]) { // Update this.peers[peer.id] = peer; } else { // Add this.peers[peer.id] = peer; } if (this.collabHasFileAnnotation(peer.id)) { var annotation = this.getCollabFileAnnotation(peer.id); this.addOrUpdateCollabFileAnnotation(peer.id, contextPa...
[ "function", "(", "peer", ")", "{", "if", "(", "this", ".", "peers", "[", "peer", ".", "id", "]", ")", "{", "// Update", "this", ".", "peers", "[", "peer", ".", "id", "]", "=", "peer", ";", "}", "else", "{", "// Add", "this", ".", "peers", "[", ...
Add or update peer record @param {CollabPeer} peer -
[ "Add", "or", "update", "peer", "record" ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.collab/web/orion/collab/collabClient.js#L288-L304
14,518
eclipse/orion.client
bundles/org.eclipse.orion.client.ui/web/orion/inputManager.js
function(syntaxChecker, timeout) { var time = timeout; if (!syntaxChecker){ time = -1; } this._autoSyntaxEnabled = time !== -1; this._autoSyntaxActive = false; if (!this._idle2) { var options = { document: document, timeout: time }; this._idle2 = new Idle(options)...
javascript
function(syntaxChecker, timeout) { var time = timeout; if (!syntaxChecker){ time = -1; } this._autoSyntaxEnabled = time !== -1; this._autoSyntaxActive = false; if (!this._idle2) { var options = { document: document, timeout: time }; this._idle2 = new Idle(options)...
[ "function", "(", "syntaxChecker", ",", "timeout", ")", "{", "var", "time", "=", "timeout", ";", "if", "(", "!", "syntaxChecker", ")", "{", "time", "=", "-", "1", ";", "}", "this", ".", "_autoSyntaxEnabled", "=", "time", "!==", "-", "1", ";", "this", ...
Set the auto syntax check timeout. Recommended this is only set when autosave is turned off because save operations will already run the syntax checker. @param syntaxChecker {Function} Function that will execute the syntax check @param timeout {Number} How long to idle before syntax checking in milliseconds, -1 to dis...
[ "Set", "the", "auto", "syntax", "check", "timeout", ".", "Recommended", "this", "is", "only", "set", "when", "autosave", "is", "turned", "off", "because", "save", "operations", "will", "already", "run", "the", "syntax", "checker", "." ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.ui/web/orion/inputManager.js#L543-L569
14,519
eclipse/orion.client
bundles/org.eclipse.orion.client.core/web/orion/bidiUtils.js
getBidiLayout
function getBidiLayout() { var _bidiLayout = localStorage.getItem(bidiLayoutStorage); if (_bidiLayout && (_bidiLayout === "rtl" || _bidiLayout === "ltr" || _bidiLayout === "auto")) { //$NON-NLS-0$ //$NON-NLS-1$ //$NON-NLS-2$ return _bidiLayout; } return "ltr"; //$NON-NLS-0$ }
javascript
function getBidiLayout() { var _bidiLayout = localStorage.getItem(bidiLayoutStorage); if (_bidiLayout && (_bidiLayout === "rtl" || _bidiLayout === "ltr" || _bidiLayout === "auto")) { //$NON-NLS-0$ //$NON-NLS-1$ //$NON-NLS-2$ return _bidiLayout; } return "ltr"; //$NON-NLS-0$ }
[ "function", "getBidiLayout", "(", ")", "{", "var", "_bidiLayout", "=", "localStorage", ".", "getItem", "(", "bidiLayoutStorage", ")", ";", "if", "(", "_bidiLayout", "&&", "(", "_bidiLayout", "===", "\"rtl\"", "||", "_bidiLayout", "===", "\"ltr\"", "||", "_bidi...
returns bidiLayout value set in globalization settings. @returns {String} text direction.
[ "returns", "bidiLayout", "value", "set", "in", "globalization", "settings", "." ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.core/web/orion/bidiUtils.js#L61-L67
14,520
eclipse/orion.client
bundles/org.eclipse.orion.client.core/web/orion/bidiUtils.js
getTextDirection
function getTextDirection(text) { bidiLayout = getBidiLayout(); if (!isBidiEnabled()) { return ""; } if (bidiLayout === "auto" && util.isIE) { //$NON-NLS-0$ return checkContextual(text); } return bidiLayout; }
javascript
function getTextDirection(text) { bidiLayout = getBidiLayout(); if (!isBidiEnabled()) { return ""; } if (bidiLayout === "auto" && util.isIE) { //$NON-NLS-0$ return checkContextual(text); } return bidiLayout; }
[ "function", "getTextDirection", "(", "text", ")", "{", "bidiLayout", "=", "getBidiLayout", "(", ")", ";", "if", "(", "!", "isBidiEnabled", "(", ")", ")", "{", "return", "\"\"", ";", "}", "if", "(", "bidiLayout", "===", "\"auto\"", "&&", "util", ".", "i...
returns text direction. this method is used for handling direction by adding a dir attribute in an HTML element. if bidiLayout is set to ltr > return ltr if bidiLayout is set to rtl > return rtl if bidiLayout is set to auto > check for first strong character in text and return ltr or rtl accordingly. @param {String} th...
[ "returns", "text", "direction", ".", "this", "method", "is", "used", "for", "handling", "direction", "by", "adding", "a", "dir", "attribute", "in", "an", "HTML", "element", ".", "if", "bidiLayout", "is", "set", "to", "ltr", ">", "return", "ltr", "if", "b...
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.core/web/orion/bidiUtils.js#L78-L87
14,521
eclipse/orion.client
bundles/org.eclipse.orion.client.webtools/web/beautifier/lib/beautify-css.js
foundNestedPseudoClass
function foundNestedPseudoClass() { var openParen = 0; for (var i = pos + 1; i < source_text.length; i++) { var ch = source_text.charAt(i); if (ch === "{") { return true; } else if (ch === '(') { // pseudocla...
javascript
function foundNestedPseudoClass() { var openParen = 0; for (var i = pos + 1; i < source_text.length; i++) { var ch = source_text.charAt(i); if (ch === "{") { return true; } else if (ch === '(') { // pseudocla...
[ "function", "foundNestedPseudoClass", "(", ")", "{", "var", "openParen", "=", "0", ";", "for", "(", "var", "i", "=", "pos", "+", "1", ";", "i", "<", "source_text", ".", "length", ";", "i", "++", ")", "{", "var", "ch", "=", "source_text", ".", "char...
Nested pseudo-class if we are insideRule and the next special character found opens a new block
[ "Nested", "pseudo", "-", "class", "if", "we", "are", "insideRule", "and", "the", "next", "special", "character", "found", "opens", "a", "new", "block" ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.webtools/web/beautifier/lib/beautify-css.js#L184-L203
14,522
eclipse/orion.client
bundles/org.eclipse.orion.client.ui/web/orion/urlUtils.js
processURLSegments
function processURLSegments(parentNode, segments) { segments.forEach(function(segment) { if (segment.urlStr){ var link = document.createElement("a"); //$NON-NLS-0$ link.href = segment.urlStr; link.appendChild(document.createTextNode(segment.segmentStr)); link.dir = bidiUtils.getTe...
javascript
function processURLSegments(parentNode, segments) { segments.forEach(function(segment) { if (segment.urlStr){ var link = document.createElement("a"); //$NON-NLS-0$ link.href = segment.urlStr; link.appendChild(document.createTextNode(segment.segmentStr)); link.dir = bidiUtils.getTe...
[ "function", "processURLSegments", "(", "parentNode", ",", "segments", ")", "{", "segments", ".", "forEach", "(", "function", "(", "segment", ")", "{", "if", "(", "segment", ".", "urlStr", ")", "{", "var", "link", "=", "document", ".", "createElement", "(",...
Render an array of string segments. @param {dom node} parentNode The given parent dom node where the segments will be rendered. @param {orion.urlUtils.Segment[]} segments The given array containing all the segments.
[ "Render", "an", "array", "of", "string", "segments", "." ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.ui/web/orion/urlUtils.js#L63-L78
14,523
eclipse/orion.client
bundles/org.eclipse.orion.client.ui/web/orion/webui/littlelib.js
empty
function empty(node) { while (node && node.hasChildNodes()) { var child = node.firstChild; node.removeChild(child); } }
javascript
function empty(node) { while (node && node.hasChildNodes()) { var child = node.firstChild; node.removeChild(child); } }
[ "function", "empty", "(", "node", ")", "{", "while", "(", "node", "&&", "node", ".", "hasChildNodes", "(", ")", ")", "{", "var", "child", "=", "node", ".", "firstChild", ";", "node", ".", "removeChild", "(", "child", ")", ";", "}", "}" ]
Removes all children of the given node. @name orion.webui.littlelib.empty @function @static @param {Node} node
[ "Removes", "all", "children", "of", "the", "given", "node", "." ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.ui/web/orion/webui/littlelib.js#L143-L148
14,524
eclipse/orion.client
bundles/org.eclipse.orion.client.ui/web/orion/webui/littlelib.js
onclick
function onclick(event) { autoDismissNodes.forEach(function(autoDismissNode) { var excludeNodeInDocument = false; var excluded = autoDismissNode.excludeNodes.some(function(excludeNode) { if(document.body.contains(excludeNode)) { excludeNodeInDocument = true; return excludeNode.contains...
javascript
function onclick(event) { autoDismissNodes.forEach(function(autoDismissNode) { var excludeNodeInDocument = false; var excluded = autoDismissNode.excludeNodes.some(function(excludeNode) { if(document.body.contains(excludeNode)) { excludeNodeInDocument = true; return excludeNode.contains...
[ "function", "onclick", "(", "event", ")", "{", "autoDismissNodes", ".", "forEach", "(", "function", "(", "autoDismissNode", ")", "{", "var", "excludeNodeInDocument", "=", "false", ";", "var", "excluded", "=", "autoDismissNode", ".", "excludeNodes", ".", "some", ...
auto dismissal. Click anywhere else means close.
[ "auto", "dismissal", ".", "Click", "anywhere", "else", "means", "close", "." ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.ui/web/orion/webui/littlelib.js#L396-L422
14,525
eclipse/orion.client
bundles/org.eclipse.orion.client.ui/web/orion/webui/littlelib.js
getOffsetParent
function getOffsetParent(node) { var offsetParent = node.parentNode, documentElement = document.documentElement; while (offsetParent && offsetParent !== documentElement) { var style = window.getComputedStyle(offsetParent, null); if (!style) { break; } var overflow = style.getPropertyValue("overflow-y"...
javascript
function getOffsetParent(node) { var offsetParent = node.parentNode, documentElement = document.documentElement; while (offsetParent && offsetParent !== documentElement) { var style = window.getComputedStyle(offsetParent, null); if (!style) { break; } var overflow = style.getPropertyValue("overflow-y"...
[ "function", "getOffsetParent", "(", "node", ")", "{", "var", "offsetParent", "=", "node", ".", "parentNode", ",", "documentElement", "=", "document", ".", "documentElement", ";", "while", "(", "offsetParent", "&&", "offsetParent", "!==", "documentElement", ")", ...
Returns the parent of the node that has the vertical scroll bar. @name orion.webui.littlelib.getOffsetParent @function @static @param {Element} node The node to lookup the offset parent
[ "Returns", "the", "parent", "of", "the", "node", "that", "has", "the", "vertical", "scroll", "bar", "." ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.ui/web/orion/webui/littlelib.js#L466-L476
14,526
eclipse/orion.client
bundles/org.eclipse.orion.client.ui/web/orion/webui/littlelib.js
stop
function stop(event) { if (window.document.all) { event.keyCode = 0; } if (event.preventDefault) { event.preventDefault(); event.stopPropagation(); } }
javascript
function stop(event) { if (window.document.all) { event.keyCode = 0; } if (event.preventDefault) { event.preventDefault(); event.stopPropagation(); } }
[ "function", "stop", "(", "event", ")", "{", "if", "(", "window", ".", "document", ".", "all", ")", "{", "event", ".", "keyCode", "=", "0", ";", "}", "if", "(", "event", ".", "preventDefault", ")", "{", "event", ".", "preventDefault", "(", ")", ";",...
Cancels the default behavior of an event and stops its propagation. @name orion.webui.littlelib.stop @function @static @param {Event} event
[ "Cancels", "the", "default", "behavior", "of", "an", "event", "and", "stops", "its", "propagation", "." ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.ui/web/orion/webui/littlelib.js#L529-L537
14,527
eclipse/orion.client
bundles/org.eclipse.orion.client.ui/web/orion/webui/littlelib.js
createNodes
function createNodes(templateString, parentNode) { var parent = parentNode; var newNodes = null; if (undefined === parent) { parent = document.createElement("div"); //$NON-NLS-0$ } parent.innerHTML = templateString; if (parent.children.length > 1) { newNodes = parent.children; } else...
javascript
function createNodes(templateString, parentNode) { var parent = parentNode; var newNodes = null; if (undefined === parent) { parent = document.createElement("div"); //$NON-NLS-0$ } parent.innerHTML = templateString; if (parent.children.length > 1) { newNodes = parent.children; } else...
[ "function", "createNodes", "(", "templateString", ",", "parentNode", ")", "{", "var", "parent", "=", "parentNode", ";", "var", "newNodes", "=", "null", ";", "if", "(", "undefined", "===", "parent", ")", "{", "parent", "=", "document", ".", "createElement", ...
Creates DOM nodes from the specified template string. @param {String} templateString A string containing the HTML template to use @param {Node} parentNode Optional. The parent node to insert the new nodes into. The parent's contents will be completely replaced. @returns If the template string contains a single node...
[ "Creates", "DOM", "nodes", "from", "the", "specified", "template", "string", "." ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.ui/web/orion/webui/littlelib.js#L588-L604
14,528
eclipse/orion.client
bundles/org.eclipse.orion.client.ui/web/orion/shell/Shell.js
function() { var outputDiv = document.getElementsByClassName("gcli-output")[0]; //$NON-NLS-0$ while (outputDiv.hasChildNodes()) { outputDiv.removeChild(outputDiv.lastChild); } this.output(i18nUtil.formatMessage(messages["AvailableCmdsType"], "<b>help</b>")); //$NON-NLS-0$ }
javascript
function() { var outputDiv = document.getElementsByClassName("gcli-output")[0]; //$NON-NLS-0$ while (outputDiv.hasChildNodes()) { outputDiv.removeChild(outputDiv.lastChild); } this.output(i18nUtil.formatMessage(messages["AvailableCmdsType"], "<b>help</b>")); //$NON-NLS-0$ }
[ "function", "(", ")", "{", "var", "outputDiv", "=", "document", ".", "getElementsByClassName", "(", "\"gcli-output\"", ")", "[", "0", "]", ";", "//$NON-NLS-0$", "while", "(", "outputDiv", ".", "hasChildNodes", "(", ")", ")", "{", "outputDiv", ".", "removeChi...
Clears the Shell's output area.
[ "Clears", "the", "Shell", "s", "output", "area", "." ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.ui/web/orion/shell/Shell.js#L64-L70
14,529
eclipse/orion.client
bundles/org.eclipse.orion.client.ui/web/orion/shell/Shell.js
function(content) { var output = new mCli.Output(); this.commandOutputManager.onOutput({output: output}); output.complete(content); }
javascript
function(content) { var output = new mCli.Output(); this.commandOutputManager.onOutput({output: output}); output.complete(content); }
[ "function", "(", "content", ")", "{", "var", "output", "=", "new", "mCli", ".", "Output", "(", ")", ";", "this", ".", "commandOutputManager", ".", "onOutput", "(", "{", "output", ":", "output", "}", ")", ";", "output", ".", "complete", "(", "content", ...
Renders HTML content in the Shell's output area. @param {String} content the HTML content to output
[ "Renders", "HTML", "content", "in", "the", "Shell", "s", "output", "area", "." ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.ui/web/orion/shell/Shell.js#L76-L80
14,530
eclipse/orion.client
bundles/org.eclipse.orion.client.javascript/web/eslint/lib/utils/comment-event-generator.js
enterNode
function enterNode(node) { var comments = this.sourceCode.getComments(node); emitCommentsEnter(this, comments.leading); this.original.enterNode(node); emitCommentsEnter(this, comments.trailing); }
javascript
function enterNode(node) { var comments = this.sourceCode.getComments(node); emitCommentsEnter(this, comments.leading); this.original.enterNode(node); emitCommentsEnter(this, comments.trailing); }
[ "function", "enterNode", "(", "node", ")", "{", "var", "comments", "=", "this", ".", "sourceCode", ".", "getComments", "(", "node", ")", ";", "emitCommentsEnter", "(", "this", ",", "comments", ".", "leading", ")", ";", "this", ".", "original", ".", "ente...
Emits an event of entering comments. @param {ASTNode} node - A node which was entered. @returns {void}
[ "Emits", "an", "event", "of", "entering", "comments", "." ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.javascript/web/eslint/lib/utils/comment-event-generator.js#L96-L102
14,531
eclipse/orion.client
bundles/org.eclipse.orion.client.javascript/web/eslint/lib/utils/comment-event-generator.js
leaveNode
function leaveNode(node) { var comments = this.sourceCode.getComments(node); emitCommentsExit(this, comments.trailing); this.original.leaveNode(node); emitCommentsExit(this, comments.leading); }
javascript
function leaveNode(node) { var comments = this.sourceCode.getComments(node); emitCommentsExit(this, comments.trailing); this.original.leaveNode(node); emitCommentsExit(this, comments.leading); }
[ "function", "leaveNode", "(", "node", ")", "{", "var", "comments", "=", "this", ".", "sourceCode", ".", "getComments", "(", "node", ")", ";", "emitCommentsExit", "(", "this", ",", "comments", ".", "trailing", ")", ";", "this", ".", "original", ".", "leav...
Emits an event of leaving comments. @param {ASTNode} node - A node which was left. @returns {void}
[ "Emits", "an", "event", "of", "leaving", "comments", "." ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.javascript/web/eslint/lib/utils/comment-event-generator.js#L109-L115
14,532
eclipse/orion.client
bundles/org.eclipse.orion.client.editor/web/orion/editor/contentAssist.js
function(proposal) { if (!proposal) { return false; } // now handle prefixes // if there is a non-empty selection, then replace it, // if overwrite is truthy, then also replace the prefix var view = this.textView; var sel = view.getSelection(); var start = this._initialCaretOffse...
javascript
function(proposal) { if (!proposal) { return false; } // now handle prefixes // if there is a non-empty selection, then replace it, // if overwrite is truthy, then also replace the prefix var view = this.textView; var sel = view.getSelection(); var start = this._initialCaretOffse...
[ "function", "(", "proposal", ")", "{", "if", "(", "!", "proposal", ")", "{", "return", "false", ";", "}", "// now handle prefixes\r", "// if there is a non-empty selection, then replace it,\r", "// if overwrite is truthy, then also replace the prefix\r", "var", "view", "=", ...
Applies the given proposal to the TextView. @param {Object} [proposal] @returns {Boolean} <code>true</code> if the proposal was applied; <code>false</code> if no proposal was provided.
[ "Applies", "the", "given", "proposal", "to", "the", "TextView", "." ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.editor/web/orion/editor/contentAssist.js#L161-L207
14,533
eclipse/orion.client
bundles/org.eclipse.orion.client.editor/web/orion/editor/contentAssist.js
function() { // figure out initial offset, it should be the minimum between // the beginning of the selection and the current caret offset var offset = this.textView.getCaretOffset(); var sel = this.textView.getSelection(); var selectionStart = Math.min(sel.start, sel.end); this._initialCare...
javascript
function() { // figure out initial offset, it should be the minimum between // the beginning of the selection and the current caret offset var offset = this.textView.getCaretOffset(); var sel = this.textView.getSelection(); var selectionStart = Math.min(sel.start, sel.end); this._initialCare...
[ "function", "(", ")", "{", "// figure out initial offset, it should be the minimum between \r", "// the beginning of the selection and the current caret offset\r", "var", "offset", "=", "this", ".", "textView", ".", "getCaretOffset", "(", ")", ";", "var", "sel", "=", "this", ...
Computes the proposals at the TextView's current caret offset.
[ "Computes", "the", "proposals", "at", "the", "TextView", "s", "current", "caret", "offset", "." ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.editor/web/orion/editor/contentAssist.js#L276-L302
14,534
eclipse/orion.client
bundles/org.eclipse.orion.client.editor/web/orion/editor/contentAssist.js
function(proposals) { // get rid of extra separators and titles var mappedProposals = proposals.map(function(proposalArray) { var element = proposalArray.filter(function(proposal, index) { var keepElement = true; if (STYLES[proposal.style] === STYLES.hr) { if ((0 === index) || ((proposal...
javascript
function(proposals) { // get rid of extra separators and titles var mappedProposals = proposals.map(function(proposalArray) { var element = proposalArray.filter(function(proposal, index) { var keepElement = true; if (STYLES[proposal.style] === STYLES.hr) { if ((0 === index) || ((proposal...
[ "function", "(", "proposals", ")", "{", "// get rid of extra separators and titles\r", "var", "mappedProposals", "=", "proposals", ".", "map", "(", "function", "(", "proposalArray", ")", "{", "var", "element", "=", "proposalArray", ".", "filter", "(", "function", ...
Helper method which removes extra separators and titles from an array containing arrays of proposals from the various providers. @param{Array[]} proposals An array with each element containing an array of proposals @returns {Array} An array without the extra unselectable elements
[ "Helper", "method", "which", "removes", "extra", "separators", "and", "titles", "from", "an", "array", "containing", "arrays", "of", "proposals", "from", "the", "various", "providers", "." ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.editor/web/orion/editor/contentAssist.js#L547-L575
14,535
eclipse/orion.client
bundles/org.eclipse.orion.client.editor/web/orion/editor/contentAssist.js
function(arrayOrObjectArray) { return arrayOrObjectArray.reduce(function(prev, curr) { var returnValue = prev; var filteredArray = null; if (curr && Array.isArray(curr)) { filteredArray = curr.filter(function(element){ return element; //filter out falsy elements }); ...
javascript
function(arrayOrObjectArray) { return arrayOrObjectArray.reduce(function(prev, curr) { var returnValue = prev; var filteredArray = null; if (curr && Array.isArray(curr)) { filteredArray = curr.filter(function(element){ return element; //filter out falsy elements }); ...
[ "function", "(", "arrayOrObjectArray", ")", "{", "return", "arrayOrObjectArray", ".", "reduce", "(", "function", "(", "prev", ",", "curr", ")", "{", "var", "returnValue", "=", "prev", ";", "var", "filteredArray", "=", "null", ";", "if", "(", "curr", "&&", ...
Flattens an array of arrays into a one-dimensional array. @param {Array[]} array @returns {Array}
[ "Flattens", "an", "array", "of", "arrays", "into", "a", "one", "-", "dimensional", "array", "." ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.editor/web/orion/editor/contentAssist.js#L681-L727
14,536
eclipse/orion.client
bundles/org.eclipse.orion.client.editor/web/orion/editor/contentAssist.js
function(update, noContent) { var tooltip = mTooltip.Tooltip.getTooltip(this.contentAssist.textView); var self = this; var target = { getTooltipInfo: function() { var bounds = self.widget.parentNode.getBoundingClientRect(); var tipArea = {width: 350, height: bounds.height, top: bounds.top};...
javascript
function(update, noContent) { var tooltip = mTooltip.Tooltip.getTooltip(this.contentAssist.textView); var self = this; var target = { getTooltipInfo: function() { var bounds = self.widget.parentNode.getBoundingClientRect(); var tipArea = {width: 350, height: bounds.height, top: bounds.top};...
[ "function", "(", "update", ",", "noContent", ")", "{", "var", "tooltip", "=", "mTooltip", ".", "Tooltip", ".", "getTooltip", "(", "this", ".", "contentAssist", ".", "textView", ")", ";", "var", "self", "=", "this", ";", "var", "target", "=", "{", "getT...
Opens the tooltip for the selected proposal beside the content assist window @param update if false, the tooltip will be hidden then reopened with the new contents @param noContent if true the current tooltip contents will not be replaced, just size and position updated
[ "Opens", "the", "tooltip", "for", "the", "selected", "proposal", "beside", "the", "content", "assist", "window" ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.editor/web/orion/editor/contentAssist.js#L1062-L1090
14,537
eclipse/orion.client
bundles/org.eclipse.orion.client.editor/web/orion/editor/contentAssist.js
function(cloneNode){ cloneNode.contentAssistProposalIndex = node.contentAssistProposalIndex; if (cloneNode.hasChildNodes()) { for (var i = 0 ; i < cloneNode.childNodes.length ; i++){ recursiveSetIndex(cloneNode.childNodes[i]); } } }
javascript
function(cloneNode){ cloneNode.contentAssistProposalIndex = node.contentAssistProposalIndex; if (cloneNode.hasChildNodes()) { for (var i = 0 ; i < cloneNode.childNodes.length ; i++){ recursiveSetIndex(cloneNode.childNodes[i]); } } }
[ "function", "(", "cloneNode", ")", "{", "cloneNode", ".", "contentAssistProposalIndex", "=", "node", ".", "contentAssistProposalIndex", ";", "if", "(", "cloneNode", ".", "hasChildNodes", "(", ")", ")", "{", "for", "(", "var", "i", "=", "0", ";", "i", "<", ...
make all the cloned nodes clickable by setting their contentAssistProposalIndex
[ "make", "all", "the", "cloned", "nodes", "clickable", "by", "setting", "their", "contentAssistProposalIndex" ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.editor/web/orion/editor/contentAssist.js#L1483-L1490
14,538
eclipse/orion.client
bundles/org.eclipse.orion.client.editor/web/orion/editor/mirror.js
function() { if (this.model) { this.model.removeEventListener("Changing", this.listener.onModelChanging); this.model.removeEventListener("Changed", this.listener.onModelChanged); this.model.removeEventListener("Destroy", this.listener.onDestroy); } this.model = null; this.codeMirror = null; t...
javascript
function() { if (this.model) { this.model.removeEventListener("Changing", this.listener.onModelChanging); this.model.removeEventListener("Changed", this.listener.onModelChanged); this.model.removeEventListener("Destroy", this.listener.onDestroy); } this.model = null; this.codeMirror = null; t...
[ "function", "(", ")", "{", "if", "(", "this", ".", "model", ")", "{", "this", ".", "model", ".", "removeEventListener", "(", "\"Changing\"", ",", "this", ".", "listener", ".", "onModelChanging", ")", ";", "this", ".", "model", ".", "removeEventListener", ...
Deactivates this ModeApplier and removes its listeners.
[ "Deactivates", "this", "ModeApplier", "and", "removes", "its", "listeners", "." ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.editor/web/orion/editor/mirror.js#L334-L347
14,539
eclipse/orion.client
bundles/org.eclipse.orion.client.editor/web/orion/editor/mirror.js
function(startLine, endLine, partial) { if (!this.mode) { return; } var lineCount = this.model.getLineCount(); startLine = typeof startLine === "undefined" ? 0 : startLine; endLine = typeof endLine === "undefined" ? lineCount - 1 : Math.min(endLine, lineCount - 1); var mode = this.mode; var sta...
javascript
function(startLine, endLine, partial) { if (!this.mode) { return; } var lineCount = this.model.getLineCount(); startLine = typeof startLine === "undefined" ? 0 : startLine; endLine = typeof endLine === "undefined" ? lineCount - 1 : Math.min(endLine, lineCount - 1); var mode = this.mode; var sta...
[ "function", "(", "startLine", ",", "endLine", ",", "partial", ")", "{", "if", "(", "!", "this", ".", "mode", ")", "{", "return", ";", "}", "var", "lineCount", "=", "this", ".", "model", ".", "getLineCount", "(", ")", ";", "startLine", "=", "typeof", ...
Highlights the given range of lines. @param {Number} [startLine] @param {Number} [endLine] @param {Boolean} [partial=false] If <code>true</code>, this function is assumed to be running as part of a larger operation, and will not dispatch a {@link #event:HighlightEvent}.
[ "Highlights", "the", "given", "range", "of", "lines", "." ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.editor/web/orion/editor/mirror.js#L429-L448
14,540
eclipse/orion.client
bundles/org.eclipse.orion.client.editor/web/orion/editor/mirror.js
function(lineIndex, line, state) { if (!this.mode) { return; } var model = this.model; if (model.getLineStart(lineIndex) === model.getLineEnd(lineIndex) && this.mode.blankLine) { this.mode.blankLine(state); } var style = line.style || []; var text = model.getLine(lineIndex); var stream =...
javascript
function(lineIndex, line, state) { if (!this.mode) { return; } var model = this.model; if (model.getLineStart(lineIndex) === model.getLineEnd(lineIndex) && this.mode.blankLine) { this.mode.blankLine(state); } var style = line.style || []; var text = model.getLine(lineIndex); var stream =...
[ "function", "(", "lineIndex", ",", "line", ",", "state", ")", "{", "if", "(", "!", "this", ".", "mode", ")", "{", "return", ";", "}", "var", "model", "=", "this", ".", "model", ";", "if", "(", "model", ".", "getLineStart", "(", "lineIndex", ")", ...
Highlights a single line. @param {Number} lineIndex @param {Object} line @param {Object} state The state to use for parsing from the start of the line.
[ "Highlights", "a", "single", "line", "." ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.editor/web/orion/editor/mirror.js#L569-L599
14,541
eclipse/orion.client
bundles/org.eclipse.orion.client.editor/web/orion/editor/mirror.js
function(token, str, pos) { if (!token && this.isWhitespaceVisible && /\s+/.test(str)) { var whitespaceStyles = [], start, type; for (var i=0; i < str.length; i++) { var chr = str[i]; if (chr !== type) { if (type) { whitespaceStyles.push([pos + start, pos + i, (type === "\t" ? TAB : SP...
javascript
function(token, str, pos) { if (!token && this.isWhitespaceVisible && /\s+/.test(str)) { var whitespaceStyles = [], start, type; for (var i=0; i < str.length; i++) { var chr = str[i]; if (chr !== type) { if (type) { whitespaceStyles.push([pos + start, pos + i, (type === "\t" ? TAB : SP...
[ "function", "(", "token", ",", "str", ",", "pos", ")", "{", "if", "(", "!", "token", "&&", "this", ".", "isWhitespaceVisible", "&&", "/", "\\s+", "/", ".", "test", "(", "str", ")", ")", "{", "var", "whitespaceStyles", "=", "[", "]", ",", "start", ...
If given an un-token'd chunk of whitespace, returns whitespace style tokens for it. @returns {Array} The whitespace styles for the token, or null.
[ "If", "given", "an", "un", "-", "token", "d", "chunk", "of", "whitespace", "returns", "whitespace", "style", "tokens", "for", "it", "." ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.editor/web/orion/editor/mirror.js#L604-L621
14,542
eclipse/orion.client
bundles/org.eclipse.orion.client.editor/web/orion/editor/mirror.js
function() { if (this.modeApplier) { this.modeApplier.removeEventListener("Highlight", this.listener.onHighlight); this.modeApplier.destroy(); } if (this.annotationModel) { // remove annotation listeners } if (this.textView) { this.textView.removeEventListener("LineStyle", this.listener.o...
javascript
function() { if (this.modeApplier) { this.modeApplier.removeEventListener("Highlight", this.listener.onHighlight); this.modeApplier.destroy(); } if (this.annotationModel) { // remove annotation listeners } if (this.textView) { this.textView.removeEventListener("LineStyle", this.listener.o...
[ "function", "(", ")", "{", "if", "(", "this", ".", "modeApplier", ")", "{", "this", ".", "modeApplier", ".", "removeEventListener", "(", "\"Highlight\"", ",", "this", ".", "listener", ".", "onHighlight", ")", ";", "this", ".", "modeApplier", ".", "destroy"...
Deactivates this styler and removes its listeners.
[ "Deactivates", "this", "styler", "and", "removes", "its", "listeners", "." ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.editor/web/orion/editor/mirror.js#L730-L746
14,543
eclipse/orion.client
bundles/org.eclipse.orion.client.ui/web/orion/compare/diffProvider.js
DiffProvider
function DiffProvider(serviceRegistry, filter) { var allReferences = serviceRegistry.getServiceReferences("orion.core.diff"); //$NON-NLS-0$ var i, _references = allReferences; if (filter) { _references = []; for(i = 0; i < allReferences.length; ++i) { if (filter(allReferences[i])) { _references.pus...
javascript
function DiffProvider(serviceRegistry, filter) { var allReferences = serviceRegistry.getServiceReferences("orion.core.diff"); //$NON-NLS-0$ var i, _references = allReferences; if (filter) { _references = []; for(i = 0; i < allReferences.length; ++i) { if (filter(allReferences[i])) { _references.pus...
[ "function", "DiffProvider", "(", "serviceRegistry", ",", "filter", ")", "{", "var", "allReferences", "=", "serviceRegistry", ".", "getServiceReferences", "(", "\"orion.core.diff\"", ")", ";", "//$NON-NLS-0$", "var", "i", ",", "_references", "=", "allReferences", ";"...
Creates a new diff provider. @class Provides operations on Diff in a compare editor @name orion.compare.DiffProvider
[ "Creates", "a", "new", "diff", "provider", "." ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.ui/web/orion/compare/diffProvider.js#L47-L75
14,544
eclipse/orion.client
bundles/org.eclipse.orion.client.webtools/web/webtools/util.js
function(ast, offset) { var found = null; CssVisitor.visit(ast, { visitNode: function(node) { if(node.range[0] <= offset) { if (node.range[1] === -1 || node.range[1] >= offset) { found = node; } else { return Visitor.SKIP; } } else { return Visitor....
javascript
function(ast, offset) { var found = null; CssVisitor.visit(ast, { visitNode: function(node) { if(node.range[0] <= offset) { if (node.range[1] === -1 || node.range[1] >= offset) { found = node; } else { return Visitor.SKIP; } } else { return Visitor....
[ "function", "(", "ast", ",", "offset", ")", "{", "var", "found", "=", "null", ";", "CssVisitor", ".", "visit", "(", "ast", ",", "{", "visitNode", ":", "function", "(", "node", ")", "{", "if", "(", "node", ".", "range", "[", "0", "]", "<=", "offse...
Returns the ast node at the given offset or the parent node enclosing it for a CSS ast @param {Object} ast The AST to inspect @param {Number} offset The offset into the source @returns {Object} The AST node at the given offset or null @since 10.0
[ "Returns", "the", "ast", "node", "at", "the", "given", "offset", "or", "the", "parent", "node", "enclosing", "it", "for", "a", "CSS", "ast" ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.webtools/web/webtools/util.js#L65-L83
14,545
eclipse/orion.client
modules/orionode/languages/jdt/index.js
getJavaHome
function getJavaHome() { if(!java_home) { if(typeof process.env.JAVA_HOME === 'string' && process.env.JAVA_HOME) { java_home = process.env.JAVA_HOME; } else if(process.platform === 'darwin') { java_home = cp.execSync("/usr/libexec/java_home").toString().trim(); } else if(process.platform === 'linux') { ...
javascript
function getJavaHome() { if(!java_home) { if(typeof process.env.JAVA_HOME === 'string' && process.env.JAVA_HOME) { java_home = process.env.JAVA_HOME; } else if(process.platform === 'darwin') { java_home = cp.execSync("/usr/libexec/java_home").toString().trim(); } else if(process.platform === 'linux') { ...
[ "function", "getJavaHome", "(", ")", "{", "if", "(", "!", "java_home", ")", "{", "if", "(", "typeof", "process", ".", "env", ".", "JAVA_HOME", "===", "'string'", "&&", "process", ".", "env", ".", "JAVA_HOME", ")", "{", "java_home", "=", "process", ".",...
Gets the Java home location from the backing process environment, or tries to compute it. @returns {string} The Java home location or `null` @since 18.0
[ "Gets", "the", "Java", "home", "location", "from", "the", "backing", "process", "environment", "or", "tries", "to", "compute", "it", "." ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/modules/orionode/languages/jdt/index.js#L124-L137
14,546
eclipse/orion.client
modules/orionode/languages/jdt/index.js
runJavaServer
function runJavaServer(javaHome, options) { return new Promise(function(resolve, reject) { const child = path.join(javaHome, '/jre/bin/java'), params = []; if (DEBUG) { params.push('-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=1044'); } params.push("-Dlog.level=ALL"); params.push('-Dec...
javascript
function runJavaServer(javaHome, options) { return new Promise(function(resolve, reject) { const child = path.join(javaHome, '/jre/bin/java'), params = []; if (DEBUG) { params.push('-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=1044'); } params.push("-Dlog.level=ALL"); params.push('-Dec...
[ "function", "runJavaServer", "(", "javaHome", ",", "options", ")", "{", "return", "new", "Promise", "(", "function", "(", "resolve", ",", "reject", ")", "{", "const", "child", "=", "path", ".", "join", "(", "javaHome", ",", "'/jre/bin/java'", ")", ",", "...
Run the Java language server @param {string} javaHome The absolute path to the Java home directory @param {{?}} options The map of options @returns {Promise} A promise to load the Java language server
[ "Run", "the", "Java", "language", "server" ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/modules/orionode/languages/jdt/index.js#L230-L275
14,547
eclipse/orion.client
modules/orionode/languages/jdt/index.js
fork
function fork(modulePath, args, options) { return new Promise((resolve, reject) => { const newEnv = generatePatchedEnv(process.env, options.IN_PORT, options.OUT_PORT), childProcess = cp.spawn(modulePath, args, { silent: true, cwd: options.cwd, env: newEnv, execArgv: options.execArgv }); childProces...
javascript
function fork(modulePath, args, options) { return new Promise((resolve, reject) => { const newEnv = generatePatchedEnv(process.env, options.IN_PORT, options.OUT_PORT), childProcess = cp.spawn(modulePath, args, { silent: true, cwd: options.cwd, env: newEnv, execArgv: options.execArgv }); childProces...
[ "function", "fork", "(", "modulePath", ",", "args", ",", "options", ")", "{", "return", "new", "Promise", "(", "(", "resolve", ",", "reject", ")", "=>", "{", "const", "newEnv", "=", "generatePatchedEnv", "(", "process", ".", "env", ",", "options", ".", ...
Create a new child process @param {string} modulePath The module path to spawn @param {{?}} args The arguments array @param {{?}} options The map of options @returns {Promise} A promise to spawn the child process
[ "Create", "a", "new", "child", "process" ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/modules/orionode/languages/jdt/index.js#L283-L304
14,548
eclipse/orion.client
bundles/org.eclipse.orion.client.ui/web/orion/widgets/themes/ThemeBuilder.js
populateThemes
function populateThemes(){ this.preferences.getTheme(function(themeStyles) { var selectElement = document.getElementById('editorTheme');//$NON-NLS-0$ while (selectElement.hasChildNodes() ){ selectElement.removeChild(selectElement.lastChild); } for (var i =0; i < themeStyles.styles.length; i++) { v...
javascript
function populateThemes(){ this.preferences.getTheme(function(themeStyles) { var selectElement = document.getElementById('editorTheme');//$NON-NLS-0$ while (selectElement.hasChildNodes() ){ selectElement.removeChild(selectElement.lastChild); } for (var i =0; i < themeStyles.styles.length; i++) { v...
[ "function", "populateThemes", "(", ")", "{", "this", ".", "preferences", ".", "getTheme", "(", "function", "(", "themeStyles", ")", "{", "var", "selectElement", "=", "document", ".", "getElementById", "(", "'editorTheme'", ")", ";", "//$NON-NLS-0$", "while", "...
populates theme selections
[ "populates", "theme", "selections" ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.ui/web/orion/widgets/themes/ThemeBuilder.js#L131-L149
14,549
eclipse/orion.client
bundles/org.eclipse.orion.client.ui/web/orion/widgets/themes/ThemeBuilder.js
checkForChanges
function checkForChanges(){ var changed = false; for (var i = 0; i < scopeList.length; i++){ // if a scope is modified if (getValueFromPath(currentTheme, scopeList[i].objPath[0]) !== getValueFromPath(originalTheme, scopeList[i].objPath[0])){ document.getElementById("scopeList").childNodes[i].classList.add...
javascript
function checkForChanges(){ var changed = false; for (var i = 0; i < scopeList.length; i++){ // if a scope is modified if (getValueFromPath(currentTheme, scopeList[i].objPath[0]) !== getValueFromPath(originalTheme, scopeList[i].objPath[0])){ document.getElementById("scopeList").childNodes[i].classList.add...
[ "function", "checkForChanges", "(", ")", "{", "var", "changed", "=", "false", ";", "for", "(", "var", "i", "=", "0", ";", "i", "<", "scopeList", ".", "length", ";", "i", "++", ")", "{", "// if a scope is modified", "if", "(", "getValueFromPath", "(", "...
adds status class to scopes
[ "adds", "status", "class", "to", "scopes" ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.ui/web/orion/widgets/themes/ThemeBuilder.js#L153-L174
14,550
eclipse/orion.client
bundles/org.eclipse.orion.client.ui/web/orion/widgets/themes/ThemeBuilder.js
apply
function apply() { document.getElementById("editorThemeName").value = currentTheme.name; //$NON-NLS-0$ for (var i = 0; i < scopeList.length; i++){ scopeList[i].value = defaultColor; // scopes with no value will have defaultColor showing for (var l = 0; l < scopeList[i].objPath.length; l++){ var temp = get...
javascript
function apply() { document.getElementById("editorThemeName").value = currentTheme.name; //$NON-NLS-0$ for (var i = 0; i < scopeList.length; i++){ scopeList[i].value = defaultColor; // scopes with no value will have defaultColor showing for (var l = 0; l < scopeList[i].objPath.length; l++){ var temp = get...
[ "function", "apply", "(", ")", "{", "document", ".", "getElementById", "(", "\"editorThemeName\"", ")", ".", "value", "=", "currentTheme", ".", "name", ";", "//$NON-NLS-0$", "for", "(", "var", "i", "=", "0", ";", "i", "<", "scopeList", ".", "length", ";"...
updates the theme object with right values
[ "updates", "the", "theme", "object", "with", "right", "values" ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.ui/web/orion/widgets/themes/ThemeBuilder.js#L300-L321
14,551
eclipse/orion.client
bundles/org.eclipse.orion.client.ui/web/orion/widgets/themes/ThemeBuilder.js
generateScopeList
function generateScopeList(hiddenValues){ hiddenValues = hiddenValues || []; var htmlString = ""; var ieClass = util.isIE ? "-ie" : ""; //$NON-NLS-0$ for (var i = 0; i < scopeList.length; i++){ if (scopeList[i].id === "editorThemeFontSize"){ htmlString = htmlString + "<li><label for='editorThemeFontSize...
javascript
function generateScopeList(hiddenValues){ hiddenValues = hiddenValues || []; var htmlString = ""; var ieClass = util.isIE ? "-ie" : ""; //$NON-NLS-0$ for (var i = 0; i < scopeList.length; i++){ if (scopeList[i].id === "editorThemeFontSize"){ htmlString = htmlString + "<li><label for='editorThemeFontSize...
[ "function", "generateScopeList", "(", "hiddenValues", ")", "{", "hiddenValues", "=", "hiddenValues", "||", "[", "]", ";", "var", "htmlString", "=", "\"\"", ";", "var", "ieClass", "=", "util", ".", "isIE", "?", "\"-ie\"", ":", "\"\"", ";", "//$NON-NLS-0$", ...
generates the html structure for list of scopes
[ "generates", "the", "html", "structure", "for", "list", "of", "scopes" ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.ui/web/orion/widgets/themes/ThemeBuilder.js#L325-L347
14,552
eclipse/orion.client
bundles/org.eclipse.orion.client.javascript/web/eslint/lib/rules/no-extra-parens.js
containsAssignment
function containsAssignment(node) { if (node.type === "AssignmentExpression") { return true; } else if (node.type === "ConditionalExpression" && (node.consequent.type === "AssignmentExpression" || node.alternate.type === "AssignmentExpression")) { return true; } else if ((node.left && node.left.typ...
javascript
function containsAssignment(node) { if (node.type === "AssignmentExpression") { return true; } else if (node.type === "ConditionalExpression" && (node.consequent.type === "AssignmentExpression" || node.alternate.type === "AssignmentExpression")) { return true; } else if ((node.left && node.left.typ...
[ "function", "containsAssignment", "(", "node", ")", "{", "if", "(", "node", ".", "type", "===", "\"AssignmentExpression\"", ")", "{", "return", "true", ";", "}", "else", "if", "(", "node", ".", "type", "===", "\"ConditionalExpression\"", "&&", "(", "node", ...
Determines if a node is or contains an assignment expression @param {ASTNode} node - The node to be checked. @returns {boolean} True if the node is or contains an assignment expression. @private
[ "Determines", "if", "a", "node", "is", "or", "contains", "an", "assignment", "expression" ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.javascript/web/eslint/lib/rules/no-extra-parens.js#L206-L218
14,553
eclipse/orion.client
bundles/org.eclipse.orion.client.javascript/web/eslint/lib/rules/no-extra-parens.js
isReturnAssignException
function isReturnAssignException(node) { if (!EXCEPT_RETURN_ASSIGN || !isInReturnStatement(node)) { return false; } if (node.type === "ReturnStatement") { return node.argument && containsAssignment(node.argument); } else if (node.type === "ArrowFunctionExpression" && node.body.type !== "BlockStatem...
javascript
function isReturnAssignException(node) { if (!EXCEPT_RETURN_ASSIGN || !isInReturnStatement(node)) { return false; } if (node.type === "ReturnStatement") { return node.argument && containsAssignment(node.argument); } else if (node.type === "ArrowFunctionExpression" && node.body.type !== "BlockStatem...
[ "function", "isReturnAssignException", "(", "node", ")", "{", "if", "(", "!", "EXCEPT_RETURN_ASSIGN", "||", "!", "isInReturnStatement", "(", "node", ")", ")", "{", "return", "false", ";", "}", "if", "(", "node", ".", "type", "===", "\"ReturnStatement\"", ")"...
Determines if a node is contained by or is itself a return statement and is allowed to have a parenthesised assignment @param {ASTNode} node - The node to be checked. @returns {boolean} True if the assignment can be parenthesised. @private
[ "Determines", "if", "a", "node", "is", "contained", "by", "or", "is", "itself", "a", "return", "statement", "and", "is", "allowed", "to", "have", "a", "parenthesised", "assignment" ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.javascript/web/eslint/lib/rules/no-extra-parens.js#L226-L237
14,554
eclipse/orion.client
bundles/org.eclipse.orion.client.javascript/web/eslint/lib/rules/no-extra-parens.js
isHeadOfExpressionStatement
function isHeadOfExpressionStatement(node) { var parent = node.parent; while (parent) { switch (parent.type) { case "SequenceExpression": if (parent.expressions[0] !== node || isParenthesised(node)) { return false; } break; case "UnaryExpression": case "UpdateExpressi...
javascript
function isHeadOfExpressionStatement(node) { var parent = node.parent; while (parent) { switch (parent.type) { case "SequenceExpression": if (parent.expressions[0] !== node || isParenthesised(node)) { return false; } break; case "UnaryExpression": case "UpdateExpressi...
[ "function", "isHeadOfExpressionStatement", "(", "node", ")", "{", "var", "parent", "=", "node", ".", "parent", ";", "while", "(", "parent", ")", "{", "switch", "(", "parent", ".", "type", ")", "{", "case", "\"SequenceExpression\"", ":", "if", "(", "parent"...
Checks whether or not a given node is located at the head of ExpressionStatement. @param {ASTNode} node - A node to check. @returns {boolean} `true` if the node is located at the head of ExpressionStatement.
[ "Checks", "whether", "or", "not", "a", "given", "node", "is", "located", "at", "the", "head", "of", "ExpressionStatement", "." ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.javascript/web/eslint/lib/rules/no-extra-parens.js#L260-L316
14,555
eclipse/orion.client
bundles/org.eclipse.orion.client.ui/web/orion/compare/compareRulers.js
CompareRuler
function CompareRuler (annoModel, rulerLocation, rulerOverview, rulerStyle) { mRulers.Ruler.call(this, annoModel, rulerLocation, rulerOverview, rulerStyle); }
javascript
function CompareRuler (annoModel, rulerLocation, rulerOverview, rulerStyle) { mRulers.Ruler.call(this, annoModel, rulerLocation, rulerOverview, rulerStyle); }
[ "function", "CompareRuler", "(", "annoModel", ",", "rulerLocation", ",", "rulerOverview", ",", "rulerStyle", ")", "{", "mRulers", ".", "Ruler", ".", "call", "(", "this", ",", "annoModel", ",", "rulerLocation", ",", "rulerOverview", ",", "rulerStyle", ")", ";",...
Creates a new ruler for the compare editor. @class The compare ruler is used by the compare editor to render trim around the editor. @name orion.compare.rulers.CompareRuler
[ "Creates", "a", "new", "ruler", "for", "the", "compare", "editor", "." ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.ui/web/orion/compare/compareRulers.js#L22-L24
14,556
eclipse/orion.client
bundles/org.eclipse.orion.client.ui/web/orion/compare/compareRulers.js
LineNumberCompareRuler
function LineNumberCompareRuler (diffNavigator, mapperColumnIndex , annoModel, rulerLocation, rulerStyle, oddStyle, evenStyle) { orion.CompareRuler.call(this, annoModel, rulerLocation, "page", rulerStyle); //$NON-NLS-0$ this._diffNavigator = diffNavigator; this._oddStyle = oddStyle || {style: {backgroundColor: "w...
javascript
function LineNumberCompareRuler (diffNavigator, mapperColumnIndex , annoModel, rulerLocation, rulerStyle, oddStyle, evenStyle) { orion.CompareRuler.call(this, annoModel, rulerLocation, "page", rulerStyle); //$NON-NLS-0$ this._diffNavigator = diffNavigator; this._oddStyle = oddStyle || {style: {backgroundColor: "w...
[ "function", "LineNumberCompareRuler", "(", "diffNavigator", ",", "mapperColumnIndex", ",", "annoModel", ",", "rulerLocation", ",", "rulerStyle", ",", "oddStyle", ",", "evenStyle", ")", "{", "orion", ".", "CompareRuler", ".", "call", "(", "this", ",", "annoModel", ...
Creates a new line number ruler for the compare editor. @class The line number ruler is used by the compare editor to render line numbers next to the editor @name orion.compare.rulers.LineNumberCompareRuler
[ "Creates", "a", "new", "line", "number", "ruler", "for", "the", "compare", "editor", "." ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.ui/web/orion/compare/compareRulers.js#L55-L62
14,557
eclipse/orion.client
bundles/org.eclipse.orion.client.editor/web/orion/editor/undoStack.js
UndoStack
function UndoStack (view, size) { this.size = size !== undefined ? size : 100; this.reset(); var self = this; this._listener = { onChanging: function(e) { self._onChanging(e); }, onDestroy: function(e) { self._onDestroy(e); } }; if (view.getModel) { var model = view.getModel(); if ...
javascript
function UndoStack (view, size) { this.size = size !== undefined ? size : 100; this.reset(); var self = this; this._listener = { onChanging: function(e) { self._onChanging(e); }, onDestroy: function(e) { self._onDestroy(e); } }; if (view.getModel) { var model = view.getModel(); if ...
[ "function", "UndoStack", "(", "view", ",", "size", ")", "{", "this", ".", "size", "=", "size", "!==", "undefined", "?", "size", ":", "100", ";", "this", ".", "reset", "(", ")", ";", "var", "self", "=", "this", ";", "this", ".", "_listener", "=", ...
Constructs a new UndoStack on a text view. @param {orion.editor.TextView} view the text view for the undo stack. @param {Number} [size=100] the size for the undo stack. @name orion.editor.UndoStack @class The UndoStack is used to record the history of a text model associated to an view. Every change to the model is a...
[ "Constructs", "a", "new", "UndoStack", "on", "a", "text", "view", "." ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.editor/web/orion/editor/undoStack.js#L194-L218
14,558
eclipse/orion.client
bundles/org.eclipse.orion.client.editor/web/orion/editor/undoStack.js
function (change) { if (this.compoundChange) { this.compoundChange.add(change); } else { var length = this.stack.length; this.stack.splice(this.index, length-this.index, change); this.index++; if (this.stack.length > this.size) { this.stack.shift(); this.index--; } } }
javascript
function (change) { if (this.compoundChange) { this.compoundChange.add(change); } else { var length = this.stack.length; this.stack.splice(this.index, length-this.index, change); this.index++; if (this.stack.length > this.size) { this.stack.shift(); this.index--; } } }
[ "function", "(", "change", ")", "{", "if", "(", "this", ".", "compoundChange", ")", "{", "this", ".", "compoundChange", ".", "add", "(", "change", ")", ";", "}", "else", "{", "var", "length", "=", "this", ".", "stack", ".", "length", ";", "this", "...
Adds a change to the stack. @param change the change to add.
[ "Adds", "a", "change", "to", "the", "stack", "." ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.editor/web/orion/editor/undoStack.js#L231-L243
14,559
eclipse/orion.client
bundles/org.eclipse.orion.client.editor/web/orion/editor/undoStack.js
function() { this._commitUndo(); var changes = []; for (var i=this.index; i >= 0; i--) { changes = changes.concat(this.stack[i].getUndoChanges()); } return changes; }
javascript
function() { this._commitUndo(); var changes = []; for (var i=this.index; i >= 0; i--) { changes = changes.concat(this.stack[i].getUndoChanges()); } return changes; }
[ "function", "(", ")", "{", "this", ".", "_commitUndo", "(", ")", ";", "var", "changes", "=", "[", "]", ";", "for", "(", "var", "i", "=", "this", ".", "index", ";", "i", ">=", "0", ";", "i", "--", ")", "{", "changes", "=", "changes", ".", "con...
Returns the undo changes. @return {orion.editor.TextChange[]} an array of TextChanges that are returned in the reverse order that they occurred (most recent change first). @see orion.editor.UndoStack#getRedoChanges
[ "Returns", "the", "undo", "changes", "." ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.editor/web/orion/editor/undoStack.js#L366-L373
14,560
eclipse/orion.client
bundles/org.eclipse.orion.client.editor/web/orion/editor/undoStack.js
function() { this._commitUndo(); var change, result = false; this._ignoreUndo = true; do { if (this.index <= 0) { break; } change = this.stack[--this.index]; } while (!(result = change.undo(this.view, true))); this._ignoreUndo = false; return result; }
javascript
function() { this._commitUndo(); var change, result = false; this._ignoreUndo = true; do { if (this.index <= 0) { break; } change = this.stack[--this.index]; } while (!(result = change.undo(this.view, true))); this._ignoreUndo = false; return result; }
[ "function", "(", ")", "{", "this", ".", "_commitUndo", "(", ")", ";", "var", "change", ",", "result", "=", "false", ";", "this", ".", "_ignoreUndo", "=", "true", ";", "do", "{", "if", "(", "this", ".", "index", "<=", "0", ")", "{", "break", ";", ...
Undo the last change in the stack. @return {Boolean} returns true if a change was un-done. @see orion.editor.UndoStack#redo @see orion.editor.UndoStack#canUndo
[ "Undo", "the", "last", "change", "in", "the", "stack", "." ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.editor/web/orion/editor/undoStack.js#L382-L394
14,561
eclipse/orion.client
bundles/org.eclipse.orion.client.editor/web/orion/editor/undoStack.js
function() { this._commitUndo(); var change, result = false; this._ignoreUndo = true; do { if (this.index >= this.stack.length) { break; } change = this.stack[this.index++]; } while (!(result = change.redo(this.view, true))); this._ignoreUndo = false; return result; }
javascript
function() { this._commitUndo(); var change, result = false; this._ignoreUndo = true; do { if (this.index >= this.stack.length) { break; } change = this.stack[this.index++]; } while (!(result = change.redo(this.view, true))); this._ignoreUndo = false; return result; }
[ "function", "(", ")", "{", "this", ".", "_commitUndo", "(", ")", ";", "var", "change", ",", "result", "=", "false", ";", "this", ".", "_ignoreUndo", "=", "true", ";", "do", "{", "if", "(", "this", ".", "index", ">=", "this", ".", "stack", ".", "l...
Redo the last change in the stack. @return {Boolean} returns true if a change was re-done. @see orion.editor.UndoStack#undo @see orion.editor.UndoStack#canRedo
[ "Redo", "the", "last", "change", "in", "the", "stack", "." ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.editor/web/orion/editor/undoStack.js#L403-L415
14,562
eclipse/orion.client
bundles/org.eclipse.orion.client.ui/web/gcli/gcli/ui/completer.js
Completer
function Completer(options, components) { this.requisition = components.requisition; this.scratchpad = options.scratchpad; this.input = { typed: '', cursor: { start: 0, end: 0 } }; this.choice = 0; this.element = components.element; this.element.classList.add('gcli-in-complete'); this.element.setAttribut...
javascript
function Completer(options, components) { this.requisition = components.requisition; this.scratchpad = options.scratchpad; this.input = { typed: '', cursor: { start: 0, end: 0 } }; this.choice = 0; this.element = components.element; this.element.classList.add('gcli-in-complete'); this.element.setAttribut...
[ "function", "Completer", "(", "options", ",", "components", ")", "{", "this", ".", "requisition", "=", "components", ".", "requisition", ";", "this", ".", "scratchpad", "=", "options", ".", "scratchpad", ";", "this", ".", "input", "=", "{", "typed", ":", ...
Completer is an 'input-like' element that sits an input element annotating it with visual goodness. @param options Object containing user customization properties, including: - scratchpad (default=none) A way to move JS content to custom JS editor @param components Object that links to other UI components. GCLI provid...
[ "Completer", "is", "an", "input", "-", "like", "element", "that", "sits", "an", "input", "element", "annotating", "it", "with", "visual", "goodness", "." ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.ui/web/gcli/gcli/ui/completer.js#L38-L72
14,563
eclipse/orion.client
modules/orionode/index.js
checkAuthenticated
function checkAuthenticated(req, res, next) { if (!req.user) { api.writeError(401, res, "Not authenticated"); } else { req.user.workspaceDir = workspaceDir + (req.user.workspace ? "/" + req.user.workspace : ""); req.user.checkRights = checkRights; next(); } }
javascript
function checkAuthenticated(req, res, next) { if (!req.user) { api.writeError(401, res, "Not authenticated"); } else { req.user.workspaceDir = workspaceDir + (req.user.workspace ? "/" + req.user.workspace : ""); req.user.checkRights = checkRights; next(); } }
[ "function", "checkAuthenticated", "(", "req", ",", "res", ",", "next", ")", "{", "if", "(", "!", "req", ".", "user", ")", "{", "api", ".", "writeError", "(", "401", ",", "res", ",", "\"Not authenticated\"", ")", ";", "}", "else", "{", "req", ".", "...
Check if the request is authenticated @param {XmlHttpRequest} req The original request @param {XmlHttpResponse} res The orginal response @param {fn} next The function to advance the Express queue
[ "Check", "if", "the", "request", "is", "authenticated" ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/modules/orionode/index.js#L69-L77
14,564
eclipse/orion.client
modules/orionode/index.js
checkAccessRights
function checkAccessRights(req, res, next) { const uri = (typeof req.contextPath === "string" && req.baseUrl.substring(req.contextPath.length)) || req.baseUrl; req.user.checkRights(req.user.username, uri, req, res, next); }
javascript
function checkAccessRights(req, res, next) { const uri = (typeof req.contextPath === "string" && req.baseUrl.substring(req.contextPath.length)) || req.baseUrl; req.user.checkRights(req.user.username, uri, req, res, next); }
[ "function", "checkAccessRights", "(", "req", ",", "res", ",", "next", ")", "{", "const", "uri", "=", "(", "typeof", "req", ".", "contextPath", "===", "\"string\"", "&&", "req", ".", "baseUrl", ".", "substring", "(", "req", ".", "contextPath", ".", "lengt...
Check the access rights of the request against the requested resource @param {XmlHttpRequest} req The original request @param {XmlHttpResponse} res The orginal response @param {fn} next The function to advance the Express queue
[ "Check", "the", "access", "rights", "of", "the", "request", "against", "the", "requested", "resource" ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/modules/orionode/index.js#L85-L88
14,565
eclipse/orion.client
modules/orionode/index.js
tryLoadRouter
function tryLoadRouter(endpoint, options) { const args = []; var isEndpoint = typeof endpoint.endpoint === 'string'; if (isEndpoint) { args.push(endpoint.endpoint); args.push(responseTime({digits: 2, header: "X-Total-Response-Time", suffix: true})); } if (endpoint.authenticated) { args.push(options.authentic...
javascript
function tryLoadRouter(endpoint, options) { const args = []; var isEndpoint = typeof endpoint.endpoint === 'string'; if (isEndpoint) { args.push(endpoint.endpoint); args.push(responseTime({digits: 2, header: "X-Total-Response-Time", suffix: true})); } if (endpoint.authenticated) { args.push(options.authentic...
[ "function", "tryLoadRouter", "(", "endpoint", ",", "options", ")", "{", "const", "args", "=", "[", "]", ";", "var", "isEndpoint", "=", "typeof", "endpoint", ".", "endpoint", "===", "'string'", ";", "if", "(", "isEndpoint", ")", "{", "args", ".", "push", ...
Tries to load the router from an endpoint @param {{?}} endpoint The metadata for the endpoint to load @param {{?}} options The map of options from the server load
[ "Tries", "to", "load", "the", "router", "from", "an", "endpoint" ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/modules/orionode/index.js#L95-L152
14,566
eclipse/orion.client
modules/orionode/index.js
loadEndpoints
function loadEndpoints(endpoints, options, auth) { if (Array.isArray(endpoints)) { endpoints.forEach(function(endpoint) { if (auth !== Boolean(endpoint.authenticated)) { //after endpoints refactored, remove this check return; } const conditional = endpoint.hasOwnProperty("ifProp"); if (conditiona...
javascript
function loadEndpoints(endpoints, options, auth) { if (Array.isArray(endpoints)) { endpoints.forEach(function(endpoint) { if (auth !== Boolean(endpoint.authenticated)) { //after endpoints refactored, remove this check return; } const conditional = endpoint.hasOwnProperty("ifProp"); if (conditiona...
[ "function", "loadEndpoints", "(", "endpoints", ",", "options", ",", "auth", ")", "{", "if", "(", "Array", ".", "isArray", "(", "endpoints", ")", ")", "{", "endpoints", ".", "forEach", "(", "function", "(", "endpoint", ")", "{", "if", "(", "auth", "!=="...
Function that loads endpoints from the configuration file @param {{?}[]} endpoints The array of endpoints @param {{?}} options The map of options @param {bool} auth If we should be loading endpoints that require authentication
[ "Function", "that", "loads", "endpoints", "from", "the", "configuration", "file" ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/modules/orionode/index.js#L160-L173
14,567
eclipse/orion.client
modules/orionode/index.js
loadLanguageServers
function loadLanguageServers(servers, io, options) { if (Array.isArray(servers) && options.configParams.get('orion.single.user')) { const rootPath = path.join(__dirname, "languages"); if (!fs.existsSync(rootPath)) { logger.log("'languages' folder does not exist. Stopped loading language servers."); return; ...
javascript
function loadLanguageServers(servers, io, options) { if (Array.isArray(servers) && options.configParams.get('orion.single.user')) { const rootPath = path.join(__dirname, "languages"); if (!fs.existsSync(rootPath)) { logger.log("'languages' folder does not exist. Stopped loading language servers."); return; ...
[ "function", "loadLanguageServers", "(", "servers", ",", "io", ",", "options", ")", "{", "if", "(", "Array", ".", "isArray", "(", "servers", ")", "&&", "options", ".", "configParams", ".", "get", "(", "'orion.single.user'", ")", ")", "{", "const", "rootPath...
Load any language servers mapped to the server config @param {{?}[]} servers The array of language server metadata @param {socketio} io The backing socket.IO library @param {{?}} options The map of server configuration options @since 18.0
[ "Load", "any", "language", "servers", "mapped", "to", "the", "server", "config" ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/modules/orionode/index.js#L182-L218
14,568
eclipse/orion.client
modules/orionode/lib/shared/sharedUtil.js
treeJSON
function treeJSON(name, location, timestamp, dir, length, addNameToLoc) { location = api.toURLPath(location); if (typeof addNameToLoc == 'undefined' || addNameToLoc) { location += "/" + name; } var result = { Name: name, LocalTimeStamp: timestamp, ...
javascript
function treeJSON(name, location, timestamp, dir, length, addNameToLoc) { location = api.toURLPath(location); if (typeof addNameToLoc == 'undefined' || addNameToLoc) { location += "/" + name; } var result = { Name: name, LocalTimeStamp: timestamp, ...
[ "function", "treeJSON", "(", "name", ",", "location", ",", "timestamp", ",", "dir", ",", "length", ",", "addNameToLoc", ")", "{", "location", "=", "api", ".", "toURLPath", "(", "location", ")", ";", "if", "(", "typeof", "addNameToLoc", "==", "'undefined'",...
if opening a file, we don't want to add the name to the location so addNameToLoc needs to be false else undefined
[ "if", "opening", "a", "file", "we", "don", "t", "want", "to", "add", "the", "name", "to", "the", "location", "so", "addNameToLoc", "needs", "to", "be", "false", "else", "undefined" ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/modules/orionode/lib/shared/sharedUtil.js#L75-L95
14,569
eclipse/orion.client
modules/orionode/lib/shared/sharedUtil.js
getChildren
function getChildren(fileRoot, directory, depth, excludes) { return fs.readdirAsync(directory) .then(function(files) { return Promise.map(files, function(file) { if (Array.isArray(excludes) && excludes.indexOf(file) !== -1) { return null; // omit ...
javascript
function getChildren(fileRoot, directory, depth, excludes) { return fs.readdirAsync(directory) .then(function(files) { return Promise.map(files, function(file) { if (Array.isArray(excludes) && excludes.indexOf(file) !== -1) { return null; // omit ...
[ "function", "getChildren", "(", "fileRoot", ",", "directory", ",", "depth", ",", "excludes", ")", "{", "return", "fs", ".", "readdirAsync", "(", "directory", ")", ".", "then", "(", "function", "(", "files", ")", "{", "return", "Promise", ".", "map", "(",...
Returns a list of children of the given directory.
[ "Returns", "a", "list", "of", "children", "of", "the", "given", "directory", "." ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/modules/orionode/lib/shared/sharedUtil.js#L100-L121
14,570
eclipse/orion.client
bundles/org.eclipse.orion.client.git/web/orion/git/widgets/gitChangeList.js
function() { if(!this.model.root) { return new Deferred().resolve(true); } var modelList = this.model.root.children || this.model.root.Children; if(!modelList) { return new Deferred().resolve(true); } var isDirty = modelList.some( function(child) { if(child.children && child.child...
javascript
function() { if(!this.model.root) { return new Deferred().resolve(true); } var modelList = this.model.root.children || this.model.root.Children; if(!modelList) { return new Deferred().resolve(true); } var isDirty = modelList.some( function(child) { if(child.children && child.child...
[ "function", "(", ")", "{", "if", "(", "!", "this", ".", "model", ".", "root", ")", "{", "return", "new", "Deferred", "(", ")", ".", "resolve", "(", "true", ")", ";", "}", "var", "modelList", "=", "this", ".", "model", ".", "root", ".", "children"...
This function is called when any of the compare widgets in the explorer are hooked up and need to be unhooked
[ "This", "function", "is", "called", "when", "any", "of", "the", "compare", "widgets", "in", "the", "explorer", "are", "hooked", "up", "and", "need", "to", "be", "unhooked" ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.git/web/orion/git/widgets/gitChangeList.js#L483-L516
14,571
eclipse/orion.client
bundles/org.eclipse.orion.client.webtools/web/webtools/htmlContentAssist.js
function(node, offset, source) { if (node){ if (node.type === 'tag'){ var name = node.name ? node.name.toLowerCase() : ''; if (name === 'script' || name === 'style') { if (node.openrange && node.endrange){ // If we are in the tag itself we are not actually in the script block if (of...
javascript
function(node, offset, source) { if (node){ if (node.type === 'tag'){ var name = node.name ? node.name.toLowerCase() : ''; if (name === 'script' || name === 'style') { if (node.openrange && node.endrange){ // If we are in the tag itself we are not actually in the script block if (of...
[ "function", "(", "node", ",", "offset", ",", "source", ")", "{", "if", "(", "node", ")", "{", "if", "(", "node", ".", "type", "===", "'tag'", ")", "{", "var", "name", "=", "node", ".", "name", "?", "node", ".", "name", ".", "toLowerCase", "(", ...
Returns if the tag block that we are in is a style of script block @param {Object} node The node @returns {Boolean} True if the current node context is style or script @since 10.0
[ "Returns", "if", "the", "tag", "block", "that", "we", "are", "in", "is", "a", "style", "of", "script", "block" ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.webtools/web/webtools/htmlContentAssist.js#L239-L255
14,572
eclipse/orion.client
bundles/org.eclipse.orion.client.webtools/web/webtools/htmlContentAssist.js
function(node, offset, source) { if(node && source) { switch(node.type) { case 'tag': { // Smarter way now that we have end ranges if (node.endrange){ return offset > node.endrange[0] && offset < node.endrange[1]; } // TODO Delete the old way var _s = source.slice(node.r...
javascript
function(node, offset, source) { if(node && source) { switch(node.type) { case 'tag': { // Smarter way now that we have end ranges if (node.endrange){ return offset > node.endrange[0] && offset < node.endrange[1]; } // TODO Delete the old way var _s = source.slice(node.r...
[ "function", "(", "node", ",", "offset", ",", "source", ")", "{", "if", "(", "node", "&&", "source", ")", "{", "switch", "(", "node", ".", "type", ")", "{", "case", "'tag'", ":", "{", "// Smarter way now that we have end ranges", "if", "(", "node", ".", ...
Returns if the offset is in a closing tag. A closing tag is determined as an offset past the last child but before the closing range of the tag itself @param {Object} node The AST not context @param {Number} offset The curren offset @param {String} source The source
[ "Returns", "if", "the", "offset", "is", "in", "a", "closing", "tag", ".", "A", "closing", "tag", "is", "determined", "as", "an", "offset", "past", "the", "last", "child", "but", "before", "the", "closing", "range", "of", "the", "tag", "itself" ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.webtools/web/webtools/htmlContentAssist.js#L264-L291
14,573
eclipse/orion.client
bundles/org.eclipse.orion.client.webtools/web/webtools/htmlContentAssist.js
function(node, offset) { return node && node.type === 'comment' && offset >= node.range[0] && offset <= node.range[1]; }
javascript
function(node, offset) { return node && node.type === 'comment' && offset >= node.range[0] && offset <= node.range[1]; }
[ "function", "(", "node", ",", "offset", ")", "{", "return", "node", "&&", "node", ".", "type", "===", "'comment'", "&&", "offset", ">=", "node", ".", "range", "[", "0", "]", "&&", "offset", "<=", "node", ".", "range", "[", "1", "]", ";", "}" ]
Computes if we are trying to complete a comment start or end @param {Object} node The AST node to check with the offset @returns {Boolean} True if we are completing a comment, false otherwise @since 10.0
[ "Computes", "if", "we", "are", "trying", "to", "complete", "a", "comment", "start", "or", "end" ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.webtools/web/webtools/htmlContentAssist.js#L299-L301
14,574
eclipse/orion.client
bundles/org.eclipse.orion.client.webtools/web/webtools/htmlContentAssist.js
function(node, source, params) { if(node) { var offset = params.offset; if(node.type === 'tag') { var tagNameEnd = node.range[0] + 1 + node.name.length; if(tagNameEnd < offset) { if (node.openrange){ return offset < node.openrange[1] || (offset === node.openrange[1] && source[offset-1]...
javascript
function(node, source, params) { if(node) { var offset = params.offset; if(node.type === 'tag') { var tagNameEnd = node.range[0] + 1 + node.name.length; if(tagNameEnd < offset) { if (node.openrange){ return offset < node.openrange[1] || (offset === node.openrange[1] && source[offset-1]...
[ "function", "(", "node", ",", "source", ",", "params", ")", "{", "if", "(", "node", ")", "{", "var", "offset", "=", "params", ".", "offset", ";", "if", "(", "node", ".", "type", "===", "'tag'", ")", "{", "var", "tagNameEnd", "=", "node", ".", "ra...
Computes if we are trying to complete tag attributes @param {Object} node The AST node to check with the offset @param {String} source The backing source @param {Object} params The parameters @returns {Boolean} True if we are completing the attributes of a tag, false otherwise @since 10.0
[ "Computes", "if", "we", "are", "trying", "to", "complete", "tag", "attributes" ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.webtools/web/webtools/htmlContentAssist.js#L324-L350
14,575
eclipse/orion.client
bundles/org.eclipse.orion.client.webtools/web/webtools/htmlContentAssist.js
function(node, params) { if(node) { var offset = params.offset; if(node.type === 'tag') { if (node.openrange){ if (offset >= node.openrange[0] && offset <= node.openrange[1]){ return true; } } else if (offset >= node.range[0] && offset <= node.range[1]){ return true; }...
javascript
function(node, params) { if(node) { var offset = params.offset; if(node.type === 'tag') { if (node.openrange){ if (offset >= node.openrange[0] && offset <= node.openrange[1]){ return true; } } else if (offset >= node.range[0] && offset <= node.range[1]){ return true; }...
[ "function", "(", "node", ",", "params", ")", "{", "if", "(", "node", ")", "{", "var", "offset", "=", "params", ".", "offset", ";", "if", "(", "node", ".", "type", "===", "'tag'", ")", "{", "if", "(", "node", ".", "openrange", ")", "{", "if", "(...
Computes if we are trying to complete a tag @param {Object} node The AST node to check with the offset @param {Object} params The parameters @returns {Boolean} True if we are completing a tag, false otherwise @since 10.0
[ "Computes", "if", "we", "are", "trying", "to", "complete", "a", "tag" ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.webtools/web/webtools/htmlContentAssist.js#L359-L373
14,576
eclipse/orion.client
bundles/org.eclipse.orion.client.webtools/web/webtools/htmlContentAssist.js
function(node, source) { if(node && node.type === 'tag' && node.name) { if (node.endrange && node.endrange.length === 2){ // If the HTML is incomplete, the parser recovery sometimes uses the end range of the parent element return node.name === source.substring(node.endrange[0]+2, node.endrange[1]-1); ...
javascript
function(node, source) { if(node && node.type === 'tag' && node.name) { if (node.endrange && node.endrange.length === 2){ // If the HTML is incomplete, the parser recovery sometimes uses the end range of the parent element return node.name === source.substring(node.endrange[0]+2, node.endrange[1]-1); ...
[ "function", "(", "node", ",", "source", ")", "{", "if", "(", "node", "&&", "node", ".", "type", "===", "'tag'", "&&", "node", ".", "name", ")", "{", "if", "(", "node", ".", "endrange", "&&", "node", ".", "endrange", ".", "length", "===", "2", ")"...
Computes if we are completing a tag that already has a matching close tag @param {Object} node The AST node to check with the offset @param {String} source The source of the file @returns {Boolean} True if we are completing a tag with a matching close tag, false otherwise @since 11.0
[ "Computes", "if", "we", "are", "completing", "a", "tag", "that", "already", "has", "a", "matching", "close", "tag" ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.webtools/web/webtools/htmlContentAssist.js#L382-L389
14,577
eclipse/orion.client
bundles/org.eclipse.orion.client.webtools/web/webtools/htmlContentAssist.js
function(node, source, params) { var proposals = []; var prefix = params.prefix ? params.prefix : ""; // we need to check if we need to rebuild the prefix for completion that contains a '-' var index = params.offset - prefix.length - 1; if (index > 0 && index < source.length) { var precedingChar = so...
javascript
function(node, source, params) { var proposals = []; var prefix = params.prefix ? params.prefix : ""; // we need to check if we need to rebuild the prefix for completion that contains a '-' var index = params.offset - prefix.length - 1; if (index > 0 && index < source.length) { var precedingChar = so...
[ "function", "(", "node", ",", "source", ",", "params", ")", "{", "var", "proposals", "=", "[", "]", ";", "var", "prefix", "=", "params", ".", "prefix", "?", "params", ".", "prefix", ":", "\"\"", ";", "// we need to check if we need to rebuild the prefix for co...
Returns the attributes that can be used in the specified tag @param {Object} node The AST node for the tag we are completing within @param {Object} params The parameters @returns {Array.<Object>} The array of proposals @since 10.0
[ "Returns", "the", "attributes", "that", "can", "be", "used", "in", "the", "specified", "tag" ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.webtools/web/webtools/htmlContentAssist.js#L495-L580
14,578
eclipse/orion.client
bundles/org.eclipse.orion.client.webtools/web/webtools/htmlContentAssist.js
function(node, source, params) { // TODO We can do better with the new parser, handle no quotes cases too if(node && node.type === 'attr') { if (node.valueRange) { var range = node.valueRange; return range[0] <= params.offset && range[1] >= params.offset; } return this.within('"', '"', sourc...
javascript
function(node, source, params) { // TODO We can do better with the new parser, handle no quotes cases too if(node && node.type === 'attr') { if (node.valueRange) { var range = node.valueRange; return range[0] <= params.offset && range[1] >= params.offset; } return this.within('"', '"', sourc...
[ "function", "(", "node", ",", "source", ",", "params", ")", "{", "// TODO We can do better with the new parser, handle no quotes cases too", "if", "(", "node", "&&", "node", ".", "type", "===", "'attr'", ")", "{", "if", "(", "node", ".", "valueRange", ")", "{", ...
Computes if we are trying to complete attributes @param {Object} node The AST node to check with the offset @param {String} source The backing source @param {Object} params The parameters @returns {Boolean} True if we are completing the attributes of a tag, false otherwise @since 10.0
[ "Computes", "if", "we", "are", "trying", "to", "complete", "attributes" ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.webtools/web/webtools/htmlContentAssist.js#L778-L789
14,579
eclipse/orion.client
bundles/org.eclipse.orion.client.webtools/web/webtools/htmlContentAssist.js
function(start, end, source, offset, bounds) { var idx = offset; var _c; var before = false; while(idx > bounds[0]) { _c = source[idx]; if(_c === start) { before = true; break; } idx--; } if(before) { idx = offset; while(idx < bounds[1]) { _c = source[idx]; ...
javascript
function(start, end, source, offset, bounds) { var idx = offset; var _c; var before = false; while(idx > bounds[0]) { _c = source[idx]; if(_c === start) { before = true; break; } idx--; } if(before) { idx = offset; while(idx < bounds[1]) { _c = source[idx]; ...
[ "function", "(", "start", ",", "end", ",", "source", ",", "offset", ",", "bounds", ")", "{", "var", "idx", "=", "offset", ";", "var", "_c", ";", "var", "before", "=", "false", ";", "while", "(", "idx", ">", "bounds", "[", "0", "]", ")", "{", "_...
A util method to determine if the caret is within two given chars, that are found within the given bounds @param {String} start The char to the LHS @param {String} end The char to the RHS @param {String} source The source to check against @param {Number} offset
[ "A", "util", "method", "to", "determine", "if", "the", "caret", "is", "within", "two", "given", "chars", "that", "are", "found", "within", "the", "given", "bounds" ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.webtools/web/webtools/htmlContentAssist.js#L823-L846
14,580
eclipse/orion.client
bundles/org.eclipse.orion.client.core/web/orion/operation.js
handle
function handle(operationLocation, onSuccess, onError) { var def = new Deferred(); _trackCancel(operationLocation, def); _getOperation({location: operationLocation, timeout: 100}, def, onSuccess, onError); return def; }
javascript
function handle(operationLocation, onSuccess, onError) { var def = new Deferred(); _trackCancel(operationLocation, def); _getOperation({location: operationLocation, timeout: 100}, def, onSuccess, onError); return def; }
[ "function", "handle", "(", "operationLocation", ",", "onSuccess", ",", "onError", ")", "{", "var", "def", "=", "new", "Deferred", "(", ")", ";", "_trackCancel", "(", "operationLocation", ",", "def", ")", ";", "_getOperation", "(", "{", "location", ":", "op...
Handles a long-running operation as a promise. @name orion.operation.handle @function @param {String} operationLocation @param {Function} [onSuccess] If provided, will be called to transform a successful operation into the resolve value of the returned promise. @param {Function} [onError] If provided, will be called to...
[ "Handles", "a", "long", "-", "running", "operation", "as", "a", "promise", "." ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.core/web/orion/operation.js#L117-L122
14,581
eclipse/orion.client
bundles/org.eclipse.orion.client.ui/web/orion/problems/problemsView.js
ProblemsView
function ProblemsView(options, slideout) { if(slideout) { SlideoutViewMode.call(this, slideout); } var parentId = options.parentId ? options.parentId : "orion.PropertyPanel.container"; this._parent = lib.node(parentId); this.serviceRegistry = options.serviceRegistry; this.commandRegistry = options...
javascript
function ProblemsView(options, slideout) { if(slideout) { SlideoutViewMode.call(this, slideout); } var parentId = options.parentId ? options.parentId : "orion.PropertyPanel.container"; this._parent = lib.node(parentId); this.serviceRegistry = options.serviceRegistry; this.commandRegistry = options...
[ "function", "ProblemsView", "(", "options", ",", "slideout", ")", "{", "if", "(", "slideout", ")", "{", "SlideoutViewMode", ".", "call", "(", "this", ",", "slideout", ")", ";", "}", "var", "parentId", "=", "options", ".", "parentId", "?", "options", ".",...
Constructs a new ProblemView object. @class @name orion.BrowseView
[ "Constructs", "a", "new", "ProblemView", "object", "." ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.ui/web/orion/problems/problemsView.js#L27-L39
14,582
eclipse/orion.client
bundles/org.eclipse.orion.client.ui/web/orion/sites/siteClient.js
_doServiceCall
function _doServiceCall(service, methodName, args) { var serviceMethod = service[methodName]; var clientDeferred = new Deferred(); if (typeof serviceMethod !== 'function') { //$NON-NLS-0$ throw messages['Service method missing: '] + methodName; } // On success, just forward the result to the client var o...
javascript
function _doServiceCall(service, methodName, args) { var serviceMethod = service[methodName]; var clientDeferred = new Deferred(); if (typeof serviceMethod !== 'function') { //$NON-NLS-0$ throw messages['Service method missing: '] + methodName; } // On success, just forward the result to the client var o...
[ "function", "_doServiceCall", "(", "service", ",", "methodName", ",", "args", ")", "{", "var", "serviceMethod", "=", "service", "[", "methodName", "]", ";", "var", "clientDeferred", "=", "new", "Deferred", "(", ")", ";", "if", "(", "typeof", "serviceMethod",...
Performs a service call, handling authentication and retrying after auth. @returns {Promise}
[ "Performs", "a", "service", "call", "handling", "authentication", "and", "retrying", "after", "auth", "." ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.ui/web/orion/sites/siteClient.js#L18-L36
14,583
eclipse/orion.client
bundles/org.eclipse.orion.client.ui/web/orion/sites/siteClient.js
SiteClient
function SiteClient(serviceRegistry, siteService, siteServiceRef) { this._serviceRegistry = serviceRegistry; this._siteService = siteService; this._selfHost = siteServiceRef.getProperty('canSelfHost'); //$NON-NLS-0$ this._selfHostConfig = siteServiceRef.getProperty('selfHostingConfig'); //$NON-NLS-0$ this._si...
javascript
function SiteClient(serviceRegistry, siteService, siteServiceRef) { this._serviceRegistry = serviceRegistry; this._siteService = siteService; this._selfHost = siteServiceRef.getProperty('canSelfHost'); //$NON-NLS-0$ this._selfHostConfig = siteServiceRef.getProperty('selfHostingConfig'); //$NON-NLS-0$ this._si...
[ "function", "SiteClient", "(", "serviceRegistry", ",", "siteService", ",", "siteServiceRef", ")", "{", "this", ".", "_serviceRegistry", "=", "serviceRegistry", ";", "this", ".", "_siteService", "=", "siteService", ";", "this", ".", "_selfHost", "=", "siteServiceRe...
Constructs a new SiteClient. @name orion.sites.SiteClient @extends orion.sites.SiteService @class Convenience API for interacting with a particular {@link orion.sites.SiteService}. @param {orion.serviceregistry.ServiceRegistry} serviceRegistry @param {orion.serviceregistry.Service} siteService @param {orion.serviceregi...
[ "Constructs", "a", "new", "SiteClient", "." ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.ui/web/orion/sites/siteClient.js#L54-L76
14,584
eclipse/orion.client
bundles/org.eclipse.orion.client.ui/web/orion/sites/siteClient.js
function(site, file) { if (!site) { var d = new Deferred(); d.resolve(false); return d; } return this.getURLOnSite(site, file).then(function(url) { return url !== null; }); }
javascript
function(site, file) { if (!site) { var d = new Deferred(); d.resolve(false); return d; } return this.getURLOnSite(site, file).then(function(url) { return url !== null; }); }
[ "function", "(", "site", ",", "file", ")", "{", "if", "(", "!", "site", ")", "{", "var", "d", "=", "new", "Deferred", "(", ")", ";", "d", ".", "resolve", "(", "false", ")", ";", "return", "d", ";", "}", "return", "this", ".", "getURLOnSite", "(...
Convenience methods below
[ "Convenience", "methods", "below" ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.ui/web/orion/sites/siteClient.js#L82-L91
14,585
eclipse/orion.client
bundles/org.eclipse.orion.client.ui/web/orion/widgets/nav/mini-nav.js
function(item) { this.scope(""); return this.fileClient.getWorkspace(item.Location).then(function(workspace) { return this.loadRoot(workspace).then(function() { return this.showItem(item, false); // call with reroot=false to avoid recursion }.bind(this)); }.bind(this)); }
javascript
function(item) { this.scope(""); return this.fileClient.getWorkspace(item.Location).then(function(workspace) { return this.loadRoot(workspace).then(function() { return this.showItem(item, false); // call with reroot=false to avoid recursion }.bind(this)); }.bind(this)); }
[ "function", "(", "item", ")", "{", "this", ".", "scope", "(", "\"\"", ")", ";", "return", "this", ".", "fileClient", ".", "getWorkspace", "(", "item", ".", "Location", ")", ".", "then", "(", "function", "(", "workspace", ")", "{", "return", "this", "...
Re-roots the tree so that the given item is displayable. @param {Object} The item to be expanded. @returns {orion.Promise}
[ "Re", "-", "roots", "the", "tree", "so", "that", "the", "given", "item", "is", "displayable", "." ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.ui/web/orion/widgets/nav/mini-nav.js#L64-L71
14,586
eclipse/orion.client
bundles/org.eclipse.orion.client.core/web/orion/EventTarget.js
function(eventName, listener) { if (typeof listener === "function" || listener.handleEvent) { this._namedListeners[eventName] = this._namedListeners[eventName] || []; this._namedListeners[eventName].push(listener); } }
javascript
function(eventName, listener) { if (typeof listener === "function" || listener.handleEvent) { this._namedListeners[eventName] = this._namedListeners[eventName] || []; this._namedListeners[eventName].push(listener); } }
[ "function", "(", "eventName", ",", "listener", ")", "{", "if", "(", "typeof", "listener", "===", "\"function\"", "||", "listener", ".", "handleEvent", ")", "{", "this", ".", "_namedListeners", "[", "eventName", "]", "=", "this", ".", "_namedListeners", "[", ...
Adds an event listener for a named event @param {String} eventName The event name @param {Function} listener The function called when an event occurs
[ "Adds", "an", "event", "listener", "for", "a", "named", "event" ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.core/web/orion/EventTarget.js#L61-L66
14,587
eclipse/orion.client
bundles/org.eclipse.orion.client.core/web/orion/EventTarget.js
function(eventName, listener) { var listeners = this._namedListeners[eventName]; if (listeners) { for (var i = 0; i < listeners.length; i++) { if (listeners[i] === listener) { if (listeners.length === 1) { delete this._namedListeners[eventName]; } else { listeners.splice...
javascript
function(eventName, listener) { var listeners = this._namedListeners[eventName]; if (listeners) { for (var i = 0; i < listeners.length; i++) { if (listeners[i] === listener) { if (listeners.length === 1) { delete this._namedListeners[eventName]; } else { listeners.splice...
[ "function", "(", "eventName", ",", "listener", ")", "{", "var", "listeners", "=", "this", ".", "_namedListeners", "[", "eventName", "]", ";", "if", "(", "listeners", ")", "{", "for", "(", "var", "i", "=", "0", ";", "i", "<", "listeners", ".", "length...
Removes an event listener for a named event @param {String} eventName The event name @param {Function} listener The function called when an event occurs
[ "Removes", "an", "event", "listener", "for", "a", "named", "event" ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.core/web/orion/EventTarget.js#L73-L87
14,588
eclipse/orion.client
bundles/org.eclipse.orion.client.ui/web/gcli/gcli/types/basic.js
NumberType
function NumberType(typeSpec) { // Default to integer values this._allowFloat = !!typeSpec.allowFloat; if (typeSpec) { this._min = typeSpec.min; this._max = typeSpec.max; this._step = typeSpec.step || 1; if (!this._allowFloat && (this._isFloat(this._min) || this._isFloat(this._m...
javascript
function NumberType(typeSpec) { // Default to integer values this._allowFloat = !!typeSpec.allowFloat; if (typeSpec) { this._min = typeSpec.min; this._max = typeSpec.max; this._step = typeSpec.step || 1; if (!this._allowFloat && (this._isFloat(this._min) || this._isFloat(this._m...
[ "function", "NumberType", "(", "typeSpec", ")", "{", "// Default to integer values", "this", ".", "_allowFloat", "=", "!", "!", "typeSpec", ".", "allowFloat", ";", "if", "(", "typeSpec", ")", "{", "this", ".", "_min", "=", "typeSpec", ".", "min", ";", "thi...
We distinguish between integers and floats with the _allowFloat flag.
[ "We", "distinguish", "between", "integers", "and", "floats", "with", "the", "_allowFloat", "flag", "." ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.ui/web/gcli/gcli/types/basic.js#L87-L106
14,589
eclipse/orion.client
bundles/org.eclipse.orion.client.ui/web/gcli/gcli/types/basic.js
DelegateType
function DelegateType(typeSpec) { if (typeof typeSpec.delegateType !== 'function') { throw new Error('Instances of DelegateType need typeSpec.delegateType to be a function that returns a type'); } Object.keys(typeSpec).forEach(function(key) { this[key] = typeSpec[key]; }, this); }
javascript
function DelegateType(typeSpec) { if (typeof typeSpec.delegateType !== 'function') { throw new Error('Instances of DelegateType need typeSpec.delegateType to be a function that returns a type'); } Object.keys(typeSpec).forEach(function(key) { this[key] = typeSpec[key]; }, this); }
[ "function", "DelegateType", "(", "typeSpec", ")", "{", "if", "(", "typeof", "typeSpec", ".", "delegateType", "!==", "'function'", ")", "{", "throw", "new", "Error", "(", "'Instances of DelegateType need typeSpec.delegateType to be a function that returns a type'", ")", ";...
A type for "we don't know right now, but hope to soon".
[ "A", "type", "for", "we", "don", "t", "know", "right", "now", "but", "hope", "to", "soon", "." ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.ui/web/gcli/gcli/types/basic.js#L276-L283
14,590
eclipse/orion.client
bundles/org.eclipse.orion.client.ui/web/gcli/gcli/types/basic.js
ArrayType
function ArrayType(typeSpec) { if (!typeSpec.subtype) { console.error('Array.typeSpec is missing subtype. Assuming string.' + JSON.stringify(typeSpec)); typeSpec.subtype = 'string'; } Object.keys(typeSpec).forEach(function(key) { this[key] = typeSpec[key]; }, this); this.subtype = types.g...
javascript
function ArrayType(typeSpec) { if (!typeSpec.subtype) { console.error('Array.typeSpec is missing subtype. Assuming string.' + JSON.stringify(typeSpec)); typeSpec.subtype = 'string'; } Object.keys(typeSpec).forEach(function(key) { this[key] = typeSpec[key]; }, this); this.subtype = types.g...
[ "function", "ArrayType", "(", "typeSpec", ")", "{", "if", "(", "!", "typeSpec", ".", "subtype", ")", "{", "console", ".", "error", "(", "'Array.typeSpec is missing subtype. Assuming string.'", "+", "JSON", ".", "stringify", "(", "typeSpec", ")", ")", ";", "typ...
A set of objects of the same type
[ "A", "set", "of", "objects", "of", "the", "same", "type" ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.ui/web/gcli/gcli/types/basic.js#L355-L366
14,591
eclipse/orion.client
bundles/org.eclipse.orion.client.javascript/web/eslint/lib/utils/token-store.js
get
function get(start, end) { var result = [], i; for (i = Math.max(0, start); i < end && i < length; i++) { result.push(tokens[i]); } return result; }
javascript
function get(start, end) { var result = [], i; for (i = Math.max(0, start); i < end && i < length; i++) { result.push(tokens[i]); } return result; }
[ "function", "get", "(", "start", ",", "end", ")", "{", "var", "result", "=", "[", "]", ",", "i", ";", "for", "(", "i", "=", "Math", ".", "max", "(", "0", ",", "start", ")", ";", "i", "<", "end", "&&", "i", "<", "length", ";", "i", "++", "...
Gets tokens in a given interval. @param {int} start Inclusive index of the first token. 0 if negative. @param {int} end Exclusive index of the last token. @returns {Token[]} Tokens in the interval.
[ "Gets", "tokens", "in", "a", "given", "interval", "." ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.javascript/web/eslint/lib/utils/token-store.js#L26-L35
14,592
eclipse/orion.client
bundles/org.eclipse.orion.client.javascript/web/eslint/lib/utils/token-store.js
lastTokenIndex
function lastTokenIndex(node) { var end = node.range[1], cursor = ends[end]; // If the node extends beyond its last token, get the token before the // next token if (typeof cursor === "undefined") { cursor = starts[end] - 1; } // If there isn't a next token, the desired token is the last one...
javascript
function lastTokenIndex(node) { var end = node.range[1], cursor = ends[end]; // If the node extends beyond its last token, get the token before the // next token if (typeof cursor === "undefined") { cursor = starts[end] - 1; } // If there isn't a next token, the desired token is the last one...
[ "function", "lastTokenIndex", "(", "node", ")", "{", "var", "end", "=", "node", ".", "range", "[", "1", "]", ",", "cursor", "=", "ends", "[", "end", "]", ";", "// If the node extends beyond its last token, get the token before the", "// next token", "if", "(", "...
Gets the index in the tokens array of the last token belonging to a node. Usually a node ends exactly at a token, but due to ASI, sometimes a node's range extends beyond its last token. @param {ASTNode} node The node for which to find the last token's index. @returns {int} Index in the tokens array of the node's last t...
[ "Gets", "the", "index", "in", "the", "tokens", "array", "of", "the", "last", "token", "belonging", "to", "a", "node", ".", "Usually", "a", "node", "ends", "exactly", "at", "a", "token", "but", "due", "to", "ASI", "sometimes", "a", "node", "s", "range",...
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.javascript/web/eslint/lib/utils/token-store.js#L44-L61
14,593
eclipse/orion.client
bundles/org.eclipse.orion.client.ui/web/orion/commands.js
executeBinding
function executeBinding(binding) { var invocation = binding.invocation; if (invocation) { var command = binding.command; if (typeof(command.hrefCallback) === 'function') { var href = command.hrefCallback.call(invocation.handler || window, invocation); if (href.then){ href.then(function(l){...
javascript
function executeBinding(binding) { var invocation = binding.invocation; if (invocation) { var command = binding.command; if (typeof(command.hrefCallback) === 'function') { var href = command.hrefCallback.call(invocation.handler || window, invocation); if (href.then){ href.then(function(l){...
[ "function", "executeBinding", "(", "binding", ")", "{", "var", "invocation", "=", "binding", ".", "invocation", ";", "if", "(", "invocation", ")", "{", "var", "command", "=", "binding", ".", "command", ";", "if", "(", "typeof", "(", "command", ".", "href...
Executes a binding if possible. @name orion.commands.executeBinding @function @static @param {Object} binding @returns {Boolean} <code>true</code> if the binding was executed, <code>false</code> otherwise.
[ "Executes", "a", "binding", "if", "possible", "." ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.ui/web/orion/commands.js#L59-L87
14,594
eclipse/orion.client
bundles/org.eclipse.orion.client.ui/web/orion/commands.js
function(parent, items, handler, userData, commandService) { var choices = this.getChoices(items, handler, userData); var addCheck = choices.some(function(choice) { return choice.checked; }); choices.forEach(function(choice) { if (choice.name) { var itemNode = document.createElement("li"); //$N...
javascript
function(parent, items, handler, userData, commandService) { var choices = this.getChoices(items, handler, userData); var addCheck = choices.some(function(choice) { return choice.checked; }); choices.forEach(function(choice) { if (choice.name) { var itemNode = document.createElement("li"); //$N...
[ "function", "(", "parent", ",", "items", ",", "handler", ",", "userData", ",", "commandService", ")", "{", "var", "choices", "=", "this", ".", "getChoices", "(", "items", ",", "handler", ",", "userData", ")", ";", "var", "addCheck", "=", "choices", ".", ...
Populate the specified menu with choices using the choiceCallback. Used internally by the command service. Not intended to be overridden or called externally.
[ "Populate", "the", "specified", "menu", "with", "choices", "using", "the", "choiceCallback", ".", "Used", "internally", "by", "the", "command", "service", ".", "Not", "intended", "to", "be", "overridden", "or", "called", "externally", "." ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.ui/web/orion/commands.js#L757-L808
14,595
eclipse/orion.client
bundles/org.eclipse.orion.client.ui/web/orion/commands.js
function(items, handler, userData) { if (this.choiceCallback) { return this.choiceCallback.call(handler, items, userData); } return null; }
javascript
function(items, handler, userData) { if (this.choiceCallback) { return this.choiceCallback.call(handler, items, userData); } return null; }
[ "function", "(", "items", ",", "handler", ",", "userData", ")", "{", "if", "(", "this", ".", "choiceCallback", ")", "{", "return", "this", ".", "choiceCallback", ".", "call", "(", "handler", ",", "items", ",", "userData", ")", ";", "}", "return", "null...
Get the appropriate choices using the choiceCallback. Used internally by the command service. Not intended to be overridden or called externally.
[ "Get", "the", "appropriate", "choices", "using", "the", "choiceCallback", ".", "Used", "internally", "by", "the", "command", "service", ".", "Not", "intended", "to", "be", "overridden", "or", "called", "externally", "." ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.ui/web/orion/commands.js#L815-L820
14,596
eclipse/orion.client
bundles/org.eclipse.orion.client.ui/web/orion/commands.js
function(choice, items) { return function(event) { if (choice.callback) { choice.callback.call(choice, items, event); } }; }
javascript
function(choice, items) { return function(event) { if (choice.callback) { choice.callback.call(choice, items, event); } }; }
[ "function", "(", "choice", ",", "items", ")", "{", "return", "function", "(", "event", ")", "{", "if", "(", "choice", ".", "callback", ")", "{", "choice", ".", "callback", ".", "call", "(", "choice", ",", "items", ",", "event", ")", ";", "}", "}", ...
Make a choice callback appropriate for the given choice and items. Used internally by the command service. Not intended to be overridden or called externally.
[ "Make", "a", "choice", "callback", "appropriate", "for", "the", "given", "choice", "and", "items", ".", "Used", "internally", "by", "the", "command", "service", ".", "Not", "intended", "to", "be", "overridden", "or", "called", "externally", "." ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.ui/web/orion/commands.js#L827-L833
14,597
eclipse/orion.client
bundles/org.eclipse.orion.client.ui/web/examplePages/leftrightpanes.js
updateRightSide
function updateRightSide() { // Many pages use the hash to determine the content. var parameters = PageUtil.matchResourceParameters(); var content = lib.node("rightContent"); //$NON-NLS-0$ lib.empty(content); var text = parameters.resource.length > 0 ? "Showing interesting info about " + parame...
javascript
function updateRightSide() { // Many pages use the hash to determine the content. var parameters = PageUtil.matchResourceParameters(); var content = lib.node("rightContent"); //$NON-NLS-0$ lib.empty(content); var text = parameters.resource.length > 0 ? "Showing interesting info about " + parame...
[ "function", "updateRightSide", "(", ")", "{", "// Many pages use the hash to determine the content.", "var", "parameters", "=", "PageUtil", ".", "matchResourceParameters", "(", ")", ";", "var", "content", "=", "lib", ".", "node", "(", "\"rightContent\"", ")", ";", "...
Here we track hash changes. Another pattern is that the component on the right side would track the hash change internally.
[ "Here", "we", "track", "hash", "changes", ".", "Another", "pattern", "is", "that", "the", "component", "on", "the", "right", "side", "would", "track", "the", "hash", "change", "internally", "." ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.ui/web/examplePages/leftrightpanes.js#L86-L99
14,598
eclipse/orion.client
bundles/org.eclipse.orion.client.javascript/web/eslint/lib/rules/no-param-reassign.js
isModifyingProp
function isModifyingProp(reference) { var node = reference.identifier; var parent = node.parent; while (parent && !stopNodePattern.test(parent.type)) { switch (parent.type) { // e.g. foo.a = 0; case "AssignmentExpression": return parent.left === node; // e.g. ++foo.a; case "Upd...
javascript
function isModifyingProp(reference) { var node = reference.identifier; var parent = node.parent; while (parent && !stopNodePattern.test(parent.type)) { switch (parent.type) { // e.g. foo.a = 0; case "AssignmentExpression": return parent.left === node; // e.g. ++foo.a; case "Upd...
[ "function", "isModifyingProp", "(", "reference", ")", "{", "var", "node", "=", "reference", ".", "identifier", ";", "var", "parent", "=", "node", ".", "parent", ";", "while", "(", "parent", "&&", "!", "stopNodePattern", ".", "test", "(", "parent", ".", "...
Checks whether or not the reference modifies properties of its variable. @param {Reference} reference - A reference to check. @returns {boolean} Whether or not the reference modifies properties of its variable.
[ "Checks", "whether", "or", "not", "the", "reference", "modifies", "properties", "of", "its", "variable", "." ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.javascript/web/eslint/lib/rules/no-param-reassign.js#L27-L72
14,599
eclipse/orion.client
bundles/org.eclipse.orion.client.help/web/help/helpService.js
function(object) { var url = new URL(object.Location, self.location); return xhr("GET", url.href, { //$NON-NLS-0$ timeout: 15000, headers: { "Orion-Version": "1" }, //$NON-NLS-1$ //$NON-NLS-0$ log: false }).then(function(result) { return result.response; }.bind(this)); }
javascript
function(object) { var url = new URL(object.Location, self.location); return xhr("GET", url.href, { //$NON-NLS-0$ timeout: 15000, headers: { "Orion-Version": "1" }, //$NON-NLS-1$ //$NON-NLS-0$ log: false }).then(function(result) { return result.response; }.bind(this)); }
[ "function", "(", "object", ")", "{", "var", "url", "=", "new", "URL", "(", "object", ".", "Location", ",", "self", ".", "location", ")", ";", "return", "xhr", "(", "\"GET\"", ",", "url", ".", "href", ",", "{", "//$NON-NLS-0$", "timeout", ":", "15000"...
Returns the contents of the file at the given location. @param object the help item @return A deferred that will be provided with the contents when available
[ "Returns", "the", "contents", "of", "the", "file", "at", "the", "given", "location", "." ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.help/web/help/helpService.js#L68-L77