Package org.eclipse.xtext.serializer.sequencer

Examples of org.eclipse.xtext.serializer.sequencer.ISemanticSequencer


    serialize(semanticObject, context, tokens, errors, null);
  }

  protected void serialize(EObject semanticObject, EObject context, ISequenceAcceptor tokens,
      ISerializationDiagnostic.Acceptor errors, ICommentReconcilement commentReconciliator) {
    ISemanticSequencer semantic = semanticSequencerProvider.get();
    ISyntacticSequencer syntactic = syntacticSequencerProvider.get();
    IHiddenTokenSequencer hidden = hiddenTokenSequencerProvider.get();
    semantic.init((ISemanticSequenceAcceptor) syntactic, errors);
    syntactic.init(context, semanticObject, (ISyntacticSequenceAcceptor) hidden, errors);
    if(hidden instanceof IHiddenTokenSequencer2)
      ((IHiddenTokenSequencer2) hidden).init(context, semanticObject, tokens, errors, commentReconciliator);
    else
      hidden.init(context, semanticObject, tokens, errors);

    // NOTE: This is not so nice
    if(tokens instanceof TokenStreamSequenceAdapter)
      ((TokenStreamSequenceAdapter) tokens).init(context);
    else if(tokens instanceof DomModelSequenceAdapter)
      ((DomModelSequenceAdapter) tokens).init(context, semanticObject);

    semantic.createSequence(context, semanticObject);
  }
View Full Code Here

TOP

Related Classes of org.eclipse.xtext.serializer.sequencer.ISemanticSequencer

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.