This page covers how to take a look at the source, as well as how to set up for self-hosting (changing Orion code from Orion).
See the Releng Builds page for details on how to contribute changes to the build.

Self hosting using orion.eclipse.org

Self hosting using local server

We assume you are familiar with git. If not, review the Eclipsepedia Git Page. You can use EGit (the Eclipse Git client) or the command-line Git client. If you are on Windows, use msysgit if you prefer the command line git client.

Self-hosting locally involves running an Orion server on localhost, pointing your Orion editor at your local git repo directories, and working within Orion to make changes. Changes are committed using the command-line tools (or EGit), as a separate phase from the Orion workflow. Orion supports an integrated Git workflow; see Working with git.

Here are the steps needed to get up and running.

Getting the Source onto your computer

For committers: Ensure that your user name and email are set up properly so that your email matches the foundation's email address on record. Otherwise you can't push changes. See Git#Committers_new_to_Git

Clone the Orion client and server repositories using the URLs below. Choose a target directory that works for you. You'll be importing this code later into Eclipse in order to run your changes on the local server.

Install the Eclipse SDK

You can use any recent stable build of the Eclipse SDK to run the server, such as Eclipse 3.7.1.

Load the source into Eclipse

Download a stable orion build (latest integration build is the current recommendation) and unpack it somewhere on your hard disk. This download will be used as a so-called "target platform" when you run the server from Eclipse.

Occasionally, new dependencies are introduced in the server and you will need to take a nightly build to keep up-to-date. Check the orion-dev mailing list if you aren't sure which build to take.

Create a new workspace using your Eclipse SDK.

Use the File->Import->General->Existing Projects into Workspace wizard. In the wizard, set the root directory for the import to whatever directory you used when you cloned the Git repositories. You'll know you have the right path when you see a bunch of org.eclipse.orion.* projects in the project list.

Ensure that Copy projects into workspace is not checked. Feel free to import just a subset of the projects (for example, just client plugins) - the remaining ones will come from the 'target platform'.

The projects should appear in your workspace. Don't worry about compile errors just yet until after you've set up the target platform.

Now you need to set up a target that points to the Orion build you downloaded. (Window->Preferences->Plug-in Development->Target Platform).

Once you finish the wizard, you'll have a new target definition available in the list of targets.

Make this the active target definition for your self-hosting workspace.

Your workspace will be rebuilt and most of the compile errors should disappear.

There might be a few errors related to unsatisfied dependencies from .tests plugins, but you can ignore them for now. You can also ignore any errors from org.eclipse.orion.server.ui, as it is not required to launch the server. Right-click these projects and close them if you get sick of seeing the errors.

Set up the launch to run from source

The plugin source you've loaded into Eclipse will now be used to run Orion, taking priority over the plugins in the working stable build.

Open the Run->Run Configurations dialog, expand OSGi Framework, and select the OSGi Framework launch called web-ide.

The launch configuration we will use is associated with a Orion server configuration file called web-ide.conf. This file controls which directories the Orion server can access on your machine, among other things. Since we want to use Orion to edit its own source code, we have to ensure the Orion server can access the files in your local git repo.

Add a line like this to web-ide.conf:

orion.file.allowedPaths=C:\\Users\\orionfan\\code\\orion

The path points to the folder where you checked out the Orion source code. (Use whatever path format — backslashes or forward slashes — is appropriate for your platform.)

On the Bundles' tab, ensure that "Launch with: features selected below" is selected. Ensure there are five Orion features checked (see image below)

If you only want to work on the client (not the server), you can now close the server projects (5 client projects should remain).

Running the server

Once logged in, you'll see a landing page with descriptions of some basic tasks you can perform. You can ignore this, and click "Navigator" in the menu at the top right.

Click the Link Folder button on the toolbar and add a folder that links to your local git repos. For example, if you wanted to make changes to the client, you could link a folder named "Orion Client" to the following file path:

c:\myLocalGitRepos\org.eclipse.orion.client

Repeat the previous step to add links for each git repository that you care about.

You should see the folders show up in your Orion explorer:

From here, you can start editing files. As you make changes to the client code, you can simply reload the corresponding page in your browser to see the changes. We recommend you keep a browser tab open with a stable editor and stable navigator, and open a new tab for reloading and trying changes. In this way, you'll always have a couple of safe browser tabs to use to revert changes if you break something!