Commit 203493b9 authored by Ådne Karstad's avatar Ådne Karstad

[minor] Generate html using acceleo M2T

parent 2912241b
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" output="bin" path="src"/>
<classpathentry kind="output" path="bin"/>
</classpath>
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>tdt4250.spp.html.acceleo</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.pde.ManifestBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.pde.SchemaBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.acceleo.ide.ui.acceleoBuilder</name>
<arguments>
<dictionary>
<key>compilation.kind</key>
<value>compilation.platform.resource</value>
</dictionary>
<dictionary>
<key>compliance</key>
<value>pragmatic</value>
</dictionary>
<dictionary>
<key>resource.kind</key>
<value>xmi</value>
</dictionary>
<dictionary>
<key>trim-position</key>
<value>false</value>
</dictionary>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.acceleo.ide.ui.acceleoNature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
<nature>org.eclipse.pde.PluginNature</nature>
</natures>
</projectDescription>
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Acceleo Acceleo Module Runtime Plug-in
Bundle-SymbolicName: tdt4250.spp.html.acceleo
Bundle-Version: 1.0.0.qualifier
Bundle-Activator: tdt4250.spp.html.acceleo.Activator
Bundle-Vendor: Eclipse Modeling Project
Require-Bundle: org.eclipse.core.runtime,
org.eclipse.emf.ecore,
org.eclipse.emf.ecore.xmi,
org.eclipse.ocl,
org.eclipse.ocl.ecore,
org.eclipse.acceleo.common;bundle-version="3.3.0",
org.eclipse.acceleo.model;bundle-version="3.3.0",
org.eclipse.acceleo.profiler;bundle-version="3.3.0",
org.eclipse.acceleo.engine;bundle-version="3.3.0",
com.google.guava
Bundle-RequiredExecutionEnvironment: JavaSE-11
Bundle-ActivationPolicy: lazy
Eclipse-LazyStart: true
source.. = src/
output.. = bin/
bin.includes = META-INF/,\
.
jre.compilation.profile = JavaSE-11
<?xml version="1.0" encoding="UTF-8"?>
<project default="main" name="tdt4250.spp.html.acceleo">
<property name="ECLIPSE_HOME" value="../../../Eclipse/eclipse"/>
<property name="ECLIPSE_WORKSPACE" value="../.."/>
<!-- The classpath with only the dependencies used by the project -->
<path id="tdt4250.spp.html.acceleo.libraryclasspath">
<pathelement location="${ECLIPSE_WORKSPACE}/tdt4250.spp.html.acceleo/bin"/>
</path>
<path id="tdt4250.spp.html.acceleo.classpath">
<path refid="tdt4250.spp.html.acceleo.libraryclasspath"/>
</path>
<!-- The classpath with only the jars available in the plugin folder of Eclipse -->
<path id="tdt4250.spp.html.acceleo.libraryclasspath.alljars">
<pathelement location="../tdt4250.spp.html.acceleo/bin"/>
<fileset dir="${ECLIPSE_HOME}/plugins/" includes="*.jar"/>
</path>
<path id="tdt4250.spp.html.acceleo.classpath.alljars">
<path refid="tdt4250.spp.html.acceleo.libraryclasspath.alljars"/>
</path>
<!-- The default task with the jars used by this project -->
<target name="main">
<java classname=".Main" classpathref="tdt4250.spp.html.acceleo.classpath">
<arg value="${model}"/>
<arg value="${target}"/>
</java>
</target>
<!--
In case of problem you can also try with all the jar available in your Eclipse
Keep in mind that having two versions of the same jar can create problems
-->
<target name="main.alljars">
<java classname=".Main" classpathref="tdt4250.spp.html.acceleo.classpath">
<arg value="${model}"/>
<arg value="${target}"/>
</java>
</target>
</project>
<?xml version="1.0" encoding="UTF-8"?>
<!-- Place this file in the target project and call it with "External Tools > Run As > Ant Build" -->
<!-- You have to change the MODEL and the TARGET values -->
<project basedir="." default="mainSample" name="tdt4250.spp.html.acceleoSample">
<import file="../../tdt4250.spp.html.acceleo/tasks/main.xml"/>
<!-- Change the values of MODEL and TARGET to point to your model and output folder -->
<property name="MODEL" value="${basedir}/model/file.xmi"/>
<property name="TARGET" value="${basedir}/src-gen"/>
<target name="mainSample" description="Generate files in 'TARGET'">
<antcall target="main" >
<param name="model" value="${MODEL}"/>
<param name="target" value="${TARGET}"/>
</antcall>
</target>
</project>
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" output="bin" path="src"/>
<classpathentry kind="output" path="bin"/>
</classpath>
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>tdt4250.spp.html</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.pde.ManifestBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.pde.SchemaBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.acceleo.ide.ui.acceleoBuilder</name>
<arguments>
<dictionary>
<key>compilation.kind</key>
<value>compilation.platform.resource</value>
</dictionary>
<dictionary>
<key>compliance</key>
<value>pragmatic</value>
</dictionary>
<dictionary>
<key>resource.kind</key>
<value>xmi</value>
</dictionary>
<dictionary>
<key>trim-position</key>
<value>false</value>
</dictionary>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.acceleo.ide.ui.acceleoNature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
<nature>org.eclipse.pde.PluginNature</nature>
</natures>
</projectDescription>
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Acceleo Html Module Runtime Plug-in
Bundle-SymbolicName: tdt4250.spp.html
Bundle-Version: 1.0.0.qualifier
Bundle-Activator: tdt4250.spp.html.Activator
Bundle-Vendor: Eclipse Modeling Project
Require-Bundle: org.eclipse.core.runtime,
org.eclipse.emf.ecore,
org.eclipse.emf.ecore.xmi,
org.eclipse.ocl,
org.eclipse.ocl.ecore,
org.eclipse.acceleo.common;bundle-version="3.3.0",
org.eclipse.acceleo.model;bundle-version="3.3.0",
org.eclipse.acceleo.profiler;bundle-version="3.3.0",
org.eclipse.acceleo.engine;bundle-version="3.7.8",
com.google.guava,
tdt4250.spp.model;bundle-version="0.1.0"
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
Bundle-ActivationPolicy: lazy
Eclipse-LazyStart: true
Export-Package: tdt4250.spp.html.main
source.. = src/
output.. = bin/
bin.includes = META-INF/,\
.
jre.compilation.profile = JavaSE-11
/*******************************************************************************
* Copyright (c) 2008, 2011 Obeo.
* 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:
* Obeo - initial API and implementation
*******************************************************************************/
package tdt4250.spp.html;
import org.eclipse.core.runtime.Plugin;
import org.osgi.framework.BundleContext;
/**
* The activator class controls the plug-in life cycle.
*/
public class Activator extends Plugin {
/**
* The plug-in ID.
*/
public static final String PLUGIN_ID = "tdt4250.spp.html";
/**
* The shared instance.
*/
private static Activator plugin;
/**
* The constructor.
*/
public Activator() {
}
/**
* {@inheritDoc}
*
* @see org.eclipse.core.runtime.Plugin#start(org.osgi.framework.BundleContext)
*/
public void start(BundleContext context) throws Exception {
super.start(context);
plugin = this;
}
/**
* {@inheritDoc}
*
* @see org.eclipse.core.runtime.Plugin#stop(org.osgi.framework.BundleContext)
*/
public void stop(BundleContext context) throws Exception {
plugin = null;
super.stop(context);
}
/**
* Returns the shared instance.
*
* @return the shared instance
*/
public static Activator getDefault() {
return plugin;
}
}
<html>
<head>
<title>NTNU</title>
<meta charset="utf-8"/>
</head>
<body>
<h1>NTNU</h1>
</body>
</html>
<?xml version="1.0" encoding="UTF-8"?>
<spp:University
xmi:version="2.0"
xmlns:xmi="http://www.omg.org/XMI"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:spp="platform:/plugin/tdt4250.spp.model/model/spp.ecore"
xsi:schemaLocation="platform:/plugin/tdt4250.spp.model/model/spp.ecore spp.ecore"
name="NTNU">
<programs
name="Bachelor in IT">
<semesters
selectedCourses="//@institutes.0/@courses.0 //@institutes.0/@courses.7"/>
<semesters
season="Spring"
selectedCourses="//@institutes.0/@courses.4 //@institutes.1/@courses.5"/>
<semesters
year="2"
selectedCourses="//@institutes.0/@courses.5 //@institutes.1/@courses.2"/>
<mandatoryCourses
courses="//@institutes.0/@courses.0 //@institutes.0/@courses.3 //@institutes.0/@courses.4 //@institutes.0/@courses.5 //@institutes.0/@courses.7"/>
<electiveCourses
courses="//@institutes.0/@courses.1 //@institutes.0/@courses.2 //@institutes.0/@courses.6 //@institutes.1/@courses.3 //@institutes.1/@courses.4 //@institutes.1/@courses.5"/>
</programs>
<institutes
name="Institutt for datateknologi og informatikk">
<courses
code="TDT4110"
name="Informasjonsteknologi, grunnkurs"
credits="7.5"/>
<courses
code="TDT4250"
name="Avansert programvaredesign"
credits="7.5"
level="SecoundDegreeCourse"/>
<courses
code="TDT4175"
name="Informasjonssystemer"
credits="7.5"
level="ThirdYearCourse"/>
<courses
code="TDT4140"
name="Programvareutvikling"
credits="7.5"
level="IntermediateCourse"
season="Spring"/>
<courses
code="TDT4100"
name="Objektorientert programmering"
credits="7.5"
season="Spring"/>
<courses
code="TDT4120"
name="Algoritmer og datastrukturer"
credits="7.5"
level="IntermediateCourse"/>
<courses
code="IT2810"
name="Webutvikling"
credits="7.5"
level="IntermediateCourse"/>
<courses
code="IT2805"
name="Webteknologi"
credits="7.5"/>
</institutes>
<institutes
name="Institutt for matematiske fag">
<courses
code="MA1101"
name="Grunnkurs i analyse I"
credits="7.5"/>
<courses
code="MA1102"
name="Grunnkurs i analyse II"
credits="7.5"
season="Spring"/>
<courses
code="TMA4135"
name="Matematikk 4D"
credits="7.5"
level="ThirdYearCourse"/>
<courses
code="TMA4140"
name="Diskret matematikk"
credits="7.5"/>
<courses
code="MA1201"
name="Lineær algebra og geometri"
credits="7.5"/>
<courses
code="MA1103"
name="Flerdimensjonal analyse"
credits="7.5"
season="Spring"/>
</institutes>
<institutes
name="Institutt for lærerutdanning">
<courses
code="PPU4601 "
name="Pedagogikk 1"
credits="7.5"/>
<courses
code="PPU4611"
name="Praksis 1"/>
</institutes>
</spp:University>
[comment encoding = UTF-8 /]
[module studyplan2TextGenerator('platform:/plugin/tdt4250.spp.model/model/spp.ecore', 'http://www.eclipse.org/emf/2002/Ecore')]
[template public studyplan2TextGenerator(uni : University)]
[comment @main/]
[file (uni.name.concat('.html'), false, 'UTF-8')]
<html>
<head>
<title>[uni.name/]</title>
<meta charset="utf-8"/>
</head>
<body>
<h1>[uni.name/]</h1>
</body>
</html>
[/file]
[/template]
<?xml version="1.0" encoding="UTF-8"?>
<project default="studyplan2TextGenerator" name="tdt4250.spp.html">
<property name="ECLIPSE_HOME" value="../../../Eclipse/eclipse"/>
<property name="ECLIPSE_WORKSPACE" value="../.."/>
<!-- The classpath with only the dependencies used by the project -->
<path id="tdt4250.spp.html.libraryclasspath">
<pathelement location="${ECLIPSE_WORKSPACE}/tdt4250.spp.html/bin"/>
</path>
<path id="tdt4250.spp.html.classpath">
<path refid="tdt4250.spp.html.libraryclasspath"/>
</path>
<!-- The classpath with only the jars available in the plugin folder of Eclipse -->
<path id="tdt4250.spp.html.libraryclasspath.alljars">
<pathelement location="../tdt4250.spp.html/bin"/>
<fileset dir="${ECLIPSE_HOME}/plugins/" includes="*.jar"/>
</path>
<path id="tdt4250.spp.html.classpath.alljars">
<path refid="tdt4250.spp.html.libraryclasspath.alljars"/>
</path>
<!-- The default task with the jars used by this project -->
<target name="studyplan2TextGenerator">
<java classname="tdt4250.spp.html.main.Studyplan2TextGenerator" classpathref="tdt4250.spp.html.classpath">
<arg value="${model}"/>
<arg value="${target}"/>
</java>
</target>
<!--
In case of problem you can also try with all the jar available in your Eclipse
Keep in mind that having two versions of the same jar can create problems
-->
<target name="studyplan2TextGenerator.alljars">
<java classname="tdt4250.spp.html.main.Studyplan2TextGenerator" classpathref="tdt4250.spp.html.classpath">
<arg value="${model}"/>
<arg value="${target}"/>
</java>
</target>
</project>
<?xml version="1.0" encoding="UTF-8"?>
<!-- Place this file in the target project and call it with "External Tools > Run As > Ant Build" -->
<!-- You have to change the MODEL and the TARGET values -->
<project basedir="." default="studyplan2TextGeneratorSample" name="tdt4250.spp.htmlSample">
<import file="../../tdt4250.spp.html/tasks/studyplan2TextGenerator.xml"/>
<!-- Change the values of MODEL and TARGET to point to your model and output folder -->
<property name="MODEL" value="${basedir}/model/file.xmi"/>
<property name="TARGET" value="${basedir}/src-gen"/>
<target name="studyplan2TextGeneratorSample" description="Generate files in 'TARGET'">
<antcall target="studyplan2TextGenerator" >
<param name="model" value="${MODEL}"/>
<param name="target" value="${TARGET}"/>
</antcall>
</target>
</project>
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="output" path="bin"/>
</classpath>
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>tdt4250.spp.model.edit</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.pde.ManifestBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.pde.SchemaBuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.jdt.core.javanature</nature>
<nature>org.eclipse.pde.PluginNature</nature>
</natures>
</projectDescription>
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-SymbolicName: tdt4250.spp.model.edit;singleton:=true
Automatic-Module-Name: tdt4250.spp.model.edit
Bundle-Version: 1.0.0.qualifier
Bundle-ClassPath: .
Bundle-Activator: tdt4250.spp.provider.SppEditPlugin$Implementation
Bundle-Vendor: %providerName
Bundle-Localization: plugin
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
Export-Package: tdt4250.spp.provider
Require-Bundle: org.eclipse.core.runtime,
tdt4250.spp.model;visibility:=reexport,
org.eclipse.emf.edit;visibility:=reexport
Bundle-ActivationPolicy: lazy
#
bin.includes = .,\
icons/,\
META-INF/,\
plugin.xml,\
plugin.properties
jars.compile.order = .
source.. = src/
output.. = bin/
#
pluginName = tdt4250.spp.model Edit Support
providerName = www.example.org
_UI_CreateChild_text = {0}
_UI_CreateChild_text2 = {1} {0}
_UI_CreateChild_text3 = {1}
_UI_CreateChild_tooltip = Create New {0} Under {1} Feature
_UI_CreateChild_description = Create a new child of type {0} for the {1} feature of the selected {2}.
_UI_CreateSibling_description = Create a new sibling of type {0} for the selected {2}, under the {1} feature of their parent.
_UI_PropertyDescriptor_description = The {0} of the {1}
_UI_University_type = University
_UI_Institute_type = Institute
_UI_Program_type = Program
_UI_Semester_type = Semester
_UI_Course_type = Course
_UI_Specialisation_type = Specialisation
_UI_MandatoryCourses_type = Mandatory Courses
_UI_ElectiveCourses_type = Elective Courses
_UI_Unknown_type = Object
_UI_Unknown_datatype= Value
_UI_University_programs_feature = Programs
_UI_University_name_feature = Name
_UI_University_institutes_feature = Institutes
_UI_Institute_name_feature = Name
_UI_Institute_courses_feature = Courses
_UI_Institute_university_feature = University
_UI_Program_name_feature = Name
_UI_Program_duration_feature = Duration
_UI_Program_semesters_feature = Semesters
_UI_Program_specialisation_feature = Specialisation
_UI_Program_mandatoryCourses_feature = Mandatory Courses
_UI_Program_electiveCourses_feature = Elective Courses
_UI_Program_numberOfSemesters_feature = Number Of Semesters
_UI_Semester_season_feature = Season
_UI_Semester_year_feature = Year
_UI_Semester_program_feature = Program
_UI_Semester_selectedCourses_feature = Selected Courses
_UI_Course_code_feature = Code
_UI_Course_name_feature = Name
_UI_Course_credits_feature = Credits
_UI_Course_level_feature = Level
_UI_Course_season_feature = Season
_UI_Course_responsibleUnit_feature = Responsible Unit
_UI_Specialisation_name_feature = Name
_UI_Specialisation_program_feature = Program
_UI_MandatoryCourses_program_feature = Program
_UI_MandatoryCourses_courses_feature = Courses
_UI_ElectiveCourses_program_feature = Program
_UI_ElectiveCourses_courses_feature = Courses
_UI_Unknown_feature = Unspecified
_UI_LevelType_Bachelor_literal = Bachelor
_UI_LevelType_Master_literal = Master
_UI_LevelType_IntegratedMasters_literal = IntegratedMasters
_UI_SeasonType_Fall_literal = Fall
_UI_SeasonType_Spring_literal = Spring
_UI_SeasonType_Both_literal = Both
_UI_CourseLevelType_FoundationCourse_literal = FoundationCourse
_UI_CourseLevelType_IntermediateCourse_literal = IntermediateCourse
_UI_CourseLevelType_ThirdYearCourse_literal = ThirdYearCourse