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

« back to all changes in this revision

Viewing changes to tests/UnitTests/MonoDevelop.CSharpBinding/ParameterCompletionTests.cs

  • Committer: Bazaar Package Importer
  • Author(s): Jo Shields
  • Date: 2011-06-27 17:03:13 UTC
  • mto: (1.8.1 upstream)
  • mto: This revision was merged to the branch mainline in revision 54.
  • Revision ID: james.westby@ubuntu.com-20110627170313-6cvz3s19x6e9hqe9
ImportĀ upstreamĀ versionĀ 2.5.92+dfsg

Show diffs side-by-side

added added

removed removed

Lines of Context:
68
68
                        
69
69
                        ProjectDomService.Load (project);
70
70
//                      ProjectDom dom = ProjectDomService.GetProjectDom (project);
71
 
                        ProjectDomService.Parse (project, file, null, delegate { return parsedText; });
72
 
                        ProjectDomService.Parse (project, file, null, delegate { return parsedText; });
 
71
                        ProjectDomService.Parse (project, file, delegate { return parsedText; });
 
72
                        ProjectDomService.Parse (project, file, delegate { return parsedText; });
73
73
                        
74
74
                        sev.Project = project;
75
75
                        sev.ContentName = file;
77
77
                        sev.CursorPosition = cursorPosition;
78
78
                        tww.ViewContent = sev;
79
79
                        Document doc = new Document (tww);
80
 
                        doc.ParsedDocument = new NRefactoryParser ().Parse (null, sev.ContentName, parsedText);
 
80
                        doc.ParsedDocument = new McsParser ().Parse (null, sev.ContentName, parsedText);
81
81
                        CSharpTextEditorCompletion textEditorCompletion = new CSharpTextEditorCompletion (doc);
82
82
                        
83
83
                        CodeCompletionContext ctx = new CodeCompletionContext ();
85
85
                        int line, column;
86
86
                        sev.GetLineColumnFromPosition (sev.CursorPosition, out line, out column);
87
87
                        ctx.TriggerLine = line;
88
 
                        ctx.TriggerLineOffset = column;
 
88
                        ctx.TriggerLineOffset = column - 1;
89
89
                        
90
90
                        IParameterDataProvider result = textEditorCompletion.HandleParameterCompletion (ctx, editorText[cursorPosition - 1]);
91
91
                        ProjectDomService.Unload (project);