A year ago, the plan was to develop a set of MDD tools to simplify R & D, standardize and provideCodeQuality.
The mdd I understand consists of four parts:
First, modeling (data model and Object Model)
Second, a set of universal generators (freemarker)
Third, the company edition dedicated eclipse
4. High-quality code templates (long-term accumulation process)
Steps 1 and 4 are the foundation, but they depend on steps 2 and 3. Comments
Let's talk about the code.
<! -- Right-click Project menu -->
< Extension Point = "Org. Eclipse. UI. popupmenus" >
< Objectcontribution Objectclass = "Org. Eclipse. jdt. Internal. Core. javaproject" ID = "Cn.net. comsys. mdd. Frame. porjectmenu" >
< Menu ID = "Ucittools" Label = "Ucit Tools" >
< Separator Name = "Dir1" > </ Separator >
</ Menu >
< Menu ID = "Is" Label = "Is Tools" Path = "Ucittools/dir1" >
< Separator Name = "Istools" > </ Separator >
</ Menu >
< Menu ID = "Ut" Label = "Ut Tools" Path = "Ucittools/dir1" >
< Separator Name = "Uttools" > </ Separator >
</ Menu >
< Action
Enablesfor = "1"
Label = "Add is module"
Icon = "Icons/sample.gif"
Class = "Cn.net. comsys. mdd. Frame. Is. Actions. isprojectaddmodule"
ID = "Addismodule"
Menubarpath = "Ucittools/is/istools" >
</ Action >
< Action
Enablesfor = "1"
Label = "Add ut module"
Icon = "Icons/sample.gif"
Class = "Cn.net. comsys. mdd. Frame. ut. Actions. utprojectaddmodule"
ID = "Addutmodule"
Menubarpath = "Ucittools/UT/uttools" >
</Action>
</Objectcontribution>
</Extension>
Java code:
Package Cn.net. comsys. mdd. Frame. ut. actions;
ImportOrg. Eclipse. jface. Action. iaction;
ImportOrg. Eclipse. jface. dialogs. messagedialog;
ImportOrg. Eclipse. jface. Viewers. iselection;
ImportOrg. Eclipse. UI. iobjectactiondelegate;
ImportOrg. Eclipse. UI. iworkbenchpart;
ImportOrg. Eclipse. UI. iworkbenchwindow;
/**
* @ author Jif
* @ version Creation Time: 05:41:40
* E-mail: liaojifeng@163.com
* class description:
*
*/
Public class utprojectaddmodule implements iobjectactiondelegate {
private iworkbenchwindow window;
@ override
Public void setactivepart (iaction arg0, iworkbenchpart arg1) {
// todo auto-generated method stub
}
@ override
Public void Run (iaction arg0) {
// todo auto-generated method stub
system. out. println ( " ut framework, Run mouse client ...... " );
}
@ Override
Public VoidSelectionchanged (iaction arg0, iselection arg1 ){
//Todo auto-generated method stub
}
}