UCOSPLogStuartErskine

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

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

DEC 10

I haven't posted a log message in a while. It was the final crunch towards my presentation. The last patch passed the full build and hopefully it will suffice as I don't have much to add at this point. As this will likely be my last entry for the course, I figure I would give a bit of advice for the next UCOSP students. Hopefully they will learn from my mistakes. God knows I've made enough of them.

OK a few generic peices of advice. These might seem like no brainers but I'll post them anyways.

  • Backup everything. Murphy's law states if anything bad can happen it will. In my case that meant a complete hard-drive failure after the sprint. Setting up the environment is a pain. So once it's finally done, ensure you don't have to do so again.
  • They suggest 10 hours/week working on the project. Where I was working full time, this was extremly difficult for me. Make sure you're not stretched to thin.
  • Ensure you have no distractions. I did this by taking my laptop to work and staying there to work after my shift. Work becomes more productive when that's all you can do.
  • Try to work on it frequently. Jumping back in after a long break is really hard to do when another persons update can interfere with your own work.
  • Update every day BEFORE you work and resolve all conflicts. I can't stress how important this is. If you don't resolve all conflicts and ensure a patch passes a full build (including the template tests) you might break the build, or worse, undo work previously done before.
  • Update your log every time you work on your project. I sometimes did it twice per day. The mentors watch the logs to see what your doing, but more importantly, sometimes other students do as well. Sometimes something you noticed will allow something somebody else is working on a lot easier. This brings me to the next point.
  • Occasionally look at other peoples logs to see what's going on. Sometimes their work is related to your own and their log post might give you some insight on how to deal with your own problem.
  • Don't be afraid to ask questions on umple-dev. Sure you run the risk of looking like an idiot but you can't get help if you don't ask. Also, they were probably in the same shoes you are in right now at one point so you're not alone. :)
  • Finally understand the building process of umple. Ask the mentors for details on whats going on at each state. Take advantage of the face time you get at the sprint to understand this process. It's hard to explain. See below.

The next thing I am going to do (Since I cannot commit pictures) is give you a bit of code to put into umple online. I took a bit of my time to model the building process from the cheat sheet. Cut and paste the umple code below into umple online.

http://cruise.eecs.uottawa.ca/umpleonline

class JetTemplate
{
  1 -> 1 SrcGenJet TouchEclipse;
}

class SrcGenJet
{
  1 -> 1 UmpleToTemplate codegenXml;
}

class UmpleToTemplate
{
  1 -> 4 UmpleToLang codegen;
}

class UmpleParserJar
{
  1 -> 1 SrcGenJet myUmp;
}

class SrcGenUmple
{
  1 -> 1 UmpleParserJar compile;
}

class UmpleToLang
{
}

class UmpleToJava
{
  isA UmpleToLang;
  1 -> 1 SrcGenUmple umpleSelf;
}

class UmpleToCpp
{
  isA UmpleToLang;
}

class UmpleToPhp
{
  isA UmpleToLang;
}

class UmpleToRuby
{
  isA UmpleToLang;
}

This is my interpretation of the building process of umple. It is a state machine of sorts. Depending on what files you are editing will determine what you need to do next. Look at each class as a directory where files are placed and notice it is a circular process because you are building umple with umple. Make sure that you understand this process before you leave the sprint. It's hard to explain and you will likely have questions that are best answered during face time with the mentors.

All in all, I found the UCOSP process enlightening. I took this course to get a feel for what it was like to develop in a distributed work environment. It's definitly worth the experience and Umple has great potential. I hope all further students also feel the same way.

NOV 27

Well finally submitted a patch I believe is good. However recovering from the previous update was an eye opener. I meant to do a revert on the src-gen-umple directory and did it on the root directory by accident. After panicking that I lost everything for a few minutes I finally remembered all the files were still in my recycle bin. Dumb mistake, but thankfully easily recoverable.

What I didn't understand was why I was getting template conflicts in areas I shouldn't have been. State Machine etc... it turns out that I modified the umple notice jet file to fix an indentation error that was bugging me a while back without realizing the true scope of it's impact. It affected pretty almost all jet templates.

Anyways, I decided NOT to fix that minor comment indentation error that really wasn't important and just move over my changes for the association to a newly checked out directory. There was still a lot of template tests that failed but most were fixed when I replaced the .txt files with my old ones. So my work over the last week was not lost. I believe I caught all the files I needed but regardless the patch survives a complete build.

NOV 24

OK So I finished off the last few failures and then did a complete build. Success except for the builder test which seems to get ignored.

Anyways, I then made sure that all the files were added to subversion control and then went and did an svn update.

There were a ton of conflicts and suddenly when I went to run my tests I had over 1000 failures mostly from cpp stuff. WTF! I just spent hours ensuring all the templates matched what's up?

That got me thinking. What is different from my version that is causing it to fail all these template tests.

So I'm in investigation mode now.

NOV 24

I was doubting whether or not I should make changes to the .cpp templates due to development on the cpp language. I have come to the conclusion I should. My changes to the templates are minor and should not impact the cpp development.

I am down to my last 12 failures. Almost done now. :) It turns out that my templates in most cases add an extra line or fix a comment spacing error at the top. Something I didn't intend to affect so many different files. I think this generated from the association_setAll.jet as its the most global template I ended up editing.

I'm beginning to think a trustTemplate that would be handy. something that generates all the code for the template tests and automatically replaces the .txt file. It would have to be used with great caution and sparingly, but would have save me a LOT of work in this case. Whether that script should exist for development I will leave for others to debate. :)

NOV 23

I made decent progress this evening updating the template tests. I still have a lot to do though. The only errors producing now are cpp template tests. Currently 64 failures and 2 errorsI need to take care of.

29 from CppClassTemplateTest

5 from CppInterfaceTemplateTest

27 from CppStateMachineTemplateTest

5 from BuilderTest

At least Ruby and Php are over and done with. Yay :) because Cpp is currently a work in progress, I am undecided how I should proceed with those template tests.

The idea behind a template test is that you get things looking the way you want it to and save it with a .txt file extension. This happens after ensuring it passes initial testbed tests to do what you expect it to. Then you change the templates generate code that is identical to this code you know works.

However I kind of went the reverse and got my code to generate the output I would expect ensured it compiled and then rand the testbed tests on that code. Then I ensured they would pass the template tests by overwriting the template.txt comparison file to be a copy of the generated code.

To me, this kind of defeats the purpose of template tests. In my opinion, the testbed tests serve a better purpose where they actually test the functionality of the methods and ensure they do what they are suppossed to do.

