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

The following are Jave code examples for showing how to use getEObject() 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.
+ Save this method
Example 1
Project: Tarski   File: TraceManager.java   View Source Code Vote up 5 votes
private EObject findEObject(String sigTypeName, String relativeObjectURI) throws TraceException {
  if (relativeObjectURI != null && sigTypeName != null) {
    SigTrace trace = getSigTraceByType(sigTypeName);
    return EcoreUtil.getEObject(trace.getLoad().getInstanceRoot(), relativeObjectURI);
  }
  return null;
}
 
Example 2
Project: Tarski   File: TraceManager.java   View Source Code Vote up 5 votes
@SuppressWarnings("unused")
private EObject findEObject(String uri) {
  String rootURI = uri.split("#")[0];
  String relURI = uri.split("#")[1];
  EObject root = findInstanceRootByURI(rootURI);

  return EcoreUtil.getEObject(root, relURI);
}