use of org.eclipse.xtext.common.types.xtext.ui.contentAssistTestLanguage.GenerateDirective in project xtext-eclipse by eclipse.
the class ModelImpl method basicSetGenerateDirective.
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public NotificationChain basicSetGenerateDirective(GenerateDirective newGenerateDirective, NotificationChain msgs) {
GenerateDirective oldGenerateDirective = generateDirective;
generateDirective = newGenerateDirective;
if (eNotificationRequired()) {
ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, ContentAssistTestLanguagePackage.MODEL__GENERATE_DIRECTIVE, oldGenerateDirective, newGenerateDirective);
if (msgs == null)
msgs = notification;
else
msgs.add(notification);
}
return msgs;
}
use of org.eclipse.xtext.common.types.xtext.ui.contentAssistTestLanguage.GenerateDirective in project xtext-eclipse by eclipse.
the class ContentAssistTestLanguageSemanticSequencer method sequence.
@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 == ContentAssistTestLanguagePackage.eINSTANCE)
switch(semanticObject.eClass().getClassifierID()) {
case ContentAssistTestLanguagePackage.GENERATE_DIRECTIVE:
sequence_GenerateDirective(context, (GenerateDirective) semanticObject);
return;
case ContentAssistTestLanguagePackage.IMPORT:
sequence_Import(context, (Import) semanticObject);
return;
case ContentAssistTestLanguagePackage.MODEL:
sequence_Model(context, (Model) semanticObject);
return;
case ContentAssistTestLanguagePackage.REFERENCE_HOLDER:
sequence_ReferenceHolder(context, (ReferenceHolder) semanticObject);
return;
}
if (errorAcceptor != null)
errorAcceptor.accept(diagnosticProvider.createInvalidContextOrTypeDiagnostic(semanticObject, context));
}
use of org.eclipse.xtext.common.types.xtext.ui.contentAssistTestLanguage.GenerateDirective in project xtext-eclipse by eclipse.
the class ContentAssistTestLanguageGenerator method doGenerate.
@Override
public void doGenerate(Resource input, IFileSystemAccess fsa) {
if (input.getContents().isEmpty())
return;
EObject root = input.getContents().get(0);
if (!(root instanceof Model))
return;
GenerateDirective generateDirective = ((Model) root).getGenerateDirective();
if (generateDirective != null) {
fsa.generateFile(generateFileName(generateDirective), generateFileContents(generateDirective));
}
}
Aggregations