This service is archived, please use www.eclipse.org/forums


Home » Capella » Capella Studio » Is it possible to forbidden the viewpoint activation ?
Is it possible to forbidden the viewpoint activation ? [message #3353] Thu, 04 July 2019 06:33 Go to next message
labin78.hotmail.com is currently offline  labin78.hotmail.com
Messages: 51
Registered: December 2015
Member
Hi,

If certain conditions are not fulfilled, i wish, for example, that the viewpoint activation open a popup displaying a error message and the viewpoint will be not activated.

Is it possible ? Is there an API to implement for this kind of behavior ?

Thanks.
Re: Is it possible to forbidden the viewpoint activation ? [message #3367 is a reply to message #3353] Mon, 08 July 2019 03:04 Go to previous message
felix.dorner.gmail.com is currently offline  felix.dorner.gmail.com
Messages: 117
Registered: November 2015
Senior Member
Yes. You can extend org.polarsys.capella.common.ef.domain.AbstractEditingDomainR esourceSetListenerImpl, as an example look at org.polarsys.capella.core.sirius.ui.listener.FileModificatio nPreCommitListener. In transacttionAboutToCommit you must check if the transaction events include activation of your vp, and if so, check your condition and throw a rollback exception to abort activation. You must also register your listener:

<extension
point="org.polarsys.capella.common.ef.editingDomainListener ">
<editingDomainListener
class=" org.polarsys.capella.core.sirius.ui.listener.FileModificatio nPreCommitListener ">
</editingDomainListener>
</extension>
Previous Topic: Configure build path with Capella Studio
Next Topic: Custom Validation rule for Requirements Viewpoint
Goto Forum:
  


Current Time: Sat Mar 28 03:39:54 EST 2020

Total time taken to generate the page: 0.01506 seconds