Orion 3.0 M2 – New and Noteworthy

It has been a busy milestone for the Orion project. The user interface had another major overhaul, and there were several tooling enhancements such as editor auto save and a new search page. There are also clear signs in this milestone of Orion maturing from an experimental platform to a true commercial scale tool platform, with work going into scalability, accessibility, globalization, and enterprise Java server deployment.

Check out Orion 3.0 M2 now on Orion Hub, or download it for yourself. The following are some of the more noteworthy things available in this milestone.

The Orion editor page now supports a navigation pane on the left hand side of the page as an alternative to the outline pane. The navigation pane allows you to select other files to edit, browse up or down the folder hierarchy, and perform actions on files and folders much like the Navigator page.
30m2-nav-editor

The banner at the top of each Orion page has been completely redesigned. The aim is to produce a clean, simple look that gives most of the page focus to the main page content such as the editor. The navigation breadcrumb has been folded into the top banner, and navigation links have been moved into a new drop-down menu in the top-left corner. Navigation links are split into two columns: the left column indicates the main of the application, and the right column contains context-sensitive links that are relative to whatever file or folder you are currently viewing. The user options menu is now a button to free up horizontal space. For more details on these design changes, see Orion developer Anton McConville’s blog post.
30m2-banner

New search page

Searching file contents in Orion is now done from a new Search page. This page is accessed from the navigation menu in the top-left corner. All of the usual options for filtering and sorting search results are available in this page. You can also create a bookmark for frequently used searches from here. From the Navigator or Editor page, you can select Scope Search in the Navigation menu to begin a search that is narrowed down to a specific location. On the search page itself, the breadcrumb bar can be used to adjust the search scope up to any parent folder.
30m2-search-page

Importing code templates

As part of making importing code into Orion easier, this milestone has the first of two methods implemented. Any site can host a code template which can facilitate the import of a Zip file into a folder for a logged in user. As an example, see Ken Walker’s GitHub page. Located here is also the template for how to adapt your web page so that content can be imported into Orion. The second of the methods, due by 3.0 release, is to allow a link to begin a Git clone directly into a project for a logged in user.

Editor auto-save

The Orion editor now supports saving your changes automatically as you write, as well as automatically loading changes that occur to the file outside the editor. Auto-save is disabled by default but can be enabled from the editor options menu (spanner icon).
30m2-autosave

Browser compatibility check

Orion makes use of the latest emerging web application standards, and as such requires a modern HTML5 browser. If you attempt to use Orion on an older browser you will now be duly warned.
30m2-browser-thunk

Orion WAR file deployment

Extensive work was done on the Orion Java server to support deployment of Orion-based applications as a Web ARchive (WAR) file. This included isolating Orion servlet code from the context path, allowing Orion servlets to be integrated as part of a larger web application in the same server container. Support for container-managed security was also added, enabling Single sign-on between Orion and other applications. The Orion build does not currently produce a WAR file, but a sample war file product is available for reference. More details are available in bug 377823.

Open shell to current location

In the past, the Orion shell page would always open at the root of your file system. Now, when opening the Orion shell page from the Navigator or Editor page, the current working directory will be set to the appropriate directory depending on where you navigated from.

Globalization improvements

Globalization testing was done on Orion in this milestone to ensure it supports user input in a variety of character sets. Testing was performed in Korean, Chinese, and Japanese, and several bugs were addressed. Notably, the Orion editor now supports automatically switching to variable line height mode where the current character set requires it.
30m2-global

Accessibility testing

Another round of accessibility testing was done on the Orion user interface this milestone, ensuring all elements are accessible to keyboard input and are useable with screen reader tools. A number of problems were addressed, and Orion developer Carolyn MacLeod wrote an informative series of tips on how to build accessible web UIs.

Server scalability and metadata storage

As part of a long term effort towards high scalability in Orion, the Java server’s internals had a major overhaul of its metadata persistence. In the past, metadata was persisted through the OSGi Preference API, which was not designed for this purpose and resulted in numerous problems. There is a tentative new API, IMetaStore through which all metadata persistence is now performed. It is now possible to plug in a completely different storage mechanism for Orion server metadata without code changes in the core of the Orion server code.

