Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Sirius » Problems of Product Life Cycle Management
Problems of Product Life Cycle Management [message #1791223] Tue, 26 June 2018 08:01 Go to next message
Bo Zhang is currently offline Bo ZhangFriend
Messages: 28
Registered: July 2017
Junior Member
Hi,
I want to implement Product Life Cycle Management as descripted in https://www.eclipse.org/sirius/doc/developer/integration-plm.html. but I have some problems about it.

1. When I implement the interface IPermissionAuthority, I fond the parameter of method canCreateIn is DViewSpec, it is the representation canbe created. But my requirement is: user only can create one diagram for one element. From the parameter, I don't know the does the element has representation. So how to implement it?

2. How to implement IPermissionProvider::provides method? I know I can return true directly, but I don't know is it the correct implement way.

3. For delete and rename operations, I already forbid them in my PermissionAuthority, and it is disable in right-click menu. But user also can delete or rename the representation by delete and F2 button in the keyboard. I check the source code found, DeleteActionHandler and RenameActionHandler never check the enable of the Action. So how to forbid them in my PermissionAuthority?

Thank you very much.
Re: Problems of Product Life Cycle Management [message #1791348 is a reply to message #1791223] Thu, 28 June 2018 09:38 Go to previous message
Laurent Fasani is currently offline Laurent FasaniFriend
Messages: 182
Registered: October 2014
Senior Member
Hello

1. Indeed you have no other information that the container of the element you may create. Nevertheless, you can implement the precondition on the DiagramDescription.
self variable is your smeantic object os you can use a service that will search in the model if there is already an existing diagram for this semantic object.
Below a peace of code to help you implement your service
SiriusReferenceFinder srf = SiriusReferenceFinder.of(semanticObject);
srf.getImpactedRepresentationDescriptors(semanticObject,..)


2. Returning true to IPermissionProvider::provides is a correct implementation in the case you want your own PermissionAuthority to manage the lock of the objects. But you may have some cases where you would not and then implement that logic in IPermissionProvider::provides

3. Indeed, PermissionAuthority will not be check in advance using delete and F2 button in the keyboard. Then the delete or rename action is possible but will fail afterwards when PermissionAuthority is asked. I invite you to open a bugzilla. https://bugs.eclipse.org/bugs/enter_bug.cgi?product=Sirius

regards
Laurent


Laurent Fasani - Obeo
Need training or professional services for Sirius?
http://www.obeodesigner.com/sirius
Previous Topic:Getting exceptionwhile clicking drag and drop
Next Topic:[ANN] Sirius 6.0.0
Goto Forum:
  


Current Time: Fri Mar 29 13:03:56 GMT 2024

Powered by FUDForum. Page generated in 0.02500 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top