Somehow I just know I am going to get an explanation as to the importance of the template tests. :) Perhaps it's something I am just not getting.

NOV 22

Ug. I've just spent 4 hours doign cut and pastes into the appropriate template test .txt files. I've still got a LOT of files to fix. It's not hard to fix a test, but it does take a couple of minutes to track the correct umple file down, compile it to the right language and copy the output into the right comparison.txt file. A couple of minutes per test. I'm not exactly sure how many I've impacted, but I now have 103 failures to fix. Thats a file for each failure btw. Each failure is a call to assertTemplateFor() so you can see how much of a pain in the but this is.

So... I'm Still plugging.... :) This would be a lot easier if I didn't have to work full time. Tomorrow is black friday at work. (retail lingo) and I got a UCOSP meeting at 12:00pm. I don't think I'm gonna make that meeting. I'm gonna need that lunch hour.

NOV 20

Finished converting my method over to Cpp.

I also made sure the entry generated in the appropriate cpp header file. Note that I noticed there is a seperate header_XXX_all.jet file in UmpleToCpp directory. This seperate template file is used to update the header file XXX.h that would be created. However while changes made in the XXX_all.jet file located in UmpleToTemplate do properly generate a good XXX_all.jet file (for the .cpp file), to get the changes made to the header file you must update header_XXX_all.jet (for the .h file) manually.

Now That I have my templates completed, I will need to ensure they pass all the template tests for the full build.

NOV 19

I have made signifigant progress in converting my templates into the other languages this evening. I have completed the code for Php and Ruby. I realized I made an error in the association_SetAll.jet. I should NOT have had that file generate any code... not even comments. I realized this when I started making the ruby code and realized that it was generating java/php/cpp style comments using "//" when ruby only recognized "#". Oops! this turned out to be a BIG mistake because it means I will have to update all those JavaTemplateTest files I fixed earlier.

Learn from my mistakes people. :) Generated code should only appear from the jet files in the UmpleToXXX directories. NOT the UmpleToTemplate directory. I'm glad I decided to make the code for the other languages. If I had decided to leave place holders the generated RubyCode would not compile.

Anyways, I fixed the templates. And I decided that to indicate that there should be a set method there, I would have umple generate the method code only in commented form, using the appropriate language code. It's messy, but you see what you should have there. The commented code will have an explanation as to why it's commented.

Tomorrow I hope to do the templates for the Cpp. I noticed that there is a seperate template file for both the header file and the body code. Makes sense. That shouldn't be too hard. Once I have that complete, It's either try to resolve Issue351 (on Google Code) or update the template test cases and pass on Issue351 (on Google Code).

BTW. I found a useful site that helped me a lot in determining if the code I would generate from the template tests would compile.

http://codepad.org/

It came in very handy without me downloading a seperate compiler for each language! :)

NOV 19

Was looking for a quick way to test php code to ensure it compiles. Instead of installing on my system you can use this link to test code online much like umpleOnline

http://writecodeonline.com/php/

NOV 16

It looks like there should be two methods in the previous example. The set all method is just fine. I didn't realize there were two items that a setMethod would be valid for. My generated comments do not mention what the method should look like.

I have finished a good chunk of the template tests now. I targeted the java template tests first because that is what umple is compiled from and can cause the most trouble. (Mainly from umpleSelf). All remaining template tests failures are from the other languages. (Php, Ruby & Cpp). I am going to look into porting over the java code to the other languages. I had methods written before, but I have since changed the algorithm since then.

I have never written in Ruby or Php before this and do not have an environment properly set up to develop in them. These are brand new languages to me. This is because I am a returning student from a 13yr hiatus. I was in my 4th year when java came out. I googled it a bit and it seems straight forward (crosses fingers). So I will enter my disclaimer now.

If any of those templates are malformed, you now know why. They do look like simple languages however and my template form is not too complex to mess up. It should be ok when I am done with them. :)

I am proceeding to this step now before I fix the remaining template tests.

I know, I still don't have a patch for this. But the all the template tests should pass before I submit the patch. I would like the patch to complete a full build.

NOV 15

I noticed while updating the template tests the following example.

/*PLEASE DO NOT EDIT THIS CODE*/
/*This code was generated using the UMPLE 1.15.0.1751 modeling language!*/

package example;

public class Student
{

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

  //Student Attributes
  private String number;

  //Student Associations
  private Mentor mentor;

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

  public Student(String aNumber)
  {
    number = aNumber;
  }

  //------------------------
  // INTERFACE
  //------------------------

  public boolean setNumber(String aNumber)
  {
    boolean wasSet = false;
    number = aNumber;
    wasSet = true;
    return wasSet;
  }

  public String getNumber()
  {
    return number;
  }

  public Mentor getMentor()
  {
    return mentor;
  }

  //
  // There Should be a Set Method installed here. Depending on if the association has an upper bound
  // will determine which source file to use
  //   association_SetOptionalOneToMandatoryMN.jet   - There is a maximum bound  (0..1 -- Min..Max)
  //   association_SetOptionalOneToMany.jet - There is no maximum bount (0..1 -- Min--*)
  //
  // This program cannot currently include SetOptionalOneToMN.jet because of Issue351 where add/remove methods do not generate
  //
  public void delete()
  {
    if (mentor != null)
    {
      mentor.delete();
    }
  }

}

You may notice that there is already a set method that had generated. Also the portion of my code that checks for the optional one to mandatory many relationship also generates the commented code. This compiles because I am only generating comments, but suggests the possibility that the association_SetAll() jet template is malformed and allowing two conditions to be met. This code was generated using umple example code as follows.

namespace example;

class Mentor 
{
  name;
  0..1 -- 3 Student;
}

class Student
{
  number;
}

This indicates a problem with association_setAll. A set method could potentially generate twice. Currently it does not (and therefore compiles) because I do not include a set method when there is an upperbound, but do generate comments to indicate there should be one present! Later, this could lead to a problem with the same method being defined twice. Either my check for inclusion, or another check for inclusion of a set method is not specific enough. This will require further investigation, but does not cause a problem currently because I am not yet generating code when this occurs and it does compile. Therefore for now, I will continue updating the tests.

Nov 15

I managed to get myself to a state where creating a patch will no include a whole bunch of stuff that shouldn't be under version control. I am now on the issue of addressing all the template tests that my method fails to pass. There is quite a few amd to my suprise included some tests I didn't think it should effect. An example would be classTemplateTest.

For any student reading this log, you should be aware of the following method.

