Java Code Examples for org.eclipse.emf.ecore.util.EcoreUtil.getID()

The following are Jave code examples for showing how to use getID() of the org.eclipse.emf.ecore.util.EcoreUtil class. You can vote up the examples you like. Your votes will be used in our system to get more good examples.
Example 1
Project: neoscada   File: Names.java   Source Code and License Vote up 5 votes
public static String makeName ( final NamedDocumentable documentable )
{
    if ( documentable.getName () != null )
    {
        return documentable.getName ();
    }
    else
    {
        return EcoreUtil.getID ( documentable );
    }
}
 
Example 2
Project: gemoc-studio-modeldebugging   File: StepHelper.java   Source Code and License Vote up 4 votes
public static String getStepName(Step<?> step) {
	//returns the emf id or the java id if the emf id is null
	return "LogicalStep ["+(EcoreUtil.getID(step) !=  null ? EcoreUtil.getID(step):System.identityHashCode(step)) +"]";
}