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 243154 Details for
Bug 434029
Implementing the Syntax Highlighting for Erlang for Orion Editor
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.
[patch]
feedback patch
erlang.patch (text/plain), 17.48 KB, created by
Grant Gayed
on 2014-05-16 00:25:51 EDT
(
hide
)
Description:
feedback patch
Filename:
MIME Type:
Creator:
Grant Gayed
Created:
2014-05-16 00:25:51 EDT
Size:
17.48 KB
patch
obsolete
>diff --git a/bundles/org.eclipse.orion.client.editor/web/orion/editor/stylers/application_erl/syntax.js b/bundles/org.eclipse.orion.client.editor/web/orion/editor/stylers/application_erl/syntax.js >deleted file mode 100644 >index 23b5e33..0000000 >--- a/bundles/org.eclipse.orion.client.editor/web/orion/editor/stylers/application_erl/syntax.js >+++ /dev/null >@@ -1,121 +0,0 @@ >-/******************************************************************************* >- * @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 >- ******************************************************************************/ >- >-/*global define*/ >- >-define("orion/editor/stylers/application_erl/syntax", ["orion/editor/stylers/lib/syntax"], function(mLib) { //$NON-NLS-1$ //$NON-NLS-0$ >- var keywords = [ >- "fun", >- "when", >- "end", >- "receive", >- "case", >- "of", >- "if", >- "after", >- "catch", >- "try", >- "begin", >- "orelse", >- "andalso" >- >- ]; >- >- // For Preprocessors, Records and so on specified with hyphens >- var hyphenStuff = [ >- "module", >- "export", >- "import", >- "compile", >- "vsn", >- "on_load", >- "spec", >- "record", >- "include", >- "include_lib", >- "define", >- "file", >- "type", >- "opaque", >- "export_type", >- "undef", >- "ifdef", >- "ifndef", >- "else", >- "endif" >- ]; >- >- var signs = [ >- "#", >- ":", >- "::" >- ]; >- >- var grammars = mLib.grammars; >- grammars.push({ >- id: "orion.erl", //$NON-NLS-0$ >- contentTypes: ["application/erl"], //$NON-NLS-0$ // Connection to erlPlugin.js >- patterns: [ >- {include: "#comment"}, >- {include: "#arrow"}, >- {include: "orion.xq#variable"}, >- {include: "orion.lib#string_doubleQuote"}, //$NON-NLS-0$ >- {include: "orion.lib#string_singleQuote"}, //$NON-NLS-0$ >- {include: "orion.lib#doc_block"}, //$NON-NLS-0$ >- {include: "orion.lib#brace_open"}, //$NON-NLS-0$ >- {include: "orion.lib#brace_close"}, //$NON-NLS-0$ >- {include: "orion.lib#bracket_open"}, //$NON-NLS-0$ >- {include: "orion.lib#bracket_close"}, //$NON-NLS-0$ >- {include: "orion.lib#parenthesis_open"}, //$NON-NLS-0$ >- {include: "orion.lib#parenthesis_close"}, //$NON-NLS-0$ >- {include: "orion.lib#number_decimal"}, //$NON-NLS-0$ >- {include: "orion.lib#number_hex"}, //$NON-NLS-0$ >- { >- match: "\\b(?:" + keywords.join("|") + ")\\b", //$NON-NLS-2$ //$NON-NLS-1$ //$NON-NLS-0$ >- name: "keyword.control.js" //$NON-NLS-0$ >- }, >- { >- match: "-\\b(?:" + hyphenStuff.join("|") + ")\\b", //$NON-NLS-2$ //$NON-NLS-1$ //$NON-NLS-0$ >- name: "hyphen.erl" //$NON-NLS-0$ >- }, >- { >- match: signs.join("|"), >- name: "sign.erl" >- } >- ], >- repository: { >- >- comment: { >- match: "%.*", //$NON-NLS-0$ >- name: "comment.line.erl", //$NON-NLS-0$ >- patterns: [ >- { >- include: "orion.lib#todo_comment_singleLine" //$NON-NLS-0$ >- } >- ] >- }, >- arrow: { >- match: "->|=>", //$NON-NLS-0$ >- name: "arrow.erl" //$NON-NLS-0$ >- }, >- method: { >- match: "[a-zA-Z0-9_.]+(?=\\(|\\s\\()", >- name: "method.erl" >- } >- } >- >- }); >- return { >- id: grammars[grammars.length - 1].id, >- grammars: grammars, >- keywords: keywords >- }; >-}); >diff --git a/bundles/org.eclipse.orion.client.editor/web/orion/editor/stylers/text_x-erlang/syntax.js b/bundles/org.eclipse.orion.client.editor/web/orion/editor/stylers/text_x-erlang/syntax.js >new file mode 100644 >index 0000000..7f67cf8 >--- /dev/null >+++ b/bundles/org.eclipse.orion.client.editor/web/orion/editor/stylers/text_x-erlang/syntax.js >@@ -0,0 +1,120 @@ >+/******************************************************************************* >+ * @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 >+ ******************************************************************************/ >+ >+/*global define*/ >+ >+define("orion/editor/stylers/text_x-erlang/syntax", ["orion/editor/stylers/lib/syntax"], function(mLib) { //$NON-NLS-1$ //$NON-NLS-0$ >+ var keywords = [ >+ "fun", >+ "when", >+ "end", >+ "receive", >+ "case", >+ "of", >+ "if", >+ "after", >+ "catch", >+ "try", >+ "begin", >+ "orelse", >+ "andalso" >+ >+ ]; >+ >+ // For Preprocessors, Records and so on specified with hyphens >+ var hyphenStuff = [ >+ "module", >+ "export", >+ "import", >+ "compile", >+ "vsn", >+ "on_load", >+ "spec", >+ "record", >+ "include", >+ "include_lib", >+ "define", >+ "file", >+ "type", >+ "opaque", >+ "export_type", >+ "undef", >+ "ifdef", >+ "ifndef", >+ "else", >+ "endif" >+ ]; >+ >+ var signs = [ >+ "#", >+ ":", >+ "::" >+ ]; >+ >+ var grammars = mLib.grammars; >+ grammars.push({ >+ id: "orion.erlang", //$NON-NLS-0$ >+ contentTypes: ["text/x-erlang"], //$NON-NLS-0$ // Connection to erlangPlugin.js >+ patterns: [ >+ {include: "#comment"}, >+ {include: "#arrow"}, >+ {include: "orion.xq#variable"}, >+ {include: "orion.lib#string_doubleQuote"}, //$NON-NLS-0$ >+ {include: "orion.lib#string_singleQuote"}, //$NON-NLS-0$ >+ {include: "orion.lib#doc_block"}, //$NON-NLS-0$ >+ {include: "orion.lib#brace_open"}, //$NON-NLS-0$ >+ {include: "orion.lib#brace_close"}, //$NON-NLS-0$ >+ {include: "orion.lib#bracket_open"}, //$NON-NLS-0$ >+ {include: "orion.lib#bracket_close"}, //$NON-NLS-0$ >+ {include: "orion.lib#parenthesis_open"}, //$NON-NLS-0$ >+ {include: "orion.lib#parenthesis_close"}, //$NON-NLS-0$ >+ {include: "orion.lib#number_decimal"}, //$NON-NLS-0$ >+ {include: "orion.lib#number_hex"}, //$NON-NLS-0$ >+ { >+ match: "\\b(?:" + keywords.join("|") + ")\\b", //$NON-NLS-2$ //$NON-NLS-1$ //$NON-NLS-0$ >+ name: "keyword.control.erlang" //$NON-NLS-0$ >+ }, >+ { >+ match: "-\\b(?:" + hyphenStuff.join("|") + ")\\b", //$NON-NLS-2$ //$NON-NLS-1$ //$NON-NLS-0$ >+ name: "keyword.control.erlang" //$NON-NLS-0$ >+ }, >+ { >+ match: signs.join("|"), >+ name: "sign.erl" >+ } >+ ], >+ repository: { >+ comment: { >+ match: {match: "%.*", literal: "%"}, //$NON-NLS-1$ //$NON-NLS-0$ >+ name: "comment.line.erlang", //$NON-NLS-0$ >+ patterns: [ >+ { >+ include: "orion.lib#todo_comment_singleLine" //$NON-NLS-0$ >+ } >+ ] >+ }, >+ arrow: { >+ match: "->|=>", //$NON-NLS-0$ >+ name: "arrow.erl" //$NON-NLS-0$ >+ }, >+ method: { >+ match: "[a-zA-Z0-9_.]+(?=\\(|\\s\\()", >+ name: "method.erl" >+ } >+ } >+ >+ }); >+ return { >+ id: grammars[grammars.length - 1].id, >+ grammars: grammars, >+ keywords: keywords >+ }; >+}); >diff --git a/bundles/org.eclipse.orion.client.ui/web/defaults.pref b/bundles/org.eclipse.orion.client.ui/web/defaults.pref >index 89f309e..c4762a2 100644 >--- a/bundles/org.eclipse.orion.client.ui/web/defaults.pref >+++ b/bundles/org.eclipse.orion.client.ui/web/defaults.pref >@@ -13,6 +13,7 @@ > "plugins/languages/arduino/arduinoPlugin.html":true, > "plugins/languages/c/cPlugin.html":true, > "plugins/languages/cpp/cppPlugin.html":true, >+ "plugins/languages/erlang/erlangPlugin.html":true, > "plugins/languages/java/javaPlugin.html":true, > "plugins/languages/lua/luaPlugin.html":true, > "plugins/languages/php/phpPlugin.html":true, >diff --git a/bundles/org.eclipse.orion.client.ui/web/plugins/languages/erl/erlPlugin.html b/bundles/org.eclipse.orion.client.ui/web/plugins/languages/erl/erlPlugin.html >deleted file mode 100644 >index 2be2862..0000000 >--- a/bundles/org.eclipse.orion.client.ui/web/plugins/languages/erl/erlPlugin.html >+++ /dev/null >@@ -1,62 +0,0 @@ >-<!DOCTYPE html> >-<html> >-<head> >- <meta charset="UTF-8"> >- <meta name="copyright" content="Copyright (c) IBM Corporation and others 2014."> >- <title>Orion XQuery Support</title> >- <link rel="stylesheet" type="text/css" href="/settings/settings.css"/> >- <script src="../../../requirejs/require.js"></script> >- <script type="text/javascript"> >- /*global require*/ >- require({ >- baseUrl: '../../../', >- paths: { >- text: 'requirejs/text', >- i18n: 'requirejs/i18n', >- domReady: 'requirejs/domReady' >- }, >- packages: [ >- ] >- }); >- require(["erlPlugin.js"]); >- </script> >-</head> >- >-<body id="orion-settings" class="orionPage" style="padding: 10px;"> >- <h2>XQ Tools Support</h2> >- <p> >- This plugin provides XQ tooling, including: >- </p> >- <ul> >- <li><em>Editing</em> - an editor with syntax highlighting</li> >- </ul> >- <p>October 16, 2013</p> >- >- <div class="split-selection-table"> >- <div class="sectionWrapper toolComposite" style="margin: 15px 30px 0px 15px; max-width: 600px;"> >- <div class="sectionAnchor sectionTitle layoutLeft"> >- License >- </div> >- </div> >- <div class="sections sectionTable" style="margin: 0px 30px 0px 15px; padding-left: 6px; padding-right: 6px; max-width: 600px;"> >- <p> >- The Eclipse Foundation makes available all content in this plug-in ("Content"). Unless otherwise >- indicated below, the Content is provided to you under the terms and conditions of the >- <a href="http://www.eclipse.org/legal/epl-v10.html">Eclipse Public License Version 1.0</a> >- ("EPL"), and the <a href="http://www.eclipse.org/org/documents/edl-v10.html"> >- Eclipse Distribution License Version 1.0</a> ("EDL"). >- For purposes of the EPL and EDL, "Program" will mean the Content. >- </p> >- >- <p> >- If you did not receive this Content directly from the Eclipse Foundation, the Content is >- being redistributed by another party ("Redistributor") and different terms and conditions may >- apply to your use of any object code in the Content. Check the Redistributor's license that was >- provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise >- indicated below, the terms and conditions of the EPL still apply to any source code in the Content >- and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>. >- </p> >- </div> >- </div> >-</body> >-</html> >diff --git a/bundles/org.eclipse.orion.client.ui/web/plugins/languages/erl/erlPlugin.js b/bundles/org.eclipse.orion.client.ui/web/plugins/languages/erl/erlPlugin.js >deleted file mode 100644 >index fffaf3e..0000000 >--- a/bundles/org.eclipse.orion.client.ui/web/plugins/languages/erl/erlPlugin.js >+++ /dev/null >@@ -1,43 +0,0 @@ >-/******************************************************************************* >- * @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 >- *******************************************************************************/ >-/*global esprima*/ >-/*jslint amd:true*/ >-define(['orion/plugin', 'orion/editor/stylers/application_erl/syntax'], function(PluginProvider, mERL) { >- /** >- * Plug-in headers >- */ >- var headers = { >- name: "Orion Erlang Tool Support", >- version: "1.0", >- description: "This plugin provides Erlang tools support for Orion." >- }; >- var provider = new PluginProvider(headers); >- >- /** >- * Register the XQuery content types >- */ >- provider.registerServiceProvider("orion.core.contenttype", {}, { >- contentTypes: [ >- { id: "application/erl", >- "extends": "text/plain", >- name: "ERL", >- extension: ["erl"] >- } >- ] >- }); >- >- /** >- * Register syntax styling >- */ >- provider.registerServiceProvider("orion.edit.highlighter", {}, mERL.grammars[mERL.grammars.length - 1]); >- provider.connect(); >-}); >diff --git a/bundles/org.eclipse.orion.client.ui/web/plugins/languages/erlang/erlangPlugin.html b/bundles/org.eclipse.orion.client.ui/web/plugins/languages/erlang/erlangPlugin.html >new file mode 100644 >index 0000000..5ae3b73 >--- /dev/null >+++ b/bundles/org.eclipse.orion.client.ui/web/plugins/languages/erlang/erlangPlugin.html >@@ -0,0 +1,62 @@ >+<!DOCTYPE html> >+<html> >+<head> >+ <meta charset="UTF-8"> >+ <meta name="copyright" content="Copyright (c) IBM Corporation and others 2014."> >+ <title>Orion Erlang Support</title> >+ <link rel="stylesheet" type="text/css" href="/settings/settings.css"/> >+ <script src="../../../requirejs/require.js"></script> >+ <script type="text/javascript"> >+ /*global require*/ >+ require({ >+ baseUrl: '../../../', >+ paths: { >+ text: 'requirejs/text', >+ i18n: 'requirejs/i18n', >+ domReady: 'requirejs/domReady' >+ }, >+ packages: [ >+ ] >+ }); >+ require(["erlangPlugin.js"]); >+ </script> >+</head> >+ >+<body id="orion-settings" class="orionPage" style="padding: 10px;"> >+ <h2>Erlang Tools Support</h2> >+ <p> >+ This plugin provides Erlang tooling, including: >+ </p> >+ <ul> >+ <li><em>Editing</em> - an editor with syntax highlighting</li> >+ </ul> >+ <p>October 16, 2013</p> >+ >+ <div class="split-selection-table"> >+ <div class="sectionWrapper toolComposite" style="margin: 15px 30px 0px 15px; max-width: 600px;"> >+ <div class="sectionAnchor sectionTitle layoutLeft"> >+ License >+ </div> >+ </div> >+ <div class="sections sectionTable" style="margin: 0px 30px 0px 15px; padding-left: 6px; padding-right: 6px; max-width: 600px;"> >+ <p> >+ The Eclipse Foundation makes available all content in this plug-in ("Content"). Unless otherwise >+ indicated below, the Content is provided to you under the terms and conditions of the >+ <a href="http://www.eclipse.org/legal/epl-v10.html">Eclipse Public License Version 1.0</a> >+ ("EPL"), and the <a href="http://www.eclipse.org/org/documents/edl-v10.html"> >+ Eclipse Distribution License Version 1.0</a> ("EDL"). >+ For purposes of the EPL and EDL, "Program" will mean the Content. >+ </p> >+ >+ <p> >+ If you did not receive this Content directly from the Eclipse Foundation, the Content is >+ being redistributed by another party ("Redistributor") and different terms and conditions may >+ apply to your use of any object code in the Content. Check the Redistributor's license that was >+ provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise >+ indicated below, the terms and conditions of the EPL still apply to any source code in the Content >+ and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>. >+ </p> >+ </div> >+ </div> >+</body> >+</html> >diff --git a/bundles/org.eclipse.orion.client.ui/web/plugins/languages/erlang/erlangPlugin.js b/bundles/org.eclipse.orion.client.ui/web/plugins/languages/erlang/erlangPlugin.js >new file mode 100644 >index 0000000..b8cb9ea >--- /dev/null >+++ b/bundles/org.eclipse.orion.client.ui/web/plugins/languages/erlang/erlangPlugin.js >@@ -0,0 +1,43 @@ >+/******************************************************************************* >+ * @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 >+ *******************************************************************************/ >+/*global esprima*/ >+/*jslint amd:true*/ >+define(['orion/plugin', 'orion/editor/stylers/text_x-erlang/syntax'], function(PluginProvider, mErlang) { >+ /** >+ * Plug-in headers >+ */ >+ var headers = { >+ name: "Orion Erlang Tool Support", >+ version: "1.0", >+ description: "This plugin provides Erlang tools support for Orion." >+ }; >+ var provider = new PluginProvider(headers); >+ >+ /** >+ * Register the XQuery content types >+ */ >+ provider.registerServiceProvider("orion.core.contenttype", {}, { >+ contentTypes: [ >+ { id: "text/x-erlang", >+ "extends": "text/plain", >+ name: "Erlang", >+ extension: ["erl", "hrl"] >+ } >+ ] >+ }); >+ >+ /** >+ * Register syntax styling >+ */ >+ provider.registerServiceProvider("orion.edit.highlighter", {}, mErlang.grammars[mErlang.grammars.length - 1]); >+ provider.connect(); >+}); >diff --git a/modules/orionode/lib/orionode.client/defaults.pref b/modules/orionode/lib/orionode.client/defaults.pref >index 958ec37..3c727db 100644 >--- a/modules/orionode/lib/orionode.client/defaults.pref >+++ b/modules/orionode/lib/orionode.client/defaults.pref >@@ -8,6 +8,7 @@ > "plugins/languages/arduino/arduinoPlugin.html":true, > "plugins/languages/c/cPlugin.html":true, > "plugins/languages/cpp/cppPlugin.html":true, >+ "plugins/languages/erlang/erlangPlugin.html":true, > "plugins/languages/java/javaPlugin.html":true, > "plugins/languages/lua/luaPlugin.html":true, > "plugins/languages/php/phpPlugin.html":true,
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 Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 434029
:
242643
| 243154 |
243264