Giter Site home page Giter Site logo

echebbi / etos Goto Github PK

View Code? Open in Web Editor NEW
1.0 2.0 0.0 110 KB

Generate Scala code from ECore models with Acceleo

License: Apache License 2.0

Java 100.00%
scala acceleo model-driven-engineering mdd eclipse-plugin eclipse-rcp ecore emf m2t model-to-text

etos's Introduction

ETOS

ETOS, for Ecore TO Scala, is an Acceleo project that generates Scala code from an Ecore model. More specifically, it relies on the .genmodel file.

Current features

ETOS is currently able to generate:

  • classes,
  • traits,
  • fields,
  • methods.

It also handles inheritance and ScalaDoc.

Not stable!

Since the work is still in progress, the project will change in the near future.

Use

Once etos has been installed into Eclipse IDE (see below), merely right-click on the .genmodel file, select the Acceleo Model to Text menu item, then Generate Ecore to Scala.

The generated Scala files should be in the src-gen folder.

Installation

As of now, no update site is available to download etos directly from Eclipse IDE. However, thanks to Maven, you can easily build your one.

Prerequisite

Maven 3 must be available in the system. It can be download from maven.apache.org.

Generate an update site

First, clone this repository:

git clone https://github.com/KazeJiyu/etos

Then launch Maven:

mvn install

etos' update site should have been generated in releng/fr.kazejiyu.etos.pim.ecore.gen.scala.updatesite/target/repository.

Install etos into Eclipse IDE

From Eclipse IDE, go to Help > Install New Software....

Click Add... > Local.

Select /path/to/etos/releng/fr.kazejiyu.etos.pim.ecore.gen.scala.updatesite/target/repository.

Check the runtime and IDE features, then click to Finish.

etos's People

Contributors

echebbi avatar kazejiyu avatar

Stargazers

 avatar

Watchers

 avatar  avatar

etos's Issues

etos should generate imports

At the moment, etos does not generate the imports alongside a class / trait definition.

This is annoying, in particular when generating multiple packages with references from one to another.

The imports should be easily findable by checking :

  • attributes' type,
  • references' type,
  • operations' return type,
  • operations' attributes' return type.

Unable to build target in updatesite using `mvn install`

I am trying to create the update site as instructed in Readme file. However, on my Mac OSX, I get an error at the end and the target is not build.

[DEBUG] No solution found because the problem is unsatisfiable.: [Unable to satisfy dependency from org.eclipse.e4.rcp.feature.group 1.6.1.v20170928-1359 to org.eclipse.equinox.p2.iu; org.eclipse.equinox.launcher.gtk.linux.x86 [1.1.550.v20170928-1359,1.1.550.v20170928-1359].; Unable to satisfy dependency from org.eclipse.e4.rcp.feature.group 1.6.1.v20170928-1359 to org.eclipse.equinox.p2.iu; org.eclipse.swt.gtk.linux.x86 [3.106.1.v20170926-0519,3.106.1.v20170926-0519].; Unable to satisfy dependency from org.eclipse.e4.rcp.source.feature.group 1.6.1.v20170928-1359 to org.eclipse.equinox.p2.iu; org.eclipse.swt.gtk.linux.x86.source [3.106.1.v20170926-0519,3.106.1.v20170926-0519].; Unable to satisfy dependency from org.eclipse.jdt.core 3.13.100.v_OTDT_r261_201712031505 to org.eclipse.equinox.p2.iu; org.eclipse.objectteams.otdt.core.patch.feature.group [2.0.0,3.0.0).; Unable to satisfy dependency from org.eclipse.jdt.core 3.13.101.v_OTDT_r262_201803031341 to org.eclipse.equinox.p2.iu; org.eclipse.objectteams.otdt.core.patch.feature.group [2.0.0,3.0.0).; Unable to satisfy dependency from org.eclipse.jdt.core 3.13.102.v_OTDT_r262_201804012017 to org.eclipse.equinox.p2.iu; org.eclipse.objectteams.otdt.core.patch.feature.group [2.0.0,3.0.0).; Unable to satisfy dependency from org.eclipse.swt 3.106.1.v20170926-0519 to org.eclipse.equinox.p2.iu; org.eclipse.swt.gtk.linux.x86 [3.106.1.v20170926-0519,3.106.1.v20170926-0519].; No solution found because the problem is unsatisfiable.]
[ERROR] Cannot resolve target definition:
[ERROR]   Software being installed: org.eclipse.sdk.feature.group 4.7.1.v20171009-0537
[ERROR]   Missing requirement for filter properties ~= $0: org.eclipse.e4.rcp.feature.group 1.6.1.v20170928-1359 requires 'org.eclipse.equinox.p2.iu; org.eclipse.equinox.launcher.gtk.linux.x86 [1.1.550.v20170928-1359,1.1.550.v20170928-1359]' but it could not be found
[ERROR]   Cannot satisfy dependency: org.eclipse.platform.feature.group 4.7.1.v20171009-0410 depends on: org.eclipse.equinox.p2.iu; org.eclipse.rcp.feature.group [4.7.1.v20171009-0410,4.7.1.v20171009-0410]
[ERROR]   Cannot satisfy dependency: org.eclipse.rcp.feature.group 4.7.1.v20171009-0410 depends on: org.eclipse.equinox.p2.iu; org.eclipse.e4.rcp.feature.group [1.6.1.v20170928-1359,1.6.1.v20170928-1359]
[ERROR]   Cannot satisfy dependency: org.eclipse.sdk.feature.group 4.7.1.v20171009-0537 depends on: org.eclipse.equinox.p2.iu; org.eclipse.platform.feature.group [4.7.1.v20171009-0410,4.7.1.v20171009-0410]
[ERROR]
[ERROR] Failed to resolve target definition /Users/in-puneet.patwari/Documents/Workspace/TMT/etos/releng/fr.kazejiyu.etos.pim.ecore.gen.scala.target/fr.kazejiyu.etos.pim.ecore.gen.scala.target.target: See log for details -> [Help 1]
org.apache.maven.MavenExecutionException: Failed to resolve target definition /Users/in-puneet.patwari/Documents/Workspace/TMT/etos/releng/fr.kazejiyu.etos.pim.ecore.gen.scala.target/fr.kazejiyu.etos.pim.ecore.gen.scala.target.target
    at org.eclipse.tycho.core.maven.TychoMavenLifecycleParticipant.afterProjectsRead (TychoMavenLifecycleParticipant.java:100)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:264)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
    at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
    at org.apache.maven.cli.MavenCli.execute (MavenCli.java:956)
    at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:288)
    at org.apache.maven.cli.MavenCli.main (MavenCli.java:192)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
    at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke (Method.java:566)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:282)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225)
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347)
Caused by: org.eclipse.tycho.core.shared.BuildFailureException: Failed to resolve target definition /Users/in-puneet.patwari/Documents/Workspace/TMT/etos/releng/fr.kazejiyu.etos.pim.ecore.gen.scala.target/fr.kazejiyu.etos.pim.ecore.gen.scala.target.target
    at org.eclipse.tycho.p2.target.TargetDefinitionResolver.resolveContent (TargetDefinitionResolver.java:103)
    at org.eclipse.tycho.p2.target.TargetDefinitionResolverService.resolveFromArguments (TargetDefinitionResolverService.java:70)

Please let me know if I am doing any mistake.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.