Posted in New & Noteworthy | Comments Off

Orion 3.0 M1 – New and Noteworthy

This week the Orion project released its latest milestone, 3.0 M1. Check it out now on OrionHub, or download your own server. Find out below what the Orion development team has been up to.

EclipseCon experience

The Orion team had a great week at EclipseCon 2013, where we gave several talks and a tutorial, and attended several other great talks about what other people are building with Orion. Based on that experience, it is clear the biggest recent feature of Orion is adoption. While we had some significant early adopters, mostly notably by Firefox, there is clearly now a bigger adoption wave going on, with several major companies showing compelling prototypes of Orion-based tools. The variety of projects is also quite interesting, from business process tools to agile developer tools. In the Orion symposium, we saw examples of both the Java and JavaScript Orion servers in action, early exploration of Xtext integration, and even embedding of Orion in a JavaFX application.

30m1-shirt

Orion Java server scalability

Orion continues to ship both Java and JavaScript variants of the server side infrastructure. We believe both server implementations are important, as each one has quite different characteristics and excels in particular use cases. Having multiple servers also helps to prove that our Orion client architecture is flexible and doesn’t build in any assumptions about server side technologies.

While much of our focus in 2.0 was on the new JavaScript server, in the 3.0 release we are doing extensive work on the Java server. In particular we are investigating what it will take to scale it out to much larger deployments, identifying bottlenecks and weak points in the architecture and implementation. In 3.0 M1 we have been working on a scalability roadmap for the Orion server, and have started work on tackling some of the most pressing scalability problems.

We have also embarked on enabling deployment of the Orion server as a WAR file, and rewriting our Orion server build to use Maven/Tycho. These are all long-running work areas that will carry forward into future milestones and releases.

Standalone compare widget

The Orion compare editor is now available as a separately consumable build for easier deployment into your web pages. This follows the same pattern we introduced with the standalone editor earlier this year. The built compare editor is not yet available directly from the Orion download page, but for now you can see directions and a download on the Orion wiki. There is more information on compare editor embedding in Libing Wang’s blog post.

Editing groups in linked mode

Support has been added to the Orion editor to allow editing groups in linked mode. This is useful for users who need to edit multiple locations at the same time.

linked_groups

You can try this out below by requesting a content assist on for (select for – iterate over array with local var) and then renaming the i variable:

/* Type for and hit control space for content assist*/


Generic template content assist support

Generic template support has been implemented for content assist. Templates support variable editing where each variable is enclosed in ${}.

contentassist_generic_templates

Shell page custom types

Work has been done to enable plug-ins to contribute custom parameter types to the Shell page, which can then be used in commands. This improves command semantics and enables dynamic computation of content assist proposals (see current example, subject to refinement in 3.0 M2).

30m1-shell-custom-types

Shell page delegated UI

Commands contributed to the Shell page can now provide a delegated UI to interact with the user during execution. In the example below, a login command is prompting the user for credentials with a custom input field.

30m1-shell-delegated-ui

That’s all for this milestone! Enjoy.

Posted in New & Noteworthy | Comments Off

Use the Orion Editor in your blog

As a quick follow up to the last post, we thought it would be worthwhile to mention 2 ways on how to embed the Orion editor in your blog. Depending on whether you want to make the editor always available for use on your blog, you can select to add the code either in the header or run it inline.

Header

If you are planning on posting lots of code to your blog, you might be better off in including your code in the header of your site. This is what we did for the planetorion.org site – which is a WordPress blog. We will also take a look at how to embed it in a Blogger site.

WordPress

To add the editor to you WordPress blog (assuming you have the necessary permissions to modify the blog), from the Dashboard select Appearance>Editor.

editorAppearance

This will bring you to the Edit Themes page. From the Templates list on the right hand side, select “Header”. This will bring up the header.php code where we will insert the code for the editor.

Locate the last php tag before the closing </head> tag in the header.php – the php tag will contain the call to wp_head() – the orion editor code should be copied before the php tag.

Here is the code we used:

<!-- Orion Editor start-->

<!-- Global version -->
<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>
if (window.addEventListener) {
window.addEventListener('load', function() {
require(["orion/editor/edit"], function(edit) {
edit({className: "editor"});
});
}, false);
}
</script>

