protected CompositeNode getParent(EObject obj, EReference eRef, String crossRefString, int offset, int length) {
		ICompositeNode node = NodeModelUtils.getNode(obj);
		if (node != null) {
			ICompositeNode rootNode = node.getRootNode();
			if (rootNode instanceof CompositeNode)
				return (CompositeNode) rootNode;
		}
		Resource resource = obj.eResource();
		if (resource instanceof XtextResource) {
			IParseResult parseResult = ((XtextResource) resource).getParseResult();
			if (parseResult != null) {
				ICompositeNode rootNode = parseResult.getRootNode();
				if (rootNode instanceof CompositeNode)
					return (CompositeNode) rootNode;
			}
		}
		return null;
	}
protected CompositeNode getParent ( EObject obj , EReference eRef , String crossRefString , int offset , int length ) { ICompositeNode node = NodeModelUtils . getNode ( obj ) ; if ( node != null ) { ICompositeNode rootNode = node . getRootNode ( ) ; if ( rootNode instanceof CompositeNode ) return ( CompositeNode ) rootNode ; } Resource resource = obj . eResource ( ) ; if ( resource instanceof XtextResource ) { IParseResult parseResult = ( ( XtextResource ) resource ) . getParseResult ( ) ; if ( parseResult != null ) { ICompositeNode rootNode = parseResult . getRootNode ( ) ; if ( rootNode instanceof CompositeNode ) return ( CompositeNode ) rootNode ; } } return null ; }
@since 2.10