assertTemplateFor(testCase.ump, expectedOutput.lang.txt, className)

This is the key method used in almost every template test. It basically compiles an umple file hopefully in

test.cruise.umple.implementation.example and then compares the output to an edited text file in test.cruise.umple.implementation.lang.outputFile.txt It then does a string compare between the two files and if they are not exactly the same, then the test fails. There might be some leeway, but I can assure you if there is any at all, it's slim at best. I understand there might be other more robust template tests that could be used, but for whatever reason, this one is used the most.

Continuing on, some of these tests I have to update use multiple files and the difference in the output from the old to the new is at times unoticable. These are cases where a set method sould not be generating (And isn't) yet somehow I have managed to change the code of the class ever so slightly regardless that it fails it's template test. Perhaps a new found space or newline. I am not sure how I changed so many classes but I suspect it has something to do with the fact I modified the association_SetAll.jet file which is included in any class that uses an association (and possible all classes period!) .

I do know that by cutting and pasting generated output into the appropriate .txt file in the cruise.umple.implementation.lang directory fixes the issue for that individual test. So I have decided to proceed with updating the tests as planned. It just means however that I have a few more tests than I origonally intended to update. :)

This has turned out to be a time consuming process for such a simple change. I do realize the importance of the template tests but there has got to be a more flexible testing method other than a straight string compare. Or at the very minimum, an easier way to update expected output of template tests. Any project that deals with source generation is going to run into this problem as the template tests are too stringent.

I would also like to mention I have raised a new Issue 351 (on Google Code) about certain add/remove methods not generating. This will have to be resolved and this template test updating procedure repeated before My Issue331 (on Google Code) is fully functional in all cases.

For the time being, I know what needs to be done and am making progress. Its just a legwork issue at the moment. I have decided to focus on the java template tests first as the is the language Umple is compiled into.

Nov 10

I have finally determined the root cause as to why I could not get Issue 331 (on Google Code) to compile properly. Please see Issue 351 (on Google Code) that I have raised. The add/Set methods were not generating when there was an upper bound on a mandatory relationship. I would fix this myself but still have more work to do updating template tests.

I had to write a method in class AssociationVariable to check for this condition called isUpperBounded()

I then created two templates. One for the cases where there was an upperbound and a maximumNumberOfXXX method generates as it should, and another where it does not. This is for two cases.

0..1 -- Min--STAR -> No upper bound. Uses association_SetOptionalOneToMandatoryMany.jet as it's template

0..1 -- Min--Max' -> Upper bound exists Uses association_SetOptionalOneToMN.jet as it's template

Because of Issue351 (on Google Code) where add/remove methods did not generate when the optional bound exists, I decided to have my patch create commented coded instead to indicate such and to mark which Jet template to use when Issue351 (on Google Code) is resolved.

When I submitted my patch, I accidentially created this monstrous file of 25mb by accident that included many things I should not have. EG src-gen-jet and the dist directory. I will have to strip my patch down. I must have added everything to version control by accident and included them into the patch. To fix this I will need to checkout the umple project again and apply my patch to the new project directory. And then create a smaller patch from the new directory. Note to others. Be careful using svn add. :)

I also have to update all the template tests that use the OptionalOneToMandatory relationship. This is because assertTemplateFor() only does a string comparison of the specified class compared to one contained within an edited text file. Since the edited text file will not contain the new set method I need to update all those tests.

Note, when Issue351 (on Google Code) is resolved and Issue331 (on Google Code) finally completed, this legwork will have to be done again to accomodate the add/set methods and the setMethods that we can now generate that require those methods.

Nov 6

I find myself in an interesting position today. I'm not exactly sure what step I am missing yet but I thought I would log it anyways.

I have no compile errors, so my umple.jar creates compilable code such that it can compile itself, however, I cannot seem to get newly changed jet template code to generate changes.

Normally if I were to make a change to a template file I do the following.

(Compile Jet) Touch the .jet file using eclipse

This will interpret the jet file and make changes to src-gen-jet

(Propogate) ant -Dmyenv=local -f build.codegen.xml

This will move from UmpleToTemplate into the appropriate UmpleToXXX file

(Generate) ant -f build.umple.xml -Dmyenv=local codegen

This will greate the JavaClassGenerator which creates java code. Changes are made in src-gen-jet

(Compile) ant -f build.umple.xml -Dmyenv=local compile

Now we compile the java classes

(Package) ant -f build.umple.xml -Dmyenv=local package

This finally creates the new umple.jar

The end result is an umple jar with no changes in it. ??? The newly generated code does not change. It's as if the jet template was the same. I get no compile errore. Even when I do a full build, but that because I ensured that all the changes only produced new comments. (Testing/Observing purposes) I feel like I am somehow overwriting the changes I made. I think I am missing a crucial step and effectively overwriting changes I am making. Hrmmm. I need to investigate further.

Nov 3

I thought things were going fine on Issue 331 (on Google Code). I went back and reworked my test case and ensured that my class code passed all my tests. I noticed that I would have to write seperate code for those cases where a maximumNumberOfXXXs() method would be generated and not generated. That means that I need to consider two cases seperatly.

  0..1 -- Min..*
  0..1 -- Min..Max

Currently I am focusing on 0..1 -- Min..* relationship. Adding code for the Min..Max case would be easy afterwards.

I went back to editing my template code again to make it look exactly like I wanted. Got the compiler to generate the code however after I umpleSelf when I compile after that I get a problem I encountered before.

I am referencing everything from class AssociationEnd and accessing methods in a variable that should be of type class Association.

It seems like in class Association there are no methods for

  addEnd(AssociationEnd aAssociationEnd)
  removeEnd(AssociationEnd aAssociationEnd)

Technically I am not sure it is expecting a type class AssociationEnd as an Argument. However the error output is using "this" as the argument to pass in. And the error is occurring in class AssociationEnd. This seems like a reasonable assumption. However if the template is malformed, perhaps it is actually expecting a type "End" as an argument.

My template should be writing out the text

  addAssociationEnd(AssociationEnd aAssociationEnd)
  removeAssociationEnd(AssociationEnd aAssociationEnd)

So looking at my template code, I have...

  <%=gen.relatedTranslate("addMethod",av)%>(this)
  <%=gen.relatedTranslate("removeMethod",av)%>(this)

as the jet code for creating the text for those method calls note that

  <%=gen.translate("addMethod",relatedAssociation)%>(this)
  <%=gen.translate("removeMethod",relatedAssociation)%>(this)

