org.eclipse.xtext.serializer.sequencer.AbstractDelegatingSemanticSequencer Maven / Gradle / Ivy
/*******************************************************************************
* Copyright (c) 2012 itemis AG (http://www.itemis.eu) and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*******************************************************************************/
package org.eclipse.xtext.serializer.sequencer;
import org.eclipse.xtext.serializer.acceptor.ISemanticSequenceAcceptor;
import org.eclipse.xtext.serializer.diagnostic.ISerializationDiagnostic.Acceptor;
import com.google.inject.Inject;
import com.google.inject.Provider;
/**
* @author Moritz Eysholdt - Initial contribution and API
*/
public abstract class AbstractDelegatingSemanticSequencer extends AbstractSemanticSequencer {
@Inject
@GenericSequencer
protected Provider genericSequencerProvider;
protected ISemanticSequencer genericSequencer;
@Override
public void init(ISemanticSequencer sequencer, ISemanticSequenceAcceptor sequenceAcceptor, Acceptor errorAcceptor) {
super.init(sequencer, sequenceAcceptor, errorAcceptor);
this.genericSequencer = genericSequencerProvider.get();
this.genericSequencer.init(sequencer, sequenceAcceptor, errorAcceptor);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy