[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [epsilon-dev] Proposal to add isLoaded() to IModel
|
Hi Sina,
Thanks for the proposal and for investigating its impact. Could you
briefly summarise a couple of use-cases for this new method? As this
will be a breaking change (any EMC drivers that we don't control will
produce compilation errors) it'd be useful to have some justification
on record.
Thanks,
Dimitris
On Sat, 7 Dec 2019 at 16:02, Sina Madani <sinadoom@xxxxxxxxxxxxxx> wrote:
>
> Hi everyone,
>
>
>
> I’ve been thinking of adding an isLoaded() method to IModel to determine whether the load() method has been called. As a first step I’ve gone through all EMC drivers that I could find to see how it would work by implementing the method, and without any exception all implementations have been trivial. Every model has an underlying resource which is initialized or mutated when load is called. Therefore the implementation of isLoaded() is, in every case I have encountered, a simple null check. Infact the most “complex” case is AbstractEmfModel, which is still a one-line expression:
>
>
>
> public boolean isLoaded() {
>
> return modelImpl != null && modelImpl.isLoaded();
>
> }
>
>
>
> Since this is a low-effort method to implement and appears to be very generalisable, combined with the upcoming 2.0 release, I propose to make this an abstract method in IModel.
>
>
>
> Thanks,
>
> Sina
>
>
>
>
>
> _______________________________________________
> epsilon-dev mailing list
> epsilon-dev@xxxxxxxxxxx
> To change your delivery options, retrieve your password, or unsubscribe from this list, visit
> https://www.eclipse.org/mailman/listinfo/epsilon-dev
--
Dimitris Kolovos
Professor of Software Engineering
Department of Computer Science
University of York
http://www.cs.york.ac.uk/~dkolovos
EMAIL DISCLAIMER http://www.york.ac.uk/docs/disclaimer/email.htm