[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [epsilon-dev] Proposal to add isLoaded to IModel
|
Sina,
An UnsupportedOperationException would work around the compilation
error issue but would produce exceptions at runtime so it's not ideal.
I understand the rationale of the method; given that it's a breaking
change, what I'm looking for is a couple of concrete scenarios where
we need it - i.e. where an Epsilon module is presented with a model
and it needs to check whether it's loaded. Let's also wait for Betty's
and Horacio's responses.
Cheers,
Dimitris
On Mon, 9 Dec 2019 at 11:11, Sina Madani <sinadoom@xxxxxxxxxxxxxx> wrote:
>
> Hi Dimitris,
>
> Thank you for your response. The main rationale is to be able to determine a model's state. When given an IModel reference it is currently impossible to know whether it is safe to query it because there is no way to know if load or dispose has been called. The only option is to try allContents, for example, and catch an exception. This is very inefficient however.
>
> If backwards compatibility is a concern perhaps we could make it a default method and throw new UnsupportedOperationException, but for any IModel which implements load and/or dispose this method is trivial to implement and should be implemented.
>
> I think Betty and Horacio or others may also want to chime in here with their use cases as it's something I recall being discussed before.
>
> Thanks,
> Sina
>
>
> From: Dimitris Kolovos <dimitris.kolovos@xxxxxxxxxx>
> Date: Mon, 9 Dec 2019 10:39:35 +0000
> Delivered-to: epsilon-dev@xxxxxxxxxxx
>
> 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
>
> _______________________________________________
> 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