<!-- AMD version -->
<!--
<link rel="stylesheet" type="text/css" href="http://eclipse.org/orion/editor/releases/3.0/built-editor.css"/>
<script src="http://requirejs.org/docs/release/2.1.4/minified/require.js"></script>
<script>
require(["http://eclipse.org/orion/editor/releases/3.0/built-editor-amd.min.js"], function(edit) {
edit({className: "editor"});
});
</script>
-->

<style>
pre.editor{
padding: 0px;
border: 1px solid lightgrey;
}
</style>
<!-- Orion Editor end-->

Two quick comments on the code. First of all we reference the 2.0 release in the code as it is the current stable release. If you want to live on the cutting edge, you can replace the 2.0 with 3.0 in all places to get the latest good build from the development stream. Second, notice that both versions of the build are included in the above snippet (although one is commented out) – use whichever one you prefer. You can also choose to modify the classname to something else – you just have to make sure to use the new name. For example if you change the classname in the header to:

//...snip ...
edit({className: "orionEditor"});
//... snip ...

all uses of the editor in your blog posts would then need to use this new name:

<pre class="orionEditor" data-editor-lang="js">
/*
 * This is an Orion editor sample.
 */
function() {
}
</pre>

Blogger

The same idea applies to Blogger blogs – if you want to be able to use the editor in all of your posts, you should put the code in the header. To get to the right place, select Template from the right hand side, and then click on the Edit HTML button to bring up the template.

bloggerEditor

We used the exact same code that we put in the WordPress header and we pasted it right before the closing </head> tag.

Using the Editor

Once you have added the editor code to your header files, you can use it anywhere in your blog by simply adding the class="editor" attribute to either a pre or div in your code that contains the code you want displayed in the editor.

Inline

If you just want to get a standalone snippet that you can use in your blog or on a page, Ken wrote a useful plugin you can install into your OrionHub account that will generate a standalone snippet for you right from your editor.

To install it, click on Get Plugins in the top Orion bar, and then click Install next to the Snippet plugin.

getPlugins

snippetPlugin

Once it’s installed you can open an editor instance and you will see a new Snippet button at the top of the editor. Select the code that you want to paste into your blog, hit the Snippet button and you will get a piece of selected code that’s ready to be copied into your blog (don’t forget to hit Ctrl+Z afterwards to get back your original editor contents).

snippetJS

- Bogdan & Silenio

Posted in Tips & Tricks | Comments Off

Orion at EclipseCon Boston 2013

The EclipseCon Conference in Boston is shaping up to be a great one overall and really interesting for those using or looking to use Orion. There’s a tutorial, hackathon, many information sessions and a BOF Wednesday night. 14 opportunities to engage with developers leveraging and contributing to Orion.

Hope you can join us at some of the sessions, Ken & Simon, Co-leads on the Orion Project. Follow the updates @orionhub.

Code Sprint – Saturday and Sunday at the Seaport
SOA Symposium (Stardust Browser Modeler) 25 March 09:00-12:00
Orion Tutorial 25 March 13:00-16:00
Raspberry Pi Hackathon 25 March 20:00-21:00
Fully Hosted Software Development with Orion 26 March 13:30-14:05
Deploying Orion for cloud-based development in the enterprise 27 March 14:15-14:50
An Orion Symposium – How to utilize Orion in the Community 27 March 17:00-18:00
Orion BoF 27 March 19:00-20:00
OSGi and JavaScript 28 March 10:15-10:50
This is Orion on Node 28 March 11:00-11:35
Modern UIs with JavaFX, OSGi, and e4 and the tooling provided by e(fx)clipse 28 March 11:45-12:20
Embracing Eclipse Orion 28 March 14:15-14:50
Business Process Modeling, UI Mashups and Web Application Integration with Orion and Stardust 28 March 15:00-15:35

Posted in General | 1 Comment

Orion 2.0 Release

