carbidecpp20devenv/plugins/org.eclipse.emf.cheatsheets_2.4.0.v200808251517/cheatsheets/GenerateExtendedEMF.xml
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/carbidecpp20devenv/plugins/org.eclipse.emf.cheatsheets_2.4.0.v200808251517/cheatsheets/GenerateExtendedEMF.xml Fri Apr 03 17:08:57 2009 +0100
@@ -0,0 +1,109 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<cheatsheet title="Generating an Extended EMF Model">
+
+ <intro href="/org.eclipse.emf.doc/tutorials/slibmod/slibmod.html">
+ <description>
+ This cheat sheet is a step-by-step description of how to generate an extended EMF
+ model and editor from a Rose class diagram.
+ <br /><br />
+ This cheat sheet continues on from either the "Generating an EMF Model from Rose"
+ or "Generating an EMF Model from Annotated Java" cheat sheet. Ensure that you have
+ completed at least one of them before contining.
+ </description>
+ </intro>
+
+ <item title="Set up the environment">
+ <description>
+ Your environment must be set up before you can perform the steps in this cheat sheet.
+ </description>
+
+ <subitem
+ label="Create an "EMF Cheatsheet Data" project in your workspace with the example "schoollibrary.mdl" file."
+ skip="true" >
+ <action
+ pluginId="org.eclipse.emf.cheatsheets"
+ class="org.eclipse.emf.cheatsheets.actions.CopyFileFromPluginAction"
+ param1="EMF Cheatsheet Data"
+ param2=""
+ param3="org.eclipse.emf.cheatsheets/archive/extended/schoollibrary.mdl"
+ translate="" />
+ </subitem>
+
+ <subitem
+ when="true"
+ label="Ensure that either "library.rose", "library.rose.edit", and "library.rose.editor" or "library.java", "library.java.edit", and "library.java.editor" exist in your workspace. Otherwise, you will need to complete either the "Generating an EMF Model from Rose" or the "Generating an EMF Model from Annotated Java" cheat sheet before continuing."
+ skip="false" />
+
+ <subitem
+ when="true"
+ label="Delete or rename the following projects if they exist in your workspace: "schoollibrary.rose","schoollibrary.rose.edit","schoollibrary.rose.editor""
+ skip="true" />
+ </item>
+
+ <item
+ title="Import the model from Rose"
+ href="/org.eclipse.emf.doc/tutorials/slibmod/slibmod.html#step1a"
+ dialog="true"
+ skip="true">
+ <description>
+ First, you must create a new "schoollibrary.rose" EMF project in your workspace, importing
+ the Rose model to create the EMF model.
+ </description>
+
+ <subitem label="Select "File > New > Project...". Expand "Eclipse Modeling Framework" and select "EMF Project". Then, click "Next"." skip="true">
+ <action
+ pluginId="org.eclipse.emf.cheatsheets"
+ class="org.eclipse.emf.cheatsheets.actions.OpenEMFProjectWizardAction"
+ param1="schoollibrary.rose"
+ param2="org.eclipse.emf.importer.rose"
+ translate="" />
+ </subitem>
+ <subitem label="Enter "schoollibrary.rose" as the project name, then click "Next"." skip="false" />
+ <subitem label="Select "Rose class model", then click "Next"." skip="false" />
+ <subitem label="Click "Browse Workspace...", and expand "EMF Cheatsheet Data" to select "schoollibrary.mdl". Then click "Next"." skip="false" />
+ <subitem label="In the "Root packages" table, select the package "org.eclipse.example.schoollibrary", which will be generated." skip="false" />
+ <subitem label="Click "Browse..." to locate the file containing the library model that will be extended." skip="false" />
+ <subitem label="Expand either the "library.rose" or library.java" project to select the "model/library.genmodel" file within it. Click "OK"." skip="false" />
+ <subitem label="Under "Referenced generator models", select the "org.eclipse.example.library" package, and click "Finish"." skip="false" />
+ </item>
+
+ <item
+ title="Generate the code"
+ href="/org.eclipse.emf.doc/tutorials/slibmod/slibmod.html#step2"
+ dialog="true"
+ skip="true">
+ <description>
+ Generate the code to implement the model and an editor for it. The generator is automatically opened on completion of the wizard in the previous step.
+ </description>
+
+ <subitem label="In the generator, right click on "Schoollibrary" and select "Generate All"." />
+ <subitem label="If automatic building has been disabled, select "Project > Build All" to compile the generated code." skip="true">
+ <action
+ pluginId="org.eclipse.emf.cheatsheets"
+ class="org.eclipse.emf.cheatsheets.actions.BuildAllProjectsAction" />
+ </subitem>
+ </item>
+
+ <item
+ title="Run the generated editor"
+ href="/org.eclipse.emf.doc/tutorials/slibmod/slibmod.html#step3"
+ dialog="true"
+ skip="true">
+ <description>
+ Now, you are set to run the generated editor and create a new school library instance.
+ </description>
+ <onCompletion>
+ Congratulations! You have succesfully extended an EMF model, generated the code, and created an instance of the extended model.
+ </onCompletion>
+
+ <subitem label="Select the "schoollibrary.rose" project in the package explorer and invoke the "Run > Run As > Eclipse Application" menu item. This starts a runtime instance of Eclipse with the newly generated plug-ins available." />
+ <subitem label="In the runtime instance, create a new general project called "schoollibrarytest"." />
+ <subitem label="Right click "schooollibrarytest" and select "New > Other..."." />
+ <subitem label="Expand "Example EMF Model Creation Wizards" and select "Schoollibrary Model". Then, click "Next"." />
+ <subitem label="Enter "My.schoollibrary" as the file name, then click "Next"." />
+ <subitem label="Select "School Library"; as the model object, then click "Finish"." />
+ <subitem label="The generated school library editor is opened. Expand "platform:/resource/schoollibrarytest/My.schoollibrary". Right click "School Library" and select "New Child > School Book" to create a school book object in the library." />
+ <subitem label="Create additional books and writers in the library, and edit the objects' properties in the properties view." />
+ <subitem label="Select "File > Save" to save the instance." />
+ </item>
+</cheatsheet>