Giter VIP home page Giter VIP logo

kissmda's People

Contributors

idueppe avatar korittky avatar lofidewanto avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

kissmda's Issues

Cartridge kissmda-cartridges-simple-java: change adder method with singular name

At the moment we create "adder" method for Collection. We use following method naming convention:

addXxx, where Xxx is the name of the property. So if we have something like:
... companies, the adder method will look like this: addCompanies(Company company)
==> This is not nice.

Correct is something like: addCompany(Company company)
==> addCompany is always singular

Cartridge kissmda-cartridges-simple-java: extend enumeration

We need to extend the enumeration to be able to generate something like this:

public enum QueryArgumentType {
    EQUAL("EQ"), GREATER_THEN("GT"), GREATER_EQUAL("GE"), 
        LOWER_EQUAL("LE"), LOWER_THEN(
            "LT");

    String type;

    private QueryArgumentType(final String type) {
        this.type = type;
    }

    public String getType() {
        return type;
    }
}

Cartridge kissmda-cartridges-simple-java: enumeration generation error: constructor for more than one parameters

If we have two or more properties in enumeration we also should generate a constructor which combines every properties. Example:
...
type: Integer
name: String
...
Constructor:
...
private MyEnum(Integer type, String name) {
this.type = type;
this.name = name;
}
...
Also check these examples:

Create a new Cartridge for SpringFramework 3.x

We need to support SpringFramework 3.x with KissMDA cartridge. For this purpose we need to do following:

  • We should use the UML profile from AndroMDA 3.x (SpringFramework cartridge) or oAW 4.x (Fornax SpringFramework cartridge) to be compatible with one of those frameworks. We should discuss this first.
  • We need an example app which uses the created cartridge. We could use the example app from AndroMDA or oAW, depending on what UML profile we want to use.

Need to select a license.

We still didn't select an open source license for KissMDA.
Is apache 2 still up to date or should we select a different one?

Including the Java 8 Improvements

It would be great to implement the Java 8 Time-API in KissMDA, so that all the classes of this API can be used, without modelling them, over and over again.

It would be also great implement default methodes into the generated interfaces, if an attribute has a default value.

Generate ImportStatements for fullqualified Types

Currently the generated code contains nearly only full qualified types and do not use import statements.

Write an extension that find full qualified types in a compilation unit and generates import statements for them.

Compiler error because of duplicated classes

KissMDA produce in IntelliJ a compiler error in kissmda-cartridge-simple-java because of duplicated classes. The reason is that kissmda-core generates test classes from test-uml.uml in the generated-sources folder instead of generated-test-sources.

The classes are generated by the unit tests. That means on maven site is everything fine. But within IDEs it causes failures.

Error when building multithreaded maven project

If you have multiple modules with kissMDA and you build the maven project with -T option (multi threaded), you will get the following exception sometimes.

