use of org.eclipse.xtext.common.types.xtext.ui.refactoringTestLanguage.ReferenceHolder in project xtext-eclipse by eclipse.
the class RefactoringTestLanguageSemanticSequencer 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 == RefactoringTestLanguagePackage.eINSTANCE)
switch(semanticObject.eClass().getClassifierID()) {
case RefactoringTestLanguagePackage.MODEL:
sequence_Model(context, (Model) semanticObject);
return;
case RefactoringTestLanguagePackage.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.refactoringTestLanguage.ReferenceHolder in project xtext-eclipse by eclipse.
the class RefactoringTestLanguage1SemanticSequencer 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 == RefactoringTestLanguagePackage.eINSTANCE)
switch(semanticObject.eClass().getClassifierID()) {
case RefactoringTestLanguagePackage.MODEL:
sequence_Model(context, (Model) semanticObject);
return;
case RefactoringTestLanguagePackage.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.refactoringTestLanguage.ReferenceHolder in project xtext-eclipse by eclipse.
the class RefactoringTestLanguage2SemanticSequencer 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 == RefactoringTestLanguagePackage.eINSTANCE)
switch(semanticObject.eClass().getClassifierID()) {
case RefactoringTestLanguagePackage.MODEL:
sequence_Model(context, (Model) semanticObject);
return;
case RefactoringTestLanguagePackage.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.refactoringTestLanguage.ReferenceHolder in project xtext-eclipse by eclipse.
the class RefactoringTest method createRenameSupportForElement.
protected IRenameSupport createRenameSupportForElement() {
if (!languageServices.hasRefactoring())
return null;
IRenameElementContext renameElementContext = editor.getDocument().tryReadOnly(new IUnitOfWork<IRenameElementContext, XtextResource>() {
@Override
public IRenameElementContext exec(XtextResource state) throws Exception {
Model model = (Model) state.getContents().get(0);
ReferenceHolder referenceHolder = model.getReferenceHolder().get(0);
return languageServices.renameContextFactory.createRenameElementContext(referenceHolder, editor, null, state);
}
});
if (renameElementContext == null)
return null;
IRenameSupport renameSupport = languageServices.renameSupportFactory.create(renameElementContext, "newTestName");
return renameSupport;
}
Aggregations