Merge branch 'master' of git.inpt.fr:tocard-inc/enseeiht/gls/projet

This commit is contained in:
Laurent Fainsin 2021-12-10 15:19:49 +01:00
commit 860a990d5e
13 changed files with 533 additions and 0 deletions

View file

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="output" path="bin"/>
</classpath>

View file

@ -0,0 +1,24 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>fr.n7.game.design</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.pde.PluginNature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
</natures>
</projectDescription>

View file

@ -0,0 +1,16 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-SymbolicName: fr.n7.game.design;singleton:=true
Bundle-Version: 1.0.0.qualifier
Bundle-Activator: fr.n7.game.design.Activator
Bundle-Localization: plugin
Require-Bundle: org.eclipse.ui,
org.eclipse.core.runtime,
org.eclipse.core.resources,
org.eclipse.sirius,
org.eclipse.sirius.common.acceleo.aql
Bundle-ActivationPolicy: lazy
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
Bundle-Vendor: %providerName
Automatic-Module-Name: fr.n7.game.design

View file

@ -0,0 +1,7 @@
source.. = src/
output.. = bin/
bin.includes = META-INF/,\
.,\
description/,\
plugin.properties,\
plugin.xml

View file

@ -0,0 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<description:Group xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:description="http://www.eclipse.org/sirius/description/1.1.0" xmlns:description_1="http://www.eclipse.org/sirius/diagram/description/1.1.0" name="game" version="12.0.0.2017041100">
<ownedViewpoints name="gameViewpoint" modelFileExtension="game">
<ownedRepresentations xsi:type="description_1:DiagramDescription" name="gameDiagram" domainClass="game::Jeu" enablePopupBars="true">
<metamodel href="http://www.n7.fr/game/xtext/Game#/"/>
<defaultLayer name="Default"/>
</ownedRepresentations>
<ownedJavaExtensions qualifiedClassName="fr.n7.game.design.Services"/>
</ownedViewpoints>
</description:Group>

View file

@ -0,0 +1,174 @@
{
"Explorateur": {
"taille": 3,
"connaissances": [],
"objets": [
"tentative",
"tentative",
"tentative"
]
},
"Territoire": {
"Lieux": [
{
"nom": "Enigme",
"deposable": true,
"depart": true,
"fin": false,
"personnes": [
"Sphinx"
],
"descriptions": [
{
"texte": "lieu de depart",
"condition": true
}
],
"objets": [],
"connaissances": []
},
{
"nom": "Succes",
"deposable": false,
"depart": false,
"fin": true,
"personnes": [],
"descriptions": [
{
"texte": "lieu succes",
"condition": true
}
],
"objets": [],
"connaissances": []
},
{
"nom": "Echec",
"deposable": false,
"depart": false,
"fin": true,
"personnes": [],
"descriptions": [
{
"texte": "lieu echec",
"condition": true
}
],
"objets": [],
"connaissances": []
}
],
"Chemins": [
{
"nom": "win",
"lieu_in": "Enigme",
"lieu_out": "Succes",
"ouvert": true,
"visible": Reussite,
"obligatoire": true,
"connaissances": [],
"objets_recus": [],
"objets_conso": [],
"descriptions": [
{
"texte": "Le chemin de la victoire !",
"condition": true
}
]
},
{
"nom": "loose",
"lieu_in": "Enigme",
"lieu_out": "Echec",
"ouvert": true,
"visible": tentatives == 0,
"obligatoire": true,
"connaissances": [],
"objets_recus": [],
"objets_conso": [],
"descriptions": [
{
"texte": "Le chemin de la loose !",
"condition": true
}
]
}
]
},
"Objets": [
{
"nom": "tentative",
"taille": 1,
"visible": true,
"descriptions": [
{
"texte": "permet repondre une question du sphinx",
"condition": true
}
]
}
],
"Connaissances": [
{
"nom": "Reussite",
"visible": true,
"descriptions": [
{
"texte": "Permet de se casser de la",
"condition": true
}
]
}
],
"Personnes": [
{
"nom": "Sphinx",
"visible": ! Reussite && tentative > 0,
"obligatoire": true,
"interactions": [
{
"nom": "Parler",
"visible": true,
"connaissances": [],
"objets_recus": [],
"objets_conso": [],
"actions": [
{
"nom": "Reponse_1",
"visible": true,
"fin_interaction": true,
"connaissances": [
"Reussite"
],
"objets_recus": [],
"objets_conso": [],
"descriptions" : [
{
"texte": "la bonne reponse",
"condition": true
}
]
},
{
"nom": "Reponse_2",
"visible": true,
"fin_interaction": true,
"connaissances": [],
"objets_recus": [],
"objets_conso": [
"tentative"
],
"descriptions" : [
{
"texte": "la mauvaise reponse",
"condition": true
}
]
}
]
}
]
}
],
"Transformations": []
}

View file

@ -0,0 +1,3 @@
pluginName = fr.n7.game.design
providerName = Eclipse Modeling Project
viewpointName = MyViewpoint

View file

@ -0,0 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<?eclipse version="3.0"?>
<plugin>
<extension point="org.eclipse.sirius.componentization">
<component class="fr.n7.game.design.Activator"
id="fr.n7.game.design"
name="game">
</component>
</extension>
</plugin>

View file

