Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Difference between revisions of "Orion/Documentation/User Guide/Getting started"

(Importing folders and files)
(Using commands)
Line 25: Line 25:
 
[[Image:Orion-navbreadcrumb.png]]
 
[[Image:Orion-navbreadcrumb.png]]
  
=== Using commands ===
+
=== Using the common banner ===
  
Global commands for Orion (such as search, user profile, and help) appear at the top right of the page. Links to other pages appear beside the global commands.
+
The banner provides access to common operations in Orion.  The main navigation links appear at the top left of the page banner, next to the Orion logo.  The right side of the banner provides links to the user profile and an options menu containing settings, help, and other commonly used actions.  Underneath, the page header describes the title of the page, the breadcrumb, and the name of the resource being manipulated.  On the right of the page header are items that let you quickly find and mark pages that you commonly use. The star icon allows you to mark the current page as a favorite. The search box and <tt>Related pages</tt> menu allow you to quickly navigate to a new page. 
Commands that operate on the navigator (such as <tt>New File</tt>, <tt>New Folder</tt>) are located on the left side of the dark bar in the banner.
+
 
 +
Below the banner, the content of the page appears.  Commands that operate on the content itself (such as <tt>New File</tt>, <tt>New Folder</tt> in the navigator) are located in the toolbar above the content.
  
 
[[Image:Orion-topbanner.png]]
 
[[Image:Orion-topbanner.png]]
  
Commands that apply to an individual file or folder are located in the '''Actions''' column next to the item.
+
Commands that apply to an individual file or folder are located in an actions menu next to the item in the navigator.
  
 
[[Image:Orion-navactions.png]]
 
[[Image:Orion-navactions.png]]
  
Files and folders may be selected by clicking the checkbox beside their name. Commands that operate on the selected items (such as move, copy, and delete) will appear on the dark bar in the banner when a selection has been made.
+
Files and folders may be selected by clicking the checkbox beside their name. Commands that operate on the selected items (such as move, copy, and delete) will appear on the navigator toolbar when a selection has been made.
  
 
===Importing folders and files===
 
===Importing folders and files===

Revision as of 18:08, 24 February 2012

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

Logging into Orion

When you first attempt to move beyond the welcome page on an Orion server, you'll be prompted for credentials.

Orion-0-3-login.png

Clicking Sign in will take you to the Login page. When running from your own server, you can create an account directly from the login page. If you are accessing a server hosted elsewhere, you may need to ask the server administrator to create an account for you. After a successful login you will be redirected back to the page you came from.

Working with folders and files

In Orion, each user has a virtual root folder where various folders and files can be created. These files are maintained on the Orion server. The Navigator page is used to browse and modify your files.

Creating folders and files

Once you've successfully logged into Orion, go to the Navigator page by clicking Navigator in the banner at the top of any page. This is where your files and folders will be shown. Because you haven't created any files or folders yet, the navigator is initially empty.

Orion-navinitial.png

To start working with files and folders in Orion, create a folder using the New Folder button on the left side of the dark bar in the banner:

Orion-navbreadcommands.png

To navigate the files, you can either expand the folders (using the triangles), or you can click on the folder links to drill into that folder. After you have drilled into a folder, the breadcrumb at the top of the page allows you to navigate back up the tree.

Orion-navbreadcrumb.png

Using the common banner

The banner provides access to common operations in Orion. The main navigation links appear at the top left of the page banner, next to the Orion logo. The right side of the banner provides links to the user profile and an options menu containing settings, help, and other commonly used actions. Underneath, the page header describes the title of the page, the breadcrumb, and the name of the resource being manipulated. On the right of the page header are items that let you quickly find and mark pages that you commonly use. The star icon allows you to mark the current page as a favorite. The search box and Related pages menu allow you to quickly navigate to a new page.

Below the banner, the content of the page appears. Commands that operate on the content itself (such as New File, New Folder in the navigator) are located in the toolbar above the content.

Orion-topbanner.png

Commands that apply to an individual file or folder are located in an actions menu next to the item in the navigator.

Orion-navactions.png

Files and folders may be selected by clicking the checkbox beside their name. Commands that operate on the selected items (such as move, copy, and delete) will appear on the navigator toolbar when a selection has been made.

Importing folders and files

There are many ways to import your files into Orion. You can upload a zip file, import via SFTP, or clone a Git repository.

Orion-navimport.png

To import files from your local file system into Orion, you must first zip up the files you wish to import. Choose this zip file in the file selection prompt offered in the import dialog available in the menu next to each folder.

Orion-navimportdialog.png

The contents of the zip file will appear in your folder in the navigator. (If you are working on the Orion demo server, you will also notice a folder associated with git inside your new folder. To configure this feature on your own localhost version of Orion, see the server administration guide.)

Orion-navimportcontent.png

Exporting folders and files

When you have worked with your code on Orion and are ready to export your work back to your local workstation, navigate to the folder you wish to export and choose the Export as Zip link.

Orion-navexport.png

Creating favorites

You can use the Favorites icon to bookmark a folder or file in your navigator. A link to this folder or file will appear in your favorites list and can be used to navigate quickly to that file or folder.

Orion-favorites.png

Favorites are also suggested as move/copy targets.

Orion-copymove.png

Extending the navigator

We've implemented an extension point that allows a plug-in to add commands to the navigator's toolbar and local item actions. To see what plug-ins are installed in your Orion system, open the Settings page from the Options menu.

Orion-pluginregistry.png

The registry shows what plug-ins you have installed, and allows you to add plug-ins by typing the URL of a plug-in in the text box. You can see that the several plug-ins that provide Orion functionality, such as file management, user management, git, jslint, are already installed. Plug-ins provide different kinds of new behaviors, or "extensions", to the system.

