You are visiting this site as:
WikiGuest
Log In
Users
UCM
ProjetSEG
Work
EHealth
Main
System
You are here:
ProjetSEG Web
>
JUCMNavDevDoc
>
DevDocGuideAddElement
(13 Jul 2005)
Extension Guide : Add New UCM Element
Overview
The purpose of this guide is to give pointers on what tasks need to be accomplished when a new model element is to be added.
For simplification purposes, lets consider adding a new PathNode subclass.
This guide should be verified by the person actually following the guide.
Initial Steps
Read
JUCMNav Dev Doc
articles if you have the time
You'll need to add your model element to the palette so that it can be added.
Create an icon; maybe we've already created it for you; check the icons folder (See
Dev Doc Icons
)
Make sure ModelCreationFactory can generate instances of your new object (See
Dev Doc Model Creation Factory
)
Add entry in UcmPaletteRoot.buildPalette() (See
Dev Doc Palette
)
Create a figure for your new model element (See
Dev Doc Figures
)
Create an editpart for your new element (See
Dev Doc Edit Part Creation
)
Register your figure in PathNodeEditPart.createFigure()
If you have lots of new behaviour, extend PathNodeEditPart and Register yourself in GraphicalEditPartFactory
Do same for outline (See
Dev Doc Outline
):
Simply add icon image in PathNodeTreeEditPart
Hopefully won't need to access TreeEditPartFactory
Optional Steps
You'll probably have some special "do something or other" that you'll want to add to the contextual menu.
Create a command that does your work (See
Dev Doc Commands
). Look at many command examples before attempting this; it is critical.
Create an action that maps a user selection to your command. (See
Dev Doc Actions
)
Don't forget to register your action in the action registry and context menu provider.
Testing
Any command you created implements JUCMNavCommand and must therefore implement testPreConditions()/testPostConditions(). (See
Dev Doc Commands
)
Create a simple test case in JUCMNavCommandTests; simply add a method and a few lines that execute your command. Find other examples.
You might want to create tests for your action (elsewhere) as well, if it is complicated.
See
Dev Doc Checkout Code
for running the tests.
--
Jason Kealey
- 14 Jul 2005
E
dit
|
A
ttach
|
P
rint version
|
H
istory
: r1
|
B
acklinks
|
R
aw View
|
Ra
w
edit
|
M
ore topic actions
Topic revision: r1 - 13 Jul 2005 - 21:04:51 -
Jason Kealey
ProjetSEG Web
ProjetSEG Web Home
Changes
Index
Search
Webs
Main
ProjetSEG
Sandbox
System
UCM
Create
personal sidebar
English
Français
Copyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding Foswiki?
Send feedback