UCOSPLunaLu

Kevin Brightwell edited this page Aug 26, 2015 · 1 revision
Clone this wiki locally

Each UCOSP participant is asked to log all the difficulties they have getting set up to understand Umple. This includes 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

March 19:

Finishing 142 patch. Start working on OCL constraints. More detailed design is in Wiki Page for OCL Constraints in Umple. And here is a good ocl notes for reference: OCL Notes.

Feb 29:

Fixing my JUnit, uninstall my 32-bit eclipse and use a 64-bit version. But ant still claim that they use a 32-bit JUnit even though I unintall all 32-bit JVM.

After modifying the delete_oneFromMany.jet. The generator file is not updated when building.

Feb 20:

Come back from reading break. Svn updating and summarize my work so far as a warm up.

Still has the php errors. Need to finish the patch for issue 142 (on Google Code).

The php erros occurs in these codes:

workspace2\testbed_php\test\tracer\StringTracerTest.php

<?php

class StringTracerTest extends UnitTestCase
{

  public function setUp()
  {
    StringTracer::getInstance()->reset();
  }

  public function test_traceStrings()
  {
    $tracer = StringTracer::getInstance();
    $person = new PersonA();
    $this->assertEqual(0,$tracer->numberOfTraces());
    $person->setName("aha");
    $this->assertEqual(1,$tracer->numberOfTraces());
    $this->assertEqual("name=aha",$tracer->getTrace(0));
  }

}

And \testbed_php\src-gen-umple\PersonA.php

<?php
/*PLEASE DO NOT EDIT THIS CODE*/
/*This code was generated using the UMPLE 1.15.0.963 modeling language!*/

class PersonA
{

  //------------------------
  // MEMBER VARIABLES
  //------------------------

  //PersonA Attributes
  private $name;

  //------------------------
  // CONSTRUCTOR
  //------------------------

  public function __construct($aName)
  {
    $this->name = $aName;
  }
}

Feb 9:

I create a new copy of workspace based on svn version 1445. After settiing up the environment, including the new jopt-simple project, the build is successful.

But I still get errors in php tests.

Fail: tracer/StringTracerTest.php -> StringTracerTest -> test_traceStrings -> Equal expectation fails because [Integer: 1] differs from [Integer: 0] by 1 at [D:\program\eclipse indigo\workspace2\testbed_php\test\tracer\StringTracerTest.php line 17]

Fail: tracer/StringTracerTest.php -> StringTracerTest -> test_traceStrings -> Equal expectation fails at character 0 with [name=aha] and .md at [D:\program\eclipse indigo\workspace2\testbed_php\test\tracer\StringTracerTest.php line 18]

Exception: tracer/StringTracerTest.php -> StringTracerTest -> test_traceStrings -> Unexpected PHP error argument 1 for PersonA::__construct(), called in D:\program\eclipse indigo\workspace2\testbed_php\test\tracer\StringTracerTest.php on line 14 and defined severity E_WARNING in [D:\program\eclipse indigo\workspace2\testbed_php\src-gen-umple\PersonA.php line 19]

49/49 test cases complete: 1755 passes, 2 fails and 1 exceptions.

I apply the patch I created before, it works on my local workspace. The php test errors are still there, but java and ruby is fine.

Feb 7:

Trying to figure out why having the testbed_php errors.

The result is:

Fail: tracer/StringTracerTest.php -> StringTracerTest -> test_traceStrings -> Equal expectation fails because [Integer: 1] differs from [Integer: 0] by 1 at [D:\program\eclipse indigo\workspace\testbed_php\test\tracer\StringTracerTest.php line 17] Fail: tracer/StringTracerTest.php -> StringTracerTest -> test_traceStrings -> Equal expectation fails at character 0 with [name=aha] and .md at [D:\program\eclipse indigo\workspace\testbed_php\test\tracer\StringTracerTest.php line 18] Exception: tracer/StringTracerTest.php -> StringTracerTest -> test_traceStrings -> Unexpected PHP error argument 1 for PersonA::__construct(), called in D:\program\eclipse indigo\workspace\testbed_php\test\tracer\StringTracerTest.php on line 14 and defined severity E_WARNING in [D:\program\eclipse indigo\workspace\testbed_php\src-gen-umple\PersonA.php line 19] 49/49 test cases complete: 1746 passes, 2 fails and 1 exceptions.

