You are here:
(13 Jul 2005,
Extension Guide : Add New UCM Element
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.
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
Make sure ModelCreationFactory can generate instances of your new object (See
Add entry in UcmPaletteRoot.buildPalette() (See
Create a figure for your new model element (See
Create an editpart for your new element (See
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
Simply add icon image in PathNodeTreeEditPart
Hopefully won't need to access TreeEditPartFactory
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
). Look at many command examples before attempting this; it is critical.
Create an action that maps a user selection to your command. (See
Don't forget to register your action in the action registry and context menu provider.
Any command you created implements JUCMNavCommand and must therefore implement testPreConditions()/testPostConditions(). (See
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.
for running the tests.
- 14 Jul 2005
iew wiki text
ore topic actions
Topic revision: r1 - 13 Jul 2005,
ProjetSEG Web Home
Copyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding Foswiki?