Orion 0.5 M1 – New and Noteworthy

There has been a lot of behind the scenes work in Orion 0.5 M1 to help prepare for a Fall 2012 1.0 release. In particular there was significant work on globalization, accessibility, and cleanup of code and API. We also found some time for a few new end-user features, listed below. As usual, head to OrionHub to check it out, or head to eclipse.org/orion to sign up. You can also download your own copy of the server.

Esprima-based content assist

A new content assist plugin for JavaScript is now available. This plugin uses the Esprima JavaScript parser to provide far more accurate semantic analysis. Notable improvements over Orion’s previous JavaScript content assist include:

Completion on object literal members:

Inferencing of basic variable types:

Simple flow analysis for type inferencing:

Support for certain built-in types:

Type analysis for objects created from constructors:

To install this plugin, simply click Get Plugins in the top banner and select Esprima content assist.

Syntax highlighting of JavaScript number literals

The Orion editor now provides syntax highlighting of number literals in JavaScript source code.

Character level compare

The Orion compare editor can now display differences down to the character level, in addition to coarse-grained blocks. Separate commands are available in the toolbar to navigate to the next or previous block or individual change.

Search highlights all matches

When you perform a search in the Orion editor, all matches are now highlighted. Matches appear both within the text, and in the overview ruler next to the scrollbar. This allows you to see the position of all matches in the file at a glance.

Traverse through file annotations with keyboard

You can now traverse through all annotations such as errors, warnings, and search results using the keyboard. As you traverse to a new annotation, the corresponding tooltip for that annoation will automatically open right below your cursor. This lets you quickly jump to the next error, find out the cause, and fix it without your fingers ever leaving the keyboard.

Drag to import

You can now drag a zip file to import into Orion rather than searching for it in a file dialog. Select Import as Zip as usual in the Navigator page, and then drag a zip file onto the target that appears. Support for importing non-zip files is coming soon!

You can now create, launch, and modify web sites directly from the Navigator page. Let’s say you have an HTML file in Orion and you want to launch it as a static web site. Simply open the actions menu next to the file and select View On > New Site.

This will automatically create a new site, launch it, and open the site in a new browser tab. The site will have an auto-generated name, but you can always change this later from the Sites tab. Back in the Navigator, you can add additional folders and files to the site with a similar gesture:

Image editing with Pixlr plugin

A new plugin is available for editing images in your Orion projects using Pixlr. Click Get Plugins in the top banner to install the plugin from the catalog. Once installed, go to the Navigator
page and click Open With > Pixlr Image Editor from the actions menu next to an image file. This will take you to an Orion page with the Pixlr image editor embedded within it. When you save the file within Pixlr, you will have the option to save the result back into Orion.

File storage on S3

An experimental plugin is available that lets you store your Orion files on Amazon S3. For complete details, see the Connecting Amazon S3 to Orion blog post.

New page content service

A new service has been introduced, orion.page.content, that allows an Orion plugin to contribute page content. The plugin content is framed by the common Orion banner and equipped with standard Orion page services, such as the related pages menu. The page content itself is rendered in an iframe inside the page. This service was used by the above Pixlr plugin to make the third party Pixlr editor appear like an Orion branded page.

Plugins that define commands or links that relate to a particular item on a page now have a more expressive way of validating metadata and building complex URI’s from metadata. The validationProperties have been expanded to allow full regular expression matching against metadata properties, as well as accessing multiple properties through piped OR expressions. In addition, the matches on validated properties can be cached in named variables and used in a uriTemplate property, which can build a complex link from metadata. For example, the following validationProperties and uriTemplate can build an eclipse.org git URL from Orion metadata:

validationProperties: [{
	source: "GitUrl", 
	match: "git.eclipse.org/gitroot", 
	variableName: "EclipseGitLocation", 
	variableMatchPosition: "after"
 uriTemplate: "http://git.eclipse.org/c{EclipseGitLocation}"

Content type validation

Plugins can now use content types to validate file metadata when supplying commands in the navigator or editor. Before, plugins used file name extension patterns to specify what kinds of files they could operate on. Now, a list of content types can be used, which allows the plugin to be validated for multiple file types, as well as simplifying the specification.

Moved to latest Require JS

Orion now includes the latest version of the RequireJS module loader for JavaScript.

API changes

As we move closer to a 1.0 release, we have been taking a hard look at our APIs and cleaning them to be consistent and evolvable in the long term. Refer to the 0.5 API changes wiki page for complete details on what is changing. If you have already implemented plugins for Orion you should keep an eye on this page.

This entry was posted in New & Noteworthy. Bookmark the permalink.