Commit e2e4a644 authored by Dominique Marcadet's avatar Dominique Marcadet

Merge branch '15-models-loaders-should-be-with-their-metamodels' into 'master'

Resolve "Models loaders should be with their metamodels"

Closes #15

See merge request !14
parents 7520dac4 b24069a2
Pipeline #7561 passed with stages
in 29 seconds
......@@ -16,8 +16,8 @@
# http://wdi.supelec.fr/software/RiseClipse/
#
pluginName = NSD Model Edit Support
providerName = www.example.org
pluginName = RiseClipse IEC 61850 NSD Edit Support
providerName = CentraleSuplec & EDF
_UI_CreateChild_text = {0}
_UI_CreateChild_text2 = {1} {0}
......
<?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>
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>fr.centralesupelec.edf.riseclipse.iec61850.nsd.utilities</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.pde.ManifestBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.pde.SchemaBuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.pde.PluginNature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
</natures>
</projectDescription>
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
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-Vendor: %providerName
Bundle-SymbolicName: fr.centralesupelec.edf.riseclipse.iec61850.nsd.utilities
Bundle-Version: 1.0.0.qualifier
Automatic-Module-Name: fr.centralesupelec.edf.riseclipse.iec61850.nsd.utilities
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
Require-Bundle: org.eclipse.emf.common,
org.eclipse.emf.ecore,
org.eclipse.emf.edit,
fr.centralesupelec.edf.riseclipse.iec61850.nsd,
fr.centralesupelec.edf.riseclipse.iec61850.nsd.edit,
fr.centralesupelec.edf.riseclipse.main
Export-Package: fr.centralesupelec.edf.riseclipse.iec61850.nsd.utilities
source.. = src/
output.. = bin/
bin.includes = META-INF/,\
.
# Copyright (c) 2019 CentraleSuplec & EDF.
# All rights reserved. This program and the accompanying materials
# are made available under the terms of the Eclipse Public License v1.0
# which accompanies this distribution, and is available at
# http://www.eclipse.org/legal/epl-v10.html
#
# This file is part of the RiseClipse tool
#
# Contributors:
# Computer Science Department, CentraleSuplec
# EDF R&D
# Contacts:
# dominique.marcadet@centralesupelec.fr
# aurelie.dehouck-neveu@edf.fr
# Web site:
# http://wdi.supelec.fr/software/RiseClipse/
#
pluginName = RiseClipse IEC 61850 NSD Utilities
providerName = CentraleSuplec & EDF
<?xml version="1.0" encoding="UTF-8" standalone="no"?><project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>fr.centralesupelec.edf.riseclipse</groupId>
<artifactId>fr.centralesupelec.edf.riseclipse.iec61850.nsd.utilities</artifactId>
<version>1.0.0-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>
<parent>
<groupId>fr.centralesupelec.edf.riseclipse</groupId>
<artifactId>RiseClipseMetamodel_NSD2016</artifactId>
<version>1.0.0-SNAPSHOT</version>
</parent>
<build>
<plugins>
<plugin>
<groupId>org.eclipse.tycho</groupId>
<artifactId>target-platform-configuration</artifactId>
<version>${tycho-version}</version>
<configuration>
<!-- This needed parameter seems to be ignored if put in the pom root file -->
<pomDependencies>consider</pomDependencies>
</configuration>
</plugin>
</plugins>
</build>
</project>
/**
* Copyright (c) 2019 CentraleSupélec & EDF.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* This file is part of the RiseClipse tool
*
* Contributors:
* Computer Science Department, CentraleSupélec
* EDF R&D
* Contacts:
* dominique.marcadet@centralesupelec.fr
* aurelie.dehouck-neveu@edf.fr
* Web site:
* http://wdi.supelec.fr/software/RiseClipse/
*/
package fr.centralesupelec.edf.riseclipse.iec61850.nsd.utilities;
import org.eclipse.emf.ecore.EValidator;
import org.eclipse.emf.ecore.resource.Resource;
import fr.centralesupelec.edf.riseclipse.iec61850.nsd.NsdPackage;
import fr.centralesupelec.edf.riseclipse.iec61850.nsd.util.NsdResourceFactoryImpl;
import fr.centralesupelec.edf.riseclipse.iec61850.nsd.util.NsdResourceSetImpl;
import fr.centralesupelec.edf.riseclipse.util.IRiseClipseConsole;
import fr.centralesupelec.edf.riseclipse.util.RiseClipseModelLoader;
public class NsdModelLoader extends RiseClipseModelLoader {
public NsdModelLoader( IRiseClipseConsole console ) {
super( console );
}
@Override
public void reset() {
super.reset( new NsdResourceSetImpl( true, console ) );
// Register the appropriate resource factory to handle all file
// extensions.
getResourceSet().getResourceFactoryRegistry().getExtensionToFactoryMap()
.put( Resource.Factory.Registry.DEFAULT_EXTENSION, new NsdResourceFactoryImpl() );
// Register the package to ensure it is available during loading.
getResourceSet().getPackageRegistry().put( NsdPackage.eNS_URI, NsdPackage.eINSTANCE );
}
@Override
public NsdResourceSetImpl getResourceSet() {
return ( NsdResourceSetImpl ) super.getResourceSet();
}
public Resource loadWithoutValidation( String name ) {
Object eValidator = EValidator.Registry.INSTANCE.remove( NsdPackage.eINSTANCE );
Resource resource = load( name );
if( eValidator != null ) {
EValidator.Registry.INSTANCE.put( NsdPackage.eINSTANCE, eValidator );
}
return resource;
}
}
......@@ -16,5 +16,5 @@
# http://wdi.supelec.fr/software/RiseClipse/
#
pluginName = NSD Model
providerName = www.example.org
pluginName = RiseClipse IEC 61850 NSD Metamodel
providerName = CentraleSuplec & EDF
......@@ -23,6 +23,7 @@
<modules>
<module>fr.centralesupelec.edf.riseclipse.iec61850.nsd</module>
<module>fr.centralesupelec.edf.riseclipse.iec61850.nsd.edit</module>
<module>fr.centralesupelec.edf.riseclipse.iec61850.nsd.utilities</module>
</modules>
</project>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment