Installation and Setup of the SiteEditor

Necessary Software

Java 1.4.2

  1. download Java (J2SE v1.4.2_04 SDK) (MD5 checksum: 6ba8fd5151ed8f29833ea05fb2a2cae2)

  2. Start this executable to install Java on your computer

    You can install Java anywhere, I installed it in C:\packages\jsdk1.4.2\.

    Note: If you use/need applets, you might want not to register the new java version with your browser, because this might break some old and/or buggy applets.

Subversion

  1. Download Subversion 1.0.1 (MD5 checksum: 9a154c805445248366df60f80fd2bf49) and install it anywhere (for example in C:\packages\subversion\.

  2. Open a comment prompt

  3. Run the following command:

    svn list -r HEAD https://sbb.hepe.com:8080/svn/SiteEditor/

    Note: You must be connected to the internet to do this.

  4. Subversion will print an error because it cannot validate the server certificate for 'https://sbb.hepe.com:8080'. This is OK. Enter "p" to accept this certificate permanently, anyway.

  5. After a few moments, subversion should list the projects which can be found on that site. When you run the command again (just press the F3 key followed by RETURN), subversion should not bother you again about the certificate.

Eclipse 3.0M8 Installation

  1. Download Eclipse 3.0M8 (MD5 checksum: 502f7414ab3c6500e7f675d1b2c4d930).

  2. unzip that archive somewhere (for example in C:\packages\). This will create a eclipse directory and put everything in there.

  3. Start C:\packages\eclipse\eclipse.exe. The Eclipse splash screen should pop up.

  4. After a few moments. Eclipse will ask you to select a "workspace". The workspace is a directory where Eclipse will put the projects you work on. Just accept the default and you might want to turn on "Use this as default and do not ask again".

  5. The intro screen will come up. It contains tutorials and similar stuff. Click on "Go To The Workbench". You should now see this:

  6. Eclipse is now installed. Now continue with setting it up.

Setting up Eclipse

  1. Open the preferences: Window-Menu / Preferences

  2. Add a new JRE: Open the Java folder and click on "Installed JREs".

  3. Enter:

    Name: JDK 1.4

    Note the space between "JDK" and "1.4".

  4. Browse to the location where you installed Java 1.4.2.

  5. Eclipse should now fill out the other fields for you. Click "OK". You should now see this:

  6. Continue with setting up Subclipse

Setting up Subclipse

  1. All parts of the SiteEditor are Java projects. To work on them, switch to the Java perspective: Window-Menu / Open Perspective / Java

  2. Start the Update Manager: Help-Menu / Software Updates / Find and Install ...

  3. Select "Search for new features to install" and click on "Next >"

  4. Click "Add Update Site..."

  5. Enter:

    Name: Subversion
    URL: http://www.loonsoft.com/updates/

  6. Click "OK"

  7. Include the site in the search by clicking into the hollow rectangle left to the text "Subversion" and click "Next".

    Note: You must be connected to the internet to do this.

  8. Select "feature-win32" and click "Next"

  9. Select "I accept the terms of the license agreement" and click "Next"

  10. Click "Finish"

  11. Eclipse will show a warning that the feature has not been digitally signed. This is correct but no problem. Click "Install".

  12. Eclipse will now download and install the feature.

  13. After the installation, Eclipse will offer a restart or apply changes. Click "Restart".

  14. Wait until the workbench reappears.

  15. Open the preferences: Window-Menu / Preferences

  16. Open the Team folder (click on the little plus next to Team on the left)

  17. If you see an item labeled "SVN", then the installation worked. Click on SVN (not on the little plus sign). It should state that the "SVN interface" is "Javahl (JNI)" and "Calculate Deep SVN Decorators (slow)" should be off.

  18. Close the preferences again.

  19. Open the Subversion views: Window-Menu / Show View / Other...

  20. Open the SVN folder.

  21. Select "SVN Repository"

  22. Click "OK". You will get a new view at the bottom.

  23. Open the context menu in "SVN Repository" and choose New / Repository Location...

  24. Enter:

    Url: https://sbb.hepe.com:8080/svn/SiteEditor/

    If you have a user name and password on the Subversion server, enter them in the Authentication fields. If not, leave them blank.

  25. Click on "Finish". Eclipse will try to connect.

  26. If you get this error: "Unable to Validate" saying that the "RA layer request failed" because "... certificate has expired, certificate issued for a different hostname, issuer is not trusted ...", then you forgot to accept the certificate during the installation of subversion.

  27. Click on the little plus sign next to the new SVN repository. You should now see this:

  28. Now, you can continue with checking out working copies of the projects you need.

Checking out the projects

"Check out" means to get a copy of the UY Dojo which you can edit.

  1. If you are not yet in the Java perspective, switch to it: Window-Menu / Open Perspective / Java

  2. In the "SVN Repository" view, open the "https://.../SiteEditor/" folder and select "SiteEditor". If this view is not visible, open it: Window-Menu / Show View / Other..., open the SVN folder, select "SVN Repository" and click "OK". You will get a new view at the bottom.

  3. In the context menu for this item, click on "Check Out As Project". This will take some time until the ~60MB are downloaded onto you computer but don't worry because you'll have to do this only once. When something changes, Subclipse will just download the difference between the version on the server and your copy.

  4. Now, you'll get some entries in the "Problems" view which Eclipse autmatically opened for you when you switched to the Java perspective. This is because two variables are not yet defined. Open the preferences again (Window-Menu / Preferences).

  5. Open the folder Java / Build Path and select "Classpath Variables".

  6. Click on "New..." and enter:

    Name: SWT_JARS
    Path: C:/packages/eclipse/workspace/SiteEditor/lib/swt/win32

    If you are on Linux, replace the "win32" with "linux".

    Note that this path only works if you installed Eclipse in C:\packages\. If you installed it in a different place, you must adjust the path accordingly. You can also use "Folder..." to select a directory on your computer.

    Before you click "OK", select the path and copy it into the clipboard (Ctrl-C) because we're going to create another variable in a few moments which has a very similar path.

  7. Click "OK"

  8. Click "New..."

  9. Enter:

    Name: JFACE_JARS

    Paste the copied path into the path field and click "Folder...". A few lines above the selected folder is a folder named "jface". Select that and click "OK".

  10. Click "OK". You should now see this:

  11. Clock "OK" to close the preferences. Eclipse will tell you that the classpath variables have changed and a full build is recommended. Click "Yes".

  12. Wait a few moments until Eclipse has compiled the SiteEditor project. This project is the base of the UY Dojo. It contains a library of Java code which allows us to convert the page descriptions into HTML pages.

  13. Checkout the "UYDojo" project. Open the "SVN Repository" view if you haven't done so already. Select "Check Out As Project" from the context menu of the "UYDojo" item. This will again download 120MB of data. Be patient.

Editing and generating the site

You can find the source pages of the site in the directory "contents" of the project "UYDojo" (or /UYDojo/contents in Eclipse lingo).

Note that a page must be listed in /UYDojo/site.xml to be converted.

To generate the HTML for the site, select "UYDojo Main generate site".

If these menu items are not visible, select "Run..." in the menu. They should be in the "Java Application" folder. After you have run them once, they should show up in the menu. Building for the first time takes some time (5-10 minutes).

If you changed only a single page, you can also convert only that page:

  1. Select "Run..." in the menu "Run".

  2. Click on "UYDojo Main single page" under "Java Applications".

  3. Click on the Tab "Arguments" and put the IDs of all pages in "Program Arguments" after the "../UYDojo" separated by blanks. In order to convert "index", you must put "../UYDojo index" in this text field.

The pages will be put into /UYDojo/public_html. The SiteEditor will generate them in such a way that all links will work from disk and when the pages are uploaded to the web server.

After you generated the site, you must select "Refresh" from the context menu of the UYDojo project. This will make Eclipse look for new directories and changed files. A double click on "index.html" in the folder "public_html" should open a web browser with the file.

And have a look at the Demo/Documentation Page page to see what the editor can currently do and what data a page can contain.

A word of warning: When you change the files which Eclipse sees outside of the program, Eclipse might not behave as expected. In this case, you must either restart Eclipse or refresh the project.

Updating Your Copy and Commiting Changes

Before commiting anything to the Dojo, you should always update your version: Open the context menu for each project (SiteEditor and UYDojo) and click on "Update" in the "Team" menu.

This will download all changes made to the project since you updated the last time. You need not worry about losing your work: If you and someone else changed the same file, subversion will try to merge the changes. If different parts of the file were changed, the changes will be copied into your working copy. If someone changed the same places you did, then the file will contain all the changes after the merge between "<<<<<" and ">>>>>". Also, the file will be flagged as "Conflict".

You must fix this conflict before you can commit your changes!

If you forget to update, Subversion will abort the commit with an error.

To commit, select the files you want to commit (you can also select a folder or the project; in this case, all modified files in that folder or project are comitted) and then "Commit" from the Team menu. Eclipse will ask you for a short description of what you changed. Write something like "Converted from the old Dojo", "fixed a typo", "fixed a broken link" or "created new page".

Spacer
Installation and Setup of the SiteEditor