[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.modeling.gmf] Re: how to make a node pre-displayed inside another node

Yuzhang Han wrote:


Create feature sequence initializers for node A creating node B
automatically.

good way to go. If you want to take full control of the creation / configuration of elements you can configure an AdviceBinding. For more information and some examples, see:


Eclipse Help contents > GMF Developer Guide > Programmer's Guide > Runtime
Extensible Type Registry > "Binding Advice to an Existing Element Type"


For example you could overwrite "getAfterConfigureCommand(ConfigureRequest)". This way you get a hook to provide a more complex configuration. For example you could easily instantiate an element B when the configuration of A is requested. This again results in an configure request after B has been created, and so on ..


A good example for an advice binding is the class "NotationViewDependentsAdvice".



Cheers,

     sas