本文整理汇总了Java中org.eclipse.xtext.serializer.ISerializationContext类的典型用法代码示例。如果您正苦于以下问题:Java ISerializationContext类的具体用法?Java ISerializationContext怎么用?Java ISerializationContext使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
ISerializationContext类属于org.eclipse.xtext.serializer包,在下文中一共展示了ISerializationContext类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: sequence_Card
import org.eclipse.xtext.serializer.ISerializationContext; //导入依赖的package包/类
/**
* Contexts:
* Card returns Card
*
* Constraint:
* (count=INT name=NAMESTRING setNr=INT set=NAMESTRING)
*/
protected void sequence_Card(ISerializationContext context, Card semanticObject) {
if (errorAcceptor != null) {
if (transientValues.isValueTransient(semanticObject, PkmntcgoPackage.Literals.CARD__COUNT) == ValueTransient.YES)
errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, PkmntcgoPackage.Literals.CARD__COUNT));
if (transientValues.isValueTransient(semanticObject, PkmntcgoPackage.Literals.CARD__NAME) == ValueTransient.YES)
errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, PkmntcgoPackage.Literals.CARD__NAME));
if (transientValues.isValueTransient(semanticObject, PkmntcgoPackage.Literals.CARD__SET_NR) == ValueTransient.YES)
errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, PkmntcgoPackage.Literals.CARD__SET_NR));
if (transientValues.isValueTransient(semanticObject, PkmntcgoPackage.Literals.CARD__SET) == ValueTransient.YES)
errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, PkmntcgoPackage.Literals.CARD__SET));
}
SequenceFeeder feeder = createSequencerFeeder(context, semanticObject);
feeder.accept(grammarAccess.getCardAccess().getCountINTTerminalRuleCall_0_0(), semanticObject.getCount());
feeder.accept(grammarAccess.getCardAccess().getNameNAMESTRINGParserRuleCall_1_0(), semanticObject.getName());
feeder.accept(grammarAccess.getCardAccess().getSetNrINTTerminalRuleCall_2_0(), semanticObject.getSetNr());
feeder.accept(grammarAccess.getCardAccess().getSetNAMESTRINGParserRuleCall_3_0(), semanticObject.getSet());
feeder.finish();
}
示例2: sequence_Button
import org.eclipse.xtext.serializer.ISerializationContext; //导入依赖的package包/类
/**
* Contexts:
* Button returns Button
*
* Constraint:
* (name=ID title=Description href=STRING)
*/
protected void sequence_Button(ISerializationContext context, Button semanticObject) {
if (errorAcceptor != null) {
if (transientValues.isValueTransient(semanticObject, MyDslPackage.Literals.BUTTON__NAME) == ValueTransient.YES)
errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, MyDslPackage.Literals.BUTTON__NAME));
if (transientValues.isValueTransient(semanticObject, MyDslPackage.Literals.BUTTON__TITLE) == ValueTransient.YES)
errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, MyDslPackage.Literals.BUTTON__TITLE));
if (transientValues.isValueTransient(semanticObject, MyDslPackage.Literals.BUTTON__HREF) == ValueTransient.YES)
errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, MyDslPackage.Literals.BUTTON__HREF));
}
SequenceFeeder feeder = createSequencerFeeder(context, semanticObject);
feeder.accept(grammarAccess.getButtonAccess().getNameIDTerminalRuleCall_1_0(), semanticObject.getName());
feeder.accept(grammarAccess.getButtonAccess().getTitleDescriptionParserRuleCall_3_0(), semanticObject.getTitle());
feeder.accept(grammarAccess.getButtonAccess().getHrefSTRINGTerminalRuleCall_5_0(), semanticObject.getHref());
feeder.finish();
}
示例3: sequence
import org.eclipse.xtext.serializer.ISerializationContext; //导入依赖的package包/类
@Override
public void sequence(ISerializationContext context, EObject semanticObject) {
EPackage epackage = semanticObject.eClass().getEPackage();
ParserRule rule = context.getParserRule();
Action action = context.getAssignedAction();
Set<Parameter> parameters = context.getEnabledBooleanParameters();
if (epackage == PkmntcgoPackage.eINSTANCE)
switch (semanticObject.eClass().getClassifierID()) {
case PkmntcgoPackage.CARD:
sequence_Card(context, (Card) semanticObject);
return;
case PkmntcgoPackage.DECK:
sequence_Deck(context, (Deck) semanticObject);
return;
case PkmntcgoPackage.DECKS:
sequence_Decks(context, (Decks) semanticObject);
return;
case PkmntcgoPackage.ENERGY:
sequence_Energy(context, (Energy) semanticObject);
return;
case PkmntcgoPackage.POKEMON:
sequence_Pokemon(context, (Pokemon) semanticObject);
return;
case PkmntcgoPackage.TRAINER:
sequence_Trainer(context, (Trainer) semanticObject);
return;
}
if (errorAcceptor != null)
errorAcceptor.accept(diagnosticProvider.createInvalidContextOrTypeDiagnostic(semanticObject, context));
}
示例4: sequence_RegularExpressionLiteral
import org.eclipse.xtext.serializer.ISerializationContext; //导入依赖的package包/类
/**
* Contexts:
* RegularExpressionLiteral returns RegularExpressionLiteral
*
* Constraint:
* (body=RegularExpressionBody flags=RegularExpressionFlags)
*/
protected void sequence_RegularExpressionLiteral(ISerializationContext context, RegularExpressionLiteral semanticObject) {
if (errorAcceptor != null) {
if (transientValues.isValueTransient(semanticObject, RegularExpressionPackage.Literals.REGULAR_EXPRESSION_LITERAL__BODY) == ValueTransient.YES)
errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, RegularExpressionPackage.Literals.REGULAR_EXPRESSION_LITERAL__BODY));
if (transientValues.isValueTransient(semanticObject, RegularExpressionPackage.Literals.REGULAR_EXPRESSION_LITERAL__FLAGS) == ValueTransient.YES)
errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, RegularExpressionPackage.Literals.REGULAR_EXPRESSION_LITERAL__FLAGS));
}
SequenceFeeder feeder = createSequencerFeeder(context, semanticObject);
feeder.accept(grammarAccess.getRegularExpressionLiteralAccess().getBodyRegularExpressionBodyParserRuleCall_1_0(), semanticObject.getBody());
feeder.accept(grammarAccess.getRegularExpressionLiteralAccess().getFlagsRegularExpressionFlagsParserRuleCall_3_0(), semanticObject.getFlags());
feeder.finish();
}
示例5: sequence_StringWithVariables
import org.eclipse.xtext.serializer.ISerializationContext; //导入依赖的package包/类
/**
* Contexts:
* StringWithVariables returns StringWithVariables
*
* Constraint:
* value=STRING
*/
protected void sequence_StringWithVariables(ISerializationContext context, StringWithVariables semanticObject) {
if (errorAcceptor != null) {
if (transientValues.isValueTransient(semanticObject, LcDslPackage.Literals.STRING_WITH_VARIABLES__VALUE) == ValueTransient.YES)
errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, LcDslPackage.Literals.STRING_WITH_VARIABLES__VALUE));
}
SequenceFeeder feeder = createSequencerFeeder(context, semanticObject);
feeder.accept(grammarAccess.getStringWithVariablesAccess().getValueSTRINGTerminalRuleCall_0(), semanticObject.getValue());
feeder.finish();
}
示例6: sequence_ConfigIniTemplate
import org.eclipse.xtext.serializer.ISerializationContext; //导入依赖的package包/类
/**
* Contexts:
* ConfigIniTemplate returns ConfigIniTemplate
*
* Constraint:
* path=ExistingPath
*/
protected void sequence_ConfigIniTemplate(ISerializationContext context, ConfigIniTemplate semanticObject) {
if (errorAcceptor != null) {
if (transientValues.isValueTransient(semanticObject, LcDslPackage.Literals.CONFIG_INI_TEMPLATE__PATH) == ValueTransient.YES)
errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, LcDslPackage.Literals.CONFIG_INI_TEMPLATE__PATH));
}
SequenceFeeder feeder = createSequencerFeeder(context, semanticObject);
feeder.accept(grammarAccess.getConfigIniTemplateAccess().getPathExistingPathParserRuleCall_1_0(), semanticObject.getPath());
feeder.finish();
}
示例7: sequence_JSXExpression
import org.eclipse.xtext.serializer.ISerializationContext; //导入依赖的package包/类
/**
* Contexts:
* JSXChild returns JSXExpression
* JSXExpression returns JSXExpression
*
* Constraint:
* expression=AssignmentExpression
*/
protected void sequence_JSXExpression(ISerializationContext context, JSXExpression semanticObject) {
if (errorAcceptor != null) {
if (transientValues.isValueTransient(semanticObject, N4JSPackage.Literals.JSX_EXPRESSION__EXPRESSION) == ValueTransient.YES)
errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, N4JSPackage.Literals.JSX_EXPRESSION__EXPRESSION));
}
SequenceFeeder feeder = createSequencerFeeder(context, semanticObject);
feeder.accept(grammarAccess.getJSXExpressionAccess().getExpressionAssignmentExpressionParserRuleCall_1_0(), semanticObject.getExpression());
feeder.finish();
}
示例8: sequence_ApplicationExtPoint
import org.eclipse.xtext.serializer.ISerializationContext; //导入依赖的package包/类
/**
* Contexts:
* ApplicationExtPoint returns ApplicationExtPoint
*
* Constraint:
* name=FQName
*/
protected void sequence_ApplicationExtPoint(ISerializationContext context, ApplicationExtPoint semanticObject) {
if (errorAcceptor != null) {
if (transientValues.isValueTransient(semanticObject, LcDslPackage.Literals.APPLICATION_EXT_POINT__NAME) == ValueTransient.YES)
errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, LcDslPackage.Literals.APPLICATION_EXT_POINT__NAME));
}
SequenceFeeder feeder = createSequencerFeeder(context, semanticObject);
feeder.accept(grammarAccess.getApplicationExtPointAccess().getNameFQNameParserRuleCall_1_0(), semanticObject.getName());
feeder.finish();
}
示例9: sequence_GroupPostLaunchRegex
import org.eclipse.xtext.serializer.ISerializationContext; //导入依赖的package包/类
/**
* Contexts:
* GroupPostLaunchAction returns GroupPostLaunchRegex
* GroupPostLaunchRegex returns GroupPostLaunchRegex
*
* Constraint:
* regex=STRING
*/
protected void sequence_GroupPostLaunchRegex(ISerializationContext context, GroupPostLaunchRegex semanticObject) {
if (errorAcceptor != null) {
if (transientValues.isValueTransient(semanticObject, LcDslPackage.Literals.GROUP_POST_LAUNCH_REGEX__REGEX) == ValueTransient.YES)
errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, LcDslPackage.Literals.GROUP_POST_LAUNCH_REGEX__REGEX));
}
SequenceFeeder feeder = createSequencerFeeder(context, semanticObject);
feeder.accept(grammarAccess.getGroupPostLaunchRegexAccess().getRegexSTRINGTerminalRuleCall_1_0(), semanticObject.getRegex());
feeder.finish();
}
示例10: sequence_AnyType
import org.eclipse.xtext.serializer.ISerializationContext; //导入依赖的package包/类
/**
* Contexts:
* Type returns AnyType
* AnyType returns AnyType
*
* Constraint:
* name='any'
*/
protected void sequence_AnyType(ISerializationContext context, AnyType semanticObject) {
if (errorAcceptor != null) {
if (transientValues.isValueTransient(semanticObject, TypesPackage.Literals.IDENTIFIABLE_ELEMENT__NAME) == ValueTransient.YES)
errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, TypesPackage.Literals.IDENTIFIABLE_ELEMENT__NAME));
}
SequenceFeeder feeder = createSequencerFeeder(context, semanticObject);
feeder.accept(grammarAccess.getAnyTypeAccess().getNameAnyKeyword_1_0(), semanticObject.getName());
feeder.finish();
}
示例11: sequence_GraphElement
import org.eclipse.xtext.serializer.ISerializationContext; //导入依赖的package包/类
/**
* Contexts:
* GraphElement returns GraphElement
*
* Constraint:
* name=ID
*/
protected void sequence_GraphElement(ISerializationContext context, GraphElement semanticObject) {
if (errorAcceptor != null) {
if (transientValues.isValueTransient(semanticObject, DSLPoliciesPackage.Literals.GRAPH_ELEMENT__NAME) == ValueTransient.YES)
errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, DSLPoliciesPackage.Literals.GRAPH_ELEMENT__NAME));
}
SequenceFeeder feeder = createSequencerFeeder(context, semanticObject);
feeder.accept(grammarAccess.getGraphElementAccess().getNameIDTerminalRuleCall_0(), semanticObject.getName());
feeder.finish();
}
示例12: sequence_NullType
import org.eclipse.xtext.serializer.ISerializationContext; //导入依赖的package包/类
/**
* Contexts:
* Type returns NullType
* NullType returns NullType
*
* Constraint:
* name='null'
*/
protected void sequence_NullType(ISerializationContext context, NullType semanticObject) {
if (errorAcceptor != null) {
if (transientValues.isValueTransient(semanticObject, TypesPackage.Literals.IDENTIFIABLE_ELEMENT__NAME) == ValueTransient.YES)
errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, TypesPackage.Literals.IDENTIFIABLE_ELEMENT__NAME));
}
SequenceFeeder feeder = createSequencerFeeder(context, semanticObject);
feeder.accept(grammarAccess.getNullTypeAccess().getNameNullKeyword_1_0(), semanticObject.getName());
feeder.finish();
}
示例13: sequence_TAnnotationStringArgument
import org.eclipse.xtext.serializer.ISerializationContext; //导入依赖的package包/类
/**
* Contexts:
* TAnnotationArgument returns TAnnotationStringArgument
* TAnnotationStringArgument returns TAnnotationStringArgument
*
* Constraint:
* value=STRING
*/
protected void sequence_TAnnotationStringArgument(ISerializationContext context, TAnnotationStringArgument semanticObject) {
if (errorAcceptor != null) {
if (transientValues.isValueTransient(semanticObject, TypesPackage.Literals.TANNOTATION_STRING_ARGUMENT__VALUE) == ValueTransient.YES)
errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, TypesPackage.Literals.TANNOTATION_STRING_ARGUMENT__VALUE));
}
SequenceFeeder feeder = createSequencerFeeder(context, semanticObject);
feeder.accept(grammarAccess.getTAnnotationStringArgumentAccess().getValueSTRINGTerminalRuleCall_0(), semanticObject.getValue());
feeder.finish();
}
示例14: sequence_EnvironmentVariable
import org.eclipse.xtext.serializer.ISerializationContext; //导入依赖的package包/类
/**
* Contexts:
* EnvironmentVariable returns EnvironmentVariable
*
* Constraint:
* (name=ID value=StringWithVariables)
*/
protected void sequence_EnvironmentVariable(ISerializationContext context, EnvironmentVariable semanticObject) {
if (errorAcceptor != null) {
if (transientValues.isValueTransient(semanticObject, LcDslPackage.Literals.ENVIRONMENT_VARIABLE__NAME) == ValueTransient.YES)
errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, LcDslPackage.Literals.ENVIRONMENT_VARIABLE__NAME));
if (transientValues.isValueTransient(semanticObject, LcDslPackage.Literals.ENVIRONMENT_VARIABLE__VALUE) == ValueTransient.YES)
errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, LcDslPackage.Literals.ENVIRONMENT_VARIABLE__VALUE));
}
SequenceFeeder feeder = createSequencerFeeder(context, semanticObject);
feeder.accept(grammarAccess.getEnvironmentVariableAccess().getNameIDTerminalRuleCall_2_0(), semanticObject.getName());
feeder.accept(grammarAccess.getEnvironmentVariableAccess().getValueStringWithVariablesParserRuleCall_4_0(), semanticObject.getValue());
feeder.finish();
}
示例15: sequence_JavaMainType
import org.eclipse.xtext.serializer.ISerializationContext; //导入依赖的package包/类
/**
* Contexts:
* JavaMainType returns JavaMainType
*
* Constraint:
* name=FQName
*/
protected void sequence_JavaMainType(ISerializationContext context, JavaMainType semanticObject) {
if (errorAcceptor != null) {
if (transientValues.isValueTransient(semanticObject, LcDslPackage.Literals.JAVA_MAIN_TYPE__NAME) == ValueTransient.YES)
errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, LcDslPackage.Literals.JAVA_MAIN_TYPE__NAME));
}
SequenceFeeder feeder = createSequencerFeeder(context, semanticObject);
feeder.accept(grammarAccess.getJavaMainTypeAccess().getNameFQNameParserRuleCall_0(), semanticObject.getName());
feeder.finish();
}