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,300 | eclipse/orion.client | bundles/org.eclipse.orion.client.ui/web/orion/searchModel.js | getReplacedFileContent | function getReplacedFileContent(newContentHolder, updating, fileItem) {
mSearchUtils.generateNewContents(updating, fileItem.contents, newContentHolder, fileItem, this._searchHelper.params.replace, this._searchHelper.inFileQuery.searchStrLength);
newContentHolder.lineDelim = this._lineDelimiter;
} | javascript | function getReplacedFileContent(newContentHolder, updating, fileItem) {
mSearchUtils.generateNewContents(updating, fileItem.contents, newContentHolder, fileItem, this._searchHelper.params.replace, this._searchHelper.inFileQuery.searchStrLength);
newContentHolder.lineDelim = this._lineDelimiter;
} | [
"function",
"getReplacedFileContent",
"(",
"newContentHolder",
",",
"updating",
",",
"fileItem",
")",
"{",
"mSearchUtils",
".",
"generateNewContents",
"(",
"updating",
",",
"fileItem",
".",
"contents",
",",
"newContentHolder",
",",
"fileItem",
",",
"this",
".",
"_... | Get the replaced file contents by a given file model. Sync call. Required function.
@param {Object} newContentHolder The returned replaced file content holder. The content holder has to have a property called "contents". It can be either type of the below:
String type: the pure contents of the file
Array type: the line... | [
"Get",
"the",
"replaced",
"file",
"contents",
"by",
"a",
"given",
"file",
"model",
".",
"Sync",
"call",
".",
"Required",
"function",
"."
] | eb2583100c662b5cfc1b461a978b31d3b8555ce1 | https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.ui/web/orion/searchModel.js#L539-L542 |
14,301 | eclipse/orion.client | bundles/org.eclipse.orion.client.ui/web/orion/searchModel.js | writeReplacedContents | function writeReplacedContents(reportList){
var promises = [];
var validFileList = this.getValidFileList();
validFileList.forEach(function(fileItem) {
promises.push(this._writeOneFile(fileItem, reportList));
}.bind(this));
return Deferred.all(promises, function(error) { return {_error: error}; ... | javascript | function writeReplacedContents(reportList){
var promises = [];
var validFileList = this.getValidFileList();
validFileList.forEach(function(fileItem) {
promises.push(this._writeOneFile(fileItem, reportList));
}.bind(this));
return Deferred.all(promises, function(error) { return {_error: error}; ... | [
"function",
"writeReplacedContents",
"(",
"reportList",
")",
"{",
"var",
"promises",
"=",
"[",
"]",
";",
"var",
"validFileList",
"=",
"this",
".",
"getValidFileList",
"(",
")",
";",
"validFileList",
".",
"forEach",
"(",
"function",
"(",
"fileItem",
")",
"{",... | Write the replace file contents. Required function.
@param {Array} reportList The array of the report items.
Each item of the reportList contains the following properties
model: the file item
matchesReplaced: The number of matches that replaced in this file
status: "pass" or "failed"
message: Optional. The error messag... | [
"Write",
"the",
"replace",
"file",
"contents",
".",
"Required",
"function",
"."
] | eb2583100c662b5cfc1b461a978b31d3b8555ce1 | https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.ui/web/orion/searchModel.js#L555-L562 |
14,302 | eclipse/orion.client | bundles/org.eclipse.orion.client.javascript/web/eslint/lib/rules/no-invalid-this.js | isReflectApply | function isReflectApply(node) {
return node.type === "MemberExpression" &&
node.object.type === "Identifier" &&
node.object.name === "Reflect" &&
node.property.type === "Identifier" &&
node.property.name === "apply" &&
node.computed === false;
} | javascript | function isReflectApply(node) {
return node.type === "MemberExpression" &&
node.object.type === "Identifier" &&
node.object.name === "Reflect" &&
node.property.type === "Identifier" &&
node.property.name === "apply" &&
node.computed === false;
} | [
"function",
"isReflectApply",
"(",
"node",
")",
"{",
"return",
"node",
".",
"type",
"===",
"\"MemberExpression\"",
"&&",
"node",
".",
"object",
".",
"type",
"===",
"\"Identifier\"",
"&&",
"node",
".",
"object",
".",
"name",
"===",
"\"Reflect\"",
"&&",
"node"... | Checks whether or not a node is 'Reclect.apply'.
@param {ASTNode} node - A node to check.
@returns {boolean} Whether or not the node is a 'Reclect.apply'. | [
"Checks",
"whether",
"or",
"not",
"a",
"node",
"is",
"Reclect",
".",
"apply",
"."
] | eb2583100c662b5cfc1b461a978b31d3b8555ce1 | https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.javascript/web/eslint/lib/rules/no-invalid-this.js#L42-L49 |
14,303 | eclipse/orion.client | bundles/org.eclipse.orion.client.javascript/web/eslint/lib/rules/no-invalid-this.js | isES5Constructor | function isES5Constructor(node) {
return node.id &&
node.id.name[0] !== node.id.name[0].toLocaleLowerCase();
} | javascript | function isES5Constructor(node) {
return node.id &&
node.id.name[0] !== node.id.name[0].toLocaleLowerCase();
} | [
"function",
"isES5Constructor",
"(",
"node",
")",
"{",
"return",
"node",
".",
"id",
"&&",
"node",
".",
"id",
".",
"name",
"[",
"0",
"]",
"!==",
"node",
".",
"id",
".",
"name",
"[",
"0",
"]",
".",
"toLocaleLowerCase",
"(",
")",
";",
"}"
] | Checks whether or not a node is a constructor.
@param {ASTNode} node - A function node to check.
@returns {boolean} Wehether or not a node is a constructor. | [
"Checks",
"whether",
"or",
"not",
"a",
"node",
"is",
"a",
"constructor",
"."
] | eb2583100c662b5cfc1b461a978b31d3b8555ce1 | https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.javascript/web/eslint/lib/rules/no-invalid-this.js#L92-L95 |
14,304 | eclipse/orion.client | bundles/org.eclipse.orion.client.javascript/web/eslint/lib/rules/no-invalid-this.js | function(node) {
var current = stack.getCurrent();
if (current && !current.valid) {
context.report(node, ProblemMessages.noInvalidThis);
}
} | javascript | function(node) {
var current = stack.getCurrent();
if (current && !current.valid) {
context.report(node, ProblemMessages.noInvalidThis);
}
} | [
"function",
"(",
"node",
")",
"{",
"var",
"current",
"=",
"stack",
".",
"getCurrent",
"(",
")",
";",
"if",
"(",
"current",
"&&",
"!",
"current",
".",
"valid",
")",
"{",
"context",
".",
"report",
"(",
"node",
",",
"ProblemMessages",
".",
"noInvalidThis"... | Reports if 'this' of the current context is invalid. | [
"Reports",
"if",
"this",
"of",
"the",
"current",
"context",
"is",
"invalid",
"."
] | eb2583100c662b5cfc1b461a978b31d3b8555ce1 | https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.javascript/web/eslint/lib/rules/no-invalid-this.js#L322-L328 | |
14,305 | eclipse/orion.client | bundles/org.eclipse.orion.client.editor/web/orion/editor/editor.js | function() {
BaseEditor.prototype.destroy.call(this);
this._textViewFactory = this._undoStackFactory = this._textDNDFactory =
this._annotationFactory = this._foldingRulerFactory = this._lineNumberRulerFactory =
this._contentAssistFactory = this._keyBindingFactory = this._hoverFactory = this._zoomRulerFact... | javascript | function() {
BaseEditor.prototype.destroy.call(this);
this._textViewFactory = this._undoStackFactory = this._textDNDFactory =
this._annotationFactory = this._foldingRulerFactory = this._lineNumberRulerFactory =
this._contentAssistFactory = this._keyBindingFactory = this._hoverFactory = this._zoomRulerFact... | [
"function",
"(",
")",
"{",
"BaseEditor",
".",
"prototype",
".",
"destroy",
".",
"call",
"(",
"this",
")",
";",
"this",
".",
"_textViewFactory",
"=",
"this",
".",
"_undoStackFactory",
"=",
"this",
".",
"_textDNDFactory",
"=",
"this",
".",
"_annotationFactory"... | Destroys the editor. | [
"Destroys",
"the",
"editor",
"."
] | eb2583100c662b5cfc1b461a978b31d3b8555ce1 | https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.editor/web/orion/editor/editor.js#L327-L332 | |
14,306 | eclipse/orion.client | bundles/org.eclipse.orion.client.editor/web/orion/editor/editor.js | function(start, end) {
var annotationModel = this.getAnnotationModel();
if(annotationModel) {
var foldingAnnotation = new mAnnotations.FoldingAnnotation(start, end, this.getTextView().getModel());
annotationModel.addAnnotation(foldingAnnotation);
return foldingAnnotation;
}
return null;
} | javascript | function(start, end) {
var annotationModel = this.getAnnotationModel();
if(annotationModel) {
var foldingAnnotation = new mAnnotations.FoldingAnnotation(start, end, this.getTextView().getModel());
annotationModel.addAnnotation(foldingAnnotation);
return foldingAnnotation;
}
return null;
} | [
"function",
"(",
"start",
",",
"end",
")",
"{",
"var",
"annotationModel",
"=",
"this",
".",
"getAnnotationModel",
"(",
")",
";",
"if",
"(",
"annotationModel",
")",
"{",
"var",
"foldingAnnotation",
"=",
"new",
"mAnnotations",
".",
"FoldingAnnotation",
"(",
"s... | Creates and add a FoldingAnnotation to the editor.
@param {Number} start The start offset of the annotation in the text model.
@param {Number} end The end offset of the annotation in the text model.
@returns {orion.editor.FoldingAnnotation} The FoldingAnnotation added to the editor. | [
"Creates",
"and",
"add",
"a",
"FoldingAnnotation",
"to",
"the",
"editor",
"."
] | eb2583100c662b5cfc1b461a978b31d3b8555ce1 | https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.editor/web/orion/editor/editor.js#L398-L406 | |
14,307 | eclipse/orion.client | bundles/org.eclipse.orion.client.editor/web/orion/editor/editor.js | function() {
if (!this._textView) {
return null;
}
var model = this._textView.getModel();
if (model.getBaseModel) {
model = model.getBaseModel();
}
return model;
} | javascript | function() {
if (!this._textView) {
return null;
}
var model = this._textView.getModel();
if (model.getBaseModel) {
model = model.getBaseModel();
}
return model;
} | [
"function",
"(",
")",
"{",
"if",
"(",
"!",
"this",
".",
"_textView",
")",
"{",
"return",
"null",
";",
"}",
"var",
"model",
"=",
"this",
".",
"_textView",
".",
"getModel",
"(",
")",
";",
"if",
"(",
"model",
".",
"getBaseModel",
")",
"{",
"model",
... | Returns the base text model of this editor.
@returns {orion.editor.TextModel} | [
"Returns",
"the",
"base",
"text",
"model",
"of",
"this",
"editor",
"."
] | eb2583100c662b5cfc1b461a978b31d3b8555ce1 | https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.editor/web/orion/editor/editor.js#L454-L463 | |
14,308 | eclipse/orion.client | bundles/org.eclipse.orion.client.editor/web/orion/editor/editor.js | function(visible, force) {
if (this._annotationRulerVisible === visible && !force) { return; }
this._annotationRulerVisible = visible;
if (!this._annotationRuler) { return; }
var textView = this._textView;
if (visible) {
textView.addRuler(this._annotationRuler, 0);
} else {
textView.removeRule... | javascript | function(visible, force) {
if (this._annotationRulerVisible === visible && !force) { return; }
this._annotationRulerVisible = visible;
if (!this._annotationRuler) { return; }
var textView = this._textView;
if (visible) {
textView.addRuler(this._annotationRuler, 0);
} else {
textView.removeRule... | [
"function",
"(",
"visible",
",",
"force",
")",
"{",
"if",
"(",
"this",
".",
"_annotationRulerVisible",
"===",
"visible",
"&&",
"!",
"force",
")",
"{",
"return",
";",
"}",
"this",
".",
"_annotationRulerVisible",
"=",
"visible",
";",
"if",
"(",
"!",
"this"... | Sets whether the annotation ruler is visible.
@param {Boolean} visible <code>true</code> to show ruler, <code>false</code> otherwise | [
"Sets",
"whether",
"the",
"annotation",
"ruler",
"is",
"visible",
"."
] | eb2583100c662b5cfc1b461a978b31d3b8555ce1 | https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.editor/web/orion/editor/editor.js#L532-L542 | |
14,309 | eclipse/orion.client | bundles/org.eclipse.orion.client.editor/web/orion/editor/editor.js | function(visible, force) {
if (this._foldingRulerVisible === visible && !force) { return; }
if (!visible) {
var textActions = this.getTextActions();
if (textActions) {
textActions.expandAnnotations(true);
}
}
this._foldingRulerVisible = visible;
if (!this._foldingRuler) { return; }
va... | javascript | function(visible, force) {
if (this._foldingRulerVisible === visible && !force) { return; }
if (!visible) {
var textActions = this.getTextActions();
if (textActions) {
textActions.expandAnnotations(true);
}
}
this._foldingRulerVisible = visible;
if (!this._foldingRuler) { return; }
va... | [
"function",
"(",
"visible",
",",
"force",
")",
"{",
"if",
"(",
"this",
".",
"_foldingRulerVisible",
"===",
"visible",
"&&",
"!",
"force",
")",
"{",
"return",
";",
"}",
"if",
"(",
"!",
"visible",
")",
"{",
"var",
"textActions",
"=",
"this",
".",
"getT... | Sets whether the folding ruler is visible.
@param {Boolean} visible <code>true</code> to show ruler, <code>false</code> otherwise | [
"Sets",
"whether",
"the",
"folding",
"ruler",
"is",
"visible",
"."
] | eb2583100c662b5cfc1b461a978b31d3b8555ce1 | https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.editor/web/orion/editor/editor.js#L548-L565 | |
14,310 | eclipse/orion.client | bundles/org.eclipse.orion.client.editor/web/orion/editor/editor.js | function(visible, force) {
if (this._lineNumberRulerVisible === visible && !force) { return; }
this._lineNumberRulerVisible = visible;
if (!this._lineNumberRuler) { return; }
var textView = this._textView;
if (visible) {
textView.addRuler(this._lineNumberRuler, !this._annotationRulerVisible ? 0 : 1);... | javascript | function(visible, force) {
if (this._lineNumberRulerVisible === visible && !force) { return; }
this._lineNumberRulerVisible = visible;
if (!this._lineNumberRuler) { return; }
var textView = this._textView;
if (visible) {
textView.addRuler(this._lineNumberRuler, !this._annotationRulerVisible ? 0 : 1);... | [
"function",
"(",
"visible",
",",
"force",
")",
"{",
"if",
"(",
"this",
".",
"_lineNumberRulerVisible",
"===",
"visible",
"&&",
"!",
"force",
")",
"{",
"return",
";",
"}",
"this",
".",
"_lineNumberRulerVisible",
"=",
"visible",
";",
"if",
"(",
"!",
"this"... | Sets whether the line numbering ruler is visible.
@param {Boolean} visible <code>true</code> to show ruler, <code>false</code> otherwise | [
"Sets",
"whether",
"the",
"line",
"numbering",
"ruler",
"is",
"visible",
"."
] | eb2583100c662b5cfc1b461a978b31d3b8555ce1 | https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.editor/web/orion/editor/editor.js#L571-L581 | |
14,311 | eclipse/orion.client | bundles/org.eclipse.orion.client.editor/web/orion/editor/editor.js | function(visible, force) {
if (this._overviewRulerVisible === visible && !force) { return; }
this._overviewRulerVisible = visible;
if (!this._overviewRuler) { return; }
var textView = this._textView;
if (visible) {
textView.addRuler(this._overviewRuler);
} else {
textView.removeRuler(this._ove... | javascript | function(visible, force) {
if (this._overviewRulerVisible === visible && !force) { return; }
this._overviewRulerVisible = visible;
if (!this._overviewRuler) { return; }
var textView = this._textView;
if (visible) {
textView.addRuler(this._overviewRuler);
} else {
textView.removeRuler(this._ove... | [
"function",
"(",
"visible",
",",
"force",
")",
"{",
"if",
"(",
"this",
".",
"_overviewRulerVisible",
"===",
"visible",
"&&",
"!",
"force",
")",
"{",
"return",
";",
"}",
"this",
".",
"_overviewRulerVisible",
"=",
"visible",
";",
"if",
"(",
"!",
"this",
... | Sets whether the overview ruler is visible.
@param {Boolean} visible <code>true</code> to show ruler, <code>false</code> otherwise | [
"Sets",
"whether",
"the",
"overview",
"ruler",
"is",
"visible",
"."
] | eb2583100c662b5cfc1b461a978b31d3b8555ce1 | https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.editor/web/orion/editor/editor.js#L587-L597 | |
14,312 | eclipse/orion.client | bundles/org.eclipse.orion.client.editor/web/orion/editor/editor.js | function(visible, force) {
if (this._zoomRulerVisible === visible && !force) { return; }
this._zoomRulerVisible = visible;
if (!this._zoomRuler) { return; }
var textView = this._textView;
if (visible) {
textView.addRuler(this._zoomRuler);
} else {
textView.removeRuler(this._zoomRuler);
}
... | javascript | function(visible, force) {
if (this._zoomRulerVisible === visible && !force) { return; }
this._zoomRulerVisible = visible;
if (!this._zoomRuler) { return; }
var textView = this._textView;
if (visible) {
textView.addRuler(this._zoomRuler);
} else {
textView.removeRuler(this._zoomRuler);
}
... | [
"function",
"(",
"visible",
",",
"force",
")",
"{",
"if",
"(",
"this",
".",
"_zoomRulerVisible",
"===",
"visible",
"&&",
"!",
"force",
")",
"{",
"return",
";",
"}",
"this",
".",
"_zoomRulerVisible",
"=",
"visible",
";",
"if",
"(",
"!",
"this",
".",
"... | Sets whether the zoom ruler is visible.
@param {Boolean} visible <code>true</code> to show ruler, <code>false</code> otherwise | [
"Sets",
"whether",
"the",
"zoom",
"ruler",
"is",
"visible",
"."
] | eb2583100c662b5cfc1b461a978b31d3b8555ce1 | https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.editor/web/orion/editor/editor.js#L603-L613 | |
14,313 | eclipse/orion.client | bundles/org.eclipse.orion.client.editor/web/orion/editor/editor.js | function(types) {
if (textUtil.compare(this._annotationTypesVisible, types)) return;
this._annotationTypesVisible = types;
if (!this._annotationRuler || !this._textView || !this._annotationRulerVisible) { return; }
this._annotationRuler.setAnnotationTypeVisible(types);
this._textView.redrawLines(0, undef... | javascript | function(types) {
if (textUtil.compare(this._annotationTypesVisible, types)) return;
this._annotationTypesVisible = types;
if (!this._annotationRuler || !this._textView || !this._annotationRulerVisible) { return; }
this._annotationRuler.setAnnotationTypeVisible(types);
this._textView.redrawLines(0, undef... | [
"function",
"(",
"types",
")",
"{",
"if",
"(",
"textUtil",
".",
"compare",
"(",
"this",
".",
"_annotationTypesVisible",
",",
"types",
")",
")",
"return",
";",
"this",
".",
"_annotationTypesVisible",
"=",
"types",
";",
"if",
"(",
"!",
"this",
".",
"_annot... | Sets which annotations types are shown in the annotation ruler. Annotations are visible by default.
@param {Object} types a hash table mapping annotation type to visibility (i.e. AnnotationType.ANNOTATION_INFO -> true).
@since 14.0 | [
"Sets",
"which",
"annotations",
"types",
"are",
"shown",
"in",
"the",
"annotation",
"ruler",
".",
"Annotations",
"are",
"visible",
"by",
"default",
"."
] | eb2583100c662b5cfc1b461a978b31d3b8555ce1 | https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.editor/web/orion/editor/editor.js#L621-L627 | |
14,314 | eclipse/orion.client | bundles/org.eclipse.orion.client.editor/web/orion/editor/editor.js | function(types) {
if (textUtil.compare(this._overviewAnnotationTypesVisible, types)) return;
this._overviewAnnotationTypesVisible = types;
if (!this._overviewRuler || !this._textView || !this._overviewRulerVisible) { return; }
this._overviewRuler.setAnnotationTypeVisible(types);
this._textView.redrawLine... | javascript | function(types) {
if (textUtil.compare(this._overviewAnnotationTypesVisible, types)) return;
this._overviewAnnotationTypesVisible = types;
if (!this._overviewRuler || !this._textView || !this._overviewRulerVisible) { return; }
this._overviewRuler.setAnnotationTypeVisible(types);
this._textView.redrawLine... | [
"function",
"(",
"types",
")",
"{",
"if",
"(",
"textUtil",
".",
"compare",
"(",
"this",
".",
"_overviewAnnotationTypesVisible",
",",
"types",
")",
")",
"return",
";",
"this",
".",
"_overviewAnnotationTypesVisible",
"=",
"types",
";",
"if",
"(",
"!",
"this",
... | Sets which annotations types are shown in the overview ruler. Annotations are visible by default.
@param {Object} types a hash table mapping annotation type to visibility (i.e. AnnotationType.ANNOTATION_INFO -> true).
@since 14.0 | [
"Sets",
"which",
"annotations",
"types",
"are",
"shown",
"in",
"the",
"overview",
"ruler",
".",
"Annotations",
"are",
"visible",
"by",
"default",
"."
] | eb2583100c662b5cfc1b461a978b31d3b8555ce1 | https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.editor/web/orion/editor/editor.js#L635-L641 | |
14,315 | eclipse/orion.client | bundles/org.eclipse.orion.client.editor/web/orion/editor/editor.js | function(types) {
if (textUtil.compare(this._textAnnotationTypesVisible, types)) return;
this._textAnnotationTypesVisible = types;
if (!this._annotationStyler || !this._textView) { return; }
this._annotationStyler.setAnnotationTypeVisible(types);
this._textView.redrawLines(0, undefined);
} | javascript | function(types) {
if (textUtil.compare(this._textAnnotationTypesVisible, types)) return;
this._textAnnotationTypesVisible = types;
if (!this._annotationStyler || !this._textView) { return; }
this._annotationStyler.setAnnotationTypeVisible(types);
this._textView.redrawLines(0, undefined);
} | [
"function",
"(",
"types",
")",
"{",
"if",
"(",
"textUtil",
".",
"compare",
"(",
"this",
".",
"_textAnnotationTypesVisible",
",",
"types",
")",
")",
"return",
";",
"this",
".",
"_textAnnotationTypesVisible",
"=",
"types",
";",
"if",
"(",
"!",
"this",
".",
... | Sets which annotations types are shown in the text. Annotations are visible by default.
@param {Object} types a hash table mapping annotation type to visibility (i.e. AnnotationType.ANNOTATION_INFO -> true).
@since 14.0 | [
"Sets",
"which",
"annotations",
"types",
"are",
"shown",
"in",
"the",
"text",
".",
"Annotations",
"are",
"visible",
"by",
"default",
"."
] | eb2583100c662b5cfc1b461a978b31d3b8555ce1 | https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.editor/web/orion/editor/editor.js#L649-L655 | |
14,316 | eclipse/orion.client | bundles/org.eclipse.orion.client.editor/web/orion/editor/editor.js | function(line) {
// Find any existing annotation
var annotationModel = this.getAnnotationModel();
var textModel = this.getModel();
if (textModel.getBaseModel) {
textModel = textModel.getBaseModel();
}
var type = AT.ANNOTATION_HIGHLIGHTED_LINE;
var annotations = annotationModel.getAnnotations(0,... | javascript | function(line) {
// Find any existing annotation
var annotationModel = this.getAnnotationModel();
var textModel = this.getModel();
if (textModel.getBaseModel) {
textModel = textModel.getBaseModel();
}
var type = AT.ANNOTATION_HIGHLIGHTED_LINE;
var annotations = annotationModel.getAnnotations(0,... | [
"function",
"(",
"line",
")",
"{",
"// Find any existing annotation",
"var",
"annotationModel",
"=",
"this",
".",
"getAnnotationModel",
"(",
")",
";",
"var",
"textModel",
"=",
"this",
".",
"getModel",
"(",
")",
";",
"if",
"(",
"textModel",
".",
"getBaseModel",... | Highlight a line.
@param {number} line | [
"Highlight",
"a",
"line",
"."
] | eb2583100c662b5cfc1b461a978b31d3b8555ce1 | https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.editor/web/orion/editor/editor.js#L930-L956 | |
14,317 | eclipse/orion.client | bundles/org.eclipse.orion.client.editor/web/orion/editor/editor.js | function() {
var annotationModel = this.getAnnotationModel();
var textModel = this.getModel();
if (textModel.getBaseModel) {
textModel = textModel.getBaseModel();
}
var type = AT.ANNOTATION_HIGHLIGHTED_LINE;
var annotations = annotationModel.getAnnotations(0, textModel.getCharCount());
var remo... | javascript | function() {
var annotationModel = this.getAnnotationModel();
var textModel = this.getModel();
if (textModel.getBaseModel) {
textModel = textModel.getBaseModel();
}
var type = AT.ANNOTATION_HIGHLIGHTED_LINE;
var annotations = annotationModel.getAnnotations(0, textModel.getCharCount());
var remo... | [
"function",
"(",
")",
"{",
"var",
"annotationModel",
"=",
"this",
".",
"getAnnotationModel",
"(",
")",
";",
"var",
"textModel",
"=",
"this",
".",
"getModel",
"(",
")",
";",
"if",
"(",
"textModel",
".",
"getBaseModel",
")",
"{",
"textModel",
"=",
"textMod... | Unhightlight the highlighted line | [
"Unhightlight",
"the",
"highlighted",
"line"
] | eb2583100c662b5cfc1b461a978b31d3b8555ce1 | https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.editor/web/orion/editor/editor.js#L961-L980 | |
14,318 | eclipse/orion.client | bundles/org.eclipse.orion.client.editor/web/orion/editor/editor.js | function(diffs) {
this.showAnnotations(diffs, [
AT.ANNOTATION_DIFF_ADDED,
AT.ANNOTATION_DIFF_MODIFIED,
AT.ANNOTATION_DIFF_DELETED
], null, function(annotation) {
if(annotation.type === "added")//$NON-NLS-0$
return AT.ANNOTATION_DIFF_ADDED;
else if (annotation.type === "modified")//$NON-NL... | javascript | function(diffs) {
this.showAnnotations(diffs, [
AT.ANNOTATION_DIFF_ADDED,
AT.ANNOTATION_DIFF_MODIFIED,
AT.ANNOTATION_DIFF_DELETED
], null, function(annotation) {
if(annotation.type === "added")//$NON-NLS-0$
return AT.ANNOTATION_DIFF_ADDED;
else if (annotation.type === "modified")//$NON-NL... | [
"function",
"(",
"diffs",
")",
"{",
"this",
".",
"showAnnotations",
"(",
"diffs",
",",
"[",
"AT",
".",
"ANNOTATION_DIFF_ADDED",
",",
"AT",
".",
"ANNOTATION_DIFF_MODIFIED",
",",
"AT",
".",
"ANNOTATION_DIFF_DELETED",
"]",
",",
"null",
",",
"function",
"(",
"an... | Display git diff annotation on the editor's annotation ruler and overview ruler.
@param diffs [] with types "added", "modified", "deleted"
Each property in diffs contains an array of objects { lineStart, lineEnd } that
provides the starting and ending line index for the specified property. | [
"Display",
"git",
"diff",
"annotation",
"on",
"the",
"editor",
"s",
"annotation",
"ruler",
"and",
"overview",
"ruler",
"."
] | eb2583100c662b5cfc1b461a978b31d3b8555ce1 | https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.editor/web/orion/editor/editor.js#L1478-L1490 | |
14,319 | eclipse/orion.client | bundles/org.eclipse.orion.client.editor/web/orion/editor/editor.js | function(start, end, line, offset, len) {
// We use typeof because we need to distinguish the number 0 from an undefined or null parameter
if (typeof(start) === "number") { //$NON-NLS-0$
if (typeof(end) !== "number") { //$NON-NLS-0$
end = start;
}
this.moveSelection(start, end);
return true;
... | javascript | function(start, end, line, offset, len) {
// We use typeof because we need to distinguish the number 0 from an undefined or null parameter
if (typeof(start) === "number") { //$NON-NLS-0$
if (typeof(end) !== "number") { //$NON-NLS-0$
end = start;
}
this.moveSelection(start, end);
return true;
... | [
"function",
"(",
"start",
",",
"end",
",",
"line",
",",
"offset",
",",
"len",
")",
"{",
"// We use typeof because we need to distinguish the number 0 from an undefined or null parameter",
"if",
"(",
"typeof",
"(",
"start",
")",
"===",
"\"number\"",
")",
"{",
"//$NON-N... | Reveals and selects a portion of text.
@param {Number} start
@param {Number} end
@param {Number} line
@param {Number} offset
@param {Number} length | [
"Reveals",
"and",
"selects",
"a",
"portion",
"of",
"text",
"."
] | eb2583100c662b5cfc1b461a978b31d3b8555ce1 | https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.editor/web/orion/editor/editor.js#L1500-L1521 | |
14,320 | eclipse/orion.client | bundles/org.eclipse.orion.client.editor/web/orion/editor/editor.js | function(line, column, end, callback) {
if (this._textView) {
var model = this.getModel();
line = Math.max(0, Math.min(line, model.getLineCount() - 1));
var lineStart = model.getLineStart(line);
var start = 0;
if (end === undefined) {
end = 0;
}
if (typeof column === "string") { //$N... | javascript | function(line, column, end, callback) {
if (this._textView) {
var model = this.getModel();
line = Math.max(0, Math.min(line, model.getLineCount() - 1));
var lineStart = model.getLineStart(line);
var start = 0;
if (end === undefined) {
end = 0;
}
if (typeof column === "string") { //$N... | [
"function",
"(",
"line",
",",
"column",
",",
"end",
",",
"callback",
")",
"{",
"if",
"(",
"this",
".",
"_textView",
")",
"{",
"var",
"model",
"=",
"this",
".",
"getModel",
"(",
")",
";",
"line",
"=",
"Math",
".",
"max",
"(",
"0",
",",
"Math",
"... | Reveals a line in the editor, and optionally selects a portion of the line.
@param {Number} line - document base line index
@param {Number|String} column
@param {Number} [end] | [
"Reveals",
"a",
"line",
"in",
"the",
"editor",
"and",
"optionally",
"selects",
"a",
"portion",
"of",
"the",
"line",
"."
] | eb2583100c662b5cfc1b461a978b31d3b8555ce1 | https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.editor/web/orion/editor/editor.js#L1564-L1587 | |
14,321 | eclipse/orion.client | bundles/org.eclipse.orion.client.ui/web/orion/globalCommands.js | generateUserInfo | function generateUserInfo(serviceRegistry, keyAssistFunction, prefsService) {
prefsService.get("/userMenu").then(function(prefs) {
if (Boolean(prefs) && prefs.disabled === true) {
var menu = lib.node("userMenu");
if (Boolean(menu)) {
menu.parentElement.removeChild(menu);
}
return;
}
var ... | javascript | function generateUserInfo(serviceRegistry, keyAssistFunction, prefsService) {
prefsService.get("/userMenu").then(function(prefs) {
if (Boolean(prefs) && prefs.disabled === true) {
var menu = lib.node("userMenu");
if (Boolean(menu)) {
menu.parentElement.removeChild(menu);
}
return;
}
var ... | [
"function",
"generateUserInfo",
"(",
"serviceRegistry",
",",
"keyAssistFunction",
",",
"prefsService",
")",
"{",
"prefsService",
".",
"get",
"(",
"\"/userMenu\"",
")",
".",
"then",
"(",
"function",
"(",
"prefs",
")",
"{",
"if",
"(",
"Boolean",
"(",
"prefs",
... | Adds the user-related commands to the toolbar
@name orion.globalCommands#generateUserInfo
@function | [
"Adds",
"the",
"user",
"-",
"related",
"commands",
"to",
"the",
"toolbar"
] | eb2583100c662b5cfc1b461a978b31d3b8555ce1 | https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.ui/web/orion/globalCommands.js#L135-L179 |
14,322 | eclipse/orion.client | bundles/org.eclipse.orion.client.ui/web/orion/globalCommands.js | setInvocation | function setInvocation(commandItem) {
var command = commandItem.command;
if (!command.visibleWhen || command.visibleWhen(item)) {
commandItem.invocation = new mCommands.CommandInvocation(item, item, null, command, commandRegistry);
return new Deferred().resolve(commandItem);
} else if (typeof alternate... | javascript | function setInvocation(commandItem) {
var command = commandItem.command;
if (!command.visibleWhen || command.visibleWhen(item)) {
commandItem.invocation = new mCommands.CommandInvocation(item, item, null, command, commandRegistry);
return new Deferred().resolve(commandItem);
} else if (typeof alternate... | [
"function",
"setInvocation",
"(",
"commandItem",
")",
"{",
"var",
"command",
"=",
"commandItem",
".",
"command",
";",
"if",
"(",
"!",
"command",
".",
"visibleWhen",
"||",
"command",
".",
"visibleWhen",
"(",
"item",
")",
")",
"{",
"commandItem",
".",
"invoc... | Creates a CommandInvocation for given commandItem.
@returns {orion.Promise} A promise resolving to: commandItem with its "invocation" field set, or undefined if we failed | [
"Creates",
"a",
"CommandInvocation",
"for",
"given",
"commandItem",
"."
] | eb2583100c662b5cfc1b461a978b31d3b8555ce1 | https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.ui/web/orion/globalCommands.js#L234-L254 |
14,323 | eclipse/orion.client | bundles/org.eclipse.orion.client.editor/web/orion/editor/vi.js | StatusLineMode | function StatusLineMode(viMode) {
var view = viMode.getView();
this.viMode = viMode;
mKeyMode.KeyMode.call(this, view);
this._createActions(view);
} | javascript | function StatusLineMode(viMode) {
var view = viMode.getView();
this.viMode = viMode;
mKeyMode.KeyMode.call(this, view);
this._createActions(view);
} | [
"function",
"StatusLineMode",
"(",
"viMode",
")",
"{",
"var",
"view",
"=",
"viMode",
".",
"getView",
"(",
")",
";",
"this",
".",
"viMode",
"=",
"viMode",
";",
"mKeyMode",
".",
"KeyMode",
".",
"call",
"(",
"this",
",",
"view",
")",
";",
"this",
".",
... | Status Line Mode | [
"Status",
"Line",
"Mode"
] | eb2583100c662b5cfc1b461a978b31d3b8555ce1 | https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.editor/web/orion/editor/vi.js#L482-L487 |
14,324 | eclipse/orion.client | bundles/org.eclipse.orion.client.ui/web/plugins/samples/largeFileSearch/i18n.js | addPart | function addPart(locale, master, needed, toLoad, prefix, suffix) {
if (master[locale]) {
needed.push(locale);
if (master[locale] === true || master[locale] === 1) {
toLoad.push(prefix + locale + '/' + suffix);
}
}
} | javascript | function addPart(locale, master, needed, toLoad, prefix, suffix) {
if (master[locale]) {
needed.push(locale);
if (master[locale] === true || master[locale] === 1) {
toLoad.push(prefix + locale + '/' + suffix);
}
}
} | [
"function",
"addPart",
"(",
"locale",
",",
"master",
",",
"needed",
",",
"toLoad",
",",
"prefix",
",",
"suffix",
")",
"{",
"if",
"(",
"master",
"[",
"locale",
"]",
")",
"{",
"needed",
".",
"push",
"(",
"locale",
")",
";",
"if",
"(",
"master",
"[",
... | Helper function to avoid repeating code. Lots of arguments in the desire to stay functional and support RequireJS contexts without having to know about the RequireJS contexts. | [
"Helper",
"function",
"to",
"avoid",
"repeating",
"code",
".",
"Lots",
"of",
"arguments",
"in",
"the",
"desire",
"to",
"stay",
"functional",
"and",
"support",
"RequireJS",
"contexts",
"without",
"having",
"to",
"know",
"about",
"the",
"RequireJS",
"contexts",
... | eb2583100c662b5cfc1b461a978b31d3b8555ce1 | https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.ui/web/plugins/samples/largeFileSearch/i18n.js#L51-L58 |
14,325 | eclipse/orion.client | bundles/org.eclipse.orion.client.ui/web/gcli/util/l10n.js | getPluralRule | function getPluralRule() {
if (!pluralRule) {
var lang = navigator.language || navigator.userLanguage;
// Convert lang to a rule index
pluralRules.some(function(rule) {
if (rule.locales.indexOf(lang) !== -1) {
pluralRule = rule;
return true;
}
return false;
});
/... | javascript | function getPluralRule() {
if (!pluralRule) {
var lang = navigator.language || navigator.userLanguage;
// Convert lang to a rule index
pluralRules.some(function(rule) {
if (rule.locales.indexOf(lang) !== -1) {
pluralRule = rule;
return true;
}
return false;
});
/... | [
"function",
"getPluralRule",
"(",
")",
"{",
"if",
"(",
"!",
"pluralRule",
")",
"{",
"var",
"lang",
"=",
"navigator",
".",
"language",
"||",
"navigator",
".",
"userLanguage",
";",
"// Convert lang to a rule index",
"pluralRules",
".",
"some",
"(",
"function",
"... | Find the correct plural rule for the current locale
@return a plural rule with a 'get()' function | [
"Find",
"the",
"correct",
"plural",
"rule",
"for",
"the",
"current",
"locale"
] | eb2583100c662b5cfc1b461a978b31d3b8555ce1 | https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.ui/web/gcli/util/l10n.js#L281-L301 |
14,326 | eclipse/orion.client | bundles/org.eclipse.orion.client.ui/web/orion/explorers/navigationUtils.js | removeNavGrid | function removeNavGrid(domNodeWrapperList, domNode) {
if(!domNodeWrapperList){
return;
}
for(var i = 0; i < domNodeWrapperList.length ; i++){
if(domNodeWrapperList[i].domNode === domNode){
domNodeWrapperList.splice(i, 1);
return;
}
}
} | javascript | function removeNavGrid(domNodeWrapperList, domNode) {
if(!domNodeWrapperList){
return;
}
for(var i = 0; i < domNodeWrapperList.length ; i++){
if(domNodeWrapperList[i].domNode === domNode){
domNodeWrapperList.splice(i, 1);
return;
}
}
} | [
"function",
"removeNavGrid",
"(",
"domNodeWrapperList",
",",
"domNode",
")",
"{",
"if",
"(",
"!",
"domNodeWrapperList",
")",
"{",
"return",
";",
"}",
"for",
"(",
"var",
"i",
"=",
"0",
";",
"i",
"<",
"domNodeWrapperList",
".",
"length",
";",
"i",
"++",
... | Remove a grid navigation item from a given array. A grid navigation item is presented by a wrapper object wrapping the domNode, widget and onClick properties.
@param {Array} domNodeWrapperList the array that holds the grid navigation item. Normally the .gridChildren property from a row model.
@param {DomNode} domNode ... | [
"Remove",
"a",
"grid",
"navigation",
"item",
"from",
"a",
"given",
"array",
".",
"A",
"grid",
"navigation",
"item",
"is",
"presented",
"by",
"a",
"wrapper",
"object",
"wrapping",
"the",
"domNode",
"widget",
"and",
"onClick",
"properties",
"."
] | eb2583100c662b5cfc1b461a978b31d3b8555ce1 | https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.ui/web/orion/explorers/navigationUtils.js#L65-L76 |
14,327 | eclipse/orion.client | bundles/org.eclipse.orion.client.core/web/orion/projectClient.js | ProjectClient | function ProjectClient(serviceRegistry, fileClient) {
this.serviceRegistry = serviceRegistry;
this.fileClient = fileClient;
this.allProjectHandlersReferences = serviceRegistry.getServiceReferences("orion.project.handler"); //$NON-NLS-0$
this.allProjectDeployReferences = serviceRegistry.getServiceReferences("ori... | javascript | function ProjectClient(serviceRegistry, fileClient) {
this.serviceRegistry = serviceRegistry;
this.fileClient = fileClient;
this.allProjectHandlersReferences = serviceRegistry.getServiceReferences("orion.project.handler"); //$NON-NLS-0$
this.allProjectDeployReferences = serviceRegistry.getServiceReferences("ori... | [
"function",
"ProjectClient",
"(",
"serviceRegistry",
",",
"fileClient",
")",
"{",
"this",
".",
"serviceRegistry",
"=",
"serviceRegistry",
";",
"this",
".",
"fileClient",
"=",
"fileClient",
";",
"this",
".",
"allProjectHandlersReferences",
"=",
"serviceRegistry",
"."... | Creates a new project client.
@class Project client provides client-side API to handle projects based on given file client.
@name orion.projectClient.ProjectClient | [
"Creates",
"a",
"new",
"project",
"client",
"."
] | eb2583100c662b5cfc1b461a978b31d3b8555ce1 | https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.core/web/orion/projectClient.js#L43-L50 |
14,328 | eclipse/orion.client | bundles/org.eclipse.orion.client.ui/web/orion/widgets/themes/ThemeImporter.js | xmlToJson | function xmlToJson(xml) {
// Create the return object
var obj = {};
if (xml.nodeType === 1) { // element
// do attributes
if (xml.attributes.length > 0) {
for (var j = 0; j < xml.attributes.length; j++) {
... | javascript | function xmlToJson(xml) {
// Create the return object
var obj = {};
if (xml.nodeType === 1) { // element
// do attributes
if (xml.attributes.length > 0) {
for (var j = 0; j < xml.attributes.length; j++) {
... | [
"function",
"xmlToJson",
"(",
"xml",
")",
"{",
"// Create the return object\r",
"var",
"obj",
"=",
"{",
"}",
";",
"if",
"(",
"xml",
".",
"nodeType",
"===",
"1",
")",
"{",
"// element\r",
"// do attributes\r",
"if",
"(",
"xml",
".",
"attributes",
".",
"leng... | Changes XML to JSON | [
"Changes",
"XML",
"to",
"JSON"
] | eb2583100c662b5cfc1b461a978b31d3b8555ce1 | https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.ui/web/orion/widgets/themes/ThemeImporter.js#L59-L95 |
14,329 | eclipse/orion.client | bundles/org.eclipse.orion.client.ui/web/orion/widgets/projects/RunBar.js | RunBar | function RunBar(options) {
this._project = null;
this._parentNode = options.parentNode;
this._serviceRegistry = options.serviceRegistry;
this._commandRegistry = options.commandRegistry;
this._fileClient = options.fileClient;
this._progressService = options.progressService;
this._preferencesService = optio... | javascript | function RunBar(options) {
this._project = null;
this._parentNode = options.parentNode;
this._serviceRegistry = options.serviceRegistry;
this._commandRegistry = options.commandRegistry;
this._fileClient = options.fileClient;
this._progressService = options.progressService;
this._preferencesService = optio... | [
"function",
"RunBar",
"(",
"options",
")",
"{",
"this",
".",
"_project",
"=",
"null",
";",
"this",
".",
"_parentNode",
"=",
"options",
".",
"parentNode",
";",
"this",
".",
"_serviceRegistry",
"=",
"options",
".",
"serviceRegistry",
";",
"this",
".",
"_comm... | Creates a new RunBar.
@class RunBar
@name orion.projects.RunBar
@param options
@param options.parentNode
@param options.serviceRegistry
@param options.commandRegistry
@param options.fileClient
@param options.progressService
@param options.preferencesService
@param options.statusService
@param options.actionScopeId
@par... | [
"Creates",
"a",
"new",
"RunBar",
"."
] | eb2583100c662b5cfc1b461a978b31d3b8555ce1 | https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.ui/web/orion/widgets/projects/RunBar.js#L46-L65 |
14,330 | eclipse/orion.client | bundles/org.eclipse.orion.client.ui/web/orion/widgets/projects/RunBar.js | function(launchConfiguration, checkStatus) {
var errorHandler = function (error) {
// stop the progress spinner in the launch config dropdown trigger
this.setStatus({
error: error || true //if no error was passed in we still want to ensure that the error state is recorded
});
}.bind(this);
... | javascript | function(launchConfiguration, checkStatus) {
var errorHandler = function (error) {
// stop the progress spinner in the launch config dropdown trigger
this.setStatus({
error: error || true //if no error was passed in we still want to ensure that the error state is recorded
});
}.bind(this);
... | [
"function",
"(",
"launchConfiguration",
",",
"checkStatus",
")",
"{",
"var",
"errorHandler",
"=",
"function",
"(",
"error",
")",
"{",
"// stop the progress spinner in the launch config dropdown trigger",
"this",
".",
"setStatus",
"(",
"{",
"error",
":",
"error",
"||",... | Selects the specified launch configuration
@param {Object} launchConfiguration The launch configuration to select
@param {Boolean} checkStatus Specifies whether or not the status of the launchConfiguration should be checked | [
"Selects",
"the",
"specified",
"launch",
"configuration"
] | eb2583100c662b5cfc1b461a978b31d3b8555ce1 | https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.ui/web/orion/widgets/projects/RunBar.js#L401-L436 | |
14,331 | eclipse/orion.client | bundles/org.eclipse.orion.client.ui/web/orion/widgets/projects/RunBar.js | function (project) {
if (project) {
this._projectClient.getProjectLaunchConfigurations(project).then(function(launchConfigurations){
if (project !== this._project) return;
this._setLaunchConfigurations(launchConfigurations);
}.bind(this));
} else {
this._setLaunchConfigurations(null);
}
... | javascript | function (project) {
if (project) {
this._projectClient.getProjectLaunchConfigurations(project).then(function(launchConfigurations){
if (project !== this._project) return;
this._setLaunchConfigurations(launchConfigurations);
}.bind(this));
} else {
this._setLaunchConfigurations(null);
}
... | [
"function",
"(",
"project",
")",
"{",
"if",
"(",
"project",
")",
"{",
"this",
".",
"_projectClient",
".",
"getProjectLaunchConfigurations",
"(",
"project",
")",
".",
"then",
"(",
"function",
"(",
"launchConfigurations",
")",
"{",
"if",
"(",
"project",
"!==",... | Get launch configurations from the specified project and load them into this run bar.
@param[in] {Object} project The project from which to load the launch configurations | [
"Get",
"launch",
"configurations",
"from",
"the",
"specified",
"project",
"and",
"load",
"them",
"into",
"this",
"run",
"bar",
"."
] | eb2583100c662b5cfc1b461a978b31d3b8555ce1 | https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.ui/web/orion/widgets/projects/RunBar.js#L656-L665 | |
14,332 | eclipse/orion.client | bundles/org.eclipse.orion.client.ui/web/orion/widgets/projects/RunBar.js | function(launchConfigurations) {
if (launchConfigurations) {
this._enableLaunchConfigurationsDropdown();
launchConfigurations.sort(function(launchConf1, launchConf2) {
return launchConf1.Name.localeCompare(launchConf2.Name);
});
} else {
this._disableLaunchConfigurationsDropdown();
}
... | javascript | function(launchConfigurations) {
if (launchConfigurations) {
this._enableLaunchConfigurationsDropdown();
launchConfigurations.sort(function(launchConf1, launchConf2) {
return launchConf1.Name.localeCompare(launchConf2.Name);
});
} else {
this._disableLaunchConfigurationsDropdown();
}
... | [
"function",
"(",
"launchConfigurations",
")",
"{",
"if",
"(",
"launchConfigurations",
")",
"{",
"this",
".",
"_enableLaunchConfigurationsDropdown",
"(",
")",
";",
"launchConfigurations",
".",
"sort",
"(",
"function",
"(",
"launchConf1",
",",
"launchConf2",
")",
"{... | Sets the list of launch configurations to be used by this run bar.
This method may be called more than once. Any previously cached
launch configurations will be replaced with the newly specified ones.
@param {Array} launchConfigurations An array of launch configurations | [
"Sets",
"the",
"list",
"of",
"launch",
"configurations",
"to",
"be",
"used",
"by",
"this",
"run",
"bar",
".",
"This",
"method",
"may",
"be",
"called",
"more",
"than",
"once",
".",
"Any",
"previously",
"cached",
"launch",
"configurations",
"will",
"be",
"re... | eb2583100c662b5cfc1b461a978b31d3b8555ce1 | https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.ui/web/orion/widgets/projects/RunBar.js#L674-L694 | |
14,333 | eclipse/orion.client | bundles/org.eclipse.orion.client.ui/web/orion/widgets/projects/RunBar.js | function(command, evnt) {
var buttonNode = evnt.target;
var id = buttonNode.id;
var isEnabled = this._isEnabled(buttonNode);
var disabled = isEnabled ? "" : ".disabled"; //$NON-NLS-1$ //$NON-NLS-0$
mMetrics.logEvent("ui", "invoke", METRICS_LABEL_PREFIX + "." + id +".clicked" + disabled, evnt.which); ... | javascript | function(command, evnt) {
var buttonNode = evnt.target;
var id = buttonNode.id;
var isEnabled = this._isEnabled(buttonNode);
var disabled = isEnabled ? "" : ".disabled"; //$NON-NLS-1$ //$NON-NLS-0$
mMetrics.logEvent("ui", "invoke", METRICS_LABEL_PREFIX + "." + id +".clicked" + disabled, evnt.which); ... | [
"function",
"(",
"command",
",",
"evnt",
")",
"{",
"var",
"buttonNode",
"=",
"evnt",
".",
"target",
";",
"var",
"id",
"=",
"buttonNode",
".",
"id",
";",
"var",
"isEnabled",
"=",
"this",
".",
"_isEnabled",
"(",
"buttonNode",
")",
";",
"var",
"disabled",... | Implements a generic button listener which executes the specified
command when it is invoked and collects metrics
@param[in] {String | Function} command A String containing the id of the command to run or a Function to call
@param[in] {Event} event The event which triggered the listener | [
"Implements",
"a",
"generic",
"button",
"listener",
"which",
"executes",
"the",
"specified",
"command",
"when",
"it",
"is",
"invoked",
"and",
"collects",
"metrics"
] | eb2583100c662b5cfc1b461a978b31d3b8555ce1 | https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.ui/web/orion/widgets/projects/RunBar.js#L734-L749 | |
14,334 | eclipse/orion.client | bundles/org.eclipse.orion.client.javascript/web/javascript/hover.js | _getNodeText | function _getNodeText(node) {
return node.sourceFile.text.substr(node.start, node.end - node.start);
} | javascript | function _getNodeText(node) {
return node.sourceFile.text.substr(node.start, node.end - node.start);
} | [
"function",
"_getNodeText",
"(",
"node",
")",
"{",
"return",
"node",
".",
"sourceFile",
".",
"text",
".",
"substr",
"(",
"node",
".",
"start",
",",
"node",
".",
"end",
"-",
"node",
".",
"start",
")",
";",
"}"
] | Get the plain text of a node.
@param {Node} node
@return {string} | [
"Get",
"the",
"plain",
"text",
"of",
"a",
"node",
"."
] | eb2583100c662b5cfc1b461a978b31d3b8555ce1 | https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.javascript/web/javascript/hover.js#L460-L462 |
14,335 | eclipse/orion.client | bundles/org.eclipse.orion.client.ui/web/orion/sites/siteMappingsTable.js | function(item, fieldName) {
if (fieldName === "FriendlyPath") { //$NON-NLS-0$
// Just update the "is valid" column
var rowNode = document.getElementById(this.myTree._treeModel.getId(item));
var oldCell = lib.$(".isValidCell", rowNode); //$NON-NLS-0$
var col_no = lib.$$array("td", rowNode).indexOf(old... | javascript | function(item, fieldName) {
if (fieldName === "FriendlyPath") { //$NON-NLS-0$
// Just update the "is valid" column
var rowNode = document.getElementById(this.myTree._treeModel.getId(item));
var oldCell = lib.$(".isValidCell", rowNode); //$NON-NLS-0$
var col_no = lib.$$array("td", rowNode).indexOf(old... | [
"function",
"(",
"item",
",",
"fieldName",
")",
"{",
"if",
"(",
"fieldName",
"===",
"\"FriendlyPath\"",
")",
"{",
"//$NON-NLS-0$",
"// Just update the \"is valid\" column",
"var",
"rowNode",
"=",
"document",
".",
"getElementById",
"(",
"this",
".",
"myTree",
".",
... | Render the row of a single item, without rendering its siblings. | [
"Render",
"the",
"row",
"of",
"a",
"single",
"item",
"without",
"rendering",
"its",
"siblings",
"."
] | eb2583100c662b5cfc1b461a978b31d3b8555ce1 | https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.ui/web/orion/sites/siteMappingsTable.js#L231-L241 | |
14,336 | eclipse/orion.client | bundles/org.eclipse.orion.client.ui/web/gcli/gcli/ui/inputter.js | Inputter | function Inputter(options, components) {
this.requisition = components.requisition;
this.focusManager = components.focusManager;
this.element = components.element;
this.element.classList.add('gcli-in-input');
this.element.spellcheck = false;
this.document = this.element.ownerDocument;
this.scratchpad =... | javascript | function Inputter(options, components) {
this.requisition = components.requisition;
this.focusManager = components.focusManager;
this.element = components.element;
this.element.classList.add('gcli-in-input');
this.element.spellcheck = false;
this.document = this.element.ownerDocument;
this.scratchpad =... | [
"function",
"Inputter",
"(",
"options",
",",
"components",
")",
"{",
"this",
".",
"requisition",
"=",
"components",
".",
"requisition",
";",
"this",
".",
"focusManager",
"=",
"components",
".",
"focusManager",
";",
"this",
".",
"element",
"=",
"components",
... | A wrapper to take care of the functions concerning an input element
@param options Object containing user customization properties, including:
- scratchpad (default=none)
- promptWidth (default=22px)
@param components Object that links to other UI components. GCLI provided:
- requisition
- focusManager
- element | [
"A",
"wrapper",
"to",
"take",
"care",
"of",
"the",
"functions",
"concerning",
"an",
"input",
"element"
] | eb2583100c662b5cfc1b461a978b31d3b8555ce1 | https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.ui/web/gcli/gcli/ui/inputter.js#L43-L101 |
14,337 | eclipse/orion.client | bundles/org.eclipse.orion.client.ui/web/orion/navoutliner.js | NavigationOutliner | function NavigationOutliner(options) {
var parent = lib.node(options.parent);
if (!parent) { throw "no parent"; } //$NON-NLS-0$
if (!options.serviceRegistry) {throw "no service registry"; } //$NON-NLS-0$
this._parent = parent;
this._registry = options.serviceRegistry;
this.commandService = options.commandSe... | javascript | function NavigationOutliner(options) {
var parent = lib.node(options.parent);
if (!parent) { throw "no parent"; } //$NON-NLS-0$
if (!options.serviceRegistry) {throw "no service registry"; } //$NON-NLS-0$
this._parent = parent;
this._registry = options.serviceRegistry;
this.commandService = options.commandSe... | [
"function",
"NavigationOutliner",
"(",
"options",
")",
"{",
"var",
"parent",
"=",
"lib",
".",
"node",
"(",
"options",
".",
"parent",
")",
";",
"if",
"(",
"!",
"parent",
")",
"{",
"throw",
"\"no parent\"",
";",
"}",
"//$NON-NLS-0$",
"if",
"(",
"!",
"opt... | Creates a new user interface element showing an outliner used for navigation
@name orion.navoutliner.NavigationOutliner
@class A user interface element showing a list of various navigation links.
@param {Object} options The service options
@param {Object} options.parent The parent of this outliner widget
@param {orion... | [
"Creates",
"a",
"new",
"user",
"interface",
"element",
"showing",
"an",
"outliner",
"used",
"for",
"navigation"
] | eb2583100c662b5cfc1b461a978b31d3b8555ce1 | https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.ui/web/orion/navoutliner.js#L78-L86 |
14,338 | eclipse/orion.client | bundles/org.eclipse.orion.client.git/web/orion/git/gitClient.js | function(gitStashLocation, indexMessage, workingDirectoryMessage, includeUntracked){
var service = this;
var payload = {};
if(indexMessage != null) /* note that undefined == null */
payload.IndexMessage = indexMessage;
if(workingDirectoryMessage != null) /* note that undefined == null */
pay... | javascript | function(gitStashLocation, indexMessage, workingDirectoryMessage, includeUntracked){
var service = this;
var payload = {};
if(indexMessage != null) /* note that undefined == null */
payload.IndexMessage = indexMessage;
if(workingDirectoryMessage != null) /* note that undefined == null */
pay... | [
"function",
"(",
"gitStashLocation",
",",
"indexMessage",
",",
"workingDirectoryMessage",
",",
"includeUntracked",
")",
"{",
"var",
"service",
"=",
"this",
";",
"var",
"payload",
"=",
"{",
"}",
";",
"if",
"(",
"indexMessage",
"!=",
"null",
")",
"/* note that u... | Performs git stash create
@param gitStashLocation
@param indexMessage [optional)
@param workingDirectoryMessage [optional]
@param includeUntracked [optional]
@returns {Deferred} | [
"Performs",
"git",
"stash",
"create"
] | eb2583100c662b5cfc1b461a978b31d3b8555ce1 | https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.git/web/orion/git/gitClient.js#L918-L946 | |
14,339 | eclipse/orion.client | bundles/org.eclipse.orion.client.ui/web/orion/explorers/explorer-table.js | FileModel | function FileModel(serviceRegistry, root, fileClient, idPrefix, excludeFiles, excludeFolders, filteredResources) {
this.registry = serviceRegistry;
this.root = root;
this.fileClient = fileClient;
this.idPrefix = idPrefix || "";
if (typeof this.idPrefix !== "string") {
this.idPrefix = this.idPrefix.id;
}
... | javascript | function FileModel(serviceRegistry, root, fileClient, idPrefix, excludeFiles, excludeFolders, filteredResources) {
this.registry = serviceRegistry;
this.root = root;
this.fileClient = fileClient;
this.idPrefix = idPrefix || "";
if (typeof this.idPrefix !== "string") {
this.idPrefix = this.idPrefix.id;
}
... | [
"function",
"FileModel",
"(",
"serviceRegistry",
",",
"root",
",",
"fileClient",
",",
"idPrefix",
",",
"excludeFiles",
",",
"excludeFolders",
",",
"filteredResources",
")",
"{",
"this",
".",
"registry",
"=",
"serviceRegistry",
";",
"this",
".",
"root",
"=",
"r... | Tree model used by the FileExplorer
@param {?} serviceRegistry The backing registry
@param {?} root The root item for the model
@param {FileClient} fileClient The backing FileClient instance
@param {string} idPrefix The prefix to use for the new model nodes
@param {boolean} excludeFiles The optional flag for if files ... | [
"Tree",
"model",
"used",
"by",
"the",
"FileExplorer"
] | eb2583100c662b5cfc1b461a978b31d3b8555ce1 | https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.ui/web/orion/explorers/explorer-table.js#L41-L60 |
14,340 | eclipse/orion.client | bundles/org.eclipse.orion.client.ui/web/orion/explorers/explorer-table.js | function(item, reroot) {
var deferred = new Deferred();
if (!item || !this.model || !this.myTree) {
return deferred.reject();
}
if (!this.myTree.showRoot && (item.Location === this.treeRoot.Location || item.Location === this.treeRoot.ContentLocation)) {
return deferred.resolve(this.treeRoot);
}
... | javascript | function(item, reroot) {
var deferred = new Deferred();
if (!item || !this.model || !this.myTree) {
return deferred.reject();
}
if (!this.myTree.showRoot && (item.Location === this.treeRoot.Location || item.Location === this.treeRoot.ContentLocation)) {
return deferred.resolve(this.treeRoot);
}
... | [
"function",
"(",
"item",
",",
"reroot",
")",
"{",
"var",
"deferred",
"=",
"new",
"Deferred",
"(",
")",
";",
"if",
"(",
"!",
"item",
"||",
"!",
"this",
".",
"model",
"||",
"!",
"this",
".",
"myTree",
")",
"{",
"return",
"deferred",
".",
"reject",
... | Shows the given item.
@param {Object} The item to be shown.
@param {Booelan} [reroot=true] whether the receiver should re-root the tree if the item is not displayable.
@returns {orion.Promise} | [
"Shows",
"the",
"given",
"item",
"."
] | eb2583100c662b5cfc1b461a978b31d3b8555ce1 | https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.ui/web/orion/explorers/explorer-table.js#L1307-L1344 | |
14,341 | eclipse/orion.client | bundles/org.eclipse.orion.client.ui/web/orion/explorers/explorer-table.js | function(item, reroot) {
return this.showItem(item, reroot).then(function(result) {
this.select(result);
}.bind(this));
} | javascript | function(item, reroot) {
return this.showItem(item, reroot).then(function(result) {
this.select(result);
}.bind(this));
} | [
"function",
"(",
"item",
",",
"reroot",
")",
"{",
"return",
"this",
".",
"showItem",
"(",
"item",
",",
"reroot",
")",
".",
"then",
"(",
"function",
"(",
"result",
")",
"{",
"this",
".",
"select",
"(",
"result",
")",
";",
"}",
".",
"bind",
"(",
"t... | Shows and selects the given item.
@param {Object} The item to be revealed.
@param {Booelan} [reroot=true] whether the receiver should re-root the tree if the item is not displayable.
@returns {orion.Promise} | [
"Shows",
"and",
"selects",
"the",
"given",
"item",
"."
] | eb2583100c662b5cfc1b461a978b31d3b8555ce1 | https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.ui/web/orion/explorers/explorer-table.js#L1384-L1388 | |
14,342 | eclipse/orion.client | bundles/org.eclipse.orion.client.ui/web/orion/explorers/explorer-table.js | function(path, force, postLoad) {
if (path && typeof path === "object") {
path = path.ChildrenLocation || path.ContentLocation;
}
path = mFileUtils.makeRelative(path);
var self = this;
if (force || path !== this.treeRoot.Path || path !== this._lastPath) {
this._lastPath = path;
return this.lo... | javascript | function(path, force, postLoad) {
if (path && typeof path === "object") {
path = path.ChildrenLocation || path.ContentLocation;
}
path = mFileUtils.makeRelative(path);
var self = this;
if (force || path !== this.treeRoot.Path || path !== this._lastPath) {
this._lastPath = path;
return this.lo... | [
"function",
"(",
"path",
",",
"force",
",",
"postLoad",
")",
"{",
"if",
"(",
"path",
"&&",
"typeof",
"path",
"===",
"\"object\"",
")",
"{",
"path",
"=",
"path",
".",
"ChildrenLocation",
"||",
"path",
".",
"ContentLocation",
";",
"}",
"path",
"=",
"mFil... | Load the resource at the given path.
@name orion.explorer.FileExplorer#loadResourceList
@function
@param {String|Object} path The path of the resource to load, or an object with a ChildrenLocation or ContentLocation field giving the path.
@param {Boolean} [force] If true, force reload even if the path is unchanged. Use... | [
"Load",
"the",
"resource",
"at",
"the",
"given",
"path",
"."
] | eb2583100c662b5cfc1b461a978b31d3b8555ce1 | https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.ui/web/orion/explorers/explorer-table.js#L1452-L1469 | |
14,343 | eclipse/orion.client | bundles/org.eclipse.orion.client.ui/web/orion/sites/siteCommands.js | createSiteServiceCommands | function createSiteServiceCommands(serviceRegistry, commandService, options) {
function getFileService(siteServiceRef) {
return mSiteClient.getFileClient(serviceRegistry, siteServiceRef.getProperty('filePattern')); //$NON-NLS-0$
}
options = options || {};
var createCommand = new mCommands.Command({
name :... | javascript | function createSiteServiceCommands(serviceRegistry, commandService, options) {
function getFileService(siteServiceRef) {
return mSiteClient.getFileClient(serviceRegistry, siteServiceRef.getProperty('filePattern')); //$NON-NLS-0$
}
options = options || {};
var createCommand = new mCommands.Command({
name :... | [
"function",
"createSiteServiceCommands",
"(",
"serviceRegistry",
",",
"commandService",
",",
"options",
")",
"{",
"function",
"getFileService",
"(",
"siteServiceRef",
")",
"{",
"return",
"mSiteClient",
".",
"getFileClient",
"(",
"serviceRegistry",
",",
"siteServiceRef",... | Creates & adds commands that act on an site service.
@param {orion.serviceregistry.ServiceRegistry} serviceRegistry
@param {Function} options.createCallback
@param {Function} options.errorCallback
@name orion.sites.siteCommands#createSiteServiceCommands | [
"Creates",
"&",
"adds",
"commands",
"that",
"act",
"on",
"an",
"site",
"service",
"."
] | eb2583100c662b5cfc1b461a978b31d3b8555ce1 | https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.ui/web/orion/sites/siteCommands.js#L25-L53 |
14,344 | eclipse/orion.client | bundles/org.eclipse.orion.client.ui/web/gcli/gcli/types/command.js | ParamType | function ParamType(typeSpec) {
this.requisition = typeSpec.requisition;
this.isIncompleteName = typeSpec.isIncompleteName;
this.stringifyProperty = 'name';
this.neverForceAsync = true;
} | javascript | function ParamType(typeSpec) {
this.requisition = typeSpec.requisition;
this.isIncompleteName = typeSpec.isIncompleteName;
this.stringifyProperty = 'name';
this.neverForceAsync = true;
} | [
"function",
"ParamType",
"(",
"typeSpec",
")",
"{",
"this",
".",
"requisition",
"=",
"typeSpec",
".",
"requisition",
";",
"this",
".",
"isIncompleteName",
"=",
"typeSpec",
".",
"isIncompleteName",
";",
"this",
".",
"stringifyProperty",
"=",
"'name'",
";",
"thi... | Select from the available commands.
This is very similar to a SelectionType, however the level of hackery in
SelectionType to make it handle Commands correctly was to high, so we
simplified.
If you are making changes to this code, you should check there too. | [
"Select",
"from",
"the",
"available",
"commands",
".",
"This",
"is",
"very",
"similar",
"to",
"a",
"SelectionType",
"however",
"the",
"level",
"of",
"hackery",
"in",
"SelectionType",
"to",
"make",
"it",
"handle",
"Commands",
"correctly",
"was",
"to",
"high",
... | eb2583100c662b5cfc1b461a978b31d3b8555ce1 | https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.ui/web/gcli/gcli/types/command.js#L57-L62 |
14,345 | eclipse/orion.client | bundles/org.eclipse.orion.client.ui/web/orion/status.js | StatusReportingService | function StatusReportingService(serviceRegistry, operationsClient, domId, progressDomId, notificationContainerDomId) {
this._serviceRegistry = serviceRegistry;
this._serviceRegistration = serviceRegistry.registerService("orion.page.message", this); //$NON-NLS-0$
this._operationsClient = operationsClient;
th... | javascript | function StatusReportingService(serviceRegistry, operationsClient, domId, progressDomId, notificationContainerDomId) {
this._serviceRegistry = serviceRegistry;
this._serviceRegistration = serviceRegistry.registerService("orion.page.message", this); //$NON-NLS-0$
this._operationsClient = operationsClient;
th... | [
"function",
"StatusReportingService",
"(",
"serviceRegistry",
",",
"operationsClient",
",",
"domId",
",",
"progressDomId",
",",
"notificationContainerDomId",
")",
"{",
"this",
".",
"_serviceRegistry",
"=",
"serviceRegistry",
";",
"this",
".",
"_serviceRegistration",
"="... | Service for reporting status
@class Service for reporting status
@name orion.status.StatusReportingService
@param {orion.serviceregistry.ServiceRegistry} serviceRegistry
@param {orion.operationclient.OperationsClient} operationsClient
@param {String} domId ID of the DOM node under which status will be displayed.
@param... | [
"Service",
"for",
"reporting",
"status"
] | eb2583100c662b5cfc1b461a978b31d3b8555ce1 | https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.ui/web/orion/status.js#L43-L55 |
14,346 | eclipse/orion.client | bundles/org.eclipse.orion.client.ui/web/orion/status.js | function(msg, timeout, isAccessible) {
this._init();
this.statusMessage = msg;
var node = lib.node(this.domId);
if(typeof isAccessible === "boolean") {
// this is kind of a hack; when there is good screen reader support for aria-busy,
// this should be done by toggling that instead
var re... | javascript | function(msg, timeout, isAccessible) {
this._init();
this.statusMessage = msg;
var node = lib.node(this.domId);
if(typeof isAccessible === "boolean") {
// this is kind of a hack; when there is good screen reader support for aria-busy,
// this should be done by toggling that instead
var re... | [
"function",
"(",
"msg",
",",
"timeout",
",",
"isAccessible",
")",
"{",
"this",
".",
"_init",
"(",
")",
";",
"this",
".",
"statusMessage",
"=",
"msg",
";",
"var",
"node",
"=",
"lib",
".",
"node",
"(",
"this",
".",
"domId",
")",
";",
"if",
"(",
"ty... | Displays a status message to the user.
@param {String} msg Message to display.
@param {Number} [timeout] Time to display the message before hiding it.
@param {Boolean} [isAccessible] If <code>true</code>, a screen reader will read this message.
Otherwise defaults to the domNode default. | [
"Displays",
"a",
"status",
"message",
"to",
"the",
"user",
"."
] | eb2583100c662b5cfc1b461a978b31d3b8555ce1 | https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.ui/web/orion/status.js#L120-L149 | |
14,347 | eclipse/orion.client | bundles/org.eclipse.orion.client.ui/web/orion/status.js | function(st) {
this._clickToDisMiss = true;
this.statusMessage = st;
this._init();
//could be: responseText from xhrGet, deferred error object, or plain string
var _status = st.responseText || st.message || st;
//accept either a string or a JSON representation of an IStatus
if (typeof _statu... | javascript | function(st) {
this._clickToDisMiss = true;
this.statusMessage = st;
this._init();
//could be: responseText from xhrGet, deferred error object, or plain string
var _status = st.responseText || st.message || st;
//accept either a string or a JSON representation of an IStatus
if (typeof _statu... | [
"function",
"(",
"st",
")",
"{",
"this",
".",
"_clickToDisMiss",
"=",
"true",
";",
"this",
".",
"statusMessage",
"=",
"st",
";",
"this",
".",
"_init",
"(",
")",
";",
"//could be: responseText from xhrGet, deferred error object, or plain string\r",
"var",
"_status",
... | Displays an error message to the user.
@param {String|orionError} st The error to display. Can be a simple String,
or an error object from a XHR error callback, or the body of an error response
from the Orion server. | [
"Displays",
"an",
"error",
"message",
"to",
"the",
"user",
"."
] | eb2583100c662b5cfc1b461a978b31d3b8555ce1 | https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.ui/web/orion/status.js#L158-L195 | |
14,348 | eclipse/orion.client | bundles/org.eclipse.orion.client.ui/web/orion/status.js | function(message) {
this._clickToDisMiss = false;
this._init();
this.progressMessage = message;
var pageLoader = getPageLoader();
if (pageLoader) {
var step = pageLoader.getStep();
if(step) {
if (typeof message === "object") {
step.message = message.message;
step.de... | javascript | function(message) {
this._clickToDisMiss = false;
this._init();
this.progressMessage = message;
var pageLoader = getPageLoader();
if (pageLoader) {
var step = pageLoader.getStep();
if(step) {
if (typeof message === "object") {
step.message = message.message;
step.de... | [
"function",
"(",
"message",
")",
"{",
"this",
".",
"_clickToDisMiss",
"=",
"false",
";",
"this",
".",
"_init",
"(",
")",
";",
"this",
".",
"progressMessage",
"=",
"message",
";",
"var",
"pageLoader",
"=",
"getPageLoader",
"(",
")",
";",
"if",
"(",
"pag... | Set a message that will be shown in the progress reporting area on the page.
@param {String} message The progress message to display. | [
"Set",
"a",
"message",
"that",
"will",
"be",
"shown",
"in",
"the",
"progress",
"reporting",
"area",
"on",
"the",
"page",
"."
] | eb2583100c662b5cfc1b461a978b31d3b8555ce1 | https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.ui/web/orion/status.js#L201-L238 | |
14,349 | eclipse/orion.client | bundles/org.eclipse.orion.client.ui/web/orion/status.js | function(deferred, message) {
var that = this;
if(message){
that.setProgressMessage(message);
var finish = function(){
if(message === that.progressMessage){
that.setProgressMessage("");
}
};
deferred.then(finish, finish);
}
return deferred;
} | javascript | function(deferred, message) {
var that = this;
if(message){
that.setProgressMessage(message);
var finish = function(){
if(message === that.progressMessage){
that.setProgressMessage("");
}
};
deferred.then(finish, finish);
}
return deferred;
} | [
"function",
"(",
"deferred",
",",
"message",
")",
"{",
"var",
"that",
"=",
"this",
";",
"if",
"(",
"message",
")",
"{",
"that",
".",
"setProgressMessage",
"(",
"message",
")",
";",
"var",
"finish",
"=",
"function",
"(",
")",
"{",
"if",
"(",
"message"... | Shows a progress message in the progress area until the given deferred is resolved. | [
"Shows",
"a",
"progress",
"message",
"in",
"the",
"progress",
"area",
"until",
"the",
"given",
"deferred",
"is",
"resolved",
"."
] | eb2583100c662b5cfc1b461a978b31d3b8555ce1 | https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.ui/web/orion/status.js#L402-L414 | |
14,350 | eclipse/orion.client | bundles/org.eclipse.orion.client.ui/web/gcli/gcli/types/spell.js | damerauLevenshteinDistance | function damerauLevenshteinDistance(wordi, wordj) {
var wordiLen = wordi.length;
var wordjLen = wordj.length;
// We only need to store three rows of our dynamic programming matrix.
// (Without swap, it would have been two.)
var row0 = new Array(wordiLen+1);
var row1 = new Array(wordiLen+1);
var row2 = ne... | javascript | function damerauLevenshteinDistance(wordi, wordj) {
var wordiLen = wordi.length;
var wordjLen = wordj.length;
// We only need to store three rows of our dynamic programming matrix.
// (Without swap, it would have been two.)
var row0 = new Array(wordiLen+1);
var row1 = new Array(wordiLen+1);
var row2 = ne... | [
"function",
"damerauLevenshteinDistance",
"(",
"wordi",
",",
"wordj",
")",
"{",
"var",
"wordiLen",
"=",
"wordi",
".",
"length",
";",
"var",
"wordjLen",
"=",
"wordj",
".",
"length",
";",
"// We only need to store three rows of our dynamic programming matrix.",
"// (Witho... | Compute Damerau-Levenshtein Distance
@see http://en.wikipedia.org/wiki/Damerau%E2%80%93Levenshtein_distance | [
"Compute",
"Damerau",
"-",
"Levenshtein",
"Distance"
] | eb2583100c662b5cfc1b461a978b31d3b8555ce1 | https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.ui/web/gcli/gcli/types/spell.js#L35-L84 |
14,351 | eclipse/orion.client | modules/orionode/lib/metastore/mongodb/store.js | findUser | function findUser(id, user, callback) {
if (typeof user.save === 'function') {
callback(null, user);
} else {
orionAccount.findByUsername(id, callback);
}
} | javascript | function findUser(id, user, callback) {
if (typeof user.save === 'function') {
callback(null, user);
} else {
orionAccount.findByUsername(id, callback);
}
} | [
"function",
"findUser",
"(",
"id",
",",
"user",
",",
"callback",
")",
"{",
"if",
"(",
"typeof",
"user",
".",
"save",
"===",
"'function'",
")",
"{",
"callback",
"(",
"null",
",",
"user",
")",
";",
"}",
"else",
"{",
"orionAccount",
".",
"findByUsername",... | If `user` has already been fetched from DB, use it, otherwise obtain from findByUsername | [
"If",
"user",
"has",
"already",
"been",
"fetched",
"from",
"DB",
"use",
"it",
"otherwise",
"obtain",
"from",
"findByUsername"
] | eb2583100c662b5cfc1b461a978b31d3b8555ce1 | https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/modules/orionode/lib/metastore/mongodb/store.js#L118-L124 |
14,352 | eclipse/orion.client | modules/orionode/lib/metastore/mongodb/store.js | function(oauth, callback) {
orionAccount.find({oauth: new RegExp("^" + oauth + "$", "m")}, function(err, user) {
if (err) {
return callback(err);
}
if (user && user.length) {
return callback(null, user[0]);
}
return callback(null, null);
});
} | javascript | function(oauth, callback) {
orionAccount.find({oauth: new RegExp("^" + oauth + "$", "m")}, function(err, user) {
if (err) {
return callback(err);
}
if (user && user.length) {
return callback(null, user[0]);
}
return callback(null, null);
});
} | [
"function",
"(",
"oauth",
",",
"callback",
")",
"{",
"orionAccount",
".",
"find",
"(",
"{",
"oauth",
":",
"new",
"RegExp",
"(",
"\"^\"",
"+",
"oauth",
"+",
"\"$\"",
",",
"\"m\"",
")",
"}",
",",
"function",
"(",
"err",
",",
"user",
")",
"{",
"if",
... | returns the user with the given oauth token | [
"returns",
"the",
"user",
"with",
"the",
"given",
"oauth",
"token"
] | eb2583100c662b5cfc1b461a978b31d3b8555ce1 | https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/modules/orionode/lib/metastore/mongodb/store.js#L266-L276 | |
14,353 | eclipse/orion.client | modules/orionode/lib/metastore/mongodb/store.js | deleteUser | function deleteUser(id, callback) {
orionAccount.findByUsername(id, function(err, user) {
if(err) {
callback(err);
}
const userPath = path.join(this.options.workspaceDir, id.substring(0,2));
fs.access(userPath, (err) => {
if(err) {
callback(err);
}
//TODO should a delete failure preve... | javascript | function deleteUser(id, callback) {
orionAccount.findByUsername(id, function(err, user) {
if(err) {
callback(err);
}
const userPath = path.join(this.options.workspaceDir, id.substring(0,2));
fs.access(userPath, (err) => {
if(err) {
callback(err);
}
//TODO should a delete failure preve... | [
"function",
"deleteUser",
"(",
"id",
",",
"callback",
")",
"{",
"orionAccount",
".",
"findByUsername",
"(",
"id",
",",
"function",
"(",
"err",
",",
"user",
")",
"{",
"if",
"(",
"err",
")",
"{",
"callback",
"(",
"err",
")",
";",
"}",
"const",
"userPat... | Delete the user from the store with the given user ID
@param {string} id The user identifier to delete
@param {fn(Error: err)} callback The callback to call when complete | [
"Delete",
"the",
"user",
"from",
"the",
"store",
"with",
"the",
"given",
"user",
"ID"
] | eb2583100c662b5cfc1b461a978b31d3b8555ce1 | https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/modules/orionode/lib/metastore/mongodb/store.js#L325-L344 |
14,354 | eclipse/orion.client | bundles/org.eclipse.orion.client.javascript/web/eslint/lib/rules/quotes.js | isDirective | function isDirective(node) {
return node.type === "ExpressionStatement" &&
node.expression.type === "Literal" &&
typeof node.expression.value === "string";
} | javascript | function isDirective(node) {
return node.type === "ExpressionStatement" &&
node.expression.type === "Literal" &&
typeof node.expression.value === "string";
} | [
"function",
"isDirective",
"(",
"node",
")",
"{",
"return",
"node",
".",
"type",
"===",
"\"ExpressionStatement\"",
"&&",
"node",
".",
"expression",
".",
"type",
"===",
"\"Literal\"",
"&&",
"typeof",
"node",
".",
"expression",
".",
"value",
"===",
"\"string\"",... | Checks whether or not a given node is a directive.
The directive is a `ExpressionStatement` which has only a string literal.
@param {ASTNode} node - A node to check.
@returns {boolean} Whether or not the node is a directive.
@private | [
"Checks",
"whether",
"or",
"not",
"a",
"given",
"node",
"is",
"a",
"directive",
".",
"The",
"directive",
"is",
"a",
"ExpressionStatement",
"which",
"has",
"only",
"a",
"string",
"literal",
"."
] | eb2583100c662b5cfc1b461a978b31d3b8555ce1 | https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.javascript/web/eslint/lib/rules/quotes.js#L82-L86 |
14,355 | eclipse/orion.client | bundles/org.eclipse.orion.client.ui/web/orion/tasks.js | TaskList | function TaskList(options) {
var parent = lib.node(options.parent);
if (!parent) { throw messages['no parent']; }
if (!options.serviceRegistry) {throw messages["no service registry"]; }
this._parent = parent;
this._registry = options.serviceRegistry;
this._description = options.description;
this._tasks =... | javascript | function TaskList(options) {
var parent = lib.node(options.parent);
if (!parent) { throw messages['no parent']; }
if (!options.serviceRegistry) {throw messages["no service registry"]; }
this._parent = parent;
this._registry = options.serviceRegistry;
this._description = options.description;
this._tasks =... | [
"function",
"TaskList",
"(",
"options",
")",
"{",
"var",
"parent",
"=",
"lib",
".",
"node",
"(",
"options",
".",
"parent",
")",
";",
"if",
"(",
"!",
"parent",
")",
"{",
"throw",
"messages",
"[",
"'no parent'",
"]",
";",
"}",
"if",
"(",
"!",
"option... | Creates a new user interface element showing a list of tasks
@name orion.tasks.TaskList
@class A user interface element showing a list of various user tasks.
@param {Object} options The service options
@param {Object} options.parent The parent of this task list
@prarm {String} options.id The id of the section
@param {... | [
"Creates",
"a",
"new",
"user",
"interface",
"element",
"showing",
"a",
"list",
"of",
"tasks"
] | eb2583100c662b5cfc1b461a978b31d3b8555ce1 | https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.ui/web/orion/tasks.js#L34-L52 |
14,356 | eclipse/orion.client | bundles/org.eclipse.orion.client.ui/web/edit/setup.js | function() {
/** All events from last tick */
var pendingEvents = this._annotationChangedContext.events;
var pendingLocations = this._annotationChangedContext.locations;
var pendingModels = this._annotationChangedContext.textModels;
/** All unique events from last tick */
var handlingEvents = [];
var hand... | javascript | function() {
/** All events from last tick */
var pendingEvents = this._annotationChangedContext.events;
var pendingLocations = this._annotationChangedContext.locations;
var pendingModels = this._annotationChangedContext.textModels;
/** All unique events from last tick */
var handlingEvents = [];
var hand... | [
"function",
"(",
")",
"{",
"/** All events from last tick */",
"var",
"pendingEvents",
"=",
"this",
".",
"_annotationChangedContext",
".",
"events",
";",
"var",
"pendingLocations",
"=",
"this",
".",
"_annotationChangedContext",
".",
"locations",
";",
"var",
"pendingMo... | Handle all annotation changed events in the last tick.
This avoids duplicate events from a single text model. | [
"Handle",
"all",
"annotation",
"changed",
"events",
"in",
"the",
"last",
"tick",
".",
"This",
"avoids",
"duplicate",
"events",
"from",
"a",
"single",
"text",
"model",
"."
] | eb2583100c662b5cfc1b461a978b31d3b8555ce1 | https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.ui/web/edit/setup.js#L1523-L1582 | |
14,357 | eclipse/orion.client | bundles/org.eclipse.orion.client.ui/web/edit/setup.js | function(serviceRegistry, setup) {
this._setup = setup;
this._projectClient = serviceRegistry.getService("orion.project.client");
serviceRegistry.registerService("orion.edit.hover", this, {
name: 'Hover Evaluation',
contentType: ["application/javascript", "text/x-c++src", "text/x-python"] // TODO: get by sub-ser... | javascript | function(serviceRegistry, setup) {
this._setup = setup;
this._projectClient = serviceRegistry.getService("orion.project.client");
serviceRegistry.registerService("orion.edit.hover", this, {
name: 'Hover Evaluation',
contentType: ["application/javascript", "text/x-c++src", "text/x-python"] // TODO: get by sub-ser... | [
"function",
"(",
"serviceRegistry",
",",
"setup",
")",
"{",
"this",
".",
"_setup",
"=",
"setup",
";",
"this",
".",
"_projectClient",
"=",
"serviceRegistry",
".",
"getService",
"(",
"\"orion.project.client\"",
")",
";",
"serviceRegistry",
".",
"registerService",
... | Provides hover evaluation by project
@name orion.projects.HoverEvaluationService
@param {orion.serviceregistry.ServiceRegistry} serviceRegistry
@param {EditorSetup} setup - need this to get the current project | [
"Provides",
"hover",
"evaluation",
"by",
"project"
] | eb2583100c662b5cfc1b461a978b31d3b8555ce1 | https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.ui/web/edit/setup.js#L2353-L2360 | |
14,358 | eclipse/orion.client | bundles/org.eclipse.orion.client.ui/web/edit/setup.js | function(editorContext, ctxt) {
var promise = new Deferred();
var launchConf = this._setup.runBar.getSelectedLaunchConfiguration();
if (launchConf) {
this._projectClient.getProjectDeployService(launchConf.ServiceId, launchConf.Type).then(function(service){
if (service && service.computeHoverInfo) {
se... | javascript | function(editorContext, ctxt) {
var promise = new Deferred();
var launchConf = this._setup.runBar.getSelectedLaunchConfiguration();
if (launchConf) {
this._projectClient.getProjectDeployService(launchConf.ServiceId, launchConf.Type).then(function(service){
if (service && service.computeHoverInfo) {
se... | [
"function",
"(",
"editorContext",
",",
"ctxt",
")",
"{",
"var",
"promise",
"=",
"new",
"Deferred",
"(",
")",
";",
"var",
"launchConf",
"=",
"this",
".",
"_setup",
".",
"runBar",
".",
"getSelectedLaunchConfiguration",
"(",
")",
";",
"if",
"(",
"launchConf",... | Evaluate the hover
@param {Object} editorContext
@param {Object} ctxt
@return {Promise.<string>} | [
"Evaluate",
"the",
"hover"
] | eb2583100c662b5cfc1b461a978b31d3b8555ce1 | https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.ui/web/edit/setup.js#L2369-L2389 | |
14,359 | eclipse/orion.client | bundles/org.eclipse.orion.client.ui/web/gcli/gcli/ui/fields/basic.js | StringField | function StringField(type, options) {
Field.call(this, type, options);
this.arg = new Argument();
this.element = util.createElement(this.document, 'input');
this.element.type = 'text';
this.element.classList.add('gcli-field');
this.onInputChange = this.onInputChange.bind(this);
this.element.addEventList... | javascript | function StringField(type, options) {
Field.call(this, type, options);
this.arg = new Argument();
this.element = util.createElement(this.document, 'input');
this.element.type = 'text';
this.element.classList.add('gcli-field');
this.onInputChange = this.onInputChange.bind(this);
this.element.addEventList... | [
"function",
"StringField",
"(",
"type",
",",
"options",
")",
"{",
"Field",
".",
"call",
"(",
"this",
",",
"type",
",",
"options",
")",
";",
"this",
".",
"arg",
"=",
"new",
"Argument",
"(",
")",
";",
"this",
".",
"element",
"=",
"util",
".",
"create... | A field that allows editing of strings | [
"A",
"field",
"that",
"allows",
"editing",
"of",
"strings"
] | eb2583100c662b5cfc1b461a978b31d3b8555ce1 | https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.ui/web/gcli/gcli/ui/fields/basic.js#L63-L75 |
14,360 | eclipse/orion.client | bundles/org.eclipse.orion.client.ui/web/gcli/gcli/ui/fields/basic.js | BooleanField | function BooleanField(type, options) {
Field.call(this, type, options);
this.name = options.name;
this.named = options.named;
this.element = util.createElement(this.document, 'input');
this.element.type = 'checkbox';
this.element.id = 'gcliForm' + this.name;
this.onInputChange = this.onInputChange.bind... | javascript | function BooleanField(type, options) {
Field.call(this, type, options);
this.name = options.name;
this.named = options.named;
this.element = util.createElement(this.document, 'input');
this.element.type = 'checkbox';
this.element.id = 'gcliForm' + this.name;
this.onInputChange = this.onInputChange.bind... | [
"function",
"BooleanField",
"(",
"type",
",",
"options",
")",
"{",
"Field",
".",
"call",
"(",
"this",
",",
"type",
",",
"options",
")",
";",
"this",
".",
"name",
"=",
"options",
".",
"name",
";",
"this",
".",
"named",
"=",
"options",
".",
"named",
... | A field that uses a checkbox to toggle a boolean field | [
"A",
"field",
"that",
"uses",
"a",
"checkbox",
"to",
"toggle",
"a",
"boolean",
"field"
] | eb2583100c662b5cfc1b461a978b31d3b8555ce1 | https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.ui/web/gcli/gcli/ui/fields/basic.js#L158-L172 |
14,361 | eclipse/orion.client | bundles/org.eclipse.orion.client.ui/web/gcli/gcli/ui/fields/basic.js | DelegateField | function DelegateField(type, options) {
Field.call(this, type, options);
this.options = options;
this.requisition.onAssignmentChange.add(this.update, this);
this.element = util.createElement(this.document, 'div');
this.update();
this.onFieldChange = util.createEvent('DelegateField.onFieldChange');
} | javascript | function DelegateField(type, options) {
Field.call(this, type, options);
this.options = options;
this.requisition.onAssignmentChange.add(this.update, this);
this.element = util.createElement(this.document, 'div');
this.update();
this.onFieldChange = util.createEvent('DelegateField.onFieldChange');
} | [
"function",
"DelegateField",
"(",
"type",
",",
"options",
")",
"{",
"Field",
".",
"call",
"(",
"this",
",",
"type",
",",
"options",
")",
";",
"this",
".",
"options",
"=",
"options",
";",
"this",
".",
"requisition",
".",
"onAssignmentChange",
".",
"add",
... | A field that works with delegate types by delaying resolution until that
last possible time | [
"A",
"field",
"that",
"works",
"with",
"delegate",
"types",
"by",
"delaying",
"resolution",
"until",
"that",
"last",
"possible",
"time"
] | eb2583100c662b5cfc1b461a978b31d3b8555ce1 | https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.ui/web/gcli/gcli/ui/fields/basic.js#L211-L220 |
14,362 | eclipse/orion.client | bundles/org.eclipse.orion.client.ui/web/orion/editorCommands.js | function() {
this._createSettingsCommand();
this._createGotoLineCommnand();
this._createFindCommnand();
this._createBlameCommand();
this._createDiffCommand();
this._createShowTooltipCommand();
this._createUndoStackCommands();
this._createClipboardCommands();
this._createDelimiterCommands();
... | javascript | function() {
this._createSettingsCommand();
this._createGotoLineCommnand();
this._createFindCommnand();
this._createBlameCommand();
this._createDiffCommand();
this._createShowTooltipCommand();
this._createUndoStackCommands();
this._createClipboardCommands();
this._createDelimiterCommands();
... | [
"function",
"(",
")",
"{",
"this",
".",
"_createSettingsCommand",
"(",
")",
";",
"this",
".",
"_createGotoLineCommnand",
"(",
")",
";",
"this",
".",
"_createFindCommnand",
"(",
")",
";",
"this",
".",
"_createBlameCommand",
"(",
")",
";",
"this",
".",
"_cre... | Creates the common text editing commands. Also generates commands for any installed plug-ins that
contribute editor actions. | [
"Creates",
"the",
"common",
"text",
"editing",
"commands",
".",
"Also",
"generates",
"commands",
"for",
"any",
"installed",
"plug",
"-",
"ins",
"that",
"contribute",
"editor",
"actions",
"."
] | eb2583100c662b5cfc1b461a978b31d3b8555ce1 | https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.ui/web/orion/editorCommands.js#L175-L195 | |
14,363 | eclipse/orion.client | bundles/org.eclipse.orion.client.javascript/web/javascript/astManager.js | ASTManager | function ASTManager(serviceRegistry, jsProject) {
this.cache = new LRU(10);
this.orionAcorn = new OrionAcorn();
this.jsProject = jsProject;
registry = serviceRegistry;
} | javascript | function ASTManager(serviceRegistry, jsProject) {
this.cache = new LRU(10);
this.orionAcorn = new OrionAcorn();
this.jsProject = jsProject;
registry = serviceRegistry;
} | [
"function",
"ASTManager",
"(",
"serviceRegistry",
",",
"jsProject",
")",
"{",
"this",
".",
"cache",
"=",
"new",
"LRU",
"(",
"10",
")",
";",
"this",
".",
"orionAcorn",
"=",
"new",
"OrionAcorn",
"(",
")",
";",
"this",
".",
"jsProject",
"=",
"jsProject",
... | Provides a shared AST.
@name javascript.ASTManager
@class Provides a shared AST.
@param {?} serviceRegistry The platform service registry
@param {?} servjsProject The backing project context | [
"Provides",
"a",
"shared",
"AST",
"."
] | eb2583100c662b5cfc1b461a978b31d3b8555ce1 | https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.javascript/web/javascript/astManager.js#L30-L35 |
14,364 | eclipse/orion.client | bundles/org.eclipse.orion.client.ui/web/orion/commandRegistry.js | CommandRegistry | function CommandRegistry(options) {
this._commandList = {};
this._contributionsByScopeId = {};
this._activeBindings = {};
this._urlBindings = {};
this._pendingBindings = {}; // bindings for as-yet-unknown commands
this._parameterCollector = null;
this._init(options || {});
} | javascript | function CommandRegistry(options) {
this._commandList = {};
this._contributionsByScopeId = {};
this._activeBindings = {};
this._urlBindings = {};
this._pendingBindings = {}; // bindings for as-yet-unknown commands
this._parameterCollector = null;
this._init(options || {});
} | [
"function",
"CommandRegistry",
"(",
"options",
")",
"{",
"this",
".",
"_commandList",
"=",
"{",
"}",
";",
"this",
".",
"_contributionsByScopeId",
"=",
"{",
"}",
";",
"this",
".",
"_activeBindings",
"=",
"{",
"}",
";",
"this",
".",
"_urlBindings",
"=",
"{... | Constructs a new command registry with the given options.
@class CommandRegistry can render commands appropriate for a particular scope and DOM element.
@name orion.commandregistry.CommandRegistry
@param {Object} options The registry options object
@param {orion.selection.Selection} [options.selection] Optional selecti... | [
"Constructs",
"a",
"new",
"command",
"registry",
"with",
"the",
"given",
"options",
"."
] | eb2583100c662b5cfc1b461a978b31d3b8555ce1 | https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.ui/web/orion/commandRegistry.js#L37-L45 |
14,365 | eclipse/orion.client | bundles/org.eclipse.orion.client.ui/web/orion/commandRegistry.js | function(url) {
for (var id in this._urlBindings) {
if (this._urlBindings[id] && this._urlBindings[id].urlBinding && this._urlBindings[id].command) {
var match = this._urlBindings[id].urlBinding.match(url);
if (match) {
var urlBinding = this._urlBindings[id];
var command = urlBinding.comman... | javascript | function(url) {
for (var id in this._urlBindings) {
if (this._urlBindings[id] && this._urlBindings[id].urlBinding && this._urlBindings[id].command) {
var match = this._urlBindings[id].urlBinding.match(url);
if (match) {
var urlBinding = this._urlBindings[id];
var command = urlBinding.comman... | [
"function",
"(",
"url",
")",
"{",
"for",
"(",
"var",
"id",
"in",
"this",
".",
"_urlBindings",
")",
"{",
"if",
"(",
"this",
".",
"_urlBindings",
"[",
"id",
"]",
"&&",
"this",
".",
"_urlBindings",
"[",
"id",
"]",
".",
"urlBinding",
"&&",
"this",
".",... | Process the provided URL to determine whether any commands should be invoked. Note that we never
invoke a command callback by URL, only its parameter collector. If a parameter collector is not
specified, commands in the URL will be ignored.
@param {String} url a url that may contain URL bindings. | [
"Process",
"the",
"provided",
"URL",
"to",
"determine",
"whether",
"any",
"commands",
"should",
"be",
"invoked",
".",
"Note",
"that",
"we",
"never",
"invoke",
"a",
"command",
"callback",
"by",
"URL",
"only",
"its",
"parameter",
"collector",
".",
"If",
"a",
... | eb2583100c662b5cfc1b461a978b31d3b8555ce1 | https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.ui/web/orion/commandRegistry.js#L92-L112 | |
14,366 | eclipse/orion.client | bundles/org.eclipse.orion.client.ui/web/orion/commandRegistry.js | function(commandId, item, handler, parameters, userData, parent) {
var self = this;
if (item) {
var command = this._commandList[commandId];
var enabled = command && (command.visibleWhen ? command.visibleWhen(item) : true);
if (enabled && command.callback) {
var commandInvocation = new Commands.Co... | javascript | function(commandId, item, handler, parameters, userData, parent) {
var self = this;
if (item) {
var command = this._commandList[commandId];
var enabled = command && (command.visibleWhen ? command.visibleWhen(item) : true);
if (enabled && command.callback) {
var commandInvocation = new Commands.Co... | [
"function",
"(",
"commandId",
",",
"item",
",",
"handler",
",",
"parameters",
",",
"userData",
",",
"parent",
")",
"{",
"var",
"self",
"=",
"this",
";",
"if",
"(",
"item",
")",
"{",
"var",
"command",
"=",
"this",
".",
"_commandList",
"[",
"commandId",
... | Run the command with the specified commandId.
@param {String} commandId the id of the command to run.
@param {Object} item the item on which the command should run.
@param {Object} handler the handler for the command.
@param {orion.commands.ParametersDescription} [parameters] Parameters used on this invocation. Option... | [
"Run",
"the",
"command",
"with",
"the",
"specified",
"commandId",
"."
] | eb2583100c662b5cfc1b461a978b31d3b8555ce1 | https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.ui/web/orion/commandRegistry.js#L135-L154 | |
14,367 | eclipse/orion.client | bundles/org.eclipse.orion.client.ui/web/orion/commandRegistry.js | function(node, fillFunction, onClose, name) {
if (this._parameterCollector) {
this._parameterCollector.close();
this._parameterCollector.open(node, fillFunction, onClose, name);
}
} | javascript | function(node, fillFunction, onClose, name) {
if (this._parameterCollector) {
this._parameterCollector.close();
this._parameterCollector.open(node, fillFunction, onClose, name);
}
} | [
"function",
"(",
"node",
",",
"fillFunction",
",",
"onClose",
",",
"name",
")",
"{",
"if",
"(",
"this",
".",
"_parameterCollector",
")",
"{",
"this",
".",
"_parameterCollector",
".",
"close",
"(",
")",
";",
"this",
".",
"_parameterCollector",
".",
"open",
... | Open a parameter collector suitable for collecting information about a command.
Once a collector is created, the specified function is used to fill it with
information needed by the command. This method is used for commands that cannot
rely on a simple parameter description to collect parameters. Commands that descri... | [
"Open",
"a",
"parameter",
"collector",
"suitable",
"for",
"collecting",
"information",
"about",
"a",
"command",
".",
"Once",
"a",
"collector",
"is",
"created",
"the",
"specified",
"function",
"is",
"used",
"to",
"fill",
"it",
"with",
"information",
"needed",
"... | eb2583100c662b5cfc1b461a978b31d3b8555ce1 | https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.ui/web/orion/commandRegistry.js#L226-L231 | |
14,368 | eclipse/orion.client | bundles/org.eclipse.orion.client.ui/web/orion/commandRegistry.js | function(node, message, yesString, noString, modal, onConfirm) {
this._popupDialog(modal,"CONFIRM", node, message, [{label:yesString,callback:onConfirm,type:"ok"},{label:noString,callback:null,type:"cancel"}]);
} | javascript | function(node, message, yesString, noString, modal, onConfirm) {
this._popupDialog(modal,"CONFIRM", node, message, [{label:yesString,callback:onConfirm,type:"ok"},{label:noString,callback:null,type:"cancel"}]);
} | [
"function",
"(",
"node",
",",
"message",
",",
"yesString",
",",
"noString",
",",
"modal",
",",
"onConfirm",
")",
"{",
"this",
".",
"_popupDialog",
"(",
"modal",
",",
"\"CONFIRM\"",
",",
"node",
",",
"message",
",",
"[",
"{",
"label",
":",
"yesString",
... | Open a parameter collector to confirm a command.
@param {DOMElement} node the dom node that is displaying the command
@param {String} message the message to show when confirming the command
@param {String} yesString the label to show on a yes/true choice
@param {String} noString the label to show on a no/false choice
... | [
"Open",
"a",
"parameter",
"collector",
"to",
"confirm",
"a",
"command",
"."
] | eb2583100c662b5cfc1b461a978b31d3b8555ce1 | https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.ui/web/orion/commandRegistry.js#L244-L246 | |
14,369 | eclipse/orion.client | bundles/org.eclipse.orion.client.ui/web/orion/commandRegistry.js | function(node, message, yesString, onConfirm) {
this._popupDialog(false, "ALERT", node, message, [{label:yesString,callback:onConfirm,type:"ok"}]);
} | javascript | function(node, message, yesString, onConfirm) {
this._popupDialog(false, "ALERT", node, message, [{label:yesString,callback:onConfirm,type:"ok"}]);
} | [
"function",
"(",
"node",
",",
"message",
",",
"yesString",
",",
"onConfirm",
")",
"{",
"this",
".",
"_popupDialog",
"(",
"false",
",",
"\"ALERT\"",
",",
"node",
",",
"message",
",",
"[",
"{",
"label",
":",
"yesString",
",",
"callback",
":",
"onConfirm",
... | Open an alert tooltip
@param {DOMElement} node the dom node that is displaying the command
@param {String} message the message to show when confirming the command
@param {String} yesString the label to show on a yes/true choice
@param {Function} onConfirm a function that will be called when the user confirms the comma... | [
"Open",
"an",
"alert",
"tooltip"
] | eb2583100c662b5cfc1b461a978b31d3b8555ce1 | https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.ui/web/orion/commandRegistry.js#L257-L259 | |
14,370 | eclipse/orion.client | bundles/org.eclipse.orion.client.ui/web/orion/commandRegistry.js | function(node, message, yesString, noString, defaultInput, modal, onConfirm, positionString) {
var position = null;
if(positionString === "below"){position = ["below", "right", "above", "left"];}
else if(positionString === "right"){position = ["right", "above", "below", "left"];}
this._popupDialog(modal,"PR... | javascript | function(node, message, yesString, noString, defaultInput, modal, onConfirm, positionString) {
var position = null;
if(positionString === "below"){position = ["below", "right", "above", "left"];}
else if(positionString === "right"){position = ["right", "above", "below", "left"];}
this._popupDialog(modal,"PR... | [
"function",
"(",
"node",
",",
"message",
",",
"yesString",
",",
"noString",
",",
"defaultInput",
",",
"modal",
",",
"onConfirm",
",",
"positionString",
")",
"{",
"var",
"position",
"=",
"null",
";",
"if",
"(",
"positionString",
"===",
"\"below\"",
")",
"{"... | Open a tolltip parameter collector to collect user input.
@param {DOMElement} node the dom node that is displaying the command
@param {String} message the message to show when confirming the command
@param {String} yesString the label to show on a yes/true choice
@param {String} noString the label to show on a no/fals... | [
"Open",
"a",
"tolltip",
"parameter",
"collector",
"to",
"collect",
"user",
"input",
"."
] | eb2583100c662b5cfc1b461a978b31d3b8555ce1 | https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.ui/web/orion/commandRegistry.js#L384-L389 | |
14,371 | eclipse/orion.client | bundles/org.eclipse.orion.client.ui/web/orion/commandRegistry.js | function(keyAssist) {
var scopes = {};
var binding;
// see commands.js _processKey
function execute(activeBinding) {
return function() {
Commands.executeBinding(activeBinding);
};
}
var bindings = [];
for (var aBinding in this._activeBindings) {
binding = this._activeBindings[a... | javascript | function(keyAssist) {
var scopes = {};
var binding;
// see commands.js _processKey
function execute(activeBinding) {
return function() {
Commands.executeBinding(activeBinding);
};
}
var bindings = [];
for (var aBinding in this._activeBindings) {
binding = this._activeBindings[a... | [
"function",
"(",
"keyAssist",
")",
"{",
"var",
"scopes",
"=",
"{",
"}",
";",
"var",
"binding",
";",
"// see commands.js _processKey",
"function",
"execute",
"(",
"activeBinding",
")",
"{",
"return",
"function",
"(",
")",
"{",
"Commands",
".",
"executeBinding",... | Show the keybindings that are registered with the command registry inside the specified target node.
@param {KeyAssistPanel} keyAssist the key assist panel | [
"Show",
"the",
"keybindings",
"that",
"are",
"registered",
"with",
"the",
"command",
"registry",
"inside",
"the",
"specified",
"target",
"node",
"."
] | eb2583100c662b5cfc1b461a978b31d3b8555ce1 | https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.ui/web/orion/commandRegistry.js#L524-L566 | |
14,372 | eclipse/orion.client | bundles/org.eclipse.orion.client.ui/web/orion/commandRegistry.js | function(command) {
this._commandList[command.id] = command;
// Resolve any pending key/url bindings against this command
var pending = this._pendingBindings[command.id];
if (pending) {
var _self = this;
pending.forEach(function(binding) {
_self._addBinding(command, binding.type, binding.bindin... | javascript | function(command) {
this._commandList[command.id] = command;
// Resolve any pending key/url bindings against this command
var pending = this._pendingBindings[command.id];
if (pending) {
var _self = this;
pending.forEach(function(binding) {
_self._addBinding(command, binding.type, binding.bindin... | [
"function",
"(",
"command",
")",
"{",
"this",
".",
"_commandList",
"[",
"command",
".",
"id",
"]",
"=",
"command",
";",
"// Resolve any pending key/url bindings against this command",
"var",
"pending",
"=",
"this",
".",
"_pendingBindings",
"[",
"command",
".",
"id... | Add a command to the command registry. Nothing will be shown in the UI
until this command is referenced in a contribution.
@param {orion.commands.Command} command The command being added.
@see registerCommandContribution | [
"Add",
"a",
"command",
"to",
"the",
"command",
"registry",
".",
"Nothing",
"will",
"be",
"shown",
"in",
"the",
"UI",
"until",
"this",
"command",
"is",
"referenced",
"in",
"a",
"contribution",
"."
] | eb2583100c662b5cfc1b461a978b31d3b8555ce1 | https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.ui/web/orion/commandRegistry.js#L703-L714 | |
14,373 | eclipse/orion.client | bundles/org.eclipse.orion.client.ui/web/orion/commandRegistry.js | function(scopeId, groupId, position, title, parentPath, emptyGroupMessage, imageClass, tooltip, selectionClass, defaultActionId, extraClasses) {
if (!this._contributionsByScopeId[scopeId]) {
this._contributionsByScopeId[scopeId] = {};
}
var parentTable = this._contributionsByScopeId[scopeId];
if (parent... | javascript | function(scopeId, groupId, position, title, parentPath, emptyGroupMessage, imageClass, tooltip, selectionClass, defaultActionId, extraClasses) {
if (!this._contributionsByScopeId[scopeId]) {
this._contributionsByScopeId[scopeId] = {};
}
var parentTable = this._contributionsByScopeId[scopeId];
if (parent... | [
"function",
"(",
"scopeId",
",",
"groupId",
",",
"position",
",",
"title",
",",
"parentPath",
",",
"emptyGroupMessage",
",",
"imageClass",
",",
"tooltip",
",",
"selectionClass",
",",
"defaultActionId",
",",
"extraClasses",
")",
"{",
"if",
"(",
"!",
"this",
"... | Registers a command group and specifies visual information about the group.
@param {String} scopeId The id of a DOM element in which the group should be visible. Required.
When commands are rendered for a particular element, the group will be shown only if its scopeId
matches the id being rendered.
@param {String} gro... | [
"Registers",
"a",
"command",
"group",
"and",
"specifies",
"visual",
"information",
"about",
"the",
"group",
"."
] | eb2583100c662b5cfc1b461a978b31d3b8555ce1 | https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.ui/web/orion/commandRegistry.js#L740-L793 | |
14,374 | eclipse/orion.client | bundles/org.eclipse.orion.client.ui/web/orion/commandRegistry.js | function(scopeId, selectionService) {
if (!this._contributionsByScopeId[scopeId]) {
this._contributionsByScopeId[scopeId] = {};
}
this._contributionsByScopeId[scopeId].localSelectionService = selectionService;
} | javascript | function(scopeId, selectionService) {
if (!this._contributionsByScopeId[scopeId]) {
this._contributionsByScopeId[scopeId] = {};
}
this._contributionsByScopeId[scopeId].localSelectionService = selectionService;
} | [
"function",
"(",
"scopeId",
",",
"selectionService",
")",
"{",
"if",
"(",
"!",
"this",
".",
"_contributionsByScopeId",
"[",
"scopeId",
"]",
")",
"{",
"this",
".",
"_contributionsByScopeId",
"[",
"scopeId",
"]",
"=",
"{",
"}",
";",
"}",
"this",
".",
"_con... | Register a selection service that should be used for certain command scopes.
@param {String} scopeId The id describing the scope for which this selection service applies. Required.
Only contributions made to this scope will use the selection service.
@param {orion.selection.Selection} selectionService the selection se... | [
"Register",
"a",
"selection",
"service",
"that",
"should",
"be",
"used",
"for",
"certain",
"command",
"scopes",
"."
] | eb2583100c662b5cfc1b461a978b31d3b8555ce1 | https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.ui/web/orion/commandRegistry.js#L818-L823 | |
14,375 | eclipse/orion.client | bundles/org.eclipse.orion.client.ui/web/orion/commandRegistry.js | function(scopeId, commandId, position, parentPath, bindingOnly, keyBinding, urlBinding, handler) {
if (!this._contributionsByScopeId[scopeId]) {
this._contributionsByScopeId[scopeId] = {};
}
var parentTable = this._contributionsByScopeId[scopeId];
if (parentPath) {
parentTable = this._createEntryFor... | javascript | function(scopeId, commandId, position, parentPath, bindingOnly, keyBinding, urlBinding, handler) {
if (!this._contributionsByScopeId[scopeId]) {
this._contributionsByScopeId[scopeId] = {};
}
var parentTable = this._contributionsByScopeId[scopeId];
if (parentPath) {
parentTable = this._createEntryFor... | [
"function",
"(",
"scopeId",
",",
"commandId",
",",
"position",
",",
"parentPath",
",",
"bindingOnly",
",",
"keyBinding",
",",
"urlBinding",
",",
"handler",
")",
"{",
"if",
"(",
"!",
"this",
".",
"_contributionsByScopeId",
"[",
"scopeId",
"]",
")",
"{",
"th... | Register a command contribution, which identifies how a command appears
on a page and how it is invoked.
@param {String} scopeId The id describing the scope of the command. Required.
This scope id is used when rendering commands.
@param {String} commandId the id of the command. Required.
@param {Number} position the ... | [
"Register",
"a",
"command",
"contribution",
"which",
"identifies",
"how",
"a",
"command",
"appears",
"on",
"a",
"page",
"and",
"how",
"it",
"is",
"invoked",
"."
] | eb2583100c662b5cfc1b461a978b31d3b8555ce1 | https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.ui/web/orion/commandRegistry.js#L891-L931 | |
14,376 | eclipse/orion.client | bundles/org.eclipse.orion.client.ui/web/orion/commandRegistry.js | function(commandId, type, binding, bindingOnly) {
this._pendingBindings[commandId] = this._pendingBindings[commandId] || [];
this._pendingBindings[commandId].push({
type: type,
binding: binding,
bindingOnly: bindingOnly
});
} | javascript | function(commandId, type, binding, bindingOnly) {
this._pendingBindings[commandId] = this._pendingBindings[commandId] || [];
this._pendingBindings[commandId].push({
type: type,
binding: binding,
bindingOnly: bindingOnly
});
} | [
"function",
"(",
"commandId",
",",
"type",
",",
"binding",
",",
"bindingOnly",
")",
"{",
"this",
".",
"_pendingBindings",
"[",
"commandId",
"]",
"=",
"this",
".",
"_pendingBindings",
"[",
"commandId",
"]",
"||",
"[",
"]",
";",
"this",
".",
"_pendingBinding... | Remembers a key or url binding that has not yet been resolved to a command.
@param {String} type One of <code>"key"</code>, <code>"url"</code>. | [
"Remembers",
"a",
"key",
"or",
"url",
"binding",
"that",
"has",
"not",
"yet",
"been",
"resolved",
"to",
"a",
"command",
"."
] | eb2583100c662b5cfc1b461a978b31d3b8555ce1 | https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.ui/web/orion/commandRegistry.js#L978-L985 | |
14,377 | eclipse/orion.client | bundles/org.eclipse.orion.client.ui/web/orion/commandRegistry.js | function(scopeId, parent, items, handler, renderType, userData, domNodeWrapperList) {
if (typeof(scopeId) !== "string") { //$NON-NLS-0$
throw "a scope id for rendering must be specified"; //$NON-NLS-0$
}
parent = lib.node(parent);
if (!parent) {
throw "no parent"; //$NON-NLS-0$
}
var contri... | javascript | function(scopeId, parent, items, handler, renderType, userData, domNodeWrapperList) {
if (typeof(scopeId) !== "string") { //$NON-NLS-0$
throw "a scope id for rendering must be specified"; //$NON-NLS-0$
}
parent = lib.node(parent);
if (!parent) {
throw "no parent"; //$NON-NLS-0$
}
var contri... | [
"function",
"(",
"scopeId",
",",
"parent",
",",
"items",
",",
"handler",
",",
"renderType",
",",
"userData",
",",
"domNodeWrapperList",
")",
"{",
"if",
"(",
"typeof",
"(",
"scopeId",
")",
"!==",
"\"string\"",
")",
"{",
"//$NON-NLS-0$",
"throw",
"\"a scope id... | Render the commands that are appropriate for the given scope.
@param {String} scopeId The id describing the scope for which we are rendering commands. Required.
Only contributions made to this scope will be rendered.
@param {DOMElement} parent The element in which commands should be rendered. If commands have been
pr... | [
"Render",
"the",
"commands",
"that",
"are",
"appropriate",
"for",
"the",
"given",
"scope",
"."
] | eb2583100c662b5cfc1b461a978b31d3b8555ce1 | https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.ui/web/orion/commandRegistry.js#L1034-L1061 | |
14,378 | eclipse/orion.client | bundles/org.eclipse.orion.client.ui/web/orion/commandRegistry.js | function(parent) {
parent = lib.node(parent);
if (!parent) {
throw "no parent"; //$NON-NLS-0$
}
while (parent.hasChildNodes()) {
var node = parent.firstChild;
if (node.commandTooltip) {
node.commandTooltip.destroy();
}
if (node.emptyGroupTooltip) {
node.emptyGroupTooltip.dest... | javascript | function(parent) {
parent = lib.node(parent);
if (!parent) {
throw "no parent"; //$NON-NLS-0$
}
while (parent.hasChildNodes()) {
var node = parent.firstChild;
if (node.commandTooltip) {
node.commandTooltip.destroy();
}
if (node.emptyGroupTooltip) {
node.emptyGroupTooltip.dest... | [
"function",
"(",
"parent",
")",
"{",
"parent",
"=",
"lib",
".",
"node",
"(",
"parent",
")",
";",
"if",
"(",
"!",
"parent",
")",
"{",
"throw",
"\"no parent\"",
";",
"//$NON-NLS-0$",
"}",
"while",
"(",
"parent",
".",
"hasChildNodes",
"(",
")",
")",
"{"... | Destroy all DOM nodes and any other resources used by rendered commands.
This call does not remove the commands from the command registry. Clients typically call this
function to empty a command area when a client wants to render the commands again due to some
change in state.
@param {String|DOMElement} parent The id ... | [
"Destroy",
"all",
"DOM",
"nodes",
"and",
"any",
"other",
"resources",
"used",
"by",
"rendered",
"commands",
".",
"This",
"call",
"does",
"not",
"remove",
"the",
"commands",
"from",
"the",
"command",
"registry",
".",
"Clients",
"typically",
"call",
"this",
"f... | eb2583100c662b5cfc1b461a978b31d3b8555ce1 | https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.ui/web/orion/commandRegistry.js#L1070-L1086 | |
14,379 | eclipse/orion.client | bundles/org.eclipse.orion.client.ui/web/orion/commandRegistry.js | function (url) {
//ensure this is only the hash portion
var params = PageUtil.matchResourceParameters(url);
if (typeof params[this.token] !== "undefined") { //$NON-NLS-0$
this.parameterValue = params[this.token];
return this;
}
return null;
} | javascript | function (url) {
//ensure this is only the hash portion
var params = PageUtil.matchResourceParameters(url);
if (typeof params[this.token] !== "undefined") { //$NON-NLS-0$
this.parameterValue = params[this.token];
return this;
}
return null;
} | [
"function",
"(",
"url",
")",
"{",
"//ensure this is only the hash portion",
"var",
"params",
"=",
"PageUtil",
".",
"matchResourceParameters",
"(",
"url",
")",
";",
"if",
"(",
"typeof",
"params",
"[",
"this",
".",
"token",
"]",
"!==",
"\"undefined\"",
")",
"{",... | Returns whether this URL binding matches the given URL
@param url the URL.
@returns {Boolean} whether this URL binding matches | [
"Returns",
"whether",
"this",
"URL",
"binding",
"matches",
"the",
"given",
"URL"
] | eb2583100c662b5cfc1b461a978b31d3b8555ce1 | https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.ui/web/orion/commandRegistry.js#L1509-L1517 | |
14,380 | eclipse/orion.client | bundles/org.eclipse.orion.client.ui/web/orion/commandRegistry.js | CommandParameter | function CommandParameter (name, type, label, value, lines, eventListeners, validator) {
this.name = name;
this.type = type;
this.label = label;
this.value = value;
this.lines = lines || 1;
this.validator = validator;
this.eventListeners = (Array.isArray(eventListeners)) ?
eventListeners : (eventLis... | javascript | function CommandParameter (name, type, label, value, lines, eventListeners, validator) {
this.name = name;
this.type = type;
this.label = label;
this.value = value;
this.lines = lines || 1;
this.validator = validator;
this.eventListeners = (Array.isArray(eventListeners)) ?
eventListeners : (eventLis... | [
"function",
"CommandParameter",
"(",
"name",
",",
"type",
",",
"label",
",",
"value",
",",
"lines",
",",
"eventListeners",
",",
"validator",
")",
"{",
"this",
".",
"name",
"=",
"name",
";",
"this",
".",
"type",
"=",
"type",
";",
"this",
".",
"label",
... | A CommandParameter defines a parameter that is required by a command.
@param {String} name the name of the parameter
@param {String} type the type of the parameter, one of the HTML5 input types, or "boolean"
@param {String} [label] the (optional) label that should be used when showing the parameter
@param {String} [va... | [
"A",
"CommandParameter",
"defines",
"a",
"parameter",
"that",
"is",
"required",
"by",
"a",
"command",
"."
] | eb2583100c662b5cfc1b461a978b31d3b8555ce1 | https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.ui/web/orion/commandRegistry.js#L1551-L1561 |
14,381 | eclipse/orion.client | bundles/org.eclipse.orion.client.ui/web/orion/commandRegistry.js | ParametersDescription | function ParametersDescription (parameters, options, getParameters) {
this._storeParameters(parameters);
this._hasOptionalParameters = options && options.hasOptionalParameters;
this._options = options; // saved for making a copy
this.optionsRequested = false;
this.getParameters = getParameters;
this.client... | javascript | function ParametersDescription (parameters, options, getParameters) {
this._storeParameters(parameters);
this._hasOptionalParameters = options && options.hasOptionalParameters;
this._options = options; // saved for making a copy
this.optionsRequested = false;
this.getParameters = getParameters;
this.client... | [
"function",
"ParametersDescription",
"(",
"parameters",
",",
"options",
",",
"getParameters",
")",
"{",
"this",
".",
"_storeParameters",
"(",
"parameters",
")",
";",
"this",
".",
"_hasOptionalParameters",
"=",
"options",
"&&",
"options",
".",
"hasOptionalParameters"... | A ParametersDescription defines the parameters required by a command, and whether there are additional
optional parameters that can be specified. The command registry will attempt to collect required parameters
before calling a command callback. The command is expected to provide UI for optional parameter, when the u... | [
"A",
"ParametersDescription",
"defines",
"the",
"parameters",
"required",
"by",
"a",
"command",
"and",
"whether",
"there",
"are",
"additional",
"optional",
"parameters",
"that",
"can",
"be",
"specified",
".",
"The",
"command",
"registry",
"will",
"attempt",
"to",
... | eb2583100c662b5cfc1b461a978b31d3b8555ce1 | https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.ui/web/orion/commandRegistry.js#L1601-L1612 |
14,382 | eclipse/orion.client | bundles/org.eclipse.orion.client.ui/web/orion/commandRegistry.js | function(func) {
for (var key in this.parameterTable) {
if (this.parameterTable[key].type && this.parameterTable[key].name) {
func(this.parameterTable[key]);
}
}
} | javascript | function(func) {
for (var key in this.parameterTable) {
if (this.parameterTable[key].type && this.parameterTable[key].name) {
func(this.parameterTable[key]);
}
}
} | [
"function",
"(",
"func",
")",
"{",
"for",
"(",
"var",
"key",
"in",
"this",
".",
"parameterTable",
")",
"{",
"if",
"(",
"this",
".",
"parameterTable",
"[",
"key",
"]",
".",
"type",
"&&",
"this",
".",
"parameterTable",
"[",
"key",
"]",
".",
"name",
"... | Evaluate the specified function for each parameter.
@param {Function} func a function which operates on a provided command parameter | [
"Evaluate",
"the",
"specified",
"function",
"for",
"each",
"parameter",
"."
] | eb2583100c662b5cfc1b461a978b31d3b8555ce1 | https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.ui/web/orion/commandRegistry.js#L1699-L1705 | |
14,383 | eclipse/orion.client | bundles/org.eclipse.orion.client.ui/web/orion/commandRegistry.js | function() {
var parameters = [];
this.forEach(function(parm) {
var newParm = new CommandParameter(parm.name, parm.type, parm.label, parm.value, parm.lines, parm.eventListeners, parm.validator);
parameters.push(newParm);
});
var copy = new ParametersDescription(parameters, this._options, this.getPar... | javascript | function() {
var parameters = [];
this.forEach(function(parm) {
var newParm = new CommandParameter(parm.name, parm.type, parm.label, parm.value, parm.lines, parm.eventListeners, parm.validator);
parameters.push(newParm);
});
var copy = new ParametersDescription(parameters, this._options, this.getPar... | [
"function",
"(",
")",
"{",
"var",
"parameters",
"=",
"[",
"]",
";",
"this",
".",
"forEach",
"(",
"function",
"(",
"parm",
")",
"{",
"var",
"newParm",
"=",
"new",
"CommandParameter",
"(",
"parm",
".",
"name",
",",
"parm",
".",
"type",
",",
"parm",
"... | Make a copy of this description. Used for collecting values when a client doesn't want
the values to be persisted across different objects. | [
"Make",
"a",
"copy",
"of",
"this",
"description",
".",
"Used",
"for",
"collecting",
"values",
"when",
"a",
"client",
"doesn",
"t",
"want",
"the",
"values",
"to",
"be",
"persisted",
"across",
"different",
"objects",
"."
] | eb2583100c662b5cfc1b461a978b31d3b8555ce1 | https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.ui/web/orion/commandRegistry.js#L1720-L1732 | |
14,384 | eclipse/orion.client | bundles/org.eclipse.orion.client.ui/web/plugins/site/siteServiceImpl.js | xhrJson | function xhrJson(method, url, options) {
if (options && typeof options.data !== 'undefined') {
options.data = JSON.stringify(options.data);
}
return xhr.apply(null, Array.prototype.slice.call(arguments)).then(function(result) {
return JSON.parse(result.response || null);
});
} | javascript | function xhrJson(method, url, options) {
if (options && typeof options.data !== 'undefined') {
options.data = JSON.stringify(options.data);
}
return xhr.apply(null, Array.prototype.slice.call(arguments)).then(function(result) {
return JSON.parse(result.response || null);
});
} | [
"function",
"xhrJson",
"(",
"method",
",",
"url",
",",
"options",
")",
"{",
"if",
"(",
"options",
"&&",
"typeof",
"options",
".",
"data",
"!==",
"'undefined'",
")",
"{",
"options",
".",
"data",
"=",
"JSON",
".",
"stringify",
"(",
"options",
".",
"data"... | Invoke the xhr API passing JSON data and returning the response as JSON.
@returns {Deferred} A deferred that resolves to a JS object, or null if the server returned
an empty response. | [
"Invoke",
"the",
"xhr",
"API",
"passing",
"JSON",
"data",
"and",
"returning",
"the",
"response",
"as",
"JSON",
"."
] | eb2583100c662b5cfc1b461a978b31d3b8555ce1 | https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.ui/web/plugins/site/siteServiceImpl.js#L81-L88 |
14,385 | eclipse/orion.client | bundles/org.eclipse.orion.client.ui/web/gcli/util/host.js | flashNode | function flashNode(node, match) {
if (!node.__gcliHighlighting) {
node.__gcliHighlighting = true;
var original = node.style.background;
node.style.background = match ? 'green' : 'red';
setTimeout(function() {
node.style.background = original;
delete node.__gcliHighlighting;
}, 500);
... | javascript | function flashNode(node, match) {
if (!node.__gcliHighlighting) {
node.__gcliHighlighting = true;
var original = node.style.background;
node.style.background = match ? 'green' : 'red';
setTimeout(function() {
node.style.background = original;
delete node.__gcliHighlighting;
}, 500);
... | [
"function",
"flashNode",
"(",
"node",
",",
"match",
")",
"{",
"if",
"(",
"!",
"node",
".",
"__gcliHighlighting",
")",
"{",
"node",
".",
"__gcliHighlighting",
"=",
"true",
";",
"var",
"original",
"=",
"node",
".",
"style",
".",
"background",
";",
"node",
... | Internal helper to turn a single nodes background another color for 0.5
second. There is likely a better way to do this, but this will do for now. | [
"Internal",
"helper",
"to",
"turn",
"a",
"single",
"nodes",
"background",
"another",
"color",
"for",
"0",
".",
"5",
"second",
".",
"There",
"is",
"likely",
"a",
"better",
"way",
"to",
"do",
"this",
"but",
"this",
"will",
"do",
"for",
"now",
"."
] | eb2583100c662b5cfc1b461a978b31d3b8555ce1 | https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.ui/web/gcli/util/host.js#L40-L50 |
14,386 | eclipse/orion.client | modules/orionode/lib/accessRights.js | removeWorkspaceAccess | function removeWorkspaceAccess(userAccessRights, workspaceId) {
var newAccessRights = [];
if(Array.isArray(userAccessRights)) {
userAccessRights.forEach(function(accessRight) {
if(!new RegExp("/" + workspaceId + "(\/|$)").test(accessRight.Uri)) {
newAccessRights.push(accessRight);
}
});
}
return newAc... | javascript | function removeWorkspaceAccess(userAccessRights, workspaceId) {
var newAccessRights = [];
if(Array.isArray(userAccessRights)) {
userAccessRights.forEach(function(accessRight) {
if(!new RegExp("/" + workspaceId + "(\/|$)").test(accessRight.Uri)) {
newAccessRights.push(accessRight);
}
});
}
return newAc... | [
"function",
"removeWorkspaceAccess",
"(",
"userAccessRights",
",",
"workspaceId",
")",
"{",
"var",
"newAccessRights",
"=",
"[",
"]",
";",
"if",
"(",
"Array",
".",
"isArray",
"(",
"userAccessRights",
")",
")",
"{",
"userAccessRights",
".",
"forEach",
"(",
"func... | Remove the workspace access for the given workspace ID
@param {{?}[]} userAccessRights The current array of access rights
@param {string} workspaceId The ID of the workspace to remove access for
@returns {{?}[]} The new array of access rights | [
"Remove",
"the",
"workspace",
"access",
"for",
"the",
"given",
"workspace",
"ID"
] | eb2583100c662b5cfc1b461a978b31d3b8555ce1 | https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/modules/orionode/lib/accessRights.js#L52-L62 |
14,387 | eclipse/orion.client | modules/orionode/lib/accessRights.js | hasAccess | function hasAccess(access, res, err, next, uri){
if (err) {
api.writeError(404, res, err);
}
if(access) {
next();
} else {
api.writeError(403, res, "You are not authorized to access: " + uri);
}
} | javascript | function hasAccess(access, res, err, next, uri){
if (err) {
api.writeError(404, res, err);
}
if(access) {
next();
} else {
api.writeError(403, res, "You are not authorized to access: " + uri);
}
} | [
"function",
"hasAccess",
"(",
"access",
",",
"res",
",",
"err",
",",
"next",
",",
"uri",
")",
"{",
"if",
"(",
"err",
")",
"{",
"api",
".",
"writeError",
"(",
"404",
",",
"res",
",",
"err",
")",
";",
"}",
"if",
"(",
"access",
")",
"{",
"next",
... | Callback used in checkAccess
@param {bool} access If the requesting user has access
@param {XmlHttpRespsose} res The backing response
@param {*} err The returned error, if any
@param {fn} next The function to move the express routing queue
@param {string} uri The URI that attempted to be accessed | [
"Callback",
"used",
"in",
"checkAccess"
] | eb2583100c662b5cfc1b461a978b31d3b8555ce1 | https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/modules/orionode/lib/accessRights.js#L86-L95 |
14,388 | eclipse/orion.client | modules/orionode/lib/accessRights.js | wildCardMatch | function wildCardMatch(text, pattern){
var cards = pattern.split("*");
if (!pattern.startsWith("*") && !text.startsWith(cards[0])) { //$NON-NLS-1$
return false;
}
if (!pattern.endsWith("*") && !text.endsWith(cards[cards.length - 1])) { //$NON-NLS-1$
return false;
}
return !cards.some(function(card){
var idx... | javascript | function wildCardMatch(text, pattern){
var cards = pattern.split("*");
if (!pattern.startsWith("*") && !text.startsWith(cards[0])) { //$NON-NLS-1$
return false;
}
if (!pattern.endsWith("*") && !text.endsWith(cards[cards.length - 1])) { //$NON-NLS-1$
return false;
}
return !cards.some(function(card){
var idx... | [
"function",
"wildCardMatch",
"(",
"text",
",",
"pattern",
")",
"{",
"var",
"cards",
"=",
"pattern",
".",
"split",
"(",
"\"*\"",
")",
";",
"if",
"(",
"!",
"pattern",
".",
"startsWith",
"(",
"\"*\"",
")",
"&&",
"!",
"text",
".",
"startsWith",
"(",
"car... | Utility function to check if the request matches a given pattern of access
@param {string} text The text to check
@param {string} pattern The access pattern
@returns {bool} If the text matches the given access pattern | [
"Utility",
"function",
"to",
"check",
"if",
"the",
"request",
"matches",
"a",
"given",
"pattern",
"of",
"access"
] | eb2583100c662b5cfc1b461a978b31d3b8555ce1 | https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/modules/orionode/lib/accessRights.js#L117-L132 |
14,389 | eclipse/orion.client | modules/orionode/lib/accessRights.js | getAuthorizationData | function getAuthorizationData(metadata, store){
var properties;
var workspaceIDs;
var isPropertyString;
if (typeof metadata.properties === "string") {
isPropertyString = true;
properties = JSON.parse(metadata.properties); // metadata.properties need to be parse when using MongoDB
workspaceIDs = metadata.works... | javascript | function getAuthorizationData(metadata, store){
var properties;
var workspaceIDs;
var isPropertyString;
if (typeof metadata.properties === "string") {
isPropertyString = true;
properties = JSON.parse(metadata.properties); // metadata.properties need to be parse when using MongoDB
workspaceIDs = metadata.works... | [
"function",
"getAuthorizationData",
"(",
"metadata",
",",
"store",
")",
"{",
"var",
"properties",
";",
"var",
"workspaceIDs",
";",
"var",
"isPropertyString",
";",
"if",
"(",
"typeof",
"metadata",
".",
"properties",
"===",
"\"string\"",
")",
"{",
"isPropertyStrin... | Function to fetch the authorization data from the given metadata
@param {{?}} metadata The metadata object
@param {{?}} store The backing metastore
@returns {{?}[]} | [
"Function",
"to",
"fetch",
"the",
"authorization",
"data",
"from",
"the",
"given",
"metadata"
] | eb2583100c662b5cfc1b461a978b31d3b8555ce1 | https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/modules/orionode/lib/accessRights.js#L140-L171 |
14,390 | eclipse/orion.client | bundles/org.eclipse.orion.client.core/web/lsp/languageServer.js | function() {
if (this.capabilities && this.capabilities.textDocumentSync) {
var kind = this.capabilities.textDocumentSync;
if (this.capabilities.textDocumentSync.change) {
kind = this.capabilities.textDocumentSync.change;
}
switch (kind) {
case this.ipc.TEXT_DOCUMENT_SYNC_KIND.None:
ca... | javascript | function() {
if (this.capabilities && this.capabilities.textDocumentSync) {
var kind = this.capabilities.textDocumentSync;
if (this.capabilities.textDocumentSync.change) {
kind = this.capabilities.textDocumentSync.change;
}
switch (kind) {
case this.ipc.TEXT_DOCUMENT_SYNC_KIND.None:
ca... | [
"function",
"(",
")",
"{",
"if",
"(",
"this",
".",
"capabilities",
"&&",
"this",
".",
"capabilities",
".",
"textDocumentSync",
")",
"{",
"var",
"kind",
"=",
"this",
".",
"capabilities",
".",
"textDocumentSync",
";",
"if",
"(",
"this",
".",
"capabilities",
... | Retrieves the method in which the server wishes to have documents synchronized by.
@return {number} a TextDocumentSyncKind, may be None, Full, or Incremental | [
"Retrieves",
"the",
"method",
"in",
"which",
"the",
"server",
"wishes",
"to",
"have",
"documents",
"synchronized",
"by",
"."
] | eb2583100c662b5cfc1b461a978b31d3b8555ce1 | https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.core/web/lsp/languageServer.js#L115-L129 | |
14,391 | eclipse/orion.client | bundles/org.eclipse.orion.client.javascript/web/eslint/lib/eslint.js | parseJsonConfig | function parseJsonConfig(string, location, messages) {
var items = {};
// Parses a JSON-like comment by the same way as parsing CLI option.
/*try {
items = levn.parse("Object", string) || {};
// Some tests say that it should ignore invalid comments such as `/*eslint no-alert:abc* /`.
// Also, commaless... | javascript | function parseJsonConfig(string, location, messages) {
var items = {};
// Parses a JSON-like comment by the same way as parsing CLI option.
/*try {
items = levn.parse("Object", string) || {};
// Some tests say that it should ignore invalid comments such as `/*eslint no-alert:abc* /`.
// Also, commaless... | [
"function",
"parseJsonConfig",
"(",
"string",
",",
"location",
",",
"messages",
")",
"{",
"var",
"items",
"=",
"{",
"}",
";",
"// Parses a JSON-like comment by the same way as parsing CLI option.",
"/*try {\n\t\t\titems = levn.parse(\"Object\", string) || {};\n\n\t\t\t// Some tests... | Parses a JSON-like config.
@param {string} string The string to parse.
@param {Object} location Start line and column of comments for potential error message.
@param {Object[]} messages The messages queue for potential error message.
@returns {Object} Result map object | [
"Parses",
"a",
"JSON",
"-",
"like",
"config",
"."
] | eb2583100c662b5cfc1b461a978b31d3b8555ce1 | https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.javascript/web/eslint/lib/eslint.js#L79-L119 |
14,392 | eclipse/orion.client | bundles/org.eclipse.orion.client.javascript/web/eslint/lib/eslint.js | parseListConfig | function parseListConfig(string) {
var items = {};
// Collapse whitespace around ,
string = string.replace(/\s*,\s*/g, ",");
string.split(/,+/).forEach(function(name) {
name = name.trim();
if (!name) {
return;
}
items[name] = true;
});
return items;
} | javascript | function parseListConfig(string) {
var items = {};
// Collapse whitespace around ,
string = string.replace(/\s*,\s*/g, ",");
string.split(/,+/).forEach(function(name) {
name = name.trim();
if (!name) {
return;
}
items[name] = true;
});
return items;
} | [
"function",
"parseListConfig",
"(",
"string",
")",
"{",
"var",
"items",
"=",
"{",
"}",
";",
"// Collapse whitespace around ,",
"string",
"=",
"string",
".",
"replace",
"(",
"/",
"\\s*,\\s*",
"/",
"g",
",",
"\",\"",
")",
";",
"string",
".",
"split",
"(",
... | Parses a config of values separated by comma.
@param {string} string The string to parse.
@returns {Object} Result map of values and true values | [
"Parses",
"a",
"config",
"of",
"values",
"separated",
"by",
"comma",
"."
] | eb2583100c662b5cfc1b461a978b31d3b8555ce1 | https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.javascript/web/eslint/lib/eslint.js#L126-L140 |
14,393 | eclipse/orion.client | bundles/org.eclipse.orion.client.javascript/web/eslint/lib/eslint.js | addDeclaredGlobals | function addDeclaredGlobals(program, globalScope, config) {
var declaredGlobals = {},
exportedGlobals = {},
explicitGlobals = {},
builtin = Environments.get("builtin");
assign(declaredGlobals, builtin);
Object.keys(config.env).forEach(function(name) {
if (config.env[name]) {
var env = Environmen... | javascript | function addDeclaredGlobals(program, globalScope, config) {
var declaredGlobals = {},
exportedGlobals = {},
explicitGlobals = {},
builtin = Environments.get("builtin");
assign(declaredGlobals, builtin);
Object.keys(config.env).forEach(function(name) {
if (config.env[name]) {
var env = Environmen... | [
"function",
"addDeclaredGlobals",
"(",
"program",
",",
"globalScope",
",",
"config",
")",
"{",
"var",
"declaredGlobals",
"=",
"{",
"}",
",",
"exportedGlobals",
"=",
"{",
"}",
",",
"explicitGlobals",
"=",
"{",
"}",
",",
"builtin",
"=",
"Environments",
".",
... | Ensures that variables representing built-in properties of the Global Object,
and any globals declared by special block comments, are present in the global
scope.
@param {ASTNode} program The top node of the AST.
@param {Scope} globalScope The global scope.
@param {Object} config The existing configuration data.
@retur... | [
"Ensures",
"that",
"variables",
"representing",
"built",
"-",
"in",
"properties",
"of",
"the",
"Global",
"Object",
"and",
"any",
"globals",
"declared",
"by",
"special",
"block",
"comments",
"are",
"present",
"in",
"the",
"global",
"scope",
"."
] | eb2583100c662b5cfc1b461a978b31d3b8555ce1 | https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.javascript/web/eslint/lib/eslint.js#L151-L231 |
14,394 | eclipse/orion.client | bundles/org.eclipse.orion.client.javascript/web/eslint/lib/eslint.js | disableReporting | function disableReporting(reportingConfig, start, rulesToDisable) {
if (rulesToDisable.length) {
rulesToDisable.forEach(function(rule) {
reportingConfig.push({
start: start,
end: null,
rule: rule
});
});
} else {
reportingConfig.push({
start: start,
end: null,
rule: null... | javascript | function disableReporting(reportingConfig, start, rulesToDisable) {
if (rulesToDisable.length) {
rulesToDisable.forEach(function(rule) {
reportingConfig.push({
start: start,
end: null,
rule: rule
});
});
} else {
reportingConfig.push({
start: start,
end: null,
rule: null... | [
"function",
"disableReporting",
"(",
"reportingConfig",
",",
"start",
",",
"rulesToDisable",
")",
"{",
"if",
"(",
"rulesToDisable",
".",
"length",
")",
"{",
"rulesToDisable",
".",
"forEach",
"(",
"function",
"(",
"rule",
")",
"{",
"reportingConfig",
".",
"push... | Add data to reporting configuration to disable reporting for list of rules
starting from start location
@param {Object[]} reportingConfig Current reporting configuration
@param {Object} start Position to start
@param {string[]} rulesToDisable List of rules
@returns {void} | [
"Add",
"data",
"to",
"reporting",
"configuration",
"to",
"disable",
"reporting",
"for",
"list",
"of",
"rules",
"starting",
"from",
"start",
"location"
] | eb2583100c662b5cfc1b461a978b31d3b8555ce1 | https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.javascript/web/eslint/lib/eslint.js#L241-L258 |
14,395 | eclipse/orion.client | bundles/org.eclipse.orion.client.javascript/web/eslint/lib/eslint.js | enableReporting | function enableReporting(reportingConfig, start, rulesToEnable) {
var i;
if (rulesToEnable.length) {
rulesToEnable.forEach(function(rule) {
for (i = reportingConfig.length - 1; i >= 0; i--) {
if (!reportingConfig[i].end && reportingConfig[i].rule === rule) {
reportingConfig[i].end = start;
... | javascript | function enableReporting(reportingConfig, start, rulesToEnable) {
var i;
if (rulesToEnable.length) {
rulesToEnable.forEach(function(rule) {
for (i = reportingConfig.length - 1; i >= 0; i--) {
if (!reportingConfig[i].end && reportingConfig[i].rule === rule) {
reportingConfig[i].end = start;
... | [
"function",
"enableReporting",
"(",
"reportingConfig",
",",
"start",
",",
"rulesToEnable",
")",
"{",
"var",
"i",
";",
"if",
"(",
"rulesToEnable",
".",
"length",
")",
"{",
"rulesToEnable",
".",
"forEach",
"(",
"function",
"(",
"rule",
")",
"{",
"for",
"(",
... | Add data to reporting configuration to enable reporting for list of rules
starting from start location
@param {Object[]} reportingConfig Current reporting configuration
@param {Object} start Position to start
@param {string[]} rulesToEnable List of rules
@returns {void} | [
"Add",
"data",
"to",
"reporting",
"configuration",
"to",
"enable",
"reporting",
"for",
"list",
"of",
"rules",
"starting",
"from",
"start",
"location"
] | eb2583100c662b5cfc1b461a978b31d3b8555ce1 | https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.javascript/web/eslint/lib/eslint.js#L268-L296 |
14,396 | eclipse/orion.client | bundles/org.eclipse.orion.client.javascript/web/eslint/lib/eslint.js | isDisabledByReportingConfig | function isDisabledByReportingConfig(reportingConfig, ruleId, location) {
for (var i = 0, c = reportingConfig.length; i < c; i++) {
var ignore = reportingConfig[i];
if ((!ignore.rule || ignore.rule === ruleId) &&
(location.line > ignore.start.line || (location.line === ignore.start.line && location.colum... | javascript | function isDisabledByReportingConfig(reportingConfig, ruleId, location) {
for (var i = 0, c = reportingConfig.length; i < c; i++) {
var ignore = reportingConfig[i];
if ((!ignore.rule || ignore.rule === ruleId) &&
(location.line > ignore.start.line || (location.line === ignore.start.line && location.colum... | [
"function",
"isDisabledByReportingConfig",
"(",
"reportingConfig",
",",
"ruleId",
",",
"location",
")",
"{",
"for",
"(",
"var",
"i",
"=",
"0",
",",
"c",
"=",
"reportingConfig",
".",
"length",
";",
"i",
"<",
"c",
";",
"i",
"++",
")",
"{",
"var",
"ignore... | Check if message of rule with ruleId should be ignored in location
@param {Object[]} reportingConfig Collection of ignore records
@param {string} ruleId Id of rule
@param {Object} location Location of message
@returns {boolean} True if message should be ignored, false otherwise | [
"Check",
"if",
"message",
"of",
"rule",
"with",
"ruleId",
"should",
"be",
"ignored",
"in",
"location"
] | eb2583100c662b5cfc1b461a978b31d3b8555ce1 | https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.javascript/web/eslint/lib/eslint.js#L400-L414 |
14,397 | eclipse/orion.client | bundles/org.eclipse.orion.client.javascript/web/eslint/lib/eslint.js | prepareConfig | function prepareConfig(config) {
config.globals = config.globals || config.global || {};
delete config.global;
var copiedRules = {},
parserOptions = {},
preparedConfig;
if (typeof config.rules === "object") {
Object.keys(config.rules).forEach(function(k) {
var rule = config.rules[k];
if (ru... | javascript | function prepareConfig(config) {
config.globals = config.globals || config.global || {};
delete config.global;
var copiedRules = {},
parserOptions = {},
preparedConfig;
if (typeof config.rules === "object") {
Object.keys(config.rules).forEach(function(k) {
var rule = config.rules[k];
if (ru... | [
"function",
"prepareConfig",
"(",
"config",
")",
"{",
"config",
".",
"globals",
"=",
"config",
".",
"globals",
"||",
"config",
".",
"global",
"||",
"{",
"}",
";",
"delete",
"config",
".",
"global",
";",
"var",
"copiedRules",
"=",
"{",
"}",
",",
"parser... | Process initial config to make it safe to extend by file comment config
@param {Object} config Initial config
@returns {Object} Processed config | [
"Process",
"initial",
"config",
"to",
"make",
"it",
"safe",
"to",
"extend",
"by",
"file",
"comment",
"config"
] | eb2583100c662b5cfc1b461a978b31d3b8555ce1 | https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.javascript/web/eslint/lib/eslint.js#L421-L482 |
14,398 | eclipse/orion.client | bundles/org.eclipse.orion.client.javascript/web/eslint/lib/eslint.js | createStubRule | function createStubRule(message) {
/**
* Creates a fake rule object
* @param {object} context context object for each rule
* @returns {object} collection of node to listen on
*/
function createRuleModule(context) {
return {
Program: function(node) {
context.report(node, message);
}
}... | javascript | function createStubRule(message) {
/**
* Creates a fake rule object
* @param {object} context context object for each rule
* @returns {object} collection of node to listen on
*/
function createRuleModule(context) {
return {
Program: function(node) {
context.report(node, message);
}
}... | [
"function",
"createStubRule",
"(",
"message",
")",
"{",
"/**\n\t\t * Creates a fake rule object\n\t\t * @param {object} context context object for each rule\n\t\t * @returns {object} collection of node to listen on\n\t\t */",
"function",
"createRuleModule",
"(",
"context",
")",
"{",
"retur... | Provide a stub rule with a given message
@param {string} message The message to be displayed for the rule
@returns {Function} Stub rule function | [
"Provide",
"a",
"stub",
"rule",
"with",
"a",
"given",
"message"
] | eb2583100c662b5cfc1b461a978b31d3b8555ce1 | https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.javascript/web/eslint/lib/eslint.js#L489-L509 |
14,399 | eclipse/orion.client | bundles/org.eclipse.orion.client.javascript/web/eslint/lib/eslint.js | getRuleReplacementMessage | function getRuleReplacementMessage(ruleId) {
if (ruleId in replacements.rules) {
var newRules = replacements.rules[ruleId];
return "Rule \'" + ruleId + "\' was removed and replaced by: " + newRules.join(", ");
}
return null;
} | javascript | function getRuleReplacementMessage(ruleId) {
if (ruleId in replacements.rules) {
var newRules = replacements.rules[ruleId];
return "Rule \'" + ruleId + "\' was removed and replaced by: " + newRules.join(", ");
}
return null;
} | [
"function",
"getRuleReplacementMessage",
"(",
"ruleId",
")",
"{",
"if",
"(",
"ruleId",
"in",
"replacements",
".",
"rules",
")",
"{",
"var",
"newRules",
"=",
"replacements",
".",
"rules",
"[",
"ruleId",
"]",
";",
"return",
"\"Rule \\'\"",
"+",
"ruleId",
"+",
... | Provide a rule replacement message
@param {string} ruleId Name of the rule
@returns {string} Message detailing rule replacement | [
"Provide",
"a",
"rule",
"replacement",
"message"
] | eb2583100c662b5cfc1b461a978b31d3b8555ce1 | https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.javascript/web/eslint/lib/eslint.js#L516-L524 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.