~ubuntu-branches/ubuntu/lucid/monodevelop/lucid

« back to all changes in this revision

Viewing changes to src/addins/CSharpBinding/MonoDevelop.CSharp.Completion/CSharpTextEditorCompletion.cs

  • Committer: Bazaar Package Importer
  • Author(s): Jo Shields
  • Date: 2010-02-02 11:39:59 UTC
  • mfrom: (1.2.6 upstream) (1.3.7 sid)
  • Revision ID: james.westby@ubuntu.com-20100202113959-s4exdz7er7igylz2
Tags: 2.2.1+dfsg-1
* 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:
736
736
                                        }
737
737
                                        int tokenIndex = completionContext.TriggerOffset;
738
738
 
739
 
                                        // Search base types " : [Type1, ... ,TypeN,] <Caret>"
 
739
                                                                                // Search base types " : [Type1, ... ,TypeN,] <Caret>"
740
740
                                        string token = null;
741
741
                                        do {
742
742
                                                token = GetPreviousToken (ref tokenIndex, false);
776
776
                                }
777
777
                                break;
778
778
                        case "is":
779
 
                        case "as": {
 
779
                        case "as":
 
780
                                
 
781
                                {
780
782
                                        CompletionDataList completionList = new ProjectDomCompletionDataList ();
781
783
                                        ExpressionResult expressionResult = FindExpression (dom, completionContext, wordStart - Editor.CursorPosition);
782
784
                                        NRefactoryResolver resolver = new NRefactoryResolver (dom, Document.CompilationUnit, ICSharpCode.NRefactory.SupportedLanguage.CSharp, Editor, Document.FileName);
789
791
                                                        if (exactContext is ExpressionContext.TypeExpressionContext) {
790
792
                                                                foundType = dom.SearchType (new SearchTypeRequest (resolver.Unit, ((ExpressionContext.TypeExpressionContext)exactContext).Type, resolver.CallingType));
791
793
 
 
794
                                                                                                                                
792
795
                                                                AddAsCompletionData (col, foundType);
793
796
                                                        }
794
797
                                                }
795
798
 
 
799
                                                                                                
796
800
                                                if (foundType == null)
797
801
                                                        foundType = dom.SearchType (new SearchTypeRequest (resolver.Unit, resolveResult.ResolvedType, resolver.CallingType));
798
802
 
 
803
                                                                                                
799
804
                                                if (foundType != null) {
800
805
                                                        foreach (IType type in dom.GetSubclasses (foundType)) {
801
806
                                                                if (type.IsSpecialName || type.Name.StartsWith ("<"))
809
814
                                                                IType type = (IType)o;
810
815
                                                                if (type.ClassType != ClassType.Interface || type.IsSpecialName || type.Name.StartsWith ("<"))
811
816
                                                                        continue;
812
 
                                                                if (!dom.GetInheritanceTree (foundType).Any (x => x.FullName == type.FullName))
 
817
                                                                if (foundType != null && !dom.GetInheritanceTree (foundType).Any (x => x.FullName == type.FullName))
813
818
                                                                        continue;
814
819
                                                                AddAsCompletionData (col, type);
815
820
                                                                continue;