internal static void Initialize(CompositionContainer composition) { List <Language> languages = new List <Language>(); languages.AddRange(composition.GetExportedValues <Language>()); #if DEBUG languages.AddRange(ILAstLanguage.GetDebugLanguages()); languages.AddRange(CSharpLanguage.GetDebugLanguages()); #endif allLanguages = languages.AsReadOnly(); }
internal static void Initialize(ExportProvider ep) { List <Language> languages = new List <Language>(); languages.AddRange(ep.GetExportedValues <Language>()); languages.Sort((a, b) => a.Name.CompareTo(b.Name)); #if DEBUG languages.AddRange(ILAstLanguage.GetDebugLanguages()); languages.AddRange(CSharpLanguage.GetDebugLanguages()); #endif allLanguages = languages.AsReadOnly(); }
DebugSteps() { InitializeComponent(); #if DEBUG MainWindow.Instance.SessionSettings.FilterSettings.PropertyChanged += FilterSettings_PropertyChanged; MainWindow.Instance.SelectionChanged += SelectionChanged; if (MainWindow.Instance.CurrentLanguage is ILAstLanguage l) { l.StepperUpdated += ILAstStepperUpdated; language = l; ILAstStepperUpdated(null, null); } #endif }
private void FilterSettings_PropertyChanged(object sender, System.ComponentModel.PropertyChangedEventArgs e) { #if DEBUG if (e.PropertyName == "Language") { if (language != null) { language.StepperUpdated -= ILAstStepperUpdated; } if (MainWindow.Instance.CurrentLanguage is ILAstLanguage l) { l.StepperUpdated += ILAstStepperUpdated; language = l; ILAstStepperUpdated(null, null); } } #endif }
public DebugSteps() { InitializeComponent(); #if DEBUG DockWorkspace.Instance.PropertyChanged += DockWorkspace_PropertyChanged; filterSettings = DockWorkspace.Instance.ActiveTabPage.FilterSettings; filterSettings.PropertyChanged += FilterSettings_PropertyChanged; MainWindow.Instance.SelectionChanged += SelectionChanged; writingOptions.PropertyChanged += WritingOptions_PropertyChanged; if (MainWindow.Instance.CurrentLanguage is ILAstLanguage l) { l.StepperUpdated += ILAstStepperUpdated; language = l; ILAstStepperUpdated(null, null); } #endif }
internal static void Initialize(CompositionContainer composition) { List <Language> languages = new List <Language>(); if (composition != null) { languages.AddRange(composition.GetExportedValues <Language>()); } else { languages.Add(new CSharpLanguage()); languages.Add(new VB.VBLanguage()); } // Fix order: C#, VB, IL var langs2 = new List <Language>(); var lang = languages.FirstOrDefault(a => a is CSharpLanguage); if (lang != null) { languages.Remove(lang); langs2.Add(lang); } lang = languages.FirstOrDefault(a => a is VB.VBLanguage); if (lang != null) { languages.Remove(lang); langs2.Add(lang); } langs2.Add(new ILLanguage(true)); for (int i = 0; i < langs2.Count; i++) { languages.Insert(i, langs2[i]); } #if DEBUG languages.AddRange(ILAstLanguage.GetDebugLanguages()); languages.AddRange(CSharpLanguage.GetDebugLanguages()); #endif allLanguages = languages.AsReadOnly(); }