source: default/trunk/de.ugoe.cs.swe.bnftools.ebnf.ui/src/de/ugoe/cs/swe/bnftools/utils/RootEObjectFinder.java

Last change on this file was 5, checked in by zeiss, 14 years ago
  • Property svn:mime-type set to text/plain
File size: 486 bytes
Line 
1package de.ugoe.cs.swe.bnftools.utils;
2
3import org.eclipse.emf.ecore.EObject;
4import org.eclipse.xtext.parser.IParseResult;
5import org.eclipse.xtext.resource.XtextResource;
6import org.eclipse.xtext.util.concurrent.IUnitOfWork;
7
8public class RootEObjectFinder implements IUnitOfWork<EObject, XtextResource> {
9
10        public EObject exec(XtextResource state) throws Exception {
11                IParseResult parseResult = state.getParseResult();
12                return parseResult.getRootASTElement();
13        }
14
15}
Note: See TracBrowser for help on using the repository browser.