Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » "EcoreEditPlugin.INSTANCE" sometimes appears in generated XXXEditPlugin.java
"EcoreEditPlugin.INSTANCE" sometimes appears in generated XXXEditPlugin.java [message #1809244] Fri, 12 July 2019 09:10 Go to next message
Aurélien Mora is currently offline Aurélien MoraFriend
Messages: 37
Registered: July 2014
Member
Hello,

In the generated EditPlugin class (here for example (wich is by the way the same project than the one I attached here)), a wild "EcoreEditPlugin.INSTANCE" can appear or disappear when I regenerate my models. Not a problem, everything works, but it generates useless diff in my commits.
public InferenceEditPlugin()
{
	super (new ResourceLocator [] 
	{
		ActionEditPlugin.INSTANCE,
		EcoreEditPlugin.INSTANCE,
		TypesEditPlugin.INSTANCE,
	});
}


For now, I have no clues why it generates something different, and I don't see any specific pattern to produce one generation or one other.

Maybe somebody have more information about that?

[Updated on: Fri, 12 July 2019 09:13]

Report message to a moderator

Re: "EcoreEditPlugin.INSTANCE" sometimes appears in generated XXXEditPlugin.java [message #1809253 is a reply to message #1809244] Fri, 12 July 2019 12:36 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 30687
Registered: July 2009
Senior Member
If I recall correctly you have several *.xcore files in the same project, right? There are some classes such as the plugin that is a singleton for the project, i.e., you generally get one per GenModel. When you have multiple *.xcore files in a project each one will try to generate the edit plugin, each with potentially different results. It's really not a great approach to have more than one *.xcore resource in a project...
Re: "EcoreEditPlugin.INSTANCE" sometimes appears in generated XXXEditPlugin.java [message #1809311 is a reply to message #1809253] Sat, 13 July 2019 01:47 Go to previous messageGo to next message
Aurélien Mora is currently offline Aurélien MoraFriend
Messages: 37
Registered: July 2014
Member
Ok, thank you.

Indeed, I don't really like to have big files of code, so I prefer to make many .xcore. I solve some issues with the annotation @GenModel(updateClasspath="false") to all .xcores except one.

So your advice would be to make ;ore projects, one per xcore?
Re: "EcoreEditPlugin.INSTANCE" sometimes appears in generated XXXEditPlugin.java [message #1809324 is a reply to message #1809311] Sat, 13 July 2019 06:15 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 30687
Registered: July 2009
Senior Member
Yes, that would likely eliminate recurring problems related to your current approach, e.g.,

https://bugs.eclipse.org/bugs/show_bug.cgi?id=549207
Re: "EcoreEditPlugin.INSTANCE" sometimes appears in generated XXXEditPlugin.java [message #1809388 is a reply to message #1809324] Mon, 15 July 2019 10:26 Go to previous messageGo to next message
Aurélien Mora is currently offline Aurélien MoraFriend
Messages: 37
Registered: July 2014
Member
If I convert my .xcores to .ecores (still, with multiple ecores per project), could it help too?
Re: "EcoreEditPlugin.INSTANCE" sometimes appears in generated XXXEditPlugin.java [message #1809390 is a reply to message #1809388] Mon, 15 July 2019 11:30 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 30687
Registered: July 2009
Senior Member
There should be a single GenModel per project but that GenModel can have multiple GenPackages.
Re: "EcoreEditPlugin.INSTANCE" sometimes appears in generated XXXEditPlugin.java [message #1809655 is a reply to message #1809390] Fri, 19 July 2019 10:41 Go to previous message
Aurélien Mora is currently offline Aurélien MoraFriend
Messages: 37
Registered: July 2014
Member
Ok, for the record: yes, it solves everything.
I'm a bit sad to let go Xcore, but one genmodel is definitely more practical for me, for now.
Previous Topic:Generic children don't appears in editor
Next Topic:Noticing changes on serialized model
Goto Forum:
  


Current Time: Mon Dec 09 12:22:05 GMT 2019

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

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

Back to the top