TCLethbridge edited this page Aug 29, 2015 · 2 revisions

Each UCOSP participant is asked to log all their accomplishments as well as the difficulties they have getting set up to understand Umple and other experiences they have. Difficulties might include understanding how to model in Umple, using UmpleOnline, code that is difficult to figure out, and development tools that are hard to figure out, or don't seem to work properly. The more log entries added the more we can better get a grip on the usability issues with Umple, and the more we can help future new contributors come up to speed.

Log entries in reverse chronological order

Issues related to me

May 16 2014

  • Created a wiki page to describe the development status of Ecore related work (Link)

May 11 2014

  • Submitted patches for issue 534 (on Google Code) and issue 560 (on Google Code)
  • Created a thread in umple-dev regarding nested type argument in Umple model (Link)
  • Submitted issue 561 (on Google Code) and issue 562 (on Google Code) for nested type problem

May 10 2014

  • Created a thread in umple-dev regarding declaring attributes with primitive wrapper class (Link)

May 9 2014

  • Submitted patches for issue 557 (on Google Code), issue 545 (on Google Code) and issue 546 (on Google Code)
  • Submitted issue 558 (on Google Code) for Ecore importer not handling some valid Ecore models properly

May 8 2014

This is a block update regarding my work for last four weeks. I am working on rewriting Ecore generator into Umple template language but I recognized that the original generator does not generate valid Ecore model by using Ecore editor in Eclipse.

I tried to fix it but the program flow and logic is too hard to maintain. For example, all code is put into one single method. The code styles of different components like attributes, associations and enums are not consistent but model is generated directly into string so that it is much harder to change it and porting more features from Umple to Ecore.

Finally, I decided to rewrite the entire Ecore generator. The technique is first mapping different features in Umple into several basic Ecore objects, and then generating the actual Ecore model from those objects using Umple template language and recursion. New approach increase the readability of source code. It is much easier to add more new features in Ecore generator.


  • Instance class name of a data type is retrieved from depended class and package "java.lang". If Ecore generator cannot find one, its class name will be used. It ensures generated model can be validated as this is a required attribute. If more than 1 class with the same class name is found, only the first one found will be included.

Bugs fixed:

  • Instance class type for data types outside Umple (either using external library or using standard Java classes) will be always added. It is required for every data type and this fix prevents errors in Ecore validator.
  • Bug fixed when implementing multiple interfaces and extend a class at the same time. See also issue 546 (on Google Code).
  • Bug fixed when an interface is not used in Ecore model. See also issue 545 (on Google Code).
  • Bug fixed in generating Umple primitive type Float. Now Float can generate EFloat.
  • Bug fixed in generating Umple primitive type Date since Ecore uses java.util.Date while Umple uses java.sql.Date
  • Bug fixed in generating Umple primitive type Time. Old version of Ecore generator always generate this data type which is not necessary.
  • Bug fixed regarding generated name of multi-valued attributes. Old version converts them to plural form but we should respect the name defined by users instead.

New features and changes:

  • If the attribute of a Ecore object is the same as its default value, no explicit attribute will be generated. For example, default value of lower and upper bound in attributes in Ecore is 0 and 1. If one end of an associate has "0..*" multiplicity, only upper bound will be explicitly generated. This feature helps generate neat and consistent style of code.
  • If role names of association rule are not defined, Ecore generator will use the class name to produce a name. If upper bound is larger than 1, plural form will be generated.
  • Standard and formatted Ecore model will be generated with consistent style and attribute orderings. If there is not child object for an Ecore object, self closing tag is used.
  • Group the definition of primitive types of Umple and Ecore together to provide better overview

Todo list:

  • Support multiple namespace. Theoretically, this feature can be supported by current version very easily but Ecore does not allow multiple package names in the same file. More discussion is needed to decide how should Ecore generator do. See also issue 526 (on Google Code).
  • Support type arguments. In current implementation, Ecore generator consider all Maps object as the same type while the type argument of them may be different. For example, Map<String, String> and Map<Integer, Integer> are different and they can be distinguished. See also issue 534 (on Google Code).
  • Add more Umple features to Ecore model. For example, changeable in Ecore vs immutable in Umple, EKeys in Ecore vs key in Umple.

