|Provide custom DAnalysisSessionImpl [message #1850376]
||Mon, 28 February 2022 09:47
| Ali AKAR
Registered: July 2009
Sirius provides an extension point org.eclipse.sirius.sessionFactory to contribute a factory and we can create our custom session using our custom contributed factory.
I need to change a bit the behavior of the DAnalysisSessionImpl but as it is in an internal package it's not recommended to be overriden.
When I create my own CustomDAnalysisSessionImpl which extends DAnalysisSessionEObjectImpl and implements Session, DAnalysisSession, ResourceSyncClient, I face the issue that DAnalysisSessionImpl is casted at many place of the code and also used as parameter of some methods without using the interface DAnalysisSession.
Below are some example where the cast is done:
#org.eclipse.sirius.diagram.business.internal.dialect.DiagramDialectServices.createRepresentation(String, EObject, RepresentationDescription, Session, IProgressMonitor)
#org.eclipse.sirius.business.api.dialect.AbstractRepresentationDialectServices.copyRepresentation(DRepresentationDescriptor, String, Session, IProgressMonitor)
So I wonder why the interface DAnalysisSession is not used and what is the best way to provide a custom Session.
Thank you in advance for you feedback.
Powered by FUDForum
. Page generated in 0.01675 seconds