Upgrade to Pro — share decks privately, control downloads, hide ads and more …

CSE460 Lecture 36

CSE460 Lecture 36

Software Analysis and Design
Eclipse Modeling Framework II
(202011)

Javier Gonzalez-Sanchez

August 05, 2020
Tweet

More Decks by Javier Gonzalez-Sanchez

Other Decks in Programming

Transcript

  1. jgs CSE 460 Software Analysis and Design Lecture 36: Eclipse

    Modeling Framework II Dr. Javier Gonzalez-Sanchez [email protected] javiergs.engineering.asu.edu | javiergs.com PERALTA 230U Office Hours: By appointment
  2. Javier Gonzalez-Sanchez | CSE564 | Fall 2020 | 2 jgs

    Announcements § Assignment 05 (Quiz about Metrics) is due Today (November 23, 11:59 PM) 10 questions about metrics § Assignment 06 (Eclipse Modeling Framework) open today, and it is due December 1, 11:59 PM. Use EMF for a Simple Project § Quiz 06 (Software Design) open today, and it is due December 1, 11:59 PM A set of question about Patterns, Class diagrams and programming. Some of these questions could be in your final exam
  3. Javier Gonzalez-Sanchez | CSE564 | Fall 2020 | 3 jgs

    Grades (as described in the Syllabus) § Assignments (Total 6, 25%) therefore, 4.1666% points each. § Quizzes (Total 6, 25%) therefore, 4.1666% points each. § Midterm Exam (25%) § Final Exam (25%)
  4. Javier Gonzalez-Sanchez | CSE564 | Fall 2020 | 4 jgs

    Announcements § November 23. Eclipse Modeling Framework II § November 25. Final Review § November 27. Thanksgiving Weekend § November 30. No lecture that day § December 02. Final Exam (during the lecture starting time 9:40 am)
  5. Javier Gonzalez-Sanchez | CSE564 | Fall 2020 | 5 jgs

    Announcements § Questions about assignments and grade write to the TA § Use your ASU email § Mention CSE 460 § Be specific in your question(s). § I have an appeal… (my assignment grade is wrong) ... Etc. is not the same that I have a question... § Please do not request unjustified increment in final grade (see Lecture 1)
  6. Javier Gonzalez-Sanchez | CSE564 | Fall 2020 | 8 jgs

    Model UML Class Diagram Description
  7. Javier Gonzalez-Sanchez | CSE564 | Fall 2020 | 10 jgs

    Step 3 :: Generate Code Could you create a class diagram for the package myModel?
  8. Javier Gonzalez-Sanchez | CSE564 | Fall 2020 | 12 jgs

    Test Cases § Generated test class for all the entities of your model. § Add methods starting with “test” to create single test cases. § Run test cases with a right-click on the test class then. “Debug As” => “JUnit Test”. In this context, test cases are very simple way of exploring and using the API of the generated classes.
  9. Javier Gonzalez-Sanchez | CSE564 | Fall 2020 | 13 jgs

    Test Cases package myModel.tests; import junit.framework.TestCase; import junit.textui.TestRunner; import myModel.Course; import myModel.MyModelFactory; import myModel.Student; public class CourseTest extends TestCase { public static void main(String[] args) { TestRunner.run(CourseTest.class); } public CourseTest(String name) { super(name); } // more ... }
  10. Javier Gonzalez-Sanchez | CSE564 | Fall 2020 | 14 jgs

    Test Cases § Use the MyModelFactory to create a Course and a Student public class CourseTest extends TestCase { // original code... public void testCourseStudentReference() { Course course = MyModelFactory.eINSTANCE.createCourse(); Student s1 = MyModelFactory.eINSTANCE.createStudent(); course.getStudents().add(s1); assertEquals(course.getStudents().get(0), s1); } }
  11. Javier Gonzalez-Sanchez | CSE564 | Fall 2020 | 17 jgs

    Frameworks For Views: § EMF UI § EMF Listener § EMF Forms. § Graphiti (Graphical Editor) § Graphical Modeling Framework (Graphical Editor) § Extended Editing Framework (Advanced Property View) For storing and versioning EMF model instances: § EMFStore (Model Repository) § CDO (Model Repository) § Teneo (Database Back-end)
  12. Javier Gonzalez-Sanchez | CSE564 | Fall 2020 | 18 jgs

    Reference § Eclipse Modeling Framework by Frank Budinsky § EMF project on eclipse.org
  13. Javier Gonzalez-Sanchez | CSE564 | Fall 2020 | 20 jgs

    Assignment 06 UML Class Diagram 1. Define the Model in EMF (take a screen shoot) 2. Generate Code (take a screen shoot) 3. Use the Code to Create a Class Diagram (only the Model package but include both interfaces and implementations). It will be bigger and more complex that the one provided 1. Create a test case to create (using the factory) one instance of each class EMF (take a screen shoot) 2. Run it (take a screen shoot)
  14. jgs CSE 564 Computer Systems Fundamentals Javier Gonzalez-Sanchez [email protected] Fall

    2020 Disclaimer. These slides can only be used as study material for the class CSE564 at ASU. They cannot be distributed or used for another purpose.