Orion/Documentation/User Guide/Getting started

From Eclipsepedia

Jump to: navigation, search

This tutorial will get you started with using Orion, and provides a step by step walk-through of some of the core functionality.


Getting Orion

You have two choices to get started with Orion. The first is to create an account on the public server at OrionHub. To do this, visit OrionHub, click Create a new account and enter your information. An email will be sent to confirm your address. Once confirmed, return to OrionHub and log in.

The second method to get started is to download a standalone version of the server. For instructions, see Install Orion on Localhost.

Once you have successfully set up an account, you can proceed to the next step.

Logging into Orion

When you attempt to access a page that requires logging in, you'll be redirected to the Login Page and prompted for credentials.

Login Page

On your first visit to the login page, you can sign in using either of these ways:

  • Sign in using the username and password of your Orion account. Main Pages > Search link will bring up the global search page. It will search all the files in your workspace.
  • In the pages that focus on a single directory (for example, the Editor page), clicking Navigation Menu > Related Links > Scope Search will bring up a search page that's scoped to the current directory. Only files under the selected directory will be searched.
  • You can also access the scoped directory search by selecting any directory in the file navigator and going to Actions menu (gear menu) > Scope Search.

Search page

Once the Search page is loaded, you can start to search on all criteria available on the left hand side of the page. Search results are displayed on the right-hand side.

Finding a file by name

The Find File Named dialog can be opened by pressing Ctrl+Shift+F on your keyboard. This dialog lets you search for a file by name. Simple wildcard characters are supported.

Open resource dialog

Searching inside the editor

You can also perform a global search on a highlighted phrase from inside the editor using the Ctrl + H shortcut. You can also type other keywords to search the file contents on-the-fly.

Global search in editor

A nice side effect of editing source code in browser pages is being able to use browser mechanisms, such as the history, to quickly find files. If you find yourself working in the same handful of files, opening a new browser tab and typing in the filename will quickly get you there.

Using the browser history to find files

Working with git

We intend to provide many different kinds of plug-ins for integrating Orion into open source and proprietary version control systems. Our first example in this area is a UI for working with Git repositories. For files and folders that are managed in a Git repository, you will see a menu allowing you to navigate to various Git views dealing with the file or folder:

Git commands are in the actions menu

The Related pages menu will also give you contextually appropriate links to various Git pages, including the top-level of your Git repository.

Git commands in the Related pages menu

The Git Status page shows you all the files in your git repository that have changed, and allows you to stage, unstage, and commit changes. You can multi-select files to stage/unstage/commit using shift or ctrl.

Git status page

Click the twistie arrow next to a changed file to show a comparison of what changed in the file.

Git status compare

If you prefer, you can view the changes in a side-by-side comparison:

Side by side compare

The Git Status page shows also a list of recent commits on the active branch. You may open the Git Log page by clicking the Complete Log button and see the full list of commits on that branch. Click on a commit in the log page to open the Git Commit page for complete information about that commit.

Git log overview

You can also open the Compare page for each change in the selected commit.

Launching your project as a website

Orion can create "sites" for testing an application developed with Orion as a stand-alone website. Click the Sites link on the Orion toolbar. This takes you to the Sites page, where you can create, edit, delete, or launch web sites for testing. Sites will be launched either as a sub-domain of the Orion server, or at an alternate IP address when running the server locally.

Note that if you are running your own server, and you wish to set up hosting on a sub-domain, a different IP address, or if you're running Mac OS X, you'll have to supply some more information to the Orion server. See Configuring virtual host names for more detail.

You create a site by clicking the Create Site button and supplying a name for your site. Your new site will appear and you should fill in the path mappings for your project. In this example the "My Work" project has an index.html in the root so just a basic path is required to mount that project at the root. Once done that step you select "Save". You have the option of starting the server from this page or refreshing the list of sites page to see your new site.

Sites page

Assuming you are at the sites page you can click the Start button to start the site. The result will be similar to the following image, showing the site running and the URL showing where the site can be accessed.

A started site

Upon visiting the site's URL, success! — We see the listing of the "My Work" directory we added.

Site showing files

Now browse to index.html:

Site on Orion server

At this point, we can do incremental development by using the Orion editor to change the files in our "My Work" folder, and then simply reloading the site page to see the changes.

Extending Orion

Orion allows developers to build plug-ins that add behavior to Orion pages. Let's learn about plug-ins by taking a look at a simple plug-in which extends the navigator.

To see what plug-ins are installed in your Orion system, open the Settings page from the Options menu at the top right of the Orion banner (next to the user name). Then click the Plugins category on the left-hand side of the screen.

Plugin page

The Plugins page shows what plug-ins you have installed, and allows you to install, reload, or remove plugins. You can see that several plugins that provide Orion functionality, such as file management, user management, Git, JSLint, are already installed. Plugins extend Orion by implementing new behaviors, or extensions to the system. Places where "extensions" may be contributed are often called extension points.

Extending the Navigator

The orion.navigate.command extension point allows plug-ins to contribute commands that act upon files and folders in the navigator. These commands will be placed in the Actions menu. Each contributed command can specify how many and what types of files it can work with.

A sample plug-in that demonstrates the different kinds of commands you can contribute is located at http://orionhub.org/plugins/sampleCommandsPlugin.html. On the Plugins page, you can click on Install and paste or type this URL into the text area and press Submit. When you reload the Navigator page, you will see new commands in the item action menu.

New commands in the action menu

The "Bulk item command" can act on more than one item, so it will appear in the Actions menu when you select more than one item in the navigator.

New commands in the section menu

Learning more

More information about plug-ins and extensions can be found in the architecture section in the Orion Developer Guide. See sampleCommandsPlugin.html for the source code.