should be exactly the same thing. I tried this and got the same results. So why is it that on a compile after an umpleSelf, the text from these changes.

I will give actual compiler output (after umpleSelf) below as well as Jet code used below.


compile:
     [echo] UmpleCore: C:\Users\Stuart\Desktop\umple3\build\build.umple.xml
    [javac] Compiling 679 source files to C:\Users\Stuart\Desktop\umple3\cruise.umple\bin
    [javac] warning: [options] bootstrap class path not set in conjunction with -source 1.6
    [javac] C:\Users\Stuart\Desktop\umple3\cruise.umple\src-gen-umple\cruise\umple\compiler\AssociationEnd.java:169: error: cannot find symbol
    [javac]         if (aAssociation.addEnd(this))
    [javac]                         ^
    [javac]   symbol:   method addEnd(AssociationEnd)
    [javac]   location: variable aAssociation of type Association
    [javac] C:\Users\Stuart\Desktop\umple3\cruise.umple\src-gen-umple\cruise\umple\compiler\AssociationEnd.java:182: error: cannot find symbol
    [javac]           existingAssociation.removeEnd(this);
    [javac]                              ^
    [javac]   symbol:   method removeEnd(AssociationEnd)
    [javac]   location: variable existingAssociation of type Association
    [javac] C:\Users\Stuart\Desktop\umple3\cruise.umple\src-gen-umple\cruise\umple\compiler\AssociationEnd.java:191: error: cannot find symbol
    [javac]           existingAssociation.removeEnd(this);
    [javac]                              ^
    [javac]   symbol:   method removeEnd(AssociationEnd)
    [javac]   location: variable existingAssociation of type Association
    [javac] C:\Users\Stuart\Desktop\umple3\cruise.umple\src-gen-umple\cruise\umple\compiler\AssociationEnd.java:192: error: cannot find symbol
    [javac]           aAssociation.addEnd(this);
    [javac]                       ^
    [javac]   symbol:   method addEnd(AssociationEnd)
    [javac]   location: variable aAssociation of type Association
    [javac] Note: Some input files use unchecked or unsafe operations.
    [javac] Note: Recompile with -Xlint:unchecked for details.
    [javac] 4 errors
    [javac] 1 warning

BUILD FAILED
C:\Users\Stuart\Desktop\umple3\build\build.umple.xml:332: The following error occurred while executing this line:
C:\Users\Stuart\Desktop\umple3\build\build.umple.xml:92: Compile failed; see the compiler error output for details.

Total time: 24 seconds
C:\Users\Stuart\Desktop\umple3\build>

Sample Test Umple Case

class Student {
}

class Mentor {
  0..1 -- 1..2 Student;
}

Initial Student Output

/*PLEASE DO NOT EDIT THIS CODE*/
/*This code was generated using the UMPLE @UMPLE_VERSION@ modeling language!*/



public class Student
{

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

  //Student Associations
  private Mentor mentor;

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

  public Student()
  {}

  //------------------------
  // INTERFACE
  //------------------------

  public Mentor getMentor()
  {
    return mentor;
  }

  public boolean setMentor(Mentor aMentor)
  {
    boolean wasSet = false;
    Mentor existingMentor = mentor;

    if (existingMentor == null)
    {
      if (aMentor != null)
      {
        if (aMentor.addStudent(this))
        {
          existingMentor = aMentor;
          wasSet = true;
        }
      }
    } 
    else if (existingMentor != null)
    {
      if (aMentor == null)
      {
        if (existingMentor.minimumNumberOfStudents() < existingMentor.numberOfStudents())
        {
          existingMentor.removeStudent(this);
          existingMentor = aMentor;  // aMentor == null
          wasSet = true;
        }
      } 
      else
      {
        if (existingMentor.minimumNumberOfStudents() < existingMentor.numberOfStudents())
        {
          existingMentor.removeStudent(this);
          aMentor.addStudent(this);
          existingMentor = aMentor;
          wasSet = true;
        }
      }
    }
    if (wasSet)
    {
      mentor = existingMentor;
    }
    return wasSet;
  }


  public void delete()
  {
    if (mentor != null)
    {
      if (mentor.numberOfStudents() <= 1)
      {
        mentor.delete();
      }
      else
      {
        Mentor placeholderMentor = mentor;
        this.mentor = null;
        placeholderMentor.removeStudent(this);
      }
    }
  }

}

Initial Mentor Output

/*PLEASE DO NOT EDIT THIS CODE*/
/*This code was generated using the UMPLE @UMPLE_VERSION@ modeling language!*/


import java.util.*;

public class Mentor
{

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

  //Mentor Associations
  private List<Student> students;

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

  public Mentor(Student... allStudents)
  {
    students = new ArrayList<Student>();
    boolean didAddStudents = setStudents(allStudents);
    if (!didAddStudents)
    {
      throw new RuntimeException("Unable to create Mentor, must have 1 to 2 students");
    }
  }

  //------------------------
  // INTERFACE
  //------------------------

  public Student getStudent(int index)
  {
    Student aStudent = students.get(index);
    return aStudent;
  }

  public List<Student> getStudents()
  {
    List<Student> newStudents = Collections.unmodifiableList(students);
    return newStudents;
  }

  public int numberOfStudents()
  {
    int number = students.size();
    return number;
  }

  public boolean hasStudents()
  {
    boolean has = students.size() > 0;
    return has;
  }

  public int indexOfStudent(Student aStudent)
  {
    int index = students.indexOf(aStudent);
    return index;
  }

  public static int minimumNumberOfStudents()
  {
    return 1;
  }

  public static int maximumNumberOfStudents()
  {
    return 2;
  }

  public boolean addStudent(Student aStudent)
  {
    boolean wasAdded = false;
    if (students.contains(aStudent)) { return false; }
    if (numberOfStudents() >= maximumNumberOfStudents())
    {
      return wasAdded;
    }
    Mentor existingMentor = aStudent.getMentor();
    if (existingMentor != null && existingMentor.numberOfStudents() <= minimumNumberOfStudents())
    {
      return wasAdded;
    }
    else if (existingMentor != null)
    {
      existingMentor.students.remove(aStudent);
    }
    students.add(aStudent);
    setMentor(aStudent,this);
    wasAdded = true;
    return wasAdded;
  }

  public boolean removeStudent(Student aStudent)
  {
    boolean wasRemoved = false;
    if (students.contains(aStudent) && numberOfStudents() > minimumNumberOfStudents())
    {
      students.remove(aStudent);
      setMentor(aStudent,null);
      wasRemoved = true;
    }
    return wasRemoved;
  }