[ERROR] Failed to execute goal de.crowdcode.kissmda.maven:kissmda-maven-plugin:2.0.0:generate (default) on project entsorgerportal-abrechnung-domain-model: Execution default of goal de.crowdcode.kissmda.maven:kissmda-maven-plugin:2.0.0:generate failed. NullPointerException -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal de.crowdcode.kissmda.maven:kissmda-maven-plugin:2.0.0:generate (default) on project entsorgerportal-abrechnung-domain-model: Execution default of goal de.crowdcode.kissmda.maven:kissmda-maven-plugin:2.0.0:generate failed.
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:212)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116)
at org.apache.maven.lifecycle.internal.builder.multithreaded.MultiThreadedBuilder$1.call(MultiThreadedBuilder.java:185)
at org.apache.maven.lifecycle.internal.builder.multithreaded.MultiThreadedBuilder$1.call(MultiThreadedBuilder.java:181)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:748)
Caused by: org.apache.maven.plugin.PluginExecutionException: Execution default of goal de.crowdcode.kissmda.maven:kissmda-maven-plugin:2.0.0:generate failed.
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:145)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:207)
... 11 more
Caused by: java.lang.NullPointerException
at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getResource(ResourceSetImpl.java:364)
at org.eclipse.emf.ecore.xmi.impl.XMLHandler.getPackageForURI(XMLHandler.java:2515)
at org.eclipse.emf.ecore.xmi.impl.XMLHandler.getFactoryForPrefix(XMLHandler.java:2422)
at org.eclipse.emf.ecore.xmi.impl.XMLHandler.createObjectByType(XMLHandler.java:1299)
at org.eclipse.emf.ecore.xmi.impl.XMLHandler.createTopObject(XMLHandler.java:1468)
at org.eclipse.emf.ecore.xmi.impl.XMLHandler.processElement(XMLHandler.java:1019)
at org.eclipse.emf.ecore.xmi.impl.XMIHandler.processElement(XMIHandler.java:87)
at org.eclipse.emf.ecore.xmi.impl.XMLHandler.startElement(XMLHandler.java:1001)
at org.eclipse.emf.ecore.xmi.impl.XMLHandler.startElement(XMLHandler.java:712)
at org.eclipse.emf.ecore.xmi.impl.XMIHandler.startElement(XMIHandler.java:169)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(AbstractSAXParser.java:509)
at com.sun.org.apache.xerces.internal.parsers.AbstractXMLDocumentParser.emptyElement(AbstractXMLDocumentParser.java:182)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanStartElement(XMLDocumentFragmentScannerImpl.java:1339)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2784)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:602)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:505)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:841)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:770)
at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:141)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1213)
at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:643)
at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl.parse(SAXParserImpl.java:327)
at org.eclipse.emf.ecore.xmi.impl.XMLLoadImpl.load(XMLLoadImpl.java:181)
at org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl.doLoad(XMLResourceImpl.java:180)
at org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(ResourceImpl.java:1494)
at org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(ResourceImpl.java:1282)
at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLoad(ResourceSetImpl.java:255)
at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLoadHelper(ResourceSetImpl.java:270)
at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getResource(ResourceSetImpl.java:397)
at de.crowdcode.kissmda.core.uml.ReaderWriter.load(ReaderWriter.java:127)
at de.crowdcode.kissmda.core.uml.PackageHelper.getRootPackage(PackageHelper.java:69)
at de.crowdcode.kissmda.cartridges.simplejava.SimpleJavaTransformer.getRootPackage(SimpleJavaTransformer.java:224)
at de.crowdcode.kissmda.cartridges.simplejava.SimpleJavaTransformer.transform(SimpleJavaTransformer.java:116)
at de.crowdcode.kissmda.maven.plugin.KissMdaMojo.useTransformerNamesWithOrder(KissMdaMojo.java:268)
at de.crowdcode.kissmda.maven.plugin.KissMdaMojo.execute(KissMdaMojo.java:183)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)
... 12 more

The elements of the sequence diagram for KissMDA

Hi,
Please I have a question!!
To implement the elements of the sequence diagram for KissMDA,I need to represent the elements as a class and then automatically generate code or manually? how I will represent them? (the elements are LifeLine,Message,Collaboration..)
thank you

Cartridge kissmda-cartridges-simple-java: boolean or Boolean property should be generated with isXxx (instead of getXxx) and setXxx

Generation of Boolean or boolean property should be like this:
isXxx
setXxx

From Java Beans specification:

Boolean properties
In addition, for boolean properties, we allow a getter method to match the pattern:

public boolean is();

This "isPropertyName" method may be provided instead of a "get" method, or it may be provided in addition to a "get" method. In either case, if the is method is present for a boolean property then we will use the "is" method to read the property value. An example boolean property might be:

public boolean isMarsupial(); public void setMarsupial(boolean m);

Cartridge kissmda-cartridges-simple-java: generate a Javadoc for the Java class

We need to add a comment for the generated interfaces, enums and exceptions, something like:

/** 
 * Generated by KissMDA - Simple Java Cartridge - kissmda-cartridges-simple-java.
 * KissMDA: http://kissmda.org
 *  
 * DO NOT EDIT this file manually! All changes will be overwritten by next generation!
 *  
 * Generation date: Fri Oct 18 01:06:40 CEST 2013.
 */

Create an intelligent cartridge extension for "beautifying" the UML model

At the moment the UML model is dumb. The cartridge like simple-java just take the UML content and try to generate something out of it.

We need such a "model-beautifier" or "model-checker" which allows us to make the generation always working. Example:

  1. In UML model you often have an attribute with empty space between two words, something like: "Full Name: String". This should be transformed into "fullName: String".
  2. Empty space at the end of attributes like: "fullName: String". The empty space should be truncated.

After we have a clean and "beautiful" model we can generate everything based on this model.

We should implement this "model-beautifier" as Cartridge Extension.

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.