Interface IParseHelper
-
- All Known Implementing Classes:
ParseHelper
public interface IParseHelper
Interface for parsing xtext language to the right model
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description <T> T
parse(String textToParse, org.eclipse.emf.common.util.URI uri, Map<?,?> options, List<org.eclipse.emf.ecore.resource.Resource.Diagnostic> outputErrors)
Parses text of xtext languge.<T> T
parse(String textToParse, org.eclipse.emf.common.util.URI uri, org.eclipse.emf.ecore.resource.ResourceSet resourceSet, Map<?,?> options, List<org.eclipse.emf.ecore.resource.Resource.Diagnostic> outputErrors)
Parses text of xtext languge.
-
-
-
Method Detail
-
parse
<T> T parse(String textToParse, org.eclipse.emf.common.util.URI uri, org.eclipse.emf.ecore.resource.ResourceSet resourceSet, Map<?,?> options, List<org.eclipse.emf.ecore.resource.Resource.Diagnostic> outputErrors)
Parses text of xtext languge.
Try to useEmbeddedEditorResourceProvider
for creatingXtextResource
- Type Parameters:
T
- type of the root language grammar element- Parameters:
textToParse
- text of languageuri
-URI
of created resourceresourceSet
-ResourceSet
of created resourceoptions
- the load optionsoutputErrors
- empty list of output errors, will be filled with parse errors during method execution, cannot benull
- Returns:
- the root element of the language model
- Throws:
org.eclipse.emf.common.util.WrappedException
- if resource wasn't load
-
parse
<T> T parse(String textToParse, org.eclipse.emf.common.util.URI uri, Map<?,?> options, List<org.eclipse.emf.ecore.resource.Resource.Diagnostic> outputErrors)
Parses text of xtext languge.- Type Parameters:
T
- type of the root language grammar element- Parameters:
textToParse
- text of languageuri
-URI
of created resourceoptions
- the load optionsoutputErrors
- empty list of output errors, will be filled with parse errors during method execution, cannot benull
- Returns:
- the root element of the language model
- Throws:
org.eclipse.emf.common.util.WrappedException
- if resource wasn't loadIllegalStateException
- if there is noXtextResourceSet
-
-