  public boolean setStudents(Student... newStudents)
  {
    boolean wasSet = false;
    if (newStudents.length < minimumNumberOfStudents() || newStudents.length > maximumNumberOfStudents())
    {
      return wasSet;
    }

    ArrayList<Student> checkNewStudents = new ArrayList<Student>();
    HashMap<Mentor,Integer> mentorToNewStudents = new HashMap<Mentor,Integer>();
    for (Student aStudent : newStudents)
    {
      if (checkNewStudents.contains(aStudent))
      {
        return wasSet;
      }
      else if (aStudent.getMentor() != null && !this.equals(aStudent.getMentor()))
      {
        Mentor existingMentor = aStudent.getMentor();
        if (!mentorToNewStudents.containsKey(existingMentor))
        {
          mentorToNewStudents.put(existingMentor, new Integer(existingMentor.numberOfStudents()));
        }
        Integer currentCount = mentorToNewStudents.get(existingMentor);
        int nextCount = currentCount - 1;
        if (nextCount < 1)
        {
          return wasSet;
        }
        mentorToNewStudents.put(existingMentor, new Integer(nextCount));
      }
      checkNewStudents.add(aStudent);
    }

    students.removeAll(checkNewStudents);

    for (Student orphan : students)
    {
      setMentor(orphan, null);
    }
    students.clear();
    for (Student aStudent : newStudents)
    {
      if (aStudent.getMentor() != null)
      {
        aStudent.getMentor().students.remove(aStudent);
      }
      setMentor(aStudent, this);
      students.add(aStudent);
    }
    wasSet = true;
    return wasSet;
  }

  private void setMentor(Student aStudent, Mentor aMentor)
  {
    try
    {
      java.lang.reflect.Field mentorField = aStudent.getClass().getDeclaredField("mentor");
      mentorField.setAccessible(true);
      mentorField.set(aStudent, aMentor);
    }
    catch (Exception e)
    {
      throw new RuntimeException("Issue internally setting aMentor to aStudent", e);
    }
  }

  public void delete()
  {
    for(Student aStudent : students)
    {
      setMentor(aStudent,null);
    }
    students.clear();
  }

}

Sample Jet Code

<%@ jet package="cruise.umple.ignore" class="Ignore"%>
  public boolean <%=gen.translate("setMethod",av)%>(<%=gen.translate("type",av)%> <%=gen.translate("parameterOne",av)%>)
  {
    boolean wasSet = false;
    <%=gen.translate("type",av)%> <%=gen.translate("parameterExisting",av)%> = <%=gen.translate("associationOne",av)%>;

    if (<%=gen.translate("parameterExisting",av)%> == null)
    {
      if (<%=gen.translate("parameterOne",av)%> != null)
      {
        if (<%=gen.translate("parameterOne",av)%>.<%=gen.relatedTranslate("addMethod",av)%>(this))
        {
          <%=gen.translate("parameterExisting",av)%> = <%=gen.translate("parameterOne",av)%>;
          wasSet = true;
        }
      }
    } 
    else if (<%=gen.translate("parameterExisting",av)%> != null)
    {
      if (<%=gen.translate("parameterOne",av)%> == null)
      {
        if (<%=gen.translate("parameterExisting",av)%>.<%=gen.relatedTranslate("minimumNumberOfMethod",av)%>() < <%=gen.translate("parameterExisting",av)%>.<%=gen.relatedTranslate("numberOfMethod",av)%>())
        {
          <%=gen.translate("parameterExisting",av)%>.<%=gen.relatedTranslate("removeMethod",av)%>(this);
          <%=gen.translate("parameterExisting",av)%> = <%=gen.translate("parameterOne",av)%>;  // <%=gen.translate("parameterOne",av)%> == null
          wasSet = true;
        }
      } 
      else
      {
        if (<%=gen.translate("parameterExisting",av)%>.<%=gen.relatedTranslate("minimumNumberOfMethod",av)%>() < <%=gen.translate("parameterExisting",av)%>.<%=gen.relatedTranslate("numberOfMethod",av)%>())
        {
          <%=gen.translate("parameterExisting",av)%>.<%=gen.relatedTranslate("removeMethod",av)%>(this);
          <%=gen.translate("parameterOne",av)%>.<%=gen.relatedTranslate("addMethod",av)%>(this);
          <%=gen.translate("parameterExisting",av)%> = <%=gen.translate("parameterOne",av)%>;
          wasSet = true;
        }
      }
    }
    if (wasSet)
    {
      <%=gen.translate("associationOne",av)%> = <%=gen.translate("parameterExisting",av)%>;
    }
    return wasSet;
  }

Nov 1

I am coming back from a long hiatus of inactivity (one week) I have found that working full time and participating in this program is not a good idea. It's hard to jump back into your work after a forced break like this. Sometimes you just need that 4-8 hourts of straight focus on a problem in order to make decent progress.

I have taken a step back to look at my testing. I have been having some trouble doing test driven development up to this point and instead of looking at the templates and then testing the generated code. I have FINALLY taken to writing a working java class from scratch and then creating tests around it to make sure it works. I have taken the one test and seperated it up into multiple tests to be absolutly clear where I fail. So far so good. The newly generated class I have created passes all the tests.

Now I am going to take another look at the jet code to see how I can make it look exactly like the code I currently have written. I noticed most template tests use a method called

assertTemplateFor(, , )

I am not certain, but am convinced it does an exact string comparison of the text of the desired class to that of the code the template code generates for the class from the umple source. Proper documentation on this method would be nice as it seems to be an extremly important method used for testing. I suspect that because it's a straight string comparison, that eronious spaces, punctuation and commenting might cause this to fail very easily.

I need to look into this more. Unfortunatly I will most likely not be able to make tomorrows meeting so I hope that this log is sufficient for a suitable update.

Oct 19

I believe I have another chicken/egg problem.

It turns out that the AssociationClass used an OptionalOneToMandatoryMany relationship. When I created the SetXXX method where XXX was a type, when umple tried to compile itself (again), the AssociationEnd class gains a new SetMethod when it shouldn't have one. This is because the AssociationEnd class cannot change the list of AssociationEnd's it has (I think). I don't want to expose class Association to AssociationEnd so I was thinking about making an exclusion case where the SetXXX method is not present in class AssociationEnd only as a temporary workaround.

Yeah... the algorithm seemed simple at first, but who knew it was such a headache. No wonder this issue has gone by for so long.

Oct 19

