summaryrefslogtreecommitdiffstatsabout
diff options
context:
space:
mode:
authorMark Macdonald2012-03-26 10:12:21 (EDT)
committer sfranklin2012-04-11 13:43:33 (EDT)
commite63d963cb60b4e26255f439650e8d412d79e2c73 (patch)
treefa0f9f36617391495c23bbcef22878b734f2f28b
parent38292bc5b61549ad1c432310511d80d6a832ed28 (diff)
downloadorg.eclipse.orion.client-e63d963cb60b4e26255f439650e8d412d79e2c73.zip
org.eclipse.orion.client-e63d963cb60b4e26255f439650e8d412d79e2c73.tar.gz
org.eclipse.orion.client-e63d963cb60b4e26255f439650e8d412d79e2c73.tar.bz2
Bug 374991 - Use MIME format IDs for content types
-rw-r--r--bundles/org.eclipse.orion.client.core/web/js-tests/contentTypes/testcase.js14
-rw-r--r--bundles/org.eclipse.orion.client.core/web/orion/explorer-table.js24
-rw-r--r--bundles/org.eclipse.orion.client.core/web/orion/highlight.js8
-rw-r--r--bundles/org.eclipse.orion.client.core/web/orion/jslintPlugin.js4
-rw-r--r--bundles/org.eclipse.orion.client.core/web/plugins/csslintPlugin/csslintPlugin.js4
-rw-r--r--bundles/org.eclipse.orion.client.core/web/plugins/webEditingPlugin.html48
6 files changed, 51 insertions, 51 deletions
diff --git a/bundles/org.eclipse.orion.client.core/web/js-tests/contentTypes/testcase.js b/bundles/org.eclipse.orion.client.core/web/js-tests/contentTypes/testcase.js
index c2f55a0..05e8ec5 100644
--- a/bundles/org.eclipse.orion.client.core/web/js-tests/contentTypes/testcase.js
+++ b/bundles/org.eclipse.orion.client.core/web/js-tests/contentTypes/testcase.js
@@ -77,18 +77,18 @@ define(['orion/assert', 'orion/contentTypes', 'orion/serviceregistry'], function
var mockRegistry, contentTypeService, basicTypes;
basicTypes = [
{
- id: 'orion.test.ct0',
+ id: 'orion/test0',
name: 'Basic 0'
}, {
- id: 'orion.test.ct1',
+ id: 'orion/test1',
name: 'Basic 1',
- 'extends' : 'orion.test.ct0'
+ 'extends' : 'orion/test0'
}, {
- id: 'orion.test.ct2',
+ id: 'orion/test2',
name: 'Basic 2',
extension: ['xml', 'txt']
}, {
- id: 'orion.test.ct3',
+ id: 'orion/test3',
name: 'Basic 3',
filename: ['build.xml']
} ];
@@ -195,9 +195,9 @@ define(['orion/assert', 'orion/contentTypes', 'orion/serviceregistry'], function
tests.test_isExtensionOf2 = function() {
var bad = {
- id: 'orion.test.ct4',
+ id: 'orion/test4',
name: 'Bad',
- 'extends': 'orion.test.ct4'
+ 'extends': 'orion/test4'
};
var mockRegistry = new MockServiceRegistry();
mockRegistry._registerServiceProvider("orion.core.contenttype", {}, {
diff --git a/bundles/org.eclipse.orion.client.core/web/orion/explorer-table.js b/bundles/org.eclipse.orion.client.core/web/orion/explorer-table.js
index 6fc8e11..96af633 100644
--- a/bundles/org.eclipse.orion.client.core/web/orion/explorer-table.js
+++ b/bundles/org.eclipse.orion.client.core/web/orion/explorer-table.js
@@ -97,12 +97,12 @@ define(['require', 'dojo', 'dijit', 'orion/util', 'orion/explorer', 'orion/explo
FileRenderer.prototype.getCellElement = function(col_no, item, tableRow){
function isImage(contentType) {
switch (contentType && contentType.id) {
- case "image.jpeg":
- case "image.png":
- case "image.gif":
- case "image.ico":
- case "image.tiff":
- case "image.svg":
+ case "image/jpeg":
+ case "image/png":
+ case "image/gif":
+ case "image/ico":
+ case "image/tiff":
+ case "image/svg":
return true;
}
return false;
@@ -110,12 +110,12 @@ define(['require', 'dojo', 'dijit', 'orion/util', 'orion/explorer', 'orion/explo
function addImageToLink(contentType, link) {
switch (contentType && contentType.id) {
- case "image.jpeg":
- case "image.png":
- case "image.gif":
- case "image.ico":
- case "image.tiff":
- case "image.svg":
+ case "image/jpeg":
+ case "image/png":
+ case "image/gif":
+ case "image/ico":
+ case "image/tiff":
+ case "image/svg":
var thumbnail = dojo.create("img", {src: item.Location}, link, "last");
dojo.addClass(thumbnail, "thumbnail");
break;
diff --git a/bundles/org.eclipse.orion.client.core/web/orion/highlight.js b/bundles/org.eclipse.orion.client.core/web/orion/highlight.js
index bc5043b..e3bc0c5 100644
--- a/bundles/org.eclipse.orion.client.core/web/orion/highlight.js
+++ b/bundles/org.eclipse.orion.client.core/web/orion/highlight.js
@@ -44,14 +44,14 @@ define(['dojo', 'examples/textview/textStyler', 'orion/editor/textMateStyler', '
function createDefaultStyler(contentType) {
var styler = null;
switch (contentType && contentType.id) {
- case "text.javascript":
- case "text.json":
+ case "application/javascript":
+ case "application/json":
styler = new mTextStyler.TextStyler(textView, "js", annotationModel);
break;
- case "text.java":
+ case "text/x-java-source":
styler = new mTextStyler.TextStyler(textView, "java", annotationModel);
break;
- case "text.css":
+ case "text/css":
styler = new mTextStyler.TextStyler(textView, "css", annotationModel);
break;
}
diff --git a/bundles/org.eclipse.orion.client.core/web/orion/jslintPlugin.js b/bundles/org.eclipse.orion.client.core/web/orion/jslintPlugin.js
index 16747ca..424ee05 100644
--- a/bundles/org.eclipse.orion.client.core/web/orion/jslintPlugin.js
+++ b/bundles/org.eclipse.orion.client.core/web/orion/jslintPlugin.js
@@ -192,10 +192,10 @@ window.onload = function() {
var provider = new eclipse.PluginProvider();
provider.registerServiceProvider("orion.edit.validator", validationService, {
- contentType: ["text.javascript", "text.html"]
+ contentType: ["application/javascript", "text/html"]
});
provider.registerServiceProvider("orion.edit.outliner", outlineService, {
- contentType: ["text.javascript", "text.html"], // TODO separate out HTML outline
+ contentType: ["application/javascript", "text/html"], // TODO separate out HTML outline
name: "Flat outline",
id: "orion.edit.outliner.jslint"
});
diff --git a/bundles/org.eclipse.orion.client.core/web/plugins/csslintPlugin/csslintPlugin.js b/bundles/org.eclipse.orion.client.core/web/plugins/csslintPlugin/csslintPlugin.js
index 1d1cffa..a92e1af 100644
--- a/bundles/org.eclipse.orion.client.core/web/plugins/csslintPlugin/csslintPlugin.js
+++ b/bundles/org.eclipse.orion.client.core/web/plugins/csslintPlugin/csslintPlugin.js
@@ -69,7 +69,7 @@ window.onload = function() {
provider.registerServiceProvider("orion.edit.validator",
{ checkSyntax: checkSyntax
}, {
- contentType: ["text.css"]
+ contentType: ["text/css"]
});
// Register outline provider
@@ -85,7 +85,7 @@ window.onload = function() {
}, {
id: "orion.outline.css.csslint",
name: "CSS rule outline",
- contentType: ["text.css"]
+ contentType: ["text/css"]
});
provider.connect();
} catch (e) {
diff --git a/bundles/org.eclipse.orion.client.core/web/plugins/webEditingPlugin.html b/bundles/org.eclipse.orion.client.core/web/plugins/webEditingPlugin.html
index 2d56fc1..ea5f551 100644
--- a/bundles/org.eclipse.orion.client.core/web/plugins/webEditingPlugin.html
+++ b/bundles/org.eclipse.orion.client.core/web/plugins/webEditingPlugin.html
@@ -17,73 +17,73 @@ window.onload = function() {
provider.registerServiceProvider("orion.core.contenttype", {}, {
contentTypes:
// Text types
- [{ id: "text.plain",
+ [{ id: "text/plain",
name: "Text",
extension: ["txt"],
image: "../images/file_model.gif"
},
- { id: "text.html",
- "extends": "text.plain",
+ { id: "text/html",
+ "extends": "text/plain",
name: "HTML",
extension: ["html", "htm"],
image: "../images/wtp/html.gif"
},
- { id: "text.css",
- "extends": "text.plain",
+ { id: "text/css",
+ "extends": "text/plain",
name: "CSS",
extension: ["css"],
image: "../images/wtp/stylesheet.gif"
},
- { id: "text.javascript",
- "extends": "text.plain",
+ { id: "application/javascript",
+ "extends": "text/plain",
name: "JavaScript",
extension: ["js"],
image: "../images/wtp/javascript.gif"
},
- { id: "text.json",
- "extends": "text.plain",
+ { id: "application/json",
+ "extends": "text/plain",
name: "JSON",
extension: ["json"],
image: "../images/wtp/json.gif"
},
- { id: "text.xml",
- "extends": "text.plain",
+ { id: "text/xml",
+ "extends": "text/plain",
name: "XML",
extension: ["xml"],
image: "../images/wtp/xmlfile.gif"
},
- { id: "text.java",
- "extends": "text.plain",
+ { id: "text/x-java-source",
+ "extends": "text/plain",
name: "Java",
extension: ["java"]
},
// Image types
- { id: "image.gif",
+ { id: "image/gif",
name: "GIF",
extension: ["gif"],
image: "../images/wtp/image.gif"
},
- { id: "image.jpeg",
+ { id: "image/jpeg",
name: "JPG",
extension: ["jpg", "jpeg", "jpe"],
image: "../images/wtp/image.gif"
},
- { id: "image.ico",
+ { id: "image/ico",
name: "ICO",
extension: ["ico"],
image: "../images/wtp/image.gif"
},
- { id: "image.png",
+ { id: "image/png",
name: "PNG",
extension: ["png"],
image: "../images/wtp/image.gif"
},
- { id: "image.tiff",
+ { id: "image/tiff",
name: "TIFF",
extension: ["tif", "tiff"],
image: "../images/wtp/image.gif"
},
- { id: "image.svg",
+ { id: "image/svg",
name: "SVG",
extension: ["svg"],
image: "../images/wtp/image.gif"
@@ -98,7 +98,7 @@ window.onload = function() {
provider.registerServiceProvider("orion.navigate.openWith", {}, {
editor: "orion.editor",
- contentType: ["text.plain", "text.html", "text.css", "text.javascript", "text.json", "text.xml", "text.java"]});
+ contentType: ["text/plain", "text/html", "text/css", "application/javascript", "application/json", "text/xml", "text/x-java-source"]});
provider.registerServiceProvider("orion.navigate.openWith.default", {}, {
editor: "orion.editor"});
@@ -107,23 +107,23 @@ window.onload = function() {
provider.registerServiceProvider("orion.edit.contentAssist",
new orion.editor.CssContentAssistProvider(),
{ name: "CSS content assist",
- contentType: ["text.css"]
+ contentType: ["text/css"]
});
provider.registerServiceProvider("orion.edit.contentAssist",
new orion.editor.JavaScriptContentAssistProvider(),
{ name: "JavaScript content assist",
- contentType: ["text.javascript"]
+ contentType: ["application/javascript"]
});
provider.registerServiceProvider("orion.edit.contentAssist",
new orion.editor.HTMLContentAssistProvider(),
{ name: "HTML content assist",
- contentType: ["text.html"]
+ contentType: ["text/html"]
});
// Register syntax highlighting
provider.registerServiceProvider("orion.edit.highlighter", {},
{ type: "grammar",
- contentType: ["text.html"],
+ contentType: ["text/html"],
grammar: new orion.editor.HtmlGrammar()
});