| <!DOCTYPE html> |
| <html> |
| <head> |
| <meta name="copyright" content="Copyright (c) IBM Corporation and others 2011."> |
| <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> |
| |
| <script type="text/javascript" src="../orion/plugin.js"></script> |
| <script type="text/javascript" src="../orion/textview/global.js"></script> |
| <script type="text/javascript" src="../orion/editor/webContentAssist.js"></script> |
| <script type="text/javascript" src="../orion/editor/htmlGrammar.js"></script> |
| <script type="text/javascript"> |
| /*global window eclipse orion*/ |
| window.onload = function() { |
| var provider = new eclipse.PluginProvider(); |
| |
| provider.registerServiceProvider("orion.file.contenttype", {}, { |
| contentTypes: |
| // Text types |
| [{ id: "text.plain", |
| name: "Text", |
| extension: ["txt"], |
| image: "../images/file_model.gif" |
| }, |
| { id: "text.html", |
| "extends": "text.plain", |
| name: "HTML", |
| extension: ["html", "htm"], |
| image: "../images/wtp/html.gif" |
| }, |
| { id: "text.css", |
| "extends": "text.plain", |
| name: "CSS", |
| extension: ["css"], |
| image: "../images/wtp/stylesheet.gif" |
| }, |
| { id: "text.javascript", |
| "extends": "text.plain", |
| name: "JavaScript", |
| extension: ["js"], |
| image: "../images/wtp/javascript.gif" |
| }, |
| { id: "text.json", |
| "extends": "text.plain", |
| name: "JSON", |
| extension: ["json"], |
| image: "../images/wtp/json.gif" |
| }, |
| { id: "text.xml", |
| "extends": "text.plain", |
| name: "XML", |
| extension: ["xml"], |
| image: "../images/wtp/xmlfile.gif" |
| }, |
| { id: "text.java", |
| "extends": "text.plain", |
| name: "Java", |
| extension: ["java"] |
| }, |
| // Image types |
| { id: "image.gif", |
| name: "GIF", |
| extension: ["gif"], |
| image: "../images/wtp/image.gif" |
| }, |
| { id: "image.jpeg", |
| name: "JPG", |
| extension: ["jpg", "jpeg", "jpe"], |
| image: "../images/wtp/image.gif" |
| }, |
| { id: "image.ico", |
| name: "ICO", |
| extension: ["ico"], |
| image: "../images/wtp/image.gif" |
| }, |
| { id: "image.png", |
| name: "PNG", |
| extension: ["png"], |
| image: "../images/wtp/image.gif" |
| }, |
| { id: "image.tiff", |
| name: "TIFF", |
| extension: ["tif", "tiff"], |
| image: "../images/wtp/image.gif" |
| }, |
| { id: "image.svg", |
| name: "SVG", |
| extension: ["svg"], |
| image: "../images/wtp/image.gif" |
| }] |
| }); |
| |
| provider.registerServiceProvider("orion.edit.editor", {}, { |
| id: "orion.editor", |
| name: "Orion Editor", |
| href: "../edit/edit.html#${Location}"}); |
| |
| provider.registerServiceProvider("orion.navigate.openWith", {}, { |
| editor: "orion.editor", |
| contentType: ["text.plain", "text.html", "text.css", "text.javascript", "text.json", "text.xml", "text.java"]}); |
| |
| provider.registerServiceProvider("orion.navigate.openWith.default", {}, { |
| editor: "orion.editor"}); |
| |
| // Register content assist providers |
| provider.registerServiceProvider("orion.edit.contentAssist", |
| new orion.editor.CssContentAssistProvider(), |
| {name: "CSS content assist", pattern: "\\.css$"}); |
| provider.registerServiceProvider("orion.edit.contentAssist", |
| new orion.editor.JavaScriptContentAssistProvider(), |
| {name: "JavaScript content assist", pattern: "\\.js$"}); |
| |
| // Register syntax highlighting |
| provider.registerServiceProvider("orion.edit.highlighter", |
| { /* Grammar-based, so no service impl. All data is in properties */ }, |
| orion.editor.HtmlGrammar()); |
| |
| provider.connect(); |
| }; |
| </script> |
| </head> |
| <body> |
| </body> |
| </html> |