Exemple #1
0
  /**
   * This can be used to update the resource set's package registry with all needed EPackages.
   *
   * @param resourceSet The resource set which registry has to be updated.
   * @generated
   */
  @Override
  public void registerPackages(ResourceSet resourceSet) {
    super.registerPackages(resourceSet);
    if (!isInWorkspace(org.eclipse.uml2.uml.UMLPackage.class)) {
      resourceSet
          .getPackageRegistry()
          .put(
              org.eclipse.uml2.uml.UMLPackage.eINSTANCE.getNsURI(),
              org.eclipse.uml2.uml.UMLPackage.eINSTANCE);
    }

    /*
     * TODO If you need additional package registrations, you can register them here. The following line
     * (in comment) is an example of the package registration for UML. If you want to change the content
     * of this method, do NOT forget to change the "@generated" tag in the Javadoc of this method to
     * "@generated NOT". Without this new tag, any compilation of the Acceleo module with the main template
     * that has caused the creation of this class will revert your modifications. You can use the method
     * "isInWorkspace(Class c)" to check if the package that you are about to register is in the workspace.
     * To register a package properly, please follow the following conventions:
     *
     * if (!isInWorkspace(UMLPackage.class)) {
     *     // The normal package registration if your metamodel is in a plugin.
     *     resourceSet.getPackageRegistry().put(UMLPackage.eNS_URI, UMLPackage.eINSTANCE);
     * } else {
     *     // The package registration that will be used if the metamodel is not deployed in a plugin.
     *     // This should be used if your metamodel is in your workspace and if you are using binary resource serialization.
     *     resourceSet.getPackageRegistry().put("/myproject/myfolder/mysubfolder/MyUMLMetamodel.ecore", UMLPackage.eINSTANCE);
     * }
     *
     * To learn more about Package Registration, have a look at the Acceleo Launcher documentation (Help -> Help Contents).
     */
  }
Exemple #2
0
 /**
  * This can be used to update the resource set's package registry with all needed EPackages.
  *
  * @param resourceSet The resource set which registry has to be updated.
  * @generated
  */
 @Override
 public void registerPackages(ResourceSet resourceSet) {
   super.registerPackages(resourceSet);
   // TODO If you need additional package registrations, do them here. The following line is an
   // example for UML.
   // resourceSet.getPackageRegistry().put(UMLPackage.eNS_URI, UMLPackage.eINSTANCE);
 }
  /**
   * This can be used to update the resource set's package registry with all needed EPackages.
   *
   * @param resourceSet The resource set which registry has to be updated.
   * @generated
   */
  @Override
  public void registerPackages(ResourceSet resourceSet) {
    super.registerPackages(resourceSet);
    if (!isInWorkspace(org.eclipse.uml2.uml.UMLPackage.class)) {
      resourceSet
          .getPackageRegistry()
          .put(
              org.eclipse.uml2.uml.UMLPackage.eINSTANCE.getNsURI(),
              org.eclipse.uml2.uml.UMLPackage.eINSTANCE);
    }
    if (!isInWorkspace(org.eclipse.emf.ecore.EcorePackage.class)) {
      resourceSet
          .getPackageRegistry()
          .put(
              org.eclipse.emf.ecore.EcorePackage.eINSTANCE.getNsURI(),
              org.eclipse.emf.ecore.EcorePackage.eINSTANCE);
    }

    /*
     * If you want to change the content of this method, do NOT forget to change the "@generated"
     * tag in the Javadoc of this method to "@generated NOT". Without this new tag, any compilation
     * of the Acceleo module with the main template that has caused the creation of this class will
     * revert your modifications.
     */

    /*
     * If you need additional package registrations, you can register them here. The following line
     * (in comment) is an example of the package registration for UML.
     *
     * You can use the method  "isInWorkspace(Class c)" to check if the package that you are about to
     * register is in the workspace.
     *
     * To register a package properly, please follow the following conventions:
     *
     * If the package is located in another plug-in, already installed in Eclipse. The following content should
     * have been generated at the beginning of this method. Do not register the package using this mechanism if
     * the metamodel is located in the workspace.
     *
     * if (!isInWorkspace(UMLPackage.class)) {
     *     // The normal package registration if your metamodel is in a plugin.
     *     resourceSet.getPackageRegistry().put(UMLPackage.eNS_URI, UMLPackage.eINSTANCE);
     * }
     *
     * If the package is located in another project in your workspace, the plugin containing the package has not
     * been register by EMF and Acceleo should register it automatically. If you want to use the generator in
     * stand alone, the regular registration (seen a couple lines before) is needed.
     *
     * To learn more about Package Registration, have a look at the Acceleo documentation (Help -> Help Contents).
     */
  }
 /**
  * This can be used to update the resource set's package registry with all needed EPackages.
  *
  * @param resourceSet The resource set which registry has to be updated.
  * @generated
  */
 @Override
 public void registerPackages(ResourceSet resourceSet) {
   super.registerPackages(resourceSet);
   resourceSet
       .getPackageRegistry()
       .put(
           org.obeonetwork.dsl.entity.EntityPackage.eINSTANCE.getNsURI(),
           org.obeonetwork.dsl.entity.EntityPackage.eINSTANCE);
   resourceSet
       .getPackageRegistry()
       .put(
           org.obeonetwork.dsl.entity.extensionUtilities.ExtensionUtilitiesPackage.eINSTANCE
               .getNsURI(),
           org.obeonetwork.dsl.entity.extensionUtilities.ExtensionUtilitiesPackage.eINSTANCE);
   // TODO If you need additional package registrations, do them here. The following line is an
   // example for UML.
   // resourceSet.getPackageRegistry().put(UMLPackage.eNS_URI, UMLPackage.eINSTANCE);
 }
  /**
   * This can be used to update the resource set's package registry with all needed EPackages.
   *
   * @param resourceSet The resource set which registry has to be updated.
   */
  @Override
  public void registerPackages(ResourceSet resourceSet) {
    super.registerPackages(resourceSet);

    resourceSet.getPackageRegistry().put(ModelPackage.eNS_URI, ModelPackage.eINSTANCE);
  }