_id stringlengths 2 6 | title stringlengths 0 58 | partition stringclasses 3
values | text stringlengths 27 233k | language stringclasses 1
value | meta_information dict |
|---|---|---|---|---|---|
q16700 | train | function (context) {
context = context || {};
var layerCounter,
layers = this._layers,
layer,
data = this.data;
var keySets = [_.difference(_.keys(data), this._exclusions)];
for (layerCounter = 0; layerCounter < layers.len... | javascript | {
"resource": ""
} | |
q16701 | train | function (layer) {
this._layers.push(layer);
this._layerMap[layer.key] = layer;
this._exclusions.push(layer.key);
this.trigger(PREFERENCE_CHANGE, { | javascript | {
"resource": ""
} | |
q16702 | train | function (oldContext, newContext) {
var changes = [],
data = this.data;
_.each(this._layers, function (layer) {
if (data[layer.key] && oldContext[layer.key] !== newContext[layer.key]) {
var changesInLayer = layer.contextChanged(data[layer.k... | javascript | {
"resource": ""
} | |
q16703 | train | function (data, id) {
if (!data || !this.projectPath) {
return;
}
if (data[this.projectPath] && (data[this.projectPath][id] !== undefined)) {
| javascript | {
"resource": ""
} | |
q16704 | train | function (data) {
if (!data) {
return;
}
| javascript | {
"resource": ""
} | |
q16705 | train | function (data, id, context) {
if (!data || !context.language) {
return;
}
if (data[context.language] && (data[context.language][id] !== undefined)) {
| javascript | {
"resource": ""
} | |
q16706 | train | function (data, oldContext, newContext) {
// this function is called only if the language has changed
if (newContext.language === undefined) {
return _.keys(data[oldContext.language]);
}
if (oldContext.language === undefined) {
| javascript | {
"resource": ""
} | |
q16707 | train | function (data, id, context) {
var glob = this.getPreferenceLocation(data, id, context); | javascript | {
"resource": ""
} | |
q16708 | train | function (data, id, context) {
if (!data) {
return;
}
var relativeFilename = FileUtils.getRelativeFilename(this.prefFilePath, context[this.key]);
if (!relativeFilename) {
| javascript | {
"resource": ""
} | |
q16709 | train | function (data, id, value, context, layerID) {
if (!layerID) {
layerID = this.getPreferenceLocation(data, id, context);
}
if (!layerID) {
return false;
}
var section = data[layerID];
if (!section) {
... | javascript | {
"resource": ""
} | |
q16710 | train | function (data, context) {
if (!data) {
return;
}
var relativeFilename = FileUtils.getRelativeFilename(this.prefFilePath, context[this.key]);
if (relativeFilename) {
| javascript | {
"resource": ""
} | |
q16711 | train | function (data, oldContext, newContext) {
var newGlob = _findMatchingGlob(data,
FileUtils.getRelativeFilename(this.prefFilePath, newContext[this.key])),
oldGlob = _findMatchingGlob(data,
FileUtils.getRelativeFilename(this.prefFilePa... | javascript | {
"resource": ""
} | |
q16712 | train | function (id, context) {
context = context || {};
| javascript | {
"resource": ""
} | |
q16713 | train | function (id, value, options, doNotSave) {
return this.base.set(this.prefix | javascript | {
"resource": ""
} | |
q16714 | train | function (event, preferenceID, handler) {
if (typeof preferenceID === "function") {
handler = preferenceID;
preferenceID = null;
}
if (preferenceID) {
var pref | javascript | {
"resource": ""
} | |
q16715 | train | function (event, preferenceID, handler) {
if (typeof preferenceID === "function") {
handler = preferenceID;
preferenceID = null;
}
if (preferenceID) {
| javascript | {
"resource": ""
} | |
q16716 | PreferencesSystem | train | function PreferencesSystem(contextBuilder) {
this.contextBuilder = contextBuilder;
this._knownPrefs = {};
this._scopes = {
"default": new Scope(new MemoryStorage())
};
this._scopes["default"].load();
this._defaults = {
scopeOrder: ["default"],
... | javascript | {
"resource": ""
} |
q16717 | train | function (id, type, initial, options) {
options = options || {};
if (this._knownPrefs.hasOwnProperty(id)) {
throw new Error("Preference " + id + " was redefined");
}
var pref = this._knownPrefs[id] = new Preference({
type: type,
... | javascript | {
"resource": ""
} | |
q16718 | train | function (id, addBefore) {
var shadowScopeOrder = this._defaults._shadowScopeOrder,
index = _.findIndex(shadowScopeOrder, function (entry) {
return entry.id === id;
}),
entry;
if (index > -1) {
| javascript | {
"resource": ""
} | |
q16719 | train | function (id) {
var scope = this._scopes[id];
if (scope) {
_.pull(this._defaults.scopeOrder, id);
scope.off(".prefsys");
this.trigger(SCOPEORDER_CHANGE, {
id: id,
action: "removed"
| javascript | {
"resource": ""
} | |
q16720 | train | function (id, scope, options) {
var promise;
options = options || {};
if (this._scopes[id]) {
throw new Error("Attempt to redefine preferences scope: " + id);
}
// Check to see if scope is a Storage that needs to be wrapped
if (!s... | javascript | {
"resource": ""
} | |
q16721 | train | function (id) {
var scope = this._scopes[id],
shadowIndex;
if (!scope) {
return;
}
this.removeFromScopeOrder(id);
shadowIndex = _.findIndex(this._defaults._shadowScopeOrder, function (entry) {
return entry.id | javascript | {
"resource": ""
} | |
q16722 | train | function (id, context) {
var scopeCounter;
context = this._getContext(context);
var scopeOrder = this._getScopeOrder(context);
for (scopeCounter = 0; scopeCounter < scopeOrder.length; scopeCounter++) {
var scope = this._scopes[scopeOrder[scopeCounter]];... | javascript | {
"resource": ""
} | |
q16723 | train | function (id, context) {
var scopeCounter,
scopeName;
context = this._getContext(context);
var scopeOrder = this._getScopeOrder(context);
for (scopeCounter = 0; scopeCounter < scopeOrder.length; scopeCounter++) {
scopeName = scopeOrder[s... | javascript | {
"resource": ""
} | |
q16724 | train | function (id, value, options, doNotSave) {
options = options || {};
var context = this._getContext(options.context),
// The case where the "default" scope was chosen specifically is special.
// Usually "default" would come up only when a preference did not have a... | javascript | {
"resource": ""
} | |
q16725 | train | function () {
if (this._saveInProgress) {
if (!this._nextSaveDeferred) {
this._nextSaveDeferred = new $.Deferred();
}
return this._nextSaveDeferred.promise();
}
var deferred = this._nextSaveDeferred || (new $.Deferr... | javascript | {
"resource": ""
} | |
q16726 | train | function (oldContext, newContext) {
var changes = [];
_.each(this._scopes, function (scope) {
var changedInScope = scope.contextChanged(oldContext, newContext);
if (changedInScope) {
changes.push(changedInScope);
}
... | javascript | {
"resource": ""
} | |
q16727 | _updateWorkingSetState | train | function _updateWorkingSetState() {
if (MainViewManager.getPaneCount() === 1 &&
MainViewManager.getWorkingSetSize(MainViewManager.ACTIVE_PANE) === 0) {
$workingSetViewsContainer.hide();
| javascript | {
"resource": ""
} |
q16728 | _updateUIStates | train | function _updateUIStates() {
var spriteIndex,
ICON_CLASSES = ["splitview-icon-none", "splitview-icon-vertical", "splitview-icon-horizontal"],
layoutScheme = MainViewManager.getLayoutScheme();
if (layoutScheme.columns > 1) {
spriteIndex = 1;
} else if (layoutS... | javascript | {
"resource": ""
} |
q16729 | addCommand | train | function addCommand() {
var menu = Menus.getMenu(Menus.AppMenuBar.FILE_MENU),
INSTALL_COMMAND_SCRIPT = "file.installCommandScript";
| javascript | {
"resource": ""
} |
q16730 | Session | train | function Session(editor) {
this.editor = editor;
this.path = editor.document.file.fullPath;
this.ternHints = [];
| javascript | {
"resource": ""
} |
q16731 | isOnFunctionIdentifier | train | function isOnFunctionIdentifier() {
// Check if we might be on function identifier of the function call.
var type = token.type,
nextToken,
localLexical,
localCursor = {line: cursor.line, ch: token.end};
| javascript | {
"resource": ""
} |
q16732 | isInFunctionalCall | train | function isInFunctionalCall(lex) {
// in a call, or inside array or object brackets that are inside a function.
| javascript | {
"resource": ""
} |
q16733 | penalizeUnderscoreValueCompare | train | function penalizeUnderscoreValueCompare(a, b) {
var aName = a.value.toLowerCase(), bName = b.value.toLowerCase();
// this sort function will cause _ to sort lower than lower case
// alphabetical letters
| javascript | {
"resource": ""
} |
q16734 | filterWithQueryAndMatcher | train | function filterWithQueryAndMatcher(hints, matcher) {
var matchResults = $.map(hints, function (hint) {
var searchResult = matcher.match(hint.value, query);
if (searchResult) {
searchResult.value = hint.value;
searchResult.guess = hint.g... | javascript | {
"resource": ""
} |
q16735 | install | train | function install(path, nameHint, _doUpdate) {
return _extensionManagerCall(function (extensionManager) {
var d = new $.Deferred(),
destinationDirectory = ExtensionLoader.getUserExtensionPath(),
disabledDirectory = destinationDirectory.re... | javascript | {
"resource": ""
} |
q16736 | toggleDefaultExtension | train | function toggleDefaultExtension(path, enabled) {
var arr = PreferencesManager.get(PREF_EXTENSIONS_DEFAULT_DISABLED);
if (!Array.isArray(arr)) { arr = []; }
var io = arr.indexOf(path);
if (enabled === true && io !== -1) {
arr.splice(io, 1);
| javascript | {
"resource": ""
} |
q16737 | disable | train | function disable(path) {
var result = new $.Deferred(),
file = FileSystem.getFileForPath(path + "/.disabled");
var defaultExtensionPath = ExtensionLoader.getDefaultExtensionPath();
if (file.fullPath.indexOf(defaultExtensionPath) === 0) {
toggleDefaultExtension(path, fals... | javascript | {
"resource": ""
} |
q16738 | enable | train | function enable(path) {
var result = new $.Deferred(),
file = FileSystem.getFileForPath(path + "/.disabled");
function afterEnable() {
ExtensionLoader.loadExtension(FileUtils.getBaseName(path), { baseUrl: path }, "main")
.done(result.resolve)
.fai... | javascript | {
"resource": ""
} |
q16739 | installUpdate | train | function installUpdate(path, nameHint) {
var d = new $.Deferred();
install(path, nameHint, true)
.done(function (result) {
if (result.installationStatus !== InstallationStatuses.INSTALLED) {
| javascript | {
"resource": ""
} |
q16740 | _cmdSend | train | function _cmdSend(idOrArray, msgStr) {
if (!Array.isArray(idOrArray)) {
idOrArray = [idOrArray];
}
idOrArray.forEach(function (id) {
var client = _clients[id];
if (!client) {
| javascript | {
"resource": ""
} |
q16741 | _cmdClose | train | function _cmdClose(clientId) {
var client = _clients[clientId];
| javascript | {
"resource": ""
} |
q16742 | nextLine | train | function nextLine() {
if (stream) {
curOffset++; // account for \n
if (curOffset >= length) {
return false;
}
| javascript | {
"resource": ""
} |
q16743 | _shouldGetFromCache | train | function _shouldGetFromCache(fileInfo) {
var result = new $.Deferred(),
isChanged = _changedDocumentTracker.isPathChanged(fileInfo.fullPath);
if (isChanged && fileInfo.JSUtils) {
// See if it's dirty and in the working set first
var doc = DocumentManager.getOpenDocum... | javascript | {
"resource": ""
} |
q16744 | _getFunctionsForFile | train | function _getFunctionsForFile(fileInfo) {
var result = new $.Deferred();
_shouldGetFromCache(fileInfo)
.done(function (useCache) {
if (useCache) {
// Return cached data. doc property is undefined since we hit the cache.
| javascript | {
"resource": ""
} |
q16745 | findMatchingFunctions | train | function findMatchingFunctions(functionName, fileInfos, keepAllFiles) {
var result = new $.Deferred(),
jsFiles = [];
if (!keepAllFiles) {
// Filter fileInfos for .js files
jsFiles = fileInfos.filter(function (fileInfo) {
return FileUtils.getFileExten... | javascript | {
"resource": ""
} |
q16746 | findAllMatchingFunctionsInText | train | function findAllMatchingFunctionsInText(text, searchName) {
var allFunctions = _findAllFunctionsInText(text);
var result = [];
var lines = text.split("\n");
_.forEach(allFunctions, function (functions, functionName) {
if (functionName === searchName || searchName === "*") {
... | javascript | {
"resource": ""
} |
q16747 | refresh | train | function refresh(force) {
if (force) {
currentTheme = null;
}
$.when(force && loadCurrentTheme()).done(function () {
var editor = EditorManager.getActiveEditor();
| javascript | {
"resource": ""
} |
q16748 | loadFile | train | function loadFile(fileName, options) {
var deferred = new $.Deferred(),
file = FileSystem.getFileForPath(fileName),
currentThemeName = prefs.get("theme");
file.exists(function (err, exists) {
var theme;
if (exists) {
t... | javascript | {
"resource": ""
} |
q16749 | loadPackage | train | function loadPackage(themePackage) {
var fileName = themePackage.path + "/" + themePackage.metadata.theme.file;
| javascript | {
"resource": ""
} |
q16750 | animateUsingClass | train | function animateUsingClass(target, animClass, timeoutDuration) {
var result = new $.Deferred(),
$target = $(target);
timeoutDuration = timeoutDuration || 400;
function finish(e) {
if (e.target === target) {
result.resolve();
}
}
... | javascript | {
"resource": ""
} |
q16751 | train | function () {
var result = this.props.parentPath + this.props.name;
// Add trailing slash for directories
| javascript | {
"resource": ""
} | |
q16752 | train | function (e) {
if (e.keyCode === KeyEvent.DOM_VK_ESCAPE) {
this.props.actions.cancelRename();
} else if (e.keyCode === KeyEvent.DOM_VK_RETURN) | javascript | {
"resource": ""
} | |
q16753 | train | function (e) {
this.props.actions.setRenameValue(this.props.parentPath + this.refs.name.value.trim());
if (e.keyCode !== KeyEvent.DOM_VK_LEFT &&
e.keyCode !== KeyEvent.DOM_VK_RIGHT) {
// update the width of the | javascript | {
"resource": ""
} | |
q16754 | train | function () {
var fullname = this.props.name,
extension = LanguageManager.getCompoundFileExtension(fullname);
var node = this.refs.name;
node.setSelectionRange(0, _getName(fullname, extension).length);
| javascript | {
"resource": ""
} | |
q16755 | train | function (e) {
e.stopPropagation();
if (e.button === RIGHT_MOUSE_BUTTON ||
(this.props.platform === "mac" && e.button === LEFT_MOUSE_BUTTON && e.ctrlKey)) {
this.props.actions.setContext(this.myPath());
e.preventDefault();
retur... | javascript | {
"resource": ""
} | |
q16756 | train | function (nextProps, nextState) {
return nextProps.forceRender ||
this.props.entry !== nextProps.entry ||
| javascript | {
"resource": ""
} | |
q16757 | train | function (prevProps, prevState) {
var wasSelected = prevProps.entry.get("selected"),
isSelected = this.props.entry.get("selected");
if (isSelected && !wasSelected) {
// TODO: This shouldn't really know about project-files-container
// directly. I... | javascript | {
"resource": ""
} | |
q16758 | train | function (e) {
// If we're renaming, allow the click to go through to the rename input.
if (this.props.entry.get("rename")) {
e.stopPropagation();
return;
}
if (e.button !== LEFT_MOUSE_BUTTON) {
return;
}
... | javascript | {
"resource": ""
} | |
q16759 | train | function () {
var fullname = this.props.name;
var node = this.refs.name;
node.setSelectionRange(0, fullname.length);
node.focus(); // set focus on | javascript | {
"resource": ""
} | |
q16760 | train | function (nextProps, nextState) {
return nextProps.forceRender ||
this.props.entry !== nextProps.entry ||
this.props.sortDirectoriesFirst !== nextProps.sortDirectoriesFirst ||
| javascript | {
"resource": ""
} | |
q16761 | train | function (event) {
if (this.props.entry.get("rename")) {
event.stopPropagation();
return;
}
if (event.button !== LEFT_MOUSE_BUTTON) {
return;
}
var isOpen = this.props.entry.get("open"),
setOpen... | javascript | {
"resource": ""
} | |
q16762 | train | function (nextProps, nextState) {
return nextProps.forceRender ||
this.props.contents !== nextProps.contents ||
this.props.sortDirectoriesFirst | javascript | {
"resource": ""
} | |
q16763 | train | function (nextProps, nextState) {
return nextProps.forceRender ||
this.props.treeData !== nextProps.treeData ||
this.props.sortDirectoriesFirst !== nextProps.sortDirectoriesFirst ||
| javascript | {
"resource": ""
} | |
q16764 | render | train | function render(element, viewModel, projectRoot, actions, forceRender, platform) {
if (!projectRoot) {
return;
}
Preact.render(fileTreeView({
treeData: viewModel.treeData,
selectionViewInfo: viewModel.selectionViewInfo,
sortDirectoriesFirst: viewM... | javascript | {
"resource": ""
} |
q16765 | sendLanguageClientInfo | train | function sendLanguageClientInfo() {
//Init node with Information required by Language Client
clientInfoLoadedPromise = clientInfoDomain.exec("initialize", _bracketsPath, ToolingInfo);
function logInitializationError() {
console.error("Failed to Initialize LanguageClient Module Infor... | javascript | {
"resource": ""
} |
q16766 | initDomainAndHandleNodeCrash | train | function initDomainAndHandleNodeCrash() {
clientInfoDomain = new NodeDomain("LanguageClientInfo", _domainPath);
//Initialize LanguageClientInfo once the domain has successfully loaded.
clientInfoDomain.promise().done(function () {
sendLanguageClientInfo();
//This is to ha... | javascript | {
"resource": ""
} |
q16767 | _getStats | train | function _getStats(uri) {
return new FileSystemStats({
isFile: true,
mtime: SESSION_START_TIME.toISOString(),
| javascript | {
"resource": ""
} |
q16768 | RemoteFile | train | function RemoteFile(protocol, fullPath, fileSystem) {
this._isFile = true;
this._isDirectory = false;
this.readOnly = true;
this._path = fullPath;
this._stat = _getStats(fullPath);
this._id = fullPath;
this._name = _getFileName(fullPath);
| javascript | {
"resource": ""
} |
q16769 | formatParameterHint | train | function formatParameterHint(params, appendSeparators, appendParameter, typesOnly) {
var result = "",
pendingOptional = false;
params.forEach(function (value, i) {
var param = value.type,
separators = "";
if (value.isOptional) {
// if... | javascript | {
"resource": ""
} |
q16770 | setDeferredTimeout | train | function setDeferredTimeout(deferred, delay) {
var timer = setTimeout(function () {
deferred.reject("timeout");
| javascript | {
"resource": ""
} |
q16771 | registerHandlersAndDomains | train | function registerHandlersAndDomains(ws, port) {
// Called if we succeed at the final setup
function success() {
self._ws.onclose = function () {
if (self._autoReconnect) {
var $promise = self.connect(true);
self.... | javascript | {
"resource": ""
} |
q16772 | success | train | function success() {
self._ws.onclose = function () {
if (self._autoReconnect) {
var $promise = self.connect(true);
self.trigger("close", $promise);
} else {
self._cleanup(); | javascript | {
"resource": ""
} |
q16773 | doConnect | train | function doConnect() {
attemptCount++;
attemptTimestamp = new Date();
attemptSingleConnect().then(
registerHandlersAndDomains, // succeded
function () { // failed this attempt, possibly try again
if (attemptCount < CONNECTION_ATTEMP... | javascript | {
"resource": ""
} |
q16774 | _wrapSelectedStatements | train | function _wrapSelectedStatements (wrapperName, err) {
var editor = EditorManager.getActiveEditor();
if (!editor) {
return;
}
initializeRefactoringSession(editor);
var startIndex = current.startIndex,
endIndex = current.endIndex,
selectedText =... | javascript | {
"resource": ""
} |
q16775 | createGettersAndSetters | train | function createGettersAndSetters() {
var editor = EditorManager.getActiveEditor();
if (!editor) {
return;
}
initializeRefactoringSession(editor);
var startIndex = current.startIndex,
endIndex = current.endIndex,
selectedText = current.selected... | javascript | {
"resource": ""
} |
q16776 | doSequentiallyInBackground | train | function doSequentiallyInBackground(items, fnProcessItem, maxBlockingTime, idleTime) {
maxBlockingTime = maxBlockingTime || 15;
idleTime = idleTime || 30;
var sliceStartTime = (new Date()).getTime();
return doSequentially(items, function (item, i) {
var result = new $.Defe... | javascript | {
"resource": ""
} |
q16777 | setGotoEnabled | train | function setGotoEnabled(gotoEnabled) {
CommandManager.get(Commands.NAVIGATE_GOTO_FIRST_PROBLEM). | javascript | {
"resource": ""
} |
q16778 | getProvidersForPath | train | function getProvidersForPath(filePath) {
var language = LanguageManager.getLanguageForPath(filePath).getId(),
context = PreferencesManager._buildContext(filePath, language),
installedProviders = getProvidersForLanguageId(language),
preferredProviders,
... | javascript | {
"resource": ""
} |
q16779 | getProviderIDsForLanguage | train | function getProviderIDsForLanguage(languageId) {
if (!_providers[languageId]) {
return [];
}
| javascript | {
"resource": ""
} |
q16780 | updatePanelTitleAndStatusBar | train | function updatePanelTitleAndStatusBar(numProblems, providersReportingProblems, aborted) {
var message, tooltip;
if (providersReportingProblems.length === 1) {
// don't show a header if there is only one provider available for this file type
$problemsPanelTable.find(".inspector-s... | javascript | {
"resource": ""
} |
q16781 | getProvidersForLanguageId | train | function getProvidersForLanguageId(languageId) {
var result = [];
if (_providers[languageId]) {
result = result.concat(_providers[languageId]);
}
| javascript | {
"resource": ""
} |
q16782 | updateListeners | train | function updateListeners() {
if (_enabled) {
// register our event listeners
MainViewManager
.on("currentFileChange.codeInspection", function () {
run();
});
DocumentManager
.on("currentDocumentLanguageChange... | javascript | {
"resource": ""
} |
q16783 | toggleEnabled | train | function toggleEnabled(enabled, doNotSave) {
if (enabled === undefined) {
enabled = !_enabled;
}
// Take no action when there is no change.
if (enabled === _enabled) {
return;
}
_enabled = enabled;
| javascript | {
"resource": ""
} |
q16784 | _firstNotWs | train | function _firstNotWs(doc, lineNum) {
var text = doc.getLine(lineNum);
if (text === null || text === undefined) {
| javascript | {
"resource": ""
} |
q16785 | prepareEditorForProvider | train | function prepareEditorForProvider(hostEditor, pos) {
var cursorLine, sel, startPos, endPos, startBookmark, endBookmark, currentMatch,
cm = hostEditor._codeMirror;
sel = hostEditor.getSelection();
if (sel.start.line !== sel.end.line) {
return {timingFunction: null, reason... | javascript | {
"resource": ""
} |
q16786 | refresh | train | function refresh(rebuild) {
_.forEach(_views, function (view) {
var top = view.$openFilesContainer.scrollTop();
if (rebuild) {
view._rebuildViewList(true);
| javascript | {
"resource": ""
} |
q16787 | _updateListItemSelection | train | function _updateListItemSelection(listItem, selectedFile) {
var shouldBeSelected = (selectedFile | javascript | {
"resource": ""
} |
q16788 | _isOpenAndDirty | train | function _isOpenAndDirty(file) {
// working set item might never have been opened; if so, then it's definitely not dirty
| javascript | {
"resource": ""
} |
q16789 | _suppressScrollShadowsOnAllViews | train | function _suppressScrollShadowsOnAllViews(disable) {
_.forEach(_views, function (view) {
if (disable) {
ViewUtils.removeScrollerShadow(view.$openFilesContainer[0], null);
} else if (view.$openFilesContainer[0].scrollHeight > | javascript | {
"resource": ""
} |
q16790 | _deactivateAllViews | train | function _deactivateAllViews(deactivate) {
_.forEach(_views, function (view) {
if (deactivate) {
if (view.$el.hasClass("active")) {
view.$el.removeClass("active").addClass("reactivate");
view.$openFilesList.trigger("selectionHide");
... | javascript | {
"resource": ""
} |
q16791 | _viewFromEl | train | function _viewFromEl($el) {
if (!$el.hasClass("working-set-view")) {
$el = $el.parents(".working-set-view");
}
| javascript | {
"resource": ""
} |
q16792 | scroll | train | function scroll($container, $el, dir, callback) {
var container = $container[0],
maxScroll = container.scrollHeight - container.clientHeight;
if (maxScroll && dir && !interval) {
// Scroll view if the mouse is over the first or last pixels of the container
... | javascript | {
"resource": ""
} |
q16793 | preDropCleanup | train | function preDropCleanup() {
window.onmousewheel = window.document.onmousewheel = null;
$(window).off(".wsvdragging");
if (dragged) {
$workingFilesContainer.removeClass("dragging");
$workingFilesContainer.find(".drag-show-as-selected... | javascript | {
"resource": ""
} |
q16794 | createWorkingSetViewForPane | train | function createWorkingSetViewForPane($container, paneId) {
var view = _views[paneId];
if (!view) {
| javascript | {
"resource": ""
} |
q16795 | _getPluginsForCurrentContext | train | function _getPluginsForCurrentContext() {
var curDoc = DocumentManager.getCurrentDocument();
if (curDoc) {
var languageId = curDoc.getLanguage().getId();
| javascript | {
"resource": ""
} |
q16796 | QuickOpenPlugin | train | function QuickOpenPlugin(name, languageIds, done, search, match, itemFocus, itemSelect, resultsFormatter, matcherOptions, label) {
this.name = name;
this.languageIds = languageIds;
this.done = done;
this.search = search;
this.match = match;
| javascript | {
"resource": ""
} |
q16797 | addQuickOpenPlugin | train | function addQuickOpenPlugin(pluginDef) {
var quickOpenProvider = new QuickOpenPlugin(
pluginDef.name,
pluginDef.languageIds,
pluginDef.done,
pluginDef.search,
pluginDef.match,
pluginDef.itemFocus,
plu... | javascript | {
"resource": ""
} |
q16798 | _filter | train | function _filter(file) {
return !LanguageManager.getLanguageForPath(file.fullPath).isBinary() || | javascript | {
"resource": ""
} |
q16799 | handleGetFile | train | function handleGetFile(file, text) {
var next = fileCallBacks[file];
if (next) {
try {
next(null, text);
} catch (e) {
| javascript | {
"resource": ""
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.