| <!DOCTYPE html> | |
| <!-- | |
| Sample that shows how to use the edit.js file to create an editor. For a complete list | |
| of editor configuration options, see orion.editor#edit. | |
| --> | |
| <html> | |
| <head> | |
| <title>Orion Editor Sample</title> | |
| <style> | |
| #editor { | |
| border: 1px solid teal; | |
| position: absolute; | |
| top: 0px; | |
| left: 0px; | |
| bottom: 0px; | |
| right: 0px; | |
| margin: 20px; | |
| } | |
| pre { | |
| margin: 0px; | |
| } | |
| </style> | |
| <link rel="stylesheet" type="text/css" href="http://eclipse.org/orion/editor/releases/3.0/built-editor.css"/> | |
| <script src="http://eclipse.org/orion/editor/releases/3.0/built-editor.js"></script> | |
| <script src="swtContentAssist.js"></script> | |
| <script> | |
| /*globals require*/ | |
| require(["orion/editor/edit", "examples/editor/swtContentAssist"], function(edit, mSWTContentAssist) { | |
| var editor = edit({ | |
| lang: "css" | |
| }); | |
| //ADD THE SWT CONTENT ASSIST | |
| var contentAssist = editor.getContentAssist ? editor.getContentAssist() : editor._contentAssist; | |
| contentAssist.addEventListener("Activating", function() { //$NON-NLS-0$ | |
| contentAssist.providers.push(new mSWTContentAssist.SWTContentAssistProvider()); | |
| }); | |
| //---------------- | |
| }); | |
| </script> | |
| </head> | |
| <body spellcheck="false"> | |
| <pre id="editor"> | |
| @import url("e4_basestyle.css"); | |
| .MTrimmedWindow { | |
| background-color: COLOR_BLUE; | |
| } | |
| .MPartStack { | |
| font-size: 9; | |
| font-family: 'Segoe UI'; | |
| swt-simple: true; | |
| swt-mru-visible: false; | |
| } | |
| .MTrimBar { | |
| background-color: #E1E6F6; | |
| } | |
| .MTrimBar#org-eclipse-ui-main-toolbar { | |
| background-image: url(./win7.png); | |
| } | |
| .MToolControl.TrimStack { | |
| frame-image: url(./win7TSFrame.png); | |
| handle-image: url(./win7Handle.png); | |
| } | |
| .MPartStack.active { | |
| swt-unselected-tabs-color: #F3F9FF #D0DFEE #CEDDED #CEDDED #D2E1F0 #D2E1F0 #FFFFFF 20% 45% 60% 70% 100% 100%; | |
| swt-outer-keyline-color: #B6BCCC; | |
| } | |
| #PerspectiveSwitcher { | |
| background-color: #F5F7FC #E1E6F6 100%; | |
| } | |
| #org-eclipse-ui-editorss { | |
| swt-tab-renderer: url('bundleclass://org.eclipse.e4.ui.workbench.renderers.swt/org.eclipse.e4.ui.workbench.renderers.swt.CTabRendering'); | |
| swt-unselected-tabs-color: #F0F0F0 #F0F0F0 #F0F0F0 100% 100%; | |
| swt-outer-keyline-color: #B4B4B4; | |
| swt-inner-keyline-color: #F0F0F0; | |
| swt-tab-outline: #F0F0F0; | |
| color: #F0F0F0; | |
| swt-tab-height: 8px; | |
| padding: 0px 5px 7px; | |
| } | |
| CTabFolder.MArea .MPartStack, CTabFolder.MArea .MPartStack.active { | |
| swt-shadow-visible: false; | |
| } | |
| CTabFolder Canvas { | |
| background-color: #F8F8F8; | |
| } | |
| </pre> | |
| </body> | |
| </html> |