So my patch for Issue331 (on Google Code) failed. After doing a lot of debugging I cam across an interesting problem.

I can create a working compilation the first time, that generates the set method I expect. However when I try to do a full build it fails leaving me with the following errors. I also noticed that this error will occur when I try to repeat the procedure of propogating the jet files and codegen/compile/package after I do a full build.

umpleSelf:
     [java] cruise.umple/src/Master.ump
     [java] Success! Processed cruise.umple/src/Master.ump.
     [echo] Last Version: 1.15.0.1751

compile:
     [echo] UmpleCore: C:\Users\Stuart\Desktop\umple2\build\build.umple.xml
    [javac] Compiling 150 source files to C:\Users\Stuart\Desktop\umple2\cruise.umple\bin
    [javac] warning: [options] bootstrap class path not set in conjunction with -source 1.6
    [javac] C:\Users\Stuart\Desktop\umple2\cruise.umple\src-gen-umple\cruise\umple\compiler\AssociationEnd.java:183: error: cannot find symbol
    [javac]       association.removeEnd(this);
    [javac]                  ^
    [javac]   symbol:   method removeEnd(AssociationEnd)
    [javac]   location: variable association of type Association
    [javac] C:\Users\Stuart\Desktop\umple2\cruise.umple\src-gen-umple\cruise\umple\compiler\AssociationEnd.java:188: error: cannot find symbol
    [javac]               association.addEnd(this);
    [javac]                          ^
    [javac]   symbol:   method addEnd(AssociationEnd)
    [javac]   location: variable association of type Association
    [javac] Note: C:\Users\Stuart\Desktop\umple2\cruise.umple\src-gen-umple\cruise\umple\builder\Command.java uses unchecked or unsafe operations.
    [javac] Note: Recompile with -Xlint:unchecked for details.
    [javac] 2 errors
    [javac] 1 warning

BUILD FAILED
C:\Users\Stuart\Desktop\umple2\build\build.umple.xml:335: The following error occurred while executing this line:
C:\Users\Stuart\Desktop\umple2\build\build.umple.xml:92: Compile failed; see the compiler error output for details.

Total time: 1 minute 10 seconds

This seems to indicate there is only a problem when I try to compile itself with itself. I believe I am not properly regenerating umple source code from the new jar I have created probably due to some error in my UmpleToJava jet template I missed. I have included the jet template below.

<%@ jet package="cruise.umple.ignore" class="Ignore"%>
  public boolean <%=gen.translate("setMethod",av)%>(<%=gen.translate("type",av)%> <%=gen.translate("parameterOne",av)%>)
  {
    // --- PSEUDOCODE ---
    //
    // wasSet = false
    // if (b != NULL && b.numberOfAs() > b.maximumNumberOfAs()) then
    //   b.remove(this)
    //   b = aB
    //   if (b != null) then
    //     b.add(this)
    //   endif
    //   wasSet = true
    // endif
    // return wasSet
    // --- END PSEUDOCODE ---

    boolean wasSet = false;

    <% if (customSetPrefixCode != null) { append(stringBuffer, "\n    {0}",customSetPrefixCode); } %>
    if (   <%=gen.translate("associationOne",av)%> != null 
        && <%=gen.translate("associationOne",av)%>.<%=gen.translate("numberOfMethod",relatedAssociation)%>() 
        >  <%=gen.translate("associationOne",av)%>.<%=gen.translate("minimumNumberOfMethod",relatedAssociation)%>()
       )
    {
      <%=gen.translate("associationOne",av)%>.<%=gen.translate("removeMethod",relatedAssociation)%>(this);
      <%=gen.translate("associationOne",av)%> = <%=gen.translate("parameterOne",av)%>;

      if (<%=gen.translate("associationOne",av)%> != null)
      {
          <%=gen.translate("associationOne",av)%>.<%=gen.relatedTranslate("addMethod",av)%>(this);
      }
      wasSet = true;
    }

    return wasSet;
  }

Oct 18

Today I have submitted my first patch for issue 331 (on Google Code). It's incomplete in that I have only created the set method for UmpleToJava, UmpleToCpp, UmpleToPhp. UmpleToRuby I left a placeholder that automatically returns false (fail). However even in those methods it generated commented pseudo code for someone who is familiar with those languages to take advantage of.

I have been accepted on issue237 (on Google Code) allowing associations to interfaces and am looking forward to making this a more important contribution.

Oct 16

I wanted to create a patch today. I'm not 100% confident but it seems to do what I wanted it to. I did write(and rewrite) test cases but am not exactly sure how to submit the test cases.

regardless, I tried to do an svn diff to create the patch but got the following errors.

C:\Users\Stuart\Desktop\umple>svn --version
svn, version 1.7.7 (r1393599)
   compiled Oct  8 2012, 20:42:17

Copyright (C) 2012 The Apache Software Foundation.
This software consists of contributions made by many people; see the NOTICE
file for more information.
Subversion is open source software, see http://subversion.apache.org/

The following repository access (RA) modules are available:

* ra_neon : Module for accessing a repository via WebDAV protocol using Neon.
  - handles 'http' scheme
  - handles 'https' scheme
* ra_svn : Module for accessing a repository using the svn network protocol.
  - with Cyrus SASL authentication
  - handles 'svn' scheme
* ra_local : Module for accessing a repository on local disk.
  - handles 'file' scheme
* ra_serf : Module for accessing a repository via WebDAV protocol using serf.
  - handles 'http' scheme
  - handles 'https' scheme


C:\Users\Stuart\Desktop\umple>svn update
svn: E155036: Please see the 'svn upgrade' command
svn: E155036: Working copy 'C:\Users\Stuart\Desktop\umple' is an old development version (format 12); to upgrade it, use a format 18 client, then use 'tools/dev
/wc-ng/bump-to-19.py', then use the current client

C:\Users\Stuart\Desktop\umple>svn diff > mypatch.diff
svn: E155036: Please see the 'svn upgrade' command
svn: E155036: Working copy 'C:\Users\Stuart\Desktop\umple' is an old development version (format 12); to upgrade it, use a format 18 client, then use 'tools/dev
/wc-ng/bump-to-19.py', then use the current client

C:\Users\Stuart\Desktop\umple>svn upgrade
svn: E155019: Can't upgrade 'C:\Users\Stuart\Desktop\umple' as it is not a pre-1.7 working copy directory
svn: E150000: Missing default entry

C:\Users\Stuart\Desktop\umple>

I would at least like to show my mentors that I have something done today. I really want to get on to my next project. Creating associations to interfaces.

