repo
stringlengths
5
67
path
stringlengths
4
116
func_name
stringlengths
0
58
original_string
stringlengths
52
373k
language
stringclasses
1 value
code
stringlengths
52
373k
code_tokens
list
docstring
stringlengths
4
11.8k
docstring_tokens
list
sha
stringlengths
40
40
url
stringlengths
86
226
partition
stringclasses
1 value
eclipse/orion.client
bundles/org.eclipse.orion.client.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
train
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
train
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
train
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
train
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
train
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
train
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
train
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
train
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
train
eclipse/orion.client
bundles/org.eclipse.orion.client.ui/web/gcli/gcli/types/resource.js
Resource
function Resource(name, type, inline, element) { this.name = name; this.type = type; this.inline = inline; this.element = element; }
javascript
function Resource(name, type, inline, element) { this.name = name; this.type = type; this.inline = inline; this.element = element; }
[ "function", "Resource", "(", "name", ",", "type", ",", "inline", ",", "element", ")", "{", "this", ".", "name", "=", "name", ";", "this", ".", "type", "=", "type", ";", "this", ".", "inline", "=", "inline", ";", "this", ".", "element", "=", "elemen...
Resources are bits of CSS and JavaScript that the page either includes directly or as a result of reading some remote resource. Resource should not be used directly, but instead through a sub-class like CssResource or ScriptResource.
[ "Resources", "are", "bits", "of", "CSS", "and", "JavaScript", "that", "the", "page", "either", "includes", "directly", "or", "as", "a", "result", "of", "reading", "some", "remote", "resource", ".", "Resource", "should", "not", "be", "used", "directly", "but"...
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.ui/web/gcli/gcli/types/resource.js#L80-L85
train
eclipse/orion.client
bundles/org.eclipse.orion.client.ui/web/gcli/gcli/types/resource.js
dedupe
function dedupe(resources, onDupe) { // first create a map of name->[array of resources with same name] var names = {}; resources.forEach(function(scriptResource) { if (names[scriptResource.name] == null) { names[scriptResource.name] = []; } names[scriptResource.name].push(scriptResource); });...
javascript
function dedupe(resources, onDupe) { // first create a map of name->[array of resources with same name] var names = {}; resources.forEach(function(scriptResource) { if (names[scriptResource.name] == null) { names[scriptResource.name] = []; } names[scriptResource.name].push(scriptResource); });...
[ "function", "dedupe", "(", "resources", ",", "onDupe", ")", "{", "// first create a map of name->[array of resources with same name]", "var", "names", "=", "{", "}", ";", "resources", ".", "forEach", "(", "function", "(", "scriptResource", ")", "{", "if", "(", "na...
Find resources with the same name, and call onDupe to change the names
[ "Find", "resources", "with", "the", "same", "name", "and", "call", "onDupe", "to", "change", "the", "names" ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.ui/web/gcli/gcli/types/resource.js#L225-L242
train
eclipse/orion.client
bundles/org.eclipse.orion.client.ui/web/gcli/gcli/types/resource.js
ResourceType
function ResourceType(typeSpec) { this.include = typeSpec.include; if (this.include !== Resource.TYPE_SCRIPT && this.include !== Resource.TYPE_CSS && this.include != null) { throw new Error('invalid include property: ' + this.include); } }
javascript
function ResourceType(typeSpec) { this.include = typeSpec.include; if (this.include !== Resource.TYPE_SCRIPT && this.include !== Resource.TYPE_CSS && this.include != null) { throw new Error('invalid include property: ' + this.include); } }
[ "function", "ResourceType", "(", "typeSpec", ")", "{", "this", ".", "include", "=", "typeSpec", ".", "include", ";", "if", "(", "this", ".", "include", "!==", "Resource", ".", "TYPE_SCRIPT", "&&", "this", ".", "include", "!==", "Resource", ".", "TYPE_CSS",...
Use the Resource implementations to create a type based on SelectionType
[ "Use", "the", "Resource", "implementations", "to", "create", "a", "type", "based", "on", "SelectionType" ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.ui/web/gcli/gcli/types/resource.js#L247-L254
train
eclipse/orion.client
bundles/org.eclipse.orion.client.ui/web/gcli/gcli/types/resource.js
function(node) { for (var i = 0; i < ResourceCache._cached.length; i++) { if (ResourceCache._cached[i].node === node) { return ResourceCache._cached[i].resource; } } return null; }
javascript
function(node) { for (var i = 0; i < ResourceCache._cached.length; i++) { if (ResourceCache._cached[i].node === node) { return ResourceCache._cached[i].resource; } } return null; }
[ "function", "(", "node", ")", "{", "for", "(", "var", "i", "=", "0", ";", "i", "<", "ResourceCache", ".", "_cached", ".", "length", ";", "i", "++", ")", "{", "if", "(", "ResourceCache", ".", "_cached", "[", "i", "]", ".", "node", "===", "node", ...
Do we already have a resource that was created for the given node
[ "Do", "we", "already", "have", "a", "resource", "that", "was", "created", "for", "the", "given", "node" ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.ui/web/gcli/gcli/types/resource.js#L292-L299
train
eclipse/orion.client
bundles/org.eclipse.orion.client.core/web/orion/fileClient.js
function(deleteLocation, eventData) { //return _doServiceCall(this._getService(deleteLocation), "deleteFile", arguments); //$NON-NLS-1$ return _doServiceCall(this._getService(deleteLocation), "deleteFile", arguments).then(function(result){ //$NON-NLS-0$ if(this.isEventFrozen()) { if(!this._frozenEvent.de...
javascript
function(deleteLocation, eventData) { //return _doServiceCall(this._getService(deleteLocation), "deleteFile", arguments); //$NON-NLS-1$ return _doServiceCall(this._getService(deleteLocation), "deleteFile", arguments).then(function(result){ //$NON-NLS-0$ if(this.isEventFrozen()) { if(!this._frozenEvent.de...
[ "function", "(", "deleteLocation", ",", "eventData", ")", "{", "//return _doServiceCall(this._getService(deleteLocation), \"deleteFile\", arguments); //$NON-NLS-1$", "return", "_doServiceCall", "(", "this", ".", "_getService", "(", "deleteLocation", ")", ",", "\"deleteFile\"", ...
Deletes a file, directory, project or workspace. @param {String} deleteLocation The location of the file or directory to delete. @param {Object} eventData The event data that will be sent back. @public @returns {Deferred} A deferred that will delete the given file
[ "Deletes", "a", "file", "directory", "project", "or", "workspace", "." ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.core/web/orion/fileClient.js#L454-L467
train
eclipse/orion.client
bundles/org.eclipse.orion.client.core/web/orion/fileClient.js
function(targetLocation, options, parentLocation) { //return _doServiceCall(this._getService(targetLocation), "remoteImport", arguments); //$NON-NLS-1$ return _doServiceCall(this._getService(targetLocation), "remoteImport", arguments).then(function(result){ //$NON-NLS-0$ if(this.isEventFrozen()) { if(!th...
javascript
function(targetLocation, options, parentLocation) { //return _doServiceCall(this._getService(targetLocation), "remoteImport", arguments); //$NON-NLS-1$ return _doServiceCall(this._getService(targetLocation), "remoteImport", arguments).then(function(result){ //$NON-NLS-0$ if(this.isEventFrozen()) { if(!th...
[ "function", "(", "targetLocation", ",", "options", ",", "parentLocation", ")", "{", "//return _doServiceCall(this._getService(targetLocation), \"remoteImport\", arguments); //$NON-NLS-1$", "return", "_doServiceCall", "(", "this", ".", "_getService", "(", "targetLocation", ")", ...
Imports file and directory contents from another server @param {String} targetLocation The location of the folder to import into @param {Object} options An object specifying the import parameters @public @return {Deferred} A deferred for chaining events after the import completes
[ "Imports", "file", "and", "directory", "contents", "from", "another", "server" ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.core/web/orion/fileClient.js#L630-L643
train
eclipse/orion.client
bundles/org.eclipse.orion.client.ui/web/orion/folderView.js
FolderView
function FolderView(options) { this.idCount = ID_COUNT++; this._parent = options.parent; this._metadata = options.metadata; this.menuBar = options.menuBar; this.fileClient = options.fileService; this.progress = options.progressService; this.serviceRegistry = options.serviceRegistry; this.commandRegistry...
javascript
function FolderView(options) { this.idCount = ID_COUNT++; this._parent = options.parent; this._metadata = options.metadata; this.menuBar = options.menuBar; this.fileClient = options.fileService; this.progress = options.progressService; this.serviceRegistry = options.serviceRegistry; this.commandRegistry...
[ "function", "FolderView", "(", "options", ")", "{", "this", ".", "idCount", "=", "ID_COUNT", "++", ";", "this", ".", "_parent", "=", "options", ".", "parent", ";", "this", ".", "_metadata", "=", "options", ".", "metadata", ";", "this", ".", "menuBar", ...
Constructs a new FolderView object. @class @name orion.FolderView
[ "Constructs", "a", "new", "FolderView", "object", "." ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.ui/web/orion/folderView.js#L149-L165
train
eclipse/orion.client
bundles/org.eclipse.orion.client.javascript/web/javascript/ternPlugins/jsdoc.js
getEnvsListForTemplate
function getEnvsListForTemplate(){ var envsList = []; var keys = Object.keys(allEnvs).sort(); for(var j = 0; j < keys.length; j++) { var key = keys[j]; if(key !== 'builtin'){ envsList.push(key); } } var templateList = { type: "link", //$NON-NLS-0$ values: envsList, title: 'ES...
javascript
function getEnvsListForTemplate(){ var envsList = []; var keys = Object.keys(allEnvs).sort(); for(var j = 0; j < keys.length; j++) { var key = keys[j]; if(key !== 'builtin'){ envsList.push(key); } } var templateList = { type: "link", //$NON-NLS-0$ values: envsList, title: 'ES...
[ "function", "getEnvsListForTemplate", "(", ")", "{", "var", "envsList", "=", "[", "]", ";", "var", "keys", "=", "Object", ".", "keys", "(", "allEnvs", ")", ".", "sort", "(", ")", ";", "for", "(", "var", "j", "=", "0", ";", "j", "<", "keys", ".", ...
Takes the allEnvs object, extracts the envs list and formats it into a JSON string that the template computer will accept. @returns {String} A string list of eslint environment directives that the template computer will accept
[ "Takes", "the", "allEnvs", "object", "extracts", "the", "envs", "list", "and", "formats", "it", "into", "a", "JSON", "string", "that", "the", "template", "computer", "will", "accept", "." ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.javascript/web/javascript/ternPlugins/jsdoc.js#L540-L556
train
eclipse/orion.client
modules/orionode.debug.server/lib/adapterManager.js
createAdapter
function createAdapter(type) { var adapterConfig = adaptersConfig[type]; if (!adapterConfig) { throw new Error('Adapter type ' + type + ' has not been registered.'); } return new DebugAdapter(adaptersConfig[type], adaptersCwd[type]); }
javascript
function createAdapter(type) { var adapterConfig = adaptersConfig[type]; if (!adapterConfig) { throw new Error('Adapter type ' + type + ' has not been registered.'); } return new DebugAdapter(adaptersConfig[type], adaptersCwd[type]); }
[ "function", "createAdapter", "(", "type", ")", "{", "var", "adapterConfig", "=", "adaptersConfig", "[", "type", "]", ";", "if", "(", "!", "adapterConfig", ")", "{", "throw", "new", "Error", "(", "'Adapter type '", "+", "type", "+", "' has not been registered.'...
Create a new adapter instance @param {string} type - adapter type name @return {DebugAdapter}
[ "Create", "a", "new", "adapter", "instance" ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/modules/orionode.debug.server/lib/adapterManager.js#L58-L64
train
eclipse/orion.client
bundles/org.eclipse.orion.client.ui/web/orion/crawler/searchCrawler.js
SearchCrawler
function SearchCrawler( serviceRegistry, fileClient, searchParams, options) { this.registry= serviceRegistry; this.fileClient = fileClient; this.fileLocations = []; this.fileSkeleton = []; this._hitCounter = 0; this._totalCounter = 0; this._searchOnName = options && options.searchOnName; this._buildSke...
javascript
function SearchCrawler( serviceRegistry, fileClient, searchParams, options) { this.registry= serviceRegistry; this.fileClient = fileClient; this.fileLocations = []; this.fileSkeleton = []; this._hitCounter = 0; this._totalCounter = 0; this._searchOnName = options && options.searchOnName; this._buildSke...
[ "function", "SearchCrawler", "(", "serviceRegistry", ",", "fileClient", ",", "searchParams", ",", "options", ")", "{", "this", ".", "registry", "=", "serviceRegistry", ";", "this", ".", "fileClient", "=", "fileClient", ";", "this", ".", "fileLocations", "=", "...
SearchCrawler is an alternative when a file service does not provide the search API. It assumes that the file client at least provides the fetchChildren and read APIs. It basically visits all the children recursively under a given directory location and search on a given keyword, either literal or wild card. @param {se...
[ "SearchCrawler", "is", "an", "alternative", "when", "a", "file", "service", "does", "not", "provide", "the", "search", "API", ".", "It", "assumes", "that", "the", "file", "client", "at", "least", "provides", "the", "fetchChildren", "and", "read", "APIs", "."...
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.ui/web/orion/crawler/searchCrawler.js#L28-L57
train
eclipse/orion.client
bundles/org.eclipse.orion.client.ui/web/orion/webui/tooltip.js
function(hideDelay) { this._showByKB = undefined; if (this._timeout) { window.clearTimeout(this._timeout); this._timeout = null; } if (!this.isShowing()) { //$NON-NLS-0$ return; } if (hideDelay === undefined) { hideDelay = this._hideDelay; } var self = this; this._timeout ...
javascript
function(hideDelay) { this._showByKB = undefined; if (this._timeout) { window.clearTimeout(this._timeout); this._timeout = null; } if (!this.isShowing()) { //$NON-NLS-0$ return; } if (hideDelay === undefined) { hideDelay = this._hideDelay; } var self = this; this._timeout ...
[ "function", "(", "hideDelay", ")", "{", "this", ".", "_showByKB", "=", "undefined", ";", "if", "(", "this", ".", "_timeout", ")", "{", "window", ".", "clearTimeout", "(", "this", ".", "_timeout", ")", ";", "this", ".", "_timeout", "=", "null", ";", "...
Hide the tooltip.
[ "Hide", "the", "tooltip", "." ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.ui/web/orion/webui/tooltip.js#L371-L392
train
eclipse/orion.client
bundles/org.eclipse.orion.client.ui/web/orion/widgets/nav/common-nav.js
function(childrenLocation, force) { return this.commandsRegistered.then(function() { if (childrenLocation && typeof childrenLocation === "object") { return this.load(childrenLocation); } return this.loadResourceList(childrenLocation, force); }.bind(this)); }
javascript
function(childrenLocation, force) { return this.commandsRegistered.then(function() { if (childrenLocation && typeof childrenLocation === "object") { return this.load(childrenLocation); } return this.loadResourceList(childrenLocation, force); }.bind(this)); }
[ "function", "(", "childrenLocation", ",", "force", ")", "{", "return", "this", ".", "commandsRegistered", ".", "then", "(", "function", "(", ")", "{", "if", "(", "childrenLocation", "&&", "typeof", "childrenLocation", "===", "\"object\"", ")", "{", "return", ...
Loads the given children location as the root. @param {String|Object} childrentLocation The childrenLocation or an object with a ChildrenLocation field. @returns {orion.Promise}
[ "Loads", "the", "given", "children", "location", "as", "the", "root", "." ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.ui/web/orion/widgets/nav/common-nav.js#L190-L197
train
eclipse/orion.client
bundles/org.eclipse.orion.client.ui/web/orion/widgets/nav/common-nav.js
function(rowElement, model) { NavigatorRenderer.prototype.rowCallback.call(this, rowElement, model); // Search for the model in the Cut buffer and disable it if it is found var cutBuffer = FileCommands.getCutBuffer(); if (cutBuffer) { var matchFound = cutBuffer.some(function(cutModel) { return Fil...
javascript
function(rowElement, model) { NavigatorRenderer.prototype.rowCallback.call(this, rowElement, model); // Search for the model in the Cut buffer and disable it if it is found var cutBuffer = FileCommands.getCutBuffer(); if (cutBuffer) { var matchFound = cutBuffer.some(function(cutModel) { return Fil...
[ "function", "(", "rowElement", ",", "model", ")", "{", "NavigatorRenderer", ".", "prototype", ".", "rowCallback", ".", "call", "(", "this", ",", "rowElement", ",", "model", ")", ";", "// Search for the model in the Cut buffer and disable it if it is found", "var", "cu...
Overrides NavigatorRenderer.prototype.rowCallback @param {Element} rowElement
[ "Overrides", "NavigatorRenderer", ".", "prototype", ".", "rowCallback" ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.ui/web/orion/widgets/nav/common-nav.js#L500-L515
train
eclipse/orion.client
bundles/org.eclipse.orion.client.core/web/lsp/utils.js
convertPositions
function convertPositions(deferred, editorContext, item, proposal) { editorContext.getLineStart(item.textEdit.range.start.line).then(function(startLineOffset) { var completionOffset = item.textEdit.range.start.character + startLineOffset; for (var i = 0; i < proposal.positions.length; i++) { proposal.positi...
javascript
function convertPositions(deferred, editorContext, item, proposal) { editorContext.getLineStart(item.textEdit.range.start.line).then(function(startLineOffset) { var completionOffset = item.textEdit.range.start.character + startLineOffset; for (var i = 0; i < proposal.positions.length; i++) { proposal.positi...
[ "function", "convertPositions", "(", "deferred", ",", "editorContext", ",", "item", ",", "proposal", ")", "{", "editorContext", ".", "getLineStart", "(", "item", ".", "textEdit", ".", "range", ".", "start", ".", "line", ")", ".", "then", "(", "function", "...
Converts the linked mode and escape positional offsets of this proposal to the full offset within the document. @param {Deferred} deferred the promise for resolving the converted proposal @param editorContext the current context of the editor @param item the converted JSON item from the LSP @param proposal the proposa...
[ "Converts", "the", "linked", "mode", "and", "escape", "positional", "offsets", "of", "this", "proposal", "to", "the", "full", "offset", "within", "the", "document", "." ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.core/web/lsp/utils.js#L429-L438
train
eclipse/orion.client
bundles/org.eclipse.orion.client.core/web/requirejs/order.js
onFetchOnly
function onFetchOnly(node) { var i, loadedNode, resourceName; //Mark this script as loaded. node.setAttribute('data-orderloaded', 'loaded'); //Cycle through waiting scripts. If the matching node for them //is loaded, and is in the right order, add it to the DOM //to exe...
javascript
function onFetchOnly(node) { var i, loadedNode, resourceName; //Mark this script as loaded. node.setAttribute('data-orderloaded', 'loaded'); //Cycle through waiting scripts. If the matching node for them //is loaded, and is in the right order, add it to the DOM //to exe...
[ "function", "onFetchOnly", "(", "node", ")", "{", "var", "i", ",", "loadedNode", ",", "resourceName", ";", "//Mark this script as loaded.", "node", ".", "setAttribute", "(", "'data-orderloaded'", ",", "'loaded'", ")", ";", "//Cycle through waiting scripts. If the matchi...
Used for the IE case, where fetching is done by creating script element but not attaching it to the DOM. This function will be called when that happens so it can be determined when the node can be attached to the DOM to trigger its execution.
[ "Used", "for", "the", "IE", "case", "where", "fetching", "is", "done", "by", "creating", "script", "element", "but", "not", "attaching", "it", "to", "the", "DOM", ".", "This", "function", "will", "be", "called", "when", "that", "happens", "so", "it", "ca...
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.core/web/requirejs/order.js#L96-L120
train
eclipse/orion.client
modules/orionode/lib/cf/domains.js
getCFdomains
function getCFdomains(appTarget, UserId, targetUrl, domainName, defaultDomainMode) { var domainArray = []; var waitFor; if (!defaultDomainMode){ waitFor = target.cfRequest("GET", UserId, targetUrl + appTarget.Org.entity.private_domains_url, domainName ? {"q": "name:" + api.encodeURIComponent(domainName)}: nul...
javascript
function getCFdomains(appTarget, UserId, targetUrl, domainName, defaultDomainMode) { var domainArray = []; var waitFor; if (!defaultDomainMode){ waitFor = target.cfRequest("GET", UserId, targetUrl + appTarget.Org.entity.private_domains_url, domainName ? {"q": "name:" + api.encodeURIComponent(domainName)}: nul...
[ "function", "getCFdomains", "(", "appTarget", ",", "UserId", ",", "targetUrl", ",", "domainName", ",", "defaultDomainMode", ")", "{", "var", "domainArray", "=", "[", "]", ";", "var", "waitFor", ";", "if", "(", "!", "defaultDomainMode", ")", "{", "waitFor", ...
This method can not accept req, because the req something has a body instead of a query.
[ "This", "method", "can", "not", "accept", "req", "because", "the", "req", "something", "has", "a", "body", "instead", "of", "a", "query", "." ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/modules/orionode/lib/cf/domains.js#L64-L100
train
eclipse/orion.client
modules/orionode.debug.server/lib/debugFile.js
createDebugFileRouter
function createDebugFileRouter(adapterPool) { var router = express.Router(); router.get('/:connectionId/:referenceId/*', function(req, res) { if (!adapterPool.has(req.params.connectionId)) { res.sendStatus(404); return; } var adapter = adapterPool.get(req.params....
javascript
function createDebugFileRouter(adapterPool) { var router = express.Router(); router.get('/:connectionId/:referenceId/*', function(req, res) { if (!adapterPool.has(req.params.connectionId)) { res.sendStatus(404); return; } var adapter = adapterPool.get(req.params....
[ "function", "createDebugFileRouter", "(", "adapterPool", ")", "{", "var", "router", "=", "express", ".", "Router", "(", ")", ";", "router", ".", "get", "(", "'/:connectionId/:referenceId/*'", ",", "function", "(", "req", ",", "res", ")", "{", "if", "(", "!...
Create a router for debug file @param {Map.<string, DebugAdapter>} adapterPool @return {Express.Router}
[ "Create", "a", "router", "for", "debug", "file" ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/modules/orionode.debug.server/lib/debugFile.js#L23-L47
train
eclipse/orion.client
bundles/org.eclipse.orion.client.javascript/web/eslint/lib/rules/yoda.js
isParenWrapped
function isParenWrapped() { var tokenBefore, tokenAfter; return (tokenBefore = sourceCode.getTokenBefore(node)) && tokenBefore.value === "(" && (tokenAfter = sourceCode.getTokenAfter(node)) && tokenAfter.value === ")"; }
javascript
function isParenWrapped() { var tokenBefore, tokenAfter; return (tokenBefore = sourceCode.getTokenBefore(node)) && tokenBefore.value === "(" && (tokenAfter = sourceCode.getTokenAfter(node)) && tokenAfter.value === ")"; }
[ "function", "isParenWrapped", "(", ")", "{", "var", "tokenBefore", ",", "tokenAfter", ";", "return", "(", "tokenBefore", "=", "sourceCode", ".", "getTokenBefore", "(", "node", ")", ")", "&&", "tokenBefore", ".", "value", "===", "\"(\"", "&&", "(", "tokenAfte...
Determines whether node is wrapped in parentheses. @returns {Boolean} Whether node is preceded immediately by an open paren token and followed immediately by a close paren token.
[ "Determines", "whether", "node", "is", "wrapped", "in", "parentheses", "." ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.javascript/web/eslint/lib/rules/yoda.js#L183-L190
train
eclipse/orion.client
bundles/org.eclipse.orion.client.javascript/web/eslint/lib/utils/source-code.js
findJSDocComment
function findJSDocComment(comments, line) { if (comments) { for (var i = comments.length - 1; i >= 0; i--) { if (comments[i].type === "Block" && comments[i].value.charAt(0) === "*") { if (line - comments[i].loc.end.line <= 1) { return comments[i]; ...
javascript
function findJSDocComment(comments, line) { if (comments) { for (var i = comments.length - 1; i >= 0; i--) { if (comments[i].type === "Block" && comments[i].value.charAt(0) === "*") { if (line - comments[i].loc.end.line <= 1) { return comments[i]; ...
[ "function", "findJSDocComment", "(", "comments", ",", "line", ")", "{", "if", "(", "comments", ")", "{", "for", "(", "var", "i", "=", "comments", ".", "length", "-", "1", ";", "i", ">=", "0", ";", "i", "--", ")", "{", "if", "(", "comments", "[", ...
Finds a JSDoc comment node in an array of comment nodes. @param {ASTNode[]} comments The array of comment nodes to search. @param {int} line Line number to look around @returns {ASTNode} The node if found, null if not. @private
[ "Finds", "a", "JSDoc", "comment", "node", "in", "an", "array", "of", "comment", "nodes", "." ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.javascript/web/eslint/lib/utils/source-code.js#L52-L67
train
eclipse/orion.client
bundles/org.eclipse.orion.client.javascript/web/eslint/lib/utils/source-code.js
function(node, beforeCount, afterCount) { if (node) { return (this.text !== null) ? this.text.slice(Math.max(node.range[0] - (beforeCount || 0), 0), node.range[1] + (afterCount || 0)) : null; } return this.text; }
javascript
function(node, beforeCount, afterCount) { if (node) { return (this.text !== null) ? this.text.slice(Math.max(node.range[0] - (beforeCount || 0), 0), node.range[1] + (afterCount || 0)) : null; } return this.text; }
[ "function", "(", "node", ",", "beforeCount", ",", "afterCount", ")", "{", "if", "(", "node", ")", "{", "return", "(", "this", ".", "text", "!==", "null", ")", "?", "this", ".", "text", ".", "slice", "(", "Math", ".", "max", "(", "node", ".", "ran...
Gets the source code for the given node. @param {ASTNode=} node The AST node to get the text for. @param {int=} beforeCount The number of characters before the node to retrieve. @param {int=} afterCount The number of characters after the node to retrieve. @returns {string} The text representing the AST node.
[ "Gets", "the", "source", "code", "for", "the", "given", "node", "." ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.javascript/web/eslint/lib/utils/source-code.js#L161-L168
train
eclipse/orion.client
bundles/org.eclipse.orion.client.javascript/web/eslint/lib/utils/source-code.js
function(node) { var leadingComments = node.leadingComments || [], trailingComments = node.trailingComments || []; /* * espree adds a "comments" array on Program nodes rather than * leadingComments/trailingComments. Comments are only left in the * Program node co...
javascript
function(node) { var leadingComments = node.leadingComments || [], trailingComments = node.trailingComments || []; /* * espree adds a "comments" array on Program nodes rather than * leadingComments/trailingComments. Comments are only left in the * Program node co...
[ "function", "(", "node", ")", "{", "var", "leadingComments", "=", "node", ".", "leadingComments", "||", "[", "]", ",", "trailingComments", "=", "node", ".", "trailingComments", "||", "[", "]", ";", "/*\n * espree adds a \"comments\" array on Program nodes rath...
Gets all comments for the given node. @param {ASTNode} node The AST node to get the comments for. @returns {Object} The list of comments indexed by their position. @public
[ "Gets", "all", "comments", "for", "the", "given", "node", "." ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.javascript/web/eslint/lib/utils/source-code.js#L192-L212
train
eclipse/orion.client
bundles/org.eclipse.orion.client.javascript/web/eslint/lib/utils/source-code.js
function(node) { var parent = node.parent; switch (node.type) { case "ClassDeclaration": case "FunctionDeclaration": if (looksLikeExport(parent)) { return findJSDocComment(parent.leadingComments, parent.loc.start.line); } ...
javascript
function(node) { var parent = node.parent; switch (node.type) { case "ClassDeclaration": case "FunctionDeclaration": if (looksLikeExport(parent)) { return findJSDocComment(parent.leadingComments, parent.loc.start.line); } ...
[ "function", "(", "node", ")", "{", "var", "parent", "=", "node", ".", "parent", ";", "switch", "(", "node", ".", "type", ")", "{", "case", "\"ClassDeclaration\"", ":", "case", "\"FunctionDeclaration\"", ":", "if", "(", "looksLikeExport", "(", "parent", ")"...
Retrieves the JSDoc comment for a given node. @param {ASTNode} node The AST node to get the comment for. @returns {ASTNode} The BlockComment node containing the JSDoc for the given node or null if not found. @public
[ "Retrieves", "the", "JSDoc", "comment", "for", "a", "given", "node", "." ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.javascript/web/eslint/lib/utils/source-code.js#L221-L254
train
eclipse/orion.client
bundles/org.eclipse.orion.client.javascript/web/eslint/lib/utils/source-code.js
function(index) { var result = null, resultParent = null, traverser = new Traverser(); traverser.traverse(this.ast, { enter: function(node, parent) { if (node.range[0] <= index && index < node.range[1]) { result = node; ...
javascript
function(index) { var result = null, resultParent = null, traverser = new Traverser(); traverser.traverse(this.ast, { enter: function(node, parent) { if (node.range[0] <= index && index < node.range[1]) { result = node; ...
[ "function", "(", "index", ")", "{", "var", "result", "=", "null", ",", "resultParent", "=", "null", ",", "traverser", "=", "new", "Traverser", "(", ")", ";", "traverser", ".", "traverse", "(", "this", ".", "ast", ",", "{", "enter", ":", "function", "...
Gets the deepest node containing a range index. @param {int} index Range index of the desired node. @returns {ASTNode} The node if found or null if not found.
[ "Gets", "the", "deepest", "node", "containing", "a", "range", "index", "." ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.javascript/web/eslint/lib/utils/source-code.js#L261-L283
train
eclipse/orion.client
bundles/org.eclipse.orion.client.javascript/web/eslint/lib/utils/source-code.js
function(first, second) { var text = this.text.slice(first.range[1], second.range[0]); return /\s/.test(text.replace(/\/\*.*?\*\//g, "")); }
javascript
function(first, second) { var text = this.text.slice(first.range[1], second.range[0]); return /\s/.test(text.replace(/\/\*.*?\*\//g, "")); }
[ "function", "(", "first", ",", "second", ")", "{", "var", "text", "=", "this", ".", "text", ".", "slice", "(", "first", ".", "range", "[", "1", "]", ",", "second", ".", "range", "[", "0", "]", ")", ";", "return", "/", "\\s", "/", ".", "test", ...
Determines if two tokens have at least one whitespace character between them. This completely disregards comments in making the determination, so comments count as zero-length substrings. @param {Token} first The token to check after. @param {Token} second The token to check before. @returns {boolean} True if there is ...
[ "Determines", "if", "two", "tokens", "have", "at", "least", "one", "whitespace", "character", "between", "them", ".", "This", "completely", "disregards", "comments", "in", "making", "the", "determination", "so", "comments", "count", "as", "zero", "-", "length", ...
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.javascript/web/eslint/lib/utils/source-code.js#L294-L297
train
eclipse/orion.client
bundles/org.eclipse.orion.client.git/web/orion/git/uiUtil.js
createCompareWidget
function createCompareWidget(serviceRegistry, commandService, resource, hasConflicts, parentDivId, commandSpanId, editableInComparePage, gridRenderer, compareTo, toggleCommandSpanId, preferencesService, saveCmdContainerId, saveCmdId, titleIds, containerModel, standAloneOptions) { var setCompareSelection = f...
javascript
function createCompareWidget(serviceRegistry, commandService, resource, hasConflicts, parentDivId, commandSpanId, editableInComparePage, gridRenderer, compareTo, toggleCommandSpanId, preferencesService, saveCmdContainerId, saveCmdId, titleIds, containerModel, standAloneOptions) { var setCompareSelection = f...
[ "function", "createCompareWidget", "(", "serviceRegistry", ",", "commandService", ",", "resource", ",", "hasConflicts", ",", "parentDivId", ",", "commandSpanId", ",", "editableInComparePage", ",", "gridRenderer", ",", "compareTo", ",", "toggleCommandSpanId", ",", "prefe...
Create an embedded toggleable compare widget inside a given DIV. @param {Object} serviceRegistry The serviceRegistry. @param {Object} commandService The commandService. @param {String} resoure The URL string of the complex URL which will be resolved by a diff provider into two file URLs and the unified diff. @param {Bo...
[ "Create", "an", "embedded", "toggleable", "compare", "widget", "inside", "a", "given", "DIV", "." ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.git/web/orion/git/uiUtil.js#L116-L181
train
eclipse/orion.client
bundles/org.eclipse.orion.client.cf/web/cfui/plugins/wizards/common/wizardUtils.js
function(defaultDecorateError){ return function(error, target){ if(error.HttpCode !== 401){ error = defaultDecorateError(error, target); window.parent.postMessage(JSON.stringify({pageService: "orion.page.delegatedUI", //$NON-NLS-0$ source: "org.eclipse.orion.client.cf.deploy.uritemplate", //$NON-...
javascript
function(defaultDecorateError){ return function(error, target){ if(error.HttpCode !== 401){ error = defaultDecorateError(error, target); window.parent.postMessage(JSON.stringify({pageService: "orion.page.delegatedUI", //$NON-NLS-0$ source: "org.eclipse.orion.client.cf.deploy.uritemplate", //$NON-...
[ "function", "(", "defaultDecorateError", ")", "{", "return", "function", "(", "error", ",", "target", ")", "{", "if", "(", "error", ".", "HttpCode", "!==", "401", ")", "{", "error", "=", "defaultDecorateError", "(", "error", ",", "target", ")", ";", "win...
Builds the post error.
[ "Builds", "the", "post", "error", "." ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.cf/web/cfui/plugins/wizards/common/wizardUtils.js#L32-L41
train
eclipse/orion.client
bundles/org.eclipse.orion.client.cf/web/cfui/plugins/wizards/common/wizardUtils.js
function(msg){ if (msg.HTML) { // msg is HTML to be inserted directly var span = document.createElement("span"); span.innerHTML = msg.Message; return span; } msg = msg.Message || msg; var chunks, msgNode; try { chunks = URLUtil.detectValidURL(msg); } catch (e) { /* containe...
javascript
function(msg){ if (msg.HTML) { // msg is HTML to be inserted directly var span = document.createElement("span"); span.innerHTML = msg.Message; return span; } msg = msg.Message || msg; var chunks, msgNode; try { chunks = URLUtil.detectValidURL(msg); } catch (e) { /* containe...
[ "function", "(", "msg", ")", "{", "if", "(", "msg", ".", "HTML", ")", "{", "// msg is HTML to be inserted directly", "var", "span", "=", "document", ".", "createElement", "(", "\"span\"", ")", ";", "span", ".", "innerHTML", "=", "msg", ".", "Message", ";",...
Parses the given message creating a decorated UI.
[ "Parses", "the", "given", "message", "creating", "a", "decorated", "UI", "." ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.cf/web/cfui/plugins/wizards/common/wizardUtils.js#L54-L82
train
eclipse/orion.client
bundles/org.eclipse.orion.client.cf/web/cfui/plugins/wizards/common/wizardUtils.js
function(message){ document.getElementById('messageLabel').classList.remove("errorMessage"); //$NON-NLS-0$//$NON-NLS-1$ document.getElementById('messageContainer').classList.remove("errorMessage"); //$NON-NLS-0$ //$NON-NLS-1$ lib.empty(document.getElementById('messageText')); //$NON-NLS-0$ document.getE...
javascript
function(message){ document.getElementById('messageLabel').classList.remove("errorMessage"); //$NON-NLS-0$//$NON-NLS-1$ document.getElementById('messageContainer').classList.remove("errorMessage"); //$NON-NLS-0$ //$NON-NLS-1$ lib.empty(document.getElementById('messageText')); //$NON-NLS-0$ document.getE...
[ "function", "(", "message", ")", "{", "document", ".", "getElementById", "(", "'messageLabel'", ")", ".", "classList", ".", "remove", "(", "\"errorMessage\"", ")", ";", "//$NON-NLS-0$//$NON-NLS-1$", "document", ".", "getElementById", "(", "'messageContainer'", ")", ...
Displays the message bar panel with the given message.
[ "Displays", "the", "message", "bar", "panel", "with", "the", "given", "message", "." ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.cf/web/cfui/plugins/wizards/common/wizardUtils.js#L87-L97
train
eclipse/orion.client
bundles/org.eclipse.orion.client.cf/web/cfui/plugins/wizards/common/wizardUtils.js
function(){ document.getElementById('messageLabel').classList.remove("errorMessage"); //$NON-NLS-0$ //$NON-NLS-1$ document.getElementById('messageContainer').classList.remove("errorMessage"); //$NON-NLS-0$ //$NON-NLS-1$ lib.empty(document.getElementById('messageText')); //$NON-NLS-0$ document.getElementById...
javascript
function(){ document.getElementById('messageLabel').classList.remove("errorMessage"); //$NON-NLS-0$ //$NON-NLS-1$ document.getElementById('messageContainer').classList.remove("errorMessage"); //$NON-NLS-0$ //$NON-NLS-1$ lib.empty(document.getElementById('messageText')); //$NON-NLS-0$ document.getElementById...
[ "function", "(", ")", "{", "document", ".", "getElementById", "(", "'messageLabel'", ")", ".", "classList", ".", "remove", "(", "\"errorMessage\"", ")", ";", "//$NON-NLS-0$ //$NON-NLS-1$", "document", ".", "getElementById", "(", "'messageContainer'", ")", ".", "cl...
Hides the message bar panel.
[ "Hides", "the", "message", "bar", "panel", "." ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.cf/web/cfui/plugins/wizards/common/wizardUtils.js#L102-L107
train
eclipse/orion.client
bundles/org.eclipse.orion.client.cf/web/cfui/plugins/wizards/common/wizardUtils.js
function(message){ document.getElementById('messageLabel').classList.add("errorMessage"); //$NON-NLS-0$ //$NON-NLS-1$ document.getElementById('messageContainer').classList.add("errorMessage"); //$NON-NLS-0$ //$NON-NLS-1$ lib.empty(document.getElementById('messageText')); //$NON-NLS-0$ document.getElemen...
javascript
function(message){ document.getElementById('messageLabel').classList.add("errorMessage"); //$NON-NLS-0$ //$NON-NLS-1$ document.getElementById('messageContainer').classList.add("errorMessage"); //$NON-NLS-0$ //$NON-NLS-1$ lib.empty(document.getElementById('messageText')); //$NON-NLS-0$ document.getElemen...
[ "function", "(", "message", ")", "{", "document", ".", "getElementById", "(", "'messageLabel'", ")", ".", "classList", ".", "add", "(", "\"errorMessage\"", ")", ";", "//$NON-NLS-0$ //$NON-NLS-1$", "document", ".", "getElementById", "(", "'messageContainer'", ")", ...
Displays the message bar panel with the given error message.
[ "Displays", "the", "message", "bar", "panel", "with", "the", "given", "error", "message", "." ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.cf/web/cfui/plugins/wizards/common/wizardUtils.js#L112-L124
train
eclipse/orion.client
bundles/org.eclipse.orion.client.cf/web/cfui/plugins/wizards/common/wizardUtils.js
function(frameHolder){ var iframe = window.frameElement; setTimeout(function(){ var titleBar = document.getElementById('titleBar'); //$NON-NLS-0$ titleBar.addEventListener('mousedown', function(e) { //$NON-NLS-0$ if (e.srcElement.id !== 'closeDialog') { frameHolder._dragging = true; ...
javascript
function(frameHolder){ var iframe = window.frameElement; setTimeout(function(){ var titleBar = document.getElementById('titleBar'); //$NON-NLS-0$ titleBar.addEventListener('mousedown', function(e) { //$NON-NLS-0$ if (e.srcElement.id !== 'closeDialog') { frameHolder._dragging = true; ...
[ "function", "(", "frameHolder", ")", "{", "var", "iframe", "=", "window", ".", "frameElement", ";", "setTimeout", "(", "function", "(", ")", "{", "var", "titleBar", "=", "document", ".", "getElementById", "(", "'titleBar'", ")", ";", "//$NON-NLS-0$", "titleB...
Makes the current iframe draggable.
[ "Makes", "the", "current", "iframe", "draggable", "." ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.cf/web/cfui/plugins/wizards/common/wizardUtils.js#L129-L170
train
eclipse/orion.client
bundles/org.eclipse.orion.client.cf/web/cfui/plugins/wizards/common/wizardUtils.js
function(options){ options = options || {}; var message = options.message || messages["loadingDeploymentSettings..."]; var showMessage = options.showMessage; var hideMessage = options.hideMessage; var preferences = options.preferences; var fileClient = options.fileClient; var resource = opt...
javascript
function(options){ options = options || {}; var message = options.message || messages["loadingDeploymentSettings..."]; var showMessage = options.showMessage; var hideMessage = options.hideMessage; var preferences = options.preferences; var fileClient = options.fileClient; var resource = opt...
[ "function", "(", "options", ")", "{", "options", "=", "options", "||", "{", "}", ";", "var", "message", "=", "options", ".", "message", "||", "messages", "[", "\"loadingDeploymentSettings...\"", "]", ";", "var", "showMessage", "=", "options", ".", "showMessa...
Summons the available clouds with the default one if present.
[ "Summons", "the", "available", "clouds", "with", "the", "default", "one", "if", "present", "." ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.cf/web/cfui/plugins/wizards/common/wizardUtils.js#L176-L199
train
eclipse/orion.client
bundles/org.eclipse.orion.client.ui/web/orion/treeModelIterator.js
function(from, to) { var currentCursor = this.cursor(); var selection = this._scan(true, from, to); if(!selection){ selection = this._scan(false, from, to); } this.setCursor(currentCursor); return selection; }
javascript
function(from, to) { var currentCursor = this.cursor(); var selection = this._scan(true, from, to); if(!selection){ selection = this._scan(false, from, to); } this.setCursor(currentCursor); return selection; }
[ "function", "(", "from", ",", "to", ")", "{", "var", "currentCursor", "=", "this", ".", "cursor", "(", ")", ";", "var", "selection", "=", "this", ".", "_scan", "(", "true", ",", "from", ",", "to", ")", ";", "if", "(", "!", "selection", ")", "{", ...
Iterate from the current cursor @param {object} from the model object that the selection range starts from. Will be included in the return array. @param {object} to the model object that the selection range ends at. Will be included in the return array. @returns {Array} The selection of models in the array.
[ "Iterate", "from", "the", "current", "cursor" ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.ui/web/orion/treeModelIterator.js#L225-L233
train
eclipse/orion.client
bundles/org.eclipse.orion.client.ui/web/orion/treeModelIterator.js
function(forward, roundTrip) { var topSibling = this._findSibling(this._getTopLevelParent(this.cursor()), forward); if(topSibling){ this.setCursor(topSibling); } else if(roundTrip && this.firstLevelChildren.length > 0) { this.setCursor(forward ? this.firstLevelChildren[0] : this.firstLevelChildren[this...
javascript
function(forward, roundTrip) { var topSibling = this._findSibling(this._getTopLevelParent(this.cursor()), forward); if(topSibling){ this.setCursor(topSibling); } else if(roundTrip && this.firstLevelChildren.length > 0) { this.setCursor(forward ? this.firstLevelChildren[0] : this.firstLevelChildren[this...
[ "function", "(", "forward", ",", "roundTrip", ")", "{", "var", "topSibling", "=", "this", ".", "_findSibling", "(", "this", ".", "_getTopLevelParent", "(", "this", ".", "cursor", "(", ")", ")", ",", "forward", ")", ";", "if", "(", "topSibling", ")", "{...
Iterate from the current cursor only on the top level children @param {boolean} forward the iteration direction. If true then iterate to next, otherwise previous. @param {boolean} roundTrip the round trip flag. If true then iterate to the beginning at bottom or end at beginning.
[ "Iterate", "from", "the", "current", "cursor", "only", "on", "the", "top", "level", "children" ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.ui/web/orion/treeModelIterator.js#L251-L258
train
eclipse/orion.client
bundles/org.eclipse.orion.client.ui/web/orion/treeModelIterator.js
function(collapsedModel) { if(!this._cursor){ return null; } if(this._inParentChain(this._cursor, collapsedModel)){ this.setCursor(collapsedModel); return this._cursor; } return null; }
javascript
function(collapsedModel) { if(!this._cursor){ return null; } if(this._inParentChain(this._cursor, collapsedModel)){ this.setCursor(collapsedModel); return this._cursor; } return null; }
[ "function", "(", "collapsedModel", ")", "{", "if", "(", "!", "this", ".", "_cursor", ")", "{", "return", "null", ";", "}", "if", "(", "this", ".", "_inParentChain", "(", "this", ".", "_cursor", ",", "collapsedModel", ")", ")", "{", "this", ".", "setC...
When the parent model containing the cursor is collapsed, the cursor has to be surfaced to the parent
[ "When", "the", "parent", "model", "containing", "the", "cursor", "is", "collapsed", "the", "cursor", "has", "to", "be", "surfaced", "to", "the", "parent" ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.ui/web/orion/treeModelIterator.js#L263-L272
train
eclipse/orion.client
bundles/org.eclipse.orion.client.ui/web/orion/treeModelIterator.js
function(){ this._cursor = null; this._prevCursor = null; this.root = null; //By default the cursor is pointed to the first child if(this.firstLevelChildren.length > 0){ this._cursor = this.firstLevelChildren[0]; this.root = this.firstLevelChildren[0].parent; } }
javascript
function(){ this._cursor = null; this._prevCursor = null; this.root = null; //By default the cursor is pointed to the first child if(this.firstLevelChildren.length > 0){ this._cursor = this.firstLevelChildren[0]; this.root = this.firstLevelChildren[0].parent; } }
[ "function", "(", ")", "{", "this", ".", "_cursor", "=", "null", ";", "this", ".", "_prevCursor", "=", "null", ";", "this", ".", "root", "=", "null", ";", "//By default the cursor is pointed to the first child ", "if", "(", "this", ".", "firstLevelChildren", "....
Reset cursor and previous cursor
[ "Reset", "cursor", "and", "previous", "cursor" ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.ui/web/orion/treeModelIterator.js#L277-L286
train
eclipse/orion.client
bundles/org.eclipse.orion.client.ui/web/orion/uiUtils.js
openInNewWindow
function openInNewWindow(event) { var isMac = window.navigator.platform.indexOf("Mac") !== -1; //$NON-NLS-0$ return (isMac && event.metaKey) || (!isMac && event.ctrlKey); }
javascript
function openInNewWindow(event) { var isMac = window.navigator.platform.indexOf("Mac") !== -1; //$NON-NLS-0$ return (isMac && event.metaKey) || (!isMac && event.ctrlKey); }
[ "function", "openInNewWindow", "(", "event", ")", "{", "var", "isMac", "=", "window", ".", "navigator", ".", "platform", ".", "indexOf", "(", "\"Mac\"", ")", "!==", "-", "1", ";", "//$NON-NLS-0$", "return", "(", "isMac", "&&", "event", ".", "metaKey", ")...
Returns whether the given event should cause a reference to open in a new window or not. @param {Object} event The key event @name orion.util#openInNewWindow @function
[ "Returns", "whether", "the", "given", "event", "should", "cause", "a", "reference", "to", "open", "in", "a", "new", "window", "or", "not", "." ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.ui/web/orion/uiUtils.js#L263-L266
train
eclipse/orion.client
bundles/org.eclipse.orion.client.ui/web/orion/uiUtils.js
followLink
function followLink(href, event) { if (event && openInNewWindow(event)) { window.open(urlModifier(href)); } else { window.location = urlModifier(href); } }
javascript
function followLink(href, event) { if (event && openInNewWindow(event)) { window.open(urlModifier(href)); } else { window.location = urlModifier(href); } }
[ "function", "followLink", "(", "href", ",", "event", ")", "{", "if", "(", "event", "&&", "openInNewWindow", "(", "event", ")", ")", "{", "window", ".", "open", "(", "urlModifier", "(", "href", ")", ")", ";", "}", "else", "{", "window", ".", "location...
Opens a link in response to some event. Whether the link is opened in the same window or a new window depends on the event @param {String} href The link location @name orion.util#followLink @function
[ "Opens", "a", "link", "in", "response", "to", "some", "event", ".", "Whether", "the", "link", "is", "opened", "in", "the", "same", "window", "or", "a", "new", "window", "depends", "on", "the", "event" ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.ui/web/orion/uiUtils.js#L275-L281
train
eclipse/orion.client
bundles/org.eclipse.orion.client.ui/web/orion/uiUtils.js
path2FolderName
function path2FolderName(filePath, keepTailSlash){ var pathSegs = filePath.split("/"); pathSegs.splice(pathSegs.length -1, 1); return keepTailSlash ? pathSegs.join("/") + "/" : pathSegs.join("/"); }
javascript
function path2FolderName(filePath, keepTailSlash){ var pathSegs = filePath.split("/"); pathSegs.splice(pathSegs.length -1, 1); return keepTailSlash ? pathSegs.join("/") + "/" : pathSegs.join("/"); }
[ "function", "path2FolderName", "(", "filePath", ",", "keepTailSlash", ")", "{", "var", "pathSegs", "=", "filePath", ".", "split", "(", "\"/\"", ")", ";", "pathSegs", ".", "splice", "(", "pathSegs", ".", "length", "-", "1", ",", "1", ")", ";", "return", ...
Returns the folder name from path. @param {String} filePath @param {Boolean} keepTailSlash @returns {String}
[ "Returns", "the", "folder", "name", "from", "path", "." ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.ui/web/orion/uiUtils.js#L334-L338
train
eclipse/orion.client
bundles/org.eclipse.orion.client.ui/web/orion/uiUtils.js
timeElapsed
function timeElapsed(timeStamp) { var diff = _timeDifference(timeStamp); var yearStr = _generateTimeString(diff.year, "a year", "years"); var monthStr = _generateTimeString(diff.month, "a month", "months"); var dayStr = _generateTimeString(diff.day, "a day", "days"); var hourStr = _generateTimeString(diff.hou...
javascript
function timeElapsed(timeStamp) { var diff = _timeDifference(timeStamp); var yearStr = _generateTimeString(diff.year, "a year", "years"); var monthStr = _generateTimeString(diff.month, "a month", "months"); var dayStr = _generateTimeString(diff.day, "a day", "days"); var hourStr = _generateTimeString(diff.hou...
[ "function", "timeElapsed", "(", "timeStamp", ")", "{", "var", "diff", "=", "_timeDifference", "(", "timeStamp", ")", ";", "var", "yearStr", "=", "_generateTimeString", "(", "diff", ".", "year", ",", "\"a year\"", ",", "\"years\"", ")", ";", "var", "monthStr"...
Returns the time duration passed by now. E.g. "2 minutes", "an hour", "a day", "3 months", "2 years" @param {String} timeStamp @returns {String} If the duration is less than 1 minute, it returns empty string "". Otherwise it returns a duration value.
[ "Returns", "the", "time", "duration", "passed", "by", "now", ".", "E", ".", "g", ".", "2", "minutes", "an", "hour", "a", "day", "3", "months", "2", "years" ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.ui/web/orion/uiUtils.js#L372-L392
train
eclipse/orion.client
bundles/org.eclipse.orion.client.ui/web/orion/uiUtils.js
displayableTimeElapsed
function displayableTimeElapsed(timeStamp) { var duration = timeElapsed(timeStamp); if(duration) { return i18nUtil.formatMessage(messages["timeAgo"], duration); } return messages["justNow"]; }
javascript
function displayableTimeElapsed(timeStamp) { var duration = timeElapsed(timeStamp); if(duration) { return i18nUtil.formatMessage(messages["timeAgo"], duration); } return messages["justNow"]; }
[ "function", "displayableTimeElapsed", "(", "timeStamp", ")", "{", "var", "duration", "=", "timeElapsed", "(", "timeStamp", ")", ";", "if", "(", "duration", ")", "{", "return", "i18nUtil", ".", "formatMessage", "(", "messages", "[", "\"timeAgo\"", "]", ",", "...
Returns the displayable time duration passed by now. E.g. "just now", "2 minutes ago", "an hour ago", "a day ago", "3 months ago", "2 years ago" @param {String} timeStamp @returns {String} If the duration is less than 1 minute, it returns empty string "just now". Otherwise it returns a duration value.
[ "Returns", "the", "displayable", "time", "duration", "passed", "by", "now", ".", "E", ".", "g", ".", "just", "now", "2", "minutes", "ago", "an", "hour", "ago", "a", "day", "ago", "3", "months", "ago", "2", "years", "ago" ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.ui/web/orion/uiUtils.js#L398-L404
train
eclipse/orion.client
bundles/org.eclipse.orion.client.javascript/web/javascript/plugins/javascriptPlugin.js
WrappedWorker
function WrappedWorker(script, onMessage, onError) { var wUrl = new URL(script, window.location.href); wUrl = new URL(urlModifier(wUrl.href)); wUrl.query.set("worker-language", ((navigator.languages && navigator.languages[0]) || navigator.language || navigator.userLanguage || 'root').toLowerCase()); //$NON-NL...
javascript
function WrappedWorker(script, onMessage, onError) { var wUrl = new URL(script, window.location.href); wUrl = new URL(urlModifier(wUrl.href)); wUrl.query.set("worker-language", ((navigator.languages && navigator.languages[0]) || navigator.language || navigator.userLanguage || 'root').toLowerCase()); //$NON-NL...
[ "function", "WrappedWorker", "(", "script", ",", "onMessage", ",", "onError", ")", "{", "var", "wUrl", "=", "new", "URL", "(", "script", ",", "window", ".", "location", ".", "href", ")", ";", "wUrl", "=", "new", "URL", "(", "urlModifier", "(", "wUrl", ...
for add and removes only @description Make a new worker
[ "for", "add", "and", "removes", "only" ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.javascript/web/javascript/plugins/javascriptPlugin.js#L142-L155
train
eclipse/orion.client
bundles/org.eclipse.orion.client.ui/web/orion/settings/ui/PluginSettings.js
function(options) { PropertyWidget.apply(this, arguments); SettingsTextfield.apply(this, arguments); if (this.node && options.indent) { var spans = this.node.getElementsByTagName('span'); if (spans) { var span = spans[0]; var existingClassName = span.className; if (existingClassName) { span...
javascript
function(options) { PropertyWidget.apply(this, arguments); SettingsTextfield.apply(this, arguments); if (this.node && options.indent) { var spans = this.node.getElementsByTagName('span'); if (spans) { var span = spans[0]; var existingClassName = span.className; if (existingClassName) { span...
[ "function", "(", "options", ")", "{", "PropertyWidget", ".", "apply", "(", "this", ",", "arguments", ")", ";", "SettingsTextfield", ".", "apply", "(", "this", ",", "arguments", ")", ";", "if", "(", "this", ".", "node", "&&", "options", ".", "indent", "...
Widget displaying a string-typed plugin setting. Mixes in SettingsTextfield and PropertyWidget. @callback
[ "Widget", "displaying", "a", "string", "-", "typed", "plugin", "setting", ".", "Mixes", "in", "SettingsTextfield", "and", "PropertyWidget", "." ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.ui/web/orion/settings/ui/PluginSettings.js#L81-L96
train
eclipse/orion.client
bundles/org.eclipse.orion.client.ui/web/orion/settings/ui/PluginSettings.js
ConfigController
function ConfigController(preferences, configAdmin, pid) { this.preferences = preferences; this.configAdmin = configAdmin; this.pid = pid; this.config = this.defaultConfig = this.configPromise = null; }
javascript
function ConfigController(preferences, configAdmin, pid) { this.preferences = preferences; this.configAdmin = configAdmin; this.pid = pid; this.config = this.defaultConfig = this.configPromise = null; }
[ "function", "ConfigController", "(", "preferences", ",", "configAdmin", ",", "pid", ")", "{", "this", ".", "preferences", "=", "preferences", ";", "this", ".", "configAdmin", "=", "configAdmin", ";", "this", ".", "pid", "=", "pid", ";", "this", ".", "confi...
Controller for modifying a configuration
[ "Controller", "for", "modifying", "a", "configuration" ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.ui/web/orion/settings/ui/PluginSettings.js#L282-L287
train
eclipse/orion.client
bundles/org.eclipse.orion.client.ui/web/orion/settings/ui/PluginSettings.js
function() { var configuration = this.config; if (!configuration) { var pid = this.pid, self = this; this.configPromise = this.configPromise || Deferred.all([ this.configAdmin.getDefaultConfiguration(pid), this.configAdmin.getConfiguration(pid) ]).then(function(result) { self.d...
javascript
function() { var configuration = this.config; if (!configuration) { var pid = this.pid, self = this; this.configPromise = this.configPromise || Deferred.all([ this.configAdmin.getDefaultConfiguration(pid), this.configAdmin.getConfiguration(pid) ]).then(function(result) { self.d...
[ "function", "(", ")", "{", "var", "configuration", "=", "this", ".", "config", ";", "if", "(", "!", "configuration", ")", "{", "var", "pid", "=", "this", ".", "pid", ",", "self", "=", "this", ";", "this", ".", "configPromise", "=", "this", ".", "co...
Creates a new configuration if necessary
[ "Creates", "a", "new", "configuration", "if", "necessary" ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.ui/web/orion/settings/ui/PluginSettings.js#L290-L306
train
eclipse/orion.client
bundles/org.eclipse.orion.client.ui/web/orion/settings/ui/PluginSettings.js
function() { return this.initConfiguration().then(function(configuration) { var defaultProps = this.getDefaultProps(); if (!defaultProps) { return this.remove(); } configuration.update(defaultProps); }.bind(this)); }
javascript
function() { return this.initConfiguration().then(function(configuration) { var defaultProps = this.getDefaultProps(); if (!defaultProps) { return this.remove(); } configuration.update(defaultProps); }.bind(this)); }
[ "function", "(", ")", "{", "return", "this", ".", "initConfiguration", "(", ")", ".", "then", "(", "function", "(", "configuration", ")", "{", "var", "defaultProps", "=", "this", ".", "getDefaultProps", "(", ")", ";", "if", "(", "!", "defaultProps", ")",...
Reset the configuration back to the effective defaults, whatever they are
[ "Reset", "the", "configuration", "back", "to", "the", "effective", "defaults", "whatever", "they", "are" ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.ui/web/orion/settings/ui/PluginSettings.js#L329-L337
train
eclipse/orion.client
bundles/org.eclipse.orion.client.ui/web/orion/settings/ui/PluginSettings.js
function() { return this.initConfiguration().then(function(configuration) { configuration.remove(); this.config = null; this.configPromise = null; }.bind(this)); }
javascript
function() { return this.initConfiguration().then(function(configuration) { configuration.remove(); this.config = null; this.configPromise = null; }.bind(this)); }
[ "function", "(", ")", "{", "return", "this", ".", "initConfiguration", "(", ")", ".", "then", "(", "function", "(", "configuration", ")", "{", "configuration", ".", "remove", "(", ")", ";", "this", ".", "config", "=", "null", ";", "this", ".", "configP...
Remove the configuration
[ "Remove", "the", "configuration" ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.ui/web/orion/settings/ui/PluginSettings.js#L339-L345
train
eclipse/orion.client
bundles/org.eclipse.orion.client.ui/web/orion/settings/ui/PluginSettings.js
SettingsRenderer
function SettingsRenderer(settingsListExplorer, serviceRegistry) { this.serviceRegistry = serviceRegistry; this.childWidgets = []; SelectionRenderer.call(this, {cachePrefix: 'pluginSettings', noRowHighlighting: true}, settingsListExplorer); //$NON-NLS-0$ }
javascript
function SettingsRenderer(settingsListExplorer, serviceRegistry) { this.serviceRegistry = serviceRegistry; this.childWidgets = []; SelectionRenderer.call(this, {cachePrefix: 'pluginSettings', noRowHighlighting: true}, settingsListExplorer); //$NON-NLS-0$ }
[ "function", "SettingsRenderer", "(", "settingsListExplorer", ",", "serviceRegistry", ")", "{", "this", ".", "serviceRegistry", "=", "serviceRegistry", ";", "this", ".", "childWidgets", "=", "[", "]", ";", "SelectionRenderer", ".", "call", "(", "this", ",", "{", ...
Renderer for SettingsList.
[ "Renderer", "for", "SettingsList", "." ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.ui/web/orion/settings/ui/PluginSettings.js#L351-L355
train
eclipse/orion.client
bundles/org.eclipse.orion.client.ui/web/orion/settings/ui/PluginSettings.js
SettingsListExplorer
function SettingsListExplorer(serviceRegistry, categoryTitle) { Explorer.call(this, serviceRegistry, undefined, new SettingsRenderer(this, serviceRegistry)); this.categoryTitle = categoryTitle; }
javascript
function SettingsListExplorer(serviceRegistry, categoryTitle) { Explorer.call(this, serviceRegistry, undefined, new SettingsRenderer(this, serviceRegistry)); this.categoryTitle = categoryTitle; }
[ "function", "SettingsListExplorer", "(", "serviceRegistry", ",", "categoryTitle", ")", "{", "Explorer", ".", "call", "(", "this", ",", "serviceRegistry", ",", "undefined", ",", "new", "SettingsRenderer", "(", "this", ",", "serviceRegistry", ")", ")", ";", "this"...
Explorer for SettingsList.
[ "Explorer", "for", "SettingsList", "." ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.ui/web/orion/settings/ui/PluginSettings.js#L400-L403
train
eclipse/orion.client
bundles/org.eclipse.orion.client.ui/web/orion/settings/ui/PluginSettings.js
SettingsList
function SettingsList(options) { this.serviceRegistry = options.serviceRegistry; this.prefService = this.serviceRegistry.getService('orion.core.preference'); //$NON-NLS-1$ var commandRegistry = this.commandRegistry = options.commandRegistry; this.settings = options.settings; this.title = options.title; this...
javascript
function SettingsList(options) { this.serviceRegistry = options.serviceRegistry; this.prefService = this.serviceRegistry.getService('orion.core.preference'); //$NON-NLS-1$ var commandRegistry = this.commandRegistry = options.commandRegistry; this.settings = options.settings; this.title = options.title; this...
[ "function", "SettingsList", "(", "options", ")", "{", "this", ".", "serviceRegistry", "=", "options", ".", "serviceRegistry", ";", "this", ".", "prefService", "=", "this", ".", "serviceRegistry", ".", "getService", "(", "'orion.core.preference'", ")", ";", "//$N...
Widget showing list of Plugin Settings. Requires the 'orion.cm.configadmin' service. @param {DomNode|String} options.parent @param {orion.serviceregistry.ServiceRegistry} options.serviceRegistry @param {orion.settings.Settings[]} options.settings
[ "Widget", "showing", "list", "of", "Plugin", "Settings", ".", "Requires", "the", "orion", ".", "cm", ".", "configadmin", "service", "." ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.ui/web/orion/settings/ui/PluginSettings.js#L418-L455
train
eclipse/orion.client
bundles/org.eclipse.orion.client.ui/web/plugins/filePlugin/HTML5LocalFileImpl.js
function(parentLocation, folderName) { var that = this; return this._getEntry(parentLocation).then(function(dirEntry) { var d = new orion.Deferred(); dirEntry.getDirectory(folderName, {create:true}, function() {d.resolve(that.read(parentLocation + "/" + folderName, true));}, d.reject); return d; ...
javascript
function(parentLocation, folderName) { var that = this; return this._getEntry(parentLocation).then(function(dirEntry) { var d = new orion.Deferred(); dirEntry.getDirectory(folderName, {create:true}, function() {d.resolve(that.read(parentLocation + "/" + folderName, true));}, d.reject); return d; ...
[ "function", "(", "parentLocation", ",", "folderName", ")", "{", "var", "that", "=", "this", ";", "return", "this", ".", "_getEntry", "(", "parentLocation", ")", ".", "then", "(", "function", "(", "dirEntry", ")", "{", "var", "d", "=", "new", "orion", "...
Creates a folder. @param {String} parentLocation The location of the parent folder @param {String} folderName The name of the folder to create @return {Object} JSON representation of the created folder
[ "Creates", "a", "folder", "." ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.ui/web/plugins/filePlugin/HTML5LocalFileImpl.js#L203-L210
train
eclipse/orion.client
bundles/org.eclipse.orion.client.ui/web/plugins/filePlugin/HTML5LocalFileImpl.js
function(sourceLocation, targetLocation, name) { var that = this; if (sourceLocation.indexOf(this._rootLocation) === -1 || targetLocation.indexOf(this._rootLocation) === -1) { throw "Not supported"; } return this._getEntry(sourceLocation).then(function(entry) { return that._getEntry(targ...
javascript
function(sourceLocation, targetLocation, name) { var that = this; if (sourceLocation.indexOf(this._rootLocation) === -1 || targetLocation.indexOf(this._rootLocation) === -1) { throw "Not supported"; } return this._getEntry(sourceLocation).then(function(entry) { return that._getEntry(targ...
[ "function", "(", "sourceLocation", ",", "targetLocation", ",", "name", ")", "{", "var", "that", "=", "this", ";", "if", "(", "sourceLocation", ".", "indexOf", "(", "this", ".", "_rootLocation", ")", "===", "-", "1", "||", "targetLocation", ".", "indexOf", ...
Copies a file or directory. @param {String} sourceLocation The location of the file or directory to copy. @param {String} targetLocation The location of the target folder. @param {String} [name] The name of the destination file or directory in the case of a rename
[ "Copies", "a", "file", "or", "directory", "." ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.ui/web/plugins/filePlugin/HTML5LocalFileImpl.js#L266-L279
train
eclipse/orion.client
bundles/org.eclipse.orion.client.editor/web/orion/editor/projectionTextModel.js
function() { if (this._model) { this._model.removeEventListener("postChanged", this._listener.onChanged); //$NON-NLS-0$ this._model.removeEventListener("preChanging", this._listener.onChanging); //$NON-NLS-0$ this._model = null; } }
javascript
function() { if (this._model) { this._model.removeEventListener("postChanged", this._listener.onChanged); //$NON-NLS-0$ this._model.removeEventListener("preChanging", this._listener.onChanging); //$NON-NLS-0$ this._model = null; } }
[ "function", "(", ")", "{", "if", "(", "this", ".", "_model", ")", "{", "this", ".", "_model", ".", "removeEventListener", "(", "\"postChanged\"", ",", "this", ".", "_listener", ".", "onChanged", ")", ";", "//$NON-NLS-0$", "this", ".", "_model", ".", "rem...
Destroys this projection text model.
[ "Destroys", "this", "projection", "text", "model", "." ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.editor/web/orion/editor/projectionTextModel.js#L75-L81
train
eclipse/orion.client
bundles/org.eclipse.orion.client.editor/web/orion/editor/projectionTextModel.js
function(offset, baseOffset) { var projections = this._projections, delta = 0, i, projection; if (baseOffset) { for (i = 0; i < projections.length; i++) { projection = projections[i]; if (projection.start > offset) { break; } if (projection.end > offset) { return -1; } delta += projection....
javascript
function(offset, baseOffset) { var projections = this._projections, delta = 0, i, projection; if (baseOffset) { for (i = 0; i < projections.length; i++) { projection = projections[i]; if (projection.start > offset) { break; } if (projection.end > offset) { return -1; } delta += projection....
[ "function", "(", "offset", ",", "baseOffset", ")", "{", "var", "projections", "=", "this", ".", "_projections", ",", "delta", "=", "0", ",", "i", ",", "projection", ";", "if", "(", "baseOffset", ")", "{", "for", "(", "i", "=", "0", ";", "i", "<", ...
Maps offsets between the projection model and its base model. @param {Number} offset The offset to be mapped. @param {Boolean} [baseOffset=false] <code>true</code> if <code>offset</code> is in base model and should be mapped to the projection model. @return {Number} The mapped offset
[ "Maps", "offsets", "between", "the", "projection", "model", "and", "its", "base", "model", "." ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.editor/web/orion/editor/projectionTextModel.js#L160-L181
train
eclipse/orion.client
bundles/org.eclipse.orion.client.editor/web/orion/editor/linkedMode.js
function(escapePosition) { if (!this.isActive()) { return; } if (this._compoundChange) { this.endUndo(); this._compoundChange = null; } this._sortedPositions = null; var model = this.linkedModeModel; this.linkedModeModel = model.previousModel; model.parentGroup = model.pre...
javascript
function(escapePosition) { if (!this.isActive()) { return; } if (this._compoundChange) { this.endUndo(); this._compoundChange = null; } this._sortedPositions = null; var model = this.linkedModeModel; this.linkedModeModel = model.previousModel; model.parentGroup = model.pre...
[ "function", "(", "escapePosition", ")", "{", "if", "(", "!", "this", ".", "isActive", "(", ")", ")", "{", "return", ";", "}", "if", "(", "this", ".", "_compoundChange", ")", "{", "this", ".", "endUndo", "(", ")", ";", "this", ".", "_compoundChange", ...
Exits Linked Mode. Optionally places the caret at linkedMode escapePosition. @param {Boolean} [escapePosition=false] if true, place the caret at the escape position.
[ "Exits", "Linked", "Mode", ".", "Optionally", "places", "the", "caret", "at", "linkedMode", "escapePosition", "." ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.editor/web/orion/editor/linkedMode.js#L336-L366
train
eclipse/orion.client
bundles/org.eclipse.orion.client.ui/web/plugins/filePlugin/fileImpl.js
function(_name, id) { //return the deferred so client can chain on post-processing var data = {}; data.Id = id; return _xhr("POST", this.workspaceBase, { headers: { "Orion-Version": "1", "Content-Type": "application/json;charset=UTF-8", "Slug": form.encodeSlug(_name) }, data: JSON...
javascript
function(_name, id) { //return the deferred so client can chain on post-processing var data = {}; data.Id = id; return _xhr("POST", this.workspaceBase, { headers: { "Orion-Version": "1", "Content-Type": "application/json;charset=UTF-8", "Slug": form.encodeSlug(_name) }, data: JSON...
[ "function", "(", "_name", ",", "id", ")", "{", "//return the deferred so client can chain on post-processing", "var", "data", "=", "{", "}", ";", "data", ".", "Id", "=", "id", ";", "return", "_xhr", "(", "\"POST\"", ",", "this", ".", "workspaceBase", ",", "{...
Creates a new workspace with the given name. The resulting workspace is passed as a parameter to the provided onCreate function. @param {String} _name The name of the new workspace
[ "Creates", "a", "new", "workspace", "with", "the", "given", "name", ".", "The", "resulting", "workspace", "is", "passed", "as", "a", "parameter", "to", "the", "provided", "onCreate", "function", "." ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.ui/web/plugins/filePlugin/fileImpl.js#L237-L253
train
eclipse/orion.client
bundles/org.eclipse.orion.client.ui/web/plugins/filePlugin/fileImpl.js
function() { return _xhr("GET", this.workspaceBase, { headers: { "Orion-Version": "1" }, timeout: 15000 }).then(function(result) { var jsonData = result.response ? JSON.parse(result.response) : {}; return jsonData.Workspaces; }).then(function(result) { if (this.makeAbsolute) { ...
javascript
function() { return _xhr("GET", this.workspaceBase, { headers: { "Orion-Version": "1" }, timeout: 15000 }).then(function(result) { var jsonData = result.response ? JSON.parse(result.response) : {}; return jsonData.Workspaces; }).then(function(result) { if (this.makeAbsolute) { ...
[ "function", "(", ")", "{", "return", "_xhr", "(", "\"GET\"", ",", "this", ".", "workspaceBase", ",", "{", "headers", ":", "{", "\"Orion-Version\"", ":", "\"1\"", "}", ",", "timeout", ":", "15000", "}", ")", ".", "then", "(", "function", "(", "result", ...
Loads all the user's workspaces. Returns a deferred that will provide the loaded workspaces when ready.
[ "Loads", "all", "the", "user", "s", "workspaces", ".", "Returns", "a", "deferred", "that", "will", "provide", "the", "loaded", "workspaces", "when", "ready", "." ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.ui/web/plugins/filePlugin/fileImpl.js#L259-L274
train
eclipse/orion.client
bundles/org.eclipse.orion.client.ui/web/plugins/filePlugin/fileImpl.js
function(loc) { if (loc === this.fileBase) { loc = null; } return _xhr("GET", loc ? loc : this.workspaceBase, { headers: { "Orion-Version": "1" }, timeout: 15000, log: false }).then(function(result) { var jsonData = result.response ? JSON.parse(result.response) : {}; //in mo...
javascript
function(loc) { if (loc === this.fileBase) { loc = null; } return _xhr("GET", loc ? loc : this.workspaceBase, { headers: { "Orion-Version": "1" }, timeout: 15000, log: false }).then(function(result) { var jsonData = result.response ? JSON.parse(result.response) : {}; //in mo...
[ "function", "(", "loc", ")", "{", "if", "(", "loc", "===", "this", ".", "fileBase", ")", "{", "loc", "=", "null", ";", "}", "return", "_xhr", "(", "\"GET\"", ",", "loc", "?", "loc", ":", "this", ".", "workspaceBase", ",", "{", "headers", ":", "{"...
Loads the workspace with the given id and sets it to be the current workspace for the IDE. The workspace is created if none already exists. @param {String} loc the location of the workspace to load @param {Function} onLoad the function to invoke when the workspace is loaded
[ "Loads", "the", "workspace", "with", "the", "given", "id", "and", "sets", "it", "to", "be", "the", "current", "workspace", "for", "the", "IDE", ".", "The", "workspace", "is", "created", "if", "none", "already", "exists", "." ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.ui/web/plugins/filePlugin/fileImpl.js#L282-L311
train
eclipse/orion.client
bundles/org.eclipse.orion.client.ui/web/plugins/filePlugin/fileImpl.js
function(sourceLocation, options) { var headerData = { "Orion-Version": "1" }; if (options.OptionHeader) { headerData["X-Xfer-Options"] = options.OptionHeader; delete options.OptionHeader; } return sftpOperation("POST", sourceLocation, { headers: headerData, data: JSON.stringify(optio...
javascript
function(sourceLocation, options) { var headerData = { "Orion-Version": "1" }; if (options.OptionHeader) { headerData["X-Xfer-Options"] = options.OptionHeader; delete options.OptionHeader; } return sftpOperation("POST", sourceLocation, { headers: headerData, data: JSON.stringify(optio...
[ "function", "(", "sourceLocation", ",", "options", ")", "{", "var", "headerData", "=", "{", "\"Orion-Version\"", ":", "\"1\"", "}", ";", "if", "(", "options", ".", "OptionHeader", ")", "{", "headerData", "[", "\"X-Xfer-Options\"", "]", "=", "options", ".", ...
Exports file and directory contents to another server @param {String} sourceLocation The location of the folder to export from @param {Object} options An object specifying the export parameters @return A deferred for chaining events after the export completes
[ "Exports", "file", "and", "directory", "contents", "to", "another", "server" ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.ui/web/plugins/filePlugin/fileImpl.js#L704-L722
train
eclipse/orion.client
bundles/org.eclipse.orion.client.ui/web/plugins/filePlugin/fileImpl.js
function(sourceLocation, findStr, option) { var url = new URL(sourceLocation, self.location); url.query.set("findStr", findStr); return _xhr("GET", url.href, { timeout: 120000, headers: { "Orion-Version": "1" }, log: false }).then(function(result) { return result.response ? JSON.par...
javascript
function(sourceLocation, findStr, option) { var url = new URL(sourceLocation, self.location); url.query.set("findStr", findStr); return _xhr("GET", url.href, { timeout: 120000, headers: { "Orion-Version": "1" }, log: false }).then(function(result) { return result.response ? JSON.par...
[ "function", "(", "sourceLocation", ",", "findStr", ",", "option", ")", "{", "var", "url", "=", "new", "URL", "(", "sourceLocation", ",", "self", ".", "location", ")", ";", "url", ".", "query", ".", "set", "(", "\"findStr\"", ",", "findStr", ")", ";", ...
Find a string inside a file @param {String} sourceLocation The location of the folder to export from @param {String} findStr The string to search @public @return {Deferred} A deferred for chaining events after the export completes
[ "Find", "a", "string", "inside", "a", "file" ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.ui/web/plugins/filePlugin/fileImpl.js#L731-L743
train
eclipse/orion.client
bundles/org.eclipse.orion.client.ui/web/plugins/filePlugin/fileImpl.js
function(searchParams) { var query = _generateLuceneQuery(searchParams); return _xhr("GET", this.fileBase + "/../filesearch" + query, { headers: { "Accept": "application/json", "Orion-Version": "1" } }).then(function(result) { return result.response ? JSON.parse(result.response) : {}; ...
javascript
function(searchParams) { var query = _generateLuceneQuery(searchParams); return _xhr("GET", this.fileBase + "/../filesearch" + query, { headers: { "Accept": "application/json", "Orion-Version": "1" } }).then(function(result) { return result.response ? JSON.parse(result.response) : {}; ...
[ "function", "(", "searchParams", ")", "{", "var", "query", "=", "_generateLuceneQuery", "(", "searchParams", ")", ";", "return", "_xhr", "(", "\"GET\"", ",", "this", ".", "fileBase", "+", "\"/../filesearch\"", "+", "query", ",", "{", "headers", ":", "{", "...
Performs a search with the given search parameters. @param {Object} searchParams The JSON object that describes all the search parameters. @param {String} searchParams.resource Required. The location where search is performed. Required. Normally a sub folder of the file system. Empty string means the root of the file s...
[ "Performs", "a", "search", "with", "the", "given", "search", "parameters", "." ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.ui/web/plugins/filePlugin/fileImpl.js#L759-L774
train
eclipse/orion.client
bundles/org.eclipse.orion.client.ui/web/orion/widgets/plugin/PluginList.js
PluginList
function PluginList(options, parentNode) { objects.mixin(this, options); this.node = parentNode || document.createElement("div"); //$NON-NLS-0$ }
javascript
function PluginList(options, parentNode) { objects.mixin(this, options); this.node = parentNode || document.createElement("div"); //$NON-NLS-0$ }
[ "function", "PluginList", "(", "options", ",", "parentNode", ")", "{", "objects", ".", "mixin", "(", "this", ",", "options", ")", ";", "this", ".", "node", "=", "parentNode", "||", "document", ".", "createElement", "(", "\"div\"", ")", ";", "//$NON-NLS-0$\...
PluginList UI interface element showing a list of plugins
[ "PluginList", "UI", "interface", "element", "showing", "a", "list", "of", "plugins" ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.ui/web/orion/widgets/plugin/PluginList.js#L60-L63
train
eclipse/orion.client
bundles/org.eclipse.orion.client.debug/web/orion/debug/debugSocket.js
function(serviceRegistry) { EventTarget.attach(this); this._id = ID_INCREMENT++; debugSockets[this._id] = this; this._debugService = serviceRegistry.getService('orion.debug.service'); this._messageService = serviceRegistry.getService('orion.page.message'); this._socket = null; ...
javascript
function(serviceRegistry) { EventTarget.attach(this); this._id = ID_INCREMENT++; debugSockets[this._id] = this; this._debugService = serviceRegistry.getService('orion.debug.service'); this._messageService = serviceRegistry.getService('orion.page.message'); this._socket = null; ...
[ "function", "(", "serviceRegistry", ")", "{", "EventTarget", ".", "attach", "(", "this", ")", ";", "this", ".", "_id", "=", "ID_INCREMENT", "++", ";", "debugSockets", "[", "this", ".", "_id", "]", "=", "this", ";", "this", ".", "_debugService", "=", "s...
A debug socket provides the interface between orion and orion debug server. @class {orion.debug.DebugSocket} @see https://github.com/Microsoft/vscode-debugadapter-node/blob/master/protocol/src/debugProtocol.ts @fires {StatusEvent} - Reports the debugger's status (idle, running or paused) @fires {DebugProtocol.Event} ...
[ "A", "debug", "socket", "provides", "the", "interface", "between", "orion", "and", "orion", "debug", "server", "." ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.debug/web/orion/debug/debugSocket.js#L48-L73
train
eclipse/orion.client
modules/orionode.collab.hub/client.js
generateColorByName
function generateColorByName(str) { var hue = 0; for (var i = 0; i < str.length; i++) { hue = (hue * PRIME + str.charCodeAt(i)) % MASK; } hue = Math.floor(hue * PRIME) % MASK / MASK; var rgb = hslToRgb(hue, SATURATION, LIGHTNESS); return ('#' + rgb[0].toString(16) + rgb[1].toString(16) +...
javascript
function generateColorByName(str) { var hue = 0; for (var i = 0; i < str.length; i++) { hue = (hue * PRIME + str.charCodeAt(i)) % MASK; } hue = Math.floor(hue * PRIME) % MASK / MASK; var rgb = hslToRgb(hue, SATURATION, LIGHTNESS); return ('#' + rgb[0].toString(16) + rgb[1].toString(16) +...
[ "function", "generateColorByName", "(", "str", ")", "{", "var", "hue", "=", "0", ";", "for", "(", "var", "i", "=", "0", ";", "i", "<", "str", ".", "length", ";", "i", "++", ")", "{", "hue", "=", "(", "hue", "*", "PRIME", "+", "str", ".", "cha...
Generate an RGB value from a string @param {string} str @return {string} - RGB value
[ "Generate", "an", "RGB", "value", "from", "a", "string" ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/modules/orionode.collab.hub/client.js#L61-L69
train
eclipse/orion.client
bundles/org.eclipse.orion.client.ui/web/gcli/gcli/commands/help.js
getManTemplateData
function getManTemplateData(command, context) { var manTemplateData = { l10n: l10n.propertyLookup, command: command, onclick: function(ev) { util.updateCommand(ev.currentTarget, context); }, ondblclick: function(ev) { util.executeCommand(ev.currentTarget, context); }, descri...
javascript
function getManTemplateData(command, context) { var manTemplateData = { l10n: l10n.propertyLookup, command: command, onclick: function(ev) { util.updateCommand(ev.currentTarget, context); }, ondblclick: function(ev) { util.executeCommand(ev.currentTarget, context); }, descri...
[ "function", "getManTemplateData", "(", "command", ",", "context", ")", "{", "var", "manTemplateData", "=", "{", "l10n", ":", "l10n", ".", "propertyLookup", ",", "command", ":", "command", ",", "onclick", ":", "function", "(", "ev", ")", "{", "util", ".", ...
Create a block of data suitable to be passed to the help_man.html template
[ "Create", "a", "block", "of", "data", "suitable", "to", "be", "passed", "to", "the", "help_man", ".", "html", "template" ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.ui/web/gcli/gcli/commands/help.js#L136-L183
train
eclipse/orion.client
bundles/org.eclipse.orion.client.editor/web/orion/editor/actions.js
TextActions
function TextActions(editor, undoStack, find) { this.editor = editor; this.undoStack = undoStack; this._incrementalFind = new mFind.IncrementalFind(editor); this._find = find ? find : new mFindUI.FindUI(editor, undoStack); this._lastEditLocation = null; this.init(); }
javascript
function TextActions(editor, undoStack, find) { this.editor = editor; this.undoStack = undoStack; this._incrementalFind = new mFind.IncrementalFind(editor); this._find = find ? find : new mFindUI.FindUI(editor, undoStack); this._lastEditLocation = null; this.init(); }
[ "function", "TextActions", "(", "editor", ",", "undoStack", ",", "find", ")", "{", "this", ".", "editor", "=", "editor", ";", "this", ".", "undoStack", "=", "undoStack", ";", "this", ".", "_incrementalFind", "=", "new", "mFind", ".", "IncrementalFind", "("...
TextActions connects common text editing keybindings onto an editor.
[ "TextActions", "connects", "common", "text", "editing", "keybindings", "onto", "an", "editor", "." ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.editor/web/orion/editor/actions.js#L48-L55
train
eclipse/orion.client
bundles/org.eclipse.orion.client.editor/web/orion/editor/actions.js
function(openBracket, closeBracket) { if (openBracket === "[" && !this.autoPairSquareBrackets) { //$NON-NLS-0$ return false; } else if (openBracket === "{" && !this.autoPairBraces) { //$NON-NLS-0$ return false; } else if (openBracket === "(" && !this.autoPairParentheses) { //$NON-NLS-0$ retur...
javascript
function(openBracket, closeBracket) { if (openBracket === "[" && !this.autoPairSquareBrackets) { //$NON-NLS-0$ return false; } else if (openBracket === "{" && !this.autoPairBraces) { //$NON-NLS-0$ return false; } else if (openBracket === "(" && !this.autoPairParentheses) { //$NON-NLS-0$ retur...
[ "function", "(", "openBracket", ",", "closeBracket", ")", "{", "if", "(", "openBracket", "===", "\"[\"", "&&", "!", "this", ".", "autoPairSquareBrackets", ")", "{", "//$NON-NLS-0$\r", "return", "false", ";", "}", "else", "if", "(", "openBracket", "===", "\"{...
Called on an opening bracket keypress. Automatically inserts the specified opening and closing brackets around the caret or selected text.
[ "Called", "on", "an", "opening", "bracket", "keypress", ".", "Automatically", "inserts", "the", "specified", "opening", "and", "closing", "brackets", "around", "the", "caret", "or", "selected", "text", "." ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.editor/web/orion/editor/actions.js#L893-L930
train
eclipse/orion.client
bundles/org.eclipse.orion.client.editor/web/orion/editor/actions.js
function(quotation) { if (!this.autoPairQuotation) { return false; } var editor = this.editor; var textView = editor.getTextView(); if (textView.getOptions("readonly")) { return false; } //$NON-NLS-0$ var isQuotation = new RegExp("^\"$|^'$"); //$NON-NLS-0$ var isAlpha = new RegExp("\\w"); //$NON...
javascript
function(quotation) { if (!this.autoPairQuotation) { return false; } var editor = this.editor; var textView = editor.getTextView(); if (textView.getOptions("readonly")) { return false; } //$NON-NLS-0$ var isQuotation = new RegExp("^\"$|^'$"); //$NON-NLS-0$ var isAlpha = new RegExp("\\w"); //$NON...
[ "function", "(", "quotation", ")", "{", "if", "(", "!", "this", ".", "autoPairQuotation", ")", "{", "return", "false", ";", "}", "var", "editor", "=", "this", ".", "editor", ";", "var", "textView", "=", "editor", ".", "getTextView", "(", ")", ";", "i...
Called on a quotation mark keypress. Automatically inserts a pair of the specified quotation around the caret the caret or selected text.
[ "Called", "on", "a", "quotation", "mark", "keypress", ".", "Automatically", "inserts", "a", "pair", "of", "the", "specified", "quotation", "around", "the", "caret", "the", "caret", "or", "selected", "text", "." ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.editor/web/orion/editor/actions.js#L935-L973
train
eclipse/orion.client
bundles/org.eclipse.orion.client.editor/web/orion/editor/actions.js
function(event) { /* * The event.proposal is an object with this shape: * { proposal: "[proposal string]", // Actual text of the proposal * description: "diplay string", // Optional * positions: [{ * offset: 10, // Offset of start position of parameter i * len...
javascript
function(event) { /* * The event.proposal is an object with this shape: * { proposal: "[proposal string]", // Actual text of the proposal * description: "diplay string", // Optional * positions: [{ * offset: 10, // Offset of start position of parameter i * len...
[ "function", "(", "event", ")", "{", "/*\r\n\t\t\t * The event.proposal is an object with this shape:\r\n\t\t\t * { proposal: \"[proposal string]\", // Actual text of the proposal\r\n\t\t\t * description: \"diplay string\", // Optional\r\n\t\t\t * positions: [{\r\n\t\t\t * offset: 10, // ...
Called when a content assist proposal has been applied. Inserts the proposal into the document. Activates Linked Mode if applicable for the selected proposal. @param {orion.editor.ContentAssist#ProposalAppliedEvent} event
[ "Called", "when", "a", "content", "assist", "proposal", "has", "been", "applied", ".", "Inserts", "the", "proposal", "into", "the", "document", ".", "Activates", "Linked", "Mode", "if", "applicable", "for", "the", "selected", "proposal", "." ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.editor/web/orion/editor/actions.js#L979-L1032
train
eclipse/orion.client
bundles/org.eclipse.orion.client.editor/web/orion/editor/actions.js
escapePosition
function escapePosition() { if (typeof proposal.escapePosition === "number") { //$NON-NLS-0$ return proposal.escapePosition; } return event.data.start + proposal.proposal.length; }
javascript
function escapePosition() { if (typeof proposal.escapePosition === "number") { //$NON-NLS-0$ return proposal.escapePosition; } return event.data.start + proposal.proposal.length; }
[ "function", "escapePosition", "(", ")", "{", "if", "(", "typeof", "proposal", ".", "escapePosition", "===", "\"number\"", ")", "{", "//$NON-NLS-0$\r", "return", "proposal", ".", "escapePosition", ";", "}", "return", "event", ".", "data", ".", "start", "+", "...
If escapePosition is not provided, positioned the cursor at the end of the inserted text
[ "If", "escapePosition", "is", "not", "provided", "positioned", "the", "cursor", "at", "the", "end", "of", "the", "inserted", "text" ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.editor/web/orion/editor/actions.js#L997-L1002
train
eclipse/orion.client
bundles/org.eclipse.orion.client.editor/web/orion/editor/actions.js
function() { var editor = this.editor; var textView = editor.getTextView(); if (textView.getOptions("readonly")) { return false; } //$NON-NLS-0$ var model = editor.getModel(); forEachSelection(this, false, function(selection, setText) { if (selection.start !== selection.end) { return; } ...
javascript
function() { var editor = this.editor; var textView = editor.getTextView(); if (textView.getOptions("readonly")) { return false; } //$NON-NLS-0$ var model = editor.getModel(); forEachSelection(this, false, function(selection, setText) { if (selection.start !== selection.end) { return; } ...
[ "function", "(", ")", "{", "var", "editor", "=", "this", ".", "editor", ";", "var", "textView", "=", "editor", ".", "getTextView", "(", ")", ";", "if", "(", "textView", ".", "getOptions", "(", "\"readonly\"", ")", ")", "{", "return", "false", ";", "}...
On backspace keypress, checks if there are a pair of brackets or quotation marks to be deleted
[ "On", "backspace", "keypress", "checks", "if", "there", "are", "a", "pair", "of", "brackets", "or", "quotation", "marks", "to", "be", "deleted" ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.editor/web/orion/editor/actions.js#L1034-L1055
train
eclipse/orion.client
bundles/org.eclipse.orion.client.git/web/orion/git/util.js
trimCommitMessage
function trimCommitMessage(message) { var splitted = message.split(/\r\n|\n/); var iterator = 0; while(splitted.length > 0 && /^\s*$/.test(splitted[iterator])) { iterator++; } var maxMessageLength = 100; if (splitted[iterator].length > maxMessageLength) return splitted[iterator].substring(0,maxMessage...
javascript
function trimCommitMessage(message) { var splitted = message.split(/\r\n|\n/); var iterator = 0; while(splitted.length > 0 && /^\s*$/.test(splitted[iterator])) { iterator++; } var maxMessageLength = 100; if (splitted[iterator].length > maxMessageLength) return splitted[iterator].substring(0,maxMessage...
[ "function", "trimCommitMessage", "(", "message", ")", "{", "var", "splitted", "=", "message", ".", "split", "(", "/", "\\r\\n|\\n", "/", ")", ";", "var", "iterator", "=", "0", ";", "while", "(", "splitted", ".", "length", ">", "0", "&&", "/", "^\\s*$",...
Trims messages, skips empty lines until non-empty one is found
[ "Trims", "messages", "skips", "empty", "lines", "until", "non", "-", "empty", "one", "is", "found" ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.git/web/orion/git/util.js#L100-L110
train
eclipse/orion.client
bundles/org.eclipse.orion.client.git/web/orion/git/util.js
getGerritFooter
function getGerritFooter(message) { var splitted = message.split(/\r\n|\n/); var footer = {}; var changeIdCount = 0, signedOffByPresent = false; for (var i = splitted.length-1; i >= 0; --i) { var changeId = "Change-Id: "; //$NON-NLS-0$ var signedOffBy = "Signed-off-by: "; //$NON-NLS-0$ if (split...
javascript
function getGerritFooter(message) { var splitted = message.split(/\r\n|\n/); var footer = {}; var changeIdCount = 0, signedOffByPresent = false; for (var i = splitted.length-1; i >= 0; --i) { var changeId = "Change-Id: "; //$NON-NLS-0$ var signedOffBy = "Signed-off-by: "; //$NON-NLS-0$ if (split...
[ "function", "getGerritFooter", "(", "message", ")", "{", "var", "splitted", "=", "message", ".", "split", "(", "/", "\\r\\n|\\n", "/", ")", ";", "var", "footer", "=", "{", "}", ";", "var", "changeIdCount", "=", "0", ",", "signedOffByPresent", "=", "false...
Returns Change-Id and Signed-off-by of a commit if present
[ "Returns", "Change", "-", "Id", "and", "Signed", "-", "off", "-", "by", "of", "a", "commit", "if", "present" ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.git/web/orion/git/util.js#L133-L155
train
eclipse/orion.client
bundles/org.eclipse.orion.client.cf/web/cfui/plugins/wizards/common/deploymentLogic.js
buildDeploymentTrigger
function buildDeploymentTrigger(options){ options = options || {}; return function(results){ var initialConfName = options.ConfName; var confName = results.ConfName; var disableUI = options.disableUI; var enableUI = options.enableUI; var showMessage = options.showMessage; var closeFrame = option...
javascript
function buildDeploymentTrigger(options){ options = options || {}; return function(results){ var initialConfName = options.ConfName; var confName = results.ConfName; var disableUI = options.disableUI; var enableUI = options.enableUI; var showMessage = options.showMessage; var closeFrame = option...
[ "function", "buildDeploymentTrigger", "(", "options", ")", "{", "options", "=", "options", "||", "{", "}", ";", "return", "function", "(", "results", ")", "{", "var", "initialConfName", "=", "options", ".", "ConfName", ";", "var", "confName", "=", "results",...
A utility trigger factory for Cloud Foundry deployment logic after the 'Deploy' button in a deployment wizard was clicked.
[ "A", "utility", "trigger", "factory", "for", "Cloud", "Foundry", "deployment", "logic", "after", "the", "Deploy", "button", "in", "a", "deployment", "wizard", "was", "clicked", "." ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.cf/web/cfui/plugins/wizards/common/deploymentLogic.js#L78-L133
train
eclipse/orion.client
bundles/org.eclipse.orion.client.cf/web/cfui/plugins/wizards/common/deploymentLogic.js
uniqueLaunchConfigName
function uniqueLaunchConfigName(fileService, contentLocation, baseName) { return readLaunchConfigsFolder(fileService, contentLocation).then(function(children) { var counter = 0; for(var i=0; i<children.length; i++){ var childName = children[i].Name.replace(/\.launch$/, ""); //$NON-NLS-0$ if (baseName ==...
javascript
function uniqueLaunchConfigName(fileService, contentLocation, baseName) { return readLaunchConfigsFolder(fileService, contentLocation).then(function(children) { var counter = 0; for(var i=0; i<children.length; i++){ var childName = children[i].Name.replace(/\.launch$/, ""); //$NON-NLS-0$ if (baseName ==...
[ "function", "uniqueLaunchConfigName", "(", "fileService", ",", "contentLocation", ",", "baseName", ")", "{", "return", "readLaunchConfigsFolder", "(", "fileService", ",", "contentLocation", ")", ".", "then", "(", "function", "(", "children", ")", "{", "var", "coun...
Calculates a uniqe name for the launch config @returns {orion.Promise} resolving to String
[ "Calculates", "a", "uniqe", "name", "for", "the", "launch", "config" ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.cf/web/cfui/plugins/wizards/common/deploymentLogic.js#L187-L208
train
eclipse/orion.client
bundles/org.eclipse.orion.client.core/web/orion/contentTypes.js
function() { var map = this.getContentTypesMap(); var types = []; for (var type in map) { if (Object.prototype.hasOwnProperty.call(map, type)) { types.push(map[type]); } } return types; }
javascript
function() { var map = this.getContentTypesMap(); var types = []; for (var type in map) { if (Object.prototype.hasOwnProperty.call(map, type)) { types.push(map[type]); } } return types; }
[ "function", "(", ")", "{", "var", "map", "=", "this", ".", "getContentTypesMap", "(", ")", ";", "var", "types", "=", "[", "]", ";", "for", "(", "var", "type", "in", "map", ")", "{", "if", "(", "Object", ".", "prototype", ".", "hasOwnProperty", ".",...
Gets all the ContentTypes in the registry. @returns {orion.core.ContentType[]} An array of all registered ContentTypes.
[ "Gets", "all", "the", "ContentTypes", "in", "the", "registry", "." ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.core/web/orion/contentTypes.js#L220-L229
train
eclipse/orion.client
bundles/org.eclipse.orion.client.core/web/orion/contentTypes.js
function(contentTypeA, contentTypeB) { contentTypeA = (typeof contentTypeA === "string") ? this.getContentType(contentTypeA) : contentTypeA; //$NON-NLS-0$ contentTypeB = (typeof contentTypeB === "string") ? this.getContentType(contentTypeB) : contentTypeB; //$NON-NLS-0$ if (!contentTypeA || !contentTypeB) { re...
javascript
function(contentTypeA, contentTypeB) { contentTypeA = (typeof contentTypeA === "string") ? this.getContentType(contentTypeA) : contentTypeA; //$NON-NLS-0$ contentTypeB = (typeof contentTypeB === "string") ? this.getContentType(contentTypeB) : contentTypeB; //$NON-NLS-0$ if (!contentTypeA || !contentTypeB) { re...
[ "function", "(", "contentTypeA", ",", "contentTypeB", ")", "{", "contentTypeA", "=", "(", "typeof", "contentTypeA", "===", "\"string\"", ")", "?", "this", ".", "getContentType", "(", "contentTypeA", ")", ":", "contentTypeA", ";", "//$NON-NLS-0$", "contentTypeB", ...
Determines whether a ContentType is an extension of another. @param {orion.core.ContentType|String} contentTypeA ContentType or ContentType ID. @param {orion.core.ContentType|String} contentTypeB ContentType or ContentType ID. @returns {Boolean} Returns <code>true</code> if <code>contentTypeA</code> equals <code>conten...
[ "Determines", "whether", "a", "ContentType", "is", "an", "extension", "of", "another", "." ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.core/web/orion/contentTypes.js#L268-L282
train
eclipse/orion.client
bundles/org.eclipse.orion.client.cf/web/cfui/cfUtil.js
function(error, target){ error.Severity = "Error"; //$NON-NLS-0$ if (error.Message && error.Message.indexOf("The host is taken") === 0) //$NON-NLS-0$ error.Message = messages["theHostIsAlreadyIn"]; if (error.HttpCode === 404){ error = { State: "NOT_DEPLOYED", //$NON-NLS-0$ Message: error.M...
javascript
function(error, target){ error.Severity = "Error"; //$NON-NLS-0$ if (error.Message && error.Message.indexOf("The host is taken") === 0) //$NON-NLS-0$ error.Message = messages["theHostIsAlreadyIn"]; if (error.HttpCode === 404){ error = { State: "NOT_DEPLOYED", //$NON-NLS-0$ Message: error.M...
[ "function", "(", "error", ",", "target", ")", "{", "error", ".", "Severity", "=", "\"Error\"", ";", "//$NON-NLS-0$", "if", "(", "error", ".", "Message", "&&", "error", ".", "Message", ".", "indexOf", "(", "\"The host is taken\"", ")", "===", "0", ")", "/...
Decorates the given error object.
[ "Decorates", "the", "given", "error", "object", "." ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.cf/web/cfui/cfUtil.js#L89-L141
train
eclipse/orion.client
bundles/org.eclipse.orion.client.cf/web/cfui/cfUtil.js
function(options){ var cFService = options.cFService; var showMessage = options.showMessage; var hideMessage = options.hideMessage; var showError = options.showError; var render = options.render; var self = this; var handleError = function(error, target, retryFunc){ error = self.defaultDecora...
javascript
function(options){ var cFService = options.cFService; var showMessage = options.showMessage; var hideMessage = options.hideMessage; var showError = options.showError; var render = options.render; var self = this; var handleError = function(error, target, retryFunc){ error = self.defaultDecora...
[ "function", "(", "options", ")", "{", "var", "cFService", "=", "options", ".", "cFService", ";", "var", "showMessage", "=", "options", ".", "showMessage", ";", "var", "hideMessage", "=", "options", ".", "hideMessage", ";", "var", "showError", "=", "options",...
Builds a default error handler which handles the given error in the wizard without communication with the parent window.
[ "Builds", "a", "default", "error", "handler", "which", "handles", "the", "given", "error", "in", "the", "wizard", "without", "communication", "with", "the", "parent", "window", "." ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.cf/web/cfui/cfUtil.js#L147-L236
train
eclipse/orion.client
bundles/org.eclipse.orion.client.ui/web/orion/widgets/input/ComboTextInput.js
function() { var value = this.getTextInputValue(); if (value) { var recentEntryArray = this.getRecentEntryArray(); if (!recentEntryArray) { recentEntryArray = []; } var indexOfElement = this._getIndexOfValue(recentEntryArray, value); //check if a duplicate entry exists if (0...
javascript
function() { var value = this.getTextInputValue(); if (value) { var recentEntryArray = this.getRecentEntryArray(); if (!recentEntryArray) { recentEntryArray = []; } var indexOfElement = this._getIndexOfValue(recentEntryArray, value); //check if a duplicate entry exists if (0...
[ "function", "(", ")", "{", "var", "value", "=", "this", ".", "getTextInputValue", "(", ")", ";", "if", "(", "value", ")", "{", "var", "recentEntryArray", "=", "this", ".", "getRecentEntryArray", "(", ")", ";", "if", "(", "!", "recentEntryArray", ")", "...
Adds the value that is in the text input field to the recent entries in localStorage. Empty and duplicate values are ignored.
[ "Adds", "the", "value", "that", "is", "in", "the", "text", "input", "field", "to", "the", "recent", "entries", "in", "localStorage", ".", "Empty", "and", "duplicate", "values", "are", "ignored", "." ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.ui/web/orion/widgets/input/ComboTextInput.js#L226-L253
train
eclipse/orion.client
bundles/org.eclipse.orion.client.ui/web/orion/widgets/input/ComboTextInput.js
function(recentEntryArray, value) { var indexOfElement = -1; recentEntryArray.some(function(entry, index){ if (entry.value === value) { indexOfElement = index; return true; } return false; }); return indexOfElement; }
javascript
function(recentEntryArray, value) { var indexOfElement = -1; recentEntryArray.some(function(entry, index){ if (entry.value === value) { indexOfElement = index; return true; } return false; }); return indexOfElement; }
[ "function", "(", "recentEntryArray", ",", "value", ")", "{", "var", "indexOfElement", "=", "-", "1", ";", "recentEntryArray", ".", "some", "(", "function", "(", "entry", ",", "index", ")", "{", "if", "(", "entry", ".", "value", "===", "value", ")", "{"...
Looks for an entry in the specified recentEntryArray with a value that is equivalent to the specified value parameter. @returns The index of the matching entry in the array or -1
[ "Looks", "for", "an", "entry", "in", "the", "specified", "recentEntryArray", "with", "a", "value", "that", "is", "equivalent", "to", "the", "specified", "value", "parameter", "." ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.ui/web/orion/widgets/input/ComboTextInput.js#L261-L273
train
eclipse/orion.client
bundles/org.eclipse.orion.client.javascript/web/javascript/scriptResolver.js
_samePaths
function _samePaths(file, path2, meta) { if (file === null) { return path2 === null; } if (typeof file === 'undefined') { return typeof path2 === 'undefined'; } if (path2 === null) { return file === null; } if (typeof path2 === 'undefined') { return typeof file === 'undefined'; }...
javascript
function _samePaths(file, path2, meta) { if (file === null) { return path2 === null; } if (typeof file === 'undefined') { return typeof path2 === 'undefined'; } if (path2 === null) { return file === null; } if (typeof path2 === 'undefined') { return typeof file === 'undefined'; }...
[ "function", "_samePaths", "(", "file", ",", "path2", ",", "meta", ")", "{", "if", "(", "file", "===", "null", ")", "{", "return", "path2", "===", "null", ";", "}", "if", "(", "typeof", "file", "===", "'undefined'", ")", "{", "return", "typeof", "path...
Returns if the two paths are the same @param {String} file The first path @param {String} path2 The second path @returns {Boolean} If the paths are the same
[ "Returns", "if", "the", "two", "paths", "are", "the", "same" ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.javascript/web/javascript/scriptResolver.js#L218-L255
train
eclipse/orion.client
bundles/org.eclipse.orion.client.webtools/web/webtools/htmlOutliner.js
function(node) { var label = node.name; //include id if present var match = /id=['"]\S*["']/.exec(node.raw); //$NON-NLS-0$ if (match) { label = label + " " + match[0]; //$NON-NLS-0$ } //include class if present match = /class=['"]\S*["']/.exec(node.raw); //$NON-NLS-0$ if (match) { ...
javascript
function(node) { var label = node.name; //include id if present var match = /id=['"]\S*["']/.exec(node.raw); //$NON-NLS-0$ if (match) { label = label + " " + match[0]; //$NON-NLS-0$ } //include class if present match = /class=['"]\S*["']/.exec(node.raw); //$NON-NLS-0$ if (match) { ...
[ "function", "(", "node", ")", "{", "var", "label", "=", "node", ".", "name", ";", "//include id if present\r", "var", "match", "=", "/", "id=['\"]\\S*[\"']", "/", ".", "exec", "(", "node", ".", "raw", ")", ";", "//$NON-NLS-0$\r", "if", "(", "match", ")",...
Converts an HTML dom element into a label @param {Object} element The HTML element @return {String} A human readable label
[ "Converts", "an", "HTML", "dom", "element", "into", "a", "label" ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.webtools/web/webtools/htmlOutliner.js#L50-L63
train
eclipse/orion.client
bundles/org.eclipse.orion.client.webtools/web/webtools/htmlOutliner.js
function(dom) { //end recursion if (!dom) { return null; } var outline = []; for (var i = 0; i < dom.length; i++) { var node = dom[i]; if(this.skip(node)) { continue; } var element = { label: this.domToLabel(node), children: this.domToOutline(node.childr...
javascript
function(dom) { //end recursion if (!dom) { return null; } var outline = []; for (var i = 0; i < dom.length; i++) { var node = dom[i]; if(this.skip(node)) { continue; } var element = { label: this.domToLabel(node), children: this.domToOutline(node.childr...
[ "function", "(", "dom", ")", "{", "//end recursion\r", "if", "(", "!", "dom", ")", "{", "return", "null", ";", "}", "var", "outline", "=", "[", "]", ";", "for", "(", "var", "i", "=", "0", ";", "i", "<", "dom", ".", "length", ";", "i", "++", "...
Converts an HTML DOM node into an outline element @param {Object} An HTML DOM node as returned by the Tautologistics HTML parser @return {Object} A node in the outline tree
[ "Converts", "an", "HTML", "DOM", "node", "into", "an", "outline", "element" ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.webtools/web/webtools/htmlOutliner.js#L71-L94
train
eclipse/orion.client
bundles/org.eclipse.orion.client.webtools/web/webtools/htmlOutliner.js
function(node) { //skip nodes with no name if (!node.name) { return true; } //skip formatting elements if (node.name === "b" || node.name === "i" || node.name === "em") { //$NON-NLS-0$ //$NON-NLS-1$ //$NON-NLS-2$ return true; } //skip paragraphs and other blocks of formatted ...
javascript
function(node) { //skip nodes with no name if (!node.name) { return true; } //skip formatting elements if (node.name === "b" || node.name === "i" || node.name === "em") { //$NON-NLS-0$ //$NON-NLS-1$ //$NON-NLS-2$ return true; } //skip paragraphs and other blocks of formatted ...
[ "function", "(", "node", ")", "{", "//skip nodes with no name\r", "if", "(", "!", "node", ".", "name", ")", "{", "return", "true", ";", "}", "//skip formatting elements\r", "if", "(", "node", ".", "name", "===", "\"b\"", "||", "node", ".", "name", "===", ...
Returns whether this HTML node should be omitted from the outline. @function @private @param {Object} node The HTML element @return {Boolean} true if the element should be skipped, and false otherwise
[ "Returns", "whether", "this", "HTML", "node", "should", "be", "omitted", "from", "the", "outline", "." ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.webtools/web/webtools/htmlOutliner.js#L104-L121
train
eclipse/orion.client
bundles/org.eclipse.orion.client.webtools/web/webtools/htmlOutliner.js
function(dom) { //recursively walk the dom looking for a body element for (var i = 0; i < dom.length; i++) { if (dom[i].name === "body") { //$NON-NLS-0$ return dom[i].children; } if (dom[i].children) { var result = this.findBody(dom[i].children); if (result) { return resu...
javascript
function(dom) { //recursively walk the dom looking for a body element for (var i = 0; i < dom.length; i++) { if (dom[i].name === "body") { //$NON-NLS-0$ return dom[i].children; } if (dom[i].children) { var result = this.findBody(dom[i].children); if (result) { return resu...
[ "function", "(", "dom", ")", "{", "//recursively walk the dom looking for a body element\r", "for", "(", "var", "i", "=", "0", ";", "i", "<", "dom", ".", "length", ";", "i", "++", ")", "{", "if", "(", "dom", "[", "i", "]", ".", "name", "===", "\"body\"...
Returns the DOM node corresponding to the HTML body, or null if no such node could be found.
[ "Returns", "the", "DOM", "node", "corresponding", "to", "the", "HTML", "body", "or", "null", "if", "no", "such", "node", "could", "be", "found", "." ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.webtools/web/webtools/htmlOutliner.js#L127-L141
train
eclipse/orion.client
modules/orionode/lib/shared/tree.js
getSharedWorkspace
function getSharedWorkspace(req, res) { return sharedUtil.getSharedProjects(req, res, function(projects) { var workspaces = []; projects.forEach(function(project){ var projectSegs = project.Location.split("/"); var projectBelongingWorkspaceId = sharedUtil.getWorkspaceIdFromprojectLocation(project.Lo...
javascript
function getSharedWorkspace(req, res) { return sharedUtil.getSharedProjects(req, res, function(projects) { var workspaces = []; projects.forEach(function(project){ var projectSegs = project.Location.split("/"); var projectBelongingWorkspaceId = sharedUtil.getWorkspaceIdFromprojectLocation(project.Lo...
[ "function", "getSharedWorkspace", "(", "req", ",", "res", ")", "{", "return", "sharedUtil", ".", "getSharedProjects", "(", "req", ",", "res", ",", "function", "(", "projects", ")", "{", "var", "workspaces", "=", "[", "]", ";", "projects", ".", "forEach", ...
Get shared projects for the user.
[ "Get", "shared", "projects", "for", "the", "user", "." ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/modules/orionode/lib/shared/tree.js#L43-L66
train
eclipse/orion.client
modules/orionode/lib/shared/tree.js
putFile
function putFile(req, res) { var rest = req.params["0"]; var file = fileUtil.getFile(req, rest); var fileRoot = options.fileRoot; if (req.params['parts'] === 'meta') { // TODO implement put of file attributes return sendStatus(501, res); } function write() { var ws = fs.createWriteStream(file.path)...
javascript
function putFile(req, res) { var rest = req.params["0"]; var file = fileUtil.getFile(req, rest); var fileRoot = options.fileRoot; if (req.params['parts'] === 'meta') { // TODO implement put of file attributes return sendStatus(501, res); } function write() { var ws = fs.createWriteStream(file.path)...
[ "function", "putFile", "(", "req", ",", "res", ")", "{", "var", "rest", "=", "req", ".", "params", "[", "\"0\"", "]", ";", "var", "file", "=", "fileUtil", ".", "getFile", "(", "req", ",", "rest", ")", ";", "var", "fileRoot", "=", "options", ".", ...
For file save.
[ "For", "file", "save", "." ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/modules/orionode/lib/shared/tree.js#L173-L208
train
eclipse/orion.client
modules/orionode/lib/shared/tree.js
deleteFile
function deleteFile(req, res) { var rest = req.params["0"]; var file = fileUtil.getFile(req, rest); fileUtil.withStatsAndETag(file.path, function(error, stats, etag) { var callback = function(error) { if (error) { return writeError(500, res, error); } sendStatus(204, res); }; var ifMatch...
javascript
function deleteFile(req, res) { var rest = req.params["0"]; var file = fileUtil.getFile(req, rest); fileUtil.withStatsAndETag(file.path, function(error, stats, etag) { var callback = function(error) { if (error) { return writeError(500, res, error); } sendStatus(204, res); }; var ifMatch...
[ "function", "deleteFile", "(", "req", ",", "res", ")", "{", "var", "rest", "=", "req", ".", "params", "[", "\"0\"", "]", ";", "var", "file", "=", "fileUtil", ".", "getFile", "(", "req", ",", "rest", ")", ";", "fileUtil", ".", "withStatsAndETag", "(",...
For file delete.
[ "For", "file", "delete", "." ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/modules/orionode/lib/shared/tree.js#L233-L256
train
eclipse/orion.client
modules/orionode/lib/shared/tree.js
loadFile
function loadFile(req, res) { if (req.user) { // User access is not allowed. This method is only for the collab server writeError(403, res, 'Forbidden'); return; } var relativeFilePath = req.params['0']; var hubid = req.params['hubId']; return sharedProjects.getProjectPathFromHubID(hubid) .then(fu...
javascript
function loadFile(req, res) { if (req.user) { // User access is not allowed. This method is only for the collab server writeError(403, res, 'Forbidden'); return; } var relativeFilePath = req.params['0']; var hubid = req.params['hubId']; return sharedProjects.getProjectPathFromHubID(hubid) .then(fu...
[ "function", "loadFile", "(", "req", ",", "res", ")", "{", "if", "(", "req", ".", "user", ")", "{", "// User access is not allowed. This method is only for the collab server", "writeError", "(", "403", ",", "res", ",", "'Forbidden'", ")", ";", "return", ";", "}",...
Get request from websocket server to load a file. Requires project HUBID and relative file path.
[ "Get", "request", "from", "websocket", "server", "to", "load", "a", "file", ".", "Requires", "project", "HUBID", "and", "relative", "file", "path", "." ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/modules/orionode/lib/shared/tree.js#L289-L306
train
mapbox/cheap-ruler
index.js
function (a, b) { var dx = (b[0] - a[0]) * this.kx; var dy = (b[1] - a[1]) * this.ky; if (!dx && !dy) return 0; var bearing = Math.atan2(dx, dy) * 180 / Math.PI; if (bearing > 180) bearing -= 360; return bearing; }
javascript
function (a, b) { var dx = (b[0] - a[0]) * this.kx; var dy = (b[1] - a[1]) * this.ky; if (!dx && !dy) return 0; var bearing = Math.atan2(dx, dy) * 180 / Math.PI; if (bearing > 180) bearing -= 360; return bearing; }
[ "function", "(", "a", ",", "b", ")", "{", "var", "dx", "=", "(", "b", "[", "0", "]", "-", "a", "[", "0", "]", ")", "*", "this", ".", "kx", ";", "var", "dy", "=", "(", "b", "[", "1", "]", "-", "a", "[", "1", "]", ")", "*", "this", "....
Returns the bearing between two points in angles. @param {Array<number>} a point [longitude, latitude] @param {Array<number>} b point [longitude, latitude] @returns {number} bearing @example var bearing = ruler.bearing([30.5, 50.5], [30.51, 50.49]); //=bearing
[ "Returns", "the", "bearing", "between", "two", "points", "in", "angles", "." ]
d078203640f66e4d2d3bd04b61c1e734a3aead90
https://github.com/mapbox/cheap-ruler/blob/d078203640f66e4d2d3bd04b61c1e734a3aead90/index.js#L99-L106
train