Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 248413 Details for
Bug 449074
Investigate creating / using a script mapping
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read
this important communication.
copy into FileMap.js
FileMap.txt (text/plain), 18.36 KB, created by
Eric Moffatt
on 2014-11-05 11:10:54 EST
(
hide
)
Description:
copy into FileMap.js
Filename:
MIME Type:
Creator:
Eric Moffatt
Created:
2014-11-05 11:10:54 EST
Size:
18.36 KB
patch
obsolete
>/******************************************************************************* > * @license > * Copyright (c) 2014 IBM Corporation and others. > * All rights reserved. This program and the accompanying materials are made > * available under the terms of the Eclipse Public License v1.0 > * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution > * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). > * > * Contributors: > * IBM Corporation - initial API and implementation > *******************************************************************************/ >/*eslint-env browser, amd*/ >/*global escape*/ >define([], function() { > var codeMapInput = '[' + >'{ "target":"androidapp" , "source": "org.eclipse.orion.client.ui/web/androidapp" },' + >'{ "target":"auth" , "source": "org.eclipse.orion.client.ui/web/auth" },' + >'{ "target":"browse" , "source": "org.eclipse.orion.client.ui/web/browse" },' + >'{ "target":"cfui" , "source": "org.eclipse.orion.client.cf/web/cfui" },' + >'{ "target":"chai" , "source": "org.eclipse.orion.client.core/web/chai" },' + >'{ "target":"compare" , "source": "org.eclipse.orion.client.ui/web/compare" },' + >'{ "target":"compare-tree" , "source": "org.eclipse.orion.client.ui/web/compare-tree" },' + >'{ "target":"content" , "source": "org.eclipse.orion.client.ui/web/content" },' + >'{ "target":"css" , "source": "org.eclipse.orion.client.ui/web/css" },' + >'{ "target":"csslint" , "source": "org.eclipse.orion.client.webtools/web/csslint" },' + >'{ "target":"doctrine" , "source": "org.eclipse.orion.client.javascript/web/doctrine" },' + >'{ "target":"edit" , "source": "org.eclipse.orion.client.ui/web/edit" },' + >'{ "target":"escope" , "source": "org.eclipse.orion.client.javascript/web/escope" },' + >'{ "target":"eslint" , "source": "org.eclipse.orion.client.javascript/web/eslint" },' + >'{ "target":"esprima" , "source": "org.eclipse.orion.client.javascript/web/esprima" },' + >'{ "target":"estraverse" , "source": "org.eclipse.orion.client.javascript/web/estraverse" },' + >'{ "target":"examplePages" , "source": "org.eclipse.orion.client.ui/web/" },' + >'{ "target":"examples/editor" , "source": "org.eclipse.orion.client.editor/web/examples" },' + >'{ "target":"font" , "source": "org.eclipse.orion.client.ui/web/font" },' + >'{ "target":"gcli" , "source": "org.eclipse.orion.client.ui/web/gcli" },' + >'{ "target":"git" , "source": "org.eclipse.orion.client.git/web/git" },' + >'{ "target":"help" , "source": "org.eclipse.orion.client.help/web/help" },' + >'{ "target":"helpContent" , "source": "org.eclipse.orion.client.help/web/helpContent" },' + >'{ "target":"htmlparser" , "source": "org.eclipse.orion.client.webtools/web/htmlparser" },' + >'{ "target":"images" , "source": "org.eclipse.orion.client.ui/web/images" },' + >'{ "target":"import" , "source": "org.eclipse.orion.client.ui/web/import" },' + >'{ "target":"javascript" , "source": "org.eclipse.orion.client.javascript/web/javascript" },' + >'{ "target":"jsdiff" , "source": "org.eclipse.orion.client.ui/web/jsdiff" },' + >'{ "target":"js-tests/core" , "source": "org.eclipse.orion.client.core/web/js-tests/core" },' + >'{ "target":"js-tests/editor" , "source": "org.eclipse.orion.client.editor/web/js-tests/editor" },' + >'{ "target":"js-tests/javascript" , "source": "org.eclipse.orion.client.javascript/web/js-tests/javascript" },' + >'{ "target":"js-tests/ui" , "source": "org.eclipse.orion.client.ui/web/js-tests/ui" },' + >'{ "target":"js-tests/webtools" , "source": "org.eclipse.orion.client.webtools/web/js-tests/webtools" },' + >'{ "target":"marked" , "source": "org.eclipse.orion.client.ui/web/marked" },' + >'{ "target":"mixloginstatic" , "source": "org.eclipse.orion.client.ui/web/mixloginstatic" },' + >'{ "target":"mocha" , "source": "org.eclipse.orion.client.core/web/mocha" },' + >'{ "target":"operations" , "source": "org.eclipse.orion.client.ui/web/operations" },' + >'{ "target":"orion/cfui" , "source": "org.eclipse.orion.client.cf/web/orion/cfui" },' + >'{ "target":"orion/Base64.js" , "source": "org.eclipse.orion.client.core/web/orion/Base64.js" },' + >'{ "target":"orion/blameAnnotations.js" , "source": "org.eclipse.orion.client.core/web/orion/blameAnnotations.js" },' + >'{ "target":"orion/bootstrap.js" , "source": "org.eclipse.orion.client.core/web/orion/bootstrap.js" },' + >'{ "target":"orion/config.js" , "source": "org.eclipse.orion.client.core/web/orion/config.js" },' + >'{ "target":"orion/contentTypes.js" , "source": "org.eclipse.orion.client.core/web/orion/contentTypes.js" },' + >'{ "target":"orion/Deferred.js" , "source": "org.eclipse.orion.client.core/web/orion/Deferred.js" },' + >'{ "target":"orion/encoding-shim.js" , "source": "org.eclipse.orion.client.core/web/orion/encoding-shim.js" },' + >'{ "target":"orion/EventTarget.js" , "source": "org.eclipse.orion.client.core/web/orion/EventTarget.js" },' + >'{ "target":"orion/fileClient.js" , "source": "org.eclipse.orion.client.core/web/orion/fileClient.js" },' + >'{ "target":"orion/fileUtils.js" , "source": "org.eclipse.orion.client.core/web/orion/fileUtils.js" },' + >'{ "target":"orion/form.js" , "source": "org.eclipse.orion.client.core/web/orion/form.js" },' + >'{ "target":"orion/HTMLTemplates-shim.js" , "source": "org.eclipse.orion.client.core/web/orion/HTMLTemplates-shim.js" },' + >'{ "target":"orion/i18n.js" , "source": "org.eclipse.orion.client.core/web/orion/i18n.js" },' + >'{ "target":"orion/i18nUtil.js" , "source": "org.eclipse.orion.client.core/web/orion/i18nUtil.js" },' + >'{ "target":"orion/keyBinding.js" , "source": "org.eclipse.orion.client.core/web/orion/keyBinding.js" },' + >'{ "target":"orion/log.js" , "source": "org.eclipse.orion.client.core/web/orion/log.js" },' + >'{ "target":"orion/metatype.js" , "source": "org.eclipse.orion.client.core/web/orion/metatype.js" },' + >'{ "target":"orion/object.js" , "source": "org.eclipse.orion.client.core/web/orion/object.js" },' + >'{ "target":"orion/operation.js" , "source": "org.eclipse.orion.client.core/web/orion/operation.js" },' + >'{ "target":"orion/operationsClient.js" , "source": "org.eclipse.orion.client.core/web/orion/operationsClient.js" },' + >'{ "target":"orion/plugin.js" , "source": "org.eclipse.orion.client.core/web/orion/plugin.js" },' + >'{ "target":"orion/pluginregistry.js" , "source": "org.eclipse.orion.client.core/web/orion/pluginregistry.js" },' + >'{ "target":"orion/preferences.js" , "source": "org.eclipse.orion.client.core/web/orion/preferences.js" },' + >'{ "target":"orion/problems.js" , "source": "org.eclipse.orion.client.core/web/orion/problems.js" },' + >'{ "target":"orion/projectClient.js" , "source": "org.eclipse.orion.client.core/web/orion/projectClient.js" },' + >'{ "target":"orion/regex.js" , "source": "org.eclipse.orion.client.core/web/orion/regex.js" },' + >'{ "target":"orion/serialize.js" , "source": "org.eclipse.orion.client.core/web/orion/serialize.js" },' + >'{ "target":"orion/serviceregistry.js" , "source": "org.eclipse.orion.client.core/web/orion/serviceregistry.js" },' + >'{ "target":"orion/serviceTracker.js" , "source": "org.eclipse.orion.client.core/web/orion/serviceTracker.js" },' + >'{ "target":"orion/Storage.js" , "source": "org.eclipse.orion.client.core/web/orion/Storage.js" },' + >'{ "target":"orion/testHelper.js" , "source": "org.eclipse.orion.client.core/web/orion/testHelper.js" },' + >'{ "target":"orion/URITemplate.js" , "source": "org.eclipse.orion.client.core/web/orion/URITemplate.js" },' + >'{ "target":"orion/url.js" , "source": "org.eclipse.orion.client.core/web/orion/url.js" },' + >'{ "target":"orion/URL-shim.js" , "source": "org.eclipse.orion.client.core/web/orion/URL-shim.js" },' + >'{ "target":"orion/util.js" , "source": "org.eclipse.orion.client.core/web/orion/util.js" },' + >'{ "target":"orion/xhr.js" , "source": "org.eclipse.orion.client.core/web/orion/xhr.js" },' + >'{ "target":"orion/editor" , "source": "org.eclipse.orion.client.editor/web/orion/editor" },' + >'{ "target":"orion/git" , "source": "org.eclipse.orion.client.git/web/orion/git" },' + >'{ "target":"orion/help" , "source": "org.eclipse.orion.client.help/web/orion/help" },' + >'{ "target":"orion/banner" , "source": "org.eclipse.orion.client.ui/web/orion/banner" },' + >'{ "target":"orion/compare" , "source": "org.eclipse.orion.client.ui/web/orion/compare" },' + >'{ "target":"orion/content" , "source": "org.eclipse.orion.client.ui/web/orion/content" },' + >'{ "target":"orion/crawler" , "source": "org.eclipse.orion.client.ui/web/orion/crawler" },' + >'{ "target":"orion/edit" , "source": "org.eclipse.orion.client.ui/web/orion/edit" },' + >'{ "target":"orion/explorers" , "source": "org.eclipse.orion.client.ui/web/orion/explorers" },' + >'{ "target":"orion/globalsearch" , "source": "org.eclipse.orion.client.ui/web/orion/globalsearch" },' + >'{ "target":"orion/inputCompletion" , "source": "org.eclipse.orion.client.ui/web/orion/inputCompletion" },' + >'{ "target":"orion/mixloginstatic" , "source": "org.eclipse.orion.client.ui/web/orion/mixloginstatic" },' + >'{ "target":"orion/navigate" , "source": "org.eclipse.orion.client.ui/web/orion/navigate" },' + >'{ "target":"orion/nls" , "source": "org.eclipse.orion.client.ui/web/orion/nls" },' + >'{ "target":"orion/operations" , "source": "org.eclipse.orion.client.ui/web/orion/operations" },' + >'{ "target":"orion/projects" , "source": "org.eclipse.orion.client.ui/web/orion/projects" },' + >'{ "target":"orion/search" , "source": "org.eclipse.orion.client.ui/web/orion/search" },' + >'{ "target":"orion/searchAndReplace" , "source": "org.eclipse.orion.client.ui/web/orion/searchAndReplace" },' + >'{ "target":"orion/settings" , "source": "org.eclipse.orion.client.ui/web/orion/settings" },' + >'{ "target":"orion/shell" , "source": "org.eclipse.orion.client.ui/web/orion/shell" },' + >'{ "target":"orion/sites" , "source": "org.eclipse.orion.client.ui/web/orion/sites" },' + >'{ "target":"orion/ssh" , "source": "org.eclipse.orion.client.ui/web/orion/ssh" },' + >'{ "target":"orion/stringexternalizer" , "source": "org.eclipse.orion.client.ui/web/orion/stringexternalizer" },' + >'{ "target":"orion/terminal" , "source": "org.eclipse.orion.client.ui/web/orion/terminal" },' + >'{ "target":"orion/webui" , "source": "org.eclipse.orion.client.ui/web/orion/webui" },' + >'{ "target":"orion/widgets" , "source": "org.eclipse.orion.client.ui/web/orion/widgets" },' + >'{ "target":"orion/profile" , "source": "org.eclipse.orion.client.users/web/orion/profile" },' + >'{ "target":"pako" , "source": "org.eclipse.orion.client.core/web/pako" },' + >'{ "target":"plugins/helpPlugin.html" , "source": "org.eclipse.orion.client.help/web/plugins/helpPlugin.html" },' + >'{ "target":"plugins/helpPlugin.js" , "source": "org.eclipse.orion.client.help/web/plugins/helpPlugin.js" },' + >'{ "target":"plugins/contentTemplates" , "source": "org.eclipse.orion.client.ui/web/plugins/contentTemplates" },' + >'{ "target":"plugins/filePlugin" , "source": "org.eclipse.orion.client.ui/web/plugins/filePlugin" },' + >'{ "target":"plugins/images" , "source": "org.eclipse.orion.client.ui/web/plugins/images" },' + >'{ "target":"plugins/languages" , "source": "org.eclipse.orion.client.ui/web/plugins/languages" },' + >'{ "target":"plugins/site" , "source": "org.eclipse.orion.client.ui/web/plugins/site" },' + >'{ "target":"plugins/asyncUpperPlugin.html" , "source": "org.eclipse.orion.client.ui/web/plugins/asyncUpperPlugin.html" },' + >'{ "target":"plugins/authenticationPlugin.html" , "source": "org.eclipse.orion.client.ui/web/plugins/authenticationPlugin.html" },' + >'{ "target":"plugins/authenticationPlugin.js" , "source": "org.eclipse.orion.client.ui/web/plugins/authenticationPlugin.js" },' + >'{ "target":"plugins/commentPlugin.html" , "source": "org.eclipse.orion.client.ui/web/plugins/commentPlugin.html" },' + >'{ "target":"plugins/delimiterPlugin.html" , "source": "org.eclipse.orion.client.ui/web/plugins/delimiterPlugin.html" },' + >'{ "target":"plugins/delimiterPlugin.js" , "source": "org.eclipse.orion.client.ui/web/plugins/delimiterPlugin.js" },' + >'{ "target":"plugins/fileClientPlugin.html" , "source": "org.eclipse.orion.client.ui/web/plugins/fileClientPlugin.html" },' + >'{ "target":"plugins/fileClientPlugin.js" , "source": "org.eclipse.orion.client.ui/web/plugins/fileClientPlugin.js" },' + >'{ "target":"plugins/GerritFilePlugin.html" , "source": "org.eclipse.orion.client.ui/web/plugins/GerritFilePlugin.html" },' + >'{ "target":"plugins/GerritFilePlugin.js" , "source": "org.eclipse.orion.client.ui/web/plugins/GerritFilePlugin.js" },' + >'{ "target":"plugins/gitBlamePlugin.html" , "source": "org.eclipse.orion.client.ui/web/plugins/gitBlamePlugin.html" },' + >'{ "target":"plugins/gitBlamePlugin.js" , "source": "org.eclipse.orion.client.ui/web/plugins/gitBlamePlugin.js" },' + >'{ "target":"plugins/GitHubFilePlugin.html" , "source": "org.eclipse.orion.client.ui/web/plugins/GitHubFilePlugin.html" },' + >'{ "target":"plugins/GitHubFilePlugin.js" , "source": "org.eclipse.orion.client.ui/web/plugins/GitHubFilePlugin.js" },' + >'{ "target":"plugins/HoverTestPlugin2.html" , "source": "org.eclipse.orion.client.ui/web/plugins/HoverTestPlugin2.html" },' + >'{ "target":"plugins/HoverTestPlugin2.js" , "source": "org.eclipse.orion.client.ui/web/plugins/HoverTestPlugin2.js" },' + >'{ "target":"plugins/HTML5LocalFilePlugin.html" , "source": "org.eclipse.orion.client.ui/web/plugins/HTML5LocalFilePlugin.html" },' + >'{ "target":"plugins/jslintPlugin.html" , "source": "org.eclipse.orion.client.ui/web/plugins/jslintPlugin.html" },' + >'{ "target":"plugins/jslintPlugin.js" , "source": "org.eclipse.orion.client.ui/web/plugins/jslintPlugin.js" },' + >'{ "target":"plugins/lowerPlugin.html" , "source": "org.eclipse.orion.client.ui/web/plugins/lowerPlugin.html" },' + >'{ "target":"plugins/nonnlsPlugin.html" , "source": "org.eclipse.orion.client.ui/web/plugins/nonnlsPlugin.html" },' + >'{ "target":"plugins/nonnlsPlugin.js" , "source": "org.eclipse.orion.client.ui/web/plugins/nonnlsPlugin.js" },' + >'{ "target":"plugins/npmPlugin.html" , "source": "org.eclipse.orion.client.ui/web/plugins/npmPlugin.html" },' + >'{ "target":"plugins/npmPlugin.js" , "source": "org.eclipse.orion.client.ui/web/plugins/npmPlugin.js" },' + >'{ "target":"plugins/pageLinksPlugin.html" , "source": "org.eclipse.orion.client.ui/web/plugins/pageLinksPlugin.html" },' + >'{ "target":"plugins/pageLinksPlugin.js" , "source": "org.eclipse.orion.client.ui/web/plugins/pageLinksPlugin.js" },' + >'{ "target":"plugins/preferencesPlugin.html" , "source": "org.eclipse.orion.client.ui/web/plugins/preferencesPlugin.html" },' + >'{ "target":"plugins/preferencesPlugin.js" , "source": "org.eclipse.orion.client.ui/web/plugins/preferencesPlugin.js" },' + >'{ "target":"plugins/sampleCommandsPlugin.html" , "source": "org.eclipse.orion.client.ui/web/plugins/sampleCommandsPlugin.html" },' + >'{ "target":"plugins/sampleFilePlugin.html" , "source": "org.eclipse.orion.client.ui/web/plugins/sampleFilePlugin.html" },' + >'{ "target":"plugins/sampleSearchProposalPlugin_filtered.html" , "source": "org.eclipse.orion.client.ui/web/plugins/sampleSearchProposalPlugin_filtered.html" },' + >'{ "target":"plugins/sampleSearchProposalPlugin_notFiltered.html" , "source": "org.eclipse.orion.client.ui/web/plugins/sampleSearchProposalPlugin_notFiltered.html" },' + >'{ "target":"plugins/sampleSearchProposalPlugin_pageLinks.html" , "source": "org.eclipse.orion.client.ui/web/plugins/sampleSearchProposalPlugin_pageLinks.html" },' + >'{ "target":"plugins/taskPlugin.html" , "source": "org.eclipse.orion.client.ui/web/plugins/taskPlugin.html" },' + >'{ "target":"plugins/taskPlugin.js" , "source": "org.eclipse.orion.client.ui/web/plugins/taskPlugin.js" },' + >'{ "target":"plugins/toRGBPlugin.html" , "source": "org.eclipse.orion.client.ui/web/plugins/toRGBPlugin.html" },' + >'{ "target":"plugins/unittestPlugin.html" , "source": "org.eclipse.orion.client.ui/web/plugins/unittestPlugin.html" },' + >'{ "target":"plugins/upperPlugin.html" , "source": "org.eclipse.orion.client.ui/web/plugins/upperPlugin.html" },' + >'{ "target":"plugins/webdavFilePlugin.html" , "source": "org.eclipse.orion.client.ui/web/plugins/webdavFilePlugin.html" },' + >'{ "target":"plugins/webEditingPlugin.html" , "source": "org.eclipse.orion.client.ui/web/plugins/webEditingPlugin.html" },' + >'{ "target":"plugins/webEditingPlugin.js" , "source": "org.eclipse.orion.client.ui/web/plugins/webEditingPlugin.js" },' + >'{ "target":"plugins/xhrPlugin.html" , "source": "org.eclipse.orion.client.ui/web/plugins/xhrPlugin.html" },' + >'{ "target":"profile" , "source": "org.eclipse.orion.client.users/web/profile" },' + >'{ "target":"requirejs" , "source": "org.eclipse.orion.client.core/web/requirejs" },' + >'{ "target":"settings" , "source": "org.eclipse.orion.client.ui/web/settings" },' + >'{ "target":"shell" , "source": "org.eclipse.orion.client.ui/web/shell" },' + >'{ "target":"sites" , "source": "org.eclipse.orion.client.ui/web/sites" },' + >'{ "target":"stringexternalizer" , "source": "org.eclipse.orion.client.ui/web/stringexternalizer" },' + >'{ "target":"terminal" , "source": "org.eclipse.orion.client.ui/web/terminal" },' + >'{ "target":"webapp" , "source": "org.eclipse.orion.client.ui/web/webapp" },' + >'{ "target":"webtools" , "source": "org.eclipse.orion.client.webtools/web/webtools" }' + >']'; > var codeMap = JSON.parse(codeMapInput); > > var testStrings = [ > "orion/Deferred.js", > "edit/content/images/string.png" > ]; > > function findMatch(path) { > var retVar; > codeMap.forEach(function(entry){ > if (entry.target === path) { > retVar = entry.source; > return; > } > }); > return retVar; > } > > function buildSubPaths(segments, trimCount) { > var newPathname = segments[0]; > for (var i = 1; i < (segments.length-trimCount); i++) { > newPathname += "/"; > newPathname += segments[i]; > } > var trimmedPath = ""; > for (i = (segments.length-trimCount); i < segments.length; i++) { > trimmedPath += "/"; > trimmedPath += segments[i]; > } > return {candidate: newPathname, trimmed: trimmedPath}; > } > > function getWSPath(deployedPath) { > var segments = deployedPath.split('/'); > var trimCount = -1; > var match; > while (!match && (trimCount < segments.length)) { > trimCount++; > var splitPath = buildSubPaths(segments, trimCount); > match = findMatch(splitPath.candidate); > } > if (match) { > match = "bundles/" + match; > match += splitPath.trimmed; > } > return match; > } > > return {getWSPath: getWSPath}; >});
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 449074
:
248230
| 248413