Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » Multiple editors
Multiple editors [message #1862230] Sun, 19 November 2023 16:43 Go to next message
Klarise Hund is currently offline Klarise HundFriend
Messages: 24
Registered: October 2022
Junior Member
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 06:57 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33143
Registered: July 2009
Senior Member
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.

Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Multiple editors [message #1863321 is a reply to message #1862238] Thu, 25 January 2024 22:13 Go to previous messageGo to next message
Klarise Hund is currently offline Klarise HundFriend
Messages: 24
Registered: October 2022
Junior Member
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 22:35]

Report message to a moderator

Re: Multiple editors [message #1863323 is a reply to message #1863321] Fri, 26 January 2024 08:22 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 33143
Registered: July 2009
Senior Member
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.

Ed Merks
Professional Support: https://www.macromodeling.com/
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: Thu May 02 07:34:59 GMT 2024

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

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

Back to the top