Problems I faced:

  • Keep receiving random errors while compiling with "ant -Dmyenv=local -f build.umple.xml first-build". I can compile by rerun the command for one or two more time.
  • Umple Online cannot always flush when I try to copy and paste my code. I saw the graph is changed but Umple Online still generate code that has been changed.

May 7 2014

  • Submitted issue 553 (on Google Code) for hardcoding parent attributes in subclasses

May 5 2014

  • Created a thread in umple-dev regarding aspect orientation in constructor (Link)

May 4 2014

  • Created a thread in umple-dev regarding keys for equality in an inheritance relationship (Link)
  • Submitted issue 551 (on Google Code) for using inherited attributes in keys for equality

May 3 2014

  • Submitted issue 550 (on Google Code) for plural form of methods and attribtes not generated for one end of undirected association

Apr 26 2014

  • Created a thread in umple-dev regarding template language generation with indentation (Link)

Apr 4 2014

  • Submitted issue 537 (on Google Code) for syntax error in Java code generated from Umple template code

Apr 3 2014

  • Studying Umple template language

Mar 29 2014

  • Submitted another patch for issue 535 (on Google Code) that removes dependency on Ecore library in cruise.umple

Mar 27 2014

  • Submitted another patch for issue 535 (on Google Code) that moves code to cruise.umple.validator
  • Cannot build at r3805 (on Google Code) while r3797 (on Google Code) is fine

Mar 26 2014

  • Change code according to the suggestions form mentors
  • Cannot build when cruise.umple using classes in cruise.umple.validator

Mar 25 2014

  • Fixed the error in invalid expected result of the test case for Ecore generator
  • Submitted issue 534 (on Google Code) for bug in Ecore Importer regarding generic types
  • Created a thread in umple-dev regarding how to declare map with type parameter in Umple (Link)
  • Submitted issue 535 (on Google Code) for Ecore validator
  • Submitted issue 536 (on Google Code) for new approach of Ecore generator
  • Submitted a patch for issue 535 (on Google Code)

Mar 24 2014

  • Umplify the source code
  • Wrote test cases for Ecore validator
  • Discovered the expected result in Ecore generator test cannot pass the validator

Mar 22 2014

  • Solved the resource problem

Mar 21 2014

  • Unable to load correct bundle with name org.eclipse.emf.ecore.plugin after removing local plugin.properties
Exception in thread "main" java.util.MissingResourceException: The string resource '_UI_DiagnosticRoot_diagnostic' could not be located
	at org.eclipse.emf.common.util.DelegatingResourceLocator.delegatedGetString(DelegatingResourceLocator.java:481)
	at org.eclipse.emf.common.util.DelegatingResourceLocator.getString(DelegatingResourceLocator.java:385)
	at org.eclipse.emf.common.util.DelegatingResourceLocator.getString(DelegatingResourceLocator.java:500)
	at org.eclipse.emf.common.util.DelegatingResourceLocator.getString(DelegatingResourceLocator.java:492)
	at org.eclipse.emf.ecore.util.Diagnostician.createDefaultDiagnostic(Diagnostician.java:88)
	at org.eclipse.emf.ecore.util.Diagnostician.validate(Diagnostician.java:107)

  • Created a thread in umple-dev regarding the problem (Link)

Mar 17 2014

  • Able to generate the same error message as Eclipse Ecore editor
  • plugin.properties has to be added for error message mapping. See if it can be omitted

Mar 14 2014

  • Stuck in errors about EMF Resource which is not initialized well if directly calling internal methods
  • org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getResource(URI uri, boolean loadOnDemand) could be a key method

Mar 13 2014

  • Found how the plugin validate EPackage model before generating codes
