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 use EmbeddedEditorResourceProvider for creating XtextResource
        Type Parameters:
        T - type of the root language grammar element
        Parameters:
        textToParse - text of language
        uri - URI of created resource
        resourceSet - ResourceSet of created resource
        options - the load options
        outputErrors - empty list of output errors, will be filled with parse errors during method execution, cannot be null
        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 language
        uri - URI of created resource
        options - the load options
        outputErrors - empty list of output errors, will be filled with parse errors during method execution, cannot be null
        Returns:
        the root element of the language model
        Throws:
        org.eclipse.emf.common.util.WrappedException - if resource wasn't load
        IllegalStateException - if there is no XtextResourceSet