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,200
eclipse/orion.client
bundles/org.eclipse.orion.client.ui/web/orion/editorView.js
EditorView
function EditorView(options) { this._parent = options.parent; if(typeof this._parent === "string") { this._parent = document.getElementById(options.parent); } this.id = options.id || ""; this.activateContext = options.activateContext; this.renderToolbars = options.renderToolbars; this.serviceRe...
javascript
function EditorView(options) { this._parent = options.parent; if(typeof this._parent === "string") { this._parent = document.getElementById(options.parent); } this.id = options.id || ""; this.activateContext = options.activateContext; this.renderToolbars = options.renderToolbars; this.serviceRe...
[ "function", "EditorView", "(", "options", ")", "{", "this", ".", "_parent", "=", "options", ".", "parent", ";", "if", "(", "typeof", "this", ".", "_parent", "===", "\"string\"", ")", "{", "this", ".", "_parent", "=", "document", ".", "getElementById", "(...
Constructs a new EditorView object. @class @name orion.EditorView @borrows orion.editor.EventTarget#addEventListener as #addEventListener @borrows orion.editor.EventTarget#removeEventListener as #removeEventListener @borrows orion.editor.EventTarget#dispatchEvent as #dispatchEvent
[ "Constructs", "a", "new", "EditorView", "object", "." ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.ui/web/orion/editorView.js#L89-L137
14,201
eclipse/orion.client
bundles/org.eclipse.orion.client.javascript/web/eslint/lib/rules/no-extend-native.js
function(node) { var lhs = node.left, affectsProto; if (lhs.type !== "MemberExpression" || lhs.object.type !== "MemberExpression") { return; } affectsProto = lhs.object.computed ? lhs.object.property.type === "Literal" && lhs.object.property.value === "prototype" : lhs.object.prope...
javascript
function(node) { var lhs = node.left, affectsProto; if (lhs.type !== "MemberExpression" || lhs.object.type !== "MemberExpression") { return; } affectsProto = lhs.object.computed ? lhs.object.property.type === "Literal" && lhs.object.property.value === "prototype" : lhs.object.prope...
[ "function", "(", "node", ")", "{", "var", "lhs", "=", "node", ".", "left", ",", "affectsProto", ";", "if", "(", "lhs", ".", "type", "!==", "\"MemberExpression\"", "||", "lhs", ".", "object", ".", "type", "!==", "\"MemberExpression\"", ")", "{", "return",...
handle the Array.prototype.extra style case
[ "handle", "the", "Array", ".", "prototype", ".", "extra", "style", "case" ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.javascript/web/eslint/lib/rules/no-extend-native.js#L36-L57
14,202
eclipse/orion.client
bundles/org.eclipse.orion.client.javascript/web/eslint/lib/rules/no-unused-expressions.js
isValidExpression
function isValidExpression(node) { if (allowTernary) { // Recursive check for ternary and logical expressions if (node.type === "ConditionalExpression") { return isValidExpression(node.consequent) && isValidExpression(node.alternate); } } if (allowShortCircuit) { if (node.type === "Logical...
javascript
function isValidExpression(node) { if (allowTernary) { // Recursive check for ternary and logical expressions if (node.type === "ConditionalExpression") { return isValidExpression(node.consequent) && isValidExpression(node.alternate); } } if (allowShortCircuit) { if (node.type === "Logical...
[ "function", "isValidExpression", "(", "node", ")", "{", "if", "(", "allowTernary", ")", "{", "// Recursive check for ternary and logical expressions", "if", "(", "node", ".", "type", "===", "\"ConditionalExpression\"", ")", "{", "return", "isValidExpression", "(", "no...
Determines whether or not a given node is a valid expression. Recurses on short circuit eval and ternary nodes if enabled by flags. @param {ASTNode} node - any node @returns {boolean} whether the given node is a valid expression
[ "Determines", "whether", "or", "not", "a", "given", "node", "is", "a", "valid", "expression", ".", "Recurses", "on", "short", "circuit", "eval", "and", "ternary", "nodes", "if", "enabled", "by", "flags", "." ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.javascript/web/eslint/lib/rules/no-unused-expressions.js#L66-L81
14,203
eclipse/orion.client
bundles/org.eclipse.orion.client.ui/web/gcli/gcli/ui/output_terminal.js
OutputTerminal
function OutputTerminal(options, components) { this.element = components.element; this.requisition = components.requisition; this.requisition.commandOutputManager.onOutput.add(this.outputted, this); var document = components.element.ownerDocument; if (outputViewCss != null) { this.style = util.importCss...
javascript
function OutputTerminal(options, components) { this.element = components.element; this.requisition = components.requisition; this.requisition.commandOutputManager.onOutput.add(this.outputted, this); var document = components.element.ownerDocument; if (outputViewCss != null) { this.style = util.importCss...
[ "function", "OutputTerminal", "(", "options", ",", "components", ")", "{", "this", ".", "element", "=", "components", ".", "element", ";", "this", ".", "requisition", "=", "components", ".", "requisition", ";", "this", ".", "requisition", ".", "commandOutputMa...
A wrapper for a set of rows|command outputs. Register with the canon to be notified when commands have output to be displayed. @param options Object containing user customization properties, although none are currently supported @param components Object that links to other UI components. GCLI provided: - element: Root ...
[ "A", "wrapper", "for", "a", "set", "of", "rows|command", "outputs", ".", "Register", "with", "the", "canon", "to", "be", "notified", "when", "commands", "have", "output", "to", "be", "displayed", "." ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.ui/web/gcli/gcli/ui/output_terminal.js#L41-L54
14,204
eclipse/orion.client
bundles/org.eclipse.orion.client.ui/web/gcli/gcli/ui/output_terminal.js
OutputView
function OutputView(outputData, outputTerminal) { this.outputData = outputData; this.outputTerminal = outputTerminal; this.url = util.createUrlLookup(module); // Elements attached to this by template(). this.elems = { rowin: null, rowout: null, hide: null, show: null, duration: null, ...
javascript
function OutputView(outputData, outputTerminal) { this.outputData = outputData; this.outputTerminal = outputTerminal; this.url = util.createUrlLookup(module); // Elements attached to this by template(). this.elems = { rowin: null, rowout: null, hide: null, show: null, duration: null, ...
[ "function", "OutputView", "(", "outputData", ",", "outputTerminal", ")", "{", "this", ".", "outputData", "=", "outputData", ";", "this", ".", "outputTerminal", "=", "outputTerminal", ";", "this", ".", "url", "=", "util", ".", "createUrlLookup", "(", "module", ...
Adds a row to the CLI output display
[ "Adds", "a", "row", "to", "the", "CLI", "output", "display" ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.ui/web/gcli/gcli/ui/output_terminal.js#L96-L121
14,205
eclipse/orion.client
bundles/org.eclipse.orion.client.ui/web/orion/edit/editorContext.js
getOptions
function getOptions(serviceRegistry, serviceID) { var options = Object.create(null); getReferences(serviceRegistry, serviceID).forEach(function(serviceRef) { serviceRef.getPropertyKeys().forEach(function(key) { if (key !== "service.id" && key !== "service.names" && key !== "objectClass") //$NON-NLS-2$ //$NON...
javascript
function getOptions(serviceRegistry, serviceID) { var options = Object.create(null); getReferences(serviceRegistry, serviceID).forEach(function(serviceRef) { serviceRef.getPropertyKeys().forEach(function(key) { if (key !== "service.id" && key !== "service.names" && key !== "objectClass") //$NON-NLS-2$ //$NON...
[ "function", "getOptions", "(", "serviceRegistry", ",", "serviceID", ")", "{", "var", "options", "=", "Object", ".", "create", "(", "null", ")", ";", "getReferences", "(", "serviceRegistry", ",", "serviceID", ")", ".", "forEach", "(", "function", "(", "servic...
Gets the editor context "options" object. @name orion.edit.EditorContext.getOptions @function @param {orion.serviceregistry.ServiceRegistry} serviceRegistry The service registry to consult. @returns {Object}
[ "Gets", "the", "editor", "context", "options", "object", "." ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.ui/web/orion/edit/editorContext.js#L49-L58
14,206
eclipse/orion.client
bundles/org.eclipse.orion.client.ui/web/gcli/gcli/ui/display.js
Display
function Display(options) { var doc = options.document || document; this.displayStyle = undefined; if (displayCss != null) { this.displayStyle = util.importCss(displayCss, doc, 'gcli-css-display'); } // Configuring the document is complex because on the web side, there is an // active desire to have n...
javascript
function Display(options) { var doc = options.document || document; this.displayStyle = undefined; if (displayCss != null) { this.displayStyle = util.importCss(displayCss, doc, 'gcli-css-display'); } // Configuring the document is complex because on the web side, there is an // active desire to have n...
[ "function", "Display", "(", "options", ")", "{", "var", "doc", "=", "options", ".", "document", "||", "document", ";", "this", ".", "displayStyle", "=", "undefined", ";", "if", "(", "displayCss", "!=", "null", ")", "{", "this", ".", "displayStyle", "=", ...
View is responsible for generating the web UI for GCLI. @param options Object containing user customization properties. See the documentation for the other components for more details. Options supported directly include: - document (default=document): - environment (default={}): - dontDecorate (default=false): - inputE...
[ "View", "is", "responsible", "for", "generating", "the", "web", "UI", "for", "GCLI", "." ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.ui/web/gcli/gcli/ui/display.js#L78-L160
14,207
eclipse/orion.client
bundles/org.eclipse.orion.client.ui/web/gcli/gcli/ui/display.js
find
function find(doc, element, id) { if (!element) { element = doc.getElementById(id); if (!element) { throw new Error('Missing element, id=' + id); } } return element; }
javascript
function find(doc, element, id) { if (!element) { element = doc.getElementById(id); if (!element) { throw new Error('Missing element, id=' + id); } } return element; }
[ "function", "find", "(", "doc", ",", "element", ",", "id", ")", "{", "if", "(", "!", "element", ")", "{", "element", "=", "doc", ".", "getElementById", "(", "id", ")", ";", "if", "(", "!", "element", ")", "{", "throw", "new", "Error", "(", "'Miss...
Utility to help find an element by id, throwing if it wasn't found
[ "Utility", "to", "help", "find", "an", "element", "by", "id", "throwing", "if", "it", "wasn", "t", "found" ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.ui/web/gcli/gcli/ui/display.js#L204-L212
14,208
eclipse/orion.client
bundles/org.eclipse.orion.client.ui/web/gcli/gcli/ui/display.js
insert
function insert(sibling, element, id) { var doc = sibling.ownerDocument; if (!element) { element = doc.getElementById('gcli-row-complete'); if (!element) { element = util.createElement(doc, 'div'); sibling.parentNode.insertBefore(element, sibling.nextSibling); element.gcliCreated = true; ...
javascript
function insert(sibling, element, id) { var doc = sibling.ownerDocument; if (!element) { element = doc.getElementById('gcli-row-complete'); if (!element) { element = util.createElement(doc, 'div'); sibling.parentNode.insertBefore(element, sibling.nextSibling); element.gcliCreated = true; ...
[ "function", "insert", "(", "sibling", ",", "element", ",", "id", ")", "{", "var", "doc", "=", "sibling", ".", "ownerDocument", ";", "if", "(", "!", "element", ")", "{", "element", "=", "doc", ".", "getElementById", "(", "'gcli-row-complete'", ")", ";", ...
Utility to help find an element by id, creating it if it wasn't found
[ "Utility", "to", "help", "find", "an", "element", "by", "id", "creating", "it", "if", "it", "wasn", "t", "found" ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.ui/web/gcli/gcli/ui/display.js#L217-L228
14,209
eclipse/orion.client
bundles/org.eclipse.orion.client.javascript/web/eslint/lib/code-path-analysis/code-path-analyzer.js
function(node) { this.currentNode = node; // Updates the code path due to node's position in its parent node. if (node.parent) { preprocess(this, node); } // Updates the code path. // And emits onCodePathStart/onCodePathSegmentStart events. processCodePathToEnter(this, node); // Emits nod...
javascript
function(node) { this.currentNode = node; // Updates the code path due to node's position in its parent node. if (node.parent) { preprocess(this, node); } // Updates the code path. // And emits onCodePathStart/onCodePathSegmentStart events. processCodePathToEnter(this, node); // Emits nod...
[ "function", "(", "node", ")", "{", "this", ".", "currentNode", "=", "node", ";", "// Updates the code path due to node's position in its parent node.", "if", "(", "node", ".", "parent", ")", "{", "preprocess", "(", "this", ",", "node", ")", ";", "}", "// Updates...
Does the process to enter a given AST node. This updates state of analysis and calls `enterNode` of the wrapped. @param {ASTNode} node - A node which is entering. @returns {void}
[ "Does", "the", "process", "to", "enter", "a", "given", "AST", "node", ".", "This", "updates", "state", "of", "analysis", "and", "calls", "enterNode", "of", "the", "wrapped", "." ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.javascript/web/eslint/lib/code-path-analysis/code-path-analyzer.js#L570-L586
14,210
eclipse/orion.client
bundles/org.eclipse.orion.client.javascript/web/eslint/lib/code-path-analysis/code-path-analyzer.js
function(node) { this.currentNode = node;// Updates the code path. // And emits onCodePathStart/onCodePathSegmentStart events. processCodePathToExit(this, node); // Emits node events. this.original.leaveNode(node); // Emits the last onCodePathStart/onCodePathSegmentStart events. postprocess(this,...
javascript
function(node) { this.currentNode = node;// Updates the code path. // And emits onCodePathStart/onCodePathSegmentStart events. processCodePathToExit(this, node); // Emits node events. this.original.leaveNode(node); // Emits the last onCodePathStart/onCodePathSegmentStart events. postprocess(this,...
[ "function", "(", "node", ")", "{", "this", ".", "currentNode", "=", "node", ";", "// Updates the code path.", "// And emits onCodePathStart/onCodePathSegmentStart events.", "processCodePathToExit", "(", "this", ",", "node", ")", ";", "// Emits node events.", "this", ".", ...
Does the process to leave a given AST node. This updates state of analysis and calls `leaveNode` of the wrapped. @param {ASTNode} node - A node which is leaving. @returns {void}
[ "Does", "the", "process", "to", "leave", "a", "given", "AST", "node", ".", "This", "updates", "state", "of", "analysis", "and", "calls", "leaveNode", "of", "the", "wrapped", "." ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.javascript/web/eslint/lib/code-path-analysis/code-path-analyzer.js#L595-L607
14,211
eclipse/orion.client
bundles/org.eclipse.orion.client.javascript/web/eslint/lib/code-path-analysis/code-path-analyzer.js
function(fromSegment, toSegment) { if (fromSegment.reachable && toSegment.reachable) { this.emitter.emit( "onCodePathSegmentLoop", fromSegment, toSegment, this.currentNode ); } }
javascript
function(fromSegment, toSegment) { if (fromSegment.reachable && toSegment.reachable) { this.emitter.emit( "onCodePathSegmentLoop", fromSegment, toSegment, this.currentNode ); } }
[ "function", "(", "fromSegment", ",", "toSegment", ")", "{", "if", "(", "fromSegment", ".", "reachable", "&&", "toSegment", ".", "reachable", ")", "{", "this", ".", "emitter", ".", "emit", "(", "\"onCodePathSegmentLoop\"", ",", "fromSegment", ",", "toSegment", ...
This is called on a code path looped. Then this raises a looped event. @param {CodePathSegment} fromSegment - A segment of prev. @param {CodePathSegment} toSegment - A segment of next. @returns {void}
[ "This", "is", "called", "on", "a", "code", "path", "looped", ".", "Then", "this", "raises", "a", "looped", "event", "." ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.javascript/web/eslint/lib/code-path-analysis/code-path-analyzer.js#L616-L625
14,212
eclipse/orion.client
modules/orionode/lib/user.js
isAdmin
function isAdmin(options, username) { return (options.configParams.get("orion.auth.user.creation") || "").split(",").some(function(user) { return user === username; }); }
javascript
function isAdmin(options, username) { return (options.configParams.get("orion.auth.user.creation") || "").split(",").some(function(user) { return user === username; }); }
[ "function", "isAdmin", "(", "options", ",", "username", ")", "{", "return", "(", "options", ".", "configParams", ".", "get", "(", "\"orion.auth.user.creation\"", ")", "||", "\"\"", ")", ".", "split", "(", "\",\"", ")", ".", "some", "(", "function", "(", ...
Checks if the 'admin' user has been enabled in the server configuration @param {?} options The map of server options @see https://wiki.eclipse.org/Orion/Server_admin_guide#Allowing_users_to_create_accounts @since 18.0
[ "Checks", "if", "the", "admin", "user", "has", "been", "enabled", "in", "the", "server", "configuration" ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/modules/orionode/lib/user.js#L59-L63
14,213
eclipse/orion.client
modules/orionode/lib/user.js
userJSON
function userJSON(user, options) { return { FullName: user.fullname, UserName: user.username, Location: api.join(options.usersRoot, user.username), Email: user.email, EmailConfirmed: emailConfirmed(user), HasPassword: true, OAuth: user.oauth || undefined, LastLoginTimestamp: user.login_timestamp ? user...
javascript
function userJSON(user, options) { return { FullName: user.fullname, UserName: user.username, Location: api.join(options.usersRoot, user.username), Email: user.email, EmailConfirmed: emailConfirmed(user), HasPassword: true, OAuth: user.oauth || undefined, LastLoginTimestamp: user.login_timestamp ? user...
[ "function", "userJSON", "(", "user", ",", "options", ")", "{", "return", "{", "FullName", ":", "user", ".", "fullname", ",", "UserName", ":", "user", ".", "username", ",", "Location", ":", "api", ".", "join", "(", "options", ".", "usersRoot", ",", "use...
Write out the JSON for the given user metadata @param {{?}} user The user to write JSON for @param {{?}} options The map of server options @returns {?} A new JSON object for the user
[ "Write", "out", "the", "JSON", "for", "the", "given", "user", "metadata" ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/modules/orionode/lib/user.js#L71-L85
14,214
eclipse/orion.client
modules/orionode/lib/user.js
oauth
function oauth(id, username, email, req, done) { if (req.params["0"] === "/link") { return done(null, { __linkUser: true, email: email, username: username, id: id }); } fileUtil.getMetastoreSafe(req).then(function(store) { store.getUserByOAuth(id, function(err, user) { if (err) { return done...
javascript
function oauth(id, username, email, req, done) { if (req.params["0"] === "/link") { return done(null, { __linkUser: true, email: email, username: username, id: id }); } fileUtil.getMetastoreSafe(req).then(function(store) { store.getUserByOAuth(id, function(err, user) { if (err) { return done...
[ "function", "oauth", "(", "id", ",", "username", ",", "email", ",", "req", ",", "done", ")", "{", "if", "(", "req", ".", "params", "[", "\"0\"", "]", "===", "\"/link\"", ")", "{", "return", "done", "(", "null", ",", "{", "__linkUser", ":", "true", ...
Do OAuth authentication @param {string} id @param {string} username @param {string} email @param {XMLHttpRequest} req @param {fn(Error, {?})} done
[ "Do", "OAuth", "authentication" ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/modules/orionode/lib/user.js#L183-L210
14,215
eclipse/orion.client
modules/orionode/lib/user.js
configureGithubOAuth
function configureGithubOAuth(app, options) { if (options.configParams.get("orion.oauth.github.client")) { const GithubStrategy = require('passport-github2').Strategy; passport.use(new GithubStrategy({ clientID: options.configParams.get("orion.oauth.github.client"), clientSecret: options.configParams.get("or...
javascript
function configureGithubOAuth(app, options) { if (options.configParams.get("orion.oauth.github.client")) { const GithubStrategy = require('passport-github2').Strategy; passport.use(new GithubStrategy({ clientID: options.configParams.get("orion.oauth.github.client"), clientSecret: options.configParams.get("or...
[ "function", "configureGithubOAuth", "(", "app", ",", "options", ")", "{", "if", "(", "options", ".", "configParams", ".", "get", "(", "\"orion.oauth.github.client\"", ")", ")", "{", "const", "GithubStrategy", "=", "require", "(", "'passport-github2'", ")", ".", ...
Optionally configures GitHub OAuth. Checks for the server property 'orion.oauth.github.client', and if found optionally sets up the support. @param {express.Router} app The backing app @param {{?}} options The map of server options @see https://wiki.eclipse.org/Orion/Server_admin_guide#Setting_up_GitHub_OAuth_authentic...
[ "Optionally", "configures", "GitHub", "OAuth", ".", "Checks", "for", "the", "server", "property", "orion", ".", "oauth", ".", "github", ".", "client", "and", "if", "found", "optionally", "sets", "up", "the", "support", "." ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/modules/orionode/lib/user.js#L320-L341
14,216
eclipse/orion.client
modules/orionode/lib/user.js
checkUserAccess
function checkUserAccess(req, res, next) { const isadmin = isAdmin(options, req.user.username); if (!req.user || !(req.params.id === req.user.username || isadmin)) { return api.writeResponse(403, res); } const contextPath = options.configParams.get("orion.context.path") || "", listenContextPath = options....
javascript
function checkUserAccess(req, res, next) { const isadmin = isAdmin(options, req.user.username); if (!req.user || !(req.params.id === req.user.username || isadmin)) { return api.writeResponse(403, res); } const contextPath = options.configParams.get("orion.context.path") || "", listenContextPath = options....
[ "function", "checkUserAccess", "(", "req", ",", "res", ",", "next", ")", "{", "const", "isadmin", "=", "isAdmin", "(", "options", ",", "req", ".", "user", ".", "username", ")", ";", "if", "(", "!", "req", ".", "user", "||", "!", "(", "req", ".", ...
Checks is the logged in user has access to the requested resource @param {XMLHttpRequest} req The backing request @param {XMLHttpResponse} res The response object @param {fn} next The next function to skip ahead
[ "Checks", "is", "the", "logged", "in", "user", "has", "access", "to", "the", "requested", "resource" ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/modules/orionode/lib/user.js#L382-L394
14,217
eclipse/orion.client
bundles/org.eclipse.orion.client.ui/web/gcli/gcli/types.js
function() { var combined = Status.VALID; for (var i = 0; i < arguments.length; i++) { var status = arguments[i]; if (Array.isArray(status)) { status = Status.combine.apply(null, status); } if (status > combined) { combined = status; } } return combined; }
javascript
function() { var combined = Status.VALID; for (var i = 0; i < arguments.length; i++) { var status = arguments[i]; if (Array.isArray(status)) { status = Status.combine.apply(null, status); } if (status > combined) { combined = status; } } return combined; }
[ "function", "(", ")", "{", "var", "combined", "=", "Status", ".", "VALID", ";", "for", "(", "var", "i", "=", "0", ";", "i", "<", "arguments", ".", "length", ";", "i", "++", ")", "{", "var", "status", "=", "arguments", "[", "i", "]", ";", "if", ...
A combined status is the worser of the provided statuses. The statuses can be provided either as a set of arguments or a single array
[ "A", "combined", "status", "is", "the", "worser", "of", "the", "provided", "statuses", ".", "The", "statuses", "can", "be", "provided", "either", "as", "a", "set", "of", "arguments", "or", "a", "single", "array" ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.ui/web/gcli/gcli/types.js#L68-L80
14,218
eclipse/orion.client
bundles/org.eclipse.orion.client.javascript/web/eslint/lib/code-path-analysis/code-path.js
function(options, callback) { if (typeof options === "function") { callback = options; options = null; } options = options || {}; var startSegment = options.first || this.internal.initialSegment; var lastSegment = options.last; var item = null; var index = 0; var end = 0; var segmen...
javascript
function(options, callback) { if (typeof options === "function") { callback = options; options = null; } options = options || {}; var startSegment = options.first || this.internal.initialSegment; var lastSegment = options.last; var item = null; var index = 0; var end = 0; var segmen...
[ "function", "(", "options", ",", "callback", ")", "{", "if", "(", "typeof", "options", "===", "\"function\"", ")", "{", "callback", "=", "options", ";", "options", "=", "null", ";", "}", "options", "=", "options", "||", "{", "}", ";", "var", "startSegm...
Traverses all segments in this code path. codePath.traverseSegments(function(segment, controller) { // do something. }); This method enumerates segments in order from the head. The `controller` object has two methods. - `controller.skip()` - Skip the following segments in this branch. - `controller.break()` - Skip ...
[ "Traverses", "all", "segments", "in", "this", "code", "path", "." ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.javascript/web/eslint/lib/code-path-analysis/code-path.js#L125-L220
14,219
eclipse/orion.client
bundles/org.eclipse.orion.client.ui/web/orion/selection.js
function(onDone) { var result = Array.isArray(this._selections) ? this._selections.slice() : []; if (typeof onDone === "function") { //$NON-NLS-0$ onDone(result); } return result; }
javascript
function(onDone) { var result = Array.isArray(this._selections) ? this._selections.slice() : []; if (typeof onDone === "function") { //$NON-NLS-0$ onDone(result); } return result; }
[ "function", "(", "onDone", ")", "{", "var", "result", "=", "Array", ".", "isArray", "(", "this", ".", "_selections", ")", "?", "this", ".", "_selections", ".", "slice", "(", ")", ":", "[", "]", ";", "if", "(", "typeof", "onDone", "===", "\"function\"...
Obtains all current selections and passes them to the provided function. @param {Function} onDone The function to invoke with the selections. Deprecated: just use the return value instead. @returns {Array}
[ "Obtains", "all", "current", "selections", "and", "passes", "them", "to", "the", "provided", "function", "." ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.ui/web/orion/selection.js#L54-L60
14,220
eclipse/orion.client
bundles/org.eclipse.orion.client.webtools/web/htmlparser2/parser.js
inherits
function inherits(ctor, sctor) { ctor.prototype = Object.create(sctor.prototype); ctor._super = sctor; }
javascript
function inherits(ctor, sctor) { ctor.prototype = Object.create(sctor.prototype); ctor._super = sctor; }
[ "function", "inherits", "(", "ctor", ",", "sctor", ")", "{", "ctor", ".", "prototype", "=", "Object", ".", "create", "(", "sctor", ".", "prototype", ")", ";", "ctor", ".", "_super", "=", "sctor", ";", "}" ]
ORION shim for node.js util.inherits
[ "ORION", "shim", "for", "node", ".", "js", "util", ".", "inherits" ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.webtools/web/htmlparser2/parser.js#L175-L178
14,221
eclipse/orion.client
bundles/org.eclipse.orion.client.editor/web/orion/editor/eventTarget.js
function(type, listener, useCapture) { if (!this._eventTypes) { this._eventTypes = {}; } var state = this._eventTypes[type]; if (!state) { state = this._eventTypes[type] = {level: 0, listeners: []}; } var listeners = state.listeners; listeners.push({listener: listener, useCapture: useCapture}); ...
javascript
function(type, listener, useCapture) { if (!this._eventTypes) { this._eventTypes = {}; } var state = this._eventTypes[type]; if (!state) { state = this._eventTypes[type] = {level: 0, listeners: []}; } var listeners = state.listeners; listeners.push({listener: listener, useCapture: useCapture}); ...
[ "function", "(", "type", ",", "listener", ",", "useCapture", ")", "{", "if", "(", "!", "this", ".", "_eventTypes", ")", "{", "this", ".", "_eventTypes", "=", "{", "}", ";", "}", "var", "state", "=", "this", ".", "_eventTypes", "[", "type", "]", ";"...
Adds an event listener to this event target. @param {String} type The event type. @param {Function|EventListener} listener The function or the EventListener that will be executed when the event happens. @param {Boolean} [useCapture=false] <code>true</code> if the listener should be trigged in the capture phase. @see ...
[ "Adds", "an", "event", "listener", "to", "this", "event", "target", "." ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.editor/web/orion/editor/eventTarget.js#L46-L54
14,222
eclipse/orion.client
bundles/org.eclipse.orion.client.ui/web/orion/webui/dropdown.js
function(mouseEvent /* optional */) { var actionTaken = false; if (!this.isVisible()) { this.dispatchEvent({type: "triggered", dropdown: this, event: mouseEvent}); //$NON-NLS-0$ if (this._populate) { this.empty(); this._populate(this._dropdownNode); } var items = this.getItems(); if ...
javascript
function(mouseEvent /* optional */) { var actionTaken = false; if (!this.isVisible()) { this.dispatchEvent({type: "triggered", dropdown: this, event: mouseEvent}); //$NON-NLS-0$ if (this._populate) { this.empty(); this._populate(this._dropdownNode); } var items = this.getItems(); if ...
[ "function", "(", "mouseEvent", "/* optional */", ")", "{", "var", "actionTaken", "=", "false", ";", "if", "(", "!", "this", ".", "isVisible", "(", ")", ")", "{", "this", ".", "dispatchEvent", "(", "{", "type", ":", "\"triggered\"", ",", "dropdown", ":", ...
Open the dropdown.
[ "Open", "the", "dropdown", "." ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.ui/web/orion/webui/dropdown.js#L198-L253
14,223
eclipse/orion.client
bundles/org.eclipse.orion.client.ui/web/orion/webui/dropdown.js
function(mouseEvent) {//Sub classes can override this to position the drop down differently. this._dropdownNode.style.left = ""; this._dropdownNode.style.top = ""; if(this._positioningNode) { this._dropdownNode.style.left = this._positioningNode.offsetLeft + "px"; return; } var bounds = l...
javascript
function(mouseEvent) {//Sub classes can override this to position the drop down differently. this._dropdownNode.style.left = ""; this._dropdownNode.style.top = ""; if(this._positioningNode) { this._dropdownNode.style.left = this._positioningNode.offsetLeft + "px"; return; } var bounds = l...
[ "function", "(", "mouseEvent", ")", "{", "//Sub classes can override this to position the drop down differently.", "this", ".", "_dropdownNode", ".", "style", ".", "left", "=", "\"\"", ";", "this", ".", "_dropdownNode", ".", "style", ".", "top", "=", "\"\"", ";", ...
This method positions the dropdown menu. The specified mouseEvent is ignored. However, subclasses can override this method if they wish to take the mouse position contained in the mouse event into account. @param {MouseEvent} mouseEvent
[ "This", "method", "positions", "the", "dropdown", "menu", ".", "The", "specified", "mouseEvent", "is", "ignored", ".", "However", "subclasses", "can", "override", "this", "method", "if", "they", "wish", "to", "take", "the", "mouse", "position", "contained", "i...
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.ui/web/orion/webui/dropdown.js#L282-L308
14,224
eclipse/orion.client
bundles/org.eclipse.orion.client.ui/web/orion/webui/dropdown.js
function(restoreFocus) { var actionTaken = false; if (this.isVisible()) { this._triggerNode.classList.remove("dropdownTriggerOpen"); //$NON-NLS-0$ this._triggerNode.setAttribute("aria-expanded", "false"); //$NON-NLS-1$ //$NON-NLS-0$ if (this._selectionClass) { this._triggerNode.classList.remove(t...
javascript
function(restoreFocus) { var actionTaken = false; if (this.isVisible()) { this._triggerNode.classList.remove("dropdownTriggerOpen"); //$NON-NLS-0$ this._triggerNode.setAttribute("aria-expanded", "false"); //$NON-NLS-1$ //$NON-NLS-0$ if (this._selectionClass) { this._triggerNode.classList.remove(t...
[ "function", "(", "restoreFocus", ")", "{", "var", "actionTaken", "=", "false", ";", "if", "(", "this", ".", "isVisible", "(", ")", ")", "{", "this", ".", "_triggerNode", ".", "classList", ".", "remove", "(", "\"dropdownTriggerOpen\"", ")", ";", "//$NON-NLS...
Close the dropdown.
[ "Close", "the", "dropdown", "." ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.ui/web/orion/webui/dropdown.js#L325-L353
14,225
eclipse/orion.client
bundles/org.eclipse.orion.client.ui/web/orion/webui/dropdown.js
function(item, direction, select) { while (item.parentNode && (document !== item.parentNode) && item.parentNode.getAttribute("role") !== "menubar") { item = item.parentNode; } if (!item.parentNode || document === item.parentNode) { return; // item is not in a menubar } var trigger = item.childNo...
javascript
function(item, direction, select) { while (item.parentNode && (document !== item.parentNode) && item.parentNode.getAttribute("role") !== "menubar") { item = item.parentNode; } if (!item.parentNode || document === item.parentNode) { return; // item is not in a menubar } var trigger = item.childNo...
[ "function", "(", "item", ",", "direction", ",", "select", ")", "{", "while", "(", "item", ".", "parentNode", "&&", "(", "document", "!==", "item", ".", "parentNode", ")", "&&", "item", ".", "parentNode", ".", "getAttribute", "(", "\"role\"", ")", "!==", ...
Closes the menubar menu containing the specified item and opens the menu next to it in the specified direction. @param {Object} item An item within a menu @param {Integer} direction Either KEY.RIGHT or KEY.LEFT typed by user @param {Boolean} select If true, select the first item
[ "Closes", "the", "menubar", "menu", "containing", "the", "specified", "item", "and", "opens", "the", "menu", "next", "to", "it", "in", "the", "specified", "direction", "." ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.ui/web/orion/webui/dropdown.js#L504-L534
14,226
eclipse/orion.client
bundles/org.eclipse.orion.client.ui/web/orion/webui/dropdown.js
function(item) { var itemToSelect = item || this.getItems()[0]; if (itemToSelect) { if (this._selectedItem) { this._selectedItem.classList.remove("dropdownMenuItemSelected"); //$NON-NLS-0$ } this._selectedItem = itemToSelect; this._selectedItem.classList.add("dropdownMenuItemSelected")...
javascript
function(item) { var itemToSelect = item || this.getItems()[0]; if (itemToSelect) { if (this._selectedItem) { this._selectedItem.classList.remove("dropdownMenuItemSelected"); //$NON-NLS-0$ } this._selectedItem = itemToSelect; this._selectedItem.classList.add("dropdownMenuItemSelected")...
[ "function", "(", "item", ")", "{", "var", "itemToSelect", "=", "item", "||", "this", ".", "getItems", "(", ")", "[", "0", "]", ";", "if", "(", "itemToSelect", ")", "{", "if", "(", "this", ".", "_selectedItem", ")", "{", "this", ".", "_selectedItem", ...
Selects the specified dropdown menu item or the first dropdown menu item if none is specified. @param {Object} item The dropdown menu item that should be selected. See @ref getItems() for details. Optional.
[ "Selects", "the", "specified", "dropdown", "menu", "item", "or", "the", "first", "dropdown", "menu", "item", "if", "none", "is", "specified", "." ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.ui/web/orion/webui/dropdown.js#L541-L568
14,227
eclipse/orion.client
bundles/org.eclipse.orion.client.ui/web/orion/webui/dropdown.js
function(text, innerNodeType) { var li = createMenuItem(text, innerNodeType); this._dropdownNode.appendChild(li); return li; }
javascript
function(text, innerNodeType) { var li = createMenuItem(text, innerNodeType); this._dropdownNode.appendChild(li); return li; }
[ "function", "(", "text", ",", "innerNodeType", ")", "{", "var", "li", "=", "createMenuItem", "(", "text", ",", "innerNodeType", ")", ";", "this", ".", "_dropdownNode", ".", "appendChild", "(", "li", ")", ";", "return", "li", ";", "}" ]
Creates a new menu item and appends it to the bottom of this dropdown. @param {String} text The text to display inside the new menu item. Optional. @param {String} innerNodeType The type of the inner node to create. The default is "span". Optional. @returns {Object} The top-most new element that was created
[ "Creates", "a", "new", "menu", "item", "and", "appends", "it", "to", "the", "bottom", "of", "this", "dropdown", "." ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.ui/web/orion/webui/dropdown.js#L605-L609
14,228
eclipse/orion.client
bundles/org.eclipse.orion.client.ui/web/orion/webui/dropdown.js
createMenuItem
function createMenuItem(text, innerNodeType) { innerNodeType = innerNodeType === undefined ? "span" : innerNodeType; //$NON-NLS-0$ var element = document.createElement(innerNodeType); //$NON-NLS-0$ element.className = "dropdownMenuItem"; //$NON-NLS-0$ element.setAttribute("role", "menuitem"); //$NON-NLS-0...
javascript
function createMenuItem(text, innerNodeType) { innerNodeType = innerNodeType === undefined ? "span" : innerNodeType; //$NON-NLS-0$ var element = document.createElement(innerNodeType); //$NON-NLS-0$ element.className = "dropdownMenuItem"; //$NON-NLS-0$ element.setAttribute("role", "menuitem"); //$NON-NLS-0...
[ "function", "createMenuItem", "(", "text", ",", "innerNodeType", ")", "{", "innerNodeType", "=", "innerNodeType", "===", "undefined", "?", "\"span\"", ":", "innerNodeType", ";", "//$NON-NLS-0$", "var", "element", "=", "document", ".", "createElement", "(", "innerN...
Creates a new menu item and returns it to the caller. @param {String} text The text to display inside the new menu item. Optional. @param {String} innerNodeType The type of the inner node to create. The default is "span". Optional. @returns {Object} The top-most new element that was created
[ "Creates", "a", "new", "menu", "item", "and", "returns", "it", "to", "the", "caller", "." ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.ui/web/orion/webui/dropdown.js#L628-L649
14,229
eclipse/orion.client
bundles/org.eclipse.orion.client.ui/web/orion/webui/dropdown.js
appendKeyBindingString
function appendKeyBindingString(element, keyBindingString) { var span = document.createElement("span"); //$NON-NLS-0$ span.classList.add("dropdownKeyBinding"); //$NON-NLS-0$ span.appendChild(document.createTextNode(keyBindingString)); element.appendChild(span); }
javascript
function appendKeyBindingString(element, keyBindingString) { var span = document.createElement("span"); //$NON-NLS-0$ span.classList.add("dropdownKeyBinding"); //$NON-NLS-0$ span.appendChild(document.createTextNode(keyBindingString)); element.appendChild(span); }
[ "function", "appendKeyBindingString", "(", "element", ",", "keyBindingString", ")", "{", "var", "span", "=", "document", ".", "createElement", "(", "\"span\"", ")", ";", "//$NON-NLS-0$", "span", ".", "classList", ".", "add", "(", "\"dropdownKeyBinding\"", ")", "...
Appends the specified keyBindingString to the specified menu item. @param {Object} element The menu item to append the keybinding string to. Required. @param {String} keyBindingString The keybinding string to append. Required.
[ "Appends", "the", "specified", "keyBindingString", "to", "the", "specified", "menu", "item", "." ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.ui/web/orion/webui/dropdown.js#L666-L671
14,230
eclipse/orion.client
bundles/org.eclipse.orion.client.ui/web/orion/webui/dropdown.js
addScrollButtons
function addScrollButtons() { var dropdown = this; if(!this._topScrollButton && !this._bottomScrollButton) { // if scroll buttons haven't been made yet this._topScrollButton = document.createElement("button"); this._bottomScrollButton = document.createElement("button"); this._topScrollButton.classList.add...
javascript
function addScrollButtons() { var dropdown = this; if(!this._topScrollButton && !this._bottomScrollButton) { // if scroll buttons haven't been made yet this._topScrollButton = document.createElement("button"); this._bottomScrollButton = document.createElement("button"); this._topScrollButton.classList.add...
[ "function", "addScrollButtons", "(", ")", "{", "var", "dropdown", "=", "this", ";", "if", "(", "!", "this", ".", "_topScrollButton", "&&", "!", "this", ".", "_bottomScrollButton", ")", "{", "// if scroll buttons haven't been made yet", "this", ".", "_topScrollButt...
Adds scrolling feature to a list
[ "Adds", "scrolling", "feature", "to", "a", "list" ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.ui/web/orion/webui/dropdown.js#L676-L728
14,231
eclipse/orion.client
bundles/org.eclipse.orion.client.ui/web/orion/webui/dropdown.js
updateScrollButtonVisibility
function updateScrollButtonVisibility(hideAll) { if (hideAll && this._topScrollButton && this._bottomScrollButton) { this._topScrollButton.style.display = "none"; this._bottomScrollButton.style.display = "none"; } else if (!hideAll) { if (this._dropdownNode.scrollTop > 0) { this._topScrollButton.sty...
javascript
function updateScrollButtonVisibility(hideAll) { if (hideAll && this._topScrollButton && this._bottomScrollButton) { this._topScrollButton.style.display = "none"; this._bottomScrollButton.style.display = "none"; } else if (!hideAll) { if (this._dropdownNode.scrollTop > 0) { this._topScrollButton.sty...
[ "function", "updateScrollButtonVisibility", "(", "hideAll", ")", "{", "if", "(", "hideAll", "&&", "this", ".", "_topScrollButton", "&&", "this", ".", "_bottomScrollButton", ")", "{", "this", ".", "_topScrollButton", ".", "style", ".", "display", "=", "\"none\"",...
Hides or shows the scroll buttons @param {Boolean} hideAll True if hiding both buttons. Required.
[ "Hides", "or", "shows", "the", "scroll", "buttons" ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.ui/web/orion/webui/dropdown.js#L734-L753
14,232
eclipse/orion.client
bundles/org.eclipse.orion.client.ui/web/orion/webui/dropdown.js
positionScrollButtons
function positionScrollButtons() { this._topScrollButton.style.width = this._dropdownNode.clientWidth + 1 + "px"; this._bottomScrollButton.style.width = this._dropdownNode.clientWidth + 1 + "px"; this._topScrollButton.style.top = this._dropdownNode.style.top; this._topScrollButton.style.left = this._topScrollBu...
javascript
function positionScrollButtons() { this._topScrollButton.style.width = this._dropdownNode.clientWidth + 1 + "px"; this._bottomScrollButton.style.width = this._dropdownNode.clientWidth + 1 + "px"; this._topScrollButton.style.top = this._dropdownNode.style.top; this._topScrollButton.style.left = this._topScrollBu...
[ "function", "positionScrollButtons", "(", ")", "{", "this", ".", "_topScrollButton", ".", "style", ".", "width", "=", "this", ".", "_dropdownNode", ".", "clientWidth", "+", "1", "+", "\"px\"", ";", "this", ".", "_bottomScrollButton", ".", "style", ".", "widt...
Positions the top and bottom scroll buttons according to where the dropdown list is positioned
[ "Positions", "the", "top", "and", "bottom", "scroll", "buttons", "according", "to", "where", "the", "dropdown", "list", "is", "positioned" ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.ui/web/orion/webui/dropdown.js#L758-L765
14,233
eclipse/orion.client
bundles/org.eclipse.orion.client.core/web/orion/bidiFormat.js
function (text, type, args, isRtl, locale) { return getHandler(type).format(text, args, isRtl, true, locale); }
javascript
function (text, type, args, isRtl, locale) { return getHandler(type).format(text, args, isRtl, true, locale); }
[ "function", "(", "text", ",", "type", ",", "args", ",", "isRtl", ",", "locale", ")", "{", "return", "getHandler", "(", "type", ")", ".", "format", "(", "text", ",", "args", ",", "isRtl", ",", "true", ",", "locale", ")", ";", "}" ]
Returns the HTML representation of a given structured text @param text - the structured text @param type - could be one of filepath, url, email @param args - pass additional arguments to the handler. generally null. @param isRtl - indicates if the GUI is mirrored @param locale - the browser locale
[ "Returns", "the", "HTML", "representation", "of", "a", "given", "structured", "text" ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.core/web/orion/bidiFormat.js#L1319-L1321
14,234
eclipse/orion.client
bundles/org.eclipse.orion.client.core/web/orion/bidiFormat.js
function (element, type, args, isRtl, locale) { return attachElement(element, type, args, isRtl, locale); }
javascript
function (element, type, args, isRtl, locale) { return attachElement(element, type, args, isRtl, locale); }
[ "function", "(", "element", ",", "type", ",", "args", ",", "isRtl", ",", "locale", ")", "{", "return", "attachElement", "(", "element", ",", "type", ",", "args", ",", "isRtl", ",", "locale", ")", ";", "}" ]
Handle Structured text correct display for a given HTML element. @param element - the element : should be of type div contenteditable=true @param type - could be one of filepath, url, email @param args - pass additional arguments to the handler. generally null. @param isRtl - indicates if the GUI is mirrored @param lo...
[ "Handle", "Structured", "text", "correct", "display", "for", "a", "given", "HTML", "element", "." ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.core/web/orion/bidiFormat.js#L1330-L1332
14,235
eclipse/orion.client
bundles/org.eclipse.orion.client.javascript/web/eslint/lib/config/config-ops.js
function(env) { var envConfig = this.createEmptyConfig(); if (env) { envConfig.env = env; Object.keys(env).filter(function(name) { return env[name]; }).forEach(function(name) { var environment = Environments.name; if (environment) { if (environment.globals) { assign(en...
javascript
function(env) { var envConfig = this.createEmptyConfig(); if (env) { envConfig.env = env; Object.keys(env).filter(function(name) { return env[name]; }).forEach(function(name) { var environment = Environments.name; if (environment) { if (environment.globals) { assign(en...
[ "function", "(", "env", ")", "{", "var", "envConfig", "=", "this", ".", "createEmptyConfig", "(", ")", ";", "if", "(", "env", ")", "{", "envConfig", ".", "env", "=", "env", ";", "Object", ".", "keys", "(", "env", ")", ".", "filter", "(", "function"...
Creates an environment config based on the specified environments. @param {Object<string,boolean>} env The environment settings. @returns {Object} A configuration object with the appropriate rules and globals set.
[ "Creates", "an", "environment", "config", "based", "on", "the", "specified", "environments", "." ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.javascript/web/eslint/lib/config/config-ops.js#L51-L77
14,236
eclipse/orion.client
bundles/org.eclipse.orion.client.javascript/web/eslint/lib/config/config-ops.js
function(config) { if (config.env && typeof config.env === "object") { return this.merge(this.createEnvironmentConfig(config.env), config); } return config; }
javascript
function(config) { if (config.env && typeof config.env === "object") { return this.merge(this.createEnvironmentConfig(config.env), config); } return config; }
[ "function", "(", "config", ")", "{", "if", "(", "config", ".", "env", "&&", "typeof", "config", ".", "env", "===", "\"object\"", ")", "{", "return", "this", ".", "merge", "(", "this", ".", "createEnvironmentConfig", "(", "config", ".", "env", ")", ",",...
Given a config with environment settings, applies the globals and ecmaFeatures to the configuration and returns the result. @param {Object} config The configuration information. @returns {Object} The updated configuration information.
[ "Given", "a", "config", "with", "environment", "settings", "applies", "the", "globals", "and", "ecmaFeatures", "to", "the", "configuration", "and", "returns", "the", "result", "." ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.javascript/web/eslint/lib/config/config-ops.js#L85-L91
14,237
eclipse/orion.client
bundles/org.eclipse.orion.client.javascript/web/eslint/lib/config/config-ops.js
function(ruleConfig) { var severity = Array.isArray(ruleConfig) ? ruleConfig[0] : ruleConfig; if (typeof severity === "string") { severity = RULE_SEVERITY[severity.toLowerCase()] || 0; } return typeof severity === "number" && severity === 2; }
javascript
function(ruleConfig) { var severity = Array.isArray(ruleConfig) ? ruleConfig[0] : ruleConfig; if (typeof severity === "string") { severity = RULE_SEVERITY[severity.toLowerCase()] || 0; } return typeof severity === "number" && severity === 2; }
[ "function", "(", "ruleConfig", ")", "{", "var", "severity", "=", "Array", ".", "isArray", "(", "ruleConfig", ")", "?", "ruleConfig", "[", "0", "]", ":", "ruleConfig", ";", "if", "(", "typeof", "severity", "===", "\"string\"", ")", "{", "severity", "=", ...
Determines if the severity for the given rule configuration represents an error. @param {int|string|Array} ruleConfig The configuration for an individual rule. @returns {boolean} True if the rule represents an error, false if not.
[ "Determines", "if", "the", "severity", "for", "the", "given", "rule", "configuration", "represents", "an", "error", "." ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.javascript/web/eslint/lib/config/config-ops.js#L238-L247
14,238
eclipse/orion.client
bundles/org.eclipse.orion.client.javascript/web/eslint/lib/config/config-ops.js
function(ruleConfig) { var severity = Array.isArray(ruleConfig) ? ruleConfig[0] : ruleConfig; if (typeof severity === "string") { severity = severity.toLowerCase(); } return VALID_SEVERITIES.indexOf(severity) !== -1; }
javascript
function(ruleConfig) { var severity = Array.isArray(ruleConfig) ? ruleConfig[0] : ruleConfig; if (typeof severity === "string") { severity = severity.toLowerCase(); } return VALID_SEVERITIES.indexOf(severity) !== -1; }
[ "function", "(", "ruleConfig", ")", "{", "var", "severity", "=", "Array", ".", "isArray", "(", "ruleConfig", ")", "?", "ruleConfig", "[", "0", "]", ":", "ruleConfig", ";", "if", "(", "typeof", "severity", "===", "\"string\"", ")", "{", "severity", "=", ...
Checks whether a given config has valid severity or not. @param {number|string|Array} ruleConfig - The configuration for an individual rule. @returns {boolean} `true` if the configuration has valid severity.
[ "Checks", "whether", "a", "given", "config", "has", "valid", "severity", "or", "not", "." ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.javascript/web/eslint/lib/config/config-ops.js#L254-L261
14,239
eclipse/orion.client
bundles/org.eclipse.orion.client.ui/web/shell/paramType-file.js
function(promise, result, output, isProgress) { var element = document.createElement("div"); //$NON-NLS-0$ var waitCount = 0; var successFn = function(file) { this.callback = function() { var string = i18nUtil.formatMessage( messages["WroteMsg"], typeof(file) === "string" ? file : ...
javascript
function(promise, result, output, isProgress) { var element = document.createElement("div"); //$NON-NLS-0$ var waitCount = 0; var successFn = function(file) { this.callback = function() { var string = i18nUtil.formatMessage( messages["WroteMsg"], typeof(file) === "string" ? file : ...
[ "function", "(", "promise", ",", "result", ",", "output", ",", "isProgress", ")", "{", "var", "element", "=", "document", ".", "createElement", "(", "\"div\"", ")", ";", "//$NON-NLS-0$", "var", "waitCount", "=", "0", ";", "var", "successFn", "=", "function...
This function handles results of this custom type returned from commands.
[ "This", "function", "handles", "results", "of", "this", "custom", "type", "returned", "from", "commands", "." ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.ui/web/shell/paramType-file.js#L232-L333
14,240
eclipse/orion.client
bundles/org.eclipse.orion.client.ui/web/orion/compare/diffParser.js
function(hunkRangeNo ){ var lastToken = " "; //$NON-NLS-0$ var startNo = this._hunkRanges[hunkRangeNo][0] + 1; var endNo = (hunkRangeNo === (this._hunkRanges.length - 1) ) ? this._diffContents.length : this._hunkRanges[hunkRangeNo+1][0]; var oCursor = 0; var nCursor = 0; var oBlkStart = this._hunkRan...
javascript
function(hunkRangeNo ){ var lastToken = " "; //$NON-NLS-0$ var startNo = this._hunkRanges[hunkRangeNo][0] + 1; var endNo = (hunkRangeNo === (this._hunkRanges.length - 1) ) ? this._diffContents.length : this._hunkRanges[hunkRangeNo+1][0]; var oCursor = 0; var nCursor = 0; var oBlkStart = this._hunkRan...
[ "function", "(", "hunkRangeNo", ")", "{", "var", "lastToken", "=", "\" \"", ";", "//$NON-NLS-0$", "var", "startNo", "=", "this", ".", "_hunkRanges", "[", "hunkRangeNo", "]", "[", "0", "]", "+", "1", ";", "var", "endNo", "=", "(", "hunkRangeNo", "===", ...
read line by line in a hunk range
[ "read", "line", "by", "line", "in", "a", "hunk", "range" ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.ui/web/orion/compare/diffParser.js#L221-L307
14,241
eclipse/orion.client
bundles/org.eclipse.orion.client.ui/web/orion/compare/diffParser.js
function(body , retVal){ if( body ){ var number = parseInt(body, 10); retVal.push( number >= 0 ? number : 1); } else { retVal.push(1); } }
javascript
function(body , retVal){ if( body ){ var number = parseInt(body, 10); retVal.push( number >= 0 ? number : 1); } else { retVal.push(1); } }
[ "function", "(", "body", ",", "retVal", ")", "{", "if", "(", "body", ")", "{", "var", "number", "=", "parseInt", "(", "body", ",", "10", ")", ";", "retVal", ".", "push", "(", "number", ">=", "0", "?", "number", ":", "1", ")", ";", "}", "else", ...
In many versions of GNU diff, each range can omit the comma and trailing value s, in which case s defaults to 1.
[ "In", "many", "versions", "of", "GNU", "diff", "each", "range", "can", "omit", "the", "comma", "and", "trailing", "value", "s", "in", "which", "case", "s", "defaults", "to", "1", "." ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.ui/web/orion/compare/diffParser.js#L394-L401
14,242
eclipse/orion.client
modules/orionode/lib/graceful-cluster/graceful-cluster.js
checkRestartQueue
function checkRestartQueue() { // Kill one worker only if maximum count are working. if (restartQueue.length > 0 && listeningWorkersCount === workersCount && !currentRestartingPid) { var pid = restartQueue.shift(); try { // Store process id to ...
javascript
function checkRestartQueue() { // Kill one worker only if maximum count are working. if (restartQueue.length > 0 && listeningWorkersCount === workersCount && !currentRestartingPid) { var pid = restartQueue.shift(); try { // Store process id to ...
[ "function", "checkRestartQueue", "(", ")", "{", "// Kill one worker only if maximum count are working.", "if", "(", "restartQueue", ".", "length", ">", "0", "&&", "listeningWorkersCount", "===", "workersCount", "&&", "!", "currentRestartingPid", ")", "{", "var", "pid", ...
Prevent killing all workers at same time when restarting.
[ "Prevent", "killing", "all", "workers", "at", "same", "time", "when", "restarting", "." ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/modules/orionode/lib/graceful-cluster/graceful-cluster.js#L54-L78
14,243
eclipse/orion.client
modules/orionode/lib/graceful-cluster/graceful-cluster.js
fork
function fork() { cluster.fork().on('message', function(message) { if (message.cmd === 'restart' && message.pid && restartQueue.indexOf(message.pid) === -1) { // When worker asks to restart gracefully in cluster, then add it to restart queue. log('Clus...
javascript
function fork() { cluster.fork().on('message', function(message) { if (message.cmd === 'restart' && message.pid && restartQueue.indexOf(message.pid) === -1) { // When worker asks to restart gracefully in cluster, then add it to restart queue. log('Clus...
[ "function", "fork", "(", ")", "{", "cluster", ".", "fork", "(", ")", ".", "on", "(", "'message'", ",", "function", "(", "message", ")", "{", "if", "(", "message", ".", "cmd", "===", "'restart'", "&&", "message", ".", "pid", "&&", "restartQueue", ".",...
Create fork with 'on restart' message event listener.
[ "Create", "fork", "with", "on", "restart", "message", "event", "listener", "." ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/modules/orionode/lib/graceful-cluster/graceful-cluster.js#L81-L90
14,244
eclipse/orion.client
modules/orionode/lib/graceful-cluster/graceful-cluster.js
checkIfNoWorkersAndExit
function checkIfNoWorkersAndExit() { if (!currentWorkersCount) { log('Cluster graceful shutdown: done.'); if (shutdownTimer) clearTimeout(shutdownTimer); exitFunction(); } else { log('Cluster graceful shutdown: wait ' + currentWorke...
javascript
function checkIfNoWorkersAndExit() { if (!currentWorkersCount) { log('Cluster graceful shutdown: done.'); if (shutdownTimer) clearTimeout(shutdownTimer); exitFunction(); } else { log('Cluster graceful shutdown: wait ' + currentWorke...
[ "function", "checkIfNoWorkersAndExit", "(", ")", "{", "if", "(", "!", "currentWorkersCount", ")", "{", "log", "(", "'Cluster graceful shutdown: done.'", ")", ";", "if", "(", "shutdownTimer", ")", "clearTimeout", "(", "shutdownTimer", ")", ";", "exitFunction", "(",...
Check if has alive workers and exit.
[ "Check", "if", "has", "alive", "workers", "and", "exit", "." ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/modules/orionode/lib/graceful-cluster/graceful-cluster.js#L98-L106
14,245
eclipse/orion.client
bundles/org.eclipse.orion.client.webtools/web/csslint/csslint.js
function(){ /* * media_query_list * : S* [media_query [ ',' S* media_query ]* ]? * ; */ var tokenStream = this._tokenStream, mediaList = []; this._readWhitespace(); ...
javascript
function(){ /* * media_query_list * : S* [media_query [ ',' S* media_query ]* ]? * ; */ var tokenStream = this._tokenStream, mediaList = []; this._readWhitespace(); ...
[ "function", "(", ")", "{", "/*\n * media_query_list\n * : S* [media_query [ ',' S* media_query ]* ]?\n * ;\n */", "var", "tokenStream", "=", "this", ".", "_tokenStream", ",", "mediaList", "=", "[", "]", ";", "this"...
CSS3 Media Queries
[ "CSS3", "Media", "Queries" ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.webtools/web/csslint/csslint.js#L1408-L1427
14,246
eclipse/orion.client
bundles/org.eclipse.orion.client.webtools/web/csslint/csslint.js
function(){ /* * ruleset * : selectors_group * '{' S* declaration? [ ';' S* declaration? ]* '}' S* * ; */ var tokenStream = this._tokenStream, tt, selecto...
javascript
function(){ /* * ruleset * : selectors_group * '{' S* declaration? [ ';' S* declaration? ]* '}' S* * ; */ var tokenStream = this._tokenStream, tt, selecto...
[ "function", "(", ")", "{", "/*\n * ruleset\n * : selectors_group\n * '{' S* declaration? [ ';' S* declaration? ]* '}' S*\n * ;\n */", "var", "tokenStream", "=", "this", ".", "_tokenStream", ",", "tt", "...
Augmented with CSS3 Selectors
[ "Augmented", "with", "CSS3", "Selectors" ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.webtools/web/csslint/csslint.js#L1990-L2068
14,247
eclipse/orion.client
bundles/org.eclipse.orion.client.webtools/web/csslint/csslint.js
function(checkStart, readMargins){ /* * Reads the pattern * S* '{' S* declaration [ ';' S* declaration ]* '}' S* * or * S* '{' S* [ declaration | margin ]? [ ';' S* [ declaration | margin ]? ]* '}' S* * Note that this i...
javascript
function(checkStart, readMargins){ /* * Reads the pattern * S* '{' S* declaration [ ';' S* declaration ]* '}' S* * or * S* '{' S* [ declaration | margin ]? [ ';' S* [ declaration | margin ]? ]* '}' S* * Note that this i...
[ "function", "(", "checkStart", ",", "readMargins", ")", "{", "/*\n * Reads the pattern\n * S* '{' S* declaration [ ';' S* declaration ]* '}' S*\n * or\n * S* '{' S* [ declaration | margin ]? [ ';' S* [ declaration | margin ]? ]* '}' S*\n ...
Not part of CSS grammar, but this pattern occurs frequently in the official CSS grammar. Split out here to eliminate duplicate code. @param {Boolean} checkStart Indicates if the rule should check for the left brace at the beginning. @param {Boolean} readMargins Indicates if the rule should check for margin patterns. @r...
[ "Not", "part", "of", "CSS", "grammar", "but", "this", "pattern", "occurs", "frequently", "in", "the", "official", "CSS", "grammar", ".", "Split", "out", "here", "to", "eliminate", "duplicate", "code", "." ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.webtools/web/csslint/csslint.js#L3244-L3321
14,248
eclipse/orion.client
bundles/org.eclipse.orion.client.webtools/web/csslint/csslint.js
function(){ var tokenStream = this._tokenStream, ws = ""; while(tokenStream.match(Tokens.S)){ ws += tokenStream.token().value; } return ws; }
javascript
function(){ var tokenStream = this._tokenStream, ws = ""; while(tokenStream.match(Tokens.S)){ ws += tokenStream.token().value; } return ws; }
[ "function", "(", ")", "{", "var", "tokenStream", "=", "this", ".", "_tokenStream", ",", "ws", "=", "\"\"", ";", "while", "(", "tokenStream", ".", "match", "(", "Tokens", ".", "S", ")", ")", "{", "ws", "+=", "tokenStream", ".", "token", "(", ")", "....
In some cases, you can end up with two white space tokens in a row. Instead of making a change in every function that looks for white space, this function is used to match as much white space as necessary. @method _readWhitespace @return {String} The white space if found, empty string if not. @private
[ "In", "some", "cases", "you", "can", "end", "up", "with", "two", "white", "space", "tokens", "in", "a", "row", ".", "Instead", "of", "making", "a", "change", "in", "every", "function", "that", "looks", "for", "white", "space", "this", "function", "is", ...
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.webtools/web/csslint/csslint.js#L3332-L3342
14,249
eclipse/orion.client
bundles/org.eclipse.orion.client.webtools/web/csslint/csslint.js
function(token){ throw new SyntaxError("Unexpected token '" + token.value + "' at line " + token.startLine + ", col " + token.startCol + ".", token.startLine, token.startCol); }
javascript
function(token){ throw new SyntaxError("Unexpected token '" + token.value + "' at line " + token.startLine + ", col " + token.startCol + ".", token.startLine, token.startCol); }
[ "function", "(", "token", ")", "{", "throw", "new", "SyntaxError", "(", "\"Unexpected token '\"", "+", "token", ".", "value", "+", "\"' at line \"", "+", "token", ".", "startLine", "+", "\", col \"", "+", "token", ".", "startCol", "+", "\".\"", ",", "token",...
Throws an error when an unexpected token is found. @param {Object} token The token that was found. @method _unexpectedToken @return {void} @private
[ "Throws", "an", "error", "when", "an", "unexpected", "token", "is", "found", "." ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.webtools/web/csslint/csslint.js#L3352-L3354
14,250
eclipse/orion.client
bundles/org.eclipse.orion.client.webtools/web/csslint/csslint.js
SelectorSubPart
function SelectorSubPart(text, type, line, col) { SyntaxUnit.call(this, text, line, col, Parser.SELECTOR_SUB_PART_TYPE); /** * The type of modifier. * @type String * @property type */ this.type = type; /** * Some subparts have arguments, this represents them. * @type Arr...
javascript
function SelectorSubPart(text, type, line, col) { SyntaxUnit.call(this, text, line, col, Parser.SELECTOR_SUB_PART_TYPE); /** * The type of modifier. * @type String * @property type */ this.type = type; /** * Some subparts have arguments, this represents them. * @type Arr...
[ "function", "SelectorSubPart", "(", "text", ",", "type", ",", "line", ",", "col", ")", "{", "SyntaxUnit", ".", "call", "(", "this", ",", "text", ",", "line", ",", "col", ",", "Parser", ".", "SELECTOR_SUB_PART_TYPE", ")", ";", "/**\n * The type of modifie...
Represents a selector modifier string, meaning a class name, element name, element ID, pseudo rule, etc. @namespace parserlib.css @class SelectorSubPart @extends parserlib.util.SyntaxUnit @constructor @param {String} text The text representation of the unit. @param {String} type The type of selector modifier. @param {i...
[ "Represents", "a", "selector", "modifier", "string", "meaning", "a", "class", "name", "element", "name", "element", "ID", "pseudo", "rule", "etc", "." ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.webtools/web/csslint/csslint.js#L4599-L4617
14,251
eclipse/orion.client
bundles/org.eclipse.orion.client.webtools/web/csslint/csslint.js
function(other) { var comps = ["a", "b", "c", "d"], i, len; for (i=0, len=comps.length; i < len; i++) { if (this[comps[i]] < other[comps[i]]) { return -1; } else if (this[comps[i]] > other[comps[i]]) { return 1; } }...
javascript
function(other) { var comps = ["a", "b", "c", "d"], i, len; for (i=0, len=comps.length; i < len; i++) { if (this[comps[i]] < other[comps[i]]) { return -1; } else if (this[comps[i]] > other[comps[i]]) { return 1; } }...
[ "function", "(", "other", ")", "{", "var", "comps", "=", "[", "\"a\"", ",", "\"b\"", ",", "\"c\"", ",", "\"d\"", "]", ",", "i", ",", "len", ";", "for", "(", "i", "=", "0", ",", "len", "=", "comps", ".", "length", ";", "i", "<", "len", ";", ...
Compare this specificity to another. @param {Specificity} other The other specificity to compare to. @return {int} -1 if the other specificity is larger, 1 if smaller, 0 if equal. @method compare
[ "Compare", "this", "specificity", "to", "another", "." ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.webtools/web/csslint/csslint.js#L4657-L4670
14,252
eclipse/orion.client
bundles/org.eclipse.orion.client.webtools/web/csslint/csslint.js
function(c, startLine, startCol) { var reader = this._reader, comparison = c + reader.read(), tt = Tokens.type(comparison) || Tokens.CHAR; return this.createToken(tt, comparison, startLine, startCol); }
javascript
function(c, startLine, startCol) { var reader = this._reader, comparison = c + reader.read(), tt = Tokens.type(comparison) || Tokens.CHAR; return this.createToken(tt, comparison, startLine, startCol); }
[ "function", "(", "c", ",", "startLine", ",", "startCol", ")", "{", "var", "reader", "=", "this", ".", "_reader", ",", "comparison", "=", "c", "+", "reader", ".", "read", "(", ")", ",", "tt", "=", "Tokens", ".", "type", "(", "comparison", ")", "||",...
Produces a comparison token based on the given character and location in the stream. The next character must be read and is already known to be an equals sign. @param {String} c The character for the token. @param {int} startLine The beginning line for the character. @param {int} startCol The beginning column for the c...
[ "Produces", "a", "comparison", "token", "based", "on", "the", "given", "character", "and", "location", "in", "the", "stream", ".", "The", "next", "character", "must", "be", "read", "and", "is", "already", "known", "to", "be", "an", "equals", "sign", "." ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.webtools/web/csslint/csslint.js#L5209-L5215
14,253
eclipse/orion.client
bundles/org.eclipse.orion.client.webtools/web/csslint/csslint.js
function(first, startLine, startCol) { var reader = this._reader, value = this.readNumber(first), ident, tt = Tokens.NUMBER, c = reader.peek(); if (isIdentStart(c)) { ident = this.readName(reader.read()); value += ide...
javascript
function(first, startLine, startCol) { var reader = this._reader, value = this.readNumber(first), ident, tt = Tokens.NUMBER, c = reader.peek(); if (isIdentStart(c)) { ident = this.readName(reader.read()); value += ide...
[ "function", "(", "first", ",", "startLine", ",", "startCol", ")", "{", "var", "reader", "=", "this", ".", "_reader", ",", "value", "=", "this", ".", "readNumber", "(", "first", ")", ",", "ident", ",", "tt", "=", "Tokens", ".", "NUMBER", ",", "c", "...
Produces a number token based on the given character and location in the stream. This may return a token of NUMBER, EMS, EXS, LENGTH, ANGLE, TIME, FREQ, DIMENSION, or PERCENTAGE. @param {String} first The first character for the token. @param {int} startLine The beginning line for the character. @param {int} startCol T...
[ "Produces", "a", "number", "token", "based", "on", "the", "given", "character", "and", "location", "in", "the", "stream", ".", "This", "may", "return", "a", "token", "of", "NUMBER", "EMS", "EXS", "LENGTH", "ANGLE", "TIME", "FREQ", "DIMENSION", "or", "PERCE...
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.webtools/web/csslint/csslint.js#L5426-L5457
14,254
eclipse/orion.client
bundles/org.eclipse.orion.client.webtools/web/csslint/csslint.js
function(first, startLine, startCol) { var value = first + this.readWhitespace(); return this.createToken(Tokens.S, value, startLine, startCol); }
javascript
function(first, startLine, startCol) { var value = first + this.readWhitespace(); return this.createToken(Tokens.S, value, startLine, startCol); }
[ "function", "(", "first", ",", "startLine", ",", "startCol", ")", "{", "var", "value", "=", "first", "+", "this", ".", "readWhitespace", "(", ")", ";", "return", "this", ".", "createToken", "(", "Tokens", ".", "S", ",", "value", ",", "startLine", ",", ...
Produces a S token based on the specified information. Since whitespace may have multiple characters, this consumes all whitespace characters into a single token. @param {String} first The first character in the token. @param {int} startLine The beginning line for the character. @param {int} startCol The beginning colu...
[ "Produces", "a", "S", "token", "based", "on", "the", "specified", "information", ".", "Since", "whitespace", "may", "have", "multiple", "characters", "this", "consumes", "all", "whitespace", "characters", "into", "a", "single", "token", "." ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.webtools/web/csslint/csslint.js#L5579-L5582
14,255
eclipse/orion.client
bundles/org.eclipse.orion.client.webtools/web/csslint/csslint.js
function(first) { var reader = this._reader, url = first || "", c; for (c = reader.peek(); c; c = reader.peek()) { // Note that the grammar at // https://www.w3.org/TR/CSS2/grammar.html#scanner // incorrectly includes the backslash charac...
javascript
function(first) { var reader = this._reader, url = first || "", c; for (c = reader.peek(); c; c = reader.peek()) { // Note that the grammar at // https://www.w3.org/TR/CSS2/grammar.html#scanner // incorrectly includes the backslash charac...
[ "function", "(", "first", ")", "{", "var", "reader", "=", "this", ".", "_reader", ",", "url", "=", "first", "||", "\"\"", ",", "c", ";", "for", "(", "c", "=", "reader", ".", "peek", "(", ")", ";", "c", ";", "c", "=", "reader", ".", "peek", "(...
This method never fails, although it may return an empty string.
[ "This", "method", "never", "fails", "although", "it", "may", "return", "an", "empty", "string", "." ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.webtools/web/csslint/csslint.js#L5704-L5730
14,256
eclipse/orion.client
bundles/org.eclipse.orion.client.webtools/web/csslint/csslint.js
SyntaxError
function SyntaxError(message, line, col) { Error.call(this); this.name = this.constructor.name; /** * The column at which the error occurred. * @type int * @property col */ this.col = col; /** * The line at which the error occurred. * @type int * @property line ...
javascript
function SyntaxError(message, line, col) { Error.call(this); this.name = this.constructor.name; /** * The column at which the error occurred. * @type int * @property col */ this.col = col; /** * The line at which the error occurred. * @type int * @property line ...
[ "function", "SyntaxError", "(", "message", ",", "line", ",", "col", ")", "{", "Error", ".", "call", "(", "this", ")", ";", "this", ".", "name", "=", "this", ".", "constructor", ".", "name", ";", "/**\n * The column at which the error occurred.\n * @type ...
Type to use when a syntax error occurs. @class SyntaxError @namespace parserlib.util @constructor @param {String} message The error message. @param {int} line The line at which the error occurred. @param {int} col The column at which the error occurred.
[ "Type", "to", "use", "when", "a", "syntax", "error", "occurs", "." ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.webtools/web/csslint/csslint.js#L7038-L7063
14,257
eclipse/orion.client
bundles/org.eclipse.orion.client.webtools/web/csslint/csslint.js
function(index) { var total = index, tt; if (index > 0) { //TODO: Store 5 somewhere if (index > 5) { throw new Error("Too much lookahead."); } //get all those tokens while (total) { tt = this.get(); ...
javascript
function(index) { var total = index, tt; if (index > 0) { //TODO: Store 5 somewhere if (index > 5) { throw new Error("Too much lookahead."); } //get all those tokens while (total) { tt = this.get(); ...
[ "function", "(", "index", ")", "{", "var", "total", "=", "index", ",", "tt", ";", "if", "(", "index", ">", "0", ")", "{", "//TODO: Store 5 somewhere", "if", "(", "index", ">", "5", ")", "{", "throw", "new", "Error", "(", "\"Too much lookahead.\"", ")",...
Looks ahead a certain number of tokens and returns the token type at that position. This will throw an error if you lookahead past the end of input, past the size of the lookahead buffer, or back past the first token in the lookahead buffer. @param {int} The index of the token type to retrieve. 0 for the current token,...
[ "Looks", "ahead", "a", "certain", "number", "of", "tokens", "and", "returns", "the", "token", "type", "at", "that", "position", ".", "This", "will", "throw", "an", "error", "if", "you", "lookahead", "past", "the", "end", "of", "input", "past", "the", "si...
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.webtools/web/csslint/csslint.js#L7438-L7472
14,258
eclipse/orion.client
bundles/org.eclipse.orion.client.webtools/web/csslint/csslint.js
applyEmbeddedRuleset
function applyEmbeddedRuleset(text, ruleset) { var valueMap, embedded = text && text.match(embeddedRuleset), rules = embedded && embedded[1]; if (rules) { valueMap = { "true": 2, // true is error "": 1, // blank is warning ...
javascript
function applyEmbeddedRuleset(text, ruleset) { var valueMap, embedded = text && text.match(embeddedRuleset), rules = embedded && embedded[1]; if (rules) { valueMap = { "true": 2, // true is error "": 1, // blank is warning ...
[ "function", "applyEmbeddedRuleset", "(", "text", ",", "ruleset", ")", "{", "var", "valueMap", ",", "embedded", "=", "text", "&&", "text", ".", "match", "(", "embeddedRuleset", ")", ",", "rules", "=", "embedded", "&&", "embedded", "[", "1", "]", ";", "if"...
Returns a ruleset object based on embedded rules. @param {String} text A string of css containing embedded rules. @param {Object} ruleset A ruleset object to modify. @return {Object} A ruleset object. @method getEmbeddedRuleset
[ "Returns", "a", "ruleset", "object", "based", "on", "embedded", "rules", "." ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.webtools/web/csslint/csslint.js#L7913-L7940
14,259
eclipse/orion.client
bundles/org.eclipse.orion.client.webtools/web/csslint/csslint.js
Reporter
function Reporter(lines, ruleset, allow, ignore) { "use strict"; /** * List of messages being reported. * @property messages * @type String[] */ this.messages = []; /** * List of statistics being reported. * @property stats * @type String[] */ this.stats = [...
javascript
function Reporter(lines, ruleset, allow, ignore) { "use strict"; /** * List of messages being reported. * @property messages * @type String[] */ this.messages = []; /** * List of statistics being reported. * @property stats * @type String[] */ this.stats = [...
[ "function", "Reporter", "(", "lines", ",", "ruleset", ",", "allow", ",", "ignore", ")", "{", "\"use strict\"", ";", "/**\n * List of messages being reported.\n * @property messages\n * @type String[]\n */", "this", ".", "messages", "=", "[", "]", ";", "/**...
An instance of Report is used to report results of the verification back to the main API. @class Reporter @constructor @param {String[]} lines The text lines of the source. @param {Object} ruleset The set of rules to work with, including if they are errors or warnings. @param {Object} explicitly allowed lines @param {[...
[ "An", "instance", "of", "Report", "is", "used", "to", "report", "results", "of", "the", "verification", "back", "to", "the", "main", "API", "." ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.webtools/web/csslint/csslint.js#L8141-L8193
14,260
eclipse/orion.client
bundles/org.eclipse.orion.client.webtools/web/csslint/csslint.js
function(message, line, col, rule, data) { "use strict"; var err = { type : "error", line : line, col : col, message : message, evidence: this.lines[line-1], rule : rule || {} }; if (data) { err...
javascript
function(message, line, col, rule, data) { "use strict"; var err = { type : "error", line : line, col : col, message : message, evidence: this.lines[line-1], rule : rule || {} }; if (data) { err...
[ "function", "(", "message", ",", "line", ",", "col", ",", "rule", ",", "data", ")", "{", "\"use strict\"", ";", "var", "err", "=", "{", "type", ":", "\"error\"", ",", "line", ":", "line", ",", "col", ":", "col", ",", "message", ":", "message", ",",...
Report an error. @param {String} message The message to store. @param {int} line The line number. @param {int} col The column number. @param {Object} rule The rule this message relates to. @param {Object} data An optional object to pass message data through @method error ORION Include NLS data in message
[ "Report", "an", "error", "." ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.webtools/web/csslint/csslint.js#L8210-L8224
14,261
eclipse/orion.client
bundles/org.eclipse.orion.client.webtools/web/csslint/csslint.js
function(message, line, col, rule, data) { "use strict"; // Check if rule violation should be allowed if (this.allow.hasOwnProperty(line) && this.allow[line].hasOwnProperty(rule.id)) { return; } var ignore = false; CSSLint.Util.forEach(this.ignore, function ...
javascript
function(message, line, col, rule, data) { "use strict"; // Check if rule violation should be allowed if (this.allow.hasOwnProperty(line) && this.allow[line].hasOwnProperty(rule.id)) { return; } var ignore = false; CSSLint.Util.forEach(this.ignore, function ...
[ "function", "(", "message", ",", "line", ",", "col", ",", "rule", ",", "data", ")", "{", "\"use strict\"", ";", "// Check if rule violation should be allowed", "if", "(", "this", ".", "allow", ".", "hasOwnProperty", "(", "line", ")", "&&", "this", ".", "allo...
Report an issue. @param {String} message The message to store. @param {int} line The line number. @param {int} col The column number. @param {Object} rule The rule this message relates to. @param {Object} data An optional object to pass message data through @method report ORION Include NLS data in message, allow info s...
[ "Report", "an", "issue", "." ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.webtools/web/csslint/csslint.js#L8250-L8286
14,262
eclipse/orion.client
bundles/org.eclipse.orion.client.webtools/web/csslint/csslint.js
function(message, rule) { "use strict"; this.messages.push({ type : "error", rollup : true, message : message, rule : rule }); }
javascript
function(message, rule) { "use strict"; this.messages.push({ type : "error", rollup : true, message : message, rule : rule }); }
[ "function", "(", "message", ",", "rule", ")", "{", "\"use strict\"", ";", "this", ".", "messages", ".", "push", "(", "{", "type", ":", "\"error\"", ",", "rollup", ":", "true", ",", "message", ":", "message", ",", "rule", ":", "rule", "}", ")", ";", ...
Report some rollup error information. @param {String} message The message to store. @param {Object} rule The rule this message relates to. @method rollupError
[ "Report", "some", "rollup", "error", "information", "." ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.webtools/web/csslint/csslint.js#L8314-L8322
14,263
eclipse/orion.client
bundles/org.eclipse.orion.client.webtools/web/csslint/csslint.js
function(message, rule, data) { "use strict"; var err = { type : "warning", rollup : true, message : message, rule : rule }; if(data) { err.data = data; } this.messages.push(err); }
javascript
function(message, rule, data) { "use strict"; var err = { type : "warning", rollup : true, message : message, rule : rule }; if(data) { err.data = data; } this.messages.push(err); }
[ "function", "(", "message", ",", "rule", ",", "data", ")", "{", "\"use strict\"", ";", "var", "err", "=", "{", "type", ":", "\"warning\"", ",", "rollup", ":", "true", ",", "message", ":", "message", ",", "rule", ":", "rule", "}", ";", "if", "(", "d...
Report some rollup warning information. @param {String} message The message to store. @param {Object} rule The rule this message relates to. @param {Object} data An optional object to pass message data through @method rollupWarn ORION Include NLS data in message
[ "Report", "some", "rollup", "warning", "information", "." ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.webtools/web/csslint/csslint.js#L8332-L8344
14,264
eclipse/orion.client
bundles/org.eclipse.orion.client.webtools/web/csslint/csslint.js
function() { "use strict"; var ret = ""; if (this.json.length > 0) { if (this.json.length === 1) { ret = JSON.stringify(this.json[0]); } else { ret = JSON.stringify(this.json); } } return ret; }
javascript
function() { "use strict"; var ret = ""; if (this.json.length > 0) { if (this.json.length === 1) { ret = JSON.stringify(this.json[0]); } else { ret = JSON.stringify(this.json); } } return ret; }
[ "function", "(", ")", "{", "\"use strict\"", ";", "var", "ret", "=", "\"\"", ";", "if", "(", "this", ".", "json", ".", "length", ">", "0", ")", "{", "if", "(", "this", ".", "json", ".", "length", "===", "1", ")", "{", "ret", "=", "JSON", ".", ...
Return content to be printed after all file results. @return {String} to append after all results
[ "Return", "content", "to", "be", "printed", "after", "all", "file", "results", "." ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.webtools/web/csslint/csslint.js#L10865-L10876
14,265
eclipse/orion.client
bundles/org.eclipse.orion.client.ui/web/orion/compare/diffTreeNavigator.js
DiffTreeNavigator
function DiffTreeNavigator(charOrWordDiff, oldEditor, newEditor, oldDiffBlockFeeder, newDiffBlockFeeder, curveRuler) { this._root = {type: "root", children: []}; //$NON-NLS-0$ this._initialized = false; this.initAll(charOrWordDiff, oldEditor, newEditor, oldDiffBlockFeeder, newDiffBlockFeeder, curveRuler); }
javascript
function DiffTreeNavigator(charOrWordDiff, oldEditor, newEditor, oldDiffBlockFeeder, newDiffBlockFeeder, curveRuler) { this._root = {type: "root", children: []}; //$NON-NLS-0$ this._initialized = false; this.initAll(charOrWordDiff, oldEditor, newEditor, oldDiffBlockFeeder, newDiffBlockFeeder, curveRuler); }
[ "function", "DiffTreeNavigator", "(", "charOrWordDiff", ",", "oldEditor", ",", "newEditor", ",", "oldDiffBlockFeeder", ",", "newDiffBlockFeeder", ",", "curveRuler", ")", "{", "this", ".", "_root", "=", "{", "type", ":", "\"root\"", ",", "children", ":", "[", "...
Creates a new diff tree model. A diff tree model represents a tree structure of diffs. The top level children represents all the diff blocks based on lines, where each diff block contains a list of word level diffs. @name orion.DiffTreeNavigator.DiffTreeNavigator @class A tree model based iterator component. @param {l...
[ "Creates", "a", "new", "diff", "tree", "model", ".", "A", "diff", "tree", "model", "represents", "a", "tree", "structure", "of", "diffs", ".", "The", "top", "level", "children", "represents", "all", "the", "diff", "blocks", "based", "on", "lines", "where",...
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.ui/web/orion/compare/diffTreeNavigator.js#L29-L33
14,266
eclipse/orion.client
bundles/org.eclipse.orion.client.ui/web/orion/compare/diffTreeNavigator.js
function(changeIndex) { var count = 0; var blockIndex = 0; if (0 <= changeIndex) { // iterate through blocks looking for the one that contains // the change with the specified changeIndex while (blockIndex < this._root.children.length) { var numChangesInCurrentBlock = this._root.children[...
javascript
function(changeIndex) { var count = 0; var blockIndex = 0; if (0 <= changeIndex) { // iterate through blocks looking for the one that contains // the change with the specified changeIndex while (blockIndex < this._root.children.length) { var numChangesInCurrentBlock = this._root.children[...
[ "function", "(", "changeIndex", ")", "{", "var", "count", "=", "0", ";", "var", "blockIndex", "=", "0", ";", "if", "(", "0", "<=", "changeIndex", ")", "{", "// iterate through blocks looking for the one that contains ", "// the change with the specified changeIndex", ...
Goes to the change at the specified changeIndex in the current file. @param[in] changeIndex The index of the desired change in the current file.
[ "Goes", "to", "the", "change", "at", "the", "specified", "changeIndex", "in", "the", "current", "file", "." ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.ui/web/orion/compare/diffTreeNavigator.js#L335-L354
14,267
eclipse/orion.client
bundles/org.eclipse.orion.client.ui/web/orion/explorers/explorerNavHandler.js
function(e) { this.iterate(false, false, e.shiftKey, true); if(!this._ctrlKeyOn(e) && !e.shiftKey){ this.setSelection(this.currentModel(), false, true); } e.preventDefault(); return false; }
javascript
function(e) { this.iterate(false, false, e.shiftKey, true); if(!this._ctrlKeyOn(e) && !e.shiftKey){ this.setSelection(this.currentModel(), false, true); } e.preventDefault(); return false; }
[ "function", "(", "e", ")", "{", "this", ".", "iterate", "(", "false", ",", "false", ",", "e", ".", "shiftKey", ",", "true", ")", ";", "if", "(", "!", "this", ".", "_ctrlKeyOn", "(", "e", ")", "&&", "!", "e", ".", "shiftKey", ")", "{", "this", ...
Up arrow key iterates the current row backward. If control key is on, browser's scroll up behavior takes over. If shift key is on, it toggles the check box and iterates backward.
[ "Up", "arrow", "key", "iterates", "the", "current", "row", "backward", ".", "If", "control", "key", "is", "on", "browser", "s", "scroll", "up", "behavior", "takes", "over", ".", "If", "shift", "key", "is", "on", "it", "toggles", "the", "check", "box", ...
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.ui/web/orion/explorers/explorerNavHandler.js#L731-L738
14,268
eclipse/orion.client
bundles/org.eclipse.orion.client.ui/web/orion/explorers/explorerNavHandler.js
function(e) { if(this._shouldMoveColumn(e)){ this.moveColumn(null, 1); e.preventDefault(); return true; } var curModel = this._modelIterator.cursor(); if(!curModel){ return false; } if(this.isExpandable(curModel)){ if(!this.isExpanded(curModel)){ this.explorer.myTree.expand(cu...
javascript
function(e) { if(this._shouldMoveColumn(e)){ this.moveColumn(null, 1); e.preventDefault(); return true; } var curModel = this._modelIterator.cursor(); if(!curModel){ return false; } if(this.isExpandable(curModel)){ if(!this.isExpanded(curModel)){ this.explorer.myTree.expand(cu...
[ "function", "(", "e", ")", "{", "if", "(", "this", ".", "_shouldMoveColumn", "(", "e", ")", ")", "{", "this", ".", "moveColumn", "(", "null", ",", "1", ")", ";", "e", ".", "preventDefault", "(", ")", ";", "return", "true", ";", "}", "var", "curMo...
Right arrow key expands the current row if it is expandable and collapsed.
[ "Right", "arrow", "key", "expands", "the", "current", "row", "if", "it", "is", "expandable", "and", "collapsed", "." ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.ui/web/orion/explorers/explorerNavHandler.js#L793-L813
14,269
eclipse/orion.client
bundles/org.eclipse.orion.client.ui/web/orion/explorers/explorerNavHandler.js
function(e) { if (!e.target.classList.contains("treeTableRow")) return; if(this.setSelection(this.currentModel(), true, true)) { e.preventDefault(); } }
javascript
function(e) { if (!e.target.classList.contains("treeTableRow")) return; if(this.setSelection(this.currentModel(), true, true)) { e.preventDefault(); } }
[ "function", "(", "e", ")", "{", "if", "(", "!", "e", ".", "target", ".", "classList", ".", "contains", "(", "\"treeTableRow\"", ")", ")", "return", ";", "if", "(", "this", ".", "setSelection", "(", "this", ".", "currentModel", "(", ")", ",", "true", ...
Space key toggles the check box on the current row if the renderer uses check box
[ "Space", "key", "toggles", "the", "check", "box", "on", "the", "current", "row", "if", "the", "renderer", "uses", "check", "box" ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.ui/web/orion/explorers/explorerNavHandler.js#L820-L825
14,270
eclipse/orion.client
bundles/org.eclipse.orion.client.ui/web/orion/explorers/explorerNavHandler.js
function(e) { var currentGrid = this.getCurrentGrid(this._modelIterator.cursor()); if(currentGrid){ if(currentGrid.widget){ if(typeof currentGrid.onClick === "function"){ //$NON-NLS-0$ currentGrid.onClick(); } else if(typeof currentGrid.widget.focus === "function"){ //$NON-NLS-0$ current...
javascript
function(e) { var currentGrid = this.getCurrentGrid(this._modelIterator.cursor()); if(currentGrid){ if(currentGrid.widget){ if(typeof currentGrid.onClick === "function"){ //$NON-NLS-0$ currentGrid.onClick(); } else if(typeof currentGrid.widget.focus === "function"){ //$NON-NLS-0$ current...
[ "function", "(", "e", ")", "{", "var", "currentGrid", "=", "this", ".", "getCurrentGrid", "(", "this", ".", "_modelIterator", ".", "cursor", "(", ")", ")", ";", "if", "(", "currentGrid", ")", "{", "if", "(", "currentGrid", ".", "widget", ")", "{", "i...
Enter key simulates a href call if the current row has an href link rendered. The render has to provide the getRowActionElement function that returns the href DIV.
[ "Enter", "key", "simulates", "a", "href", "call", "if", "the", "current", "row", "has", "an", "href", "link", "rendered", ".", "The", "render", "has", "to", "provide", "the", "getRowActionElement", "function", "that", "returns", "the", "href", "DIV", "." ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.ui/web/orion/explorers/explorerNavHandler.js#L828-L866
14,271
eclipse/orion.client
bundles/org.eclipse.orion.client.ui/web/orion/explorers/explorerNavHandler.js
function(model) { var rowDiv = this.getRowDiv(model); if (this.isExpandable(model) && this.isExpanded(model)) { this._modelIterator.collapse(model); this.explorer.myTree.toggle(rowDiv.id); // collapse tree visually } rowDiv.classList.remove("checkedRow"); //$NON-NLS-0$ rowDiv.classList.add("disab...
javascript
function(model) { var rowDiv = this.getRowDiv(model); if (this.isExpandable(model) && this.isExpanded(model)) { this._modelIterator.collapse(model); this.explorer.myTree.toggle(rowDiv.id); // collapse tree visually } rowDiv.classList.remove("checkedRow"); //$NON-NLS-0$ rowDiv.classList.add("disab...
[ "function", "(", "model", ")", "{", "var", "rowDiv", "=", "this", ".", "getRowDiv", "(", "model", ")", ";", "if", "(", "this", ".", "isExpandable", "(", "model", ")", "&&", "this", ".", "isExpanded", "(", "model", ")", ")", "{", "this", ".", "_mode...
Disables the specified model making it no longer respond to user input such as mouse click or key presses. The CSS style of corresponding row node is also modified to reflect its disabled state. @param {Object} model
[ "Disables", "the", "specified", "model", "making", "it", "no", "longer", "respond", "to", "user", "input", "such", "as", "mouse", "click", "or", "key", "presses", ".", "The", "CSS", "style", "of", "corresponding", "row", "node", "is", "also", "modified", "...
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.ui/web/orion/explorers/explorerNavHandler.js#L885-L894
14,272
eclipse/orion.client
bundles/org.eclipse.orion.client.ui/web/orion/explorers/explorerNavHandler.js
function(model) { var rowDiv = this.getRowDiv(model); if (rowDiv) { rowDiv.classList.remove("disabledNavRow"); //$NON-NLS-0$ this.setIsNotSelectable(model, false); } }
javascript
function(model) { var rowDiv = this.getRowDiv(model); if (rowDiv) { rowDiv.classList.remove("disabledNavRow"); //$NON-NLS-0$ this.setIsNotSelectable(model, false); } }
[ "function", "(", "model", ")", "{", "var", "rowDiv", "=", "this", ".", "getRowDiv", "(", "model", ")", ";", "if", "(", "rowDiv", ")", "{", "rowDiv", ".", "classList", ".", "remove", "(", "\"disabledNavRow\"", ")", ";", "//$NON-NLS-0$", "this", ".", "se...
Enables the specified model. @param {Object} model
[ "Enables", "the", "specified", "model", "." ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.ui/web/orion/explorers/explorerNavHandler.js#L910-L916
14,273
eclipse/orion.client
bundles/org.eclipse.orion.client.ui/web/orion/explorers/explorerNavHandler.js
function(modelItem, rowDomNode){ var modelId = this._model.getId(modelItem); this._dict[modelId] = {model: modelItem, rowDomNode: rowDomNode}; }
javascript
function(modelItem, rowDomNode){ var modelId = this._model.getId(modelItem); this._dict[modelId] = {model: modelItem, rowDomNode: rowDomNode}; }
[ "function", "(", "modelItem", ",", "rowDomNode", ")", "{", "var", "modelId", "=", "this", ".", "_model", ".", "getId", "(", "modelItem", ")", ";", "this", ".", "_dict", "[", "modelId", "]", "=", "{", "model", ":", "modelItem", ",", "rowDomNode", ":", ...
Add a row to the dictionary. @param {Object} modelItem The model item object that represent a row. @param {domNode} rowDomNode optional The DOM node that represent a row. If
[ "Add", "a", "row", "to", "the", "dictionary", "." ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.ui/web/orion/explorers/explorerNavHandler.js#L942-L945
14,274
eclipse/orion.client
bundles/org.eclipse.orion.client.ui/web/orion/explorers/explorerNavHandler.js
function(modelItem, lazyCreate) { if(!modelItem){ return null; } var modelId = this._model.getId(modelItem); if(this._dict[modelId]){ if(!this._dict[modelId].gridChildren && lazyCreate){ this._dict[modelId].gridChildren = []; } return this._dict[modelId].gridChildren; } return nul...
javascript
function(modelItem, lazyCreate) { if(!modelItem){ return null; } var modelId = this._model.getId(modelItem); if(this._dict[modelId]){ if(!this._dict[modelId].gridChildren && lazyCreate){ this._dict[modelId].gridChildren = []; } return this._dict[modelId].gridChildren; } return nul...
[ "function", "(", "modelItem", ",", "lazyCreate", ")", "{", "if", "(", "!", "modelItem", ")", "{", "return", "null", ";", "}", "var", "modelId", "=", "this", ".", "_model", ".", "getId", "(", "modelItem", ")", ";", "if", "(", "this", ".", "_dict", "...
Get the grid navigation holder from a row navigation model. @param {Object} modelItem The model item object that represent a row. @returns {Array} The .gridChildren property of the value keyed by the model id.
[ "Get", "the", "grid", "navigation", "holder", "from", "a", "row", "navigation", "model", "." ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.ui/web/orion/explorers/explorerNavHandler.js#L961-L973
14,275
eclipse/orion.client
bundles/org.eclipse.orion.client.ui/web/orion/explorers/explorerNavHandler.js
function(modelItem) { if(!modelItem){ return null; } var modelId = this._model.getId(modelItem); if(this._dict[modelId]){ this._dict[modelId].gridChildren = null; } }
javascript
function(modelItem) { if(!modelItem){ return null; } var modelId = this._model.getId(modelItem); if(this._dict[modelId]){ this._dict[modelId].gridChildren = null; } }
[ "function", "(", "modelItem", ")", "{", "if", "(", "!", "modelItem", ")", "{", "return", "null", ";", "}", "var", "modelId", "=", "this", ".", "_model", ".", "getId", "(", "modelItem", ")", ";", "if", "(", "this", ".", "_dict", "[", "modelId", "]",...
Initialize the grid navigation holder to null. @param {Object} modelItem The model item object that represent a row.
[ "Initialize", "the", "grid", "navigation", "holder", "to", "null", "." ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.ui/web/orion/explorers/explorerNavHandler.js#L979-L987
14,276
eclipse/orion.client
bundles/org.eclipse.orion.client.ui/web/gcli/gcli/ui/fields.js
BlankField
function BlankField(type, options) { Field.call(this, type, options); this.element = util.createElement(this.document, 'div'); this.onFieldChange = util.createEvent('BlankField.onFieldChange'); }
javascript
function BlankField(type, options) { Field.call(this, type, options); this.element = util.createElement(this.document, 'div'); this.onFieldChange = util.createEvent('BlankField.onFieldChange'); }
[ "function", "BlankField", "(", "type", ",", "options", ")", "{", "Field", ".", "call", "(", "this", ",", "type", ",", "options", ")", ";", "this", ".", "element", "=", "util", ".", "createElement", "(", "this", ".", "document", ",", "'div'", ")", ";"...
For use with delegate types that do not yet have anything to resolve to. BlankFields are not for general use.
[ "For", "use", "with", "delegate", "types", "that", "do", "not", "yet", "have", "anything", "to", "resolve", "to", ".", "BlankFields", "are", "not", "for", "general", "use", "." ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.ui/web/gcli/gcli/ui/fields.js#L226-L232
14,277
eclipse/orion.client
bundles/org.eclipse.orion.client.ui/web/orion/progress.js
ProgressService
function ProgressService(serviceRegistry, operationsClient, commandRegistry, progressMonitorClass, preferenceService){ this._serviceRegistry = serviceRegistry; this._serviceRegistration = serviceRegistry.registerService("orion.page.progress", this); //$NON-NLS-0$ this._commandRegistry = commandRegistry; this._...
javascript
function ProgressService(serviceRegistry, operationsClient, commandRegistry, progressMonitorClass, preferenceService){ this._serviceRegistry = serviceRegistry; this._serviceRegistration = serviceRegistry.registerService("orion.page.progress", this); //$NON-NLS-0$ this._commandRegistry = commandRegistry; this._...
[ "function", "ProgressService", "(", "serviceRegistry", ",", "operationsClient", ",", "commandRegistry", ",", "progressMonitorClass", ",", "preferenceService", ")", "{", "this", ".", "_serviceRegistry", "=", "serviceRegistry", ";", "this", ".", "_serviceRegistration", "=...
Service for tracking operations changes @class Service for tracking operations changes @name orion.progress.ProgressService @param {orion.serviceregistry.ServiceRegistry} serviceRegistry @param {orion.operationsclient.OperationsClient} operationsClient
[ "Service", "for", "tracking", "operations", "changes" ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.ui/web/orion/progress.js#L155-L167
14,278
eclipse/orion.client
bundles/org.eclipse.orion.client.ui/web/gcli/gcli/cli.js
isSimple
function isSimple(typed) { for (var i = 0; i < typed.length; i++) { var c = typed.charAt(i); if (c === ' ' || c === '"' || c === '\'' || c === '{' || c === '}' || c === '\\') { return false; } } return true; }
javascript
function isSimple(typed) { for (var i = 0; i < typed.length; i++) { var c = typed.charAt(i); if (c === ' ' || c === '"' || c === '\'' || c === '{' || c === '}' || c === '\\') { return false; } } return true; }
[ "function", "isSimple", "(", "typed", ")", "{", "for", "(", "var", "i", "=", "0", ";", "i", "<", "typed", ".", "length", ";", "i", "++", ")", "{", "var", "c", "=", "typed", ".", "charAt", "(", "i", ")", ";", "if", "(", "c", "===", "' '", "|...
If the input has no spaces, quotes, braces or escapes, we can take the fast track.
[ "If", "the", "input", "has", "no", "spaces", "quotes", "braces", "or", "escapes", "we", "can", "take", "the", "fast", "track", "." ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.ui/web/gcli/gcli/cli.js#L1519-L1528
14,279
eclipse/orion.client
bundles/org.eclipse.orion.client.javascript/web/eslint/lib/rules/no-else-return.js
naiveHasReturn
function naiveHasReturn(node) { if (node.type === "BlockStatement") { var body = node.body, lastChildNode = body[body.length - 1]; return lastChildNode && checkForReturn(lastChildNode); } return checkForReturn(node); }
javascript
function naiveHasReturn(node) { if (node.type === "BlockStatement") { var body = node.body, lastChildNode = body[body.length - 1]; return lastChildNode && checkForReturn(lastChildNode); } return checkForReturn(node); }
[ "function", "naiveHasReturn", "(", "node", ")", "{", "if", "(", "node", ".", "type", "===", "\"BlockStatement\"", ")", "{", "var", "body", "=", "node", ".", "body", ",", "lastChildNode", "=", "body", "[", "body", ".", "length", "-", "1", "]", ";", "r...
Naive return checking, does not iterate through the whole BlockStatement because we make the assumption that the ReturnStatement will be the last node in the body of the BlockStatement. @param {Node} node The consequent/alternate node @returns {boolean} True if it has a return
[ "Naive", "return", "checking", "does", "not", "iterate", "through", "the", "whole", "BlockStatement", "because", "we", "make", "the", "assumption", "that", "the", "ReturnStatement", "will", "be", "the", "last", "node", "in", "the", "body", "of", "the", "BlockS...
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.javascript/web/eslint/lib/rules/no-else-return.js#L51-L59
14,280
eclipse/orion.client
bundles/org.eclipse.orion.client.javascript/web/eslint/lib/config/rules.js
importPlugin
function importPlugin(pluginRules, pluginName) { Object.keys(pluginRules).forEach(function(ruleId) { var qualifiedRuleId = pluginName + "/" + ruleId, rule = pluginRules[ruleId]; define(qualifiedRuleId, rule); }); }
javascript
function importPlugin(pluginRules, pluginName) { Object.keys(pluginRules).forEach(function(ruleId) { var qualifiedRuleId = pluginName + "/" + ruleId, rule = pluginRules[ruleId]; define(qualifiedRuleId, rule); }); }
[ "function", "importPlugin", "(", "pluginRules", ",", "pluginName", ")", "{", "Object", ".", "keys", "(", "pluginRules", ")", ".", "forEach", "(", "function", "(", "ruleId", ")", "{", "var", "qualifiedRuleId", "=", "pluginName", "+", "\"/\"", "+", "ruleId", ...
Registers all given rules of a plugin. @param {Object} pluginRules A key/value map of rule definitions. @param {string} pluginName The name of the plugin without prefix (`eslint-plugin-`). @returns {void}
[ "Registers", "all", "given", "rules", "of", "a", "plugin", "." ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.javascript/web/eslint/lib/config/rules.js#L52-L59
14,281
eclipse/orion.client
bundles/org.eclipse.orion.client.javascript/web/javascript/javascriptProject.js
_updateMap
function _updateMap(arr, state) { if(Array.isArray(arr)) { arr.forEach(function(file) { var f, toQ, toN, n; switch(state) { case 'onCreated': { n = file.result ? file.result.Name : undefined; f = file.result ? file.result.Location : undefined; break; } case 'onDel...
javascript
function _updateMap(arr, state) { if(Array.isArray(arr)) { arr.forEach(function(file) { var f, toQ, toN, n; switch(state) { case 'onCreated': { n = file.result ? file.result.Name : undefined; f = file.result ? file.result.Location : undefined; break; } case 'onDel...
[ "function", "_updateMap", "(", "arr", ",", "state", ")", "{", "if", "(", "Array", ".", "isArray", "(", "arr", ")", ")", "{", "arr", ".", "forEach", "(", "function", "(", "file", ")", "{", "var", "f", ",", "toQ", ",", "toN", ",", "n", ";", "swit...
Update the backing map @param {Array.<String>} arr The array to walk @param {String} state The state, one of: onModified, onDeleted, onCreated
[ "Update", "the", "backing", "map" ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.javascript/web/javascript/javascriptProject.js#L862-L894
14,282
eclipse/orion.client
bundles/org.eclipse.orion.client.ui/web/orion/searchClient.js
Searcher
function Searcher(options) { this._registry= options.serviceRegistry; this._commandService = options.commandService; this._fileClient = options.fileService; //TODO clean up the search client API. Make any helper private this._registry.registerService("orion.core.search.client", this); //$NON-NLS-1$ }
javascript
function Searcher(options) { this._registry= options.serviceRegistry; this._commandService = options.commandService; this._fileClient = options.fileService; //TODO clean up the search client API. Make any helper private this._registry.registerService("orion.core.search.client", this); //$NON-NLS-1$ }
[ "function", "Searcher", "(", "options", ")", "{", "this", ".", "_registry", "=", "options", ".", "serviceRegistry", ";", "this", ".", "_commandService", "=", "options", ".", "commandService", ";", "this", ".", "_fileClient", "=", "options", ".", "fileService",...
Creates a new search client. @param {Object} options The options object @param {orion.serviceregistry.ServiceRegistry} options.serviceRegistry The service registry @name orion.searchClient.Searcher @class Provides API for searching the workspace.
[ "Creates", "a", "new", "search", "client", "." ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.ui/web/orion/searchClient.js#L30-L36
14,283
eclipse/orion.client
bundles/org.eclipse.orion.client.ui/web/orion/searchClient.js
function(meta, useParentLocation){ var locationName = ""; var noneRootMeta = null; this._setLocationbyURL(meta); this._searchRootLocation = meta.WorkspaceLocation || this._fileClient.fileServiceRootURL(meta.Location); if(useParentLocation && meta && meta.Parents && meta.Parents.length > 0){ if(usePar...
javascript
function(meta, useParentLocation){ var locationName = ""; var noneRootMeta = null; this._setLocationbyURL(meta); this._searchRootLocation = meta.WorkspaceLocation || this._fileClient.fileServiceRootURL(meta.Location); if(useParentLocation && meta && meta.Parents && meta.Parents.length > 0){ if(usePar...
[ "function", "(", "meta", ",", "useParentLocation", ")", "{", "var", "locationName", "=", "\"\"", ";", "var", "noneRootMeta", "=", "null", ";", "this", ".", "_setLocationbyURL", "(", "meta", ")", ";", "this", ".", "_searchRootLocation", "=", "meta", ".", "W...
Used to update "selectd" and "project" search scope based on the file or folder selected.
[ "Used", "to", "update", "selectd", "and", "project", "search", "scope", "based", "on", "the", "file", "or", "folder", "selected", "." ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.ui/web/orion/searchClient.js#L55-L96
14,284
eclipse/orion.client
bundles/org.eclipse.orion.client.ui/web/orion/searchClient.js
function(searchParams, generateMatches, generateMeta) { try { return this.getFileClient().search(searchParams).then(function(jsonData) { var searchResult = this.convert(jsonData, searchParams); return this._generateMatches(searchParams, searchResult, generateMatches).then(function() { return this...
javascript
function(searchParams, generateMatches, generateMeta) { try { return this.getFileClient().search(searchParams).then(function(jsonData) { var searchResult = this.convert(jsonData, searchParams); return this._generateMatches(searchParams, searchResult, generateMatches).then(function() { return this...
[ "function", "(", "searchParams", ",", "generateMatches", ",", "generateMeta", ")", "{", "try", "{", "return", "this", ".", "getFileClient", "(", ")", ".", "search", "(", "searchParams", ")", ".", "then", "(", "function", "(", "jsonData", ")", "{", "var", ...
Runs a search and displays the results under the given DOM node. @public @param {Object} searchParams The search parameters. @param {Function(JSONObject)} Callback function that receives the results of the query.
[ "Runs", "a", "search", "and", "displays", "the", "results", "under", "the", "given", "DOM", "node", "." ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.ui/web/orion/searchClient.js#L188-L219
14,285
eclipse/orion.client
bundles/org.eclipse.orion.client.ui/web/orion/searchClient.js
function(keyword, nameSearch, useRoot, advancedOptions, searchScope) { var searchOn = useRoot ? this.getSearchRootLocation(): this.getSearchLocation(searchScope); if (nameSearch) { //assume implicit trailing wildcard if there isn't one already //var wildcard= (/\*$/.test(keyword) ? "" : "*"); //$NON-NLS-...
javascript
function(keyword, nameSearch, useRoot, advancedOptions, searchScope) { var searchOn = useRoot ? this.getSearchRootLocation(): this.getSearchLocation(searchScope); if (nameSearch) { //assume implicit trailing wildcard if there isn't one already //var wildcard= (/\*$/.test(keyword) ? "" : "*"); //$NON-NLS-...
[ "function", "(", "keyword", ",", "nameSearch", ",", "useRoot", ",", "advancedOptions", ",", "searchScope", ")", "{", "var", "searchOn", "=", "useRoot", "?", "this", ".", "getSearchRootLocation", "(", ")", ":", "this", ".", "getSearchLocation", "(", "searchScop...
Returns a query object for search. The return value has the propertyies of resource and parameters. @param {String} keyword The text to search for, or null when searching purely on file name @param {Boolean} [nameSearch] The name of a file to search for @param {Boolean} [useRoot] If true, do not use the location proper...
[ "Returns", "a", "query", "object", "for", "search", ".", "The", "return", "value", "has", "the", "propertyies", "of", "resource", "and", "parameters", "." ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.ui/web/orion/searchClient.js#L293-L323
14,286
eclipse/orion.client
bundles/org.eclipse.orion.client.git/web/orion/git/gitCommands.js
displayErrorOnStatus
function displayErrorOnStatus(error) { var display = {}; display.Severity = "Error"; //$NON-NLS-0$ display.HTML = false; try { var resp = JSON.parse(error.responseText); display.Message = resp.DetailedMessage ? resp.DetailedMessage : (resp.Message ? resp.Message : messages["Problem while p...
javascript
function displayErrorOnStatus(error) { var display = {}; display.Severity = "Error"; //$NON-NLS-0$ display.HTML = false; try { var resp = JSON.parse(error.responseText); display.Message = resp.DetailedMessage ? resp.DetailedMessage : (resp.Message ? resp.Message : messages["Problem while p...
[ "function", "displayErrorOnStatus", "(", "error", ")", "{", "var", "display", "=", "{", "}", ";", "display", ".", "Severity", "=", "\"Error\"", ";", "//$NON-NLS-0$", "display", ".", "HTML", "=", "false", ";", "try", "{", "var", "resp", "=", "JSON", ".", ...
make warning go away
[ "make", "warning", "go", "away" ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.git/web/orion/git/gitCommands.js#L1438-L1452
14,287
eclipse/orion.client
bundles/org.eclipse.orion.client.git/web/orion/git/gitCommands.js
function(data) { if (data && data.handler.changedItem) { data.handler.changedItem(); } else { explorer.changedItem(); } }
javascript
function(data) { if (data && data.handler.changedItem) { data.handler.changedItem(); } else { explorer.changedItem(); } }
[ "function", "(", "data", ")", "{", "if", "(", "data", "&&", "data", ".", "handler", ".", "changedItem", ")", "{", "data", ".", "handler", ".", "changedItem", "(", ")", ";", "}", "else", "{", "explorer", ".", "changedItem", "(", ")", ";", "}", "}" ]
used both as confirm and remotePrompter dialogs callback
[ "used", "both", "as", "confirm", "and", "remotePrompter", "dialogs", "callback" ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.git/web/orion/git/gitCommands.js#L2371-L2377
14,288
eclipse/orion.client
bundles/org.eclipse.orion.client.ui/web/plugins/languages/docker/dockerAssist.js
calculateTruePrefix
function calculateTruePrefix(buffer, offset, escapeCharacter) { var char = buffer.charAt(offset - 1); switch (char) { case '\n': var escapedPrefix = ""; for (var i = offset - 1; i >= 0; i--) { if (buffer.charAt(i) === '\n') { if (buffer.charAt(i - 1) === escapeCharacter) { i--; ...
javascript
function calculateTruePrefix(buffer, offset, escapeCharacter) { var char = buffer.charAt(offset - 1); switch (char) { case '\n': var escapedPrefix = ""; for (var i = offset - 1; i >= 0; i--) { if (buffer.charAt(i) === '\n') { if (buffer.charAt(i - 1) === escapeCharacter) { i--; ...
[ "function", "calculateTruePrefix", "(", "buffer", ",", "offset", ",", "escapeCharacter", ")", "{", "var", "char", "=", "buffer", ".", "charAt", "(", "offset", "-", "1", ")", ";", "switch", "(", "char", ")", "{", "case", "'\\n'", ":", "var", "escapedPrefi...
Walks back in the text buffer to calculate the true prefix of the current text caret offset. Orion's provided prefix does not include symbols but we do want to consider that a prefix in Dockerfiles. @param buffer the content of the opened file @param offset the current text caret's offset @param escapeCharacter the es...
[ "Walks", "back", "in", "the", "text", "buffer", "to", "calculate", "the", "true", "prefix", "of", "the", "current", "text", "caret", "offset", ".", "Orion", "s", "provided", "prefix", "does", "not", "include", "symbols", "but", "we", "do", "want", "to", ...
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.ui/web/plugins/languages/docker/dockerAssist.js#L251-L300
14,289
eclipse/orion.client
modules/orionode/lib/sharedWorkspace.js
checkCollabServerToken
function checkCollabServerToken(authorization) { if (authorization.substr(0, 7) !== "Bearer ") { return false; } try { var decoded = jwt.verify(authorization.substr(7), options.configParams.get("orion.jwt.secret")); return true; } catch (ex) { return false; } }
javascript
function checkCollabServerToken(authorization) { if (authorization.substr(0, 7) !== "Bearer ") { return false; } try { var decoded = jwt.verify(authorization.substr(7), options.configParams.get("orion.jwt.secret")); return true; } catch (ex) { return false; } }
[ "function", "checkCollabServerToken", "(", "authorization", ")", "{", "if", "(", "authorization", ".", "substr", "(", "0", ",", "7", ")", "!==", "\"Bearer \"", ")", "{", "return", "false", ";", "}", "try", "{", "var", "decoded", "=", "jwt", ".", "verify"...
Check the JWT token for collab server
[ "Check", "the", "JWT", "token", "for", "collab", "server" ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/modules/orionode/lib/sharedWorkspace.js#L42-L52
14,290
eclipse/orion.client
bundles/org.eclipse.orion.client.ui/web/plugins/filePlugin/GitHubFileImpl.js
function(child, branchNameOrSha, asSha) { var _this = this; var shaValue = asSha ? branchNameOrSha : branchNameOrSha + "&path=" + child.CommitPath; return xhr("GET", _this._repoURL.href + "/commits?sha=" + shaValue + "&per_page=1", {//https://developer.github.com/v3/#pagination headers: this._headers, ...
javascript
function(child, branchNameOrSha, asSha) { var _this = this; var shaValue = asSha ? branchNameOrSha : branchNameOrSha + "&path=" + child.CommitPath; return xhr("GET", _this._repoURL.href + "/commits?sha=" + shaValue + "&per_page=1", {//https://developer.github.com/v3/#pagination headers: this._headers, ...
[ "function", "(", "child", ",", "branchNameOrSha", ",", "asSha", ")", "{", "var", "_this", "=", "this", ";", "var", "shaValue", "=", "asSha", "?", "branchNameOrSha", ":", "branchNameOrSha", "+", "\"&path=\"", "+", "child", ".", "CommitPath", ";", "return", ...
Inject commit information to an item. The item can be either meta data or an item form the return list of fetchChildren. CommitInfo { Author: {Name: "string", Email: "[email protected]", Date: milliseconds(integer) }, Committer: {Name: "string", Email: "[email protected]", Date: milliseconds(integer) }, Message: "string", U...
[ "Inject", "commit", "information", "to", "an", "item", ".", "The", "item", "can", "be", "either", "meta", "data", "or", "an", "item", "form", "the", "return", "list", "of", "fetchChildren", "." ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.ui/web/plugins/filePlugin/GitHubFileImpl.js#L278-L309
14,291
eclipse/orion.client
bundles/org.eclipse.orion.client.javascript/web/eslint/lib/rules/no-implicit-coercion.js
isDoubleLogicalNegating
function isDoubleLogicalNegating(node) { return node.operator === "!" && node.argument.type === "UnaryExpression" && node.argument.operator === "!"; }
javascript
function isDoubleLogicalNegating(node) { return node.operator === "!" && node.argument.type === "UnaryExpression" && node.argument.operator === "!"; }
[ "function", "isDoubleLogicalNegating", "(", "node", ")", "{", "return", "node", ".", "operator", "===", "\"!\"", "&&", "node", ".", "argument", ".", "type", "===", "\"UnaryExpression\"", "&&", "node", ".", "argument", ".", "operator", "===", "\"!\"", ";", "}...
Checks whether or not a node is a double logical negating. @param {ASTNode} node - An UnaryExpression node to check. @returns {boolean} Whether or not the node is a double logical negating.
[ "Checks", "whether", "or", "not", "a", "node", "is", "a", "double", "logical", "negating", "." ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.javascript/web/eslint/lib/rules/no-implicit-coercion.js#L40-L44
14,292
eclipse/orion.client
bundles/org.eclipse.orion.client.javascript/web/eslint/lib/rules/no-implicit-coercion.js
isAppendEmptyString
function isAppendEmptyString(node) { return node.operator === "+=" && node.right.type === "Literal" && node.right.value === ""; }
javascript
function isAppendEmptyString(node) { return node.operator === "+=" && node.right.type === "Literal" && node.right.value === ""; }
[ "function", "isAppendEmptyString", "(", "node", ")", "{", "return", "node", ".", "operator", "===", "\"+=\"", "&&", "node", ".", "right", ".", "type", "===", "\"Literal\"", "&&", "node", ".", "right", ".", "value", "===", "\"\"", ";", "}" ]
Checks whether or not a node is appended with an empty string. @param {ASTNode} node - An AssignmentExpression node to check. @returns {boolean} Whether or not the node is appended with an empty string.
[ "Checks", "whether", "or", "not", "a", "node", "is", "appended", "with", "an", "empty", "string", "." ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.javascript/web/eslint/lib/rules/no-implicit-coercion.js#L124-L126
14,293
eclipse/orion.client
bundles/org.eclipse.orion.client.javascript/web/eslint/lib/rules/no-implicit-coercion.js
getOtherOperand
function getOtherOperand(node, value) { if (node.left.type === "Literal" && node.left.value === value) { return node.right; } return node.left; }
javascript
function getOtherOperand(node, value) { if (node.left.type === "Literal" && node.left.value === value) { return node.right; } return node.left; }
[ "function", "getOtherOperand", "(", "node", ",", "value", ")", "{", "if", "(", "node", ".", "left", ".", "type", "===", "\"Literal\"", "&&", "node", ".", "left", ".", "value", "===", "value", ")", "{", "return", "node", ".", "right", ";", "}", "retur...
Gets a node that is the left or right operand of a node, is not the specified literal. @param {ASTNode} node - A BinaryExpression node to get. @param {any} value - A literal value to check. @returns {ASTNode} A node that is the left or right operand of the node, is not the specified literal.
[ "Gets", "a", "node", "that", "is", "the", "left", "or", "right", "operand", "of", "a", "node", "is", "not", "the", "specified", "literal", "." ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.javascript/web/eslint/lib/rules/no-implicit-coercion.js#L134-L139
14,294
eclipse/orion.client
bundles/org.eclipse.orion.client.javascript/web/eslint/lib/load-rules-async.js
isInsideOfStorableFunction
function isInsideOfStorableFunction(id, rhsNode) { var funcNode = getUpperFunction(id); return ( funcNode && isInside(funcNode, rhsNode) && isStorableFunction(funcNode, rhsNode) ); }
javascript
function isInsideOfStorableFunction(id, rhsNode) { var funcNode = getUpperFunction(id); return ( funcNode && isInside(funcNode, rhsNode) && isStorableFunction(funcNode, rhsNode) ); }
[ "function", "isInsideOfStorableFunction", "(", "id", ",", "rhsNode", ")", "{", "var", "funcNode", "=", "getUpperFunction", "(", "id", ")", ";", "return", "(", "funcNode", "&&", "isInside", "(", "funcNode", ",", "rhsNode", ")", "&&", "isStorableFunction", "(", ...
Checks whether a given Identifier node exists inside of a function node which can be used later. "can be used later" means: - the function is assigned to a variable. - the function is bound to a property and the object can be used later. - the function is bound as an argument of a function call. If a reference exists...
[ "Checks", "whether", "a", "given", "Identifier", "node", "exists", "inside", "of", "a", "function", "node", "which", "can", "be", "used", "later", "." ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.javascript/web/eslint/lib/load-rules-async.js#L1907-L1914
14,295
eclipse/orion.client
bundles/org.eclipse.orion.client.collab/web/orion/collab/collabSocket.js
CollabSocket
function CollabSocket(hubUrl, sessionId) { var self = this; this.socket = io.connect( hubUrl+ "?sessionId=" +sessionId, { path: "/socket.io/" }); this.socket.on('connect', function() { self.dispatchEvent({ type: 'ready' }); }); this....
javascript
function CollabSocket(hubUrl, sessionId) { var self = this; this.socket = io.connect( hubUrl+ "?sessionId=" +sessionId, { path: "/socket.io/" }); this.socket.on('connect', function() { self.dispatchEvent({ type: 'ready' }); }); this....
[ "function", "CollabSocket", "(", "hubUrl", ",", "sessionId", ")", "{", "var", "self", "=", "this", ";", "this", ".", "socket", "=", "io", ".", "connect", "(", "hubUrl", "+", "\"?sessionId=\"", "+", "sessionId", ",", "{", "path", ":", "\"/socket.io/\"", "...
Collab socket client @class @constructor @param {string} sessionId
[ "Collab", "socket", "client" ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.collab/web/orion/collab/collabSocket.js#L28-L65
14,296
eclipse/orion.client
bundles/org.eclipse.orion.client.ui/web/orion/outliner.js
OutlineRenderer
function OutlineRenderer (options, explorer, title, inputManager) { this.explorer = explorer; this._init(options); this.title = title; this.inputManager = inputManager; }
javascript
function OutlineRenderer (options, explorer, title, inputManager) { this.explorer = explorer; this._init(options); this.title = title; this.inputManager = inputManager; }
[ "function", "OutlineRenderer", "(", "options", ",", "explorer", ",", "title", ",", "inputManager", ")", "{", "this", ".", "explorer", "=", "explorer", ";", "this", ".", "_init", "(", "options", ")", ";", "this", ".", "title", "=", "title", ";", "this", ...
determines how many milliseconds we will wait for the outline service to compute and return an outline before considering it timed out
[ "determines", "how", "many", "milliseconds", "we", "will", "wait", "for", "the", "outline", "service", "to", "compute", "and", "return", "an", "outline", "before", "considering", "it", "timed", "out" ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.ui/web/orion/outliner.js#L35-L40
14,297
eclipse/orion.client
bundles/org.eclipse.orion.client.ui/web/orion/outliner.js
function() { if (!this._isActive()) { return; } this._filterInput.value = ""; //$NON-NLS-0$ lib.empty(this._outlineNode); // display spinner while outline is being calculated var spinner = document.createElement("span"); //$NON-NLS-0$ spinner.classList.add("modelDecorationSprite"); //$N...
javascript
function() { if (!this._isActive()) { return; } this._filterInput.value = ""; //$NON-NLS-0$ lib.empty(this._outlineNode); // display spinner while outline is being calculated var spinner = document.createElement("span"); //$NON-NLS-0$ spinner.classList.add("modelDecorationSprite"); //$N...
[ "function", "(", ")", "{", "if", "(", "!", "this", ".", "_isActive", "(", ")", ")", "{", "return", ";", "}", "this", ".", "_filterInput", ".", "value", "=", "\"\"", ";", "//$NON-NLS-0$", "lib", ".", "empty", "(", "this", ".", "_outlineNode", ")", "...
Invokes the outline service to produce an outline
[ "Invokes", "the", "outline", "service", "to", "produce", "an", "outline" ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.ui/web/orion/outliner.js#L447-L477
14,298
eclipse/orion.client
bundles/org.eclipse.orion.client.ui/web/orion/outliner.js
function(provider) { var isActive = this._slideout.isVisible() && (this === this._slideout.getCurrentViewMode()); if (isActive && provider) { isActive = (provider.getProperty("id") === this.providerId); //$NON-NLS-0$ if (isActive) { isActive = (provider.getProperty("name") === this.providerName); //$...
javascript
function(provider) { var isActive = this._slideout.isVisible() && (this === this._slideout.getCurrentViewMode()); if (isActive && provider) { isActive = (provider.getProperty("id") === this.providerId); //$NON-NLS-0$ if (isActive) { isActive = (provider.getProperty("name") === this.providerName); //$...
[ "function", "(", "provider", ")", "{", "var", "isActive", "=", "this", ".", "_slideout", ".", "isVisible", "(", ")", "&&", "(", "this", "===", "this", ".", "_slideout", ".", "getCurrentViewMode", "(", ")", ")", ";", "if", "(", "isActive", "&&", "provid...
Returns a boolean indicating whether the outliner is visible. @param {orion.serviceregistry.ServiceReference} provider Optional. If specified this function will only return true if the currently selected provider matches the one passed in. @return true if the outliner is visible, false otherwise
[ "Returns", "a", "boolean", "indicating", "whether", "the", "outliner", "is", "visible", "." ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.ui/web/orion/outliner.js#L589-L598
14,299
eclipse/orion.client
bundles/org.eclipse.orion.client.ui/web/orion/outliner.js
function(fileContentType, title) { if (!fileContentType) return; var lspServer = this.languageServerRegistry.getServerByContentType(fileContentType); var filteredProviders = null; var _self = this; if (lspServer) { filteredProviders = []; filteredProviders.push(lspServer); } else { var all...
javascript
function(fileContentType, title) { if (!fileContentType) return; var lspServer = this.languageServerRegistry.getServerByContentType(fileContentType); var filteredProviders = null; var _self = this; if (lspServer) { filteredProviders = []; filteredProviders.push(lspServer); } else { var all...
[ "function", "(", "fileContentType", ",", "title", ")", "{", "if", "(", "!", "fileContentType", ")", "return", ";", "var", "lspServer", "=", "this", ".", "languageServerRegistry", ".", "getServerByContentType", "(", "fileContentType", ")", ";", "var", "filteredPr...
Called when the inputManager's contentType has changed, so we need to look up the capable outline providers. @param {String} fileContentType @param {String} title TODO this is deprecated, should be removed along with "pattern" property of outliners.
[ "Called", "when", "the", "inputManager", "s", "contentType", "has", "changed", "so", "we", "need", "to", "look", "up", "the", "capable", "outline", "providers", "." ]
eb2583100c662b5cfc1b461a978b31d3b8555ce1
https://github.com/eclipse/orion.client/blob/eb2583100c662b5cfc1b461a978b31d3b8555ce1/bundles/org.eclipse.orion.client.ui/web/orion/outliner.js#L680-L715