@ -0,0 +1,66 @@
package fr.n7.game.design;
import java.util.HashSet;
import java.util.Set;
import org.eclipse.sirius.business.api.componentization.ViewpointRegistry;
import org.eclipse.sirius.viewpoint.description.Viewpoint;
import org.eclipse.ui.plugin.AbstractUIPlugin;
import org.osgi.framework.BundleContext;
/**
* The activator class controls the plug-in life cycle
*/
public class Activator extends AbstractUIPlugin {
// The plug-in ID
public static final String PLUGIN_ID = "fr.n7.game.design";
// The shared instance
private static Activator plugin;
private static Set<Viewpoint> viewpoints;
/**
* The constructor
*/
public Activator() {
}
/*
* (non-Javadoc)
*
* @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
*/
public void start(BundleContext context) throws Exception {
super.start(context);
plugin = this;
viewpoints = new HashSet<Viewpoint>();
viewpoints.addAll(ViewpointRegistry.getInstance().registerFromPlugin(PLUGIN_ID + "/description/game.odesign"));
}
/*
* (non-Javadoc)
*
* @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
*/
public void stop(BundleContext context) throws Exception {
plugin = null;
if (viewpoints != null) {
for (final Viewpoint viewpoint: viewpoints) {
ViewpointRegistry.getInstance().disposeFromPlugin(viewpoint);
}
viewpoints.clear();
viewpoints = null;
}
super.stop(context);
}
/**
* Returns the shared instance
*
* @return the shared instance
*/
public static Activator getDefault() {
return plugin;
}
}

View file

@ -0,0 +1,17 @@
package fr.n7.game.design;
import org.eclipse.emf.ecore.EObject;
/**
* The services class used by VSM.
*/
public class Services {
/**
* See http://help.eclipse.org/neon/index.jsp?topic=%2Forg.eclipse.sirius.doc%2Fdoc%2Findex.html&cp=24 for documentation on how to write service methods.
*/
public EObject myService(EObject self, String arg) {
// TODO Auto-generated code
return self;
}
}

View file

@ -0,0 +1,18 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>fr.n7.game.samples</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.xtext.ui.shared.xtextBuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.sirius.nature.modelingproject</nature>
<nature>org.eclipse.xtext.ui.shared.xtextNature</nature>
</natures>
</projectDescription>

View file

@ -0,0 +1,174 @@
{
"Explorateur": {
"taille": 3,
"connaissances": [],
"objets": [
"tentative",
"tentative",
"tentative"
]
},
"Territoire": {
"Lieux": [
{
"nom": "Enigme",
"deposable": true,
"depart": true,
"fin": false,
"personnes": [
"Sphinx"
],
"descriptions": [
{
"texte": "lieu de depart",
"condition": true
}
],
"objets": [],
"connaissances": []
},
{
"nom": "Succes",
"deposable": false,
"depart": false,
"fin": true,
"personnes": [],
"descriptions": [
{
"texte": "lieu succes",
"condition": true
}
],
"objets": [],
"connaissances": []
},
{
"nom": "Echec",
"deposable": false,
"depart": false,
"fin": true,
"personnes": [],
"descriptions": [
{
"texte": "lieu echec",
"condition": true
}
],
"objets": [],
"connaissances": []
}
],
"Chemins": [
{
"nom": "win",
"lieu_in": "Enigme",
"lieu_out": "Succes",
"ouvert": true,
"visible": Reussite,
"obligatoire": true,
"connaissances": [],
"objets_recus": [],
"objets_conso": [],
"descriptions": [
{
"texte": "Le chemin de la victoire !",
"condition": true
}
]
},
{
"nom": "loose",
"lieu_in": "Enigme",
"lieu_out": "Echec",
"ouvert": true,
"visible": tentatives == 0,
"obligatoire": true,
"connaissances": [],
"objets_recus": [],
"objets_conso": [],
"descriptions": [
{
"texte": "Le chemin de la loose !",
"condition": true
}
]
}
]
},
"Objets": [
{
"nom": "tentative",
"taille": 1,
"visible": true,
"descriptions": [
{
"texte": "permet repondre une question du sphinx",
"condition": true
}
]
}
],
"Connaissances": [
{
"nom": "Reussite",
"visible": true,
"descriptions": [
{
"texte": "Permet de se casser de la",
"condition": true
}
]
}
],
"Personnes": [
{
"nom": "Sphinx",
"visible": ! Reussite && tentative > 0,
"obligatoire": true,
"interactions": [
{
"nom": "Parler",
"visible": true,
"connaissances": [],
"objets_recus": [],
"objets_conso": [],
"actions": [
{
"nom": "Reponse_1",
"visible": true,
"fin_interaction": true,
"connaissances": [
"Reussite"
],
"objets_recus": [],
"objets_conso": [],
"descriptions" : [
{
"texte": "la bonne reponse",
"condition": true
}
]
},
{
"nom": "Reponse_2",
"visible": true,
"fin_interaction": true,
"connaissances": [],
"objets_recus": [],
"objets_conso": [
"tentative"
],
"descriptions" : [
{
"texte": "la mauvaise reponse",
"condition": true
}
]
}
]
}
]
}
],
"Transformations": []
}

View file

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<viewpoint:DAnalysis xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:description="http://www.eclipse.org/sirius/description/1.1.0" xmlns:viewpoint="http://www.eclipse.org/sirius/1.1.0" xsi:schemaLocation="http://www.eclipse.org/sirius/description/1.1.0 http://www.eclipse.org/sirius/1.1.0#//description" uid="_WNQy0Fm_EeytLbweae6YqA" selectedViews="_sdfMQFnCEeysL9251qqO9A" version="14.3.1.202003261200">
<semanticResources>enigme.game</semanticResources>
<ownedViews xmi:type="viewpoint:DView" uid="_sdfMQFnCEeysL9251qqO9A">
<viewpoint xmi:type="description:Viewpoint" href="platform:/plugin/fr.n7.game.design/description/game.odesign#//@ownedViewpoints[name='gameViewpoint']"/>
</ownedViews>
</viewpoint:DAnalysis>