The orion.navigate.command extension point allows plug-ins to contribute commands to the navigator. Each contributed command can specify how many and what types of files it can work with. Contributed commands will appear in the navigator item menus.

A sample plug-in that demonstrates the different kinds of commands you can contribute is located at http://orionhub.org/plugins/sampleCommandsPlugin.html. You can paste or type this URL into the registry page and press the Install button. When you reload the navigator page, you will see new commands in the item and toolbar menus.

Orion-sampleCommands.png

See sampleCommandsPlugin.html for the source code.

Editing code

Once you've navigated to the file you want to work with, click on its link to open the Coding page. You'll find that the editor supports the basics (cut/copy/paste, undo/redo) as well as your favorite text-editing features from Eclipse desktop (move up/down, copy up/down, go to line, find, incremental find). For now, most of these commands are accessible only through keyboard shortcuts, using the default key bindings in Eclipse desktop. To see a full list of available keyboard commands in the editor, press Ctrl+Shift+L. (Outside of the editor, you can get the same help on any page by pressing Shift+?.)

JavaScript development

If you are working with JavaScript (a *.js file), the editor will syntax highlight your code. You will also see an outline of the functions in your JavaScript, as well as markers for problem areas in your code. Integration with existing web tools is an important goal in Orion, so we have implemented a plug-in that runs JSLint on JavaScript files in order to produce the outline and problem markers. The familiar Eclipse problem UI is used to display the problems in the editor. You'll see problem markers by each line of code in the left hand ruler, red underlining under the problematic text, and overview problem markers on the right side. These last markers allow you to navigate quickly to a problem in a part of the file that's not currently displayed.

The editor will also match brackets when you click next to a bracket, perform auto indention, and provide source-code oriented key bindings for things like toggling comments and adding/removing block comments.

Orion allows multiple kinds of code outline views to be plugged in. For example you can install the nonymous plugin that provides a hierarchical JavaScript outline view. If you have multiple outline views installed, a drop down menu at the top of the outline pane allows you to switch between them.

Orion-editjs.png

Firebug Integration

The Orion server is Firebug-savvy, so that recent alpha versions of Firebug, together with a Firebug extension, can invoke the Orion editor to make corrections. For details about this, see the Firebug wiki.

CSS development

Syntax highlighting of CSS files is also supported, but no outlining support has been provided yet. A CSSLint Plugin can be installed to perform syntax validation on CSS files. As a proof of concept, Orion implements a very simple form of content assist. In Orion, our goal is to provide the plug-in points for things like content assist and outlining, allowing plug-in developers to enhance the functionality. For now, Orion supplies a content assist based on CSS keyword proposals. We hope to integrate existing source code analysis tools as plug-ins to enhance content assist support, outlining, and problem identification for many kinds of files.

Orion-editcss.png

HTML development

A simple HTML outline is provided, based on DOM ids. Syntax highlighting is also available for HTML files.

Orion-edithtml.png

Java development

Java syntax highlighting is also supported. However, we have not implemented any outlining or content assist. Since we are building an integrated web-based toolset, we felt it important to target first the web client languages such as JavaScript, CSS, and HTML, so we can attract members of the JS community to Eclipse. Since we are self hosting Orion development in Orion, we need the JS features first.

Extending the editor with a Plug-in

We've also implemented pluggable editor actions which allow third-party developers to extend the behavior of the Orion editor on the fly. For example, we've developed an Orion plug-in based on the JSBeautifier code formatter so that source code can be easily beautified. The plug-in is located at http://mamacdon.github.com/0.2/plugins/beautify/jsbeautify.html . Once the plug-in is installed, reload an Orion editor to see a new command appear beside rest of the editor commands.

Orion-editorplugin.png

Search support

Once you are actively using Orion, you'll find that you want to move quickly between different resources. There are several ways to go about this. We've integrated Apache Lucene search with the Orion server and exposed it in the Orion client in several ways.

Global search

The search box in the Orion navigator will perform a global search on everything in your user workspace. Results are shown in a Search Results page.

Orion-globalsearch.png

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

Orion-openresource.png

You can also perform a global search on a highlighted phrase from inside the editor using the Ctrl + H shortcut.

Orion-searchineditor.png

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.

Orion-browserbar.png

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 experiments in this area are to provide a UI for working with Git repositories. For files and folders that are managed in a Git repository, you will see a menu for navigating to the Git status of the repository containing your file.

Orion-gitmenu.png

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 also compare the content of the files.

Orion-gitstatus.png

A side-by-side compare view is also provided. This will evolve into a merge view over time.

Orion-gitsidebyside.png

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 slide out the Commit details panel to see more information.

Orion-gitlog.png

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 Site Configurations 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 Configuration button and supplying a name for your site. Your new site will appear in the table, with commands for starting, stopping, or editing the site.

Orion-sites.png

Click on the new site to go to the Edit Site page. Under the Mappings table, click the Add... button. This will give you a row in which you can define a mapping from a folder in your Orion user workspace to the location on the server where the folder will be deployed. The following screenshot shows us mapping the "MyWork" folder to the root of our new site.

Orion-siteedit.png

Click on the Save button to save the site configuration. Go back to the list of site configurations and click the Start button (Orion start icon.gif) next to your new site configuration. Now you should be able to view your site at the address shown in the Status column.

Orion-site-started.png

Since our "MyWork" folder has an index.html file in it, we see the contents of that file when we visit the newly created site in our web browser.

Orion-site-landingpage.png

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

Copyright © Eclipse Foundation, Inc. All Rights Reserved.