id int32 0 58k | repo stringlengths 5 67 | path stringlengths 4 116 | func_name stringlengths 0 58 | original_string stringlengths 52 373k | language stringclasses 1
value | code stringlengths 52 373k | code_tokens list | docstring stringlengths 4 11.8k | docstring_tokens list | sha stringlengths 40 40 | url stringlengths 86 226 |
|---|---|---|---|---|---|---|---|---|---|---|---|
14,600 | 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 |
14,601 | 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 |
14,602 | 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 |
14,603 | 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 | |
14,604 | 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 | |
14,605 | 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 | |
14,606 | 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 |
14,607 | 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 |
14,608 | 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 |
14,609 | 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 |
14,610 | 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 | |
14,611 | 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 | |
14,612 | 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 | |
14,613 | 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 |
14,614 | 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 |
14,615 | 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 |
14,616 | 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 |
14,617 | 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 |
14,618 | 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 |
14,619 | 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 | |
14,620 | 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 | |
14,621 | 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 | |
14,622 | 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 | |
14,623 | 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 | |
14,624 | 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 |
14,625 | 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 | |
14,626 | 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 | |
14,627 | 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 | |
14,628 | 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 | |
14,629 | 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 | |
14,630 | 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 | |
14,631 | 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 | |
14,632 | 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 | |
14,633 | 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 | |
14,634 | 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 | |
14,635 | 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 | |
14,636 | 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 |
14,637 | 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 |
14,638 | 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 |
14,639 | 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 |
14,640 | 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 |
14,641 | 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 |
14,642 | 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 | |
14,643 | 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 |
14,644 | 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 | |
14,645 | 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 | |
14,646 | 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 | |
14,647 | 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 |
14,648 | 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 |
14,649 | 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 |
14,650 | 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 | |
14,651 | 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 | |
14,652 | 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 | |
14,653 | 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 | |
14,654 | 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 | |
14,655 | 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 | |
14,656 | 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 | |
14,657 | 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 | |
14,658 | 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 | |
14,659 | 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 | |
14,660 | 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 | |
14,661 | 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 |
14,662 | 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 | |
14,663 | 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 |
14,664 | 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 |
14,665 | 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 |
14,666 | 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 | |
14,667 | 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 | |
14,668 | 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 | |
14,669 | 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 |
14,670 | 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 | |
14,671 | 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 |
14,672 | 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 |
14,673 | 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 |
14,674 | 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 |
14,675 | 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 | |
14,676 | 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 | |
14,677 | 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 | |
14,678 | 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 | |
14,679 | 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 | |
14,680 | 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 | |
14,681 | 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 |
14,682 | 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 | |
14,683 | 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 | |
14,684 | 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 | |
14,685 | 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 | |
14,686 | 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 |
14,687 | 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 |
14,688 | 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 |
14,689 | 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 |
14,690 | 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 | |
14,691 | mapbox/cheap-ruler | index.js | function (p, dist, bearing) {
var a = bearing * Math.PI / 180;
return this.offset(p,
Math.sin(a) * dist,
Math.cos(a) * dist);
} | javascript | function (p, dist, bearing) {
var a = bearing * Math.PI / 180;
return this.offset(p,
Math.sin(a) * dist,
Math.cos(a) * dist);
} | [
"function",
"(",
"p",
",",
"dist",
",",
"bearing",
")",
"{",
"var",
"a",
"=",
"bearing",
"*",
"Math",
".",
"PI",
"/",
"180",
";",
"return",
"this",
".",
"offset",
"(",
"p",
",",
"Math",
".",
"sin",
"(",
"a",
")",
"*",
"dist",
",",
"Math",
"."... | Returns a new point given distance and bearing from the starting point.
@param {Array<number>} p point [longitude, latitude]
@param {number} dist distance
@param {number} bearing
@returns {Array<number>} point [longitude, latitude]
@example
var point = ruler.destination([30.5, 50.5], 0.1, 90);
//=point | [
"Returns",
"a",
"new",
"point",
"given",
"distance",
"and",
"bearing",
"from",
"the",
"starting",
"point",
"."
] | d078203640f66e4d2d3bd04b61c1e734a3aead90 | https://github.com/mapbox/cheap-ruler/blob/d078203640f66e4d2d3bd04b61c1e734a3aead90/index.js#L119-L124 | |
14,692 | mapbox/cheap-ruler | index.js | function (line, dist) {
var sum = 0;
if (dist <= 0) return line[0];
for (var i = 0; i < line.length - 1; i++) {
var p0 = line[i];
var p1 = line[i + 1];
var d = this.distance(p0, p1);
sum += d;
if (sum > dist) return interpolate(p0, p1... | javascript | function (line, dist) {
var sum = 0;
if (dist <= 0) return line[0];
for (var i = 0; i < line.length - 1; i++) {
var p0 = line[i];
var p1 = line[i + 1];
var d = this.distance(p0, p1);
sum += d;
if (sum > dist) return interpolate(p0, p1... | [
"function",
"(",
"line",
",",
"dist",
")",
"{",
"var",
"sum",
"=",
"0",
";",
"if",
"(",
"dist",
"<=",
"0",
")",
"return",
"line",
"[",
"0",
"]",
";",
"for",
"(",
"var",
"i",
"=",
"0",
";",
"i",
"<",
"line",
".",
"length",
"-",
"1",
";",
"... | Returns the point at a specified distance along the line.
@param {Array<Array<number>>} line
@param {number} dist distance
@returns {Array<number>} point [longitude, latitude]
@example
var point = ruler.along(line, 2.5);
//=point | [
"Returns",
"the",
"point",
"at",
"a",
"specified",
"distance",
"along",
"the",
"line",
"."
] | d078203640f66e4d2d3bd04b61c1e734a3aead90 | https://github.com/mapbox/cheap-ruler/blob/d078203640f66e4d2d3bd04b61c1e734a3aead90/index.js#L200-L214 | |
14,693 | mapbox/cheap-ruler | index.js | function (start, stop, line) {
var sum = 0;
var slice = [];
for (var i = 0; i < line.length - 1; i++) {
var p0 = line[i];
var p1 = line[i + 1];
var d = this.distance(p0, p1);
sum += d;
if (sum > start && slice.length === 0) {
... | javascript | function (start, stop, line) {
var sum = 0;
var slice = [];
for (var i = 0; i < line.length - 1; i++) {
var p0 = line[i];
var p1 = line[i + 1];
var d = this.distance(p0, p1);
sum += d;
if (sum > start && slice.length === 0) {
... | [
"function",
"(",
"start",
",",
"stop",
",",
"line",
")",
"{",
"var",
"sum",
"=",
"0",
";",
"var",
"slice",
"=",
"[",
"]",
";",
"for",
"(",
"var",
"i",
"=",
"0",
";",
"i",
"<",
"line",
".",
"length",
"-",
"1",
";",
"i",
"++",
")",
"{",
"va... | Returns a part of the given line between the start and the stop points indicated by distance along the line.
@param {number} start distance
@param {number} stop distance
@param {Array<Array<number>>} line
@returns {Array<Array<number>>} line part of a line
@example
var line2 = ruler.lineSliceAlong(10, 20, line1);
//=l... | [
"Returns",
"a",
"part",
"of",
"the",
"given",
"line",
"between",
"the",
"start",
"and",
"the",
"stop",
"points",
"indicated",
"by",
"distance",
"along",
"the",
"line",
"."
] | d078203640f66e4d2d3bd04b61c1e734a3aead90 | https://github.com/mapbox/cheap-ruler/blob/d078203640f66e4d2d3bd04b61c1e734a3aead90/index.js#L324-L348 | |
14,694 | mapbox/cheap-ruler | index.js | function (bbox, buffer) {
var v = buffer / this.ky;
var h = buffer / this.kx;
return [
bbox[0] - h,
bbox[1] - v,
bbox[2] + h,
bbox[3] + v
];
} | javascript | function (bbox, buffer) {
var v = buffer / this.ky;
var h = buffer / this.kx;
return [
bbox[0] - h,
bbox[1] - v,
bbox[2] + h,
bbox[3] + v
];
} | [
"function",
"(",
"bbox",
",",
"buffer",
")",
"{",
"var",
"v",
"=",
"buffer",
"/",
"this",
".",
"ky",
";",
"var",
"h",
"=",
"buffer",
"/",
"this",
".",
"kx",
";",
"return",
"[",
"bbox",
"[",
"0",
"]",
"-",
"h",
",",
"bbox",
"[",
"1",
"]",
"-... | Given a bounding box, returns the box buffered by a given distance.
@param {Array<number>} box object ([w, s, e, n])
@param {number} buffer
@returns {Array<number>} box object ([w, s, e, n])
@example
var bbox = ruler.bufferBBox([30.5, 50.5, 31, 51], 0.2);
//=bbox | [
"Given",
"a",
"bounding",
"box",
"returns",
"the",
"box",
"buffered",
"by",
"a",
"given",
"distance",
"."
] | d078203640f66e4d2d3bd04b61c1e734a3aead90 | https://github.com/mapbox/cheap-ruler/blob/d078203640f66e4d2d3bd04b61c1e734a3aead90/index.js#L381-L390 | |
14,695 | mapbox/cheap-ruler | index.js | function (p, bbox) {
return p[0] >= bbox[0] &&
p[0] <= bbox[2] &&
p[1] >= bbox[1] &&
p[1] <= bbox[3];
} | javascript | function (p, bbox) {
return p[0] >= bbox[0] &&
p[0] <= bbox[2] &&
p[1] >= bbox[1] &&
p[1] <= bbox[3];
} | [
"function",
"(",
"p",
",",
"bbox",
")",
"{",
"return",
"p",
"[",
"0",
"]",
">=",
"bbox",
"[",
"0",
"]",
"&&",
"p",
"[",
"0",
"]",
"<=",
"bbox",
"[",
"2",
"]",
"&&",
"p",
"[",
"1",
"]",
">=",
"bbox",
"[",
"1",
"]",
"&&",
"p",
"[",
"1",
... | Returns true if the given point is inside in the given bounding box, otherwise false.
@param {Array<number>} p point [longitude, latitude]
@param {Array<number>} box object ([w, s, e, n])
@returns {boolean}
@example
var inside = ruler.insideBBox([30.5, 50.5], [30, 50, 31, 51]);
//=inside | [
"Returns",
"true",
"if",
"the",
"given",
"point",
"is",
"inside",
"in",
"the",
"given",
"bounding",
"box",
"otherwise",
"false",
"."
] | d078203640f66e4d2d3bd04b61c1e734a3aead90 | https://github.com/mapbox/cheap-ruler/blob/d078203640f66e4d2d3bd04b61c1e734a3aead90/index.js#L402-L407 | |
14,696 | adrai/node-cqrs-domain | lib/definitions/context.js | function (aggregate) {
if (!aggregate || !(aggregate instanceof Aggregate)) {
throw new Error('Passed object should be an Aggregate');
}
aggregate.defineContext(this);
if (this.aggregates.indexOf(aggregate) < 0) {
this.aggregates.push(aggregate);
}
} | javascript | function (aggregate) {
if (!aggregate || !(aggregate instanceof Aggregate)) {
throw new Error('Passed object should be an Aggregate');
}
aggregate.defineContext(this);
if (this.aggregates.indexOf(aggregate) < 0) {
this.aggregates.push(aggregate);
}
} | [
"function",
"(",
"aggregate",
")",
"{",
"if",
"(",
"!",
"aggregate",
"||",
"!",
"(",
"aggregate",
"instanceof",
"Aggregate",
")",
")",
"{",
"throw",
"new",
"Error",
"(",
"'Passed object should be an Aggregate'",
")",
";",
"}",
"aggregate",
".",
"defineContext"... | Adds an aggregate to this context.
@param {Aggregate} aggregate the aggregate that should be added | [
"Adds",
"an",
"aggregate",
"to",
"this",
"context",
"."
] | 4e70105b11a444b02c12f2850c61242b4998361c | https://github.com/adrai/node-cqrs-domain/blob/4e70105b11a444b02c12f2850c61242b4998361c/lib/definitions/context.js#L30-L40 | |
14,697 | adrai/node-cqrs-domain | lib/definitions/context.js | function (name) {
if (!name || !_.isString(name)) {
throw new Error('Please pass in an aggregate name!');
}
return _.find(this.aggregates, function (agg) {
return agg.name === name;
});
} | javascript | function (name) {
if (!name || !_.isString(name)) {
throw new Error('Please pass in an aggregate name!');
}
return _.find(this.aggregates, function (agg) {
return agg.name === name;
});
} | [
"function",
"(",
"name",
")",
"{",
"if",
"(",
"!",
"name",
"||",
"!",
"_",
".",
"isString",
"(",
"name",
")",
")",
"{",
"throw",
"new",
"Error",
"(",
"'Please pass in an aggregate name!'",
")",
";",
"}",
"return",
"_",
".",
"find",
"(",
"this",
".",
... | Returns the aggregate with the requested name.
@param {String} name command name
@returns {Aggregate} | [
"Returns",
"the",
"aggregate",
"with",
"the",
"requested",
"name",
"."
] | 4e70105b11a444b02c12f2850c61242b4998361c | https://github.com/adrai/node-cqrs-domain/blob/4e70105b11a444b02c12f2850c61242b4998361c/lib/definitions/context.js#L47-L55 | |
14,698 | adrai/node-cqrs-domain | lib/definitions/context.js | function (name, version) {
if (!name || !_.isString(name)) {
throw new Error('Please pass in a command name!');
}
for (var a in this.aggregates) {
var aggr = this.aggregates[a];
var cmd = aggr.getCommand(name, version);
if (cmd) {
return aggr;
}
}
for (var a i... | javascript | function (name, version) {
if (!name || !_.isString(name)) {
throw new Error('Please pass in a command name!');
}
for (var a in this.aggregates) {
var aggr = this.aggregates[a];
var cmd = aggr.getCommand(name, version);
if (cmd) {
return aggr;
}
}
for (var a i... | [
"function",
"(",
"name",
",",
"version",
")",
"{",
"if",
"(",
"!",
"name",
"||",
"!",
"_",
".",
"isString",
"(",
"name",
")",
")",
"{",
"throw",
"new",
"Error",
"(",
"'Please pass in a command name!'",
")",
";",
"}",
"for",
"(",
"var",
"a",
"in",
"... | Return the aggregate that handles the requested command.
@param {String} name command name
@param {Number} version command version
@returns {Aggregate} | [
"Return",
"the",
"aggregate",
"that",
"handles",
"the",
"requested",
"command",
"."
] | 4e70105b11a444b02c12f2850c61242b4998361c | https://github.com/adrai/node-cqrs-domain/blob/4e70105b11a444b02c12f2850c61242b4998361c/lib/definitions/context.js#L63-L87 | |
14,699 | adrai/node-cqrs-domain | lib/aggregateModel.js | function (streamInfo, rev) {
this.set('_revision', rev);
streamInfo.context = streamInfo.context || '_general';
this.get('_revisions')[streamInfo.context + '_' + streamInfo.aggregate + '_' + streamInfo.aggregateId] = rev;
} | javascript | function (streamInfo, rev) {
this.set('_revision', rev);
streamInfo.context = streamInfo.context || '_general';
this.get('_revisions')[streamInfo.context + '_' + streamInfo.aggregate + '_' + streamInfo.aggregateId] = rev;
} | [
"function",
"(",
"streamInfo",
",",
"rev",
")",
"{",
"this",
".",
"set",
"(",
"'_revision'",
",",
"rev",
")",
";",
"streamInfo",
".",
"context",
"=",
"streamInfo",
".",
"context",
"||",
"'_general'",
";",
"this",
".",
"get",
"(",
"'_revisions'",
")",
"... | Sets the revision for this aggregate.
@param {Object} streamInfo The stream info.
@param {Number} rev The revision number. | [
"Sets",
"the",
"revision",
"for",
"this",
"aggregate",
"."
] | 4e70105b11a444b02c12f2850c61242b4998361c | https://github.com/adrai/node-cqrs-domain/blob/4e70105b11a444b02c12f2850c61242b4998361c/lib/aggregateModel.js#L57-L61 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.