[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.modeling.gmf] Adding custom Decorators on diagram nodes

Hi,

I'm trying to add decorators to the nodes in a diagram editor based on some custom validation that is done, for example, I have created some validation on how the entities on the diagram should be named, ie, follow some naming convention. I would like the error decorators (like images appear on problem view markers) to appear when there is a change made to the name of the entity on the diagram and the model is saved, based on the custom validation. Here is my extension point:

<extension point="org.eclipse.gmf.runtime.diagram.ui.decoratorProviders"> <decoratorProvider class="com.s1.pmt.prod.businessspecification.gmf.editor.providers.ErrorDecoratorProvider">
<Priority name="Lowest"/>
</decoratorProvider>
</extension>



I have the 'ErrorDecoratorProvider' class implement the IDecoratorProvider interface. I see that the decorator service is invoked only when user performs something which is an operation, ie,


public boolean provides(IOperation operation) {
			}

and not when user makes changes to the names of the entities (which are property change 'events' and not 'operation'). Is there a way to invoke the decorator service on the events as opposed to operations alone? Your answer is appreciated. Thanks.