public code v1

This commit is contained in:
2026-05-22 11:14:29 +02:00
parent 427197ec5a
commit b8141736eb
28859 changed files with 575079 additions and 0 deletions
+7
View File
@@ -0,0 +1,7 @@
<?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" path="src"/>
<classpathentry kind="output" path="bin"/>
</classpath>
+1
View File
@@ -0,0 +1 @@
/bin/
+34
View File
@@ -0,0 +1,34 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>afryca.workspace</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.m2e.core.maven2Builder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.m2e.core.maven2Nature</nature>
<nature>org.eclipse.pde.PluginNature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
</natures>
</projectDescription>
@@ -0,0 +1,2 @@
eclipse.preferences.version=1
encoding/<project>=UTF-8
@@ -0,0 +1,2 @@
eclipse.preferences.version=1
line.separator=\n
@@ -0,0 +1,7 @@
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
org.eclipse.jdt.core.compiler.compliance=1.8
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.source=1.8
@@ -0,0 +1,4 @@
activeProfiles=
eclipse.preferences.version=1
resolveWorkspaceProjects=true
version=1
@@ -0,0 +1,29 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %Bundle-Name
Bundle-SymbolicName: afryca.workspace;singleton:=true
Bundle-Version: 1.0.0.qualifier
Bundle-Vendor: %Bundle-Vendor
Require-Bundle: afryca.workspace.service.events;visibility:=reexport,
afryca.ase,
afryca.gdmp;visibility:=reexport,
afryca.behavior;visibility:=reexport,
afryca.consensusmodel;visibility:=reexport,
org.eclipse.core.runtime,
org.eclipse.core.commands,
org.eclipse.e4.core.di,
org.eclipse.e4.core.di.extensions,
org.eclipse.e4.core.services,
org.eclipse.e4.core.contexts,
org.eclipse.e4.core.commands,
org.eclipse.e4.ui.workbench,
org.eclipse.e4.ui.model.workbench,
org.apache.commons.io
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
Export-Package: afryca.workspace,
afryca.workspace.command,
afryca.workspace.preferences,
afryca.workspace.service
Bundle-ActivationPolicy: lazy
Service-Component: OSGI-INF/workspace_service_context_function.xml
Automatic-Module-Name: afryca.workspace
@@ -0,0 +1,37 @@
#Properties file for afryca.workspace
afryca.workspace.command.clone_gdmp.description = Clone selected GDMP
afryca.workspace.command.clone_gdmp.name = Clone GDMP
afryca.workspace.command.import_gdmp.description = Import GDMP into workspace
afryca.workspace.command.import_gdmp.name = Import GDMP
afryca.workspace.command.new_function.description = New function
afryca.workspace.command.new_function.name = &New function
afryca.workspace.command.new_gdmp.description = New GDMP
afryca.workspace.command.new_gdmp.name = New GDMP
afryca.workspace.command.new_module.description = New module
afryca.workspace.command.new_module.name = &New module
afryca.workspace.command.new_module_binding.description = New module binding
afryca.workspace.command.new_module_binding.name = &New module binding
afryca.workspace.command.new_repository.description = New repository
afryca.workspace.command.new_repository.name = &New repository
afryca.workspace.command.new_snippet.description = New snippet
afryca.workspace.command.new_snippet.name = &New snippet
afryca.workspace.command.remove_attitude.description = Remove behavior's attitude
afryca.workspace.command.remove_attitude.name = &Remove attitude
afryca.workspace.command.remove_configuration.description = Remove model's configuration
afryca.workspace.command.remove_configuration.name = &Remove configuration
afryca.workspace.command.remove_function.description = Remove function
afryca.workspace.command.remove_function.name = &Remove function
afryca.workspace.command.remove_gdmp.description = Remove selected GDMP
afryca.workspace.command.remove_gdmp.name = Remove GDMP
afryca.workspace.command.remove_module.description = Remove module
afryca.workspace.command.remove_module.name = &Remove module
afryca.workspace.command.remove_module_binding.description = Remove module binding
afryca.workspace.command.remove_module_binding.name = &Remove module binding
afryca.workspace.command.remove_repository.description = Remove repository
afryca.workspace.command.remove_repository.name = &Remove repository
afryca.workspace.command.remove_snippet.description = Remove snippet
afryca.workspace.command.remove_snippet.name = &Remove snippet
afryca.workspace.part.label = Workspace
afryca.workspace.preloaded.extension-point.name = Preloaded element
Bundle-Name = Workspace
Bundle-Vendor = Sinbad\u00B2
@@ -0,0 +1,37 @@
#Archivo de propiedades para afryca.workspace
afryca.workspace.command.clone_gdmp.description = Clonar el PTDG seleccionado
afryca.workspace.command.clone_gdmp.name = Clonar PTDG
afryca.workspace.command.import_gdmp.description = Importar PTDG en el espacio de trabajo
afryca.workspace.command.import_gdmp.name = Importar PTDG
afryca.workspace.command.new_function.description = Nueva función
afryca.workspace.command.new_function.name = &Nueva función
afryca.workspace.command.new_gdmp.description = Nuevo PTDG
afryca.workspace.command.new_gdmp.name = Nuevo PTDG
afryca.workspace.command.new_module.description = Nuevo módulo
afryca.workspace.command.new_module.name = &Nuevo módulo
afryca.workspace.command.new_module_binding.description = Nuevo enlace a módulo
afryca.workspace.command.new_module_binding.name = &Nuevo enlace a módulo
afryca.workspace.command.new_repository.description = Nuevo repositorio
afryca.workspace.command.new_repository.name = &Nuevo repositorio
afryca.workspace.command.new_snippet.description = Nuevo snippet
afryca.workspace.command.new_snippet.name = &Nuevo snippet
afryca.workspace.command.remove_attitude.description = Eliminar actitud de comportamiento
afryca.workspace.command.remove_attitude.name = &Eliminar actitud
afryca.workspace.command.remove_configuration.description = Eliminar configuración de modelo
afryca.workspace.command.remove_configuration.name = &Eliminar configuración
afryca.workspace.command.remove_function.description = Eliminar función
afryca.workspace.command.remove_function.name = &Eliminar función
afryca.workspace.command.remove_gdmp.description = Eliminar PTDG seleccionado
afryca.workspace.command.remove_gdmp.name = &Eliminar PTDG
afryca.workspace.command.remove_module.description = Eliminar módulo
afryca.workspace.command.remove_module.name = &Eliminar módulo
afryca.workspace.command.remove_module_binding.description = Eliminar enlace a módulo
afryca.workspace.command.remove_module_binding.name = &Eliminar enlace a módulo
afryca.workspace.command.remove_repository.description = Eliminar repositorio
afryca.workspace.command.remove_repository.name = &Eliminar repositorio
afryca.workspace.command.remove_snippet.description = Eliminar snippet
afryca.workspace.command.remove_snippet.name = &Eliminar snippet
afryca.workspace.part.label = Espacio de trabajo
afryca.workspace.preloaded.extension-point.name = Elemento precargado
Bundle-Name = Espacio de trabajo
Bundle-Vendor = Sinbad\u00B2
@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<scr:component xmlns:scr="http://www.osgi.org/xmlns/scr/v1.1.0" name="IWorkspaceService context function">
<implementation class="afryca.workspace.service.provider.WorkspaceServiceContextFunction"/>
<property
name="service.context.key"
type="String"
value="afryca.workspace.service.IWorkspaceService"/>
<service>
<provide
interface="org.eclipse.e4.core.contexts.IContextFunction"/>
</service>
</scr:component>
@@ -0,0 +1,8 @@
output.. = bin/
bin.includes = META-INF/,\
.,\
OSGI-INF/,\
fragment.e4xmi,\
plugin.xml,\
preferences.ini
source.. = src/
+56
View File
@@ -0,0 +1,56 @@
<?xml version="1.0" encoding="ASCII"?>
<fragment:ModelFragments xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:commands="http://www.eclipse.org/ui/2010/UIModel/application/commands" xmlns:fragment="http://www.eclipse.org/ui/2010/UIModel/fragment" xmi:id="_tNzzIIZVEea7Y-iV4ff5JA">
<fragments xsi:type="fragment:StringModelFragment" xmi:id="_qDEtwIZbEea7Y-iV4ff5JA" featurename="commands" parentElementId="afryca.rcp.application">
<elements xsi:type="commands:Command" xmi:id="_vtQpYIZbEea7Y-iV4ff5JA" elementId="afryca.workspace.command.import_gdmp" commandName="%afryca.workspace.command.import_gdmp.name" description="%afryca.workspace.command.import_gdmp.description">
<parameters xmi:id="_UEFrkIsJEea5XKuiDvCqgA" elementId="gdmp" name="gdmp" typeId="afryca.gdmp.command.parameter.gdmp" optional="false"/>
<parameters xmi:id="_VLy6gIsJEea5XKuiDvCqgA" elementId="file" name="file" typeId="" optional="false"/>
</elements>
<elements xsi:type="commands:Command" xmi:id="_At9xUIZcEea7Y-iV4ff5JA" elementId="afryca.workspace.command.clone_gdmp" commandName="%afryca.workspace.command.clone_gdmp.name" description="%afryca.workspace.command.clone_gdmp.description">
<parameters xmi:id="_2FaGoIoeEea_OrYmX4J8Qw" elementId="file" name="file" typeId="" optional="false"/>
</elements>
<elements xsi:type="commands:Command" xmi:id="_-OHqwIZbEea7Y-iV4ff5JA" elementId="afryca.workspace.command.new_gdmp" commandName="%afryca.workspace.command.new_gdmp.name" description="%afryca.workspace.command.new_gdmp.description">
<parameters xmi:id="_5cK2IIsmEea0QIWrUmFwLw" elementId="gdmp" name="gdmp" typeId="afryca.gdmp.command.parameter.gdmp" optional="false"/>
</elements>
<elements xsi:type="commands:Command" xmi:id="_CsxAUIZcEea7Y-iV4ff5JA" elementId="afryca.workspace.command.remove_gdmp" commandName="%afryca.workspace.command.remove_gdmp.name" description="%afryca.workspace.command.remove_gdmp.description"/>
<elements xsi:type="commands:Command" xmi:id="_Qn1XkLcxEeaydajrvStQng" elementId="afryca.workspace.command.remove_configuration" commandName="%afryca.workspace.command.remove_configuration.name" description="%afryca.workspace.command.remove_onfiguration.description"/>
<elements xsi:type="commands:Command" xmi:id="_XLftwLujEea0fscCNN1udA" elementId="afryca.workspace.command.remove_attitude" commandName="%afryca.workspace.command.remove_attitude.name" description="%afryca.workspace.command.remove_attitude.description"/>
<elements xsi:type="commands:Command" xmi:id="_ModGYMOyEea-FLMDOEsPpQ" elementId="afryca.workspace.command.new_repository" commandName="%afryca.workspace.command.new_repository.name" description="%afryca.workspace.command.new_repository.description">
<parameters xmi:id="_ModGYcOyEea-FLMDOEsPpQ" elementId="repository" name="repository" typeId="afryca.ase.command.parameter.repository" optional="false"/>
</elements>
<elements xsi:type="commands:Command" xmi:id="_mVPSMMP1EeaTCN1Kry8RJA" elementId="afryca.workspace.command.remove_repository" commandName="%afryca.workspace.command.remove_repository.name" description="%afryca.workspace.command.remove_repository.description"/>
<elements xsi:type="commands:Command" xmi:id="_D67pkMVHEea2qdNnTWj_Cw" elementId="afryca.workspace.command.new_snippet" commandName="%afryca.workspace.command.new_snippet.name" description="%afryca.workspace.command.new_snippet.description">
<parameters xmi:id="_D67pkcVHEea2qdNnTWj_Cw" elementId="snippet" name="snippet" typeId="afryca.ase.command.parameter.snippet" optional="false"/>
</elements>
<elements xsi:type="commands:Command" xmi:id="_RIuMoMVfEeajeuVzBGZ6wA" elementId="afryca.workspace.command.remove_snippet" commandName="%afryca.workspace.command.remove_snippet.name" description="%afryca.workspace.command.remove_snippet.description"/>
<elements xsi:type="commands:Command" xmi:id="_oPMtkMafEeaJNd4vZpc5cQ" elementId="afryca.workspace.command.new_module" commandName="%afryca.workspace.command.new_module.name" description="%afryca.workspace.command.new_module.description">
<parameters xmi:id="_oPMtkcafEeaJNd4vZpc5cQ" elementId="module" name="module" typeId="afryca.ase.command.parameter.module" optional="false"/>
</elements>
<elements xsi:type="commands:Command" xmi:id="_RdLm8MaiEeaJNd4vZpc5cQ" elementId="afryca.workspace.command.remove_module" commandName="%afryca.workspace.command.remove_module.name" description="%afryca.workspace.command.remove_module.description"/>
<elements xsi:type="commands:Command" xmi:id="_CRbcMManEeaJNd4vZpc5cQ" elementId="afryca.workspace.command.new_function" commandName="%afryca.workspace.command.new_function.name" description="%afryca.workspace.command.new_function.description">
<parameters xmi:id="_CRbcMcanEeaJNd4vZpc5cQ" elementId="function" name="function" typeId="afryca.ase.command.parameter.function" optional="false"/>
</elements>
<elements xsi:type="commands:Command" xmi:id="_CoTEEManEeaJNd4vZpc5cQ" elementId="afryca.workspace.command.remove_function" commandName="%afryca.workspace.command.remove_function.name" description="%afryca.workspace.command.remove_function.description"/>
<elements xsi:type="commands:Command" xmi:id="_Vc6DcMnlEeau3ta3HbPI-A" elementId="afryca.workspace.command.new_module_binding" commandName="%afryca.workspace.command.new_module_binding.name" description="%afryca.workspace.command.new_module_binding.description">
<parameters xmi:id="_Vc6DccnlEeau3ta3HbPI-A" elementId="module.binding" name="module.binding" typeId="afryca.ase.command.parameter.module.binding" optional="false"/>
</elements>
<elements xsi:type="commands:Command" xmi:id="_hykYkMnlEeau3ta3HbPI-A" elementId="afryca.workspace.command.remove_module_binding" commandName="%afryca.workspace.command.remove_module_binding.name" description="%afryca.workspace.command.remove_module_binding.description"/>
</fragments>
<fragments xsi:type="fragment:StringModelFragment" xmi:id="_FzsVAIZcEea7Y-iV4ff5JA" featurename="handlers" parentElementId="afryca.rcp.application">
<elements xsi:type="commands:Handler" xmi:id="_Ut1ZEIZcEea7Y-iV4ff5JA" elementId="afryca.workspace.handler.import_gdmp" contributionURI="bundleclass://afryca.workspace/afryca.workspace.command.ImportGDMP" command="_vtQpYIZbEea7Y-iV4ff5JA"/>
<elements xsi:type="commands:Handler" xmi:id="_dBiUoIZcEea7Y-iV4ff5JA" elementId="afryca.workspace.handler.clone_gdmp" contributionURI="bundleclass://afryca.workspace/afryca.workspace.command.CloneGDMP" command="_At9xUIZcEea7Y-iV4ff5JA"/>
<elements xsi:type="commands:Handler" xmi:id="_dJZQIIZcEea7Y-iV4ff5JA" elementId="afryca.workspace.handler.new_gdmp" contributionURI="bundleclass://afryca.workspace/afryca.workspace.command.NewGDMP" command="_-OHqwIZbEea7Y-iV4ff5JA"/>
<elements xsi:type="commands:Handler" xmi:id="_dM53IIZcEea7Y-iV4ff5JA" elementId="afryca.workspace.handler.remove_gdmp" contributionURI="bundleclass://afryca.workspace/afryca.workspace.command.RemoveGDMP" command="_CsxAUIZcEea7Y-iV4ff5JA"/>
<elements xsi:type="commands:Handler" xmi:id="_UKlFkLcxEeaydajrvStQng" elementId="afryca.workspace.handler.remove_configuration" contributionURI="bundleclass://afryca.workspace/afryca.workspace.command.RemoveConfiguration" command="_Qn1XkLcxEeaydajrvStQng"/>
<elements xsi:type="commands:Handler" xmi:id="_zHRcILujEea0fscCNN1udA" elementId="afryca.workspace.handler.remove_attitude" contributionURI="bundleclass://afryca.workspace/afryca.workspace.command.RemoveAttitude" command="_XLftwLujEea0fscCNN1udA"/>
<elements xsi:type="commands:Handler" xmi:id="_cQZEkMOyEea-FLMDOEsPpQ" elementId="afryca.workspace.handler.new_repository" contributionURI="bundleclass://afryca.workspace/afryca.workspace.command.NewRepository" command="_ModGYMOyEea-FLMDOEsPpQ"/>
<elements xsi:type="commands:Handler" xmi:id="_gAYdYMP_EeaTCN1Kry8RJA" elementId="afryca.workspace.handler.remove_repository" contributionURI="bundleclass://afryca.workspace/afryca.workspace.command.RemoveRepository" command="_mVPSMMP1EeaTCN1Kry8RJA"/>
<elements xsi:type="commands:Handler" xmi:id="_QkDGMMVHEea2qdNnTWj_Cw" elementId="afryca.workspace.handler.new_snippet" contributionURI="bundleclass://afryca.workspace/afryca.workspace.command.NewSnippet" command="_D67pkMVHEea2qdNnTWj_Cw"/>
<elements xsi:type="commands:Handler" xmi:id="_Vm3y8MVfEeajeuVzBGZ6wA" elementId="afryca.workspace.handler.remove_snippet" contributionURI="bundleclass://afryca.workspace/afryca.workspace.command.RemoveSnippet" command="_RIuMoMVfEeajeuVzBGZ6wA"/>
<elements xsi:type="commands:Handler" xmi:id="_XI3XYMaiEeaJNd4vZpc5cQ" elementId="afryca.workspace.handler.new_module" contributionURI="bundleclass://afryca.workspace/afryca.workspace.command.NewModule" command="_oPMtkMafEeaJNd4vZpc5cQ"/>
<elements xsi:type="commands:Handler" xmi:id="_aMm1MMaiEeaJNd4vZpc5cQ" elementId="afryca.workspace.handler.remove_module" contributionURI="bundleclass://afryca.workspace/afryca.workspace.command.RemoveModule" command="_RdLm8MaiEeaJNd4vZpc5cQ"/>
<elements xsi:type="commands:Handler" xmi:id="_IPYoYManEeaJNd4vZpc5cQ" elementId="afryca.workspace.handler.new_function" contributionURI="bundleclass://afryca.workspace/afryca.workspace.command.NewFunction" command="_CRbcMManEeaJNd4vZpc5cQ"/>
<elements xsi:type="commands:Handler" xmi:id="_I2K7kManEeaJNd4vZpc5cQ" elementId="afryca.workspace.handler.remove_function" contributionURI="bundleclass://afryca.workspace/afryca.workspace.command.RemoveFunction" command="_CoTEEManEeaJNd4vZpc5cQ"/>
<elements xsi:type="commands:Handler" xmi:id="_c8pygMnlEeau3ta3HbPI-A" elementId="afryca.workspace.handler.new_module_binding" contributionURI="bundleclass://afryca.workspace/afryca.workspace.command.NewModuleBinding" command="_Vc6DcMnlEeau3ta3HbPI-A"/>
<elements xsi:type="commands:Handler" xmi:id="_k7dcIMnlEeau3ta3HbPI-A" elementId="afryca.workspace.handler.remove_module_binding" contributionURI="bundleclass://afryca.workspace/afryca.workspace.command.RemoveModuleBinding" command="_hykYkMnlEeau3ta3HbPI-A"/>
</fragments>
</fragment:ModelFragments>
+15
View File
@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="UTF-8"?>
<?eclipse version="3.4"?>
<plugin>
<extension-point
id="afryca.workspace.preloaded"
name="%afryca.workspace.preloaded.extension-point.name"
schema="schema/afryca.workspace.preloaded.exsd"/>
<extension
id="afryca.workspace.fragment"
point="org.eclipse.e4.workbench.model">
<fragment
uri="fragment.e4xmi">
</fragment>
</extension>
</plugin>
+1
View File
@@ -0,0 +1 @@
folder=@user.dir/workspace
@@ -0,0 +1,129 @@
<?xml version='1.0' encoding='UTF-8'?>
<!-- Schema file written by PDE -->
<schema targetNamespace="afryca.workspace" xmlns="http://www.w3.org/2001/XMLSchema">
<annotation>
<appinfo>
<meta.schema plugin="afryca.workspace" id="afryca.workspace.preloaded" name="%afryca.workspace.preloaded.extension-point.name"/>
</appinfo>
<documentation>
[Enter description of this extension point.]
</documentation>
</annotation>
<element name="extension">
<annotation>
<appinfo>
<meta.element />
</appinfo>
</annotation>
<complexType>
<choice minOccurs="1" maxOccurs="unbounded">
<element ref="Preloaded"/>
</choice>
<attribute name="point" type="string" use="required">
<annotation>
<documentation>
</documentation>
</annotation>
</attribute>
<attribute name="id" type="string">
<annotation>
<documentation>
</documentation>
</annotation>
</attribute>
<attribute name="name" type="string">
<annotation>
<documentation>
</documentation>
<appinfo>
<meta.attribute translatable="true"/>
</appinfo>
</annotation>
</attribute>
</complexType>
</element>
<element name="Preloaded">
<complexType>
<attribute name="element" type="string" use="required">
<annotation>
<documentation>
</documentation>
<appinfo>
<meta.attribute kind="resource"/>
</appinfo>
</annotation>
</attribute>
<attribute name="nature" use="required">
<annotation>
<documentation>
</documentation>
</annotation>
<simpleType>
<restriction base="string">
<enumeration value="gdmp">
</enumeration>
<enumeration value="configuration">
</enumeration>
<enumeration value="attitude">
</enumeration>
<enumeration value="repository">
</enumeration>
<enumeration value="snippet">
</enumeration>
<enumeration value="module">
</enumeration>
<enumeration value="function">
</enumeration>
<enumeration value="module_binding">
</enumeration>
</restriction>
</simpleType>
</attribute>
</complexType>
</element>
<annotation>
<appinfo>
<meta.section type="since"/>
</appinfo>
<documentation>
[Enter the first release in which this extension point appears.]
</documentation>
</annotation>
<annotation>
<appinfo>
<meta.section type="examples"/>
</appinfo>
<documentation>
[Enter extension point usage example here.]
</documentation>
</annotation>
<annotation>
<appinfo>
<meta.section type="apiinfo"/>
</appinfo>
<documentation>
[Enter API information here.]
</documentation>
</annotation>
<annotation>
<appinfo>
<meta.section type="implementation"/>
</appinfo>
<documentation>
[Enter information about supplied implementation of this extension point.]
</documentation>
</annotation>
</schema>
@@ -0,0 +1,866 @@
package afryca.workspace;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Map;
import java.util.Set;
import javax.annotation.PostConstruct;
import javax.inject.Inject;
import javax.inject.Singleton;
import org.eclipse.e4.core.di.annotations.Creatable;
import afryca.ase.Function;
import afryca.ase.Module;
import afryca.ase.ModuleBinding;
import afryca.ase.Repository;
import afryca.ase.Snippet;
import afryca.behavior.Attitude;
import afryca.consensusmodel.Configuration;
import afryca.gdmp.GDMP;
/**
* Workspace
*
* @author Sinbad²
* @version 3.0
*/
@Creatable
@Singleton
public class Workspace {
private Map<String, GDMP> problems;
private Map<String, Configuration> configurations;
private Map<String, Configuration> defaultConfigurations;
private Map<String, Attitude> attitudes;
private Map<String, Attitude> defaultAttitudes;
private Map<String, Repository> repositories;
private Map<String, Snippet> snippets;
private Map<String, Module> modules;
private Map<String, Function> functions;
private Map<String, ModuleBinding> moduleBindings;
private Set<String> preloadedProblems;
private Set<String> preloadedConfigurations;
private Set<String> preloadedAttitudes;
private Set<String> preloadedRepositories;
private Set<String> preloadedSnippets;
private Set<String> preloadedModules;
private Set<String> preloadedFunctions;
private Set<String> preloadedModuleBindings;
/**
* Default builder
*/
@Inject
public Workspace() {
super();
}
@PostConstruct
private void initialize() {
problems = new HashMap<>();
configurations = new HashMap<>();
defaultConfigurations = new HashMap<>();
attitudes = new HashMap<>();
defaultAttitudes = new HashMap<>();
repositories = new HashMap<>();
snippets = new HashMap<>();
modules = new HashMap<>();
functions = new HashMap<>();
moduleBindings = new HashMap<>();
preloadedProblems = new HashSet<>();
preloadedConfigurations = new HashSet<>();
preloadedAttitudes = new HashSet<>();
preloadedRepositories = new HashSet<>();
preloadedSnippets = new HashSet<>();
preloadedModules = new HashSet<>();
preloadedFunctions = new HashSet<>();
preloadedModuleBindings = new HashSet<>();
}
/**
* Set GDMPs
*
* @param problems
* GDMPs
*/
public void setProblems(Map<String, GDMP> problems) {
this.problems = problems;
}
/**
* Return GDMPs
*
* @return GDMPs
*/
public Map<String, GDMP> getProblems() {
return problems;
}
/**
* Add GDMP
*
* @param gdmp
* GDMP
*/
public void addProblem(GDMP gdmp) {
problems.put(gdmp.getFile(), gdmp);
}
/**
* Add a preloaded GDMP
*
* @param gdmp
* GDMP
*/
public void addPreloadedProblem(GDMP gdmp) {
gdmp.save();
preloadedProblems.add(gdmp.getFile());
addProblem(gdmp);
}
/**
* Remove GDMP
*
* @param gdmp
* GDMP
*/
public void removeProblem(GDMP gdmp) {
removeProblem(gdmp.getFile());
}
/**
* Remove GDMP
*
* @param file
* File name
*/
public void removeProblem(String file) {
problems.remove(file);
}
/**
* Check if workspace contains GDMP
*
* @param gdmp
* GDMP
* @return True if workspace contains GDMP, False in other case
*/
public boolean containsProblem(GDMP gdmp) {
return containsProblem(gdmp.getFile());
}
/**
* Check if workspace contains GDMP file name
*
* @param file
* file GDMP file name
* @return True if workspace contains GDMP file name, False in other case
*/
public boolean containsProblem(String file) {
return problems.containsKey(file);
}
/**
* Set consensus model configurations
*
* @param configurations
* Consensus model configuration
*/
public void setConfigurations(Map<String, Configuration> configurations) {
this.configurations = configurations;
}
/**
* Return consensus model configurations
*
* @return Consensus model configurations
*/
public Map<String, Configuration> getConfigurations() {
return configurations;
}
/**
* Set consensus model default configuration
*
* @param configuration
* Consensus model default configuration
*/
public void setDefaultConfiguration(Configuration configuration) {
defaultConfigurations.put(configuration.getConsensusModel(), configuration);
}
/**
* Return consensus model default configuration
*
* @param id
* Consensus model id
* @return Consensus model default configuration
*/
public Configuration getDefaultConfiguration(String id) {
return defaultConfigurations.get(id);
}
/**
* Add consensus model configuration
*
* @param configuration
* Consensus model configuration
*/
public void addConfiguration(Configuration configuration) {
configurations.put(configuration.getFile(), configuration);
}
/**
* Add preloaded consensus model configuration
*
* @param configuration
* Consensus model configuration
*/
public void addPreloadedConfiguration(Configuration configuration) {
preloadedConfigurations.add(configuration.getFile());
addConfiguration(configuration);
}
/**
* Remove consensus model configuration
*
* @param configuration
* Consensus model configuration
*/
public void removeConfiguration(Configuration configuration) {
removeConfiguration(configuration.getFile());
}
/**
* Remove consensus model configuration
*
* @param file
* File name
*/
public void removeConfiguration(String file) {
configurations.remove(file);
}
/**
* Check if workspace contains consensus model configuration
*
* @param configuration
* Consensus model configuration
* @return True if workspace contains consensus model configuration, False
* in other case
*/
public boolean containsConfiguration(Configuration configuration) {
return containsConfiguration(configuration.getFile());
}
/**
* Check if workspace contains consensus model configuration file name
*
* @param file
* file consensus model configuration file name
* @return True if workspace contains consensus model configuration file
* name, False in other case
*/
public boolean containsConfiguration(String file) {
return configurations.containsKey(file);
}
/**
* Set attitudes
*
* @param attitudes
* attitude
*/
public void setAttitudes(Map<String, Attitude> attitudes) {
this.attitudes = attitudes;
}
/**
* Return attitudes
*
* @return attitudes
*/
public Map<String, Attitude> getAttitudes() {
return attitudes;
}
/**
* Set behavior default attitude
*
* @param attitude
* Behavior default attitude
*/
public void setDefaultAttitude(Attitude attitude) {
defaultAttitudes.put(attitude.getBehavior(), attitude);
}
/**
* Return behavior default attitude
*
* @param id
* Behavior id
* @return Behavior default attitude
*/
public Attitude getDefaultAttitude(String id) {
return defaultAttitudes.get(id);
}
/**
* Add attitude
*
* @param attitude
* attitude
*/
public void addAttitude(Attitude attitude) {
attitudes.put(attitude.getFile(), attitude);
}
/**
* Add preloaded attitude
*
* @param attitude
* attitude
*/
public void addPreloadedAttitude(Attitude attitude) {
preloadedAttitudes.add(attitude.getFile());
addAttitude(attitude);
}
/**
* Remove attitude
*
* @param attitude
* attitude
*/
public void removeAttitude(Attitude attitude) {
removeAttitude(attitude.getFile());
}
/**
* Remove attitude
*
* @param file
* File name
*/
public void removeAttitude(String file) {
attitudes.remove(file);
}
/**
* Check if workspace contains attitude
*
* @param attitude
* attitude
* @return True if workspace contains attitude, False in other case
*/
public boolean containsAttitude(Attitude attitude) {
return containsAttitude(attitude.getFile());
}
/**
* Check if workspace contains attitude file name
*
* @param file
* file attitude file name
* @return True if workspace contains attitude file name, False in other
* case
*/
public boolean containsAttitude(String file) {
return attitudes.containsKey(file);
}
/**
* Set repositories
*
* @param repositories
* repository
*/
public void setRepositories(Map<String, Repository> repositories) {
this.repositories = repositories;
}
/**
* Return repositories
*
* @return repositories
*/
public Map<String, Repository> getRepositories() {
return repositories;
}
/**
* Add repository
*
* @param repository
* repository
*/
public void addRepository(Repository repository) {
repositories.put(repository.getFile(), repository);
}
/**
* Add preloaded repository
*
* @param repository
* repository
*/
public void addPreloadedRepository(Repository repository) {
preloadedRepositories.add(repository.getFile());
addRepository(repository);
}
/**
* Remove repository
*
* @param repository
* repository
*/
public void removeRepository(Repository repository) {
removeRepository(repository.getFile());
}
/**
* Remove repository
*
* @param file
* File name
*/
public void removeRepository(String file) {
repositories.remove(file);
}
/**
* Check if workspace contains repository
*
* @param repository
* repository
* @return True if workspace contains repository, False in other case
*/
public boolean containsRepository(Repository repository) {
return containsRepository(repository.getFile());
}
/**
* Check if workspace contains repository file name
*
* @param file
* file repository file name
* @return True if workspace contains repository file name, False in other
* case
*/
public boolean containsRepository(String file) {
return repositories.containsKey(file);
}
/**
* Set snippets
*
* @param snippets
* snippet
*/
public void setSnippets(Map<String, Snippet> snippets) {
this.snippets = snippets;
}
/**
* Return snippets
*
* @return snippets
*/
public Map<String, Snippet> getSnippets() {
return snippets;
}
/**
* Add snippet
*
* @param snippet
* snippet
*/
public void addSnippet(Snippet snippet) {
snippets.put(snippet.getFile(), snippet);
}
/**
* Add preloaded snippet
*
* @param snippet
* Snippet
*/
public void addPreloadedSnippet(Snippet snippet) {
preloadedSnippets.add(snippet.getFile());
addSnippet(snippet);
}
/**
* Remove snippet
*
* @param snippet
* snippet
*/
public void removeSnippet(Snippet snippet) {
removeSnippet(snippet.getFile());
}
/**
* Remove snippet
*
* @param file
* File name
*/
public void removeSnippet(String file) {
snippets.remove(file);
}
/**
* Check if workspace contains snippet
*
* @param snippet
* snippet
* @return True if workspace contains snippet, False in other case
*/
public boolean containsSnippet(Snippet snippet) {
return containsSnippet(snippet.getFile());
}
/**
* Check if workspace contains snippet file name
*
* @param file
* file snippet file name
* @return True if workspace contains snippet file name, False in other case
*/
public boolean containsSnippet(String file) {
return snippets.containsKey(file);
}
/**
* Set modules
*
* @param modules
* module
*/
public void setModules(Map<String, Module> modules) {
this.modules = modules;
}
/**
* Return modules
*
* @return modules
*/
public Map<String, Module> getModules() {
return modules;
}
/**
* Add module
*
* @param module
* module
*/
public void addModule(Module module) {
modules.put(module.getFile(), module);
}
/**
* Add preloaded module
*
* @param module
* Module
*/
public void addPreloadedModule(Module module) {
preloadedModules.add(module.getFile());
addModule(module);
}
/**
* Remove module
*
* @param module
* module
*/
public void removeModule(Module module) {
removeModule(module.getFile());
}
/**
* Remove module
*
* @param file
* File name
*/
public void removeModule(String file) {
modules.remove(file);
}
/**
* Check if workspace contains module
*
* @param module
* module
* @return True if workspace contains module, False in other case
*/
public boolean containsModule(Module module) {
return containsModule(module.getFile());
}
/**
* Check if workspace contains module file name
*
* @param file
* file module file name
* @return True if workspace contains module file name, False in other case
*/
public boolean containsModule(String file) {
return modules.containsKey(file);
}
/**
* Set functions
*
* @param functions
* function
*/
public void setFunctions(Map<String, Function> functions) {
this.functions = functions;
}
/**
* Return functions
*
* @return functions
*/
public Map<String, Function> getFunctions() {
return functions;
}
/**
* Add function
*
* @param function
* function
*/
public void addFunction(Function function) {
functions.put(function.getFile(), function);
}
/**
* Add preloaded function
*
* @param function
* Function
*/
public void addPreloadedFunction(Function function) {
preloadedFunctions.add(function.getFile());
addFunction(function);
}
/**
* Remove function
*
* @param function
* function
*/
public void removeFunction(Function function) {
removeFunction(function.getFile());
}
/**
* Remove function
*
* @param file
* File name
*/
public void removeFunction(String file) {
functions.remove(file);
}
/**
* Check if workspace contains function
*
* @param function
* function
* @return True if workspace contains function, False in other case
*/
public boolean containsFunction(Function function) {
return containsFunction(function.getFile());
}
/**
* Check if workspace contains function file name
*
* @param file
* file function file name
* @return True if workspace contains function file name, False in other
* case
*/
public boolean containsFunction(String file) {
return functions.containsKey(file);
}
/**
* Set module bindings
*
* @param moduleBindings
* Module binding
*/
public void setModuleBindings(Map<String, ModuleBinding> moduleBindings) {
this.moduleBindings = moduleBindings;
}
/**
* Return module bindings
*
* @return Module bindings
*/
public Map<String, ModuleBinding> getModuleBindings() {
return moduleBindings;
}
/**
* Add module binding
*
* @param moduleBinding
* Module binding
*/
public void addModuleBinding(ModuleBinding moduleBinding) {
moduleBindings.put(moduleBinding.getFile(), moduleBinding);
}
/**
* Add preloaded module binding
*
* @param moduleBinding
* Module binding
*/
public void addPreloadedModuleBinding(ModuleBinding moduleBinding) {
preloadedModuleBindings.add(moduleBinding.getFile());
addModuleBinding(moduleBinding);
}
/**
* Remove module binding
*
* @param moduleBinding
* Module binding
*/
public void removeModuleBinding(ModuleBinding moduleBinding) {
removeModuleBinding(moduleBinding.getFile());
}
/**
* Remove module binding
*
* @param file
* File name
*/
public void removeModuleBinding(String file) {
moduleBindings.remove(file);
}
/**
* Check if workspace contains module binding
*
* @param moduleBinding
* Module binding
* @return True if workspace contains module binding, False in other case
*/
public boolean containsModuleBinding(ModuleBinding moduleBinding) {
return containsModuleBinding(moduleBinding.getFile());
}
/**
* Check if workspace contains module binding file name
*
* @param file
* file module binding file name
* @return True if workspace contains module binding file name, False in other
* case
*/
public boolean containsModuleBinding(String file) {
return moduleBindings.containsKey(file);
}
/**
* @return the preloadedProblems
*/
public Set<String> getPreloadedProblems() {
return preloadedProblems;
}
/**
* @return the preloadedConfigurations
*/
public Set<String> getPreloadedConfigurations() {
return preloadedConfigurations;
}
/**
* @return the preloadedAttitudes
*/
public Set<String> getPreloadedAttitudes() {
return preloadedAttitudes;
}
/**
* @return the preloadedRepositories
*/
public Set<String> getPreloadedRepositories() {
return preloadedRepositories;
}
/**
* @return the preloadedSnippets
*/
public Set<String> getPreloadedSnippets() {
return preloadedSnippets;
}
/**
* @return the preloadedModules
*/
public Set<String> getPreloadedModules() {
return preloadedModules;
}
/**
* @return the preloadedFunctions
*/
public Set<String> getPreloadedFunctions() {
return preloadedFunctions;
}
/**
* @return the preloadedModuleBindings
*/
public Set<String> getPreloadedModuleBindings() {
return preloadedModuleBindings;
}
/**
* Clear workspace
*/
public void clear() {
problems.clear();
configurations.clear();
defaultConfigurations.clear();
attitudes.clear();
defaultAttitudes.clear();
repositories.clear();
snippets.clear();
modules.clear();
functions.clear();
moduleBindings.clear();
preloadedProblems.clear();
preloadedConfigurations.clear();
preloadedAttitudes.clear();
preloadedRepositories.clear();
preloadedSnippets.clear();
preloadedModules.clear();
preloadedFunctions.clear();
preloadedModuleBindings.clear();
}
}
@@ -0,0 +1,64 @@
package afryca.workspace.command;
import javax.inject.Inject;
import javax.inject.Named;
import org.eclipse.e4.core.di.annotations.CanExecute;
import org.eclipse.e4.core.di.annotations.Execute;
import org.eclipse.e4.core.di.annotations.Optional;
import org.eclipse.e4.core.services.log.ILoggerProvider;
import org.eclipse.e4.core.services.log.Logger;
import org.eclipse.e4.core.services.nls.Translation;
import afryca.gdmp.GDMP;
import afryca.workspace.l10n.Messages;
import afryca.workspace.service.IWorkspaceService;
/**
* Clone GDMP
*
* @author Sinbad²
* @version 3.0
*/
@SuppressWarnings("restriction")
public class CloneGDMP {
public static final String ID = "afryca.workspace.command.clone_gdmp"; //$NON-NLS-1$
public static final String FILE_PARAMETER = "file"; //$NON-NLS-1$
private Logger logger;
private Boolean lastCheckCanExecute;
@Inject
@Translation
private Messages messages;
@Inject
public void instantiateLogger(ILoggerProvider loggerProvider) {
logger = loggerProvider.getClassLogger(this.getClass());
}
@Execute
public boolean execute(IWorkspaceService workspaceService, GDMP gdmp, @Named(FILE_PARAMETER) String file) {
logger.info(messages.command_executed, ID);
return workspaceService.cloneGDMP(gdmp, file);
}
@CanExecute
public boolean canExecute(@Optional GDMP gdmp, IWorkspaceService workspaceService) {
boolean can = ((gdmp != null) && (workspaceService.writableWorkspace()));
tryToLogCanExecute(can);
return can;
}
private void tryToLogCanExecute(boolean can) {
boolean log = (lastCheckCanExecute != null) ? (lastCheckCanExecute != can) : true;
lastCheckCanExecute = can;
if (log) {
logger.info(messages.command_can_executed_result, ID, can);
}
}
}
@@ -0,0 +1,64 @@
package afryca.workspace.command;
import javax.inject.Inject;
import javax.inject.Named;
import org.eclipse.e4.core.di.annotations.CanExecute;
import org.eclipse.e4.core.di.annotations.Execute;
import org.eclipse.e4.core.services.log.ILoggerProvider;
import org.eclipse.e4.core.services.log.Logger;
import org.eclipse.e4.core.services.nls.Translation;
import afryca.gdmp.GDMP;
import afryca.workspace.l10n.Messages;
import afryca.workspace.service.IWorkspaceService;
/**
* Import GDMP
*
* @author Sinbad²
* @version 3.0
*/
@SuppressWarnings("restriction")
public class ImportGDMP {
public static final String ID = "afryca.workspace.command.import_gdmp"; //$NON-NLS-1$
public static final String FILE_PARAMETER = "file"; //$NON-NLS-1$
private Logger logger;
private Boolean lastCheckCanExecute;
@Inject
@Translation
private Messages messages;
@Inject
public void instantiateLogger(ILoggerProvider loggerProvider) {
logger = loggerProvider.getClassLogger(this.getClass());
}
@Execute
public boolean execute(IWorkspaceService workspaceService, @Named(GDMP.ID) GDMP gdmp,
@Named(FILE_PARAMETER) String file) {
logger.info(messages.command_executed, ID);
return workspaceService.importGDMP(gdmp, file);
}
@CanExecute
public boolean canExecute(IWorkspaceService workspaceService) {
boolean can = workspaceService.writableWorkspace();
tryToLogCanExecute(can);
return can;
}
private void tryToLogCanExecute(boolean can) {
boolean log = (lastCheckCanExecute != null) ? (lastCheckCanExecute != can) : true;
lastCheckCanExecute = can;
if (log) {
logger.info(messages.command_can_executed_result, ID, can);
}
}
}
@@ -0,0 +1,60 @@
package afryca.workspace.command;
import javax.inject.Inject;
import javax.inject.Named;
import org.eclipse.e4.core.di.annotations.CanExecute;
import org.eclipse.e4.core.di.annotations.Execute;
import org.eclipse.e4.core.services.log.ILoggerProvider;
import org.eclipse.e4.core.services.log.Logger;
import org.eclipse.e4.core.services.nls.Translation;
import afryca.ase.Function;
import afryca.workspace.l10n.Messages;
import afryca.workspace.service.IWorkspaceService;
/**
* New function
*
* @author Sinbad²
* @version 3.0
*/
@SuppressWarnings("restriction")
public class NewFunction {
public static final String ID = "afryca.workspace.command.new_function"; //$NON-NLS-1$
private Logger logger;
private Boolean lastCheckCanExecute;
@Inject
@Translation
private Messages messages;
@Inject
public void instantiateLogger(ILoggerProvider loggerProvider) {
logger = loggerProvider.getClassLogger(this.getClass());
}
@Execute
public boolean execute(IWorkspaceService workspaceService, @Named(Function.ID) Function function) {
logger.info(messages.command_executed, ID);
return workspaceService.newFunction(function);
}
@CanExecute
public boolean canExecute(IWorkspaceService workspaceService) {
boolean can = workspaceService.writableWorkspace();
tryToLogCanExecute(can);
return can;
}
private void tryToLogCanExecute(boolean can) {
boolean log = (lastCheckCanExecute != null) ? (lastCheckCanExecute != can) : true;
lastCheckCanExecute = can;
if (log) {
logger.info(messages.command_can_executed_result, ID, can);
}
}
}
@@ -0,0 +1,60 @@
package afryca.workspace.command;
import javax.inject.Inject;
import javax.inject.Named;
import org.eclipse.e4.core.di.annotations.CanExecute;
import org.eclipse.e4.core.di.annotations.Execute;
import org.eclipse.e4.core.services.log.ILoggerProvider;
import org.eclipse.e4.core.services.log.Logger;
import org.eclipse.e4.core.services.nls.Translation;
import afryca.gdmp.GDMP;
import afryca.workspace.l10n.Messages;
import afryca.workspace.service.IWorkspaceService;
/**
* New GDMP
*
* @author Sinbad²
* @version 3.0
*/
@SuppressWarnings("restriction")
public class NewGDMP {
public static final String ID = "afryca.workspace.command.new_gdmp"; //$NON-NLS-1$
private Logger logger;
private Boolean lastCheckCanExecute;
@Inject
@Translation
private Messages messages;
@Inject
public void instantiateLogger(ILoggerProvider loggerProvider) {
logger = loggerProvider.getClassLogger(this.getClass());
}
@Execute
public boolean execute(IWorkspaceService workspaceService, @Named(GDMP.ID) GDMP gdmp) {
logger.info(messages.command_executed, ID);
return workspaceService.newGDMP(gdmp);
}
@CanExecute
public boolean canExecute(IWorkspaceService workspaceService) {
boolean can = workspaceService.writableWorkspace();
tryToLogCanExecute(can);
return can;
}
private void tryToLogCanExecute(boolean can) {
boolean log = (lastCheckCanExecute != null) ? (lastCheckCanExecute != can) : true;
lastCheckCanExecute = can;
if (log) {
logger.info(messages.command_can_executed_result, ID, can);
}
}
}
@@ -0,0 +1,60 @@
package afryca.workspace.command;
import javax.inject.Inject;
import javax.inject.Named;
import org.eclipse.e4.core.di.annotations.CanExecute;
import org.eclipse.e4.core.di.annotations.Execute;
import org.eclipse.e4.core.services.log.ILoggerProvider;
import org.eclipse.e4.core.services.log.Logger;
import org.eclipse.e4.core.services.nls.Translation;
import afryca.ase.Module;
import afryca.workspace.l10n.Messages;
import afryca.workspace.service.IWorkspaceService;
/**
* New module
*
* @author Sinbad²
* @version 3.0
*/
@SuppressWarnings("restriction")
public class NewModule {
public static final String ID = "afryca.workspace.command.new_module"; //$NON-NLS-1$
private Logger logger;
private Boolean lastCheckCanExecute;
@Inject
@Translation
private Messages messages;
@Inject
public void instantiateLogger(ILoggerProvider loggerProvider) {
logger = loggerProvider.getClassLogger(this.getClass());
}
@Execute
public boolean execute(IWorkspaceService workspaceService, @Named(Module.ID) Module module) {
logger.info(messages.command_executed, ID);
return workspaceService.newModule(module);
}
@CanExecute
public boolean canExecute(IWorkspaceService workspaceService) {
boolean can = workspaceService.writableWorkspace();
tryToLogCanExecute(can);
return can;
}
private void tryToLogCanExecute(boolean can) {
boolean log = (lastCheckCanExecute != null) ? (lastCheckCanExecute != can) : true;
lastCheckCanExecute = can;
if (log) {
logger.info(messages.command_can_executed_result, ID, can);
}
}
}
@@ -0,0 +1,60 @@
package afryca.workspace.command;
import javax.inject.Inject;
import javax.inject.Named;
import org.eclipse.e4.core.di.annotations.CanExecute;
import org.eclipse.e4.core.di.annotations.Execute;
import org.eclipse.e4.core.services.log.ILoggerProvider;
import org.eclipse.e4.core.services.log.Logger;
import org.eclipse.e4.core.services.nls.Translation;
import afryca.ase.ModuleBinding;
import afryca.workspace.l10n.Messages;
import afryca.workspace.service.IWorkspaceService;
/**
* New module binding
*
* @author Sinbad²
* @version 3.0
*/
@SuppressWarnings("restriction")
public class NewModuleBinding {
public static final String ID = "afryca.workspace.command.new_module_binding"; //$NON-NLS-1$
private Logger logger;
private Boolean lastCheckCanExecute;
@Inject
@Translation
private Messages messages;
@Inject
public void instantiateLogger(ILoggerProvider loggerProvider) {
logger = loggerProvider.getClassLogger(this.getClass());
}
@Execute
public boolean execute(IWorkspaceService workspaceService, @Named(ModuleBinding.ID) ModuleBinding moduleBinding) {
logger.info(messages.command_executed, ID);
return workspaceService.newModuleBinding(moduleBinding);
}
@CanExecute
public boolean canExecute(IWorkspaceService workspaceService) {
boolean can = workspaceService.writableWorkspace();
tryToLogCanExecute(can);
return can;
}
private void tryToLogCanExecute(boolean can) {
boolean log = (lastCheckCanExecute != null) ? (lastCheckCanExecute != can) : true;
lastCheckCanExecute = can;
if (log) {
logger.info(messages.command_can_executed_result, ID, can);
}
}
}
@@ -0,0 +1,60 @@
package afryca.workspace.command;
import javax.inject.Inject;
import javax.inject.Named;
import org.eclipse.e4.core.di.annotations.CanExecute;
import org.eclipse.e4.core.di.annotations.Execute;
import org.eclipse.e4.core.services.log.ILoggerProvider;
import org.eclipse.e4.core.services.log.Logger;
import org.eclipse.e4.core.services.nls.Translation;
import afryca.ase.Repository;
import afryca.workspace.l10n.Messages;
import afryca.workspace.service.IWorkspaceService;
/**
* New repository
*
* @author Sinbad²
* @version 3.0
*/
@SuppressWarnings("restriction")
public class NewRepository {
public static final String ID = "afryca.workspace.command.new_repository"; //$NON-NLS-1$
private Logger logger;
private Boolean lastCheckCanExecute;
@Inject
@Translation
private Messages messages;
@Inject
public void instantiateLogger(ILoggerProvider loggerProvider) {
logger = loggerProvider.getClassLogger(this.getClass());
}
@Execute
public boolean execute(IWorkspaceService workspaceService, @Named(Repository.ID) Repository repository) {
logger.info(messages.command_executed, ID);
return workspaceService.newRepository(repository);
}
@CanExecute
public boolean canExecute(IWorkspaceService workspaceService) {
boolean can = workspaceService.writableWorkspace();
tryToLogCanExecute(can);
return can;
}
private void tryToLogCanExecute(boolean can) {
boolean log = (lastCheckCanExecute != null) ? (lastCheckCanExecute != can) : true;
lastCheckCanExecute = can;
if (log) {
logger.info(messages.command_can_executed_result, ID, can);
}
}
}
@@ -0,0 +1,60 @@
package afryca.workspace.command;
import javax.inject.Inject;
import javax.inject.Named;
import org.eclipse.e4.core.di.annotations.CanExecute;
import org.eclipse.e4.core.di.annotations.Execute;
import org.eclipse.e4.core.services.log.ILoggerProvider;
import org.eclipse.e4.core.services.log.Logger;
import org.eclipse.e4.core.services.nls.Translation;
import afryca.ase.Snippet;
import afryca.workspace.l10n.Messages;
import afryca.workspace.service.IWorkspaceService;
/**
* New snippet
*
* @author Sinbad²
* @version 3.0
*/
@SuppressWarnings("restriction")
public class NewSnippet {
public static final String ID = "afryca.workspace.command.new_snippet"; //$NON-NLS-1$
private Logger logger;
private Boolean lastCheckCanExecute;
@Inject
@Translation
private Messages messages;
@Inject
public void instantiateLogger(ILoggerProvider loggerProvider) {
logger = loggerProvider.getClassLogger(this.getClass());
}
@Execute
public boolean execute(IWorkspaceService workspaceService, @Named(Snippet.ID) Snippet snippet) {
logger.info(messages.command_executed, ID);
return workspaceService.newSnippet(snippet);
}
@CanExecute
public boolean canExecute(IWorkspaceService workspaceService) {
boolean can = workspaceService.writableWorkspace();
tryToLogCanExecute(can);
return can;
}
private void tryToLogCanExecute(boolean can) {
boolean log = (lastCheckCanExecute != null) ? (lastCheckCanExecute != can) : true;
lastCheckCanExecute = can;
if (log) {
logger.info(messages.command_can_executed_result, ID, can);
}
}
}
@@ -0,0 +1,87 @@
package afryca.workspace.command;
import javax.inject.Inject;
import org.eclipse.e4.core.di.annotations.CanExecute;
import org.eclipse.e4.core.di.annotations.Execute;
import org.eclipse.e4.core.di.annotations.Optional;
import org.eclipse.e4.core.services.log.ILoggerProvider;
import org.eclipse.e4.core.services.log.Logger;
import org.eclipse.e4.core.services.nls.Translation;
import afryca.behavior.Attitude;
import afryca.workspace.Workspace;
import afryca.workspace.l10n.Messages;
import afryca.workspace.service.IWorkspaceService;
/**
* Remove behavior's attitude
*
* @author Sinbad²
* @version 3.0
*/
@SuppressWarnings("restriction")
public class RemoveAttitude {
public static final String ID = "afryca.workspace.command.remove_attitude"; //$NON-NLS-1$
private Logger logger;
private Boolean lastCheckCanExecute;
@Inject
@Translation
private Messages messages;
@Inject
public void instantiateLogger(ILoggerProvider loggerProvider) {
logger = loggerProvider.getClassLogger(this.getClass());
}
@Execute
public boolean execute(IWorkspaceService workspaceService, Attitude attitude) {
logger.info(messages.command_executed, ID);
return workspaceService.removeAttitude(attitude);
}
@CanExecute
public boolean canExecute(@Optional Attitude attitude, IWorkspaceService workspaceService) {
boolean can = ((attitude != null)
&& (!isDefaultAttitude(workspaceService, attitude))
&& (!isPreloadedAttitude(workspaceService, attitude))
&& (workspaceService.writableWorkspace()));
tryToLogCanExecute(can);
return can;
}
private boolean isDefaultAttitude(final IWorkspaceService workspaceService,
final Attitude attitude) {
if ((attitude == null) || (workspaceService == null)) {
return false;
}
String behavior = attitude.getBehavior();
String attitudeFile = attitude.getFile();
Workspace workspace = workspaceService.getWorkspace();
Attitude defaultAttitude = workspace.getDefaultAttitude(behavior);
String defaultAttitudeFile = defaultAttitude.getFile();
return attitudeFile.equals(defaultAttitudeFile);
}
private boolean isPreloadedAttitude(final IWorkspaceService workspaceService,
final Attitude attitude) {
String selectedAttitudeFile = attitude.getFile();
Workspace workspace = workspaceService.getWorkspace();
return workspace.getPreloadedAttitudes().contains(selectedAttitudeFile);
}
private void tryToLogCanExecute(boolean can) {
boolean log = (lastCheckCanExecute != null) ? (lastCheckCanExecute != can) : true;
lastCheckCanExecute = can;
if (log) {
logger.info(messages.command_can_executed_result, ID, can);
}
}
}
@@ -0,0 +1,87 @@
package afryca.workspace.command;
import javax.inject.Inject;
import org.eclipse.e4.core.di.annotations.CanExecute;
import org.eclipse.e4.core.di.annotations.Execute;
import org.eclipse.e4.core.di.annotations.Optional;
import org.eclipse.e4.core.services.log.ILoggerProvider;
import org.eclipse.e4.core.services.log.Logger;
import org.eclipse.e4.core.services.nls.Translation;
import afryca.consensusmodel.Configuration;
import afryca.workspace.Workspace;
import afryca.workspace.l10n.Messages;
import afryca.workspace.service.IWorkspaceService;
/**
* Remove consensus model configuration
*
* @author Sinbad²
* @version 3.0
*/
@SuppressWarnings("restriction")
public class RemoveConfiguration {
public static final String ID = "afryca.workspace.command.remove_configuration"; //$NON-NLS-1$
private Logger logger;
private Boolean lastCheckCanExecute;
@Inject
@Translation
private Messages messages;
@Inject
public void instantiateLogger(ILoggerProvider loggerProvider) {
logger = loggerProvider.getClassLogger(this.getClass());
}
@Execute
public boolean execute(IWorkspaceService workspaceService, Configuration configuration) {
logger.info(messages.command_executed, ID);
return workspaceService.removeConfiguration(configuration);
}
@CanExecute
public boolean canExecute(@Optional Configuration configuration, IWorkspaceService workspaceService) {
boolean can = ((configuration != null)
&& (!isDefaultConfiguration(workspaceService, configuration))
&& (!isPreloadedConfiguration(workspaceService, configuration))
&& (workspaceService.writableWorkspace()));
tryToLogCanExecute(can);
return can;
}
private boolean isDefaultConfiguration(final IWorkspaceService workspaceService,
final Configuration configuration) {
if ((configuration == null) || (workspaceService == null)) {
return false;
}
String consensusModel = configuration.getConsensusModel();
String configurationFile = configuration.getFile();
Workspace workspace = workspaceService.getWorkspace();
Configuration defaultConfiguration = workspace.getDefaultConfiguration(consensusModel);
String defaultConfigurationFile = defaultConfiguration.getFile();
return configurationFile.equals(defaultConfigurationFile);
}
private boolean isPreloadedConfiguration(final IWorkspaceService workspaceService,
final Configuration configuration) {
String selectedConfigurationFile = configuration.getFile();
Workspace workspace = workspaceService.getWorkspace();
return workspace.getPreloadedConfigurations().contains(selectedConfigurationFile);
}
private void tryToLogCanExecute(boolean can) {
boolean log = (lastCheckCanExecute != null) ? (lastCheckCanExecute != can) : true;
lastCheckCanExecute = can;
if (log) {
logger.info(messages.command_can_executed_result, ID, can);
}
}
}
@@ -0,0 +1,61 @@
package afryca.workspace.command;
import javax.inject.Inject;
import org.eclipse.e4.core.di.annotations.CanExecute;
import org.eclipse.e4.core.di.annotations.Execute;
import org.eclipse.e4.core.di.annotations.Optional;
import org.eclipse.e4.core.services.log.ILoggerProvider;
import org.eclipse.e4.core.services.log.Logger;
import org.eclipse.e4.core.services.nls.Translation;
import afryca.ase.Function;
import afryca.workspace.l10n.Messages;
import afryca.workspace.service.IWorkspaceService;
/**
* Remove function
*
* @author Sinbad²
* @version 3.0
*/
@SuppressWarnings("restriction")
public class RemoveFunction {
public static final String ID = "afryca.workspace.command.remove_function"; //$NON-NLS-1$
private Logger logger;
private Boolean lastCheckCanExecute;
@Inject
@Translation
private Messages messages;
@Inject
public void instantiateLogger(ILoggerProvider loggerProvider) {
logger = loggerProvider.getClassLogger(this.getClass());
}
@Execute
public boolean execute(IWorkspaceService workspaceService, Function function) {
logger.info(messages.command_executed, ID);
return workspaceService.removeFunction(function);
}
@CanExecute
public boolean canExecute(@Optional Function function, IWorkspaceService workspaceService) {
boolean can = ((function != null) && (workspaceService.writableWorkspace()));
tryToLogCanExecute(can);
return can;
}
private void tryToLogCanExecute(boolean can) {
boolean log = (lastCheckCanExecute != null) ? (lastCheckCanExecute != can) : true;
lastCheckCanExecute = can;
if (log) {
logger.info(messages.command_can_executed_result, ID, can);
}
}
}
@@ -0,0 +1,61 @@
package afryca.workspace.command;
import javax.inject.Inject;
import org.eclipse.e4.core.di.annotations.CanExecute;
import org.eclipse.e4.core.di.annotations.Execute;
import org.eclipse.e4.core.di.annotations.Optional;
import org.eclipse.e4.core.services.log.ILoggerProvider;
import org.eclipse.e4.core.services.log.Logger;
import org.eclipse.e4.core.services.nls.Translation;
import afryca.gdmp.GDMP;
import afryca.workspace.l10n.Messages;
import afryca.workspace.service.IWorkspaceService;
/**
* Remove GDMP
*
* @author Sinbad²
* @version 3.0
*/
@SuppressWarnings("restriction")
public class RemoveGDMP {
public static final String ID = "afryca.workspace.command.remove_gdmp"; //$NON-NLS-1$
private Logger logger;
private Boolean lastCheckCanExecute;
@Inject
@Translation
private Messages messages;
@Inject
public void instantiateLogger(ILoggerProvider loggerProvider) {
logger = loggerProvider.getClassLogger(this.getClass());
}
@Execute
public boolean execute(IWorkspaceService workspaceService, GDMP gdmp) {
logger.info(messages.command_executed, ID);
return workspaceService.removeGDMP(gdmp);
}
@CanExecute
public boolean canExecute(@Optional GDMP gdmp, IWorkspaceService workspaceService) {
boolean can = (GDMP.checkCanRemove(gdmp) && workspaceService.writableWorkspace());
tryToLogCanExecute(can);
return can;
}
private void tryToLogCanExecute(boolean can) {
boolean log = (lastCheckCanExecute != null) ? (lastCheckCanExecute != can) : true;
lastCheckCanExecute = can;
if (log) {
logger.info(messages.command_can_executed_result, ID, can);
}
}
}
@@ -0,0 +1,61 @@
package afryca.workspace.command;
import javax.inject.Inject;
import org.eclipse.e4.core.di.annotations.CanExecute;
import org.eclipse.e4.core.di.annotations.Execute;
import org.eclipse.e4.core.di.annotations.Optional;
import org.eclipse.e4.core.services.log.ILoggerProvider;
import org.eclipse.e4.core.services.log.Logger;
import org.eclipse.e4.core.services.nls.Translation;
import afryca.ase.Module;
import afryca.workspace.l10n.Messages;
import afryca.workspace.service.IWorkspaceService;
/**
* Remove module
*
* @author Sinbad²
* @version 3.0
*/
@SuppressWarnings("restriction")
public class RemoveModule {
public static final String ID = "afryca.workspace.command.remove_module"; //$NON-NLS-1$
private Logger logger;
private Boolean lastCheckCanExecute;
@Inject
@Translation
private Messages messages;
@Inject
public void instantiateLogger(ILoggerProvider loggerProvider) {
logger = loggerProvider.getClassLogger(this.getClass());
}
@Execute
public boolean execute(IWorkspaceService workspaceService, Module module) {
logger.info(messages.command_executed, ID);
return workspaceService.removeModule(module);
}
@CanExecute
public boolean canExecute(@Optional Module module, IWorkspaceService workspaceService) {
boolean can = ((module != null) && (workspaceService.writableWorkspace()));
tryToLogCanExecute(can);
return can;
}
private void tryToLogCanExecute(boolean can) {
boolean log = (lastCheckCanExecute != null) ? (lastCheckCanExecute != can) : true;
lastCheckCanExecute = can;
if (log) {
logger.info(messages.command_can_executed_result, ID, can);
}
}
}
@@ -0,0 +1,61 @@
package afryca.workspace.command;
import javax.inject.Inject;
import org.eclipse.e4.core.di.annotations.CanExecute;
import org.eclipse.e4.core.di.annotations.Execute;
import org.eclipse.e4.core.di.annotations.Optional;
import org.eclipse.e4.core.services.log.ILoggerProvider;
import org.eclipse.e4.core.services.log.Logger;
import org.eclipse.e4.core.services.nls.Translation;
import afryca.ase.ModuleBinding;
import afryca.workspace.l10n.Messages;
import afryca.workspace.service.IWorkspaceService;
/**
* Remove moduleBinding
*
* @author Sinbad²
* @version 3.0
*/
@SuppressWarnings("restriction")
public class RemoveModuleBinding {
public static final String ID = "afryca.workspace.command.remove_module_binding"; //$NON-NLS-1$
private Logger logger;
private Boolean lastCheckCanExecute;
@Inject
@Translation
private Messages messages;
@Inject
public void instantiateLogger(ILoggerProvider loggerProvider) {
logger = loggerProvider.getClassLogger(this.getClass());
}
@Execute
public boolean execute(IWorkspaceService workspaceService, ModuleBinding moduleBinding) {
logger.info(messages.command_executed, ID);
return workspaceService.removeModuleBinding(moduleBinding);
}
@CanExecute
public boolean canExecute(@Optional ModuleBinding moduleBinding, IWorkspaceService workspaceService) {
boolean can = ((moduleBinding != null) && (workspaceService.writableWorkspace()));
tryToLogCanExecute(can);
return can;
}
private void tryToLogCanExecute(boolean can) {
boolean log = (lastCheckCanExecute != null) ? (lastCheckCanExecute != can) : true;
lastCheckCanExecute = can;
if (log) {
logger.info(messages.command_can_executed_result, ID, can);
}
}
}
@@ -0,0 +1,61 @@
package afryca.workspace.command;
import javax.inject.Inject;
import org.eclipse.e4.core.di.annotations.CanExecute;
import org.eclipse.e4.core.di.annotations.Execute;
import org.eclipse.e4.core.di.annotations.Optional;
import org.eclipse.e4.core.services.log.ILoggerProvider;
import org.eclipse.e4.core.services.log.Logger;
import org.eclipse.e4.core.services.nls.Translation;
import afryca.ase.Repository;
import afryca.workspace.l10n.Messages;
import afryca.workspace.service.IWorkspaceService;
/**
* Remove repository
*
* @author Sinbad²
* @version 3.0
*/
@SuppressWarnings("restriction")
public class RemoveRepository {
public static final String ID = "afryca.workspace.command.remove_repository"; //$NON-NLS-1$
private Logger logger;
private Boolean lastCheckCanExecute;
@Inject
@Translation
private Messages messages;
@Inject
public void instantiateLogger(ILoggerProvider loggerProvider) {
logger = loggerProvider.getClassLogger(this.getClass());
}
@Execute
public boolean execute(IWorkspaceService workspaceService, Repository repository) {
logger.info(messages.command_executed, ID);
return workspaceService.removeRepository(repository);
}
@CanExecute
public boolean canExecute(@Optional Repository repository, IWorkspaceService workspaceService) {
boolean can = ((repository != null) && (workspaceService.writableWorkspace()));
tryToLogCanExecute(can);
return can;
}
private void tryToLogCanExecute(boolean can) {
boolean log = (lastCheckCanExecute != null) ? (lastCheckCanExecute != can) : true;
lastCheckCanExecute = can;
if (log) {
logger.info(messages.command_can_executed_result, ID, can);
}
}
}
@@ -0,0 +1,61 @@
package afryca.workspace.command;
import javax.inject.Inject;
import org.eclipse.e4.core.di.annotations.CanExecute;
import org.eclipse.e4.core.di.annotations.Execute;
import org.eclipse.e4.core.di.annotations.Optional;
import org.eclipse.e4.core.services.log.ILoggerProvider;
import org.eclipse.e4.core.services.log.Logger;
import org.eclipse.e4.core.services.nls.Translation;
import afryca.ase.Snippet;
import afryca.workspace.l10n.Messages;
import afryca.workspace.service.IWorkspaceService;
/**
* Remove snippet
*
* @author Sinbad²
* @version 3.0
*/
@SuppressWarnings("restriction")
public class RemoveSnippet {
public static final String ID = "afryca.workspace.command.remove_snippet"; //$NON-NLS-1$
private Logger logger;
private Boolean lastCheckCanExecute;
@Inject
@Translation
private Messages messages;
@Inject
public void instantiateLogger(ILoggerProvider loggerProvider) {
logger = loggerProvider.getClassLogger(this.getClass());
}
@Execute
public boolean execute(IWorkspaceService workspaceService, Snippet snippet) {
logger.info(messages.command_executed, ID);
return workspaceService.removeSnippet(snippet);
}
@CanExecute
public boolean canExecute(@Optional Snippet snippet, IWorkspaceService workspaceService) {
boolean can = ((snippet != null) && (workspaceService.writableWorkspace()));
tryToLogCanExecute(can);
return can;
}
private void tryToLogCanExecute(boolean can) {
boolean log = (lastCheckCanExecute != null) ? (lastCheckCanExecute != can) : true;
lastCheckCanExecute = can;
if (log) {
logger.info(messages.command_can_executed_result, ID, can);
}
}
}
@@ -0,0 +1,41 @@
package afryca.workspace.definition;
import afryca.gdmp.GDMP;
import afryca.consensusmodel.Configuration;
import afryca.behavior.Attitude;
import afryca.ase.Repository;
import afryca.ase.Snippet;
import afryca.ase.Module;
import afryca.ase.Function;
import afryca.ase.ModuleBinding;
/**
* Preloaded nature enum
*
* @author Sinbad²
* @version 3.0
*/
public enum EPreloadedNature {
gdmp(GDMP::parse),
configuration(Configuration::parseConfiguration),
attitude(Attitude::parseAttitude),
repository(Repository::parseRepository),
snippet(Snippet::parseSnippet),
module(Module::parseModule),
function(Function::parseFunction),
module_binding(ModuleBinding::parseModuleBinding);
private java.util.function.Function<String, ?> parse;
private EPreloadedNature(java.util.function.Function<String, ?> parse) {
this.parse = wrapFunction(parse);
}
private java.util.function.Function<String, ?> wrapFunction(java.util.function.Function<String, ?> function) {
return value -> (value != null) ? function.apply(value) : null;
}
public Object parse(String value) {
return parse.apply(value);
}
}
@@ -0,0 +1,15 @@
package afryca.workspace.definition;
/**
* Preloaded element
*
* @author Sinbad²
* @version 3.0
*
* @noimplement Only used for constant definition
*/
public interface Preloaded {
String EXTENSION_POINT = "afryca.workspace.preloaded"; //$NON-NLS-1$
String ELEMENT = "element"; //$NON-NLS-1$
String NATURE = "nature";
}
@@ -0,0 +1,76 @@
package afryca.workspace.l10n;
/**
* Localized messages
*
* @author Sinbad²
* @version 3.0
*/
public class Messages {
public String attitude_restoring_fail_with_exception_x;
public String attitude_x_cloned_in_attitude_y;
public String attitude_x_cloning_fail_with_exception_y;
public String attitude_x_import_fail_with_exception_y;
public String attitude_x_import_in_attitude_y;
public String attitude_x_new;
public String attitude_x_new_fail_with_exception_y;
public String attitude_x_reading_fail_with_exception_y;
public String attitude_x_recorded;
public String attitude_x_recording_fail_with_exception_y;
public String attitude_x_removed;
public String behavior_x_attitude_y_restored;
public String command_can_executed_result;
public String command_executed;
public String configuration_restoring_fail_with_exception_x;
public String configuration_x_cloned_in_configuration_y;
public String configuration_x_cloning_fail_with_exception_y;
public String configuration_x_import_fail_with_exception_y;
public String configuration_x_import_in_configuration_y;
public String configuration_x_new;
public String configuration_x_new_fail_with_exception_y;
public String configuration_x_reading_fail_with_exception_y;
public String configuration_x_recorded;
public String configuration_x_recording_fail_with_exception_y;
public String configuration_x_removed;
public String consensus_model_x_configuration_y_restored;
public String folder_x_does_not_exists;
public String folder_x_is_not_readable;
public String function_x_new;
public String function_x_new_fail_with_exception_y;
public String function_x_reading_fail_with_exception_y;
public String function_x_removed;
public String gdmp_x_cloned_in_gdmp_y;
public String gdmp_x_cloning_fail_with_exception_y;
public String gdmp_x_import_fail_with_exception_y;
public String gdmp_x_import_in_gdmp_y;
public String gdmp_x_new;
public String gdmp_x_new_fail_with_exception_y;
public String gdmp_x_reading_fail_with_exception_y;
public String gdmp_x_removed;
public String module_binding_x_new;
public String module_binding_x_new_fail_with_exception_y;
public String module_binding_x_reading_fail_with_exception_y;
public String module_binding_x_removed;
public String module_x_new;
public String module_x_new_fail_with_exception_y;
public String module_x_reading_fail_with_exception_y;
public String module_x_removed;
public String preload_of_resource_x_fail;
public String read_x_attitudes_in_folder_y;
public String read_x_configurations_in_folder_y;
public String read_x_functions_in_folder_y;
public String read_x_gdmp_in_folder_y;
public String read_x_module_bindings_in_folder_y;
public String read_x_modules_in_folder_y;
public String read_x_repositories_in_folder_y;
public String read_x_snippets_in_folder_y;
public String repository_x_new;
public String repository_x_new_fail_with_exception_y;
public String repository_x_reading_fail_with_exception_y;
public String repository_x_removed;
public String snippet_x_new;
public String snippet_x_new_fail_with_exception_y;
public String snippet_x_reading_fail_with_exception_y;
public String snippet_x_removed;
public String x_folder_is_the_workspace;
}
@@ -0,0 +1,66 @@
attitude_restoring_fail_with_exception_x=Attitude restoring fail with exception {0}
attitude_x_cloned_in_attitude_y=Attitude {0} cloned in attitude {1}
attitude_x_cloning_fail_with_exception_y=Attitude {0} cloning fail with exception {1}
attitude_x_import_fail_with_exception_y=Attitude {0} import fail with exception {1}
attitude_x_import_in_attitude_y=Attitude {0} import in attitude {1}
attitude_x_new=Attitude {0} created
attitude_x_new_fail_with_exception_y=Attitude {0} new fail with exception {1}
attitude_x_reading_fail_with_exception_y=Attitude {0} reading fail with exception {1}
attitude_x_recorded=Attitude {0} recorded
attitude_x_recording_fail_with_exception_y=Attitude {0} recording fail with exception {1}
attitude_x_removed=Attitude {0} removed
behavior_x_attitude_y_restored=Behavior {0} attitude {1} restored
command_can_executed_result={0} can be executed? {1}
command_executed={0} executed
configuration_restoring_fail_with_exception_x=Configuration restoring fail with exception {0}
configuration_x_cloned_in_configuration_y=Configuration {0} cloned in configuration {1}
configuration_x_cloning_fail_with_exception_y=Configuration {0} cloning fail with exception {1}
configuration_x_import_fail_with_exception_y=Configuration {0} import fail with exception {1}
configuration_x_import_in_configuration_y=Configuration {0} import in configuration {1}
configuration_x_new=Configuration {0} created
configuration_x_new_fail_with_exception_y=Configuration {0} new fail with exception {1}
configuration_x_reading_fail_with_exception_y=Configuration {0} reading fail with exception {1}
configuration_x_recorded=Configuration {0} recorded
configuration_x_recording_fail_with_exception_y=Configuration {0} recording fail with exception {1}
configuration_x_removed=Configuration {0} removed
consensus_model_x_configuration_y_restored=Consensus model {0} configuration {1} restored
folder_x_does_not_exists=Folder {0} does not exists
folder_x_is_not_readable=Folder {0} is not readable
function_x_new=Function {0} new
function_x_new_fail_with_exception_y=Function {0} new fail with exception {1}
function_x_reading_fail_with_exception_y=Function {0} reading fail with exception {1}
function_x_removed=Function {0} removed
gdmp_x_cloned_in_gdmp_y=GDMP {0} cloned in GDMP {1}
gdmp_x_cloning_fail_with_exception_y=GDMP {0} cloning fail with exception {1}
gdmp_x_import_fail_with_exception_y=GDMP {0} import fail with exception {1}
gdmp_x_import_in_gdmp_y=GDMP {0} import in GDMP {1}
gdmp_x_new=GDMP {0} created
gdmp_x_new_fail_with_exception_y=GDMP {0} new fail with exception {1}
gdmp_x_reading_fail_with_exception_y=GDMP {0} reading fail with exception {1}
gdmp_x_removed=GDMP {0} removed
module_binding_x_new=Module binding {0} new
module_binding_x_new_fail_with_exception_y=Module binding {0} new fail with exception {1}
module_binding_x_reading_fail_with_exception_y=Module binding {0} reading fail with exception {1}
module_binding_x_removed=Module binding {0} removed
module_x_new=Module {0} new
module_x_new_fail_with_exception_y=Module {0} new fail with exception {1}
module_x_reading_fail_with_exception_y=Module {0} reading fail with exception {1}
module_x_removed=Module {0} removed
preload_of_resource_x_fail=Preload of resource {0} fail
read_x_attitudes_in_folder_y=Read {0} attitudes in folder {1}
read_x_configurations_in_folder_y=Read {0} configurations in folder {1}
read_x_functions_in_folder_y=Read {0} function(s) in folder {1}
read_x_gdmp_in_folder_y=Read {0} GDMP(s) in folder {1}
read_x_module_bindings_in_folder_y=Read {0} module binding(s) in folder {1}
read_x_modules_in_folder_y=Read {0} module(s) in folder {1}
read_x_repositories_in_folder_y=Read {0} repository(-ies) in folder {1}
read_x_snippets_in_folder_y=Read {0} Snippet(s) in folder {1}
repository_x_new=Repository {0} new
repository_x_new_fail_with_exception_y=Repository {0} new fail with exception {1}
repository_x_reading_fail_with_exception_y=Repository {0} reading fail with exception {1}
repository_x_removed=Repository {0} removed
snippet_x_new=Snippet {0} new
snippet_x_new_fail_with_exception_y=Snippet {0} new fail with exception {1}
snippet_x_reading_fail_with_exception_y=Snippet {0} reading fail with exception {1}
snippet_x_removed=Snippet {0} removed
x_folder_is_the_workspace={0} folder is the workspace
@@ -0,0 +1,66 @@
attitude_restoring_fail_with_exception_x=La restauración de la actitud falló - Excepción {0}
attitude_x_cloned_in_attitude_y=Archivo de actitud {0} clonado en el archivo de actitud {1}
attitude_x_cloning_fail_with_exception_y=El clonado del archivo de actitud {0} falló - Excepción {1}
attitude_x_import_fail_with_exception_y=La importación de la actitud {0} falló - Excepción {1}
attitude_x_import_in_attitude_y=Actitud {0} importada en el archivo de actitud {1}
attitude_x_new=Archivo de actitud {0} creado
attitude_x_new_fail_with_exception_y=La creación del archivo de actitud {0} falló - Excepción {1}
attitude_x_reading_fail_with_exception_y=No se pudo abrir el archivo de actitud {0} - Excepción {1}
attitude_x_recorded=Grabada actitud {0}
attitude_x_recording_fail_with_exception_y=La grabación de la actitud {0} falló - Excepción {1}
attitude_x_removed=Archivo de actitud {0} eliminado
behavior_x_attitude_y_restored=Actitud {1} del comportamiento {1} restaurada
command_can_executed_result=¿{0} puede ser ejecutado? {1}
command_executed={0} ejecutado
configuration_restoring_fail_with_exception_x=La restauración de la configuración falló - Excepción {0}
configuration_x_cloned_in_configuration_y=Archivo de configuración {0} clonado en el archivo de configuración {1}
configuration_x_cloning_fail_with_exception_y=El clonado del archivo de configuración {0} falló - Excepción {1}
configuration_x_import_fail_with_exception_y=La importación de la configuración {0} falló - Excepción {1}
configuration_x_import_in_configuration_y=Configuración {0} importada en el archivo de configuración {1}
configuration_x_new=Archivo de configuración {0} creado
configuration_x_new_fail_with_exception_y=La creación del archivo de configuración {0} falló - Excepción {1}
configuration_x_reading_fail_with_exception_y=No se pudo abrir el archivo de configuración {0} - Excepción {1}
configuration_x_recorded=Grabada configuración {0}
configuration_x_recording_fail_with_exception_y=La grabación de la configuración {0} falló - Excepción {1}
configuration_x_removed=Archivo de configuración {0} eliminado
consensus_model_x_configuration_y_restored=Configuración {1} del modelo de consenso {0} restaurada
folder_x_does_not_exists=El directorio {0} no existe
folder_x_is_not_readable=El directorio {0} no es legible
function_x_new=Función {0} creada
function_x_new_fail_with_exception_y=La creación de la función {0} falló - Excepción {1}
function_x_reading_fail_with_exception_y=No se pudo abrir la función {0} - Excepción {1}
function_x_removed=Función {0} eliminada
gdmp_x_cloned_in_gdmp_y=PTDG {0} clonado en PTDG {1}
gdmp_x_cloning_fail_with_exception_y=El clonado del PTDG {0} falló - Excepción {1}
gdmp_x_import_fail_with_exception_y=La importación del PTDG {0} falló - Excepción {1}
gdmp_x_import_in_gdmp_y=PTDG {0} importado en el PTDG {1}
gdmp_x_new=PTDG {0} creado
gdmp_x_new_fail_with_exception_y=La creación del PTDG {0} falló - Excepción {1}
gdmp_x_reading_fail_with_exception_y=No se pudo abrir el PTDG {0} - Excepción {1}
gdmp_x_removed=PTDG {0} eliminado
module_binding_x_new=Enlace de módulo {0} creado
module_binding_x_new_fail_with_exception_y=La creación del enlace de módulo {0} falló - Excepción {1}
module_binding_x_reading_fail_with_exception_y=No se pudo abrir el enlace de módulo {0} - Excepción {1}
module_binding_x_removed=Enlace de módulo {0} eliminado
module_x_new=Módulo {0} creado
module_x_new_fail_with_exception_y=La creación del módulo {0} falló - Excepción {1}
module_x_reading_fail_with_exception_y=No se pudo abrir el módulo {0} - Excepción {1}
module_x_removed=Módulo {0} eliminado
preload_of_resource_x_fail=La precarga del recurso {0} falló
read_x_attitudes_in_folder_y=Leído(s) {0} archivo(s) de actitud en el directoro {1}
read_x_configurations_in_folder_y=Leído(s) {0} archivo(s) de configuración en el directorio {1}
read_x_functions_in_folder_y=Leída(s) {0} función(-es) en el directorio {1}
read_x_gdmp_in_folder_y=Leído(s) {0} PTDG(s) en el directorio {1}
read_x_module_bindings_in_folder_y=Leído(s) {0} enlace(s) de módulos en el directorio {1}
read_x_modules_in_folder_y=Leído(s) {0} módulo(s) en el directorio {1}
read_x_repositories_in_folder_y=Leído(s) {0} repositorio(s) en el directorio {1}
read_x_snippets_in_folder_y=Leído(s) {0} Snippet(s) en el directorio {1}
repository_x_new=Repositorio {0} creado
repository_x_new_fail_with_exception_y=La creación del repositorio {0} falló - Excepción {1}
repository_x_reading_fail_with_exception_y=No se pudo abrir el repositorio {0} - Excepción {1}
repository_x_removed=Repositorio {0} eliminado
snippet_x_new=Snippet {0} creado
snippet_x_new_fail_with_exception_y=La creación del Snippet {0} falló - Excepción {1}
snippet_x_reading_fail_with_exception_y=No se pudo abrir el Snippet {0} - Excepción {1}
snippet_x_removed=Snippet {0} eliminado
x_folder_is_the_workspace=El directorio {0} es el espacio de trabajo
@@ -0,0 +1,13 @@
package afryca.workspace.preferences;
/**
* Preference constants
*
* @author Sinbad²
* @version 3.0
*/
public interface PreferenceConstants {
public static final String NODEPATH = "afryca.workspace"; //$NON-NLS-1$
public static final String WORKSPACE_FOLDER_KEY = "folder"; //$NON-NLS-1$
public static final String USER_DIR_PATTERN = "@user.dir"; //$NON-NLS-1$
}
@@ -0,0 +1,464 @@
package afryca.workspace.service;
import java.util.List;
import afryca.ase.Function;
import afryca.ase.Module;
import afryca.ase.ModuleBinding;
import afryca.ase.Repository;
import afryca.ase.Snippet;
import afryca.behavior.Attitude;
import afryca.consensusmodel.Configuration;
import afryca.gdmp.GDMP;
import afryca.workspace.Workspace;
/**
* Workspace service interface
*
* @author Sinbad²
* @version 3.0
*/
public interface IWorkspaceService {
/**
* Return workspace
*
* @return Workspace
*/
Workspace getWorkspace();
/**
* Return workspace folder
*
* @return Workspace folder
*/
String getFolder();
/**
* Tests if the application can write in the workspace
*
* @return True if application can write in the workspace. False otherwise
*/
boolean writableWorkspace();
/**
* List workspace problems content
*
* @return Workspace problems content
*/
List<GDMP> listWorkspaceGDMPs();
/**
* List workspace GDMP files
*
* @return Workspace GDMP files names
*/
List<String> listWorkspaceGDMPFiles();
/**
* Remove GDMP
*
* @param gdmp
* GDMP
* @return True if gdmp is removed. False otherwise
*/
boolean removeGDMP(GDMP gdmp);
/**
* Clone GDMP
*
* @param gdmp
* GDMP
* @param file
* New GDMP file name
* @return True if gdmp is cloned. False otherwise
*/
boolean cloneGDMP(GDMP gdmp, String file);
/**
* Import GDMP
*
* @param gdmp
* GDMP
* @param file
* File name
* @return True if gdmp is imported. False otherwise
*/
boolean importGDMP(GDMP gdmp, String file);
/**
* New GDMP
*
* @param gdmp
* GDMP
* @return True if gdmp is created. False otherwise
*/
boolean newGDMP(GDMP gdmp);
/**
* List workspace consensus model configurations
*
* @param id
* Consensus model id
*
* @return List workspace consensus model configurations
*/
List<Configuration> listWorkspaceConfigurations(String id);
/**
* List workspace consensus model configurations files
*
* @return Workspace consensus model configurations files names
*/
List<String> listWorkspaceConfigurationsFiles();
/**
* Check if selected consensus model configuration has changes respect saved
* configuration
*
* @return True if selected consensus model configuration has changes
* respect saved configuration. False otherwise
*/
boolean selectedConfigurationHasChanges();
/**
* Restore selected consensus model configuration
*
* @return True if selected consensus model configuration is restored. False
* otherwise
*/
boolean restoreSelectedConfiguration();
/**
* Check if selected consensus model configuration can be recorded
*
* @return True if consensus model configuration can be recorded. False
* otherwise
*/
boolean selectedConfigurationCanBeRecorded();
/**
* Record consensus model configuration changes
*
* @return True if consensus model configuration changes have been recorded.
* False otherwise
*/
boolean recordSelectedConfigurationChanges();
/**
* Remove consensus model configuration
*
* @param configuration
* Consensus model configuration
* @return True if consensus model configuration is removed. False otherwise
*/
boolean removeConfiguration(Configuration configuration);
/**
* Clone consensus model configuration
*
* @param configuration
* Consensus model configuration
* @param file
* New consensus model configuration file name
* @return True if consensus model configuration is cloned. False otherwise
*/
boolean cloneConfiguration(Configuration configuration, String file);
/**
* Import consensus model configuration
*
* @param configuration
* Consensus model configuration
* @param file
* File name
* @return True if consensus model configuration is imported. False
* otherwise
*/
boolean importConfiguration(Configuration configuration, String file);
/**
* New consensus model configuration
*
* @param configuration
* Consensus model configuration
* @return True if consensus model configuration is created. False otherwise
*/
boolean newConfiguration(Configuration configuration);
/**
* List workspace attitudes
*
* @param id
* Behavior id
*
* @return List workspace attitudes
*/
List<Attitude> listWorkspaceAttitudes(String id);
/**
* List workspace attitudes files
*
* @return Workspace attitudes files names
*/
List<String> listWorkspaceAttitudesFiles();
/**
* Check if selected attitude has changes respect saved attitude
*
* @return True if selected attitude has changes respect saved attitude.
* False otherwise
*/
boolean selectedAttitudeHasChanges();
/**
* Restore selected attitude
*
* @return True if selected attitude is restored. False otherwise
*/
boolean restoreSelectedAttitude();
/**
* Check if selected attitude can be recorded
*
* @return True if attitude can be recorded. False otherwise
*/
boolean selectedAttitudeCanBeRecorded();
/**
* Record attitude changes
*
* @return True if attitude changes have been recorded. False otherwise
*/
boolean recordSelectedAttitudeChanges();
/**
* Remove attitude
*
* @param attitude
* attitude
* @return True if attitude is removed. False otherwise
*/
boolean removeAttitude(Attitude attitude);
/**
* Clone attitude
*
* @param attitude
* attitude
* @param file
* New attitude file name
* @return True if attitude is cloned. False otherwise
*/
boolean cloneAttitude(Attitude attitude, String file);
/**
* Import attitude
*
* @param attitude
* attitude
* @param file
* File name
* @return True if attitude is imported. False otherwise
*/
boolean importAttitude(Attitude attitude, String file);
/**
* New attitude
*
* @param attitude
* attitude
* @return True if attitude is created. False otherwise
*/
boolean newAttitude(Attitude attitude);
/**
* List workspace repositories
*
* @return Workspace repositories
*/
List<Repository> listWorkspaceRepositories();
/**
* List workspace repository files
*
* @return List workspace repository files
*/
List<String> listWorkspaceRepositoryFiles();
/**
* Remove repository
*
* @param repository
* repository
* @return True if repository is removed. False otherwise
*/
boolean removeRepository(Repository repository);
/**
* New repository
*
* @param repository
* repository
* @return True if repository is created. False otherwise
*/
boolean newRepository(Repository repository);
/**
* List workspace snippets
*
* @return Workspace snippets
*/
List<Snippet> listWorkspaceSnippets();
/**
* List workspace snippets
*
* @param repository
* Repository
*
* @return Workspace snippets
*/
List<Snippet> listWorkspaceSnippets(String repository);
/**
* List workspace snippet files
*
* @return List workspace snippet files
*/
List<String> listWorkspaceSnippetFiles();
/**
* Remove snippet
*
* @param snippet
* snippet
* @return True if snippet is removed. False otherwise
*/
boolean removeSnippet(Snippet snippet);
/**
* New snippet
*
* @param snippet
* snippet
* @return True if snippet is created. False otherwise
*/
boolean newSnippet(Snippet snippet);
/**
* List workspace modules
*
* @return Workspace modules
*/
List<Module> listWorkspaceModules();
/**
* List workspace module files
*
* @return List workspace module files
*/
List<String> listWorkspaceModuleFiles();
/**
* Remove module
*
* @param module
* module
* @return True if module is removed. False otherwise
*/
boolean removeModule(Module module);
/**
* New module
*
* @param module
* module
* @return True if module is created. False otherwise
*/
boolean newModule(Module module);
/**
* List workspace functions
*
* @return Workspace functions
*/
List<Function> listWorkspaceFunctions();
/**
* List workspace functions
*
* @param module
* Module
*
* @return Workspace functions
*/
List<Function> listWorkspaceFunctions(String module);
/**
* List workspace function files
*
* @return List workspace function files
*/
List<String> listWorkspaceFunctionFiles();
/**
* Remove function
*
* @param function
* function
* @return True if function is removed. False otherwise
*/
boolean removeFunction(Function function);
/**
* New function
*
* @param function
* function
* @return True if function is created. False otherwise
*/
boolean newFunction(Function function);
/**
* List workspace module bindigns
*
* @return Workspace module bindings
*/
List<ModuleBinding> listWorkspaceModuleBindings();
/**
* List workspace module bindings
*
* @param module
* Module
*
* @return Workspace module bindings
*/
List<ModuleBinding> listWorkspaceModuleBindings(String module);
/**
* List workspace module bindings files
*
* @return List workspace module bindings files
*/
List<String> listWorkspaceModuleBindingsFiles();
/**
* Remove module binding
*
* @param moduleBinding
* Module binding
* @return True if module binding is removed. False otherwise
*/
boolean removeModuleBinding(ModuleBinding moduleBinding);
/**
* New module binding
*
* @param moduleBinding
* module binding
* @return True if module binding is created. False otherwise
*/
boolean newModuleBinding(ModuleBinding moduleBinding);
}
@@ -0,0 +1,26 @@
package afryca.workspace.service.provider;
import org.eclipse.e4.core.contexts.ContextFunction;
import org.eclipse.e4.core.contexts.ContextInjectionFactory;
import org.eclipse.e4.core.contexts.IEclipseContext;
import org.eclipse.e4.ui.model.application.MApplication;
import afryca.workspace.service.IWorkspaceService;
/**
* Workspace service context function
*
* @author Sinbad²
* @version 3.0
*/
public class WorkspaceServiceContextFunction extends ContextFunction {
@Override
public Object compute(IEclipseContext context, String contextKey) {
IWorkspaceService workspaceService = ContextInjectionFactory.make(WorkspaceServiceProvider.class, context);
MApplication application = context.get(MApplication.class);
IEclipseContext applicationContext = application.getContext();
applicationContext.set(IWorkspaceService.class, workspaceService);
return workspaceService;
}
}
@@ -0,0 +1,20 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %Bundle-Name
Bundle-SymbolicName: afryca.workspace;singleton:=true
Bundle-Version: 1.0.0.202101221157
Bundle-Vendor: %Bundle-Vendor
Require-Bundle: afryca.workspace.service.events;visibility:=reexport,afr
yca.ase,afryca.gdmp;visibility:=reexport,afryca.behavior;visibility:=re
export,afryca.consensusmodel;visibility:=reexport,org.eclipse.core.runt
ime,org.eclipse.core.commands,org.eclipse.e4.core.di,org.eclipse.e4.cor
e.di.extensions,org.eclipse.e4.core.services,org.eclipse.e4.core.contex
ts,org.eclipse.e4.core.commands,org.eclipse.e4.ui.workbench,org.eclipse
.e4.ui.model.workbench,org.apache.commons.io
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
Export-Package: afryca.workspace,afryca.workspace.command,afryca.workspa
ce.preferences,afryca.workspace.service
Bundle-ActivationPolicy: lazy
Service-Component: OSGI-INF/workspace_service_context_function.xml
Automatic-Module-Name: afryca.workspace
@@ -0,0 +1,66 @@
attitude_restoring_fail_with_exception_x=Attitude restoring fail with exception {0}
attitude_x_cloned_in_attitude_y=Attitude {0} cloned in attitude {1}
attitude_x_cloning_fail_with_exception_y=Attitude {0} cloning fail with exception {1}
attitude_x_import_fail_with_exception_y=Attitude {0} import fail with exception {1}
attitude_x_import_in_attitude_y=Attitude {0} import in attitude {1}
attitude_x_new=Attitude {0} created
attitude_x_new_fail_with_exception_y=Attitude {0} new fail with exception {1}
attitude_x_reading_fail_with_exception_y=Attitude {0} reading fail with exception {1}
attitude_x_recorded=Attitude {0} recorded
attitude_x_recording_fail_with_exception_y=Attitude {0} recording fail with exception {1}
attitude_x_removed=Attitude {0} removed
behavior_x_attitude_y_restored=Behavior {0} attitude {1} restored
command_can_executed_result={0} can be executed? {1}
command_executed={0} executed
configuration_restoring_fail_with_exception_x=Configuration restoring fail with exception {0}
configuration_x_cloned_in_configuration_y=Configuration {0} cloned in configuration {1}
configuration_x_cloning_fail_with_exception_y=Configuration {0} cloning fail with exception {1}
configuration_x_import_fail_with_exception_y=Configuration {0} import fail with exception {1}
configuration_x_import_in_configuration_y=Configuration {0} import in configuration {1}
configuration_x_new=Configuration {0} created
configuration_x_new_fail_with_exception_y=Configuration {0} new fail with exception {1}
configuration_x_reading_fail_with_exception_y=Configuration {0} reading fail with exception {1}
configuration_x_recorded=Configuration {0} recorded
configuration_x_recording_fail_with_exception_y=Configuration {0} recording fail with exception {1}
configuration_x_removed=Configuration {0} removed
consensus_model_x_configuration_y_restored=Consensus model {0} configuration {1} restored
folder_x_does_not_exists=Folder {0} does not exists
folder_x_is_not_readable=Folder {0} is not readable
function_x_new=Function {0} new
function_x_new_fail_with_exception_y=Function {0} new fail with exception {1}
function_x_reading_fail_with_exception_y=Function {0} reading fail with exception {1}
function_x_removed=Function {0} removed
gdmp_x_cloned_in_gdmp_y=GDMP {0} cloned in GDMP {1}
gdmp_x_cloning_fail_with_exception_y=GDMP {0} cloning fail with exception {1}
gdmp_x_import_fail_with_exception_y=GDMP {0} import fail with exception {1}
gdmp_x_import_in_gdmp_y=GDMP {0} import in GDMP {1}
gdmp_x_new=GDMP {0} created
gdmp_x_new_fail_with_exception_y=GDMP {0} new fail with exception {1}
gdmp_x_reading_fail_with_exception_y=GDMP {0} reading fail with exception {1}
gdmp_x_removed=GDMP {0} removed
module_binding_x_new=Module binding {0} new
module_binding_x_new_fail_with_exception_y=Module binding {0} new fail with exception {1}
module_binding_x_reading_fail_with_exception_y=Module binding {0} reading fail with exception {1}
module_binding_x_removed=Module binding {0} removed
module_x_new=Module {0} new
module_x_new_fail_with_exception_y=Module {0} new fail with exception {1}
module_x_reading_fail_with_exception_y=Module {0} reading fail with exception {1}
module_x_removed=Module {0} removed
preload_of_resource_x_fail=Preload of resource {0} fail
read_x_attitudes_in_folder_y=Read {0} attitudes in folder {1}
read_x_configurations_in_folder_y=Read {0} configurations in folder {1}
read_x_functions_in_folder_y=Read {0} function(s) in folder {1}
read_x_gdmp_in_folder_y=Read {0} GDMP(s) in folder {1}
read_x_module_bindings_in_folder_y=Read {0} module binding(s) in folder {1}
read_x_modules_in_folder_y=Read {0} module(s) in folder {1}
read_x_repositories_in_folder_y=Read {0} repository(-ies) in folder {1}
read_x_snippets_in_folder_y=Read {0} Snippet(s) in folder {1}
repository_x_new=Repository {0} new
repository_x_new_fail_with_exception_y=Repository {0} new fail with exception {1}
repository_x_reading_fail_with_exception_y=Repository {0} reading fail with exception {1}
repository_x_removed=Repository {0} removed
snippet_x_new=Snippet {0} new
snippet_x_new_fail_with_exception_y=Snippet {0} new fail with exception {1}
snippet_x_reading_fail_with_exception_y=Snippet {0} reading fail with exception {1}
snippet_x_removed=Snippet {0} removed
x_folder_is_the_workspace={0} folder is the workspace
@@ -0,0 +1,66 @@
attitude_restoring_fail_with_exception_x=La restauración de la actitud falló - Excepción {0}
attitude_x_cloned_in_attitude_y=Archivo de actitud {0} clonado en el archivo de actitud {1}
attitude_x_cloning_fail_with_exception_y=El clonado del archivo de actitud {0} falló - Excepción {1}
attitude_x_import_fail_with_exception_y=La importación de la actitud {0} falló - Excepción {1}
attitude_x_import_in_attitude_y=Actitud {0} importada en el archivo de actitud {1}
attitude_x_new=Archivo de actitud {0} creado
attitude_x_new_fail_with_exception_y=La creación del archivo de actitud {0} falló - Excepción {1}
attitude_x_reading_fail_with_exception_y=No se pudo abrir el archivo de actitud {0} - Excepción {1}
attitude_x_recorded=Grabada actitud {0}
attitude_x_recording_fail_with_exception_y=La grabación de la actitud {0} falló - Excepción {1}
attitude_x_removed=Archivo de actitud {0} eliminado
behavior_x_attitude_y_restored=Actitud {1} del comportamiento {1} restaurada
command_can_executed_result=¿{0} puede ser ejecutado? {1}
command_executed={0} ejecutado
configuration_restoring_fail_with_exception_x=La restauración de la configuración falló - Excepción {0}
configuration_x_cloned_in_configuration_y=Archivo de configuración {0} clonado en el archivo de configuración {1}
configuration_x_cloning_fail_with_exception_y=El clonado del archivo de configuración {0} falló - Excepción {1}
configuration_x_import_fail_with_exception_y=La importación de la configuración {0} falló - Excepción {1}
configuration_x_import_in_configuration_y=Configuración {0} importada en el archivo de configuración {1}
configuration_x_new=Archivo de configuración {0} creado
configuration_x_new_fail_with_exception_y=La creación del archivo de configuración {0} falló - Excepción {1}
configuration_x_reading_fail_with_exception_y=No se pudo abrir el archivo de configuración {0} - Excepción {1}
configuration_x_recorded=Grabada configuración {0}
configuration_x_recording_fail_with_exception_y=La grabación de la configuración {0} falló - Excepción {1}
configuration_x_removed=Archivo de configuración {0} eliminado
consensus_model_x_configuration_y_restored=Configuración {1} del modelo de consenso {0} restaurada
folder_x_does_not_exists=El directorio {0} no existe
folder_x_is_not_readable=El directorio {0} no es legible
function_x_new=Función {0} creada
function_x_new_fail_with_exception_y=La creación de la función {0} falló - Excepción {1}
function_x_reading_fail_with_exception_y=No se pudo abrir la función {0} - Excepción {1}
function_x_removed=Función {0} eliminada
gdmp_x_cloned_in_gdmp_y=PTDG {0} clonado en PTDG {1}
gdmp_x_cloning_fail_with_exception_y=El clonado del PTDG {0} falló - Excepción {1}
gdmp_x_import_fail_with_exception_y=La importación del PTDG {0} falló - Excepción {1}
gdmp_x_import_in_gdmp_y=PTDG {0} importado en el PTDG {1}
gdmp_x_new=PTDG {0} creado
gdmp_x_new_fail_with_exception_y=La creación del PTDG {0} falló - Excepción {1}
gdmp_x_reading_fail_with_exception_y=No se pudo abrir el PTDG {0} - Excepción {1}
gdmp_x_removed=PTDG {0} eliminado
module_binding_x_new=Enlace de módulo {0} creado
module_binding_x_new_fail_with_exception_y=La creación del enlace de módulo {0} falló - Excepción {1}
module_binding_x_reading_fail_with_exception_y=No se pudo abrir el enlace de módulo {0} - Excepción {1}
module_binding_x_removed=Enlace de módulo {0} eliminado
module_x_new=Módulo {0} creado
module_x_new_fail_with_exception_y=La creación del módulo {0} falló - Excepción {1}
module_x_reading_fail_with_exception_y=No se pudo abrir el módulo {0} - Excepción {1}
module_x_removed=Módulo {0} eliminado
preload_of_resource_x_fail=La precarga del recurso {0} falló
read_x_attitudes_in_folder_y=Leído(s) {0} archivo(s) de actitud en el directoro {1}
read_x_configurations_in_folder_y=Leído(s) {0} archivo(s) de configuración en el directorio {1}
read_x_functions_in_folder_y=Leída(s) {0} función(-es) en el directorio {1}
read_x_gdmp_in_folder_y=Leído(s) {0} PTDG(s) en el directorio {1}
read_x_module_bindings_in_folder_y=Leído(s) {0} enlace(s) de módulos en el directorio {1}
read_x_modules_in_folder_y=Leído(s) {0} módulo(s) en el directorio {1}
read_x_repositories_in_folder_y=Leído(s) {0} repositorio(s) en el directorio {1}
read_x_snippets_in_folder_y=Leído(s) {0} Snippet(s) en el directorio {1}
repository_x_new=Repositorio {0} creado
repository_x_new_fail_with_exception_y=La creación del repositorio {0} falló - Excepción {1}
repository_x_reading_fail_with_exception_y=No se pudo abrir el repositorio {0} - Excepción {1}
repository_x_removed=Repositorio {0} eliminado
snippet_x_new=Snippet {0} creado
snippet_x_new_fail_with_exception_y=La creación del Snippet {0} falló - Excepción {1}
snippet_x_reading_fail_with_exception_y=No se pudo abrir el Snippet {0} - Excepción {1}
snippet_x_removed=Snippet {0} eliminado
x_folder_is_the_workspace=El directorio {0} es el espacio de trabajo
@@ -0,0 +1,4 @@
#Fri Jan 22 13:02:14 CET 2021
artifact.main=C\:\\Users\\\u00C1lvaro\\Workspaces\\afryca_2020\\afryca\\plugins\\afryca.workspace\\target\\afryca.workspace-1.0.0-SNAPSHOT.jar
artifact.attached.p2artifacts=C\:\\Users\\\u00C1lvaro\\Workspaces\\afryca_2020\\afryca\\plugins\\afryca.workspace\\target\\p2artifacts.xml
artifact.attached.p2metadata=C\:\\Users\\\u00C1lvaro\\Workspaces\\afryca_2020\\afryca\\plugins\\afryca.workspace\\target\\p2content.xml
@@ -0,0 +1,3 @@
artifactId=afryca.workspace
groupId=afryca.group
version=1.0.0-SNAPSHOT
@@ -0,0 +1,13 @@
<?xml version='1.0' encoding='UTF-8'?>
<?artifactRepository version='1.1.0'?>
<artifacts size='1'>
<artifact classifier='osgi.bundle' id='afryca.workspace' version='1.0.0.202101221157'>
<properties size='5'>
<property name='artifact.size' value='63306'/>
<property name='download.size' value='63306'/>
<property name='maven-groupId' value='afryca.group'/>
<property name='maven-artifactId' value='afryca.workspace'/>
<property name='maven-version' value='1.0.0-SNAPSHOT'/>
</properties>
</artifact>
</artifacts>
@@ -0,0 +1,66 @@
<?xml version='1.0' encoding='UTF-8'?>
<units size='1'>
<unit id='afryca.workspace' version='1.0.0.202101221157' generation='2'>
<update id='afryca.workspace' range='[0.0.0,1.0.0.202101221157)' severity='0'/>
<properties size='9'>
<property name='es.Bundle-Name' value='Espacio de trabajo'/>
<property name='es.Bundle-Vendor' value='Sinbad²'/>
<property name='df_LT.Bundle-Name' value='Workspace'/>
<property name='df_LT.Bundle-Vendor' value='Sinbad²'/>
<property name='org.eclipse.equinox.p2.name' value='%Bundle-Name'/>
<property name='org.eclipse.equinox.p2.provider' value='%Bundle-Vendor'/>
<property name='maven-groupId' value='afryca.group'/>
<property name='maven-artifactId' value='afryca.workspace'/>
<property name='maven-version' value='1.0.0-SNAPSHOT'/>
</properties>
<provides size='10'>
<provided namespace='org.eclipse.equinox.p2.iu' name='afryca.workspace' version='1.0.0.202101221157'/>
<provided namespace='osgi.bundle' name='afryca.workspace' version='1.0.0.202101221157'/>
<provided namespace='java.package' name='afryca.workspace' version='0.0.0'/>
<provided namespace='java.package' name='afryca.workspace.command' version='0.0.0'/>
<provided namespace='java.package' name='afryca.workspace.preferences' version='0.0.0'/>
<provided namespace='java.package' name='afryca.workspace.service' version='0.0.0'/>
<provided namespace='osgi.identity' name='afryca.workspace' version='1.0.0.202101221157'>
<properties size='1'>
<property name='type' value='osgi.bundle'/>
</properties>
</provided>
<provided namespace='org.eclipse.equinox.p2.eclipse.type' name='bundle' version='1.0.0'/>
<provided namespace='org.eclipse.equinox.p2.localization' name='es' version='1.0.0'/>
<provided namespace='org.eclipse.equinox.p2.localization' name='df_LT' version='1.0.0'/>
</provides>
<requires size='16'>
<required namespace='osgi.bundle' name='afryca.workspace.service.events' range='0.0.0'/>
<required namespace='osgi.bundle' name='afryca.ase' range='0.0.0'/>
<required namespace='osgi.bundle' name='afryca.gdmp' range='0.0.0'/>
<required namespace='osgi.bundle' name='afryca.behavior' range='0.0.0'/>
<required namespace='osgi.bundle' name='afryca.consensusmodel' range='0.0.0'/>
<required namespace='osgi.bundle' name='org.eclipse.core.runtime' range='0.0.0'/>
<required namespace='osgi.bundle' name='org.eclipse.core.commands' range='0.0.0'/>
<required namespace='osgi.bundle' name='org.eclipse.e4.core.di' range='0.0.0'/>
<required namespace='osgi.bundle' name='org.eclipse.e4.core.di.extensions' range='0.0.0'/>
<required namespace='osgi.bundle' name='org.eclipse.e4.core.services' range='0.0.0'/>
<required namespace='osgi.bundle' name='org.eclipse.e4.core.contexts' range='0.0.0'/>
<required namespace='osgi.bundle' name='org.eclipse.e4.core.commands' range='0.0.0'/>
<required namespace='osgi.bundle' name='org.eclipse.e4.ui.workbench' range='0.0.0'/>
<required namespace='osgi.bundle' name='org.eclipse.e4.ui.model.workbench' range='0.0.0'/>
<required namespace='osgi.bundle' name='org.apache.commons.io' range='0.0.0'/>
<requiredProperties namespace='osgi.ee' match='(&amp;(osgi.ee=JavaSE)(version=1.8))'>
<description>
afryca.workspace
</description>
</requiredProperties>
</requires>
<artifacts size='1'>
<artifact classifier='osgi.bundle' id='afryca.workspace' version='1.0.0.202101221157'/>
</artifacts>
<touchpoint id='org.eclipse.equinox.p2.osgi' version='1.0.0'/>
<touchpointData size='1'>
<instructions size='1'>
<instruction key='manifest'>
Bundle-SymbolicName: afryca.workspace;singleton:=true&#xA;Bundle-Version: 1.0.0.202101221157&#xA;
</instruction>
</instructions>
</touchpointData>
</unit>
</units>