Upgrade to Pro — share decks privately, control downloads, hide ads and more …

_COSCUP2013__MonoDevelop__how_modern_C__IDE_and...

 _COSCUP2013__MonoDevelop__how_modern_C__IDE_and_text_editor_works.pdf

Atsushi Eno

August 19, 2013
Tweet

More Decks by Atsushi Eno

Other Decks in Programming

Transcript

  1. Mono and Xamarin Mono open source C#/.NET framework for linux,

    mac, win mono, gtk-sharp, monodevelop (IDE) today Xamarin drives mono development mobile product company iOS and Android, with IDE "Xamarin Studio"
  2. Xamarin Studio / MonoDevelop Xamarin Studio basically it is MonoDevelop

    w/ commercial extensions MonoDevelop cross platform IDE (linux/mac/win/...) Unity, PSMobile uses MD the making of Xamarin Studio (modernizing the UI): http://blog.xamarin.com/the-making-of-xamarin-studio/
  3. Language Service Also, "Compiler as a Service" (CaaS) on-the-fly code

    parsing and analysis, as a service To learn about this, let's have a look at code editor evolution...
  4. IDE text editor prior to LS/CaaS get error / warning

    from stdout / stderr jump to error location.
  5. Integrated code parser IDE to have its own parser supposed

    to process incomplete sources provide basic source structure (AST) to editor "where is Type T in namespace N?" in-memory source parsing type/member selector
  6. Type system database A type can be from sources or

    a reference (library). Complete type definition list can be built. Semantic analysis of sources is doable now. e.g. collect all members including base types.
  7. Integrated code parser + type DB Gives you... "go to

    definition" find references (usage, inheritance, overrides...) get code completion on ".", "::" or "->" opportunity for many advanced features too Mono.CSharp.dll contains C# implementation of it.
  8. Language (Compiler as a) Service Code analysis and transformation aid

    get type definition and their locations, find references and more advanced features Another aspect of LS / CaaS Historically all those features were tied to the IDE But they should be usable in any IDEs Separation of text editor and language toolkit
  9. LS/CaaS implementations ICSharpCode.NRefactory: C# so far for SharpDevelop, MonoDevelop, OmniSharp(vim)...

    Microsoft Roslyn: C# and VB will be used in Visual Studio in the future "pretty similar" to NRefactory F#, HaXe, TypeScript, jedi (Python) etc.
  10. use (and/or create) LS / CaaS using LS / CaaS

    from editor mostly out-of-process model: launch host server NRefactory limits the scope to .NET creating LS / CaaS - difficult! API should be simple, to not break compatibility stringly-typed API FTW!
  11. Q&A