for (GenPackage genPackage : getAllGenPackages()) {
	EPackage ePackage = genPackage.getEcorePackage();
	if (ePackage != null) {
		Diagnostician diagnostician = new Diagnostician(EValidator.Registry.INSTANCE) {
			public String getObjectLabel(EObject object) {
				return EcoreUtil.getURI(object).toString();
		Diagnostic diagnostic = diagnostician.validate(ePackage);
		if (diagnostic.getSeverity() == Diagnostic.ERROR) {
		} else if (diagnostic.getSeverity() == Diagnostic.WARNING) {
			// If there are any warnings other than raw type
			// warnings, include all the warnings.
			for (Diagnostic child : diagnostic.getChildren()) {
				if (!EcoreValidator.DIAGNOSTIC_SOURCE.equals(child.getSource())
					|| child.getCode() != EcoreValidator.CONSISTENT_ARGUMENTS_NONE) {
  • org.eclipse.emf.importer.ModelImporterApplication.execute(Monitor) is another possible starting point
  • In order to complete the data flow, change the target to find how plugin converting *.ecore to EPackage

Mar 12 2014

  • Started searching for start point of validator for Ecore editor
  • org.eclipse.emf.importer.ecore.EcoreImporterApplication is probably the start point
  • Tried to run with arguments according to provided usage but got error
org.eclipse.core.runtime.CoreException: Error
	at org.eclipse.emf.importer.ModelImporterApplication.run(ModelImporterApplication.java:119)
	at a.EcoreToUmpleImporter.main(EcoreToUmpleImporter.java:10)
Caused by: java.lang.RuntimeException: Cannot create a resource for 'My.ecore'; a registered resource factory is needed
	at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getResource(ResourceSetImpl.java:403)
	at org.eclipse.emf.importer.ecore.EcoreImporter.doComputeEPackages(EcoreImporter.java:64)
	at org.eclipse.emf.importer.ModelImporter.computeEPackages(ModelImporter.java:522)
	at org.eclipse.emf.importer.ModelImporterApplication.computeEPackages(ModelImporterApplication.java:454)
	at org.eclipse.emf.importer.ModelImporterApplication.execute(ModelImporterApplication.java:203)
	at org.eclipse.emf.importer.ModelImporterApplication.run(ModelImporterApplication.java:166)
	at org.eclipse.emf.importer.ModelImporterApplication.run(ModelImporterApplication.java:150)
	at org.eclipse.emf.importer.ModelImporterApplication.run(ModelImporterApplication.java:115)
	... 1 more

Mar 11 2014

  • Downloaded EMF All-In-One SDK
  • Converted plugin Jars to Java source code

Mar 2 2014

  • Fixed issue 521 (on Google Code)
  • Submitted issue 526 (on Google Code) for Ecore generator not supporting multiple namespaces

Issue of MultipleGenerateDirectiveTests.java

  • Discovered test cases testConstraintJavaRubyPhp() and testConstraintPhpJavaRuby() are missed in QA test
  • Can be resolved by renaming to MultipleGenerateDirectiveTest.java
  • Created a thread in umple-dev regarding the issue (Link)
  • Submitted and Fixed issue 525 (on Google Code)

Latest patch for issue 501 (on Google Code) does not updated

  • Created a thread in umple-dev regarding the issue (Link)

Issue of Ecore generator generating from umple code with multiple namespace

  • Discovered when updating the test cases for issue 521 (on Google Code)
  • Only 1 package is generated while more namespaces are in the umple code
  • Submitted issue 526 (on Google Code)

Mar 1 2014

Issue of ECoreImporter

  • Used other editors and found that some editors can validate the examples | Editor | Validity | Is the package parsed? | |:-----------|:-------------|:---------------------------| | Sample ECore Model Editor (Default) | Invalid | Yes | | EMF Facet Model Browser | No validation | Yes | | Generic EMF Form Editor | Invalid | Yes | | OCLinEcore (Ecore) Editor | Valid (converted to OCL) | Yes | | Sample Reflective Ecore Model Editor | Invalid | Yes |

  • It is hard to say if Umple should parse the examples as normal Ecore model

  • Even the answer is yes, the original code should be changed for parsing the package correctly

  • Created a thread in umple-dev regarding the issue (Link)

Feb 27 2014

  • Submitted issue 521 (on Google Code)
  • Tried to search if there is any validator for Ecore but cannot find any
  • Ecore Editor Plugin should have an internal validator and will try to find if it can be used

Feb 26 2014

  • Used an editor for Ecore (Sample Ecore Model Editor) and discovered that the ECore examples in mentioned test cases are not correct in ECore systax | Description | Resource | Path | Location | Type | |:----------------|:-------------|:---------|:-------------|:---------| |The namespace URI 'null' is not well formed|ECoreImport_largeScale_ACME.ecore|/cruise.umple/test/cruise/umple/compiler|Unknown |EMF Problem| |The namespace prefix 'null' is not well formed|ECoreImport_largeScale_ACME.ecore|/cruise.umple/test/cruise/umple/compiler|Unknown |EMF Problem| |The namespace URI 'null' is not well formed|ECoreImport_largeScale_ACME.ecore|/cruise.umple/test/cruise/umple/compiler|Unknown |EMF Problem| |The instance type name 'null' is not well formed|ECoreImport_largeScale_ACME.ecore|/cruise.umple/test/cruise/umple/compiler|Unknown |EMF Problem| |The namespace prefix 'null' is not well formed|ECoreImport_largeScale_ACME.ecore|/cruise.umple/test/cruise/umple/compiler|Unknown |EMF Problem| |The instance type name 'null' is not well formed|ECoreImport_largeScale_ACME.ecore|/cruise.umple/test/cruise/umple/compiler|Unknown |EMF Problem| |The instance type name 'null' is not well formed|ECoreImport_largeScale_ACME.ecore|/cruise.umple/test/cruise/umple/compiler|Unknown |EMF Problem|

  • ECoreImport_largeScale_ACME.ecore and ECoreImport_largeScale_ACG.ecore are different from other test cases. For example:

in /cruise.umple/test/cruise/umple/compiler/ECoreImport_largeScale_ACME.ecore

<ecore:EPackage name="PrimitiveTypes">
<eClassifiers xsi:type="ecore:EDataType" name="Boolean"/>

Unknown end tag for &lt;/ecore&gt;

in /cruise.umple/test/cruise/umple/compiler/ECoreImport_ClassWithNamespace.ecore

<ecore:EPackage xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" name="base" nsURI="cruise.example.base" nsPrefix="base">
<eClassifiers xsi:type="ecore:EDataType" name="Time" instanceClassName="java.sql.Time"/>

Unknown end tag for &lt;/ecore&gt;

Feb 25 2014

  • Timothy gave advices and the status of Ecore importer
  • Looked at codes in UmpleImport*.ump
  • Looked at test cases for ECoreImporter and found generated Umple file misses the packages in ECoreImport_largeScale_ACME.ecore and ECoreImport_largeScale_ACG.ecore
  • Fixed the problem but not sure why these 2 test cases has this careless mistake

Feb 24 2014

  • Installed editors and diagram generators for Ecore and Papyrus
  • Understood the syntax of Ecore briefly

Feb 23 2014

  • Looked at issue 420 (on Google Code) and emailed mentors for more details

Jan 30 2014

  • Successfully built in command line but Failed 3 out of 3339 cases in JUnit
  • Solved by revert some code modified by Eclipse when building

Jan 29 2014

  • Followed instructions on Wiki but cannot build in command line. It is because Ant target "pre_build" does not create required directories
  • Sent emails to mentors for the issue
  • Timothy changed the content in DevelopmentSetUp so that new command is suggested for initial compilation

Jan 28 2014

  • Had initial Hangouts with Timothy Lethbtridge and Miguel Garzon
  • Tried to use SVN plugin in Eclipse

Jan 27 2014

Jan 6 2014

Andrew Forward created this initial entry for CHAN

Clone this wiki locally
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.