Feb 2:

Ruby part is done. But the code for Ruby and PHP is ugly and not dependent on the PHPGenrator/Ruby Generator now. Need to modify the generator.

Besides, I get some exceptions and failures in PHP testbed due to the updation of PersonA.

Jan 26:

Working on issue 142 (on Google Code), looking into file PhpClassGenerator.java. The desired php delete function should be like:

public function delete() 
{
  placeholderClassA = $this->classA
  $this->classA = null
  placeholderClassA->removeClassB($this); 
}

But now it is

public function delete()  
{    
  $this->classA->removeClassB($this); 
}

It is related to line 6104, with in the block

else if (av.isOne() && relatedAssociation.isMany())
{
}

After modifying it, the delete function works and pass the test.

Jan 24:

Working on issue 142 (on Google Code), it seems that Java code works fine but PHP and Ruby codes have errors.

The reason is that, before calling the One End (A) to delete the Many End (B), it will check if B is associated with A. If not, it will delete the association. So before calling, B has to make the One End to be null in its memory.

Jan 22:

Working on issue 187 (on Google Code), trying to learn more about OCL and figure out which feature should be added into Umple first.

Wiki Page for OCL Constraints in Umple

Jan 20:

Notes:

To use ant, first go to Download page to download the jar file for contributors and put it into the ant/lib folder.

Try running the ant, it fails because it cannot run 'php'. After adding php's path into the system path. It can pass the php tests.

After that, it stops because it cannot run 'rake'. I download the third-party installer RubyInstaller for Windows. It install the ruby automatically. To show the installation is finished, go to cmd and try the command:

ruby --version
rake --version

After that, run the ant script

ant -Dmyenv=wlocal

wlocal is for windows, which raplace the "rake" by "rake.bat".

To make sure the ruby tests really works without rerunning the whole build, try the script:

ant -Dmyenv=wlocal -f build.testbed.xml testRuby

Script to rebuild the project:

ant -Dmyenv=wlocal -f build.umple.xml compile umpleSelf compile

Even though I can build with ant and pass all the tests. There are still errors in Eclipse.

Most errors go with the .ump file. So I delete the cruise.umple.xtext.ui_1.15.0.963.jar. Instead, I use cruise.umple.eclipse_1.15.0.963.jar. After the changing, there are only 48 errors with My.ecore and Master.ecore.

To solve the 2000+ error or 48 error problems. Here are some methods that I use.

  1. Try use the cruise.umple.eclipse_1.15.0.963.jar instead of the xtext one.

  2. Found by Sonya, that you can right click your project, choose properties, and remove the xtext feature.

  3. Get a clean start. Delete the project on both Eclipse and your local disk. Trying to recover the whole folder from svn update. Create the java project again. Configure the buld path, adding 4 jars and 1 project. Clean and Build.

After doing that, I get no errors. And before running anything, run the ant script first.

But the only one problem for me is that when running JUnit, it will show no results.

Jan 17:

So far I am trying to set up the env on Windows 7. Two questions:

  1. After clean&build, everything is fine without errors. When trying running JUnit in Eclipse, it will throw 2000+ erros. It seems that all the java files are fine. But most .ump files have errors. Most errors are unresolved something. I found some similar descriptions from other team member's log page, but no practical methods for my situation.

  2. After running the ant script, I found that no tests are there. I think maybe there is something run with compiling the .ump file.

Jan 14:

I am trying setting up the environment according to the instructions given by Miguel. Everything is fine with installing Eclipse and two plug-ins. But for the dev env set up, according to this page http://code.google.com/p/umple/wiki/DevelopmentSetUp, I still get more than 2000 errors. And, I didn't find the correct order of Export&Order tab. Even though I did not touch the order, I am still wondering if the problem was there.

Jan 12:

This is a test