[Bug 405826] rename constructor ContentTypeService to ContentTypeRegistry
diff --git a/bundles/org.eclipse.orion.client.core/web/orion/contentTypes.js b/bundles/org.eclipse.orion.client.core/web/orion/contentTypes.js
index fa867f3..87b0ccb 100644
--- a/bundles/org.eclipse.orion.client.core/web/orion/contentTypes.js
+++ b/bundles/org.eclipse.orion.client.core/web/orion/contentTypes.js
@@ -55,7 +55,7 @@
 	}
 
 	/**
-	 * @name orion.core.ContentTypeService
+	 * @name orion.core.ContentTypeRegistry
 	 * @class A service for querying {@link orion.core.ContentType}s.
 	 * @description A service for querying {@link orion.core.ContentType}s. Clients should request the <code>"orion.core.contentTypeRegistry"</code>
 	 * service from the {@link orion.serviceregistry.ServiceRegistry} rather than instantiate this class directly. This constructor is 
@@ -63,7 +63,7 @@
 	 * @param {orion.serviceregistry.ServiceRegistry} serviceRegistry The service registry to use for looking up registered content types
 	 * and for registering this service.
 	 */
-	function ContentTypeService(serviceRegistry) {
+	function ContentTypeRegistry(serviceRegistry) {
 		function buildMap(serviceRegistry) {
 			function array(obj) {
 				if (obj === null || typeof obj === "undefined") { return []; } //$NON-NLS-0$
@@ -98,7 +98,7 @@
 		this.map = buildMap(serviceRegistry);
 		serviceRegistry.registerService(SERVICE_ID, this);
 	}
-	ContentTypeService.prototype = /** @lends orion.core.ContentTypeService.prototype */ {
+	ContentTypeRegistry.prototype = /** @lends orion.core.ContentTypeRegistry.prototype */ {
 		/**
 		 * Gets all the ContentTypes in the registry.
 		 * @returns {orion.core.ContentType[]} An array of all registered ContentTypes.
@@ -183,7 +183,7 @@
 		}
 	};
 	return {
-		ContentTypeService: ContentTypeService,
+		ContentTypeRegistry: ContentTypeRegistry,
 		getFilenameContentType: getFilenameContentType
 	};
 });
\ No newline at end of file
diff --git a/bundles/org.eclipse.orion.client.git/web/git/git-commit.js b/bundles/org.eclipse.orion.client.git/web/git/git-commit.js
index 23591d0..7ec9a52 100644
--- a/bundles/org.eclipse.orion.client.git/web/git/git-commit.js
+++ b/bundles/org.eclipse.orion.client.git/web/git/git-commit.js
@@ -38,7 +38,7 @@
 			var linkService = new mLinks.TextLinkService({serviceRegistry: serviceRegistry});
 			var gitClient = new mGitClient.GitService(serviceRegistry);
 			var fileClient = new mFileClient.FileClient(serviceRegistry);
-			var contentTypeService = new mContentTypes.ContentTypeService(serviceRegistry);
+			var contentTypeService = new mContentTypes.ContentTypeRegistry(serviceRegistry);
 			var searcher = new mSearchClient.Searcher({
 				serviceRegistry: serviceRegistry,
 				commandService: commandRegistry,
diff --git a/bundles/org.eclipse.orion.client.git/web/git/git-status.js b/bundles/org.eclipse.orion.client.git/web/git/git-status.js
index 918b37d..a7d9ae6 100644
--- a/bundles/org.eclipse.orion.client.git/web/git/git-status.js
+++ b/bundles/org.eclipse.orion.client.git/web/git/git-status.js
@@ -37,7 +37,7 @@
 		var linkService = new mLinks.TextLinkService({serviceRegistry: serviceRegistry});
 		var gitClient = new mGitClient.GitService(serviceRegistry);
 		var fileClient = new mFileClient.FileClient(serviceRegistry);
-		var contentTypeService = new mContentTypes.ContentTypeService(serviceRegistry);
+		var contentTypeService = new mContentTypes.ContentTypeRegistry(serviceRegistry);
 		var searcher = new mSearchClient.Searcher({serviceRegistry: serviceRegistry, commandService: commandRegistry, fileService: fileClient});
 
 		var explorer = new mGitStatusExplorer.GitStatusExplorer(serviceRegistry, commandRegistry, linkService, /* selection */ null, "artifacts", "pageActions", null, "itemLevelCommands"); //$NON-NLS-2$ //$NON-NLS-1$ //$NON-NLS-0$
diff --git a/bundles/org.eclipse.orion.client.git/web/git/reviewRequest.js b/bundles/org.eclipse.orion.client.git/web/git/reviewRequest.js
index b57e686..c8468dd 100644
--- a/bundles/org.eclipse.orion.client.git/web/git/reviewRequest.js
+++ b/bundles/org.eclipse.orion.client.git/web/git/reviewRequest.js
@@ -34,7 +34,7 @@
 		});
 		var gitClient = new mGitClient.GitService(serviceRegistry);
 		var fileClient = new mFileClient.FileClient(serviceRegistry);
-		var contentTypeService = new mContentTypes.ContentTypeService(serviceRegistry);
+		var contentTypeService = new mContentTypes.ContentTypeRegistry(serviceRegistry);
 		var searcher = new mSearchClient.Searcher({ serviceRegistry : serviceRegistry,
 		commandService : commandRegistry,
 		fileService : fileClient
diff --git a/bundles/org.eclipse.orion.client.ui/web/compare-tree/compare-tree.js b/bundles/org.eclipse.orion.client.ui/web/compare-tree/compare-tree.js
index 816545d..0d7030a 100644
--- a/bundles/org.eclipse.orion.client.ui/web/compare-tree/compare-tree.js
+++ b/bundles/org.eclipse.orion.client.ui/web/compare-tree/compare-tree.js
@@ -20,7 +20,7 @@
 		var commandRegistry = new mCommandRegistry.CommandRegistry({ });
 		// File operations
 		var fileClient = new mFileClient.FileClient(serviceRegistry);
-		new mContentTypes.ContentTypeService(serviceRegistry);
+		new mContentTypes.ContentTypeRegistry(serviceRegistry);
 		var searcher = new mSearchClient.Searcher({
 			serviceRegistry: serviceRegistry, commandService: commandRegistry, fileService: fileClient
 		});
diff --git a/bundles/org.eclipse.orion.client.ui/web/compare/compare.js b/bundles/org.eclipse.orion.client.ui/web/compare/compare.js
index c16a8cc..031d61d 100644
--- a/bundles/org.eclipse.orion.client.ui/web/compare/compare.js
+++ b/bundles/org.eclipse.orion.client.ui/web/compare/compare.js
@@ -20,7 +20,7 @@
 		var commandService = new mCommandRegistry.CommandRegistry({ });
 		// File operations
 		var fileClient = new mFileClient.FileClient(serviceRegistry);
-		var contentTypeService = new mContentTypes.ContentTypeService(serviceRegistry);
+		var contentTypeService = new mContentTypes.ContentTypeRegistry(serviceRegistry);
 		var searcher = new mSearchClient.Searcher({
 			serviceRegistry: serviceRegistry, commandService: commandService, fileService: fileClient
 		});
diff --git a/bundles/org.eclipse.orion.client.ui/web/edit/setup.js b/bundles/org.eclipse.orion.client.ui/web/edit/setup.js
index 6e94bf6..24b98e8 100644
--- a/bundles/org.eclipse.orion.client.ui/web/edit/setup.js
+++ b/bundles/org.eclipse.orion.client.ui/web/edit/setup.js
@@ -73,7 +73,7 @@
 		// Editor needs additional services
 		problemService = new mProblems.ProblemService(serviceRegistry);
 		outlineService = new mOutliner.OutlineService({serviceRegistry: serviceRegistry, preferences: preferences});
-		contentTypeRegistry = new mContentTypes.ContentTypeService(serviceRegistry);
+		contentTypeRegistry = new mContentTypes.ContentTypeRegistry(serviceRegistry);
 		fileClient = new mFileClient.FileClient(serviceRegistry);
 		searcher = new mSearchClient.Searcher({serviceRegistry: serviceRegistry, commandService: commandRegistry, fileService: fileClient});
 		blameService = new mBlameAnnotation.BlameService(serviceRegistry);
diff --git a/bundles/org.eclipse.orion.client.ui/web/js-tests/contentTypes/testcase.js b/bundles/org.eclipse.orion.client.ui/web/js-tests/contentTypes/testcase.js
index 10aa9e8..0bb07e9 100644
--- a/bundles/org.eclipse.orion.client.ui/web/js-tests/contentTypes/testcase.js
+++ b/bundles/org.eclipse.orion.client.ui/web/js-tests/contentTypes/testcase.js
@@ -96,7 +96,7 @@
 		mockRegistry._registerServiceProvider("orion.core.contenttype", {}, {
 				contentTypes: basicTypes
 			});
-		contentTypeService = new contentTypesModule.ContentTypeService(mockRegistry);
+		contentTypeService = new contentTypesModule.ContentTypeRegistry(mockRegistry);
 		testbody(mockRegistry, contentTypeService, basicTypes);
 	}
 
@@ -203,7 +203,7 @@
 		mockRegistry._registerServiceProvider("orion.core.contenttype", {}, {
 			contentTypes: [ bad ]
 		});
-		var contentTypeService = new contentTypesModule.ContentTypeService(mockRegistry);
+		var contentTypeService = new contentTypesModule.ContentTypeRegistry(mockRegistry);
 		assert.throws(function() {
 				contentTypeService.isExtensionOf(bad, bad);
 			}, Error, "Cycle detected");
diff --git a/bundles/org.eclipse.orion.client.ui/web/navigate/table.js b/bundles/org.eclipse.orion.client.ui/web/navigate/table.js
index a7d6c0a..ee12326 100644
--- a/bundles/org.eclipse.orion.client.ui/web/navigate/table.js
+++ b/bundles/org.eclipse.orion.client.ui/web/navigate/table.js
@@ -39,7 +39,7 @@
 			children:[]
 		};
 				
-		var contentTypeService = new mContentTypes.ContentTypeService(serviceRegistry);
+		var contentTypeService = new mContentTypes.ContentTypeRegistry(serviceRegistry);
 		
 		var explorer = new mExplorerTable.FileExplorer({
 				serviceRegistry: serviceRegistry, 
diff --git a/bundles/org.eclipse.orion.client.ui/web/orion/editorCommands.js b/bundles/org.eclipse.orion.client.ui/web/orion/editorCommands.js
index 3a0a7e9..b720a73 100644
--- a/bundles/org.eclipse.orion.client.ui/web/orion/editorCommands.js
+++ b/bundles/org.eclipse.orion.client.ui/web/orion/editorCommands.js
@@ -440,7 +440,7 @@
 				var contentTypeService = serviceRegistry.getService("orion.core.contentTypeRegistry"); //$NON-NLS-0$
 				//TODO Shouldn't really be making service selection decisions at this level. See bug 337740
 				if (!contentTypeService) {
-					contentTypeService = new mContentTypes.ContentTypeService(serviceRegistry);
+					contentTypeService = new mContentTypes.ContentTypeRegistry(serviceRegistry);
 					contentTypeService = serviceRegistry.getService("orion.core.contentTypeRegistry"); //$NON-NLS-0$
 				}
 				return contentTypeService.getContentTypes().then(function(ct) {
diff --git a/bundles/org.eclipse.orion.client.ui/web/orion/explorers/navigatorRenderer.js b/bundles/org.eclipse.orion.client.ui/web/orion/explorers/navigatorRenderer.js
index 00d2393..642b466 100644
--- a/bundles/org.eclipse.orion.client.ui/web/orion/explorers/navigatorRenderer.js
+++ b/bundles/org.eclipse.orion.client.ui/web/orion/explorers/navigatorRenderer.js
@@ -145,7 +145,7 @@
 	 * @param {Object} options

 	 * @param {orion.explorer.Explorer} explorer

 	 * @param {orion.commandregistry.CommandRegistry} commandRegistry

-	 * @param {orion.core.ContentTypeService} contentTypeService

+	 * @param {orion.core.ContentTypeRegistry} contentTypeService

 	 */

 	function NavigatorRenderer (options, explorer, commandService, contentTypeService) {

 		this.explorer = explorer;

diff --git a/bundles/org.eclipse.orion.client.ui/web/orion/extensionCommands.js b/bundles/org.eclipse.orion.client.ui/web/orion/extensionCommands.js
index 94a377f..c11e634 100644
--- a/bundles/org.eclipse.orion.client.ui/web/orion/extensionCommands.js
+++ b/bundles/org.eclipse.orion.client.ui/web/orion/extensionCommands.js
@@ -477,7 +477,7 @@
 	 * @name orion.extensionCommands.createFileCommands
 	 * @function
 	 * @param {orion.serviceregistry.ServiceRegistry} serviceRegistry
-	 * @param {orion.core.ContentTypeService} [contentTypeRegistry] If not provided, will be obtained from the serviceRegistry.
+	 * @param {orion.core.ContentTypeRegistry} [contentTypeRegistry] If not provided, will be obtained from the serviceRegistry.
 	 * @param {String} [includeNavCommands="global"] What kinds of <code>orion.navigate.command</code> contributions to include in the list of returned file commands.
 	 * Allowed values are:
 	 * <dl>
@@ -579,7 +579,7 @@
 	 * @function
 	 * @param {orion.serviceregistry.ServiceRegistry} serviceRegistry
 	 * @param {orion.commandregistry.CommandRegistry} [commandRegistry]
-	 * @param {orion.core.ContentTypeService} [contentTypeRegistry] If not provided, will be obtained from the serviceRegistry.
+	 * @param {orion.core.ContentTypeRegistry} [contentTypeRegistry] If not provided, will be obtained from the serviceRegistry.
 	 * @returns {orion.Promise} A promise resolving to an {@link orion.commands.Command[]} giving an array of file commands.
 	 */
 	extensionCommandUtils.createOpenWithCommands = function(serviceRegistry, contentTypeService, commandRegistry) {
diff --git a/bundles/org.eclipse.orion.client.ui/web/orion/fileCommands.js b/bundles/org.eclipse.orion.client.ui/web/orion/fileCommands.js
index de4b3e5..6781385 100644
--- a/bundles/org.eclipse.orion.client.ui/web/orion/fileCommands.js
+++ b/bundles/org.eclipse.orion.client.ui/web/orion/fileCommands.js
@@ -522,7 +522,7 @@
 			});
 		commandService.addCommand(renameCommand);
 		
-		var contentTypeService = new mContentTypes.ContentTypeService(serviceRegistry);
+		var contentTypeService = new mContentTypes.ContentTypeRegistry(serviceRegistry);
 		var compareWithEachOtherCommand = new mCommands.Command({
 				name: messages["Compare with each other"],
 				tooltip: messages["Compare the selected 2 files with each other"],
diff --git a/bundles/org.eclipse.orion.client.ui/web/orion/globalCommands.js b/bundles/org.eclipse.orion.client.ui/web/orion/globalCommands.js
index 948b34b..217bef1 100644
--- a/bundles/org.eclipse.orion.client.ui/web/orion/globalCommands.js
+++ b/bundles/org.eclipse.orion.client.ui/web/orion/globalCommands.js
@@ -221,7 +221,7 @@
 			var contentTypeService = serviceRegistry.getService("orion.core.contentTypeRegistry"); //$NON-NLS-0$
 			// TODO Shouldn't really be making service selection decisions at this level. See bug 337740
 			if (!contentTypeService) {
-				contentTypeService = new mContentTypes.ContentTypeService(serviceRegistry);
+				contentTypeService = new mContentTypes.ContentTypeRegistry(serviceRegistry);
 				contentTypeService = serviceRegistry.getService("orion.core.contentTypeRegistry"); //$NON-NLS-0$
 			}
 			return contentTypeService.getContentTypes().then(function (ct) {
diff --git a/bundles/org.eclipse.orion.client.ui/web/orion/globalSearch/advSearchOptContainer.js b/bundles/org.eclipse.orion.client.ui/web/orion/globalSearch/advSearchOptContainer.js
index ec661c1..7a13d1b 100644
--- a/bundles/org.eclipse.orion.client.ui/web/orion/globalSearch/advSearchOptContainer.js
+++ b/bundles/org.eclipse.orion.client.ui/web/orion/globalSearch/advSearchOptContainer.js
@@ -89,7 +89,7 @@
 		this._parentDiv = parentDiv;
 		var contentTypeService = this._serviceRegistry.getService("orion.core.contentTypeRegistry"); //$NON-NLS-0$
 		if(!contentTypeService){
-			contentTypeService = new mContentTypes.ContentTypeService(this._serviceRegistry);
+			contentTypeService = new mContentTypes.ContentTypeRegistry(this._serviceRegistry);
 			this.contentTypesCache = contentTypeService.getContentTypes();
 			this._render();
 		} else {
diff --git a/bundles/org.eclipse.orion.client.ui/web/orion/highlight.js b/bundles/org.eclipse.orion.client.ui/web/orion/highlight.js
index 2370869..0de6a2f 100644
--- a/bundles/org.eclipse.orion.client.ui/web/orion/highlight.js
+++ b/bundles/org.eclipse.orion.client.ui/web/orion/highlight.js
@@ -16,7 +16,7 @@
 	 * Returns a promise that will provide a styler for the given content type.

 	 * @static

 	 * @param {orion.serviceregistry.ServiceRegistry} serviceRegistry

-	 * @param {orion.core.ContentTypeService} contentTypeService

+	 * @param {orion.core.ContentTypeRegistry} contentTypeService

 	 * @param {orion.core.ContentType} contentType

 	 * @param {orion.editor.TextView} textView

 	 * @param {orion.editor.AnnotationModel} annotationModel

@@ -110,7 +110,7 @@
 	 * @name orion.highlight.SyntaxHighlighter

 	 * @class

 	 * @description 

-	 * <p>Requires service {@link orion.core.ContentTypeService}</p>

+	 * <p>Requires service {@link orion.core.ContentTypeRegistry}</p>

 	 * @param {orion.serviceregistry.ServiceRegistry} serviceRegistry Registry to look up highlight providers from.

 	 */

 	function SyntaxHighlighter(serviceRegistry) {

diff --git a/bundles/org.eclipse.orion.client.ui/web/orion/searchExplorer.js b/bundles/org.eclipse.orion.client.ui/web/orion/searchExplorer.js
index a1e1b43..c4f7184 100644
--- a/bundles/org.eclipse.orion.client.ui/web/orion/searchExplorer.js
+++ b/bundles/org.eclipse.orion.client.ui/web/orion/searchExplorer.js
@@ -1125,7 +1125,7 @@
 				replacedContents = that._currentReplacedContents.contents.join(that._currentReplacedContents.lineDelim);
 			}
             // Diff operations
-            var contentTypeService = new mContentTypes.ContentTypeService(that.registry);
+            var contentTypeService = new mContentTypes.ContentTypeRegistry(that.registry);
             var fileName = that.model.getFileName(fileItem);
             var fType = contentTypeService.getFilenameContentType(fileName);
             var options = {
diff --git a/bundles/org.eclipse.orion.client.ui/web/orion/sidebar.js b/bundles/org.eclipse.orion.client.ui/web/orion/sidebar.js
index bb0709b..30e698b 100644
--- a/bundles/org.eclipse.orion.client.ui/web/orion/sidebar.js
+++ b/bundles/org.eclipse.orion.client.ui/web/orion/sidebar.js
@@ -10,7 +10,7 @@
 	 * @class Sidebar that appears alongside an {@link orion.editor.Editor} in the Orion IDE.
 	 * @param {Object} params
 	 * @param {orion.commandregistry.CommandRegistry} params.commandRegistry
-	 * @param {orion.core.ContentTypeService} params.contentTypeRegistry
+	 * @param {orion.core.ContentTypeRegistry} params.contentTypeRegistry
 	 * @param {orion.fileClient.FileClient} params.fileClient
 	 * @param {orion.editor.InputManager} params.editorInputManager
 	 * @param {orion.outliner.OutlineService} params.outlineService
diff --git a/bundles/org.eclipse.orion.client.ui/web/orion/webui/dialogs/OpenResourceDialog.js b/bundles/org.eclipse.orion.client.ui/web/orion/webui/dialogs/OpenResourceDialog.js
index f0cb97f..ed337b5 100644
--- a/bundles/org.eclipse.orion.client.ui/web/orion/webui/dialogs/OpenResourceDialog.js
+++ b/bundles/org.eclipse.orion.client.ui/web/orion/webui/dialogs/OpenResourceDialog.js
@@ -47,7 +47,7 @@
 		this._searcher = options.searcher;
 		this._progress = options.progress;
 		this._onHide = options.onHide;
-		this._contentTypeService = new mContentTypes.ContentTypeService(this._searcher.registry);
+		this._contentTypeService = new mContentTypes.ContentTypeRegistry(this._searcher.registry);
 		if (!this._searcher) {
 			throw new Error("Missing required argument: searcher"); //$NON-NLS-0$
 		}	
diff --git a/bundles/org.eclipse.orion.client.ui/web/search/search.js b/bundles/org.eclipse.orion.client.ui/web/search/search.js
index e19ce4d..ab8dceb 100644
--- a/bundles/org.eclipse.orion.client.ui/web/search/search.js
+++ b/bundles/org.eclipse.orion.client.ui/web/search/search.js
@@ -70,7 +70,7 @@
 		new mSearchOutliner.SavedSearches({serviceRegistry: serviceRegistry});
 
 		var fileClient = new mFileClient.FileClient(serviceRegistry);
-		var contentTypeService = new mContentTypes.ContentTypeService(serviceRegistry);
+		var contentTypeService = new mContentTypes.ContentTypeRegistry(serviceRegistry);
 		var searcher = new mSearchClient.Searcher({serviceRegistry: serviceRegistry, commandService: commandRegistry, fileService: fileClient});
 		
 		var searchOutliner = new mSearchOutliner.SearchOutliner({parent: "searchProgress", serviceRegistry: serviceRegistry, commandService: commandRegistry}); //$NON-NLS-0$
diff --git a/bundles/org.eclipse.orion.client.ui/web/shell/shellPage.js b/bundles/org.eclipse.orion.client.ui/web/shell/shellPage.js
index 02fd921..5957d7e 100644
--- a/bundles/org.eclipse.orion.client.ui/web/shell/shellPage.js
+++ b/bundles/org.eclipse.orion.client.ui/web/shell/shellPage.js
@@ -1117,7 +1117,7 @@
 		});

 

 		/* initialize the editors cache (used by some of the built-in commands */

-		contentTypeService = new mContentTypes.ContentTypeService(serviceRegistry);

+		contentTypeService = new mContentTypes.ContentTypeRegistry(serviceRegistry);

 		serviceRegistry.getService("orion.core.contentTypeRegistry").getContentTypes().then(function(contentTypes) { //$NON-NLS-0$

 			var commands = mExtensionCommands._createOpenWithCommands(serviceRegistry, contentTypes);

 			var fn = function(command) {

diff --git a/bundles/org.eclipse.orion.client.ui/web/stringexternalizer/strExternalizer.js b/bundles/org.eclipse.orion.client.ui/web/stringexternalizer/strExternalizer.js
index e585589..de2b673 100644
--- a/bundles/org.eclipse.orion.client.ui/web/stringexternalizer/strExternalizer.js
+++ b/bundles/org.eclipse.orion.client.ui/web/stringexternalizer/strExternalizer.js
@@ -60,7 +60,7 @@
 		themePreferences.apply();
 
 		var fileClient = new mFileClient.FileClient(serviceRegistry);
-		new mContentTypes.ContentTypeService(serviceRegistry); //yes we're bad
+		new mContentTypes.ContentTypeRegistry(serviceRegistry); //yes we're bad
 		var searcher = new mSearchClient.Searcher({
 			serviceRegistry: serviceRegistry,
 			commandService: commandRegistry,