Technische Universität Braunschweig
  • Studium & Lehre
    • Vor dem Studium
      • Informationen für Studieninteressierte
      • Studiengänge von A-Z
      • Bewerbung
      • Fit4TU - Self-Assessment
      • Beratungsangebote für Studieninteressierte
      • Warum Braunschweig?
    • Im Studium
      • Erstsemester-Hub
      • Semestertermine
      • Lehrveranstaltungen
      • Informationen für Erstsemester
      • Studien-ABC
      • Studienorganisation
      • Beratungsnavi
      • Zusatzqualifikationen
      • Finanzierung und Kosten
      • Besondere Studienbedingungen
      • Hinweise zum Coronavirus
      • Gesundheit & Wohlbefinden
      • Campusleben
    • Nach dem Studium
      • Exmatrikulation und Vorlegalisation
      • Nach dem Abschluss
      • Alumni
    • Strategien und Qualitätsmanagement
      • Strategiepapiere für Studium und Lehre
      • Studienqualitätsmittel
      • Studiengangsentwicklung
      • Qualitätsmanagement
      • Rechtliche Grundlagen
    • Für Lehrende
      • Informationen für Lehrende
      • Lernmanagementsystem Stud.IP
      • Lehre und Medienbildung
    • Kontakt
      • Studienservice-Center
      • Sag's uns - in Studium und Lehre
      • Zentrale Studienberatung
      • Immatrikulationsamt
      • Abteilung 16 - Studium und Lehre
      • Career Service
      • Projekthaus
  • Forschung
    • Forschungsprofil
      • Forschungsschwerpunkte
      • Exzellenzcluster
      • Forschungsprojekte
      • Forschungszentren
      • Forschungsprofile der Professuren
    • Wissenschaftlicher Nachwuchs
      • Förderung des wissenschaftlichen Nachwuchs
      • Promotion
      • Postdocs
      • Nachwuchsgruppenleitung
      • Junior Professur und Tenure-Track
      • Habilitation
      • Service-Angebote für Wissenschaftler*innen
    • Forschungsdaten & Transparenz
      • Transparenz in der Forschung
      • Forschungsdaten
      • Open Access Strategie
      • Digitale Forschungsanzeige
    • Forschungsförderung
      • Netzwerk Forschungsförderung
      • Datenbanken und Stiftungen
    • Kontakt
      • Forschungsservice
      • Graduiertenakademie
  • International
    • Internationale Studierende
      • Warum Braunschweig?
      • International Student Support
      • Studium mit Abschluss
      • Austauschstudium
      • Geflüchtete
      • TU Braunschweig Summer School
    • Wege ins Ausland
      • Studium im Ausland
      • Praktikum im Ausland
      • Lehren und Forschen im Ausland
      • Arbeiten im Ausland
    • Internationale Wissenschaftler*innen
      • Internationale Postdocs und Professor*innen
      • Internationale Promovierende
      • Service für gastgebende Einrichtungen
    • Sprachen und interkulturelle Kompetenzvermittlung
      • Deutsch lernen
      • Fremdsprachen lernen
      • Interkulturelle Kompetenzvermittlung
    • Internationales Profil
      • Internationalisierung
      • Internationale Kooperation
    • International House
      • Wir über uns
      • Kontakt & Sprechstunden
      • Aktuelles und Termine
      • Newsletter, Podcast & Videos
      • Stellenausschreibungen
  • Die TU Braunschweig
    • Unser Profil
      • Ziele & Werte
      • Ordnungen und Leitlinien
      • Allianzen & Partner
      • Die Initiative Hochschulentwicklung 2030
      • Internationale Strategie
      • Fakten & Zahlen
      • Unsere Geschichte
    • Karriere
      • Arbeiten an der TU
      • Stellenmarkt
      • Berufsausbildung an der TU
    • Wirtschaft & Unternehmen
      • Unternehmensgründung
      • Freunde & Förderer
    • Öffentlichkeit
      • Veranstaltungskalender
      • Check-in für Schüler*innen
      • Hochschulinformationstag (HIT)
      • Kinder-Uni
      • Gasthörer*innen & Senior*innenstudium
      • Nutzung der Universitätsbibliothek
    • Presse & Kommunikation
      • Stabsstelle Presse und Kommunikation
      • Medienservice
      • Ansprechpartner*innen
      • Tipps für Wissenschaftler*innen
      • Themen und Stories
    • Kontakt
      • Allgemeiner Kontakt
      • Anreise
      • Für Hinweisgeber
  • Struktur
    • Leitung & Verwaltung
      • Das Präsidium
      • Stabsstellen
      • Verwaltung
      • Organe, Statusgruppen und Kommissionen
    • Fakultäten
      • Carl-Friedrich-Gauß-Fakultät
      • Fakultät für Lebenswissenschaften
      • Fakultät Architektur, Bauingenieurwesen und Umweltwissenschaften
      • Fakultät für Maschinenbau
      • Fakultät für Elektrotechnik, Informationstechnik, Physik
      • Fakultät für Geistes- und Erziehungswissenschaften
    • Institute
      • Institute von A-Z
    • Einrichtungen
      • Universitätsbibliothek
      • Gauß-IT-Zentrum
      • Zentrale Personalentwicklung
      • International House
      • Projekthaus
      • Transfer- und Kooperationshaus
      • Hochschulsportzentrum
      • Einrichtungen von A-Z
    • Studierendenschaft
      • Studierendenparlament
      • Fachschaften
      • Studentische Wahlen
    • Lehrer*innenbildung
      • Lehrer*innenfortbildung
      • Forschung
    • Chancengleichheit
      • Gleichstellung
      • Familie
      • Diversität
    • Kontakt
      • Personensuche
  • Suche
  • Schnellzugriff
    • Personensuche
    • Webmail
    • cloud.TU Braunschweig
    • Messenger
    • Mensa
    • TUconnect (Studierendenportal)
    • Lehrveranstaltungen
    • Im Notfall
    • Stud.IP
    • UB Katalog
    • Status GITZ-Dienste
    • Störungsmeldung GB3
    • IT Self-Service
    • Informationsportal (Beschäftigte)
    • Beratungsnavi
    • Linksammlung
    • DE
    • Facebook
    • Twitter
    • Instagram
    • YouTube
    • LinkedIn