Oct 14

Still working on my first bug. Issue331 (on Google Code). I have finished writing the template for the UmpleToPhp, UmpleToCpp. The UmpleToCpp I have some doubts on it's correct syntax but I believe it's correct. Testing to follow.

Because I had the HD crash on thanksgiving, I will need to rewrite my testcases.

Oct 13

Issue 331 (on Google Code) has been frustrating me for some time now. However it seems like I have FINALLY made decent progress. I have the UmpleToJava template for the association_SetOptionalOneToMandatoryMany completed for java. Now all's I have to do is rerwite the same template for all the other languages that umple supports. One thing is for sure, I have a MUCH better idea on how Jet works now and the painstaking process of constant building and running to see the desired output.

TIP To any other student who would follow in my footsteps.

Files under UmpletoTemplate will cause the generation of files in the UmpleTo??? where ??? is the language in question. In my case I had to edit the association_SetAll.jet template to include in the desired association_SetOptionalOneToMandatory.jet to create a new set method for all 0..1 -- 1..associations.

Since the association_SetOptionalOneToMandatory.jet file has to be unique to the language, as more languages are added the umple project will become more monolithic becauseto maintain a jet file you will have to rewrite it in every language that umple supports. This problem should be addressed before adding any more languages to the project as there are quite a few as there is.

On that note. It is possible that this has already been addressed and I just don't know it yet. It could be that I have been doing things the hard way all this time and didn't know it. I have this nagging feeling in my bones right now that is so....

Regardless. I am dissapointed that I have still not yet completed my first patch. :( This was suppossed to be an easy task and either it was never easy to start with, or I have been doing things the wrong way the entire time. (I'll consider that as possible)

Considering that me and Andrew spent easily 1 houra discussing the issue during the sprint (skipping lunch I might add) I am inclined to believe it should not have been ranked easy.

When I start something though, I like to finish it. This will be done!

Oct 11

Cleaned up my log page. I was posting by commenting on my own page. Now I have taken to editing the page manually and chenges the order of my posts so they are now in reverse chronological order

Oct 11

Looking for a token that allows me to set a variable in Jet without using Set (Else becomes recursive) This seems like a simple problem, but one I just can't find looking at Jet examples. Also I am not exactly sure where all the Jet tokens are (Ie. What Java class). That would help immensly. I have been writing this by trial/compile/error so far. The comments at the start of the code are there to remind me what things do.

Oct 13, 2012

OK I thought issue 331 (on Google Code) was going to be a lot simpler than I had planned. I am having issues learning Jet and how it generates code. I know what I want my code to look like. (In Java at least, work on the others later) I just need to create a Jet file that parses things out so it generates the code the way I want it.

I am successful in that I can get the jet file to generate a method that returns false so far. But am unsure as to exactly how '<%gen.translate %>' and other tags work. I have taken a look at other jet files for inspiration with limited success. Due to the conditional nature of setting an optional association to a mandatory association, the code is unique to the examples present so far.

A cheat sheet of commands for writing in Jet would be helpful here. I will explore further.

Oct 11

OK so it's been a long time since my last post. The coding sprint was problamatic for me as I was the one most effected by the c++/Vector error propagating into the Java code. However, thankfully I did eventually get back up and running and started working on issue 331 (on Google Code), creating a set method for the association_OptionalOneToMandatoryMany?. After discussing the nature of the problem with during the sprint I had a good grasp on how to tackle the problem.

I had hoped to finish the problem over the thanksgiving weekend. Unfortunatly the computer gods from above decided to crash the laptop harddrive, causeing me to lose everything. (Including a working laptop) Since then I have bought a brand new laptop since repairing the old one was not worth while. I had to take a day to get my computer up and running (backups, OS etc) and have since just recently set up the environment again from scratch now on a windows 7 Operating system. Since I was now well aware of the problems and had an idea what I was doing this was MUCH faster than before.

Now I am focusing back on issue331 (on Google Code). I would like to get that bug out of the way before I tackle a major project. I have been looking at the suggestions for projects put out by Tim. I am still undecided but the developing support for interfaces has piqued my intrest.

As for the problems encountered during the sprint, I will try to comment on those here.

Basically what happened is the UmpleToJava? jet file got changed to use the Vector class (used in cpp) instead of the ArrayList? (used in Java). Also somehow duplicate definitions for classes were added in cruise.umple.src/cruise Causing the errors above. Andrew spent a great deal of time debugging this and solving the problems.

One thing of particular note I have learned during the sprint is the overall structure (or cycle) of umple and how it is set up.

Umple -> compiler? -> parser? -> Code (Java) -> Jar (Package)

Basically Jet is the core translater that takes inputted text (presumable umple) and converts it into code depending on the compiler options. Since Jet can only currently be compiled in eclipse (There is no command line version) I now see why we are so dependant on eclipse. Getting this working from the command line would be a lot easier for us.

Sep 28, 2012

I was woke up late during the night and thought I would take a short break and install an umple online webserver. Problem at step1, finding httpd.conf. It doesn't exist on windows. So that puts a kbosh on my 3:00am project for tonight. :)

Sep 28, 2012

After getting the command line shortcut to run as administrator by default, my command line recognized ant in it's path. I have since begin to focus on eclipse and did a build/test of cruise.umple

At first there were a ton of errors until I remembered that there was a problem with the vector class being written as "vector" ans not "Vector". Since I remember it was fixed last night, I did an svn update and the number of errors went down to 4.

These 5 errors all seem to stem from one test.

cruise.umple.builder.test

There is an assertion the tests to create a new file called "meToo.class" and that assertion fails. This seems to be the root cause as the other tests assert that....

the file exists after compiling twice If it didn't work once why would it work twice the the builder returns non null jar There was nothing to build (No class file) that a new file deleteant exists There was no ant file created to delete anything because nothing was made

So why wasn't the file being created. An access problem? Was it a permissions problem? Was it because I am creating it into an svn directory and I lost connection to the net. Shouldn't be,, should have been local) This might be a good bug to fix for starters.

Delete comment

Sep 28, 2012

It's the first day of the sprint and there was a lot of environment problems getting set up. Finding the libraries was a particular problem. It was unclear to me on the directions getting set up. eg.

Getting ant recognixed in the command line path is another. I had to be running the command line as and administrater even though my User is already an administrator the command line wasn't getting those permissions. Run-As Administer works for it but I need eclipse to have those permissions. (About to test this more)

I started looking at a few issues when the Mentor had time. (He was of great help when I had him :)I'm concerned about the environment and would really like to get into problem solving earlier.

More comments coming this evening.

Delete comment

Sept 27, 2102

I am doing some last minute preparations before I catch a plane for the coding sprint. As so far, I have on my Dal account (Linux) played around with the command line compiler. Now I have been doing some finishing touches on my laptop environment.

Made sure Ant was properly installed. I have already successfully created a project using the eclipse plugin that makes ant files on it's own. Now I decided to try to get things running from the command line itself. Important notes setting up environment variables JAVA_HOME for the hava sdk and ANT_HOME are key. I discovered that eclipse does not use the javac.exe provided from the sdk as I didn't have it installed at the time I was compiling my first umple project. LOL!

Regardless JDK is now properly installed. Ant is installed although I'm not yet comfortable writing ant scripts in XML. I have checkedout the umple-read-only link. That was a suprise. 1 hour later and it's still downloading. I successfully recompiled umple as well using the command. ant -Dmyenv=local -f build.umple.xml It did not work when I tried ant -Dmyenv=local the error I got was... C:\Users\user\Desktop\Workspace\umple-read-only\build>ant -Dmyenv=local Buildfile: C:\Users\user\Desktop\Workspace\umple-read-only\build\build.xml

taskdef? Could not load definitions from resource net/sf/antcontrib/antcontrib.properties. It could not be found.

build:

BUILD FAILED C:\Users\user\Desktop\Workspace\umple-read-only\build\build.xml:7: Problem: failed to create task or type trycatch Cause: The name is undefined. Action: Check the spelling. Action: Check that any custom tasks/types have been declared. Action: Check that any

<presetdef>

/

<macrodef>

declarations have taken place.

Total time: 0 seconds

I'm not familiar with ant scripts and have found no useful tutorials on their use. (One good one for installing but that's it) Still. I have had some success and am confident with further practice I will get used to writing ant scripts/xml and eliminate these errors. I supposse I could rely on eclipse to build my antfiles for me, but I really want to understand it for when I don't have eclipse doing the work for me.

