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 "E4/Bespin"

< E4
(Running the server)
(Running Eclipse-specific Commands)
Line 32: Line 32:
 
== Running Eclipse-specific Commands ==
 
== Running Eclipse-specific Commands ==
  
# Open <i>dashboard.html</i> in a text editor (Ctrl+Shift+R, enter <i>dashboard.html</i>, click on the triangle next to <i>Open</i> and select <i>Text Editor</i>).
+
# In Eclipse, Open <i>dashboard.html</i> in a text editor (Ctrl+Shift+R, enter <i>dashboard.html</i>, click on the triangle next to <i>Open</i> and select <i>Text Editor</i>). The file is located in bepsin/frontend in case you need to navigate to the file and Open With->Text Editor
 
# Insert the following line after the line that references <i>js/commandline/commands.js</i>:<br><pre><script type="text/javascript" src="/eclipse/commands/eclipsecommands.js"></script></pre>
 
# Insert the following line after the line that references <i>js/commandline/commands.js</i>:<br><pre><script type="text/javascript" src="/eclipse/commands/eclipsecommands.js"></script></pre>
 
# Do the same for <i>editor.html</i>.
 
# Do the same for <i>editor.html</i>.

Revision as of 12:09, 18 February 2009

A screenshot of a text editor running in Mozilla Firefox with the help of Mozilla Bespin.

The e4 Bespin server is an experimental implementation of Bespin's client-server API.

Getting the Eclipse code

  1. Start with a recent Eclipse build and an empty workspace. We recommend Eclipse SDK 3.5 M4.
  2. Select File > Import... and select CVS > Projects from CVS, click Next.
  3. Copy the CVS repository location and paste it into the "Host" field to populate the wizard page: :pserver:anonymous@dev.eclipse.org:/cvsroot/eclipse
  4. You should see "Host: dev.eclipse.org, Repository path: /cvsroot/eclipse, User: anonymous, Connection type: pserver".
  5. Click Next and select the second option Use an existing module.
  6. Drill down as follows: e4 > org.eclipse.e4.server > bundles and select org.eclipse.e4.server.bespin. Click Finish.

Getting the Mozilla code

  1. Using a web browser, go to http://hg.mozilla.org/labs. Click on the zip or gz button for bespin on the right hand side, this should download an archive with the Bespin source code.
  2. In Eclipse, select File > Import..., pick General > Existing Projects into Workspace, click Next, select the archive file option, click Browse... and select the archive file you just downloaded. Click Open in the file chooser dialog, then check bespin to be imported, and click Finish.
  3. As a result, you should have a project called bespin in your workspace, containing folders like backend, docs, frontend, etc. and a few files. (Note: If you are adventurous, you could instead install Mercurial and check out the project directly from the Mozilla repository.)
  4. Right-click on the bespin project and select PDE Tools > Convert Projects to Plug-in Projects.... Confirm the wizard dialog that opens by clicking Finish. This will generate a plug-in manifest file META-INF/MANIFEST.MF.

Running the server

  1. Select Run > Run Configurations... and double-click on OSGi Framework to create a new OSGi launch configuration. Click Deselect All and then check:
    • bespin
    • org.eclipse.e4.server.bespin
    • org.eclipse.equinox.http.jetty
  2. Click on Add Required Bundles.
  3. Optionally, add -Dorg.eclipse.equinox.http.jetty.http.port=8080 as a VM argument on the Arguments tab to change the port on which the server will run.
  4. Click the Run button.
  5. Using Firefox 3, open http://localhost or http://localhost:8080 depending on the port your server runs on.
  6. Click Register and fill in name and password. These are only stored locally.

Running Eclipse-specific Commands

  1. In Eclipse, Open dashboard.html in a text editor (Ctrl+Shift+R, enter dashboard.html, click on the triangle next to Open and select Text Editor). The file is located in bepsin/frontend in case you need to navigate to the file and Open With->Text Editor
  2. Insert the following line after the line that references js/commandline/commands.js:
    <script type="text/javascript" src="/eclipse/commands/eclipsecommands.js"></script>
  3. Do the same for editor.html.
  4. Edit dashboardcommands.js and add 'cvsco', 'newproject' to the list of commands available in the dashboard.
  5. Make sure to reload the Bespin page in your web browser, press Ctrl+J to activate the command line, and enter help to see the list of available commands.

You can now create a new project from the dashboard using the newproject command, or check out an existing project available through anonymous CVS using the cvsco command. When in the editor, you can use the problems command to display the list of warnings or errors for the current file.

Note that the Java syntax highlighting shown in the screenshot above was produced by copying Mozilla's javascript.js file and adjusting it for Java, by replacing the list of keywords with one for the Java language, and changing the registration so that it applies to *.java files.

Back to the top