Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » Finding the edit resource locator for an EAttribute
Finding the edit resource locator for an EAttribute [message #1807959] Thu, 13 June 2019 09:15 Go to next message
Felix Dorner is currently offline Felix DornerFriend
Messages: 392
Registered: December 2015
Senior Member
I'd like to read out the generated property strings for features, the ones in the ItemProviders that look like "_UI_EClassName_featureName_feature", but I have only given the feature itself, not an instance of an object with that feature, so I can't get to the item provider. Is there any other way that I can use to find the corresponding Edit plugin to find the resource string?

Re: Finding the edit resource locator for an EAttribute [message #1807960 is a reply to message #1807959] Thu, 13 June 2019 09:23 Go to previous messageGo to next message
Felix Dorner is currently offline Felix DornerFriend
Messages: 392
Registered: December 2015
Senior Member
Oh, maybe the only other way is to find the edit plugin symbolic name via the GenModel, using org.eclipse.emf.ecore.plugin.EcorePlugin.getEPackageNsURIToGenModelLocationMap() and then reflection galore.
Re: Finding the edit resource locator for an EAttribute [message #1807962 is a reply to message #1807960] Thu, 13 June 2019 10:52 Go to previous message
Ed Willink is currently offline Ed WillinkFriend
Messages: 7655
Registered: July 2009
Senior Member
Hi

Yes. You can try to duplicate the name synthesis and can often get it right, but for difficult cases involving disambiguation of names, it is much much safer to re-use the algorithm that GenModel used in the first place.

Regards

Ed Willink
Previous Topic:Disable or Hide the font options from Menubar
Next Topic:EMF Validation Framework and reading a file
Goto Forum:
  


Current Time: Thu Apr 25 03:33:34 GMT 2024

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

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

Back to the top