~ubuntu-branches/ubuntu/trusty/monodevelop/trusty-proposed

« back to all changes in this revision

Viewing changes to src/addins/MonoDevelop.Refactoring/MonoDevelop.Refactoring/ImportSymbolHandler.cs

  • Committer: Package Import Robot
  • Author(s): Jo Shields
  • Date: 2013-05-12 09:46:03 UTC
  • mto: This revision was merged to the branch mainline in revision 29.
  • Revision ID: package-import@ubuntu.com-20130512094603-mad323bzcxvmcam0
Tags: upstream-4.0.5+dfsg
ImportĀ upstreamĀ versionĀ 4.0.5+dfsg

Show diffs side-by-side

added added

removed removed

Lines of Context:
45
45
using MonoDevelop.Ide.TypeSystem;
46
46
using ICSharpCode.NRefactory.CSharp;
47
47
using ICSharpCode.NRefactory;
 
48
using ICSharpCode.NRefactory.CSharp.Resolver;
48
49
 
49
50
namespace MonoDevelop.Refactoring
50
51
{
58
59
        {
59
60
                Dictionary<string, GenerateNamespaceImport> cache = new Dictionary<string, GenerateNamespaceImport> ();
60
61
                
61
 
                public GenerateNamespaceImport GetResult (IParsedFile unit, IType type, MonoDevelop.Ide.Gui.Document doc)
 
62
                public GenerateNamespaceImport GetResult (IUnresolvedFile unit, IType type, MonoDevelop.Ide.Gui.Document doc)
62
63
                {
63
64
                        GenerateNamespaceImport result;
64
65
                        if (cache.TryGetValue (type.Namespace, out result))
211
212
                
212
213
                        var dom = doc.Compilation;
213
214
                        ImportSymbolCache cache = new ImportSymbolCache ();
214
 
                        
 
215
                        var lookup = new MemberLookup (null, doc.Compilation.MainAssembly);
 
216
 
215
217
                        List<ImportSymbolCompletionData> typeList = new List<ImportSymbolCompletionData> ();
216
218
                        foreach (var type in dom.GetAllTypeDefinitions ()) {
 
219
                                if (!lookup.IsAccessible (type, false))
 
220
                                        continue;
217
221
                                typeList.Add (new ImportSymbolCompletionData (doc, cache, type));
218
222
                        }
219
223