@Override public EObject getUnderlyingElement(final Object facet) { if (facet == null) { return element; } if (facet instanceof EObject) { return (EObject) facet; } final IExpressionDescription f = facet instanceof IExpressionDescription ? (IExpressionDescription) facet : facets.get(facet); if (f == null) { return element; } final EObject target = f.getTarget(); if (target == null) { return element; } return getExpressionFactory().getFacetExpression(this, target); // if ( target.eContainer() == null ) { return target; } // return target.eContainer(); // Should be a Facet // if ( f != null && f.getTarget() != null && f.getTarget().eContainer() // != null ) { return f.getTarget(); } // return element; }
protected void compileTypeProviderFacets() { for (final String s : typeProviderFacets) { final IExpressionDescription expr = facets.get(s); if (expr != null) { expr.compile(this); } } }