예제 #1
0
 public XtextPsiReferenceImpl(final XtextPsiElement element) {
   super(element);
   final Language language = element.getLanguage();
   if ((language instanceof IXtextLanguage)) {
     ((IXtextLanguage) language).injectMembers(this);
   }
 }
 @Override
 protected void setUp() throws Exception {
   super.setUp();
   ISetup _setup = this.getSetup();
   this.<ISetup>addExplicitExtension(LanguageSetup.INSTANCE, this.myLanguage, _setup);
   IXtextLanguage _xtextLanguage = this.getXtextLanguage();
   _xtextLanguage.injectMembers(this);
   this.configureFromParserDefinition(this.parserDefinition, this.myFileExt);
   this.<ASTFactory>addExplicitExtension(
       LanguageASTFactory.INSTANCE, this.myLanguage, this.astFactory);
   MockApplicationEx _application = PlatformLiteFixture.getApplication();
   final MutablePicoContainer appContainer = _application.getPicoContainer();
   appContainer.unregisterComponent(EditorFactory.class);
   appContainer.unregisterComponent(FileDocumentManager.class);
   final MockEditorFactory editorFactory =
       new MockEditorFactory() {
         @Override
         public Document createDocument(final CharSequence text) {
           return new DocumentImpl(text, true, false);
         }
       };
   appContainer.registerComponentInstance(EditorFactory.class, editorFactory);
   final Function<CharSequence, Document> _function =
       new Function<CharSequence, Document>() {
         @Override
         public Document fun(final CharSequence charSequence) {
           return editorFactory.createDocument(charSequence);
         }
       };
   MockFileDocumentManagerImpl _mockFileDocumentManagerImpl =
       new MockFileDocumentManagerImpl(
           _function, FileDocumentManagerImpl.HARD_REF_TO_DOCUMENT_KEY);
   appContainer.registerComponentInstance(FileDocumentManager.class, _mockFileDocumentManagerImpl);
   NodeModelPrinter _nodeModelPrinter = this.xtextResourceAsserts.getNodeModelPrinter();
   _nodeModelPrinter.setIgnoreSyntaxErrors(false);
 }
 public SkippingUnwantedSteppingFilter(final IXtextLanguage language) {
   language.injectMembers(this);
 }