1 | THE MDT HACKING MANUAL |
---|
2 | |
---|
3 | � THESIS REPORT |
---|
4 | |
---|
5 | The thesis report will hopefully contain some usefull information for |
---|
6 | developers of MDT. Here someone will add a list of section to read there. |
---|
7 | |
---|
8 | � REPOSITORY STRUCTURE |
---|
9 | |
---|
10 | �� BACKGROUND BLURB |
---|
11 | |
---|
12 | This section describes the folder structure of the repository, where the things |
---|
13 | are stored and where they should be stored. The discussion starts at the root |
---|
14 | of the MDT subversion repository. Refer to the MDT website for the URL to |
---|
15 | the root of the repository. |
---|
16 | |
---|
17 | �� THE ROOT |
---|
18 | |
---|
19 | (repository root) |
---|
20 | + tags release (and possiby other) tags |
---|
21 | + 0.2 source code for 0.2 release of MDT |
---|
22 | + trunk the mainline brunch |
---|
23 | + docs general documentation on the project |
---|
24 | |
---|
25 | �� PROJECS |
---|
26 | |
---|
27 | Inside the trunk directory or root directory of any branch there is following |
---|
28 | structure: |
---|
29 | |
---|
30 | (branch root) |
---|
31 | + org.modelica.mdt.core The core plugin project |
---|
32 | + org.modelica.mdt.ui the UI contributions of the MDT plugin |
---|
33 | + org.modelica.mdt.omc the OMC 'driver' |
---|
34 | + org.modelica.mdt.test the regression tests |
---|
35 | + org.modelica.mdt.feature the MDT feature that groups all plugins |
---|
36 | + org.modelica.mdt.site the MDT update site |
---|
37 | |
---|
38 | All folders are Eclipse projects and can be checked out into the root of |
---|
39 | the eclipse workspace. |
---|
40 | |
---|
41 | � BUILDING SOFTWARE |
---|
42 | |
---|
43 | The only supported way to build mdt plugins, regression tests, feature and |
---|
44 | update site is through Eclipse. Normaly it is sufficient to import the |
---|
45 | projects into the workspace and let the eclipse autobuilders do the job. |
---|
46 | Building the feature and updatesite is a manul processdure and is documented |
---|
47 | in the 'Making a release' section in this manual. |
---|
48 | |
---|
49 | The only general requirment for all projects is Eclipse 3.* PDE environment. |
---|
50 | It should be noted that only Eclipse 3.1 and 3.1.1 have been tested and stuff |
---|
51 | may not work as prescribed in earlier versions. |
---|
52 | |
---|
53 | |
---|
54 | �� BUILDING REGRESSION TESTS |
---|
55 | |
---|
56 | To build (and run) the regression tests you need to download 'abbot for eclipse' |
---|
57 | version 1.0rc1 or later plugin. It is available from |
---|
58 | http://prdownloads.sourceforge.net/abbot/abbot_1.0-rc1-eclipse-3.0.zip?download |
---|
59 | |
---|
60 | �� PROJECTS FOR REGRESSION TESTS |
---|
61 | |
---|
62 | Many test cases need to create a projects to setup the environment for testing. |
---|
63 | Becouse all the tests are run in the same workspace there is a risk of |
---|
64 | conflicts in the projects namespace between different test cases. To avoid this |
---|
65 | and to simplify maintainance of the tests, following scheme should be used apon |
---|
66 | creation of guinnia pig projects. |
---|
67 | |
---|
68 | For each created project a constant PROJECT_NAME_n must be created. The constant |
---|
69 | should be assigned value of TestCaseName.class.getName() + "1". For example test |
---|
70 | case TestFoo, which will create two project will contain following constant |
---|
71 | declaration: |
---|
72 | |
---|
73 | public class TestFoo extends TestCase |
---|
74 | { |
---|
75 | private static final String PROJECT_NAME_1 = |
---|
76 | TestFoo.class.getName() + "1"; |
---|
77 | |
---|
78 | private static final String PROJECT_NAME_2 = |
---|
79 | TestFoo.class.getName() + "2"; |
---|
80 | |
---|
81 | // ..... |
---|
82 | } |
---|
83 | |
---|
84 | � INSTRUMENTATION |
---|
85 | |
---|
86 | The org.modelica.mdt.omc plugin defines trace options. The options can be used |
---|
87 | to get an insite on what the plugin is up to. So far only tracing communication |
---|
88 | with OMC is implemented. |
---|
89 | |
---|
90 | The options can be enabled from the 'Run' dialog. Choose 'Run->Run...' from |
---|
91 | the top menu. In the 'Run' dialog make sure your Eclipse Application run |
---|
92 | configuration is selected, the tracing options are available in the 'Tracing' |
---|
93 | tab. |
---|
94 | |
---|
95 | �� org.modelica.mdt.omc/trace/omcCalls |
---|
96 | |
---|
97 | When enabled writes calls to and replys from OMC to the standard out. Calls |
---|
98 | are prefixed with ">>" and replyes are preseeded with "<<". |
---|
99 | |
---|
100 | Actually the calls which a logged are the arguments to function sendExpression() |
---|
101 | in the OMC which is called through the CORBA interface. |
---|
102 | |
---|
103 | �� org.modelica.mdt.omc/trace/omcStatus |
---|
104 | |
---|
105 | Loggs the status of the connection to an OMC instance. So far only the code |
---|
106 | that sets up the OMC connection is covered. |
---|
107 | |
---|
108 | � MAKING A RELEASE |
---|
109 | |
---|
110 | �� MOTIVATIONAL BLURB |
---|
111 | |
---|
112 | The intention of this section is to serve as both a cheat sheet while making a |
---|
113 | release and to formalize the release building process. A more formal release |
---|
114 | procedure should help avoid making stupid misstakes and hopefully improve the |
---|
115 | quality of the releases. All in all, doesn't everyone love processes? |
---|
116 | |
---|
117 | �� THE RELEASE PROCEDURE |
---|
118 | |
---|
119 | * start with a clean workspace, e.g. use File->Switch Workspace and switch to |
---|
120 | an empty folder |
---|
121 | |
---|
122 | * checkout (as Plugin-Projects) from whatever branch/revision you want to make |
---|
123 | a release: |
---|
124 | |
---|
125 | - org.modelica.mdt.tests |
---|
126 | - org.modelica.mdt.core |
---|
127 | - org.modelica.mdt.omc |
---|
128 | - org.modelica.mdt.ui |
---|
129 | |
---|
130 | * run the regression tests |
---|
131 | If some of the tests fail, go back to the drawing board. |
---|
132 | |
---|
133 | * remove all projects from the workspace |
---|
134 | |
---|
135 | * make a version tag in the repository |
---|
136 | |
---|
137 | * checkout from version tag location in the repository: |
---|
138 | |
---|
139 | - org.modelica.mdt.core |
---|
140 | - org.modelica.mdt.omc |
---|
141 | - org.modelica.mdt.ui |
---|
142 | - org.modelica.mdt.feature |
---|
143 | - org.modelica.mdt.site |
---|
144 | |
---|
145 | * update version number in org.modelica.mdt/plugin.xml |
---|
146 | |
---|
147 | * run 'PDE tools'->'Build site' from the context menu of |
---|
148 | org.modelica.mdt.site/site.xml |
---|
149 | |
---|
150 | * export the update site to a public webserver, use 'Export'->'File System' |
---|
151 | wizard. Make sure that both features and plugin directories are exported. |
---|
152 | |
---|
153 | * test with a clean eclipse installation that the MDT-plugin installs correctly |
---|
154 | from the update site. Use the Help->'Software Updates'->'Find and Install...' |
---|
155 | Check that it runs as expected. |
---|
156 | |
---|
157 | * enjoy the release party! |
---|
158 | |
---|