Menü
  • Technische Universität Braunschweig
  • Struktur
  • Fakultäten
  • Carl-Friedrich-Gauß-Fakultät
  • Institute
  • Institut für Softwaretechnik und Fahrzeuginformatik
  • Research
  • Deltas
  • example
Logo Institut für Softwaretechnik und Fahrzeuginformatik der TU Braunschweig
  • Deltas
    • example
    • installation
    • newproject

example

Using the example project SimpleTextEditor

DeltaJ | Installation | Using the example project | Creating new DeltaJ project

We created an example Software Product Line (SPL) SimpleTextEditor (STE) using DeltaJ 1.5. This website presents a short hands-on with DeltaJ 1.5 and the STE. After you have read this page - and tried it on your machine - you should be able to use DeltaJ, maybe you ahould have a look at the Creating a new DeltaJ project site to learn how to start from scratch. This site is devided into the following sections:

Download and Import

In this section you learn how to download and import the STE into you Eclipse workspace with installed DeltaJ 1.5 plug-in.

  1. Download the STE from out website and unpack it to your local file system. Important: The STE uses the Eclipse SWT API which is platform-dependent. Use one of the prepared versions for Linux, Mac OS X or Windows. These packages include the necessary APIs for your machine.

  2. Import the unpacked project folder into you Eclipse Workspace. Select [File / Import ...] to open up the import dialog.
ISF Expertise

3. Select Existing Project into Workspace which you find in the General folder and hit [Next >].

ISF Expertise

4. Now choose Select root directory and hit [Browse] to navigate to the STE project folder. Now you can choose the SimpleTextEditor and hit [Finish]

ISF Expertise

5. After you have successfully imported the project, Eclipse will build it. This process may take a while. During this process you will see some output in the console. When you see this, a dialog window appears on your main screen and asks you to select the products to be generated. Please select at least one of the products.

ISF Expertise

Now, You can start to examine the project and get in touch with DeltaJ 1.5.

ISF Expertise

Overview of the STE project (general structure of a DeltaJ project)

This picture shows the Package Explorer of Eclipse with the STE example. IT contains - like every DeltaJ project - three important source code folders:
src: This is the default source folder. It normally contains the delta modules, which are saved as .deltaj files.
spl-info: This folder contains the Software Product Line Declaration (SPLD) file. There you define Features, Delta modules, Constraints which structure the features and declare dependencies, the n-m-mapping of Features and Delta Modules and the Product definitions.
src-gen: This folder contains the generated source code for the products. In the beginning it is empty. The generation process will generate Java source files which are then saved in this folder. Each product has its own root package, that allows to generate different products side-by-side. Depending on your Eclipse setting you might see a pretended chaotic list of a lot of packages there. But don't worry!

