~ubuntu-branches/ubuntu/oneiric/monodevelop/oneiric

« back to all changes in this revision

Viewing changes to src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger/DebuggingService.cs

  • Committer: Bazaar Package Importer
  • Author(s): Jo Shields
  • Date: 2010-02-02 11:39:59 UTC
  • mfrom: (1.4.4 upstream)
  • mto: (1.5.1 sid)
  • mto: This revision was merged to the branch mainline in revision 47.
  • Revision ID: james.westby@ubuntu.com-20100202113959-n3u848nfj35yyd03
* New upstream release
* debian/control:
  + Standards version 3.8.4 (no changes needed)
* debian/patches/remove_support_for_non_debian_functionality.patch,
  debian/patches/remove_support_for_soft_debugger.patch,
  debian/patches/remove_support_for_moonlight.patch,
  debian/rules:
  + Split patch into two pieces, to make it easier to enable either
    SDB or Moonlight support with a rebuild
* debian/monodevelop-moonlight.install,
  debian/monodevelop-debugger-sdb.install,
  debian/control:
  + Create packaging data for the Soft Debugger addin and Moonlight addin -
    and comment them out of debian/control as we can't provide them on
    Debian for now

Show diffs side-by-side

added added

removed removed

Lines of Context:
43
43
 
44
44
using Mono.Debugging.Client;
45
45
using Mono.Debugging.Backend;
 
46
using MonoDevelop.Ide.Gui.Content;
 
47
using MonoDevelop.Projects.Dom;
46
48
 
47
49
/*
48
50
 * Some places we should be doing some error handling we used to toss
84
86
                {
85
87
                        executionHandlerFactory = new DebugExecutionHandlerFactory ();
86
88
                        TextFileService.LineCountChanged += OnLineCountChanged;
87
 
                        IdeApp.Workspace.StoringUserPreferences += OnStoreUserPrefs;
88
 
                        IdeApp.Workspace.LoadingUserPreferences += OnLoadUserPrefs;
89
 
                        busyDialog = new BusyEvaluatorDialog ();
90
 
                        
 
89
                        if (IdeApp.IsInitialized) {
 
90
                                IdeApp.Workspace.StoringUserPreferences += OnStoreUserPrefs;
 
91
                                IdeApp.Workspace.LoadingUserPreferences += OnLoadUserPrefs;
 
92
                                busyDialog = new BusyEvaluatorDialog ();
 
93
                        }
91
94
                        AddinManager.AddExtensionNodeHandler (FactoriesPath, delegate {
92
95
                                // Regresh the engine list
93
96
                                engines = null;
383
386
                                return true;
384
387
                        };
385
388
                        session.BusyStateChanged += OnBusyStateChanged;
 
389
                        
 
390
                        session.TypeResolverHandler = ResolveType;
386
391
 
387
392
                        console.CancelRequested += new EventHandler (OnCancelRequested);
388
393
                        NotifyLocationChanged ();
616
621
                                Array.Sort (engs, delegate (IDebuggerEngine d1, IDebuggerEngine d2) {
617
622
                                        int i1 = Array.IndexOf (priorities, d1.Id);
618
623
                                        int i2 = Array.IndexOf (priorities, d2.Id);
619
 
                                        if (i1 == -1 && i2 == -1)
 
624
                                        
 
625
                                        //ensure that soft debugger is prioritised over newly installed debuggers
 
626
                                        if (i1 < 0 )
 
627
                                                i1 = d1.Id.StartsWith ("Mono.Debugger.Soft")? 0 : engs.Length;
 
628
                                        if (i2 < 0)
 
629
                                                i2 = d2.Id.StartsWith ("Mono.Debugger.Soft")? 0 : engs.Length;
 
630
                                        
 
631
                                        if (i1 == i2)
620
632
                                                return d1.Name.CompareTo (d2.Name);
621
633
                                        else
622
634
                                                return i1.CompareTo (i2);
663
675
                        if (elem != null)
664
676
                                breakpoints.Load (elem);
665
677
                }
 
678
                
 
679
                static string ResolveType (string identifier, SourceLocation location)
 
680
                {
 
681
                        Document doc = IdeApp.Workbench.GetDocument (location.Filename);
 
682
                        if (doc != null) {
 
683
                                ITextEditorResolver textEditorResolver = doc.GetContent <ITextEditorResolver> ();
 
684
                                if (textEditorResolver != null) {
 
685
                                        ResolveResult rr = textEditorResolver.GetLanguageItem (doc.TextEditor.GetPositionFromLineColumn (location.Line, 1), identifier);
 
686
                                        NamespaceResolveResult ns = rr as NamespaceResolveResult;
 
687
                                        if (ns != null)
 
688
                                                return ns.Namespace;
 
689
                                        MemberResolveResult result = rr as MemberResolveResult;
 
690
                                        if (result != null && (result.ResolvedMember == null || result.ResolvedMember is IType) && result.ResolvedType != null)
 
691
                                                return result.ResolvedType.FullName;
 
692
                                }
 
693
                        }
 
694
                        return null;
 
695
                }
666
696
        }
667
697
        
668
698
        internal class FeatureCheckerHandlerFactory: IExecutionHandler