The team is happy to announce our 2.0 Release of Orion, 4 months after coming out of incubation at Eclipse. There’s been several posts along the way about what we’ve been working on but a few highlights include removing library dependencies to allow easier consumption, continuous improvements to JS Content Assist, simplifying the process for embedding the Orion Editor and Shell enhancements mostly to support the stand alone Node.js version of Orion. You can download it or jump to Orionhub.org to try it out.

The Node version of Orion is a great example of how well the client side of the code is separated from the Server aspects. There are no client side specific changes, it’s all handled by the server providing compatible RESTful APIs and the plugins extending the client to enable npm and node launching capabilities. Need to edit any file wherever Node.js is running? It’s as easy as “npm install orion” (see the Doc). There’s still some work ongoing to make it easier to allow extensions to the Orion Node server without changing code and we hope to have that enabled for 3.0.

Orion 2.0 also contains a prototype of Projects. At the moment Projects will let you setup an SFTP project plus filter down some of your folders so that you can focus on a particular task. The aim is to provide much more complete support for work flows and repository integrations, and they will be added over time. To enable the Projects page, just follow the Get Plugins link in the banner and add it in.

Under the covers there were a lot of changes to the libraries we use within Orion. Simon Kaegi will be speaking about creating specifications for some of these libraries at his OSGi and JavaScript session at EclipseCon. The following list is a few of our key reusable libraries:

You can also now easily consume builds of just the Orion Editor for use in your projects, web pages or Blog posts. See the blog post link below or in action via a Snippet plugin

The Scripted team has also made great strides with their desktop version of the Orion Editor, you can check that out on GitHub.

We now start our planning for 3.0 to be released near the end of June. The team and contributors are still focused on Projects, improved content assist, a simple way to experiment with Orion without creating an account, web components, expanded Node capabilities and deployment options from within Orion. There are some great talks about Orion at EclipseCon in Boston and some great synergy building around other Eclipse projects and how we might work together. Join our weekly dev and bi-weekly UX calls, join the mailing list, look for ways to use or contribute to Orion. This is a great time to join in as the project is really starting to gain momentum.

Orion 2.0 M1 – New and Noteworthy
Orion 2.0 M2 – New and Noteworthy
A Journey Toward Web Components (Part 1)
Editing eclipse.org Web Sites with OrionHub
Embed the latest Orion Editor in your code in 2 steps
Orion 2.0: What’s New for Shell page plug-ins
Managing a Web Site using Orion and SFTP

Posted in Announcements | Comments Off

Orion 2.0: What’s New for Shell page plug-ins

The Orion 1.0 Shell page provided a basic mechanism for plugging custom commands into a shared command line environment.  Shell page enhancements for Orion 2.0 have focused on formalizing new parameter types that provide access to files in the Orion workspace, and enabling commands to return result values beyond plaintext.  Additionally, users can now redirect command output to workspace files.  The implementation of zip and unzip commands will be used to demonstrate these new capabilities.