Every DeltaJ project is based on default Java projects. That gives you the ability to also add Java source files to the src folder or to link external APIs which are used within the SPLs source code.
 

Editing the SPL declaration file

There is a domain-specific language (DSL) to define the SPL declaration. The syntax is intuitive. It contains a set to define features and a set to define delta modules. Then it contains a block to define constraints which are used to express the Feature Model with a set of boolean expressions over feature names. Next is a block to map delta modules to feature configurations. This is an n-to-m mapping! The partitions block provide a partial application order of the delta modules. Delta modules referenced in an early partition are applied earlier then delta modules referenced in later partitions. Delta modules which are referenced within the same partition can be applied in any order.
A partition contain so called when clauses, which are separeted by a comma. Partitions themselve are separated by a semicolon. A when clause begins with a set of delta modules followed by the keyword when followed by an expression over features.

The Last block of the SPLD file contains product definitions. These sets look like the features set.

ISF Expertise

Editing DeltaJ Source Code

The DeltaJ editor is the main editor for DeltaJ projects. It shows the source code. For a better user experiance it supports syntax highlighting. DeltaJ-specific keywords are green and Java keywords are magenta, like in the Java editor. There is also some of the Java syntax coloring, but it is not implemented completely. But the editor supports pretty printing to automatically format the source code. If your Eclipse shows the Outline view you can find Compilation Units, type definitions, fields and methods easily by clicking on them in the outline view. In the current version there is only the static validation which was generated from the grammar. For complete validation you have to open the generted Java files. We are planning to implement a better validation in the future. The well known proposal feature of Eclipse does not support semantic porposals in the current version. It will be implemented in the future.
You can use the hole Java 1.5 syntax to implement classes.

ISF Expertise

Generating products of the product line

In the current version there is no button or menu item for generating the products. But the product generation is implemented! You have to use the SPLD file to generate a product. The workflow to generate any product is the following:

  1. Open the product line declaration (see here). The generation process is triggered with saving this file. Make sure that Eclipse shows that it is edited.
ISF Expertise

2. Save the file. This action triggers the product generation process. The plug-in tells you about the progress in the console view of Eclipse.

ISF Expertise

If you see Waiting for the user to select the products that should be generated ... in the console, the process has opened a dialog window which asks for the products to be generated. Please select the products you want to generate and hit [Continue],

ISF Expertise

3. The product generation will take a while. The process will tell you what it is currently doing in the console. The process is determined if you see the message Selected products of >SPLName< are successfully generated.

ISF Expertise

4. Now, go to the src-gen folder, it contains the generated source of the selected products. Each product is contained in the product's root package. Navigate to the class which contains the main(String[]) method, open it and then you can run the generated product.

ISF Expertise

If the generated source code contains any errors, you have to correct these in the corresponding delta module. An easy way to figure out which delta module contains the error, are the generated Javadoc comments above each element. Here you see three screenshots of the same method which was modified by different deltas.

ISF Expertise
ISF Expertise
ISF Expertise

And here are the corresponding operations in the delta modules:

ISF Expertise
ISF Expertise
ISF Expertise
Bildnachweise dieser Seite

Für alle

Stellen der TU Braunschweig
Jobbörse des Career Service
Merchandising
Sponsoring- & Spendenleistungen
Drittmittelgeförderte Forschungsprojekte
Vertrauenspersonen für Hinweisgeber

Für Studierende

Semestertermine
Lehrveranstaltungen
Studiengänge von A-Z
Informationen für Erstsemester
TUCard

Interne Tools

Status GITZ-Dienste
Handbuch für TYPO3 (Intern)
Corporate Design-Toolbox (Intern)
Glossar (DE-EN)
Meine Daten ändern
Hochschulöffentliche Bekanntmachungen

Kontakt

Technische Universität Braunschweig
Universitätsplatz 2
38106 Braunschweig
Postfach: 38092 Braunschweig
Telefon: +49 (0) 531 391-0

Anreise

© Technische Universität Braunschweig
Impressum Datenschutz Barrierefreiheit

Zur anonymisierten Reichweitenmessung nutzt die TU Braunschweig die Software Matomo. Die Daten dienen dazu, das Webangebot zu optimieren.
Weitere Informationen finden Sie in unserer Datenschutzerklärung.