On Jan 23, 2017, 04:19 -0500, Remi Schnekenburger <rschnekenburger@xxxxxxxxxxxxxxxxx>, wrote:
Hi team,
@Patrick: I do not have the implementation details from Christian, but I don't see there issues on using the new facade on OSGi. It should not involve more than EMF and UML2 plugins, which are already supported out of Eclipse & OSGi (at least, it should, or you would not even be able to read the model itself).
That’s right. The modelled API is still in the same bundle and in the same package as before, with the same dependencies. A smooth, compatible evolution for clients.
@all: We indeed discussed yesterday on such improvement on facade support with Philip last week. This is one of the major topic IMO for great support for DSLs for Papyrus and its derivative products. The advantage of using an EMF approach would be indeed the integration with external tools like EMF compare, xtext grammars, QVTo transformation, all the tools that should be EMF based, and that can have some troubles to integrate with UML2 world would be quite transparent to the user.
Current approach with element types fits nicely with GMF runtime, and it could be seen as slightly higher level, but the 2 main drawbacks are the fact that the metamodel complexity is hidden in the configurations and that we cannot enforce that the model is edited through this framework. Xtext is for example not aware of that framework, and tricks have to be used to reuse it. We could see that issue with textual modeling.
I wasn’t looking to make any element-types for the façade: it is still just wrappers on the UML model, and like much of the EMF run-time, the element-types rely on the factory to create “naked” elements that are attached to the model and filled in with details. The façade doesn’t “exist” as such in any model, so these workflows don’t really apply. It is still geared towards providing a thin API to abstract the complexity of UML for extenders primarily.
If we want to drive a complete modelling experience from the façade, then it would have to be more than just a thin wrapper: it would have to be essentially a clone of the UML model that stores all of the same state (well, the subset that UML-RT actually needs) that is synchronized with the UML model, like the AOF approach. But that is still something that I want to avoid: the façade scales as the size of the UML model, and I would prefer the thin wrapper approach over two-way synchronization. So, that does still limit its capabilities to some extent, but leaves room for scalability techniques like soft caching of façades to let them be garbage-collected when no longer in use, and who knows what else we might need with very large models.
I was thinking however to a facade implementation where the elements would really inherit from the UML metaclass, not an association to this class itself. I do know it breaks slightly the UML philosophy, where stereotypes can be removed/added on the fly.
I don’t think this could work. The problem with making, for example, Capsule a subclass of Class is that now instances of it will be persisted in the UML model as Capsules, breaking the UML serialization. Applications that only understand UML will not be able to read these models (although, it is perhaps doubtful the extent to which they could plausibly work with these models anyways). Moreover, it would mean that generic UML-based plug-ins in a Papyrus-RT environment would have to know how to choose between creating a normal Class versus a Capsule, especially as both present equivalent representation of the same concept (as we have already proven with the profile).
But in the case of stereotypes defining new concepts, as the capsule one, I would not be so worried about that side effect. It would cause issues in the case of annotating stereotypes, which should be seen more as associations in this case. This implementation would have of course many drawbacks, but I would be curious to setup also a prototype for that approach. I did not yet think carefully about implementation details. One of the advantage I see here is that we would not maintain a "glue element", but we would have directly a compatible element. This would avoid switching with toUML() and other artifices to real implementation elements.
I guess one of the questions we need to answer is the intended purpose of the façade: do we want it to be the metamodel that the entire tooling is built on, or do we want it to be a convenient API for extenders and other plug-ins to inspect and modify the model without as much complexity as the tooling provided by Papyrus-RT requires? So far, the driving use cases have been the latter, similar to what the “legacy tooling” offers, and the extent to which it has evolved so far is just an accident of my stretching it to use in the Properties View. It hasn’t been on the critical path for the 1.0 release, and I doubt that we could afford to make it so.
I would however be interested to investigate your proposal, Christian, that seems a really interesting step ! :) I am for example curious to discover how notifications can be handled, I remember that was an issue Florian had to work on his facade prototype a few years ago.
That’s one of the details that I have been uninterested in implementing in the façade, is notifications. The use cases so far have been all about code grabbing a façade for some model element, working with it for a bit, and then forgetting about it. Subscribing to notifications hasn’t been interesting. Although, as all of the properties of the façade are (literally) derived by computation, and the façade objects themselves are all attached to the model by Adapters, it would not be difficult to add support for injection of notifications into the façade objects so that they may, themselves, be observed. Not difficult, but it would take time.
So, again my main concern is for scheduling and risk to the delivery of state machine inheritance, if we want to develop the façade into something more than it currently is.
_______________________________________________
papyrus-rt-dev mailing list
papyrus-rt-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/papyrus-rt-dev