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,400 | eclipse/orion.client | bundles/org.eclipse.orion.client.git/web/orion/git/gitPreferenceStorage.js | function(repository, userCredentials){
var credentials = {
gitSshUsername : "",
gitSshPassword : "",
gitPrivateKey : "",
gitPassphrase : ""
};
if(userCredentials !== undefined){
if(userCredentials.gitSshUsername !== undefined && userCredentials.gitSshUsername !== null) { creden... | javascript | function(repository, userCredentials){
var credentials = {
gitSshUsername : "",
gitSshPassword : "",
gitPrivateKey : "",
gitPassphrase : ""
};
if(userCredentials !== undefined){
if(userCredentials.gitSshUsername !== undefined && userCredentials.gitSshUsername !== null) { creden... | [
"function",
"(",
"repository",
",",
"userCredentials",
")",
"{",
"var",
"credentials",
"=",
"{",
"gitSshUsername",
":",
"\"\"",
",",
"gitSshPassword",
":",
"\"\"",
",",
"gitPrivateKey",
":",
"\"\"",
",",
"gitPassphrase",
":",
"\"\"",
"}",
";",
"if",
"(",
"... | Saves the given git credentials for the given repository.
@param repository [required] unique repository URL
@param userCredentials.gitSshUsername [optional] git ssh username
@param userCredentials.gitSshPassword [optional] git ssh password
@param userCredentials.gitPrivateKey [optional] git private key
@param userCre... | [
"Saves",
"the",
"given",
"git",
"credentials",
"for",
"the",
"given",
"repository",
"."
] | eb2583100c662b5cfc1b461a978b31d3b8555ce1 | https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.git/web/orion/git/gitPreferenceStorage.js#L37-L70 | |
14,401 | eclipse/orion.client | bundles/org.eclipse.orion.client.git/web/orion/git/gitPreferenceStorage.js | function(repository){
var credentials = {
gitSshUsername : "",
gitSshPassword : "",
gitPrivateKey : "",
gitPassphrase : ""
};
var d = new Deferred();
this._preferenceService.get(this._prefix, undefined, {scope: 2}).then(
function(pref){
var settings = pref["settings"]... | javascript | function(repository){
var credentials = {
gitSshUsername : "",
gitSshPassword : "",
gitPrivateKey : "",
gitPassphrase : ""
};
var d = new Deferred();
this._preferenceService.get(this._prefix, undefined, {scope: 2}).then(
function(pref){
var settings = pref["settings"]... | [
"function",
"(",
"repository",
")",
"{",
"var",
"credentials",
"=",
"{",
"gitSshUsername",
":",
"\"\"",
",",
"gitSshPassword",
":",
"\"\"",
",",
"gitPrivateKey",
":",
"\"\"",
",",
"gitPassphrase",
":",
"\"\"",
"}",
";",
"var",
"d",
"=",
"new",
"Deferred",
... | Retrieves git credentials for the given repository.
Some credentials fields may be in form of empty strings if not present in the storage.
@param repository [required] unique repository URL | [
"Retrieves",
"git",
"credentials",
"for",
"the",
"given",
"repository",
".",
"Some",
"credentials",
"fields",
"may",
"be",
"in",
"form",
"of",
"empty",
"strings",
"if",
"not",
"present",
"in",
"the",
"storage",
"."
] | eb2583100c662b5cfc1b461a978b31d3b8555ce1 | https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.git/web/orion/git/gitPreferenceStorage.js#L78-L104 | |
14,402 | eclipse/orion.client | bundles/org.eclipse.orion.client.git/web/orion/git/gitPreferenceStorage.js | function(){
var d = new Deferred();
this._preferenceService.get(this._prefix, undefined, {scope: 2}).then(
function(pref){
var settings = pref["settings"];
if(settings === undefined){
d.resolve(false);
return;
}
d.resolve(settings.enabled);
}
);
... | javascript | function(){
var d = new Deferred();
this._preferenceService.get(this._prefix, undefined, {scope: 2}).then(
function(pref){
var settings = pref["settings"];
if(settings === undefined){
d.resolve(false);
return;
}
d.resolve(settings.enabled);
}
);
... | [
"function",
"(",
")",
"{",
"var",
"d",
"=",
"new",
"Deferred",
"(",
")",
";",
"this",
".",
"_preferenceService",
".",
"get",
"(",
"this",
".",
"_prefix",
",",
"undefined",
",",
"{",
"scope",
":",
"2",
"}",
")",
".",
"then",
"(",
"function",
"(",
... | Determines whether the storage is enabled by the user or not. | [
"Determines",
"whether",
"the",
"storage",
"is",
"enabled",
"by",
"the",
"user",
"or",
"not",
"."
] | eb2583100c662b5cfc1b461a978b31d3b8555ce1 | https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.git/web/orion/git/gitPreferenceStorage.js#L109-L124 | |
14,403 | eclipse/orion.client | bundles/org.eclipse.orion.client.git/web/orion/git/gitPreferenceStorage.js | function(){
var d = new Deferred();
this._preferenceService.get(this._prefix, undefined, {scope: 2}).then(
function(pref){
var result = [];
var repositories = Object.keys(pref);
for(var i=0; i<repositories.length; ++i){
if(repositories[i] !== "settings"){
result.push... | javascript | function(){
var d = new Deferred();
this._preferenceService.get(this._prefix, undefined, {scope: 2}).then(
function(pref){
var result = [];
var repositories = Object.keys(pref);
for(var i=0; i<repositories.length; ++i){
if(repositories[i] !== "settings"){
result.push... | [
"function",
"(",
")",
"{",
"var",
"d",
"=",
"new",
"Deferred",
"(",
")",
";",
"this",
".",
"_preferenceService",
".",
"get",
"(",
"this",
".",
"_prefix",
",",
"undefined",
",",
"{",
"scope",
":",
"2",
"}",
")",
".",
"then",
"(",
"function",
"(",
... | Returns all repository URLs, which have stored
credentials in the storage. | [
"Returns",
"all",
"repository",
"URLs",
"which",
"have",
"stored",
"credentials",
"in",
"the",
"storage",
"."
] | eb2583100c662b5cfc1b461a978b31d3b8555ce1 | https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.git/web/orion/git/gitPreferenceStorage.js#L154-L172 | |
14,404 | eclipse/orion.client | bundles/org.eclipse.orion.client.editor/web/orion/editor/textView.js | Selection | function Selection (start, end, caret) {
/**
* The selection start offset.
*
* @name orion.editor.Selection#start
*/
this.start = start;
/**
* The selection end offset.
*
* @name orion.editor.Selection#end
*/
this.end = end;
/** @private */
this.caret = caret; //true if the start, fa... | javascript | function Selection (start, end, caret) {
/**
* The selection start offset.
*
* @name orion.editor.Selection#start
*/
this.start = start;
/**
* The selection end offset.
*
* @name orion.editor.Selection#end
*/
this.end = end;
/** @private */
this.caret = caret; //true if the start, fa... | [
"function",
"Selection",
"(",
"start",
",",
"end",
",",
"caret",
")",
"{",
"/**\n\t\t * The selection start offset.\n\t\t *\n\t\t * @name orion.editor.Selection#start\n\t\t */",
"this",
".",
"start",
"=",
"start",
";",
"/**\n\t\t * The selection end offset.\n\t\t *\n\t\t * @name or... | Constructs a new Selection object.
@class A Selection represents a range of selected text in the view.
@name orion.editor.Selection | [
"Constructs",
"a",
"new",
"Selection",
"object",
"."
] | eb2583100c662b5cfc1b461a978b31d3b8555ce1 | https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.editor/web/orion/editor/textView.js#L243-L260 |
14,405 | eclipse/orion.client | bundles/org.eclipse.orion.client.editor/web/orion/editor/textView.js | TextLine | function TextLine (view, lineIndex, lineDiv) {
/**
* The view.
*
* @name orion.editor.TextLine#view
* @private
*/
this.view = view;
/**
* The line index.
*
* @name orion.editor.TextLine#lineIndex
* @private
*/
this.lineIndex = lineIndex;
this._lineDiv = lineDiv;
} | javascript | function TextLine (view, lineIndex, lineDiv) {
/**
* The view.
*
* @name orion.editor.TextLine#view
* @private
*/
this.view = view;
/**
* The line index.
*
* @name orion.editor.TextLine#lineIndex
* @private
*/
this.lineIndex = lineIndex;
this._lineDiv = lineDiv;
} | [
"function",
"TextLine",
"(",
"view",
",",
"lineIndex",
",",
"lineDiv",
")",
"{",
"/**\n\t\t * The view.\n\t\t *\n\t\t * @name orion.editor.TextLine#view\n\t\t * @private\n\t\t */",
"this",
".",
"view",
"=",
"view",
";",
"/**\n\t\t * The line index.\n\t\t *\n\t\t * @name orion.edito... | Constructs a new TextLine object.
@class A TextLine represents a line of text in the view.
@name orion.editor.TextLine
@private | [
"Constructs",
"a",
"new",
"TextLine",
"object",
"."
] | eb2583100c662b5cfc1b461a978b31d3b8555ce1 | https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.editor/web/orion/editor/textView.js#L633-L650 |
14,406 | eclipse/orion.client | bundles/org.eclipse.orion.client.editor/web/orion/editor/textView.js | function(mode, index) {
var keyModes = this._keyModes;
if (index !== undefined) {
keyModes.splice(index, 0, mode);
} else {
keyModes.push(mode);
}
//TODO: API needed for this
if (mode._modeAdded) {
mode._modeAdded();
}
} | javascript | function(mode, index) {
var keyModes = this._keyModes;
if (index !== undefined) {
keyModes.splice(index, 0, mode);
} else {
keyModes.push(mode);
}
//TODO: API needed for this
if (mode._modeAdded) {
mode._modeAdded();
}
} | [
"function",
"(",
"mode",
",",
"index",
")",
"{",
"var",
"keyModes",
"=",
"this",
".",
"_keyModes",
";",
"if",
"(",
"index",
"!==",
"undefined",
")",
"{",
"keyModes",
".",
"splice",
"(",
"index",
",",
"0",
",",
"mode",
")",
";",
"}",
"else",
"{",
... | Adds a keyMode to the text view at the specified position.
@param {orion.editor.KeyMode} mode the editor keyMode.
@param {Number} [index=length] the index. | [
"Adds",
"a",
"keyMode",
"to",
"the",
"text",
"view",
"at",
"the",
"specified",
"position",
"."
] | eb2583100c662b5cfc1b461a978b31d3b8555ce1 | https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.editor/web/orion/editor/textView.js#L1740-L1751 | |
14,407 | eclipse/orion.client | bundles/org.eclipse.orion.client.editor/web/orion/editor/textView.js | function(offset, options) {
var selection = new Selection(offset, offset, false);
this._doMove(options, selection);
return selection.getCaret();
} | javascript | function(offset, options) {
var selection = new Selection(offset, offset, false);
this._doMove(options, selection);
return selection.getCaret();
} | [
"function",
"(",
"offset",
",",
"options",
")",
"{",
"var",
"selection",
"=",
"new",
"Selection",
"(",
"offset",
",",
"offset",
",",
"false",
")",
";",
"this",
".",
"_doMove",
"(",
"options",
",",
"selection",
")",
";",
"return",
"selection",
".",
"get... | Returns the next character offset after the given offset and options
@param {Number} offset the offset to start from
@param {Object} options
{ unit: the type of unit to advance to (eg "character", "word", "wordend", "wordWS", "wordendWS"),
count: the number of units to advance (negative to advance backwards) }
@return... | [
"Returns",
"the",
"next",
"character",
"offset",
"after",
"the",
"given",
"offset",
"and",
"options"
] | eb2583100c662b5cfc1b461a978b31d3b8555ce1 | https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.editor/web/orion/editor/textView.js#L2268-L2272 | |
14,408 | eclipse/orion.client | bundles/org.eclipse.orion.client.editor/web/orion/editor/textView.js | function(x, y) {
if (!this._clientDiv) { return 0; }
var lineIndex = this._getLineIndex(y);
var line = this._getLine(lineIndex);
var offset = line.getOffset(x, y - this._getLinePixel(lineIndex));
line.destroy();
return offset;
} | javascript | function(x, y) {
if (!this._clientDiv) { return 0; }
var lineIndex = this._getLineIndex(y);
var line = this._getLine(lineIndex);
var offset = line.getOffset(x, y - this._getLinePixel(lineIndex));
line.destroy();
return offset;
} | [
"function",
"(",
"x",
",",
"y",
")",
"{",
"if",
"(",
"!",
"this",
".",
"_clientDiv",
")",
"{",
"return",
"0",
";",
"}",
"var",
"lineIndex",
"=",
"this",
".",
"_getLineIndex",
"(",
"y",
")",
";",
"var",
"line",
"=",
"this",
".",
"_getLine",
"(",
... | Returns the character offset nearest to the given pixel location. The
pixel location is relative to the document.
@param x the x of the location
@param y the y of the location
@returns {Number} the character offset at the given location.
@see orion.editor.TextView#getLocationAtOffset | [
"Returns",
"the",
"character",
"offset",
"nearest",
"to",
"the",
"given",
"pixel",
"location",
".",
"The",
"pixel",
"location",
"is",
"relative",
"to",
"the",
"document",
"."
] | eb2583100c662b5cfc1b461a978b31d3b8555ce1 | https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.editor/web/orion/editor/textView.js#L2329-L2336 | |
14,409 | eclipse/orion.client | bundles/org.eclipse.orion.client.editor/web/orion/editor/textView.js | function (mode) {
var keyModes = this._keyModes;
for (var i=0; i<keyModes.length; i++) {
if (keyModes[i] === mode) {
keyModes.splice(i, 1);
break;
}
}
//TODO: API needed for this
if (mode._modeRemoved) {
mode._modeRemoved();
}
} | javascript | function (mode) {
var keyModes = this._keyModes;
for (var i=0; i<keyModes.length; i++) {
if (keyModes[i] === mode) {
keyModes.splice(i, 1);
break;
}
}
//TODO: API needed for this
if (mode._modeRemoved) {
mode._modeRemoved();
}
} | [
"function",
"(",
"mode",
")",
"{",
"var",
"keyModes",
"=",
"this",
".",
"_keyModes",
";",
"for",
"(",
"var",
"i",
"=",
"0",
";",
"i",
"<",
"keyModes",
".",
"length",
";",
"i",
"++",
")",
"{",
"if",
"(",
"keyModes",
"[",
"i",
"]",
"===",
"mode",... | Removes a key mode from the text view.
@param {orion.editor.KeyMode} mode the key mode. | [
"Removes",
"a",
"key",
"mode",
"from",
"the",
"text",
"view",
"."
] | eb2583100c662b5cfc1b461a978b31d3b8555ce1 | https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.editor/web/orion/editor/textView.js#L3021-L3033 | |
14,410 | eclipse/orion.client | bundles/org.eclipse.orion.client.editor/web/orion/editor/textView.js | function (ruler) {
var rulers = this._rulers;
for (var i=0; i<rulers.length; i++) {
if (rulers[i] === ruler) {
rulers.splice(i, 1);
ruler.setView(null);
this._destroyRuler(ruler);
this._update();
break;
}
}
} | javascript | function (ruler) {
var rulers = this._rulers;
for (var i=0; i<rulers.length; i++) {
if (rulers[i] === ruler) {
rulers.splice(i, 1);
ruler.setView(null);
this._destroyRuler(ruler);
this._update();
break;
}
}
} | [
"function",
"(",
"ruler",
")",
"{",
"var",
"rulers",
"=",
"this",
".",
"_rulers",
";",
"for",
"(",
"var",
"i",
"=",
"0",
";",
"i",
"<",
"rulers",
".",
"length",
";",
"i",
"++",
")",
"{",
"if",
"(",
"rulers",
"[",
"i",
"]",
"===",
"ruler",
")"... | Removes a ruler from the text view.
@param {orion.editor.Ruler} ruler the ruler. | [
"Removes",
"a",
"ruler",
"from",
"the",
"text",
"view",
"."
] | eb2583100c662b5cfc1b461a978b31d3b8555ce1 | https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.editor/web/orion/editor/textView.js#L3039-L3050 | |
14,411 | eclipse/orion.client | bundles/org.eclipse.orion.client.editor/web/orion/editor/textView.js | function(offset, show, callback) {
var charCount = this._model.getCharCount();
offset = Math.max(0, Math.min (offset, charCount));
var selection = new Selection(offset, offset, false);
this._setSelection (selection, show === undefined || show, true, callback);
} | javascript | function(offset, show, callback) {
var charCount = this._model.getCharCount();
offset = Math.max(0, Math.min (offset, charCount));
var selection = new Selection(offset, offset, false);
this._setSelection (selection, show === undefined || show, true, callback);
} | [
"function",
"(",
"offset",
",",
"show",
",",
"callback",
")",
"{",
"var",
"charCount",
"=",
"this",
".",
"_model",
".",
"getCharCount",
"(",
")",
";",
"offset",
"=",
"Math",
".",
"max",
"(",
"0",
",",
"Math",
".",
"min",
"(",
"offset",
",",
"charCo... | Sets the caret offset relative to the start of the document.
@param {Number} caret the caret offset relative to the start of the document.
@param {Boolean|Number|orion.editor.TextViewShowOptions} [show=true]
if <code>true</code>, the view will scroll the minimum amount necessary to show the caret location. If
<code>sh... | [
"Sets",
"the",
"caret",
"offset",
"relative",
"to",
"the",
"start",
"of",
"the",
"document",
"."
] | eb2583100c662b5cfc1b461a978b31d3b8555ce1 | https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.editor/web/orion/editor/textView.js#L3121-L3126 | |
14,412 | eclipse/orion.client | bundles/org.eclipse.orion.client.editor/web/orion/editor/textView.js | function(model) {
if (model === this._model) { return; }
model = model || new mTextModel.TextModel();
this._model.removeEventListener("preChanging", this._modelListener.onChanging); //$NON-NLS-1$
this._model.removeEventListener("postChanged", this._modelListener.onChanged); //$NON-NLS-1$
var oldLineCount... | javascript | function(model) {
if (model === this._model) { return; }
model = model || new mTextModel.TextModel();
this._model.removeEventListener("preChanging", this._modelListener.onChanging); //$NON-NLS-1$
this._model.removeEventListener("postChanged", this._modelListener.onChanged); //$NON-NLS-1$
var oldLineCount... | [
"function",
"(",
"model",
")",
"{",
"if",
"(",
"model",
"===",
"this",
".",
"_model",
")",
"{",
"return",
";",
"}",
"model",
"=",
"model",
"||",
"new",
"mTextModel",
".",
"TextModel",
"(",
")",
";",
"this",
".",
"_model",
".",
"removeEventListener",
... | Sets the text model of the text view.
@param {orion.editor.TextModel} model the text model of the view. | [
"Sets",
"the",
"text",
"model",
"of",
"the",
"text",
"view",
"."
] | eb2583100c662b5cfc1b461a978b31d3b8555ce1 | https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.editor/web/orion/editor/textView.js#L3173-L3207 | |
14,413 | eclipse/orion.client | bundles/org.eclipse.orion.client.editor/web/orion/editor/textView.js | function (options) {
var defaultOptions = this._defaultOptions();
for (var option in options) {
if (options.hasOwnProperty(option)) {
var newValue = options[option], oldValue = this["_" + option]; //$NON-NLS-1$
if (compare(oldValue, newValue)) { continue; }
var update = defaultOptions[option] ?... | javascript | function (options) {
var defaultOptions = this._defaultOptions();
for (var option in options) {
if (options.hasOwnProperty(option)) {
var newValue = options[option], oldValue = this["_" + option]; //$NON-NLS-1$
if (compare(oldValue, newValue)) { continue; }
var update = defaultOptions[option] ?... | [
"function",
"(",
"options",
")",
"{",
"var",
"defaultOptions",
"=",
"this",
".",
"_defaultOptions",
"(",
")",
";",
"for",
"(",
"var",
"option",
"in",
"options",
")",
"{",
"if",
"(",
"options",
".",
"hasOwnProperty",
"(",
"option",
")",
")",
"{",
"var",... | Sets the view options for the view.
@param {orion.editor.TextViewOptions} options the view options.
@see orion.editor.TextView#getOptions | [
"Sets",
"the",
"view",
"options",
"for",
"the",
"view",
"."
] | eb2583100c662b5cfc1b461a978b31d3b8555ce1 | https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.editor/web/orion/editor/textView.js#L3215-L3230 | |
14,414 | eclipse/orion.client | bundles/org.eclipse.orion.client.javascript/web/javascript/quickFixes.js | function(editorContext, context, astManager) {
return astManager.getAST(editorContext).then(function(ast) {
var node = Finder.findNode(context.annotation.start, ast, {parents:true});
if(node && node.type === 'ArrayExpression') {
var model = new TextMod... | javascript | function(editorContext, context, astManager) {
return astManager.getAST(editorContext).then(function(ast) {
var node = Finder.findNode(context.annotation.start, ast, {parents:true});
if(node && node.type === 'ArrayExpression') {
var model = new TextMod... | [
"function",
"(",
"editorContext",
",",
"context",
",",
"astManager",
")",
"{",
"return",
"astManager",
".",
"getAST",
"(",
"editorContext",
")",
".",
"then",
"(",
"function",
"(",
"ast",
")",
"{",
"var",
"node",
"=",
"Finder",
".",
"findNode",
"(",
"cont... | fix for the no-sparse-arrays linting rule
@callback | [
"fix",
"for",
"the",
"no",
"-",
"sparse",
"-",
"arrays",
"linting",
"rule"
] | eb2583100c662b5cfc1b461a978b31d3b8555ce1 | https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.javascript/web/javascript/quickFixes.js#L347-L391 | |
14,415 | eclipse/orion.client | bundles/org.eclipse.orion.client.javascript/web/eslint/lib/rules/no-const-assign.js | isModifyingReference | function isModifyingReference(reference, index, references) {
var identifier = reference.identifier;
return identifier &&
reference.init === false &&
reference.isWrite() &&
// Destructuring assignments can have multiple default value,
// so possibly there are multiple writeable references for the... | javascript | function isModifyingReference(reference, index, references) {
var identifier = reference.identifier;
return identifier &&
reference.init === false &&
reference.isWrite() &&
// Destructuring assignments can have multiple default value,
// so possibly there are multiple writeable references for the... | [
"function",
"isModifyingReference",
"(",
"reference",
",",
"index",
",",
"references",
")",
"{",
"var",
"identifier",
"=",
"reference",
".",
"identifier",
";",
"return",
"identifier",
"&&",
"reference",
".",
"init",
"===",
"false",
"&&",
"reference",
".",
"isW... | Checks reference if is non initializer and writable.
@param {Reference} reference - A reference to check.
@param {int} index - The index of the reference in the references.
@param {Reference[]} references - The array that the reference belongs to.
@returns {boolean} Success/Failure
@private | [
"Checks",
"reference",
"if",
"is",
"non",
"initializer",
"and",
"writable",
"."
] | eb2583100c662b5cfc1b461a978b31d3b8555ce1 | https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.javascript/web/eslint/lib/rules/no-const-assign.js#L26-L36 |
14,416 | eclipse/orion.client | bundles/org.eclipse.orion.client.debug/web/orion/debug/breakpoint.js | function(location, line, description, enabled) {
this.location = location;
this.line = line;
this.description = description;
this.enabled = enabled;
} | javascript | function(location, line, description, enabled) {
this.location = location;
this.line = line;
this.description = description;
this.enabled = enabled;
} | [
"function",
"(",
"location",
",",
"line",
",",
"description",
",",
"enabled",
")",
"{",
"this",
".",
"location",
"=",
"location",
";",
"this",
".",
"line",
"=",
"line",
";",
"this",
".",
"description",
"=",
"description",
";",
"this",
".",
"enabled",
"... | Line breakpoint class.
@class {orion.debug.LineBreakpoint}
@implements {orion.debug.IBreakpoint}
@param {string} location - Location of document
@param {number} line
@param {string} description - Description HTML
@param {boolean} enabled | [
"Line",
"breakpoint",
"class",
"."
] | eb2583100c662b5cfc1b461a978b31d3b8555ce1 | https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.debug/web/orion/debug/breakpoint.js#L91-L96 | |
14,417 | eclipse/orion.client | bundles/org.eclipse.orion.client.debug/web/orion/debug/breakpoint.js | function(location, functionName, description, enabled) {
this.location = location;
this.function = functionName;
this.description = description;
this.enabled = enabled;
} | javascript | function(location, functionName, description, enabled) {
this.location = location;
this.function = functionName;
this.description = description;
this.enabled = enabled;
} | [
"function",
"(",
"location",
",",
"functionName",
",",
"description",
",",
"enabled",
")",
"{",
"this",
".",
"location",
"=",
"location",
";",
"this",
".",
"function",
"=",
"functionName",
";",
"this",
".",
"description",
"=",
"description",
";",
"this",
"... | Function breakpoint class.
@class {orion.debug.FunctionBreakpoint}
@implements {orion.debug.IBreakpoint}
@param {string} location - Location of document
@param {string} functionName - function name
@param {string} description - Description HTML
@param {boolean} enabled | [
"Function",
"breakpoint",
"class",
"."
] | eb2583100c662b5cfc1b461a978b31d3b8555ce1 | https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.debug/web/orion/debug/breakpoint.js#L178-L183 | |
14,418 | eclipse/orion.client | bundles/org.eclipse.orion.client.debug/web/orion/debug/breakpoint.js | deserialize | function deserialize(plain) {
plain = plain || {};
plain.location = plain.location || "";
plain.description = plain.description || "";
switch (plain.type) {
case 'LineBookmark':
if (!isFinite(plain.line)) break;
return new LineBookmark(plain.lo... | javascript | function deserialize(plain) {
plain = plain || {};
plain.location = plain.location || "";
plain.description = plain.description || "";
switch (plain.type) {
case 'LineBookmark':
if (!isFinite(plain.line)) break;
return new LineBookmark(plain.lo... | [
"function",
"deserialize",
"(",
"plain",
")",
"{",
"plain",
"=",
"plain",
"||",
"{",
"}",
";",
"plain",
".",
"location",
"=",
"plain",
".",
"location",
"||",
"\"\"",
";",
"plain",
".",
"description",
"=",
"plain",
".",
"description",
"||",
"\"\"",
";",... | Deserialize a breakpoint from a plain object
@param {Object}
@return {orion.debug.IBreakpoint} | [
"Deserialize",
"a",
"breakpoint",
"from",
"a",
"plain",
"object"
] | eb2583100c662b5cfc1b461a978b31d3b8555ce1 | https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.debug/web/orion/debug/breakpoint.js#L253-L280 |
14,419 | eclipse/orion.client | bundles/org.eclipse.orion.client.ui/web/orion/explorers/explorer.js | Explorer | function Explorer(serviceRegistry, selection, renderer, commandRegistry) {
this.registry = serviceRegistry;
this.selection = selection;
this.commandService = commandRegistry;
this.setRenderer(renderer);
this.myTree = null;
} | javascript | function Explorer(serviceRegistry, selection, renderer, commandRegistry) {
this.registry = serviceRegistry;
this.selection = selection;
this.commandService = commandRegistry;
this.setRenderer(renderer);
this.myTree = null;
} | [
"function",
"Explorer",
"(",
"serviceRegistry",
",",
"selection",
",",
"renderer",
",",
"commandRegistry",
")",
"{",
"this",
".",
"registry",
"=",
"serviceRegistry",
";",
"this",
".",
"selection",
"=",
"selection",
";",
"this",
".",
"commandService",
"=",
"com... | Creates a new explorer.
@name orion.explorer.Explorer
@class A table-based explorer component.
@param {orion.serviceregistry.ServiceRegistry} serviceRegistry The service registry to
use for any services required by the explorer
@param {orion.selection.Selection} selection The initial selection
@param renderer
@param {... | [
"Creates",
"a",
"new",
"explorer",
"."
] | eb2583100c662b5cfc1b461a978b31d3b8555ce1 | https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.ui/web/orion/explorers/explorer.js#L38-L45 |
14,420 | eclipse/orion.client | bundles/org.eclipse.orion.client.ui/web/orion/explorers/explorer.js | function(parent, children) {
if (this.myTree) {
this.myTree.refresh.bind(this.myTree)(parent, children, true);
}
} | javascript | function(parent, children) {
if (this.myTree) {
this.myTree.refresh.bind(this.myTree)(parent, children, true);
}
} | [
"function",
"(",
"parent",
",",
"children",
")",
"{",
"if",
"(",
"this",
".",
"myTree",
")",
"{",
"this",
".",
"myTree",
".",
"refresh",
".",
"bind",
"(",
"this",
".",
"myTree",
")",
"(",
"parent",
",",
"children",
",",
"true",
")",
";",
"}",
"}"... | we have changed an item on the server at the specified parent node | [
"we",
"have",
"changed",
"an",
"item",
"on",
"the",
"server",
"at",
"the",
"specified",
"parent",
"node"
] | eb2583100c662b5cfc1b461a978b31d3b8555ce1 | https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.ui/web/orion/explorers/explorer.js#L92-L96 | |
14,421 | eclipse/orion.client | bundles/org.eclipse.orion.client.ui/web/orion/explorers/explorer.js | function() {
var topLevelNodes = this._navHandler.getTopLevelNodes();
for (var i = 0; i < topLevelNodes.length ; i++){
this.myTree.collapse(topLevelNodes[i]);
}
} | javascript | function() {
var topLevelNodes = this._navHandler.getTopLevelNodes();
for (var i = 0; i < topLevelNodes.length ; i++){
this.myTree.collapse(topLevelNodes[i]);
}
} | [
"function",
"(",
")",
"{",
"var",
"topLevelNodes",
"=",
"this",
".",
"_navHandler",
".",
"getTopLevelNodes",
"(",
")",
";",
"for",
"(",
"var",
"i",
"=",
"0",
";",
"i",
"<",
"topLevelNodes",
".",
"length",
";",
"i",
"++",
")",
"{",
"this",
".",
"myT... | Collapse all the nodes in the explorer | [
"Collapse",
"all",
"the",
"nodes",
"in",
"the",
"explorer"
] | eb2583100c662b5cfc1b461a978b31d3b8555ce1 | https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.ui/web/orion/explorers/explorer.js#L158-L163 | |
14,422 | eclipse/orion.client | bundles/org.eclipse.orion.client.ui/web/orion/explorers/explorer.js | function(nodeModel, excludes) {
if(nodeModel){
this._expandRecursively(nodeModel, excludes);
} else {
if(!this._navHandler){
return;
}
//We already know what the top level children is under the root, from the navigation handler.
var topLevelNodes = this._navHandler.getTopLevelNodes();
... | javascript | function(nodeModel, excludes) {
if(nodeModel){
this._expandRecursively(nodeModel, excludes);
} else {
if(!this._navHandler){
return;
}
//We already know what the top level children is under the root, from the navigation handler.
var topLevelNodes = this._navHandler.getTopLevelNodes();
... | [
"function",
"(",
"nodeModel",
",",
"excludes",
")",
"{",
"if",
"(",
"nodeModel",
")",
"{",
"this",
".",
"_expandRecursively",
"(",
"nodeModel",
",",
"excludes",
")",
";",
"}",
"else",
"{",
"if",
"(",
"!",
"this",
".",
"_navHandler",
")",
"{",
"return",... | Expand all the nodes under a node in the explorer
@param nodeModel {Object} the node model to be expanded. If not provided the whole tree is expanded recursively | [
"Expand",
"all",
"the",
"nodes",
"under",
"a",
"node",
"in",
"the",
"explorer"
] | eb2583100c662b5cfc1b461a978b31d3b8555ce1 | https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.ui/web/orion/explorers/explorer.js#L169-L182 | |
14,423 | eclipse/orion.client | bundles/org.eclipse.orion.client.ui/web/orion/explorers/explorer.js | function (parentId, model, options){
parentId = typeof parentId === "string" ? parentId : (parentId.id || parentId); //$NON-NLS-0$
if(this.selection) {
this.selection.setSelections([]);
}
if(this.getNavHandler()){
this.getNavHandler().destroy();
this._navHandler = null;
}
var treeId = pare... | javascript | function (parentId, model, options){
parentId = typeof parentId === "string" ? parentId : (parentId.id || parentId); //$NON-NLS-0$
if(this.selection) {
this.selection.setSelections([]);
}
if(this.getNavHandler()){
this.getNavHandler().destroy();
this._navHandler = null;
}
var treeId = pare... | [
"function",
"(",
"parentId",
",",
"model",
",",
"options",
")",
"{",
"parentId",
"=",
"typeof",
"parentId",
"===",
"\"string\"",
"?",
"parentId",
":",
"(",
"parentId",
".",
"id",
"||",
"parentId",
")",
";",
"//$NON-NLS-0$",
"if",
"(",
"this",
".",
"selec... | Displays tree table containing filled with data provided by given model
@param {String|Element} parentId id of parent dom element, or the element itself
@param {Object} model providing data to display
@param {Object} options optional parameters of the tree(custom indent, onCollapse callback) | [
"Displays",
"tree",
"table",
"containing",
"filled",
"with",
"data",
"provided",
"by",
"given",
"model"
] | eb2583100c662b5cfc1b461a978b31d3b8555ce1 | https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.ui/web/orion/explorers/explorer.js#L220-L279 | |
14,424 | eclipse/orion.client | bundles/org.eclipse.orion.client.ui/web/orion/explorers/explorer.js | ExplorerModel | function ExplorerModel(rootPath, /* function returning promise */fetchItems, idPrefix) {
this.rootPath = rootPath;
this.fetchItems = fetchItems;
this.idPrefix = idPrefix || "";
} | javascript | function ExplorerModel(rootPath, /* function returning promise */fetchItems, idPrefix) {
this.rootPath = rootPath;
this.fetchItems = fetchItems;
this.idPrefix = idPrefix || "";
} | [
"function",
"ExplorerModel",
"(",
"rootPath",
",",
"/* function returning promise */",
"fetchItems",
",",
"idPrefix",
")",
"{",
"this",
".",
"rootPath",
"=",
"rootPath",
";",
"this",
".",
"fetchItems",
"=",
"fetchItems",
";",
"this",
".",
"idPrefix",
"=",
"idPre... | Creates a new explorer model instance.
@name orion.explorer.ExplorerModel
@class Simple tree model using Children and ChildrenLocation attributes to fetch children
and calculating id based on Location attribute. | [
"Creates",
"a",
"new",
"explorer",
"model",
"instance",
"."
] | eb2583100c662b5cfc1b461a978b31d3b8555ce1 | https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.ui/web/orion/explorers/explorer.js#L418-L422 |
14,425 | eclipse/orion.client | bundles/org.eclipse.orion.client.ui/web/orion/explorers/explorer.js | ExplorerFlatModel | function ExplorerFlatModel(rootPath, fetchItems, root) {
this.rootPath = rootPath;
this.fetchItems = fetchItems;
this.root = root;
} | javascript | function ExplorerFlatModel(rootPath, fetchItems, root) {
this.rootPath = rootPath;
this.fetchItems = fetchItems;
this.root = root;
} | [
"function",
"ExplorerFlatModel",
"(",
"rootPath",
",",
"fetchItems",
",",
"root",
")",
"{",
"this",
".",
"rootPath",
"=",
"rootPath",
";",
"this",
".",
"fetchItems",
"=",
"fetchItems",
";",
"this",
".",
"root",
"=",
"root",
";",
"}"
] | Creates a new flat explorer model.
@name orion.explorer.ExplorerFlatModel
@class Tree model used by orion.explorer.Explorer for flat structures
@param {String} rootPath path to load tree table root, response should contain a list of items
@param {Function} fetchItems A function that returns a promise that resolves to t... | [
"Creates",
"a",
"new",
"flat",
"explorer",
"model",
"."
] | eb2583100c662b5cfc1b461a978b31d3b8555ce1 | https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.ui/web/orion/explorers/explorer.js#L483-L487 |
14,426 | eclipse/orion.client | bundles/org.eclipse.orion.client.ui/web/orion/explorers/explorer.js | function(prefPath) {
var didRestoreSelections = false;
var expanded = window.sessionStorage[prefPath+"expanded"]; //$NON-NLS-0$
if (typeof expanded=== "string") { //$NON-NLS-0$
if (expanded.length > 0) {
expanded= JSON.parse(expanded);
} else {
expanded = null;
}
}
var i;
if (exp... | javascript | function(prefPath) {
var didRestoreSelections = false;
var expanded = window.sessionStorage[prefPath+"expanded"]; //$NON-NLS-0$
if (typeof expanded=== "string") { //$NON-NLS-0$
if (expanded.length > 0) {
expanded= JSON.parse(expanded);
} else {
expanded = null;
}
}
var i;
if (exp... | [
"function",
"(",
"prefPath",
")",
"{",
"var",
"didRestoreSelections",
"=",
"false",
";",
"var",
"expanded",
"=",
"window",
".",
"sessionStorage",
"[",
"prefPath",
"+",
"\"expanded\"",
"]",
";",
"//$NON-NLS-0$",
"if",
"(",
"typeof",
"expanded",
"===",
"\"string... | returns true if the selections also need to be restored. | [
"returns",
"true",
"if",
"the",
"selections",
"also",
"need",
"to",
"be",
"restored",
"."
] | eb2583100c662b5cfc1b461a978b31d3b8555ce1 | https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.ui/web/orion/explorers/explorer.js#L743-L769 | |
14,427 | eclipse/orion.client | bundles/org.eclipse.orion.client.ui/web/orion/explorers/explorer.js | SimpleFlatModel | function SimpleFlatModel(items, idPrefix, getKey) {
this.items = items;
this.getKey = getKey;
this.idPrefix = idPrefix;
this.root = {children: items};
} | javascript | function SimpleFlatModel(items, idPrefix, getKey) {
this.items = items;
this.getKey = getKey;
this.idPrefix = idPrefix;
this.root = {children: items};
} | [
"function",
"SimpleFlatModel",
"(",
"items",
",",
"idPrefix",
",",
"getKey",
")",
"{",
"this",
".",
"items",
"=",
"items",
";",
"this",
".",
"getKey",
"=",
"getKey",
";",
"this",
".",
"idPrefix",
"=",
"idPrefix",
";",
"this",
".",
"root",
"=",
"{",
"... | Creates a new flat model based on an array of items already known.
@name orion.explorer.SimpleFlatModel
@param {Array} items the items in the model
@param {String} idPrefix string used to prefix generated id's
@param {Function} getKey function used to get the property name used for generating an id in the model | [
"Creates",
"a",
"new",
"flat",
"model",
"based",
"on",
"an",
"array",
"of",
"items",
"already",
"known",
"."
] | eb2583100c662b5cfc1b461a978b31d3b8555ce1 | https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.ui/web/orion/explorers/explorer.js#L1033-L1038 |
14,428 | eclipse/orion.client | bundles/org.eclipse.orion.client.core/web/orion/fileUtils.js | makeRelative | function makeRelative(location) {
if (!location) {
return location;
}
var hostName = window.location.protocol + "//" + window.location.host; //$NON-NLS-0$
if (location.indexOf(hostName) === 0) {
return location.substring(hostName.length);
}
return location;
} | javascript | function makeRelative(location) {
if (!location) {
return location;
}
var hostName = window.location.protocol + "//" + window.location.host; //$NON-NLS-0$
if (location.indexOf(hostName) === 0) {
return location.substring(hostName.length);
}
return location;
} | [
"function",
"makeRelative",
"(",
"location",
")",
"{",
"if",
"(",
"!",
"location",
")",
"{",
"return",
"location",
";",
"}",
"var",
"hostName",
"=",
"window",
".",
"location",
".",
"protocol",
"+",
"\"//\"",
"+",
"window",
".",
"location",
".",
"host",
... | This class contains static utility methods. It is not intended to be instantiated.
@class This class contains static utility methods.
@name orion.fileUtils | [
"This",
"class",
"contains",
"static",
"utility",
"methods",
".",
"It",
"is",
"not",
"intended",
"to",
"be",
"instantiated",
"."
] | eb2583100c662b5cfc1b461a978b31d3b8555ce1 | https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.core/web/orion/fileUtils.js#L40-L49 |
14,429 | eclipse/orion.client | bundles/org.eclipse.orion.client.core/web/orion/fileUtils.js | isAtRoot | function isAtRoot(path) {
if (!path) {
return false;
}
if (path === "/workspace") {
return true; // sad but true
}
var pathUrl = new URL(path, window.location.href);
return pathUrl.href.indexOf(_workspaceUrlHref) === 0; //$NON-NLS-0$
} | javascript | function isAtRoot(path) {
if (!path) {
return false;
}
if (path === "/workspace") {
return true; // sad but true
}
var pathUrl = new URL(path, window.location.href);
return pathUrl.href.indexOf(_workspaceUrlHref) === 0; //$NON-NLS-0$
} | [
"function",
"isAtRoot",
"(",
"path",
")",
"{",
"if",
"(",
"!",
"path",
")",
"{",
"return",
"false",
";",
"}",
"if",
"(",
"path",
"===",
"\"/workspace\"",
")",
"{",
"return",
"true",
";",
"// sad but true",
"}",
"var",
"pathUrl",
"=",
"new",
"URL",
"(... | Determines if the path represents the workspace root
@name orion.util#isAtRoot
@function | [
"Determines",
"if",
"the",
"path",
"represents",
"the",
"workspace",
"root"
] | eb2583100c662b5cfc1b461a978b31d3b8555ce1 | https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.core/web/orion/fileUtils.js#L63-L72 |
14,430 | eclipse/orion.client | bundles/org.eclipse.orion.client.ui/web/gcli/gcli/ui/fields/javascript.js | JavascriptField | function JavascriptField(type, options) {
Field.call(this, type, options);
this.onInputChange = this.onInputChange.bind(this);
this.arg = new ScriptArgument('', '{ ', ' }');
this.element = util.createElement(this.document, 'div');
this.input = util.createElement(this.document, 'input');
this.input.type =... | javascript | function JavascriptField(type, options) {
Field.call(this, type, options);
this.onInputChange = this.onInputChange.bind(this);
this.arg = new ScriptArgument('', '{ ', ' }');
this.element = util.createElement(this.document, 'div');
this.input = util.createElement(this.document, 'input');
this.input.type =... | [
"function",
"JavascriptField",
"(",
"type",
",",
"options",
")",
"{",
"Field",
".",
"call",
"(",
"this",
",",
"type",
",",
"options",
")",
";",
"this",
".",
"onInputChange",
"=",
"this",
".",
"onInputChange",
".",
"bind",
"(",
"this",
")",
";",
"this",... | A field that allows editing of javascript | [
"A",
"field",
"that",
"allows",
"editing",
"of",
"javascript"
] | eb2583100c662b5cfc1b461a978b31d3b8555ce1 | https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.ui/web/gcli/gcli/ui/fields/javascript.js#L49-L79 |
14,431 | eclipse/orion.client | bundles/org.eclipse.orion.client.ui/web/orion/dynamicContent.js | ProgressSpinner | function ProgressSpinner(id, anchor){
if(id === undefined){ throw new Error("Missing reqired argument: id"); }
if(anchor === undefined){ throw new Error("Missing reqired argument: anchor"); }
this._id = id;
this._anchor = anchor;
// we add a prefix for the id label
this._prefix = "progressSpin... | javascript | function ProgressSpinner(id, anchor){
if(id === undefined){ throw new Error("Missing reqired argument: id"); }
if(anchor === undefined){ throw new Error("Missing reqired argument: anchor"); }
this._id = id;
this._anchor = anchor;
// we add a prefix for the id label
this._prefix = "progressSpin... | [
"function",
"ProgressSpinner",
"(",
"id",
",",
"anchor",
")",
"{",
"if",
"(",
"id",
"===",
"undefined",
")",
"{",
"throw",
"new",
"Error",
"(",
"\"Missing reqired argument: id\"",
")",
";",
"}",
"if",
"(",
"anchor",
"===",
"undefined",
")",
"{",
"throw",
... | Progress indicator in form of a simple spinner.
@param id [required] unique identifier, e.g. the row number in which the spinner is created
@param anchor [required] father DOM node for the created spinner
@returns ProgressSpinner object | [
"Progress",
"indicator",
"in",
"form",
"of",
"a",
"simple",
"spinner",
"."
] | eb2583100c662b5cfc1b461a978b31d3b8555ce1 | https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.ui/web/orion/dynamicContent.js#L28-L37 |
14,432 | eclipse/orion.client | bundles/org.eclipse.orion.client.ui/web/orion/dynamicContent.js | ProgressDots | function ProgressDots(id, anchor){
if(id === undefined){ throw new Error("Missing reqired argument: id"); }
if(anchor === undefined){ throw new Error("Missing reqired argument: anchor"); }
this._id = id;
this._anchor = anchor;
// we add a prefix for the id label
this._prefix = "progressDots:";... | javascript | function ProgressDots(id, anchor){
if(id === undefined){ throw new Error("Missing reqired argument: id"); }
if(anchor === undefined){ throw new Error("Missing reqired argument: anchor"); }
this._id = id;
this._anchor = anchor;
// we add a prefix for the id label
this._prefix = "progressDots:";... | [
"function",
"ProgressDots",
"(",
"id",
",",
"anchor",
")",
"{",
"if",
"(",
"id",
"===",
"undefined",
")",
"{",
"throw",
"new",
"Error",
"(",
"\"Missing reqired argument: id\"",
")",
";",
"}",
"if",
"(",
"anchor",
"===",
"undefined",
")",
"{",
"throw",
"n... | Default progress indicator in form of three dots.
@param id [required] unique identifier, e.g. the row number in which the spinner is created
@param anchor [required] father DOM node for the created spinner
@returns ProgressDots object | [
"Default",
"progress",
"indicator",
"in",
"form",
"of",
"three",
"dots",
"."
] | eb2583100c662b5cfc1b461a978b31d3b8555ce1 | https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.ui/web/orion/dynamicContent.js#L88-L97 |
14,433 | eclipse/orion.client | bundles/org.eclipse.orion.client.ui/web/orion/dynamicContent.js | DynamicContentModel | function DynamicContentModel(objects, populate){
if(!objects) { throw new Error("Missing reqired argument: objects"); }
if(!populate) { throw new Error("Missing reqired argument: populate"); }
this._objects = objects;
this._populate = populate;
} | javascript | function DynamicContentModel(objects, populate){
if(!objects) { throw new Error("Missing reqired argument: objects"); }
if(!populate) { throw new Error("Missing reqired argument: populate"); }
this._objects = objects;
this._populate = populate;
} | [
"function",
"DynamicContentModel",
"(",
"objects",
",",
"populate",
")",
"{",
"if",
"(",
"!",
"objects",
")",
"{",
"throw",
"new",
"Error",
"(",
"\"Missing reqired argument: objects\"",
")",
";",
"}",
"if",
"(",
"!",
"populate",
")",
"{",
"throw",
"new",
"... | Dynamic content model which handles the population logic
@param objects [required] collection of objects to be populated
@param populate [required] population function (i), which populates the i-th object in the collection
@returns DynamicContentModel object | [
"Dynamic",
"content",
"model",
"which",
"handles",
"the",
"population",
"logic"
] | eb2583100c662b5cfc1b461a978b31d3b8555ce1 | https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.ui/web/orion/dynamicContent.js#L151-L157 |
14,434 | eclipse/orion.client | bundles/org.eclipse.orion.client.ui/web/orion/dynamicContent.js | function(i){
return function(resp){
if(that._errorHandler) { that._errorHandler(i, resp); }
else { throw new Error(resp); }
};
} | javascript | function(i){
return function(resp){
if(that._errorHandler) { that._errorHandler(i, resp); }
else { throw new Error(resp); }
};
} | [
"function",
"(",
"i",
")",
"{",
"return",
"function",
"(",
"resp",
")",
"{",
"if",
"(",
"that",
".",
"_errorHandler",
")",
"{",
"that",
".",
"_errorHandler",
"(",
"i",
",",
"resp",
")",
";",
"}",
"else",
"{",
"throw",
"new",
"Error",
"(",
"resp",
... | called if the i-th object could not be successfully populated | [
"called",
"if",
"the",
"i",
"-",
"th",
"object",
"could",
"not",
"be",
"successfully",
"populated"
] | eb2583100c662b5cfc1b461a978b31d3b8555ce1 | https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.ui/web/orion/dynamicContent.js#L247-L252 | |
14,435 | eclipse/orion.client | bundles/org.eclipse.orion.client.ui/web/orion/explorers/fileDetailRenderer.js | function(item, tableRow) {
mExplorer.SelectionRenderer.prototype.renderRow.call(this, item, tableRow);
if (item.type !== "file") { //$NON-NLS-0$
tableRow.classList.add("searchDetailRow"); //$NON-NLS-0$
}
} | javascript | function(item, tableRow) {
mExplorer.SelectionRenderer.prototype.renderRow.call(this, item, tableRow);
if (item.type !== "file") { //$NON-NLS-0$
tableRow.classList.add("searchDetailRow"); //$NON-NLS-0$
}
} | [
"function",
"(",
"item",
",",
"tableRow",
")",
"{",
"mExplorer",
".",
"SelectionRenderer",
".",
"prototype",
".",
"renderRow",
".",
"call",
"(",
"this",
",",
"item",
",",
"tableRow",
")",
";",
"if",
"(",
"item",
".",
"type",
"!==",
"\"file\"",
")",
"{"... | Overrides Explorer.SelectionRenderer.prototype.renderRow | [
"Overrides",
"Explorer",
".",
"SelectionRenderer",
".",
"prototype",
".",
"renderRow"
] | eb2583100c662b5cfc1b461a978b31d3b8555ce1 | https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.ui/web/orion/explorers/fileDetailRenderer.js#L138-L143 | |
14,436 | eclipse/orion.client | bundles/org.eclipse.orion.client.javascript/web/eslint/lib/rules/no-native-reassign.js | checkReference | function checkReference(reference, index, references) {
var identifier = reference.identifier;
if (reference.init === false &&
reference.isWrite() &&
// Destructuring assignments can have multiple default value,
// so possibly there are multiple writeable references for the same identifier.
(inde... | javascript | function checkReference(reference, index, references) {
var identifier = reference.identifier;
if (reference.init === false &&
reference.isWrite() &&
// Destructuring assignments can have multiple default value,
// so possibly there are multiple writeable references for the same identifier.
(inde... | [
"function",
"checkReference",
"(",
"reference",
",",
"index",
",",
"references",
")",
"{",
"var",
"identifier",
"=",
"reference",
".",
"identifier",
";",
"if",
"(",
"reference",
".",
"init",
"===",
"false",
"&&",
"reference",
".",
"isWrite",
"(",
")",
"&&"... | Reports write references.
@param {Reference} reference - A reference to check.
@param {int} index - The index of the reference in the references.
@param {Reference[]} references - The array that the reference belongs to.
@returns {void} | [
"Reports",
"write",
"references",
"."
] | eb2583100c662b5cfc1b461a978b31d3b8555ce1 | https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.javascript/web/eslint/lib/rules/no-native-reassign.js#L29-L44 |
14,437 | eclipse/orion.client | bundles/org.eclipse.orion.client.ui/web/orion/compare/compareTreeExplorer.js | CompareTreeModel | function CompareTreeModel(rootPath, fetchItems, root) {
this.rootPath = rootPath;
this.fetchItems = fetchItems;
this.root = root;
} | javascript | function CompareTreeModel(rootPath, fetchItems, root) {
this.rootPath = rootPath;
this.fetchItems = fetchItems;
this.root = root;
} | [
"function",
"CompareTreeModel",
"(",
"rootPath",
",",
"fetchItems",
",",
"root",
")",
"{",
"this",
".",
"rootPath",
"=",
"rootPath",
";",
"this",
".",
"fetchItems",
"=",
"fetchItems",
";",
"this",
".",
"root",
"=",
"root",
";",
"}"
] | Creates a new compare tree explorer.
@name orion.CompareTreeExplorer | [
"Creates",
"a",
"new",
"compare",
"tree",
"explorer",
"."
] | eb2583100c662b5cfc1b461a978b31d3b8555ce1 | https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.ui/web/orion/compare/compareTreeExplorer.js#L93-L97 |
14,438 | eclipse/orion.client | modules/orionode/lib/util/cryptoUtil.js | generateAuthToken | function generateAuthToken(bytes, callback) {
crypto.randomBytes(bytes, function(err, randomBytes) {
if(err) {
return callback(err);
}
callback(null, randomBytes.toString('hex'));
});
} | javascript | function generateAuthToken(bytes, callback) {
crypto.randomBytes(bytes, function(err, randomBytes) {
if(err) {
return callback(err);
}
callback(null, randomBytes.toString('hex'));
});
} | [
"function",
"generateAuthToken",
"(",
"bytes",
",",
"callback",
")",
"{",
"crypto",
".",
"randomBytes",
"(",
"bytes",
",",
"function",
"(",
"err",
",",
"randomBytes",
")",
"{",
"if",
"(",
"err",
")",
"{",
"return",
"callback",
"(",
"err",
")",
";",
"}"... | Generates an auth token of the given number of bytes
@param {number} bytes The number of bytes in length to make the token
@param {fn} callback The callback to be called with the new auth token
@since 18.0 | [
"Generates",
"an",
"auth",
"token",
"of",
"the",
"given",
"number",
"of",
"bytes"
] | eb2583100c662b5cfc1b461a978b31d3b8555ce1 | https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/modules/orionode/lib/util/cryptoUtil.js#L76-L83 |
14,439 | eclipse/orion.client | bundles/org.eclipse.orion.client.ui/web/orion/section.js | function() {
var parent;
if (this.domNode.tooltip) {
this.domNode.tooltip.destroy();
this.domNode.tooltip = null;
}
if (this.domNode) {
parent = this.domNode.parentNode;
if (parent) parent.removeChild(this.domNode);
this.domNode = null;
}
if (this._contentParent) {
parent = thi... | javascript | function() {
var parent;
if (this.domNode.tooltip) {
this.domNode.tooltip.destroy();
this.domNode.tooltip = null;
}
if (this.domNode) {
parent = this.domNode.parentNode;
if (parent) parent.removeChild(this.domNode);
this.domNode = null;
}
if (this._contentParent) {
parent = thi... | [
"function",
"(",
")",
"{",
"var",
"parent",
";",
"if",
"(",
"this",
".",
"domNode",
".",
"tooltip",
")",
"{",
"this",
".",
"domNode",
".",
"tooltip",
".",
"destroy",
"(",
")",
";",
"this",
".",
"domNode",
".",
"tooltip",
"=",
"null",
";",
"}",
"i... | Destroy the section by removing the title and content from the parent. | [
"Destroy",
"the",
"section",
"by",
"removing",
"the",
"title",
"and",
"content",
"from",
"the",
"parent",
"."
] | eb2583100c662b5cfc1b461a978b31d3b8555ce1 | https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.ui/web/orion/section.js#L344-L365 | |
14,440 | eclipse/orion.client | bundles/org.eclipse.orion.client.ui/web/orion/section.js | function(content){
if (typeof content === 'string') { //$NON-NLS-0$
this._contentParent.innerHTML = content;
} else {
this._contentParent.innerHTML = ""; //NON-NLS-0$
this._contentParent.appendChild(content);
}
} | javascript | function(content){
if (typeof content === 'string') { //$NON-NLS-0$
this._contentParent.innerHTML = content;
} else {
this._contentParent.innerHTML = ""; //NON-NLS-0$
this._contentParent.appendChild(content);
}
} | [
"function",
"(",
"content",
")",
"{",
"if",
"(",
"typeof",
"content",
"===",
"'string'",
")",
"{",
"//$NON-NLS-0$",
"this",
".",
"_contentParent",
".",
"innerHTML",
"=",
"content",
";",
"}",
"else",
"{",
"this",
".",
"_contentParent",
".",
"innerHTML",
"="... | Changes the contents of the section.
@param {String|DomNode} content | [
"Changes",
"the",
"contents",
"of",
"the",
"section",
"."
] | eb2583100c662b5cfc1b461a978b31d3b8555ce1 | https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.ui/web/orion/section.js#L403-L410 | |
14,441 | eclipse/orion.client | bundles/org.eclipse.orion.client.ui/web/gcli/util/util.js | withCommand | function withCommand(element, action) {
var command = element.getAttribute('data-command');
if (!command) {
command = element.querySelector('*[data-command]')
.getAttribute('data-command');
}
if (command) {
action(command);
}
else {
console.warn('Missing data-command for ' + util.fi... | javascript | function withCommand(element, action) {
var command = element.getAttribute('data-command');
if (!command) {
command = element.querySelector('*[data-command]')
.getAttribute('data-command');
}
if (command) {
action(command);
}
else {
console.warn('Missing data-command for ' + util.fi... | [
"function",
"withCommand",
"(",
"element",
",",
"action",
")",
"{",
"var",
"command",
"=",
"element",
".",
"getAttribute",
"(",
"'data-command'",
")",
";",
"if",
"(",
"!",
"command",
")",
"{",
"command",
"=",
"element",
".",
"querySelector",
"(",
"'*[data-... | Helper to find the 'data-command' attribute and call some action on it.
@see |updateCommand()| and |executeCommand()| | [
"Helper",
"to",
"find",
"the",
"data",
"-",
"command",
"attribute",
"and",
"call",
"some",
"action",
"on",
"it",
"."
] | eb2583100c662b5cfc1b461a978b31d3b8555ce1 | https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.ui/web/gcli/util/util.js#L681-L694 |
14,442 | eclipse/orion.client | modules/orionode/lib/tasks.js | deleteAllOperations | function deleteAllOperations(req, res) {
taskStore.getTasksForUser(req.user.username, function(err, tasks) {
if (err) {
return writeError(500, res, err.toString());
}
var locations = [];
var doneCount = 0;
var done = function() {
if (!tasks.length || ++doneCount === tasks.length) {
writeResponse(20... | javascript | function deleteAllOperations(req, res) {
taskStore.getTasksForUser(req.user.username, function(err, tasks) {
if (err) {
return writeError(500, res, err.toString());
}
var locations = [];
var doneCount = 0;
var done = function() {
if (!tasks.length || ++doneCount === tasks.length) {
writeResponse(20... | [
"function",
"deleteAllOperations",
"(",
"req",
",",
"res",
")",
"{",
"taskStore",
".",
"getTasksForUser",
"(",
"req",
".",
"user",
".",
"username",
",",
"function",
"(",
"err",
",",
"tasks",
")",
"{",
"if",
"(",
"err",
")",
"{",
"return",
"writeError",
... | Deletes all completed operations that the user sending the request had created. | [
"Deletes",
"all",
"completed",
"operations",
"that",
"the",
"user",
"sending",
"the",
"request",
"had",
"created",
"."
] | eb2583100c662b5cfc1b461a978b31d3b8555ce1 | https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/modules/orionode/lib/tasks.js#L249-L275 |
14,443 | eclipse/orion.client | bundles/org.eclipse.orion.client.ui/web/orion/links.js | function(text, parent) {
//define div if one isn't provided
var result = parent || document.createElement('div'); //$NON-NLS-0$
var linkScanners = this._registry.getServiceReferences("orion.core.linkScanner"); //$NON-NLS-0$
if (linkScanners.length > 0) {
//TODO: support multiple scanners by picking... | javascript | function(text, parent) {
//define div if one isn't provided
var result = parent || document.createElement('div'); //$NON-NLS-0$
var linkScanners = this._registry.getServiceReferences("orion.core.linkScanner"); //$NON-NLS-0$
if (linkScanners.length > 0) {
//TODO: support multiple scanners by picking... | [
"function",
"(",
"text",
",",
"parent",
")",
"{",
"//define div if one isn't provided\r",
"var",
"result",
"=",
"parent",
"||",
"document",
".",
"createElement",
"(",
"'div'",
")",
";",
"//$NON-NLS-0$\r",
"var",
"linkScanners",
"=",
"this",
".",
"_registry",
"."... | Adds links to an input text string. The links are added to the provided node, or to a new div
node if not input node is provided.
@param {String} text The string to compute links for
@param {Object} [parent] The optional parent DOM node to place the links into
@returns {Object} A DOM node containing the provided text a... | [
"Adds",
"links",
"to",
"an",
"input",
"text",
"string",
".",
"The",
"links",
"are",
"added",
"to",
"the",
"provided",
"node",
"or",
"to",
"a",
"new",
"div",
"node",
"if",
"not",
"input",
"node",
"is",
"provided",
"."
] | eb2583100c662b5cfc1b461a978b31d3b8555ce1 | https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.ui/web/orion/links.js#L69-L90 | |
14,444 | eclipse/orion.client | bundles/org.eclipse.orion.client.ui/web/orion/webui/Slideout.js | function(slideoutViewMode) {
this._previousActiveElement = document.activeElement;
lib.trapTabs(this._wrapperNode);
// replace _contentNode's contents
if (this._currentViewMode !== slideoutViewMode) {
lib.empty(this._contentNode);
this._contentNode.appendChild(slideoutViewMode.getWrapperN... | javascript | function(slideoutViewMode) {
this._previousActiveElement = document.activeElement;
lib.trapTabs(this._wrapperNode);
// replace _contentNode's contents
if (this._currentViewMode !== slideoutViewMode) {
lib.empty(this._contentNode);
this._contentNode.appendChild(slideoutViewMode.getWrapperN... | [
"function",
"(",
"slideoutViewMode",
")",
"{",
"this",
".",
"_previousActiveElement",
"=",
"document",
".",
"activeElement",
";",
"lib",
".",
"trapTabs",
"(",
"this",
".",
"_wrapperNode",
")",
";",
"// replace _contentNode's contents\r",
"if",
"(",
"this",
".",
... | Makes this slideout visible.
If the specified @ref slideoutViewMode is different from the
@ref _currentViewMode the contents of this slideout's content
are replaced with the contents of the specified @ref slideoutViewMode
first.
@param {orion.webui.SlideoutViewMode} slideoutViewMode The view mode with the contents of... | [
"Makes",
"this",
"slideout",
"visible",
"."
] | eb2583100c662b5cfc1b461a978b31d3b8555ce1 | https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.ui/web/orion/webui/Slideout.js#L97-L114 | |
14,445 | eclipse/orion.client | bundles/org.eclipse.orion.client.ui/web/orion/webui/Slideout.js | function() {
lib.returnFocus(this._wrapperNode, this._previousActiveElement);
this._previousActiveElement = null;
this._wrapperNode.classList.remove("slideoutWrapperVisible"); //$NON-NLS-0$
this._wrapperNode.classList.add("slideoutWrapperHiding"); //$NON-NLS-0$
this._visibilityTransitionTimeo... | javascript | function() {
lib.returnFocus(this._wrapperNode, this._previousActiveElement);
this._previousActiveElement = null;
this._wrapperNode.classList.remove("slideoutWrapperVisible"); //$NON-NLS-0$
this._wrapperNode.classList.add("slideoutWrapperHiding"); //$NON-NLS-0$
this._visibilityTransitionTimeo... | [
"function",
"(",
")",
"{",
"lib",
".",
"returnFocus",
"(",
"this",
".",
"_wrapperNode",
",",
"this",
".",
"_previousActiveElement",
")",
";",
"this",
".",
"_previousActiveElement",
"=",
"null",
";",
"this",
".",
"_wrapperNode",
".",
"classList",
".",
"remove... | Hides the slideout. | [
"Hides",
"the",
"slideout",
"."
] | eb2583100c662b5cfc1b461a978b31d3b8555ce1 | https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.ui/web/orion/webui/Slideout.js#L119-L130 | |
14,446 | eclipse/orion.client | bundles/org.eclipse.orion.client.ui/web/orion/webui/SideMenu.js | function(relatedLinks, exclusions) {
this._categorizedRelatedLinks = {};
relatedLinks.forEach(function(info) {
var relatedLink = info.relatedLink;
var command = info.command;
var invocation = info.invocation;
if (!exclusions || exclusions.indexOf(relatedLink.id) === -1) {
var category = relat... | javascript | function(relatedLinks, exclusions) {
this._categorizedRelatedLinks = {};
relatedLinks.forEach(function(info) {
var relatedLink = info.relatedLink;
var command = info.command;
var invocation = info.invocation;
if (!exclusions || exclusions.indexOf(relatedLink.id) === -1) {
var category = relat... | [
"function",
"(",
"relatedLinks",
",",
"exclusions",
")",
"{",
"this",
".",
"_categorizedRelatedLinks",
"=",
"{",
"}",
";",
"relatedLinks",
".",
"forEach",
"(",
"function",
"(",
"info",
")",
"{",
"var",
"relatedLink",
"=",
"info",
".",
"relatedLink",
";",
"... | Called whenever the page target changes.
@param {Object} relatedLinks
@param {String[]} exclusions List of related link IDs that the page has requested to not be shown. | [
"Called",
"whenever",
"the",
"page",
"target",
"changes",
"."
] | eb2583100c662b5cfc1b461a978b31d3b8555ce1 | https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.ui/web/orion/webui/SideMenu.js#L73-L91 | |
14,447 | eclipse/orion.client | bundles/org.eclipse.orion.client.ui/web/orion/PageLinks.js | getCategoriesInfo | function getCategoriesInfo(serviceRegistry) {
// Read categories.
var categoryInfos;
if (!_cachedCategories) {
categoryInfos = [];
var navLinkCategories = serviceRegistry.getServiceReferences("orion.page.link.category"); //$NON-NLS-0$
navLinkCategories.forEach(function(serviceRef) {
var info = _getPr... | javascript | function getCategoriesInfo(serviceRegistry) {
// Read categories.
var categoryInfos;
if (!_cachedCategories) {
categoryInfos = [];
var navLinkCategories = serviceRegistry.getServiceReferences("orion.page.link.category"); //$NON-NLS-0$
navLinkCategories.forEach(function(serviceRef) {
var info = _getPr... | [
"function",
"getCategoriesInfo",
"(",
"serviceRegistry",
")",
"{",
"// Read categories.",
"var",
"categoryInfos",
";",
"if",
"(",
"!",
"_cachedCategories",
")",
"{",
"categoryInfos",
"=",
"[",
"]",
";",
"var",
"navLinkCategories",
"=",
"serviceRegistry",
".",
"get... | Reads info about page link categories.
@returns {orion.Promise} Resolving to {@link orion.PageLinks.CategoriesInfo} | [
"Reads",
"info",
"about",
"page",
"link",
"categories",
"."
] | eb2583100c662b5cfc1b461a978b31d3b8555ce1 | https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.ui/web/orion/PageLinks.js#L97-L118 |
14,448 | eclipse/orion.client | bundles/org.eclipse.orion.client.javascript/web/eslint/lib/code-path-analysis/fork-context.js | makeSegments | function makeSegments(context, begin, end, create) {
var list = context.segmentsList;
if (begin < 0) {
begin = list.length + begin;
}
if (end < 0) {
end = list.length + end;
}
var segments = [];
for (var i = 0; i < context.count; ++i) {
var allPrevSegments = [];
for (var j = begin; j <= en... | javascript | function makeSegments(context, begin, end, create) {
var list = context.segmentsList;
if (begin < 0) {
begin = list.length + begin;
}
if (end < 0) {
end = list.length + end;
}
var segments = [];
for (var i = 0; i < context.count; ++i) {
var allPrevSegments = [];
for (var j = begin; j <= en... | [
"function",
"makeSegments",
"(",
"context",
",",
"begin",
",",
"end",
",",
"create",
")",
"{",
"var",
"list",
"=",
"context",
".",
"segmentsList",
";",
"if",
"(",
"begin",
"<",
"0",
")",
"{",
"begin",
"=",
"list",
".",
"length",
"+",
"begin",
";",
... | Creates new segments from the specific range of `context.segmentsList`.
When `context.segmentsList` is `[[a, b], [c, d], [e, f]]`, `begin` is `0`, and
`end` is `-1`, this creates `[g, h]`. This `g` is from `a`, `c`, and `e`.
This `h` is from `b`, `d`, and `f`.
@param {ForkContext} context - An instance.
@param {numbe... | [
"Creates",
"new",
"segments",
"from",
"the",
"specific",
"range",
"of",
"context",
".",
"segmentsList",
"."
] | eb2583100c662b5cfc1b461a978b31d3b8555ce1 | https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.javascript/web/eslint/lib/code-path-analysis/fork-context.js#L43-L66 |
14,449 | eclipse/orion.client | bundles/org.eclipse.orion.client.javascript/web/eslint/lib/code-path-analysis/fork-context.js | function(context) {
var source = context.segmentsList;
for (var i = 0; i < source.length; ++i) {
this.segmentsList.push(source[i]);
}
} | javascript | function(context) {
var source = context.segmentsList;
for (var i = 0; i < source.length; ++i) {
this.segmentsList.push(source[i]);
}
} | [
"function",
"(",
"context",
")",
"{",
"var",
"source",
"=",
"context",
".",
"segmentsList",
";",
"for",
"(",
"var",
"i",
"=",
"0",
";",
"i",
"<",
"source",
".",
"length",
";",
"++",
"i",
")",
"{",
"this",
".",
"segmentsList",
".",
"push",
"(",
"s... | Adds all segments of a given fork context into this context.
@param {ForkContext} context - A fork context to add.
@returns {void} | [
"Adds",
"all",
"segments",
"of",
"a",
"given",
"fork",
"context",
"into",
"this",
"context",
"."
] | eb2583100c662b5cfc1b461a978b31d3b8555ce1 | https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.javascript/web/eslint/lib/code-path-analysis/fork-context.js#L206-L212 | |
14,450 | eclipse/orion.client | bundles/org.eclipse.orion.client.collab/web/orion/collab/collabFileEditingAnnotation.js | function(location, users) {
// Remove trailing "/"
if(location.substr(-1) === '/') {
location = location.substr(0, location.length - 1);
}
this.location = location;
console.assert(Array.isArray(users));
this.users = users;
} | javascript | function(location, users) {
// Remove trailing "/"
if(location.substr(-1) === '/') {
location = location.substr(0, location.length - 1);
}
this.location = location;
console.assert(Array.isArray(users));
this.users = users;
} | [
"function",
"(",
"location",
",",
"users",
")",
"{",
"// Remove trailing \"/\"",
"if",
"(",
"location",
".",
"substr",
"(",
"-",
"1",
")",
"===",
"'/'",
")",
"{",
"location",
"=",
"location",
".",
"substr",
"(",
"0",
",",
"location",
".",
"length",
"-"... | An annotation shows that a file is under editing
@constructor
@name {orion.collab.CollabFileEditingAnnotation}
@extends {orion.collab.CollabFileAnnotation}
@param {string} location - file location
@param {Array.<string>} users - list of users that is modifying this file | [
"An",
"annotation",
"shows",
"that",
"a",
"file",
"is",
"under",
"editing"
] | eb2583100c662b5cfc1b461a978b31d3b8555ce1 | https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.collab/web/orion/collab/collabFileEditingAnnotation.js#L29-L37 | |
14,451 | eclipse/orion.client | bundles/org.eclipse.orion.client.javascript/web/javascript/orionAcorn.js | deepCopy | function deepCopy(obj) {
var ret = {}, key, val;
for (key in obj) {
if (obj.hasOwnProperty(key)) {
val = obj[key];
if (typeof val === 'object' && val !== null) {
ret[key] = deepCopy(val);
} else {
ret[key] = val;
}
}
}
return ret;
} | javascript | function deepCopy(obj) {
var ret = {}, key, val;
for (key in obj) {
if (obj.hasOwnProperty(key)) {
val = obj[key];
if (typeof val === 'object' && val !== null) {
ret[key] = deepCopy(val);
} else {
ret[key] = val;
}
}
}
return ret;
} | [
"function",
"deepCopy",
"(",
"obj",
")",
"{",
"var",
"ret",
"=",
"{",
"}",
",",
"key",
",",
"val",
";",
"for",
"(",
"key",
"in",
"obj",
")",
"{",
"if",
"(",
"obj",
".",
"hasOwnProperty",
"(",
"key",
")",
")",
"{",
"val",
"=",
"obj",
"[",
"key... | Returns a deep copy of the given obj | [
"Returns",
"a",
"deep",
"copy",
"of",
"the",
"given",
"obj"
] | eb2583100c662b5cfc1b461a978b31d3b8555ce1 | https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.javascript/web/javascript/orionAcorn.js#L240-L253 |
14,452 | eclipse/orion.client | bundles/org.eclipse.orion.client.javascript/web/eslint/lib/rules/no-extra-bind.js | report | function report(node) {
var nodeParent = node.parent; // memberexpression
context.report(
nodeParent.property,
ProblemMessages.noExtraBind);
} | javascript | function report(node) {
var nodeParent = node.parent; // memberexpression
context.report(
nodeParent.property,
ProblemMessages.noExtraBind);
} | [
"function",
"report",
"(",
"node",
")",
"{",
"var",
"nodeParent",
"=",
"node",
".",
"parent",
";",
"// memberexpression\r",
"context",
".",
"report",
"(",
"nodeParent",
".",
"property",
",",
"ProblemMessages",
".",
"noExtraBind",
")",
";",
"}"
] | Reports a given function node.
@param {ASTNode} node - A node to report. This is a FunctionExpression or
an ArrowFunctionExpression.
@returns {void} | [
"Reports",
"a",
"given",
"function",
"node",
"."
] | eb2583100c662b5cfc1b461a978b31d3b8555ce1 | https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.javascript/web/eslint/lib/rules/no-extra-bind.js#L27-L32 |
14,453 | eclipse/orion.client | bundles/org.eclipse.orion.client.javascript/web/eslint/lib/rules/no-extra-bind.js | getPropertyName | function getPropertyName(node) {
if (node.computed) {
switch (node.property.type) {
case "Literal":
return String(node.property.value);
case "TemplateLiteral":
if (node.property.expressions.length === 0) {
return node.property.quasis[0].value.cooked;
}
// fallthr... | javascript | function getPropertyName(node) {
if (node.computed) {
switch (node.property.type) {
case "Literal":
return String(node.property.value);
case "TemplateLiteral":
if (node.property.expressions.length === 0) {
return node.property.quasis[0].value.cooked;
}
// fallthr... | [
"function",
"getPropertyName",
"(",
"node",
")",
"{",
"if",
"(",
"node",
".",
"computed",
")",
"{",
"switch",
"(",
"node",
".",
"property",
".",
"type",
")",
"{",
"case",
"\"Literal\"",
":",
"return",
"String",
"(",
"node",
".",
"property",
".",
"value... | Gets the property name of a given node.
If the property name is dynamic, this returns an empty string.
@param {ASTNode} node - A node to check. This is a MemberExpression.
@returns {string} The property name of the node. | [
"Gets",
"the",
"property",
"name",
"of",
"a",
"given",
"node",
".",
"If",
"the",
"property",
"name",
"is",
"dynamic",
"this",
"returns",
"an",
"empty",
"string",
"."
] | eb2583100c662b5cfc1b461a978b31d3b8555ce1 | https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.javascript/web/eslint/lib/rules/no-extra-bind.js#L41-L56 |
14,454 | eclipse/orion.client | bundles/org.eclipse.orion.client.javascript/web/eslint/lib/rules/no-extra-bind.js | enterFunction | function enterFunction(node) {
scopeInfo = {
isBound: isCalleeOfBindMethod(node),
thisFound: false,
upper: scopeInfo
};
} | javascript | function enterFunction(node) {
scopeInfo = {
isBound: isCalleeOfBindMethod(node),
thisFound: false,
upper: scopeInfo
};
} | [
"function",
"enterFunction",
"(",
"node",
")",
"{",
"scopeInfo",
"=",
"{",
"isBound",
":",
"isCalleeOfBindMethod",
"(",
"node",
")",
",",
"thisFound",
":",
"false",
",",
"upper",
":",
"scopeInfo",
"}",
";",
"}"
] | Adds a scope information object to the stack.
@param {ASTNode} node - A node to add. This node is a FunctionExpression
or a FunctionDeclaration node.
@returns {void} | [
"Adds",
"a",
"scope",
"information",
"object",
"to",
"the",
"stack",
"."
] | eb2583100c662b5cfc1b461a978b31d3b8555ce1 | https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.javascript/web/eslint/lib/rules/no-extra-bind.js#L88-L94 |
14,455 | eclipse/orion.client | bundles/org.eclipse.orion.client.javascript/web/eslint/lib/config/environments.js | load | function load() {
Object.keys(envs).forEach(function(envName) {
environments[envName] = envs[envName];
});
} | javascript | function load() {
Object.keys(envs).forEach(function(envName) {
environments[envName] = envs[envName];
});
} | [
"function",
"load",
"(",
")",
"{",
"Object",
".",
"keys",
"(",
"envs",
")",
".",
"forEach",
"(",
"function",
"(",
"envName",
")",
"{",
"environments",
"[",
"envName",
"]",
"=",
"envs",
"[",
"envName",
"]",
";",
"}",
")",
";",
"}"
] | Loads the default environments.
@returns {void}
@private | [
"Loads",
"the",
"default",
"environments",
"."
] | eb2583100c662b5cfc1b461a978b31d3b8555ce1 | https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.javascript/web/eslint/lib/config/environments.js#L24-L28 |
14,456 | eclipse/orion.client | bundles/org.eclipse.orion.client.javascript/web/eslint/lib/config/environments.js | function(plugin, pluginName) {
if (plugin.environments) {
Object.keys(plugin.environments).forEach(function(envName) {
this.define(pluginName + "/" + envName, plugin.environments[envName]);
}, this);
}
} | javascript | function(plugin, pluginName) {
if (plugin.environments) {
Object.keys(plugin.environments).forEach(function(envName) {
this.define(pluginName + "/" + envName, plugin.environments[envName]);
}, this);
}
} | [
"function",
"(",
"plugin",
",",
"pluginName",
")",
"{",
"if",
"(",
"plugin",
".",
"environments",
")",
"{",
"Object",
".",
"keys",
"(",
"plugin",
".",
"environments",
")",
".",
"forEach",
"(",
"function",
"(",
"envName",
")",
"{",
"this",
".",
"define"... | Imports all environments from a plugin.
@param {Object} plugin The plugin object.
@param {string} pluginName The name of the plugin.
@returns {void} | [
"Imports",
"all",
"environments",
"from",
"a",
"plugin",
"."
] | eb2583100c662b5cfc1b461a978b31d3b8555ce1 | https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.javascript/web/eslint/lib/config/environments.js#L66-L72 | |
14,457 | eclipse/orion.client | bundles/org.eclipse.orion.client.ui/web/plugins/samples/largeFileSearch/require.js | each | function each(ary, func) {
if (ary) {
var i;
for (i = 0; i < ary.length; i += 1) {
if (ary[i] && func(ary[i], i, ary)) {
break;
}
}
}
} | javascript | function each(ary, func) {
if (ary) {
var i;
for (i = 0; i < ary.length; i += 1) {
if (ary[i] && func(ary[i], i, ary)) {
break;
}
}
}
} | [
"function",
"each",
"(",
"ary",
",",
"func",
")",
"{",
"if",
"(",
"ary",
")",
"{",
"var",
"i",
";",
"for",
"(",
"i",
"=",
"0",
";",
"i",
"<",
"ary",
".",
"length",
";",
"i",
"+=",
"1",
")",
"{",
"if",
"(",
"ary",
"[",
"i",
"]",
"&&",
"f... | Helper function for iterating over an array. If the func returns
a true value, it will break out of the loop. | [
"Helper",
"function",
"for",
"iterating",
"over",
"an",
"array",
".",
"If",
"the",
"func",
"returns",
"a",
"true",
"value",
"it",
"will",
"break",
"out",
"of",
"the",
"loop",
"."
] | eb2583100c662b5cfc1b461a978b31d3b8555ce1 | https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.ui/web/plugins/samples/largeFileSearch/require.js#L53-L62 |
14,458 | eclipse/orion.client | bundles/org.eclipse.orion.client.ui/web/plugins/samples/largeFileSearch/require.js | getGlobal | function getGlobal(value) {
if (!value) {
return value;
}
var g = global;
each(value.split('.'), function (part) {
g = g[part];
});
return g;
} | javascript | function getGlobal(value) {
if (!value) {
return value;
}
var g = global;
each(value.split('.'), function (part) {
g = g[part];
});
return g;
} | [
"function",
"getGlobal",
"(",
"value",
")",
"{",
"if",
"(",
"!",
"value",
")",
"{",
"return",
"value",
";",
"}",
"var",
"g",
"=",
"global",
";",
"each",
"(",
"value",
".",
"split",
"(",
"'.'",
")",
",",
"function",
"(",
"part",
")",
"{",
"g",
"... | Allow getting a global that expressed in dot notation, like 'a.b.c'. | [
"Allow",
"getting",
"a",
"global",
"that",
"expressed",
"in",
"dot",
"notation",
"like",
"a",
".",
"b",
".",
"c",
"."
] | eb2583100c662b5cfc1b461a978b31d3b8555ce1 | https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.ui/web/plugins/samples/largeFileSearch/require.js#L139-L148 |
14,459 | eclipse/orion.client | bundles/org.eclipse.orion.client.ui/web/plugins/samples/largeFileSearch/require.js | function (depMap) {
var mod = getOwn(registry, depMap.id);
if (mod) {
getModule(depMap).enable();
}
} | javascript | function (depMap) {
var mod = getOwn(registry, depMap.id);
if (mod) {
getModule(depMap).enable();
}
} | [
"function",
"(",
"depMap",
")",
"{",
"var",
"mod",
"=",
"getOwn",
"(",
"registry",
",",
"depMap",
".",
"id",
")",
";",
"if",
"(",
"mod",
")",
"{",
"getModule",
"(",
"depMap",
")",
".",
"enable",
"(",
")",
";",
"}",
"}"
] | Called to enable a module if it is still in the registry
awaiting enablement. A second arg, parent, the parent module,
is passed in for context, when this method is overriden by
the optimizer. Not shown here to keep code compact. | [
"Called",
"to",
"enable",
"a",
"module",
"if",
"it",
"is",
"still",
"in",
"the",
"registry",
"awaiting",
"enablement",
".",
"A",
"second",
"arg",
"parent",
"the",
"parent",
"module",
"is",
"passed",
"in",
"for",
"context",
"when",
"this",
"method",
"is",
... | eb2583100c662b5cfc1b461a978b31d3b8555ce1 | https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.ui/web/plugins/samples/largeFileSearch/require.js#L1473-L1478 | |
14,460 | eclipse/orion.client | modules/orionode/lib/metastore/fs/store.js | getUserMetadataFileName | function getUserMetadataFileName(options, user) {
let userId;
if(typeof user === "string") {
userId = user;
} else if(user && typeof user.username === 'string') {
userId = user.username;
} else {
return null;
}
return nodePath.join(getUserRootLocation(options, userId), FILENAME_USER_METADATA);
} | javascript | function getUserMetadataFileName(options, user) {
let userId;
if(typeof user === "string") {
userId = user;
} else if(user && typeof user.username === 'string') {
userId = user.username;
} else {
return null;
}
return nodePath.join(getUserRootLocation(options, userId), FILENAME_USER_METADATA);
} | [
"function",
"getUserMetadataFileName",
"(",
"options",
",",
"user",
")",
"{",
"let",
"userId",
";",
"if",
"(",
"typeof",
"user",
"===",
"\"string\"",
")",
"{",
"userId",
"=",
"user",
";",
"}",
"else",
"if",
"(",
"user",
"&&",
"typeof",
"user",
".",
"us... | Returns the fully qualified file path of the metadata for the given user. Returns null if no user
is provided
@param {{?}} options The options map
@param {string|{?}} user The user id or map of user options | [
"Returns",
"the",
"fully",
"qualified",
"file",
"path",
"of",
"the",
"metadata",
"for",
"the",
"given",
"user",
".",
"Returns",
"null",
"if",
"no",
"user",
"is",
"provided"
] | eb2583100c662b5cfc1b461a978b31d3b8555ce1 | https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/modules/orionode/lib/metastore/fs/store.js#L49-L59 |
14,461 | eclipse/orion.client | modules/orionode/lib/metastore/fs/store.js | FsMetastore | function FsMetastore(options) {
this._options = options;
this._taskList = {};
this._lockMap = {};
this._isSingleUser = !!options.configParams.get('orion.single.user');
this._isFormAuthType = options.configParams.get('orion.auth.name') === 'FORM+OAuth';
} | javascript | function FsMetastore(options) {
this._options = options;
this._taskList = {};
this._lockMap = {};
this._isSingleUser = !!options.configParams.get('orion.single.user');
this._isFormAuthType = options.configParams.get('orion.auth.name') === 'FORM+OAuth';
} | [
"function",
"FsMetastore",
"(",
"options",
")",
"{",
"this",
".",
"_options",
"=",
"options",
";",
"this",
".",
"_taskList",
"=",
"{",
"}",
";",
"this",
".",
"_lockMap",
"=",
"{",
"}",
";",
"this",
".",
"_isSingleUser",
"=",
"!",
"!",
"options",
".",... | Creates a new filesystem-based metastore
@param {{?}} options The map of server options | [
"Creates",
"a",
"new",
"filesystem",
"-",
"based",
"metastore"
] | eb2583100c662b5cfc1b461a978b31d3b8555ce1 | https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/modules/orionode/lib/metastore/fs/store.js#L130-L136 |
14,462 | eclipse/orion.client | modules/orionode/lib/metastore/fs/store.js | function(workspaceId, workspacedata, callback) {
var userId = metaUtil.decodeUserIdFromWorkspaceId(workspaceId);
Promise.using(this.lock(userId, false), function() {
return new Promise(function(resolve, reject) {
this._readWorkspaceMetadata(workspaceId, function(error, metadata) {
if (error) {
ret... | javascript | function(workspaceId, workspacedata, callback) {
var userId = metaUtil.decodeUserIdFromWorkspaceId(workspaceId);
Promise.using(this.lock(userId, false), function() {
return new Promise(function(resolve, reject) {
this._readWorkspaceMetadata(workspaceId, function(error, metadata) {
if (error) {
ret... | [
"function",
"(",
"workspaceId",
",",
"workspacedata",
",",
"callback",
")",
"{",
"var",
"userId",
"=",
"metaUtil",
".",
"decodeUserIdFromWorkspaceId",
"(",
"workspaceId",
")",
";",
"Promise",
".",
"using",
"(",
"this",
".",
"lock",
"(",
"userId",
",",
"false... | update workspace data, which is the properties of workspace metadata | [
"update",
"workspace",
"data",
"which",
"is",
"the",
"properties",
"of",
"workspace",
"metadata"
] | eb2583100c662b5cfc1b461a978b31d3b8555ce1 | https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/modules/orionode/lib/metastore/fs/store.js#L407-L437 | |
14,463 | eclipse/orion.client | modules/orionode/lib/metastore/fs/store.js | function(id, callback) {
if(this._options.configParams.get('orion.single.user')) {
return callback(new Error("The default user cannot be deleted in single user mode"));
}
let userLocation = getUserRootLocation(this._options, id);
fs.access(userLocation, (err) => {
if(err) {
return callback(err);
}
... | javascript | function(id, callback) {
if(this._options.configParams.get('orion.single.user')) {
return callback(new Error("The default user cannot be deleted in single user mode"));
}
let userLocation = getUserRootLocation(this._options, id);
fs.access(userLocation, (err) => {
if(err) {
return callback(err);
}
... | [
"function",
"(",
"id",
",",
"callback",
")",
"{",
"if",
"(",
"this",
".",
"_options",
".",
"configParams",
".",
"get",
"(",
"'orion.single.user'",
")",
")",
"{",
"return",
"callback",
"(",
"new",
"Error",
"(",
"\"The default user cannot be deleted in single user... | Deletes the given user and calls the callback. If the server is launched in single user mode
the call immediately callsback with an error. The default single user mode user cannot delete themselves.
@param {string} id The user id to delete
@param {fn(err)} callback The function callback
@callback | [
"Deletes",
"the",
"given",
"user",
"and",
"calls",
"the",
"callback",
".",
"If",
"the",
"server",
"is",
"launched",
"in",
"single",
"user",
"mode",
"the",
"call",
"immediately",
"callsback",
"with",
"an",
"error",
".",
"The",
"default",
"single",
"user",
"... | eb2583100c662b5cfc1b461a978b31d3b8555ce1 | https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/modules/orionode/lib/metastore/fs/store.js#L632-L648 | |
14,464 | eclipse/orion.client | bundles/org.eclipse.orion.client.javascript/web/eslint/lib/utils/traverser.js | Traverser | function Traverser() {
var controller = Object.create(new estraverse.Controller()),
originalTraverse = controller.traverse;
// intercept call to traverse() and add the fallback key to the visitor
controller.traverse = function(node, visitor) {
visitor.fallback = Traverser.getKeys;
return originalTraver... | javascript | function Traverser() {
var controller = Object.create(new estraverse.Controller()),
originalTraverse = controller.traverse;
// intercept call to traverse() and add the fallback key to the visitor
controller.traverse = function(node, visitor) {
visitor.fallback = Traverser.getKeys;
return originalTraver... | [
"function",
"Traverser",
"(",
")",
"{",
"var",
"controller",
"=",
"Object",
".",
"create",
"(",
"new",
"estraverse",
".",
"Controller",
"(",
")",
")",
",",
"originalTraverse",
"=",
"controller",
".",
"traverse",
";",
"// intercept call to traverse() and add the fa... | Wrapper around an estraverse controller that ensures the correct keys
are visited.
@constructor | [
"Wrapper",
"around",
"an",
"estraverse",
"controller",
"that",
"ensures",
"the",
"correct",
"keys",
"are",
"visited",
"."
] | eb2583100c662b5cfc1b461a978b31d3b8555ce1 | https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.javascript/web/eslint/lib/utils/traverser.js#L25-L37 |
14,465 | eclipse/orion.client | modules/orionode/lib/shared/db/userProjects.js | addProjectToUser | function addProjectToUser(user, project) {
return addUser(user)
.then(function(doc) {
return userProject.findOneAndUpdate({username: user}, {$addToSet: {'sharedProjects': project} }, {
safe: true,
w: 'majority'
}).exec();
});
} | javascript | function addProjectToUser(user, project) {
return addUser(user)
.then(function(doc) {
return userProject.findOneAndUpdate({username: user}, {$addToSet: {'sharedProjects': project} }, {
safe: true,
w: 'majority'
}).exec();
});
} | [
"function",
"addProjectToUser",
"(",
"user",
",",
"project",
")",
"{",
"return",
"addUser",
"(",
"user",
")",
".",
"then",
"(",
"function",
"(",
"doc",
")",
"{",
"return",
"userProject",
".",
"findOneAndUpdate",
"(",
"{",
"username",
":",
"user",
"}",
",... | Adds project to user's shared projects. | [
"Adds",
"project",
"to",
"user",
"s",
"shared",
"projects",
"."
] | eb2583100c662b5cfc1b461a978b31d3b8555ce1 | https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/modules/orionode/lib/shared/db/userProjects.js#L79-L87 |
14,466 | eclipse/orion.client | modules/orionode/lib/shared/db/userProjects.js | removeProjectFromUser | function removeProjectFromUser(user, project) {
return userProject.findOneAndUpdate({username: user}, {$pull: {'sharedProjects': { $in: [project]}} }, {
safe: true,
w: 'majority'
}).exec();
} | javascript | function removeProjectFromUser(user, project) {
return userProject.findOneAndUpdate({username: user}, {$pull: {'sharedProjects': { $in: [project]}} }, {
safe: true,
w: 'majority'
}).exec();
} | [
"function",
"removeProjectFromUser",
"(",
"user",
",",
"project",
")",
"{",
"return",
"userProject",
".",
"findOneAndUpdate",
"(",
"{",
"username",
":",
"user",
"}",
",",
"{",
"$pull",
":",
"{",
"'sharedProjects'",
":",
"{",
"$in",
":",
"[",
"project",
"]"... | Removes a project from a user's shared projects. | [
"Removes",
"a",
"project",
"from",
"a",
"user",
"s",
"shared",
"projects",
"."
] | eb2583100c662b5cfc1b461a978b31d3b8555ce1 | https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/modules/orionode/lib/shared/db/userProjects.js#L92-L97 |
14,467 | eclipse/orion.client | modules/orionode/lib/shared/db/userProjects.js | getUserSharedProjects | function getUserSharedProjects(user) {
return userProject.findOne({'username': user}, 'sharedProjects')
.then(function(doc) {
if (!doc) {
return undefined;
}
var projects = doc.sharedProjects;
projects = projects.map(function(project) {
var name = path.win32.basename(project);
return {'Name'... | javascript | function getUserSharedProjects(user) {
return userProject.findOne({'username': user}, 'sharedProjects')
.then(function(doc) {
if (!doc) {
return undefined;
}
var projects = doc.sharedProjects;
projects = projects.map(function(project) {
var name = path.win32.basename(project);
return {'Name'... | [
"function",
"getUserSharedProjects",
"(",
"user",
")",
"{",
"return",
"userProject",
".",
"findOne",
"(",
"{",
"'username'",
":",
"user",
"}",
",",
"'sharedProjects'",
")",
".",
"then",
"(",
"function",
"(",
"doc",
")",
"{",
"if",
"(",
"!",
"doc",
")",
... | returns a list of projects shared to the user. | [
"returns",
"a",
"list",
"of",
"projects",
"shared",
"to",
"the",
"user",
"."
] | eb2583100c662b5cfc1b461a978b31d3b8555ce1 | https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/modules/orionode/lib/shared/db/userProjects.js#L114-L127 |
14,468 | eclipse/orion.client | bundles/org.eclipse.orion.client.javascript/web/eslint/lib/code-path-analysis/code-path-state.js | makeLooped | function makeLooped(state, fromSegments, toSegments) {
var end = Math.min(fromSegments.length, toSegments.length);
for (var i = 0; i < end; ++i) {
var fromSegment = fromSegments[i];
var toSegment = toSegments[i];
if (toSegment.reachable) {
fromSegment.nextSegments.push(toSegment);
}
if (fromSeg... | javascript | function makeLooped(state, fromSegments, toSegments) {
var end = Math.min(fromSegments.length, toSegments.length);
for (var i = 0; i < end; ++i) {
var fromSegment = fromSegments[i];
var toSegment = toSegments[i];
if (toSegment.reachable) {
fromSegment.nextSegments.push(toSegment);
}
if (fromSeg... | [
"function",
"makeLooped",
"(",
"state",
",",
"fromSegments",
",",
"toSegments",
")",
"{",
"var",
"end",
"=",
"Math",
".",
"min",
"(",
"fromSegments",
".",
"length",
",",
"toSegments",
".",
"length",
")",
";",
"for",
"(",
"var",
"i",
"=",
"0",
";",
"i... | Creates looping path.
@param {CodePathState} state - The instance.
@param {CodePathSegment[]} fromSegments - Segments which are source.
@param {CodePathSegment[]} toSegments - Segments which are destination.
@returns {void} | [
"Creates",
"looping",
"path",
"."
] | eb2583100c662b5cfc1b461a978b31d3b8555ce1 | https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.javascript/web/eslint/lib/code-path-analysis/code-path-state.js#L168-L190 |
14,469 | eclipse/orion.client | bundles/org.eclipse.orion.client.javascript/web/eslint/lib/code-path-analysis/code-path-state.js | function() {
var lastContext = this.forkContext;
this.forkContext = lastContext.upper;
this.forkContext.replaceHead(lastContext.makeNext(0, -1));
return lastContext;
} | javascript | function() {
var lastContext = this.forkContext;
this.forkContext = lastContext.upper;
this.forkContext.replaceHead(lastContext.makeNext(0, -1));
return lastContext;
} | [
"function",
"(",
")",
"{",
"var",
"lastContext",
"=",
"this",
".",
"forkContext",
";",
"this",
".",
"forkContext",
"=",
"lastContext",
".",
"upper",
";",
"this",
".",
"forkContext",
".",
"replaceHead",
"(",
"lastContext",
".",
"makeNext",
"(",
"0",
",",
... | Pops and merges the last forking context.
@returns {ForkContext} The last context. | [
"Pops",
"and",
"merges",
"the",
"last",
"forking",
"context",
"."
] | eb2583100c662b5cfc1b461a978b31d3b8555ce1 | https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.javascript/web/eslint/lib/code-path-analysis/code-path-state.js#L291-L298 | |
14,470 | eclipse/orion.client | bundles/org.eclipse.orion.client.javascript/web/eslint/lib/code-path-analysis/code-path-state.js | function() {
var context = this.choiceContext;
this.choiceContext = context.upper;
var forkContext = this.forkContext;
var headSegments = forkContext.head;
switch (context.kind) {
case "&&":
case "||":
/*
* If any result were not transferred from child contexts,
* this sets... | javascript | function() {
var context = this.choiceContext;
this.choiceContext = context.upper;
var forkContext = this.forkContext;
var headSegments = forkContext.head;
switch (context.kind) {
case "&&":
case "||":
/*
* If any result were not transferred from child contexts,
* this sets... | [
"function",
"(",
")",
"{",
"var",
"context",
"=",
"this",
".",
"choiceContext",
";",
"this",
".",
"choiceContext",
"=",
"context",
".",
"upper",
";",
"var",
"forkContext",
"=",
"this",
".",
"forkContext",
";",
"var",
"headSegments",
"=",
"forkContext",
"."... | Pops the last choice context and finalizes it.
@returns {ChoiceContext} The popped context. | [
"Pops",
"the",
"last",
"choice",
"context",
"and",
"finalizes",
"it",
"."
] | eb2583100c662b5cfc1b461a978b31d3b8555ce1 | https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.javascript/web/eslint/lib/code-path-analysis/code-path-state.js#L369-L449 | |
14,471 | eclipse/orion.client | bundles/org.eclipse.orion.client.javascript/web/eslint/lib/code-path-analysis/code-path-state.js | function() {
var context = this.choiceContext;
var forkContext = this.forkContext;
if (context.processed) {
/*
* This got segments already from the child choice context.
* Creates the next path from own true/false fork context.
*/
var prevForkContext =
context.kind === "&&" ? c... | javascript | function() {
var context = this.choiceContext;
var forkContext = this.forkContext;
if (context.processed) {
/*
* This got segments already from the child choice context.
* Creates the next path from own true/false fork context.
*/
var prevForkContext =
context.kind === "&&" ? c... | [
"function",
"(",
")",
"{",
"var",
"context",
"=",
"this",
".",
"choiceContext",
";",
"var",
"forkContext",
"=",
"this",
".",
"forkContext",
";",
"if",
"(",
"context",
".",
"processed",
")",
"{",
"/*\r\n\t\t\t\t * This got segments already from the child choice conte... | Makes a code path segment of the right-hand operand of a logical
expression.
@returns {void} | [
"Makes",
"a",
"code",
"path",
"segment",
"of",
"the",
"right",
"-",
"hand",
"operand",
"of",
"a",
"logical",
"expression",
"."
] | eb2583100c662b5cfc1b461a978b31d3b8555ce1 | https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.javascript/web/eslint/lib/code-path-analysis/code-path-state.js#L457-L495 | |
14,472 | eclipse/orion.client | bundles/org.eclipse.orion.client.javascript/web/eslint/lib/code-path-analysis/code-path-state.js | function() {
var context = this.choiceContext;
var forkContext = this.forkContext;
/*
* If any result were not transferred from child contexts,
* this sets the head segments to both cases.
* The head segments are the path of the test expression.
*/
if (!context.processed) {
context.... | javascript | function() {
var context = this.choiceContext;
var forkContext = this.forkContext;
/*
* If any result were not transferred from child contexts,
* this sets the head segments to both cases.
* The head segments are the path of the test expression.
*/
if (!context.processed) {
context.... | [
"function",
"(",
")",
"{",
"var",
"context",
"=",
"this",
".",
"choiceContext",
";",
"var",
"forkContext",
"=",
"this",
".",
"forkContext",
";",
"/*\r\n\t\t\t * If any result were not transferred from child contexts,\r\n\t\t\t * this sets the head segments to both cases.\r\n\t\t\... | Makes a code path segment of the `if` block.
@returns {void} | [
"Makes",
"a",
"code",
"path",
"segment",
"of",
"the",
"if",
"block",
"."
] | eb2583100c662b5cfc1b461a978b31d3b8555ce1 | https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.javascript/web/eslint/lib/code-path-analysis/code-path-state.js#L502-L522 | |
14,473 | eclipse/orion.client | bundles/org.eclipse.orion.client.javascript/web/eslint/lib/code-path-analysis/code-path-state.js | function() {
var context = this.choiceContext;
var forkContext = this.forkContext;
/*
* The head segments are the path of the `if` block.
* Updates the `true` path with the end of the `if` block.
*/
context.trueForkContext.clear();
context.trueForkContext.add(forkContext.head);
context... | javascript | function() {
var context = this.choiceContext;
var forkContext = this.forkContext;
/*
* The head segments are the path of the `if` block.
* Updates the `true` path with the end of the `if` block.
*/
context.trueForkContext.clear();
context.trueForkContext.add(forkContext.head);
context... | [
"function",
"(",
")",
"{",
"var",
"context",
"=",
"this",
".",
"choiceContext",
";",
"var",
"forkContext",
"=",
"this",
".",
"forkContext",
";",
"/*\r\n\t\t\t * The head segments are the path of the `if` block.\r\n\t\t\t * Updates the `true` path with the end of the `if` block.\r... | Makes a code path segment of the `else` block.
@returns {void} | [
"Makes",
"a",
"code",
"path",
"segment",
"of",
"the",
"else",
"block",
"."
] | eb2583100c662b5cfc1b461a978b31d3b8555ce1 | https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.javascript/web/eslint/lib/code-path-analysis/code-path-state.js#L529-L545 | |
14,474 | eclipse/orion.client | bundles/org.eclipse.orion.client.javascript/web/eslint/lib/code-path-analysis/code-path-state.js | function() {
var context = this.switchContext;
this.switchContext = context.upper;
var forkContext = this.forkContext;
var brokenForkContext = this.popBreakContext().brokenForkContext;
if (context.countForks === 0) {
/*
* When there is only one `default` chunk and there is one or more
... | javascript | function() {
var context = this.switchContext;
this.switchContext = context.upper;
var forkContext = this.forkContext;
var brokenForkContext = this.popBreakContext().brokenForkContext;
if (context.countForks === 0) {
/*
* When there is only one `default` chunk and there is one or more
... | [
"function",
"(",
")",
"{",
"var",
"context",
"=",
"this",
".",
"switchContext",
";",
"this",
".",
"switchContext",
"=",
"context",
".",
"upper",
";",
"var",
"forkContext",
"=",
"this",
".",
"forkContext",
";",
"var",
"brokenForkContext",
"=",
"this",
".",
... | Pops the last context of SwitchStatement and finalizes it.
- Disposes all forking stack for `case` and `default`.
- Creates the next code path segment from `context.brokenForkContext`.
- If the last `SwitchCase` node is not a `default` part, creates a path
to the `default` body.
@returns {void} | [
"Pops",
"the",
"last",
"context",
"of",
"SwitchStatement",
"and",
"finalizes",
"it",
"."
] | eb2583100c662b5cfc1b461a978b31d3b8555ce1 | https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.javascript/web/eslint/lib/code-path-analysis/code-path-state.js#L583-L650 | |
14,475 | eclipse/orion.client | bundles/org.eclipse.orion.client.javascript/web/eslint/lib/code-path-analysis/code-path-state.js | function(isEmpty, isDefault) {
var context = this.switchContext;
if (!context.hasCase) {
return;
}
/*
* Merge forks.
* The parent fork context has two segments.
* Those are from the current case and the body of the previous case.
*/
var parentForkContext = this.forkContext;
v... | javascript | function(isEmpty, isDefault) {
var context = this.switchContext;
if (!context.hasCase) {
return;
}
/*
* Merge forks.
* The parent fork context has two segments.
* Those are from the current case and the body of the previous case.
*/
var parentForkContext = this.forkContext;
v... | [
"function",
"(",
"isEmpty",
",",
"isDefault",
")",
"{",
"var",
"context",
"=",
"this",
".",
"switchContext",
";",
"if",
"(",
"!",
"context",
".",
"hasCase",
")",
"{",
"return",
";",
"}",
"/*\r\n\t\t\t * Merge forks.\r\n\t\t\t * The parent fork context has two segmen... | Makes a code path segment for a `SwitchCase` node.
@param {boolean} isEmpty - `true` if the body is empty.
@param {boolean} isDefault - `true` if the body is the default case.
@returns {void} | [
"Makes",
"a",
"code",
"path",
"segment",
"for",
"a",
"SwitchCase",
"node",
"."
] | eb2583100c662b5cfc1b461a978b31d3b8555ce1 | https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.javascript/web/eslint/lib/code-path-analysis/code-path-state.js#L659-L697 | |
14,476 | eclipse/orion.client | bundles/org.eclipse.orion.client.javascript/web/eslint/lib/code-path-analysis/code-path-state.js | function() {
var context = this.tryContext;
this.tryContext = context.upper;
if (context.position === "catch") {
// Merges two paths from the `try` block and `catch` block merely.
this.popForkContext();
return;
}
/*
* The following process is executed only when there is the `finally`... | javascript | function() {
var context = this.tryContext;
this.tryContext = context.upper;
if (context.position === "catch") {
// Merges two paths from the `try` block and `catch` block merely.
this.popForkContext();
return;
}
/*
* The following process is executed only when there is the `finally`... | [
"function",
"(",
")",
"{",
"var",
"context",
"=",
"this",
".",
"tryContext",
";",
"this",
".",
"tryContext",
"=",
"context",
".",
"upper",
";",
"if",
"(",
"context",
".",
"position",
"===",
"\"catch\"",
")",
"{",
"// Merges two paths from the `try` block and `... | Pops the last context of TryStatement and finalizes it.
@returns {void} | [
"Pops",
"the",
"last",
"context",
"of",
"TryStatement",
"and",
"finalizes",
"it",
"."
] | eb2583100c662b5cfc1b461a978b31d3b8555ce1 | https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.javascript/web/eslint/lib/code-path-analysis/code-path-state.js#L731-L778 | |
14,477 | eclipse/orion.client | bundles/org.eclipse.orion.client.javascript/web/eslint/lib/code-path-analysis/code-path-state.js | function() {
var context = this.tryContext;
var forkContext = this.forkContext;
var thrown = context.thrownForkContext;
// Update state.
context.position = "catch";
context.thrownForkContext = ForkContext.newEmpty(forkContext);
context.lastOfTryIsReachable = forkContext.reachable;
// Merge thr... | javascript | function() {
var context = this.tryContext;
var forkContext = this.forkContext;
var thrown = context.thrownForkContext;
// Update state.
context.position = "catch";
context.thrownForkContext = ForkContext.newEmpty(forkContext);
context.lastOfTryIsReachable = forkContext.reachable;
// Merge thr... | [
"function",
"(",
")",
"{",
"var",
"context",
"=",
"this",
".",
"tryContext",
";",
"var",
"forkContext",
"=",
"this",
".",
"forkContext",
";",
"var",
"thrown",
"=",
"context",
".",
"thrownForkContext",
";",
"// Update state.",
"context",
".",
"position",
"=",... | Makes a code path segment for a `catch` block.
@returns {void} | [
"Makes",
"a",
"code",
"path",
"segment",
"for",
"a",
"catch",
"block",
"."
] | eb2583100c662b5cfc1b461a978b31d3b8555ce1 | https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.javascript/web/eslint/lib/code-path-analysis/code-path-state.js#L785-L803 | |
14,478 | eclipse/orion.client | bundles/org.eclipse.orion.client.javascript/web/eslint/lib/code-path-analysis/code-path-state.js | function() {
var context = this.tryContext;
var forkContext = this.forkContext;
var returned = context.returnedForkContext;
var thrown = context.thrownForkContext;
var headOfLeavingSegments = forkContext.head;
// Update state.
if (context.position === "catch") {
// Merges two paths from the `... | javascript | function() {
var context = this.tryContext;
var forkContext = this.forkContext;
var returned = context.returnedForkContext;
var thrown = context.thrownForkContext;
var headOfLeavingSegments = forkContext.head;
// Update state.
if (context.position === "catch") {
// Merges two paths from the `... | [
"function",
"(",
")",
"{",
"var",
"context",
"=",
"this",
".",
"tryContext",
";",
"var",
"forkContext",
"=",
"this",
".",
"forkContext",
";",
"var",
"returned",
"=",
"context",
".",
"returnedForkContext",
";",
"var",
"thrown",
"=",
"context",
".",
"thrownF... | Makes a code path segment for a `finally` block.
In the `finally` block, parallel paths are created. The parallel paths
are used as leaving-paths. The leaving-paths are paths from `return`
statements and `throw` statements in a `try` block or a `catch` block.
@returns {void} | [
"Makes",
"a",
"code",
"path",
"segment",
"for",
"a",
"finally",
"block",
"."
] | eb2583100c662b5cfc1b461a978b31d3b8555ce1 | https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.javascript/web/eslint/lib/code-path-analysis/code-path-state.js#L814-L864 | |
14,479 | eclipse/orion.client | bundles/org.eclipse.orion.client.javascript/web/eslint/lib/code-path-analysis/code-path-state.js | function() {
var forkContext = this.forkContext;
if (!forkContext.reachable) {
return;
}
var context = getThrowContext(this);
if (context === this ||
context.position !== "try" ||
!context.thrownForkContext.empty
) {
return;
}
context.thrownForkContext.add(forkContext.head);
... | javascript | function() {
var forkContext = this.forkContext;
if (!forkContext.reachable) {
return;
}
var context = getThrowContext(this);
if (context === this ||
context.position !== "try" ||
!context.thrownForkContext.empty
) {
return;
}
context.thrownForkContext.add(forkContext.head);
... | [
"function",
"(",
")",
"{",
"var",
"forkContext",
"=",
"this",
".",
"forkContext",
";",
"if",
"(",
"!",
"forkContext",
".",
"reachable",
")",
"{",
"return",
";",
"}",
"var",
"context",
"=",
"getThrowContext",
"(",
"this",
")",
";",
"if",
"(",
"context",... | Makes a code path segment from the first throwable node to the `catch`
block or the `finally` block.
@returns {void} | [
"Makes",
"a",
"code",
"path",
"segment",
"from",
"the",
"first",
"throwable",
"node",
"to",
"the",
"catch",
"block",
"or",
"the",
"finally",
"block",
"."
] | eb2583100c662b5cfc1b461a978b31d3b8555ce1 | https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.javascript/web/eslint/lib/code-path-analysis/code-path-state.js#L872-L890 | |
14,480 | eclipse/orion.client | bundles/org.eclipse.orion.client.javascript/web/eslint/lib/code-path-analysis/code-path-state.js | function() {
var context = this.loopContext;
this.loopContext = context.upper;
var forkContext = this.forkContext;
var brokenForkContext = this.popBreakContext().brokenForkContext;
var choiceContext;
// Creates a looped path.
switch (context.type) {
case "WhileStatement":
case "ForStatem... | javascript | function() {
var context = this.loopContext;
this.loopContext = context.upper;
var forkContext = this.forkContext;
var brokenForkContext = this.popBreakContext().brokenForkContext;
var choiceContext;
// Creates a looped path.
switch (context.type) {
case "WhileStatement":
case "ForStatem... | [
"function",
"(",
")",
"{",
"var",
"context",
"=",
"this",
".",
"loopContext",
";",
"this",
".",
"loopContext",
"=",
"context",
".",
"upper",
";",
"var",
"forkContext",
"=",
"this",
".",
"forkContext",
";",
"var",
"brokenForkContext",
"=",
"this",
".",
"p... | Pops the last context of a loop statement and finalizes it.
@returns {void} | [
"Pops",
"the",
"last",
"context",
"of",
"a",
"loop",
"statement",
"and",
"finalizes",
"it",
"."
] | eb2583100c662b5cfc1b461a978b31d3b8555ce1 | https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.javascript/web/eslint/lib/code-path-analysis/code-path-state.js#L974-L1036 | |
14,481 | eclipse/orion.client | bundles/org.eclipse.orion.client.javascript/web/eslint/lib/code-path-analysis/code-path-state.js | function(test) {
var context = this.loopContext;
var forkContext = this.forkContext;
var testSegments = forkContext.makeNext(0, -1);
// Update state.
context.test = test;
context.continueDestSegments = testSegments;
forkContext.replaceHead(testSegments);
} | javascript | function(test) {
var context = this.loopContext;
var forkContext = this.forkContext;
var testSegments = forkContext.makeNext(0, -1);
// Update state.
context.test = test;
context.continueDestSegments = testSegments;
forkContext.replaceHead(testSegments);
} | [
"function",
"(",
"test",
")",
"{",
"var",
"context",
"=",
"this",
".",
"loopContext",
";",
"var",
"forkContext",
"=",
"this",
".",
"forkContext",
";",
"var",
"testSegments",
"=",
"forkContext",
".",
"makeNext",
"(",
"0",
",",
"-",
"1",
")",
";",
"// Up... | Makes a code path segment for the test part of a WhileStatement.
@param {boolean|} test - The test value (only when constant).
@returns {void} | [
"Makes",
"a",
"code",
"path",
"segment",
"for",
"the",
"test",
"part",
"of",
"a",
"WhileStatement",
"."
] | eb2583100c662b5cfc1b461a978b31d3b8555ce1 | https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.javascript/web/eslint/lib/code-path-analysis/code-path-state.js#L1044-L1053 | |
14,482 | eclipse/orion.client | bundles/org.eclipse.orion.client.javascript/web/eslint/lib/code-path-analysis/code-path-state.js | function() {
var context = this.loopContext;
var choiceContext = this.choiceContext;
var forkContext = this.forkContext;
if (!choiceContext.processed) {
choiceContext.trueForkContext.add(forkContext.head);
choiceContext.falseForkContext.add(forkContext.head);
}
// Update state.
if (contex... | javascript | function() {
var context = this.loopContext;
var choiceContext = this.choiceContext;
var forkContext = this.forkContext;
if (!choiceContext.processed) {
choiceContext.trueForkContext.add(forkContext.head);
choiceContext.falseForkContext.add(forkContext.head);
}
// Update state.
if (contex... | [
"function",
"(",
")",
"{",
"var",
"context",
"=",
"this",
".",
"loopContext",
";",
"var",
"choiceContext",
"=",
"this",
".",
"choiceContext",
";",
"var",
"forkContext",
"=",
"this",
".",
"forkContext",
";",
"if",
"(",
"!",
"choiceContext",
".",
"processed"... | Makes a code path segment for the body part of a WhileStatement.
@returns {void} | [
"Makes",
"a",
"code",
"path",
"segment",
"for",
"the",
"body",
"part",
"of",
"a",
"WhileStatement",
"."
] | eb2583100c662b5cfc1b461a978b31d3b8555ce1 | https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.javascript/web/eslint/lib/code-path-analysis/code-path-state.js#L1060-L1075 | |
14,483 | eclipse/orion.client | bundles/org.eclipse.orion.client.javascript/web/eslint/lib/code-path-analysis/code-path-state.js | function() {
var context = this.loopContext;
var forkContext = this.forkContext;
var bodySegments = forkContext.makeNext(-1, -1);
// Update state.
context.entrySegments = bodySegments;
forkContext.replaceHead(bodySegments);
} | javascript | function() {
var context = this.loopContext;
var forkContext = this.forkContext;
var bodySegments = forkContext.makeNext(-1, -1);
// Update state.
context.entrySegments = bodySegments;
forkContext.replaceHead(bodySegments);
} | [
"function",
"(",
")",
"{",
"var",
"context",
"=",
"this",
".",
"loopContext",
";",
"var",
"forkContext",
"=",
"this",
".",
"forkContext",
";",
"var",
"bodySegments",
"=",
"forkContext",
".",
"makeNext",
"(",
"-",
"1",
",",
"-",
"1",
")",
";",
"// Updat... | Makes a code path segment for the body part of a DoWhileStatement.
@returns {void} | [
"Makes",
"a",
"code",
"path",
"segment",
"for",
"the",
"body",
"part",
"of",
"a",
"DoWhileStatement",
"."
] | eb2583100c662b5cfc1b461a978b31d3b8555ce1 | https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.javascript/web/eslint/lib/code-path-analysis/code-path-state.js#L1082-L1090 | |
14,484 | eclipse/orion.client | bundles/org.eclipse.orion.client.javascript/web/eslint/lib/code-path-analysis/code-path-state.js | function(test) {
var context = this.loopContext;
var forkContext = this.forkContext;
context.test = test;
// Creates paths of `continue` statements.
if (!context.continueForkContext.empty) {
context.continueForkContext.add(forkContext.head);
var testSegments = context.continueForkContext.makeNe... | javascript | function(test) {
var context = this.loopContext;
var forkContext = this.forkContext;
context.test = test;
// Creates paths of `continue` statements.
if (!context.continueForkContext.empty) {
context.continueForkContext.add(forkContext.head);
var testSegments = context.continueForkContext.makeNe... | [
"function",
"(",
"test",
")",
"{",
"var",
"context",
"=",
"this",
".",
"loopContext",
";",
"var",
"forkContext",
"=",
"this",
".",
"forkContext",
";",
"context",
".",
"test",
"=",
"test",
";",
"// Creates paths of `continue` statements.",
"if",
"(",
"!",
"co... | Makes a code path segment for the test part of a DoWhileStatement.
@param {boolean|} test - The test value (only when constant).
@returns {void} | [
"Makes",
"a",
"code",
"path",
"segment",
"for",
"the",
"test",
"part",
"of",
"a",
"DoWhileStatement",
"."
] | eb2583100c662b5cfc1b461a978b31d3b8555ce1 | https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.javascript/web/eslint/lib/code-path-analysis/code-path-state.js#L1098-L1111 | |
14,485 | eclipse/orion.client | bundles/org.eclipse.orion.client.javascript/web/eslint/lib/code-path-analysis/code-path-state.js | function(test) {
var context = this.loopContext;
var forkContext = this.forkContext;
var endOfInitSegments = forkContext.head;
var testSegments = forkContext.makeNext(-1, -1);
// Update state.
context.test = test;
context.endOfInitSegments = endOfInitSegments;
context.continueDestSegments = con... | javascript | function(test) {
var context = this.loopContext;
var forkContext = this.forkContext;
var endOfInitSegments = forkContext.head;
var testSegments = forkContext.makeNext(-1, -1);
// Update state.
context.test = test;
context.endOfInitSegments = endOfInitSegments;
context.continueDestSegments = con... | [
"function",
"(",
"test",
")",
"{",
"var",
"context",
"=",
"this",
".",
"loopContext",
";",
"var",
"forkContext",
"=",
"this",
".",
"forkContext",
";",
"var",
"endOfInitSegments",
"=",
"forkContext",
".",
"head",
";",
"var",
"testSegments",
"=",
"forkContext"... | Makes a code path segment for the test part of a ForStatement.
@param {boolean|} test - The test value (only when constant).
@returns {void} | [
"Makes",
"a",
"code",
"path",
"segment",
"for",
"the",
"test",
"part",
"of",
"a",
"ForStatement",
"."
] | eb2583100c662b5cfc1b461a978b31d3b8555ce1 | https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.javascript/web/eslint/lib/code-path-analysis/code-path-state.js#L1119-L1130 | |
14,486 | eclipse/orion.client | bundles/org.eclipse.orion.client.javascript/web/eslint/lib/code-path-analysis/code-path-state.js | function() {
var context = this.loopContext;
var choiceContext = this.choiceContext;
var forkContext = this.forkContext;
// Make the next paths of the test.
if (context.testSegments) {
finalizeTestSegmentsOfFor(
context,
choiceContext,
forkContext.head);
} else {
context.endOfI... | javascript | function() {
var context = this.loopContext;
var choiceContext = this.choiceContext;
var forkContext = this.forkContext;
// Make the next paths of the test.
if (context.testSegments) {
finalizeTestSegmentsOfFor(
context,
choiceContext,
forkContext.head);
} else {
context.endOfI... | [
"function",
"(",
")",
"{",
"var",
"context",
"=",
"this",
".",
"loopContext",
";",
"var",
"choiceContext",
"=",
"this",
".",
"choiceContext",
";",
"var",
"forkContext",
"=",
"this",
".",
"forkContext",
";",
"// Make the next paths of the test.",
"if",
"(",
"co... | Makes a code path segment for the update part of a ForStatement.
@returns {void} | [
"Makes",
"a",
"code",
"path",
"segment",
"for",
"the",
"update",
"part",
"of",
"a",
"ForStatement",
"."
] | eb2583100c662b5cfc1b461a978b31d3b8555ce1 | https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.javascript/web/eslint/lib/code-path-analysis/code-path-state.js#L1137-L1157 | |
14,487 | eclipse/orion.client | bundles/org.eclipse.orion.client.javascript/web/eslint/lib/code-path-analysis/code-path-state.js | function() {
var context = this.loopContext;
var choiceContext = this.choiceContext;
var forkContext = this.forkContext;
// Update state.
if (context.updateSegments) {
context.endOfUpdateSegments = forkContext.head;
// `update` -> `test`
if (context.testSegments) {
makeLooped(
th... | javascript | function() {
var context = this.loopContext;
var choiceContext = this.choiceContext;
var forkContext = this.forkContext;
// Update state.
if (context.updateSegments) {
context.endOfUpdateSegments = forkContext.head;
// `update` -> `test`
if (context.testSegments) {
makeLooped(
th... | [
"function",
"(",
")",
"{",
"var",
"context",
"=",
"this",
".",
"loopContext",
";",
"var",
"choiceContext",
"=",
"this",
".",
"choiceContext",
";",
"var",
"forkContext",
"=",
"this",
".",
"forkContext",
";",
"// Update state.",
"if",
"(",
"context",
".",
"u... | Makes a code path segment for the body part of a ForStatement.
@returns {void} | [
"Makes",
"a",
"code",
"path",
"segment",
"for",
"the",
"body",
"part",
"of",
"a",
"ForStatement",
"."
] | eb2583100c662b5cfc1b461a978b31d3b8555ce1 | https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.javascript/web/eslint/lib/code-path-analysis/code-path-state.js#L1164-L1208 | |
14,488 | eclipse/orion.client | bundles/org.eclipse.orion.client.javascript/web/eslint/lib/code-path-analysis/code-path-state.js | function() {
var context = this.loopContext;
var forkContext = this.forkContext;
var leftSegments = forkContext.makeDisconnected(-1, -1);
// Update state.
context.prevSegments = forkContext.head;
context.leftSegments = context.continueDestSegments = leftSegments;
forkContext.replaceHead(leftSegmen... | javascript | function() {
var context = this.loopContext;
var forkContext = this.forkContext;
var leftSegments = forkContext.makeDisconnected(-1, -1);
// Update state.
context.prevSegments = forkContext.head;
context.leftSegments = context.continueDestSegments = leftSegments;
forkContext.replaceHead(leftSegmen... | [
"function",
"(",
")",
"{",
"var",
"context",
"=",
"this",
".",
"loopContext",
";",
"var",
"forkContext",
"=",
"this",
".",
"forkContext",
";",
"var",
"leftSegments",
"=",
"forkContext",
".",
"makeDisconnected",
"(",
"-",
"1",
",",
"-",
"1",
")",
";",
"... | Makes a code path segment for the left part of a ForInStatement and a
ForOfStatement.
@returns {void} | [
"Makes",
"a",
"code",
"path",
"segment",
"for",
"the",
"left",
"part",
"of",
"a",
"ForInStatement",
"and",
"a",
"ForOfStatement",
"."
] | eb2583100c662b5cfc1b461a978b31d3b8555ce1 | https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.javascript/web/eslint/lib/code-path-analysis/code-path-state.js#L1216-L1225 | |
14,489 | eclipse/orion.client | bundles/org.eclipse.orion.client.javascript/web/eslint/lib/code-path-analysis/code-path-state.js | function() {
var context = this.loopContext;
var forkContext = this.forkContext;
var temp = ForkContext.newEmpty(forkContext);
temp.add(context.prevSegments);
var rightSegments = temp.makeNext(-1, -1);
// Update state.
context.endOfLeftSegments = forkContext.head;
forkContext.replaceHead(right... | javascript | function() {
var context = this.loopContext;
var forkContext = this.forkContext;
var temp = ForkContext.newEmpty(forkContext);
temp.add(context.prevSegments);
var rightSegments = temp.makeNext(-1, -1);
// Update state.
context.endOfLeftSegments = forkContext.head;
forkContext.replaceHead(right... | [
"function",
"(",
")",
"{",
"var",
"context",
"=",
"this",
".",
"loopContext",
";",
"var",
"forkContext",
"=",
"this",
".",
"forkContext",
";",
"var",
"temp",
"=",
"ForkContext",
".",
"newEmpty",
"(",
"forkContext",
")",
";",
"temp",
".",
"add",
"(",
"c... | Makes a code path segment for the right part of a ForInStatement and a
ForOfStatement.
@returns {void} | [
"Makes",
"a",
"code",
"path",
"segment",
"for",
"the",
"right",
"part",
"of",
"a",
"ForInStatement",
"and",
"a",
"ForOfStatement",
"."
] | eb2583100c662b5cfc1b461a978b31d3b8555ce1 | https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.javascript/web/eslint/lib/code-path-analysis/code-path-state.js#L1233-L1244 | |
14,490 | eclipse/orion.client | bundles/org.eclipse.orion.client.javascript/web/eslint/lib/code-path-analysis/code-path-state.js | function() {
var context = this.loopContext;
var forkContext = this.forkContext;
var temp = ForkContext.newEmpty(forkContext);
temp.add(context.endOfLeftSegments);
var bodySegments = temp.makeNext(-1, -1);
// Make a path: `right` -> `left`.
makeLooped(this, forkContext.head, context.leftSegments)... | javascript | function() {
var context = this.loopContext;
var forkContext = this.forkContext;
var temp = ForkContext.newEmpty(forkContext);
temp.add(context.endOfLeftSegments);
var bodySegments = temp.makeNext(-1, -1);
// Make a path: `right` -> `left`.
makeLooped(this, forkContext.head, context.leftSegments)... | [
"function",
"(",
")",
"{",
"var",
"context",
"=",
"this",
".",
"loopContext",
";",
"var",
"forkContext",
"=",
"this",
".",
"forkContext",
";",
"var",
"temp",
"=",
"ForkContext",
".",
"newEmpty",
"(",
"forkContext",
")",
";",
"temp",
".",
"add",
"(",
"c... | Makes a code path segment for the body part of a ForInStatement and a
ForOfStatement.
@returns {void} | [
"Makes",
"a",
"code",
"path",
"segment",
"for",
"the",
"body",
"part",
"of",
"a",
"ForInStatement",
"and",
"a",
"ForOfStatement",
"."
] | eb2583100c662b5cfc1b461a978b31d3b8555ce1 | https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.javascript/web/eslint/lib/code-path-analysis/code-path-state.js#L1252-L1266 | |
14,491 | eclipse/orion.client | bundles/org.eclipse.orion.client.javascript/web/eslint/lib/code-path-analysis/code-path-state.js | function() {
var context = this.breakContext;
var forkContext = this.forkContext;
this.breakContext = context.upper;
// Process this context here for other than switches and loops.
if (!context.breakable) {
var brokenForkContext = context.brokenForkContext;
if (!brokenForkContext.empty) {
... | javascript | function() {
var context = this.breakContext;
var forkContext = this.forkContext;
this.breakContext = context.upper;
// Process this context here for other than switches and loops.
if (!context.breakable) {
var brokenForkContext = context.brokenForkContext;
if (!brokenForkContext.empty) {
... | [
"function",
"(",
")",
"{",
"var",
"context",
"=",
"this",
".",
"breakContext",
";",
"var",
"forkContext",
"=",
"this",
".",
"forkContext",
";",
"this",
".",
"breakContext",
"=",
"context",
".",
"upper",
";",
"// Process this context here for other than switches an... | Removes the top item of the break context stack.
@returns {object} The removed context. | [
"Removes",
"the",
"top",
"item",
"of",
"the",
"break",
"context",
"stack",
"."
] | eb2583100c662b5cfc1b461a978b31d3b8555ce1 | https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.javascript/web/eslint/lib/code-path-analysis/code-path-state.js#L1295-L1312 | |
14,492 | eclipse/orion.client | bundles/org.eclipse.orion.client.javascript/web/eslint/lib/code-path-analysis/code-path-state.js | function(label) {
var forkContext = this.forkContext;
if (!forkContext.reachable) {
return;
}
var context = getBreakContext(this, label);
/* istanbul ignore else: foolproof (syntax error) */
if (context) {
context.brokenForkContext.add(forkContext.head);
}
forkContext.replaceHead(for... | javascript | function(label) {
var forkContext = this.forkContext;
if (!forkContext.reachable) {
return;
}
var context = getBreakContext(this, label);
/* istanbul ignore else: foolproof (syntax error) */
if (context) {
context.brokenForkContext.add(forkContext.head);
}
forkContext.replaceHead(for... | [
"function",
"(",
"label",
")",
"{",
"var",
"forkContext",
"=",
"this",
".",
"forkContext",
";",
"if",
"(",
"!",
"forkContext",
".",
"reachable",
")",
"{",
"return",
";",
"}",
"var",
"context",
"=",
"getBreakContext",
"(",
"this",
",",
"label",
")",
";"... | Makes a path for a `break` statement.
It registers the head segment to a context of `break`.
It makes new unreachable segment, then it set the head with the segment.
@param {string} label - A label of the break statement.
@returns {void} | [
"Makes",
"a",
"path",
"for",
"a",
"break",
"statement",
"."
] | eb2583100c662b5cfc1b461a978b31d3b8555ce1 | https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.javascript/web/eslint/lib/code-path-analysis/code-path-state.js#L1323-L1338 | |
14,493 | eclipse/orion.client | bundles/org.eclipse.orion.client.javascript/web/eslint/lib/code-path-analysis/code-path-state.js | function(label) {
var forkContext = this.forkContext;
if (!forkContext.reachable) {
return;
}
var context = getContinueContext(this, label);
/* istanbul ignore else: foolproof (syntax error) */
if (context) {
if (context.continueDestSegments) {
makeLooped(this, forkContext.head, contex... | javascript | function(label) {
var forkContext = this.forkContext;
if (!forkContext.reachable) {
return;
}
var context = getContinueContext(this, label);
/* istanbul ignore else: foolproof (syntax error) */
if (context) {
if (context.continueDestSegments) {
makeLooped(this, forkContext.head, contex... | [
"function",
"(",
"label",
")",
"{",
"var",
"forkContext",
"=",
"this",
".",
"forkContext",
";",
"if",
"(",
"!",
"forkContext",
".",
"reachable",
")",
"{",
"return",
";",
"}",
"var",
"context",
"=",
"getContinueContext",
"(",
"this",
",",
"label",
")",
... | Makes a path for a `continue` statement.
It makes a looping path.
It makes new unreachable segment, then it set the head with the segment.
@param {string} label - A label of the continue statement.
@returns {void} | [
"Makes",
"a",
"path",
"for",
"a",
"continue",
"statement",
"."
] | eb2583100c662b5cfc1b461a978b31d3b8555ce1 | https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.javascript/web/eslint/lib/code-path-analysis/code-path-state.js#L1349-L1374 | |
14,494 | eclipse/orion.client | bundles/org.eclipse.orion.client.javascript/web/eslint/lib/code-path-analysis/code-path-state.js | function() {
var forkContext = this.forkContext;
if (forkContext.reachable) {
getReturnContext(this).returnedForkContext.add(forkContext.head);
forkContext.replaceHead(forkContext.makeUnreachable(-1, -1));
}
} | javascript | function() {
var forkContext = this.forkContext;
if (forkContext.reachable) {
getReturnContext(this).returnedForkContext.add(forkContext.head);
forkContext.replaceHead(forkContext.makeUnreachable(-1, -1));
}
} | [
"function",
"(",
")",
"{",
"var",
"forkContext",
"=",
"this",
".",
"forkContext",
";",
"if",
"(",
"forkContext",
".",
"reachable",
")",
"{",
"getReturnContext",
"(",
"this",
")",
".",
"returnedForkContext",
".",
"add",
"(",
"forkContext",
".",
"head",
")",... | Makes a path for a `return` statement.
It registers the head segment to a context of `return`.
It makes new unreachable segment, then it set the head with the segment.
@returns {void} | [
"Makes",
"a",
"path",
"for",
"a",
"return",
"statement",
"."
] | eb2583100c662b5cfc1b461a978b31d3b8555ce1 | https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.javascript/web/eslint/lib/code-path-analysis/code-path-state.js#L1384-L1391 | |
14,495 | eclipse/orion.client | bundles/org.eclipse.orion.client.javascript/web/eslint/lib/code-path-analysis/code-path-state.js | function() {
var forkContext = this.forkContext;
if (forkContext.reachable) {
getThrowContext(this).thrownForkContext.add(forkContext.head);
forkContext.replaceHead(forkContext.makeUnreachable(-1, -1));
}
} | javascript | function() {
var forkContext = this.forkContext;
if (forkContext.reachable) {
getThrowContext(this).thrownForkContext.add(forkContext.head);
forkContext.replaceHead(forkContext.makeUnreachable(-1, -1));
}
} | [
"function",
"(",
")",
"{",
"var",
"forkContext",
"=",
"this",
".",
"forkContext",
";",
"if",
"(",
"forkContext",
".",
"reachable",
")",
"{",
"getThrowContext",
"(",
"this",
")",
".",
"thrownForkContext",
".",
"add",
"(",
"forkContext",
".",
"head",
")",
... | Makes a path for a `throw` statement.
It registers the head segment to a context of `throw`.
It makes new unreachable segment, then it set the head with the segment.
@returns {void} | [
"Makes",
"a",
"path",
"for",
"a",
"throw",
"statement",
"."
] | eb2583100c662b5cfc1b461a978b31d3b8555ce1 | https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.javascript/web/eslint/lib/code-path-analysis/code-path-state.js#L1401-L1408 | |
14,496 | eclipse/orion.client | bundles/org.eclipse.orion.client.ui/web/orion/fileCommands.js | function(children) {
var attempt = 0;
var uniqueName = prefix;
// find a unique name for the new artifact
var possiblyCollidingNames = children.filter(function(child){
return 0 === child.Name.indexOf(prefix);
}).map(function(child){
return child.Name;
});
while (-1 !== po... | javascript | function(children) {
var attempt = 0;
var uniqueName = prefix;
// find a unique name for the new artifact
var possiblyCollidingNames = children.filter(function(child){
return 0 === child.Name.indexOf(prefix);
}).map(function(child){
return child.Name;
});
while (-1 !== po... | [
"function",
"(",
"children",
")",
"{",
"var",
"attempt",
"=",
"0",
";",
"var",
"uniqueName",
"=",
"prefix",
";",
"// find a unique name for the new artifact",
"var",
"possiblyCollidingNames",
"=",
"children",
".",
"filter",
"(",
"function",
"(",
"child",
")",
"{... | get the list of files that already exists in the selected directory and ensure that the new file's initial name is unique within that directory | [
"get",
"the",
"list",
"of",
"files",
"that",
"already",
"exists",
"in",
"the",
"selected",
"directory",
"and",
"ensure",
"that",
"the",
"new",
"file",
"s",
"initial",
"name",
"is",
"unique",
"within",
"that",
"directory"
] | eb2583100c662b5cfc1b461a978b31d3b8555ce1 | https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.ui/web/orion/fileCommands.js#L866-L883 | |
14,497 | eclipse/orion.client | bundles/org.eclipse.orion.client.ui/web/orion/fileCommands.js | createNewArtifact | function createNewArtifact(namePrefix, parentItem, isDirectory) {
var createFunction = function(name) {
if (name) {
var location = parentItem.Location;
var functionName = isDirectory ? "createFolder" : "createFile";
var deferred = fileClient[functionName](location, name, {select: true});
prog... | javascript | function createNewArtifact(namePrefix, parentItem, isDirectory) {
var createFunction = function(name) {
if (name) {
var location = parentItem.Location;
var functionName = isDirectory ? "createFolder" : "createFile";
var deferred = fileClient[functionName](location, name, {select: true});
prog... | [
"function",
"createNewArtifact",
"(",
"namePrefix",
",",
"parentItem",
",",
"isDirectory",
")",
"{",
"var",
"createFunction",
"=",
"function",
"(",
"name",
")",
"{",
"if",
"(",
"name",
")",
"{",
"var",
"location",
"=",
"parentItem",
".",
"Location",
";",
"... | Creates a new file or folder as a child of the specified parentItem. | [
"Creates",
"a",
"new",
"file",
"or",
"folder",
"as",
"a",
"child",
"of",
"the",
"specified",
"parentItem",
"."
] | eb2583100c662b5cfc1b461a978b31d3b8555ce1 | https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.ui/web/orion/fileCommands.js#L939-L970 |
14,498 | eclipse/orion.client | bundles/org.eclipse.orion.client.editor/web/orion/editor/rulers.js | function (annotationModel) {
if (this._annotationModel) {
this._annotationModel.removeEventListener("Changed", this._listener.onAnnotationModelChanged); //$NON-NLS-0$
}
this._annotationModel = annotationModel;
if (this._annotationModel) {
this._annotationModel.addEventListener("Changed", this._liste... | javascript | function (annotationModel) {
if (this._annotationModel) {
this._annotationModel.removeEventListener("Changed", this._listener.onAnnotationModelChanged); //$NON-NLS-0$
}
this._annotationModel = annotationModel;
if (this._annotationModel) {
this._annotationModel.addEventListener("Changed", this._liste... | [
"function",
"(",
"annotationModel",
")",
"{",
"if",
"(",
"this",
".",
"_annotationModel",
")",
"{",
"this",
".",
"_annotationModel",
".",
"removeEventListener",
"(",
"\"Changed\"",
",",
"this",
".",
"_listener",
".",
"onAnnotationModelChanged",
")",
";",
"//$NON... | Sets the annotation model for the ruler.
@param {orion.editor.AnnotationModel} annotationModel the annotation model.
@see orion.editor.Ruler#getAnnotationModel | [
"Sets",
"the",
"annotation",
"model",
"for",
"the",
"ruler",
"."
] | eb2583100c662b5cfc1b461a978b31d3b8555ce1 | https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.editor/web/orion/editor/rulers.js#L228-L236 | |
14,499 | eclipse/orion.client | bundles/org.eclipse.orion.client.editor/web/orion/editor/rulers.js | function(lineIndex, e) {
var tooltip = mTooltip.Tooltip.getTooltip(this._view);
if (!tooltip) { return; }
if (tooltip.isVisible() && this._tooltipLineIndex === lineIndex) { return; }
this._tooltipLineIndex = lineIndex;
// Prevent spurious mouse event (e.g. on a scroll)
if (e.clientX === this.... | javascript | function(lineIndex, e) {
var tooltip = mTooltip.Tooltip.getTooltip(this._view);
if (!tooltip) { return; }
if (tooltip.isVisible() && this._tooltipLineIndex === lineIndex) { return; }
this._tooltipLineIndex = lineIndex;
// Prevent spurious mouse event (e.g. on a scroll)
if (e.clientX === this.... | [
"function",
"(",
"lineIndex",
",",
"e",
")",
"{",
"var",
"tooltip",
"=",
"mTooltip",
".",
"Tooltip",
".",
"getTooltip",
"(",
"this",
".",
"_view",
")",
";",
"if",
"(",
"!",
"tooltip",
")",
"{",
"return",
";",
"}",
"if",
"(",
"tooltip",
".",
"isVisi... | This event is sent when the user moves the mouse over a line annotation.
@event
@param {Number} lineIndex the line index of the annotation under the pointer.
@param {DOMEvent} e the mouse move event. | [
"This",
"event",
"is",
"sent",
"when",
"the",
"user",
"moves",
"the",
"mouse",
"over",
"a",
"line",
"annotation",
"."
] | eb2583100c662b5cfc1b461a978b31d3b8555ce1 | https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.editor/web/orion/editor/rulers.js#L370-L415 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.