There are two new command parameter/return types:

  • blob: A blob is just a JS blob object representing binary data (for example, an ArrayBuffer).
  • file: A file represents a file or folder in the Orion workspace, and has the following shape:
    {
        path: (string, relative to CWD, no trailing '/'),
        isDirectory: (optional boolean, if absent implies false),
        blob: (optional blob, the file's content, absent if isDirectory is true)
    }

Command parameters of type file can be configured to give the desired file selection/autocompletion behaviors.  The configurable attributes are booleans that default to false if absent, unless noted otherwise:

  • directory: true if directories should be selectable
  • file: true if files (files that are not directories) should be selectable
  • multiple: true if multiple directories/files should be selectable (setting this to true enables the use of wildcards)
  • recurse: true if directory descendents should be recursively selected (only relevant if directory and multiple are true)
  • exist: true if a selected/typed directory or file must exist, or false if it must be non-existent.  If undefined, the default behavior is to allow both existing and non-existing files to be selected/typed.
  • content: true if content should be retrieved for selected existing files (only relevant if file is true)

Example: zip command

The following plug-in implementation of a zip command uses JSZip, a public JS library, to do the hard work.

<html>
<head>
<title>Shell 'zip/unzip' Plugin</title>
<script src="/orion/plugin.js"></script>
<script src="https://raw.github.com/Stuk/jszip/v1.0.0/jszip.js"></script>
<script src="https://raw.github.com/Stuk/jszip/v1.0.0/jszip-load.js"></script>
<script>
window.onload = function() {
    var zipProperties = {
        name: "zip",
        description: "Archive files into a .zip",
        parameters: [{
            name: "files",
            type: {name: "file", file: true, directory: true, exist: true, multiple: true, content: true, recurse: true},
            description: "The files to add to the .zip"
        }],
        returnType: "blob"
    };
    var zipImpl = {
        callback: function(args) {
            var zip = new JSZip();
            var files = args.files;
            files.forEach(function(file) {
                var segments = file.path.split("/");
                var current = zip;
                var dirSegmentCount = segments.length - (file.isDirectory ? 0 : 1);
                for (var i = 0; i < dirSegmentCount; i++) {
                    var segment = segments[i];
                    if (segment !== ".") {
                        current = current.folder(segment);
                    }
                }
                if (!file.isDirectory) {
                    current.file(segments[dirSegmentCount], file.blob);
                }
            });
            return zip.generate({type:"blob"});
        }
    };

    var provider = new orion.PluginProvider();
    provider.registerServiceProvider("orion.shell.command", zipImpl, zipProperties);
    provider.connect();
};
</script>
</head>
<body></body>
</html>

Use of some new Shell page features can be seen in the zipProperties object.  The “files” parameter specifies that workspace files and directories should be selected recursively, and the new returnType command attribute specifies that the returned value will be a blob (the return type defaults to string in the absence of this attribute).  The details of zipImpl are not worth examining here, other than to notice that its returned value is a blob.  Running command “zip ui” in the Shell page (where “ui” is the name of a directory in the cwd) gives the following output:

running the zip command without a specified destination

A destination was not specified for the resulting blob, so the default destination is the Shell page’s output area.  However the Shell page will not attempt to write returned blob content to its output since it’s unlikely to be readable, hence the not-too-useful output of “(1 blobs)”.  It’s up to the user to redirect a command’s output to a workspace location of their choice by providing a value for the optional output argument that is now added to all contributed commands.  So running command “zip ui –output ui.zip” successfully writes the returned blob content to file ui.zip.

Example continued: unzip command

The unzip command can be added within the same plug-in file as the zip command above, so details like its <script> inclusions are omitted here.

    var unzipProperties = {
        name: "unzip",
        description: "Extract the files from a .zip archive",
        parameters: [{
            name: "file",
            type: {name: "file", file: true, exist: true, content: true},
            description: "The .zip to extract from"
        }],
        returnType: "[file]"
    };
    var unzipImpl = {
        callback: function(args) {
            var zip = new JSZip(args.file.blob);
            var files = zip.files;
            var newFiles = [];
            for (var name in files) {
                if (name.lastIndexOf("/") === (name.length - 1)) {
                    /* represents a directory */
                    newFiles.push({path: name.substring(0, name.length - 1), isDirectory: true});
                } else {
                    var file = zip.file(name);
                    newFiles.push({path: name, blob: file.asArrayBuffer()});
                }
            };
            return newFiles;
        }
    };
    // ...
    provider.registerServiceProvider("orion.shell.command", unzipImpl, unzipProperties);

Since unzip’s return type is [file], the user-provided –output value will represent the directory that the resulting files are written to.  Values of type file are always resolved in terms of a directory since a file has a path attribute, while values of type blob are always written to a file since a blob is just raw data.

running the zip command without a specified destination

String value processing

Another enhancement to command return values is the processing of string values for markdown-formatted links.  Result strings written to the Shell page now have any contained URLs that are formatted as [link text here](link.address.here) replaced with live anchor elements.  As an example, command return value “Visit [Eclipse](http://www.eclipse.org), or literally [](http://www.eclipse.org)” renders as shown below.

running the zip command without a specified destination

What’s Next?

The piece that’s missing from this updated picture is a means of chaining commands, or at least specifying a custom input source (analagous to the new –output parameter).  The absence of these is the reason that the example unzip command takes a file as its input, rather than a blob, which would have made it symmetrical with the zip command.  Blobs are currently only usable as command return values, not as parameters. The ability to chain commands is dependent on GCLI adding support for this functionality, but adding something like an –input parameter is an interim step that the Shell page could take for 3.0.

If there are more Shell page features that your plug-in needs then please log Enhancement Requests in Orion’s Bugzilla.

Lastly, thanks are due to Stuart Knightley for his JSZip utility that made implementing the zip/unzip example trivial.

Posted in Tips & Tricks | Comments Off

Embed the latest Orion Editor in your code in 2 steps

The Orion editor has been packaged into 2 standalone builds to help make it easier to use. These are available from the Orion build page in the most recent 2.0 builds.

Here is how you can get the latest release and embed it in your Javascript code:

Step 1: Add the following lines somewhere in your head section to get the built css and editor files:

<link rel="stylesheet" type="text/css" href="http://eclipse.org/orion/editor/releases/2.0/built-editor.css"/>
<script src="http://eclipse.org/orion/editor/releases/2.0/built-editor.min.js"></script>
<script>
	require(["orion/editor/edit"], function(edit) {
		edit({className: "editor"});
	});
</script>

Step 2: Add the editor class and some data attributes to the HTML element containing the code you want to display in the editor.

<pre class="editor" data-editor-lang="js">
/*
 * This is an Orion editor sample.
 */
function() {
    var a = 'hi there!';
    window.console.log(a);
}
</pre>

Done!

The editor features can be customized by passing in data attributes. Here is the current available list with the defaults:

/**
	 * @class This object describes the options for edit.
	 * @name orion.editor.EditOptions
	 *
	 * @property {String|DOMElement} parent the parent element for the view, it can be either a DOM element or an ID for a DOM element.
	 * @property {Boolean} [readonly=false] whether or not the view is read-only.
	 * @property {Boolean} [fullSelection=true] whether or not the view is in full selection mode.
	 * @property {Boolean} [tabMode=true] whether or not the tab keypress is consumed by the view or is used for focus traversal.
	 * @property {Boolean} [expandTab=false] whether or not the tab key inserts white spaces.
	 * @property {String} [themeClass] the CSS class for the view theming.
	 * @property {Number} [tabSize=4] The number of spaces in a tab.
	 * @property {Boolean} [wrapMode=false] whether or not the view wraps lines.
	 * @property {Function} [statusReporter] a status reporter.
	 * @property {String} [title=""] the editor title.
	 * @property {String} [contents=""] the editor contents.
	 * @property {String} [lang] the styler language. Plain text by default.
	 * @property {Boolean} [showLinesRuler=true] whether or not the lines ruler is shown.
	 * @property {Boolean} [showAnnotationRuler=true] whether or not the annotation ruler is shown.
	 * @property {Boolean} [showOverviewRuler=true] whether or not the overview ruler is shown.
	 * @property {Boolean} [showFoldingRuler=true] whether or not the folding ruler is shown.
	 */

To customize your editor, simply add data attributes prefixed with “data-editor-”. Since HTML attributes are case insensitive, camel case letters are prefixed by a dash. For example to create a Javascript editor with only the line ruler showing, you would create the editor like this:

<pre class="editor" data-editor-lang="js" data-editor-show-annotation-ruler="false" 
data-editor-show-overview-ruler="false" data-editor-show-folding-ruler="false"
>
/*
* This is a orion editor sample.
*/
function() {
var b = 'no rulers here!';
window.console.log(a);
}
</pre>

Here is what this will look like:

/*
 * This is an Orion editor sample.
 */
function() {
    var b = 'no rulers here!';
    window.console.log(a);
}

Stay tuned for more posts on the Orion editor – for more info on the new builds check out the editor build wiki page.

Posted in Tips & Tricks | 2 Comments

Orion 2.0 M2 – New and Noteworthy

This Orion milestone saw some major structural changes under the covers of Orion. The Orion browser client had a major refactoring to make it easier to consume Orion components, and the new server based on Node.js made great progress. Some of the core Orion workspace concepts were retooled to enable capabilities such as live development of a web site over SFTP from Orion. Although the list of new “features” for end users in this milestone is relatively small, the Orion team is pretty excited about the direction we are going and the kinds of applications these structural changes will enable down the road.

Read on for all the details about what’s new in Orion 2.0 M2, which is now available on OrionHub or for download.

Improved content assist inferencing

Several enhancements have been made to JavaScript content assist in Orion. Object
types and properties can now be inferred in more cases, such as:

  • Type inferencing on array values.

    Sample of infering array value type

  • Inferring associative arrays, for example myObj['someProp']

    Sample of infering values of associative arrays

  • Ability to infer variables before they are declared (this is a feature of JavaScript)

    Sample of infering variables above their declaration

  • Inferring object properties based on usage analysis.

    Sample of infering object properties based on usage analysis

Library independence

Previous releases of Orion made extensive use of Dojo for internationalization, DOM manipulation, widgets, and other helper functions. This hard-wired library choice made it difficult for consumers of Orion components to run with a different version of Dojo, or with alternative libraries such as jQuery or MooTools. In this milestone Orion has completely eliminated use of Dojo, making it much easier for people to consume parts of Orion into different kinds of web applications. For a deeper look at the motivation for this change and our longer term ideas, see Susan McCourt’s detailed blog post.

As an added bonus, this refactoring has significantly improved our page load performance. For example, PageSpeed analysis of loading the Orion editor containing a JavaScript file shows 45% fewer requests and 80% smaller total transfer compared to the previous Orion milestone (2.0 M1).

Orion on Node.js makes progress

The port of Orion running on Node.js is now available in the Node package registry as version 0.0.8. For complete details on how to install it and what it can do, see the Getting Started guide. Here is what’s working so far:

  • Basic Navigator operations (Create file/folder, delete file/folder, copy/move/rename a file)
  • Basic Editor operations (Edit file, save file, syntax highlighting, ETags)
  • Plugin operations (Install/uninstall Orion plugins)
  • Shell support for launching and debugging node applications (type "help node" in the Shell page to find out more)
  • Shell support for Node package manager (works the same as the usual npm console command)

Projects

A very early preview of a new project concept is available in this milestone. Effectively a project provides a way to link content you are working on with external sources and targets. Over time this will simplify and streamline how you import your code to Orion tools, and how you deploy from Orion into your target environment. Currently, support is implemented to edit code and other sources directly on a remote SFTP server. For more details, see Anton McConville’s
blog post telling all about it.

New Shell page command parameter and return types

Commands contributed to the Shell page can now use the "file" and "blob" types to read and return Orion workspace file content. A Shell page user directs the output of such commands to their chosen workspace location with the new --output parameter.

Posted in New & Noteworthy | Comments Off

Orion 2.0 M1 – New and Noteworthy

Two major themes of the Orion 2.0 release are improved import/deployment and node.js support. These are large scale efforts and their benefits will mostly come in future builds. In the meantime, here are some goodies in the 2.0 M1 milestone for your holiday entertainment. Check it out now on OrionHub, or download the server.

Prototype node-based Orion server

Work is well underway to create a simple Orion server running on node.js. The small footprint of this server makes it suitable for embedded devices and potentially very large scale cloud scenarios. Having all the client and server tools written in the same language also raises some new possibilities and makes the Orion architecture very flexible. This server is not yet ready for prime time, but you can check out or fork the code on GitHub.

Narrow search on file type

You can now narrow down a global search based on file type. Open the drop down menu in the search bar, and select a file type from the list. You can search on file type only, or a combination of file type and search keyword.

Search and replace capture groups with regular expressions

When doing search and replace in the Orion editor, you can now use JavaScript-style regular expression syntax to indicate capture groups in the replacement text. For example, to remove the id from an HTML table row or cell, search for "<(td|tr)( id=”.*”)>" and replace with "<$1>".

Drag files from desktop into Orion

You can now drag files and directories directly from your desktop into Orion. This feature is fully supported only on Chrome. On Firefox you can drag individual files from your desktop, but not folders. If you’re on Internet Explorer you can use Import local file from the Actions menu. We are investigating support for drag and drop on Internet Explorer 10.

Editor improvements on Android

The Orion editor has been improved on Android. All forms of input are supported, including virtual keyboard, voice input, gesture typing in Android 4.2, and of course physical keyboards. Editor selection and copy/paste are supported as well. Orion currently supports only mobile Chrome browser on Android 4.1 or later.

Editor themes now apply to CSS and HTML editors

The Editor Theme settings tab previously applied only when editing JavaScript files. These editor themes are now also applied when editing CSS and HTML files.

Customizable editor font size

You can now change the editor font size from the Editor Theme settings tab.

New Prospecto editor theme

Orion has a new editor theme called Prospecto. You can customize or change editor themes from the Settings page.

New shell commands

Several new commands have been added to the Shell page:

  • A plugins command for working with Orion plugins. This command has sub-commands for listing, installing/uninstalling, reloading, and enabling/disabling plugins. Type help plugins on the shell page for more details.
  • A service command for listing the available instances of a given service.
    Type help service on the shell page for more details.
  • A clear command to clear the screen

Open shell from navigator

You can now open a shell page on a particular directory from the Navigator page. Select any directory, and select Open in Shell from the Related menu in the top banner.

Highlight matching term in search

When entering a search term in the search bar, matching segments from previous searches are now highlighted in the proposal list.

Secure connections to OrionHub

Communication with OrionHub now occurs over HTTPS, providing authentication and encrypted communication with your hosted tools. Orion itself has supported HTTPS for awhile, but it was recently deployed to the OrionHub server in particular.

Posted in New & Noteworthy | 2 Comments

Editing eclipse.org Web Sites with OrionHub

This post is for fellow Eclipse committers who have recently migrated their Eclipse project web sites to Git. With your web site stored in Git, you can now use Orion to maintain your web site directly from your browser without installing any tools. Here is a quick primer to get you started.

1. Create an OrionHub account

If you don’t already have one, the first step is creating a new account at orionhub. Simply go to orionhub.org and follow the directions to create a new account. You will receive a confirmation email, and you need to click the link in that email to confirm your account.

2. Setup

Although not strictly needed, there are some setup steps you can do with your new account to smooth your Orion experience. Once logged in, click your username in the top right corner, and navigate to the Settings page.

On the User Profile tab, enter your Git email address and user name to be used when creating new commits. If you want, you can also select Enable Storage to allow Orion to cache your Git password or ssh keys in the local browser storage. This saves you from having to enter it on every push and pull. Finally, at the very bottom of this page under Linked Accounts, you can associate your Orion account with a Persona or OpenId (google) account. This is entirely optional, but means in the future you can log into Orion with your Persona or Google credentials, and not have to worry about another password to remember.

Since Eclipse web sites tend to be PHP-happy, you will probably also want to install a plug-in to provide PHP syntax highlighting. By default Orion only highlights HTML, CSS, and JavaScript, but you can teach it to highlight other file types using plug-ins. In the top banner, click Get Plugins to visit the Orion plugin catalog. Find the CodeMirror plug-in, and click Install. This will bring you back into Orion, where you need to click Submit to complete the installation.

3. Get the code

Now we’re ready to pull your web site into Orion. Go to the Repositories page, and click Clone Repository. Paste in the ssh URL of your Git repository, and click Submit.

Once the clone completes, you will see the web site repository added to your repositories list:

4. Edit the site

Click Show in Navigator next to your repository to reveal your site in the Navigator page. From here you can browse around, create/delete/rename files and directories, and import content. Click any file to open it in the Orion editor:

5. Commit your changes

Once you have finished making your changes, you’ll want to commit them. The Related menu is the easiest way to navigate between different Orion pages that focus on the same file or directory. From either the editor or navigator page, open the Related menu, and select Git Status. The status page shows you something similar to git status on the command line, except it shows you a rich compare editor that lets you easily browse between your changes.

All the usual git commands for manipulating your working directory or Git index are available here, such as Stage, Unstage, Commit, Checkout, Reset, etc. The Commits section at the bottom shows any local commits that have not yet been pushed to the remote, and any fetched commits that have not yet been merged into your local working copy.

Simply stage, commit, and push your changes, and you’re done! Visit your web site and bask in the glory of browser-based development. Now that you’re all setup, you can easily maintain your web site from any connected PC or tablet from anywhere in the world. The downside is you now have no more excuses for why your Eclipse project page is always so out of date…

Posted in Tips & Tricks | 1 Comment