Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add read-only mode #2

Open
agarciadom opened this issue Jul 28, 2022 · 0 comments
Open

Add read-only mode #2

agarciadom opened this issue Jul 28, 2022 · 0 comments
Labels
enhancement New feature or request

Comments

@agarciadom
Copy link
Member

To allow for modification of the model (whether it is to be stored on disposal or not), getting any many-valued feature returns a "proxy list", whose operations are delegated to the underlying EList in MagicDraw.

If the model is only to be read and never modified, it may improve performance to return the lists directly, rather than the proxy lists. This would dramatically reduce the number of roundtrips needed, for example, to loop over the list.

This would most likely need:

  • An addition of isReadOnly() / setReadOnly(boolean) methods to the MagicDrawModel class.
  • Extending the MagicDrawPropertySetter to throw an IllegalStateException if it is used when the model is in read-only mode.
  • The extension of the ValueEncoder class in mdplugin.remote with a method to encode ELists of various element types.
  • The extension of the MagicDrawPropertyGetter in two ways, if and only if the model is in read-only mode (existing behaviour outside of read-only mode should be preserved):
    • It will decode the returned lists back into an EolSequence.
    • It will refuse to decode a PROXYLIST Value and instead throw an exception explaining the issue.
@agarciadom agarciadom added the enhancement New feature or request label Jul 28, 2022
@agarciadom agarciadom added the priority:low Low priority task label Sep 6, 2022
@agarciadom agarciadom added priority:medium Medium priority task and removed priority:low Low priority task labels Sep 26, 2022
@agarciadom agarciadom removed the priority:medium Medium priority task label Mar 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant