Exemplo n.º 1
0
        protected override Task DoNew()
        {
            _fileContent = string.Empty;
            _view?.SetContent(_fileContent);

            SetLanguage(_languageDefinitionManager.GetLanguage(Path.GetExtension(FileName)).Lexer);
            return(Task.FromResult(true));
        }
Exemplo n.º 2
0
 protected override void OnViewLoaded(object view)
 {
     _view = (ICodeEditorView)view;
     if (_view == null)
     {
         throw new InvalidCastException();
     }
     _view.IsDirtyChanged += OnDirtyChanged;
     _view.SetResourceDirectory("Resources");
     _view.SetContent(_fileContent);
     _view.SetLexer(_fileLexer);
     base.OnViewLoaded(view);
 }