I have also managed to successfully use JUnit through eclipse. However I have not had much success properly compiling from the command line. I get the concept. Create a class with methods that test all the methods of another class. Throw an error message exception to cause the test to fail when the expected output does not match the real output. (assertEquals). I also found a couple of tutorials via youtube that I found useful. Getting things running on the command line in vista is more of a nuisance than I anticipated. :)

More comments will follow soon. I really need to research xml and ant scripts more.. and of course. finish packing. :)

Sep 24, 2012

I spent Sunday morning installing Ant and toying with JUnit. Junit seems to be a nice addon to eclipse for automatically generating test case classes/programs and comes bundled with eclipse. I like JUnit.

I'm not terribly thrilled with Ant however. It's basically a replacement for "make" to build your projects with. It uses built in tags and nit actuall shell commands like make does meaning it's more cross platform, however it use of xml makes ant build files incredibly cumbersome to read. I like nice clean simple code and all the < and >'s are just plain ugly. Perhaps as I begin to use it more I will get used to it. Thankfully eclipse has a feature to automatically build ant scripts or create a project from an Ant script on the command line. It can also be edited from within the IDE so as I get used to ANT I'm sure I will learn to like it more.

I have not gotten the modeling tools (pictures) working yet as I changed my focus towards little things that were suggested from the last meeting I attended. Unfortunatly I missed the last meeting that showed the first example of us fixing a problem. I hate missing meetings, it's like not showing up for class. There is always useful information shown to you thats easier to understand than looking it up from documents online. Hopefully I am not to far behind.

The coding sprint is this weekend coming. I will have a busy work schedule before then. I have no idea what I'm in for, but I can't wait! :)

Sep 18, 2012

I have been playing around a bit more using eclipse plugin and command line compiler. One thing I noticed is that one of the basic examples of mixins from multiple files doesn't seem to work.

Tutorial 3 describes classes X and Y class X {

singleton; name; }

class Y {

Integer id; }

This could be a small self-contained system with two unconnected classes. However let us imagine that you also created the following Umple code in file2.ump:

// Contents of file2.ump

class X {

Date dueDate; }

association {1 X -- Y;}

I have tried a direct cut and paste to make this work. The first error of note is that it will not compile unless the lazy keyword is used in front of the name in class X. Even after doing that and getting a successful compilation we still have a problem.

The compiler begins to compile the second file2 but does not recognize the contents of file1. It gives the error that "Association end Y is not a class" error. When I tried defining class Y as a mixin to class Y. It overwrote the classes from file1, leaving me with the new variables but not the old.

I did not see any other command line options from umple.jar that might indicate I am doing things improperly with mixins. This occurred with both the command lind compiler and the eclipse plugin (selected both files at once and then clicked "compile umple"

Sept 12 2012

I have had the chance to play around a bit with umple. I have managed to download the proper version of eclipse and install the umple plugin with few problems. I have also played around with the umple online editor and downloaded the umple command line installer to use on my linux account.

A couple of things I noticed about umple. The compiler for the Cpp (using command line compiler on linux) needs a LOT of work still. It assumed an include file of string (no extension) when I suspect it was meant to hold string.h (or a class definition of String) and assumed a class called vector in include file

<vector>

exists. During one trial, it created properties in the constructor as local variables and not in the class itself. I noticed errors in my umple code however and when I fixed the error this dissapeared. I was not abke to replicate the example since.

The biggest thing I noticed about the command line compiler was it's lack of error messages. The majority of the time, it either compiles and says success! or it fails and meerly says "Failed to generate code". A lot of debugging messages would be very useful here.

In the near future I plan to see if I can get the modeling diagrams to work in eclipse. I'm not used to the eclipse editor environment. I'm used to compiling from a command line or using visual studio.

Sep 2, 2012

Started looking into setting up my environment. I will be using a Windows Vista operating System. Also looking into using wiki syntax

Delete comment

Sep 29, 2012

The following images were added by Andrew Forward -- Stuart will write notes around the issues he encountered (he doesn't have commit privileges yet, so Andrew uploaded the referenced them for him).

http://umple.googlecode.com/svn/wiki/images/duplicate_class_error/duplicate_class.jpg http://umple.googlecode.com/svn/wiki/images/duplicate_class_error/src_cruise_should_not_exist.jpg http://umple.googlecode.com/svn/wiki/images/duplicate_class_error/do_not_add_src_cruise.jpg

NOTE: Entries are listed in reverse chronological order.

Replace this with the date e.g. Mar 22nd 2012

Replace this with the text of your entry.