[ 02162: Course on Software Engineering 2 (e13) ]

 
Assignment 1
 

Tasks

Here are the tasks that are discussed in the first tutorial (see slides of tutorial 1). The tasks should be finished by September 13. If you have any problems, these can be discussed in the tutorial on Sept. 13.

 

Note that you do not need to submit the solutions; all solutions must be presented in the "Tutorial presentation" in week 45 by each group. Each group should make sure that they, as a group, are up to date with the tutorials.

 

The installation of Eclipse and of the ePNK, is a task every student should do within the first two weeks!

 

  1. Install Eclipse with the extensions required for this course. See http://www2.imm.dtu.dk/courses/02162/e13/project/eclipse-installation.html for detailed instructions.

     

  2. Get acquainted with Eclipse as an IDE. See Eclipse help (check slides of tutorial 1, p.7 where to look in the Eclipse help documents).

     

  3. Install the ePNK (version 1.0.1) as explained on the on the project page or the ePNK Home Page.

     

    For creating new Petri nets in the ePNK and for using the ePNK editors, have a look at the ePNK Users manual (in particular Chapter 3).

     

  4. Implement and test a simple view for Eclipse that, for a selected resource, shows the file extension and, if it is some standard extension (like pdf, doc, txt, pnml, ...), also shows some information on the type of the selected resource.

     

    The solution can be based on an example view that can be created by an Eclipse wizard, which will be discussed during the tutorial on Sept. 6 (see slides of tutorial 1, pp.18-22).

     

    Then, the major steps are

     

    • Make the view class that was created by the wizard also implement an ISelectionListener (and create the selectionChanged method).

       

    • Add this view (which now is a selection listener) as a listener to the Eclipse workbench (in the createPartControl method).

       

    • Implement the dispose method, where the view unregisters as a listener again.

       

    • The view has a so-called viewer, which needs a so-called content provider and a label provider. In your case, chose ArrayContentProvider and LabelProvider (both are part of the standard Eclipse distribution), during the viewer setup in the createPartControl method.

       

    • Implement the selectionChanged method. When called, this method should change the input of the viewer (by calling the setInput method of the viewer) to an array of Strings describing the selected file (based on its extension).

       

    More details can be found in the slides of tutorial 1 (pp. 22-24 and pp. 3 and 5).

     

    You can also get some inspiration from the "Readme example" that comes with Eclipse (in particular the view). The easiest way to install the "readme example" (and some others) is the following (see also Eclipse Help "Platform Plug-in Developer Guide", Section "Examples Guide", Subsection "Installing the examples"): Start the update manager (Help -> Install New Software), select the standard "Eclipse Project Update Site", look for "SDK Examples" (make sure that the feature "group items by category" is NOT checked), select it, and install it.

    In order to see the project in your workspace (and to change it), you can start the "Plug-ins View" via "Window -> Show View ->Plug-ins". In this view, you will find the plug-in "org.eclipse.ui.examples.readmetool"; Right-click on it, and select "Import as -> Source project". Then, you will see this project in your resource browser or package explorer.


 

Ekkart Kindler (), September 4, 2013.