Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » Comparing EDataType
Comparing EDataType [message #508315] Mon, 18 January 2010 11:36 Go to next message
Andre Ribeiro is currently offline Andre RibeiroFriend
Messages: 58
Registered: July 2009
Member
Hi,

What should the fastest (& most correct) way to know if a given
EStructuralFeature is of type EString (or any other EDataType)?

i'm currently using the following:
structuralFeature.getEType().getInstanceClass().equals(Strin g.class)
but i suspect this isn't the most appropriate way to do it, is it?

thanks,
André
Re: Comparing EDataType [message #508400 is a reply to message #508315] Mon, 18 January 2010 16:08 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 30653
Registered: July 2009
Senior Member
André,

Using structurealFeature.getEType() == EcorePackage.Literals.ESTRING is
the fast if you know the specific EDataType.


André Ribeiro wrote:
> Hi,
>
> What should the fastest (& most correct) way to know if a given
> EStructuralFeature is of type EString (or any other EDataType)?
>
> i'm currently using the following:
> structuralFeature.getEType().getInstanceClass().equals(Strin g.class)
> but i suspect this isn't the most appropriate way to do it, is it?
>
> thanks,
> André
Previous Topic:EMF tree editor and serialization don't honor unsettable=true
Next Topic:emf.ecore2Java and templatepath
Goto Forum:
  


Current Time: Thu Nov 21 08:04:16 GMT 2019

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

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

Back to the top