1. qualyzer
  2. main

Wiki

Clone wiki

main / Setting_up_the_development_environment

Setting up the development environment

Table of Contents

Installing Eclipse

  1. Download and install Java 6.0
  2. Download and install Eclipse for RCP/Plug-in Developers 3.5 S.R.2
  • If you are running Linux make sure that Eclipse is configured to use sun-java and not open-jdk or the Audio Libraries will not work.
  1. Under Window -> Preferences select Java -> Installed JREs.
  2. Make sure that the selected JRE is java-sun1.6. If it is not then you will need to Add and find your installation of sun-java.

Installing the required plug-ins

MercurialEcplise

MercurialEcplise is used to interact with mercurial repositories (check in and check out Qualyzer's code)

  1. Download and install MercurialEcplise by using the following update site:
    http://cbes.javaforge.com/update

eclipse-cs

eclipse-cs is used to maintain a consistent coding style across contributors.

  1. Download and install eclipse-cs using the following update site:
    http://eclipse-cs.sf.net/update
  2. Once you have downloaded the main code base (see below), go to Preferences / CheckStyle / New
  3. Select Project Relative Configuration.
  4. Name: Qualyzer Checks
  5. Location: /ca.mcgill.cs.swevo.qualyzer/qualyzer_checks.xml
  6. Click on OK and rebuild all projects.

Coding Style

  1. Once you have downloaded the main code base (see below), go to Preferences / Java / Code Style / Formatter
  2. Click on Import
  3. Select the file qualyzer_coding_style.xml located in the ca.mcgill.cs.swevo.qualyzer project.
  4. Select the Qualyzer formatter.

eclemma

EclEmma is used to measure the test coverage of Qualyzer.

  1. Download and install eclemma using the following update site:
    http://update.eclemma.org/

releng

The Eclipse releng tools are used to copy the license into the source files.

  1. Select the menu Help/Install New Sofware...
  2. In the "Work with" field, select The Eclipse Project Updates.
  3. Select Releng Tools (hint: type releng in the text box).

Configure releng

  1. Go to the Preferences menu.
  2. In the Copyright Tool tab, enter the copyright text (see below).
  3. Check all options except "Always use default revision year...".
  4. To set the copyright notice to the source files, select a project in the Project Explorer and, in the context menu, select "Fix Copyrights".
  5. You can also fix the copyrights notice of individual files.

Copyright Template

Copyright (c) ${date} McGill University
All rights reserved. This program and the accompanying materials
are made available under the terms of the Eclipse Public License v1.0
which accompanies this distribution, and is available at
http://www.eclipse.org/legal/epl-v10.html

Contributors:
    McGill University - initial API and implementation

Violet UML

Violet UML is used to draw and export diagrams such as our Data Model

  1. Download the latest version of Violet UML (it will be a jar file).
  2. Put the jar file in the dropin folder of your Eclipse installation.
  3. Violet UML is now installed. You can create a diagram with the New... Wizard (e.g., New / Other... / Violet UML Editor / Class Diagram).

Tips

  • To create an element (e.g., a class), select the class tool in the side bar and left-click on the diagram.
  • To move an element, select the "select tool" in the side bar first.
  • To quickly switch to the "select tool", right-click once on the diagram.
  • You can change tools by using the mouse wheel.
  • To edit an element's property (e.g., the label of a relation), double-click on the element or right-click on it.

Retrieving the source code

Retrieving the wiki

The wiki repository contains the source files of the wiki. Pulling and pushing changes to the wiki repository is the only way to add an image. Wiki source files can be edited either on the bitbucket website or using your favorite text editor on your computer.

  1. In the context menu of the Package Explorer, select Import/Mercurial/Clone Existing Mercurial Repository
  2. In the wizard, give the following information:
    1. URL: https://bitbucket.org/qualyzer/main/wiki
    2. Username: your bitbucket username (not necessary if you do not plan to push changes)
    3. Password: your bitbucket password
    4. Check Checkout as a project(s) in the workspace
    5. Clone directory name: wiki
  3. In the next page, select the default branch (or the tip tag, these are the same).
  4. In the next page, use the default settings and click Finish.
  5. To try to make a change to the wiki from your computer, add some text to the wikitest page, then commit and push your changes.

Retrieving the web site

Repeat the same steps as above, but replace the URL by:
https://bitbucket.org/qualyzer/qualyzer.bitbucket.org

The project name should be qualyzer.bitbucket.org

Retrieving the sandbox code base

Because the sandbox code base contains many projects, the procedure is slightly different (differences are in bold):

  1. In the context menu of the Package Explorer, select Import/Mercurial/Clone Existing Mercurial Repository
  2. In the wizard, give the following information:
    1. URL: https://bitbucket.org/qualyzer/sandbox
    2. Username: your bitbucket username (not necessary if you do not plan to push changes)
    3. Password: your bitbucket password
    4. Uncheck Checkout as a project(s) in the workspace
    5. Parent directory: your workspace path (e.g., /home/barthelemy/workspaces/qualyzer)
    6. Clone directory name: sandbox
  3. In the next page, select the default branch (or the tip tag, these are the same).
  4. In the next page, use the default settings and click Finish.

How it works

hgEclipse cloned the sandbox repository in the sandox directory in your workspace. The sandbox repository contains several directories, one for each project. These projects are downloaded to workspace/sandbox/project_name. hgEclipse links these projects to your workspace: the projects appear to be in your workspace, but they are actually located one level down.

Retrieving the main code base

Repeat the same steps as above, but replace the URL by:
https://bitbucket.org/qualyzer/main

Note: The site_source project contains the source file to generate Qualyzer's web site.

Creating a new project/plug-in

Creating a project and pushing it to the repository is slightly more complicated than with CVS or Subversion. With Mercurial or Git, there is usually only one project per repository, which is not a viable model for Eclipse applications with many plug-ins.

hgEclipse is able to recognize when multiple projects are hosted in the same repository, but this is not painless. The following steps will guide you through the creation of a new project/plug-in in the sandbox repository. These steps were taken from this useful DVCS tutorial series

  1. We assume that you have already retrieved the sandbox code.
  2. Create a plug-in project in Eclipse (we assume the name is qualyzer.secondapp)
  3. In the first page of the wizard, uncheck the option "Use default location" and select the following location (see the screenshot):
    /home/barthelemy/workspaces/qualyzer/sandbox/qualyzer.secondapp
  4. Note that the path is divided in three parts: your workspace path, then the name of the repository, and then the name of the project.
  5. Continue to create your project with the values that fit your needs.
  6. When you click on finish, your project should appear in the Package Explorer with a repository icon, effectively telling you that the project is now under a Mercurial repository. You still need to commit and push your changes.

Creating a project in a mercurial repository

Updated