Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue379 Requirements #1857

Merged
merged 28 commits into from Aug 31, 2021
Merged

Issue379 Requirements #1857

merged 28 commits into from Aug 31, 2021

Conversation

Svetlana154
Copy link
Contributor

Fixes #379; Adds basic requirement statements into Umple, including documentation in manual files and generating a requirement document.

@TimLethbridge
Copy link
Member

OK. The state as of 1:45 p.m.

The code you have looks clean. Although I will need to see it executing to see how it works and whether there are glitches.

  1. We need to have some tests. There are already tests for comments; we need to do the same for requirements. But feel gree to clean up actual bugs first.

  2. Appveyor is passing because it is not testing properly I think.

  3. I get an eerror when testing in newUserManualAndExampleTestsJava. There is a crash in the example AirlineByPattern.ump and BusSystemByPattern.ump (which I only added recently). It is odd that the recently added tests have this problem but number 4 below shows it is not only these ones. Note that Jenkins is not pointing out the umple line, but my build is.

Exception cruise.umple.compiler.exceptions.UmpleCompilerException (There was a problem with generating classes. java.lang.NullPointerException: Cannot invoke 'java.util.List.size()' because 'this.requirements' is null) in
     [java]  at cruise.umple.compiler.JavaGenerator.generate(JavaGenerator.java:122)
     [java]    => Generator_CodeJava.ump:128
  1. I also get an error further on (in that test) at the following examples
     [java]  /Users/tcl/unix/umple/temp/java/W218ConflictInAttributes2.ump
     [java]  /Users/tcl/unix/umple/temp/java/traits_example_003.ump
     [java]  /Users/tcl/unix/umple/temp/java/traits_example_023.ump
     [java]  /Users/tcl/unix/umple/temp/java/traits_example_addresses.ump

 Exception cruise.umple.compiler.exceptions.UmpleCompilerException (There was a problem with generating classes. java.lang.NullPointerException: Cannot invoke 'java.util.List.size()' because 'this.requirements' is null) in
     [java]  at cruise.umple.compiler.JavaGenerator.generate(JavaGenerator.java:122)
     [java]    => Generator_CodeJava.ump:128

@Svetlana154
Copy link
Contributor Author

Svetlana154 commented Aug 31, 2021

This is a Beta version of the requirements feature in Umple.

Currently it can do the following actions:

  • Process requirements at the top most level and output them whenever there is an "implementsReq" keyword in the code
  • Generate a basic requirements document through the following command:

    java -jar <path_to_umple.jar> <file_name>.ump -g PlainRequirementsDoc


  • A description for requirements has been added to the user manual page

    To do:
  • Create error codes - there are System.out.println("ERROR") messages instead of the error codes in the cruise.umple/src/class/UmpleInternalParser_CodeClass.ump : 221, 238 analyzeImplementReq() function
  • Add syntax highlighting
  • Add requirements to "User Manual Basics: List of Umple Keywords" and "Grammar to Define Umple" sections in user manual
  • Add style to the requirements document (cruise.umple/src/generators/Generator_CodePlainRequirementsDoc.ump)
  • Sort requirements in alphabetical order. Further instructions on line 57 of Generator_CodePlainRequirementsDoc.ump
  • Add tests to the requirements doc generator
  • Modify Mixsets to contain a HashMap of requirements (just like the Umple Model) and alter methods analyzeRequirement() line 203 and analyzeImplementReq() line 221, 238 in UmpleInternalParser_CodeClass.ump to add or take requirements from the appropriate spot (e.g. if stored in mixset, get from mixset and otherwise from the model).
  • Modify function translateToHTML() at cruise.umple/src/Umple_Code.ump : 889 to account for requirement language styles (like markdown) in the generated requirements doc
  • For requirements to appear as a tooltip in the GV Class Diagram, modify or create a similar function to appendTooltipComment() found in cruise.umple/src/generators/Generator_SuperGvGenerator.ump : 137
  • Add a generate plain requirements doc option to UmpleOnline
  • @TimLethbridge TimLethbridge marked this pull request as ready for review August 31, 2021 20:52
    @TimLethbridge TimLethbridge merged commit 269ddbe into master Aug 31, 2021
    @TimLethbridge TimLethbridge deleted the Issue379_Requirements branch March 31, 2022 21:49
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    None yet
    Projects
    None yet
    Development

    Successfully merging this pull request may close these issues.

    Allow some form of specification of requirements in Umple including use cases and perhaps GRL
    2 participants