Skip to main content



      Home
Home » Modeling » EMF » Multiple editors
Multiple editors [message #1862230] Sun, 19 November 2023 11:43 Go to next message
Eclipse UserFriend
Hi,

Can a single metamodel in Ecore, have multiple model editors? Let us say that for different purposes and users I would like to have different model editors (each of which I will customise accordingly). But to do that, can I use a single metamodel, or do I need multiple metamodels, one for each model editor?
I would actually like to achieve the first, so if there is a way to do that, I would appreciate if you could share your insights.

Thanks !
Re: Multiple editors [message #1862238 is a reply to message #1862230] Mon, 20 November 2023 01:57 Go to previous messageGo to next message
Eclipse UserFriend
The generator only generates one editor, but you can implement and register as many editors as you want, perhaps by extending and specializing the generated editor. That's why every file has an Open With in context menu with the choices for all the registered editors registered for that type of resource.
Re: Multiple editors [message #1863321 is a reply to message #1862238] Thu, 25 January 2024 17:13 Go to previous messageGo to next message
Eclipse UserFriend
Hi Ed,

I have a question regarding this approach of implementing and registering multiple editors.
- Let us say that I have Model_A conforming to Metamodel_A.
- Let us say that for Metamodel_A I have generated Editor_1, Editor_2 and Editor_3.
- According to this approach, when I right click on Model_A -> Open With..., besides the default editors I get Editor_1, Editor_2, and Editor_3 .

My question is: Is there a way to show only a set of the registered editors to a particular user? For instance, to implement a login system where users can login. Based on the user, it shows different editors for the same model. For instance, to Ed, only Editor_1 and Editor_2 is shown, while to Klarise, only Editor_2 and Editor_3.


Do you have any suggestion on how to achieve that? Can it be achieved in the first place?

Thanks!

[Updated on: Thu, 25 January 2024 17:35] by Moderator

Re: Multiple editors [message #1863323 is a reply to message #1863321] Fri, 26 January 2024 03:22 Go to previous message
Eclipse UserFriend
This isn't really an EMF question but a general question about the Platform abilities. There is no mechanism for filtering available/registered editors via some property.
Previous Topic:Access Ecore class Attribute with multiplicity 0..1 (Optional parameter)
Next Topic:How to get an Object from it's uri path
Goto Forum:
  


Current Time: Mon Jul 14 05:44:13 EDT 2025

Powered by FUDForum. Page generated in 0.03694 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top