public ProjectCodeCompletionDatabase(Project project, ParserDatabase parserDatabase)
            : base(parserDatabase)
        {
            initialFileCheck = true;

            SetLocation (project.BaseDirectory, project.Name);

            this.project = project;
            Read ();

            UpdateFromProject ();

            project.FileChangedInProject += new ProjectFileEventHandler (OnFileChanged);
            project.FileAddedToProject += new ProjectFileEventHandler (OnFileAdded);
            project.FileRemovedFromProject += new ProjectFileEventHandler (OnFileRemoved);
            project.FileRenamedInProject += new ProjectFileRenamedEventHandler (OnFileRenamed);
        }
        public AssemblyCodeCompletionDatabase(string baseDir, string assemblyName, ParserDatabase parserDatabase)
            : base(parserDatabase)
        {
            string assemblyFile;
            string[] refUris;
            string name;

            using (AssemblyDatabaseHelper helper = GetExternalHelper (true))
            {
                if (!helper.GetAssemblyInfo (assemblyName, out this.assemblyName, out assemblyFile, out name, out refUris))
                    return;
            }

            this.baseDir = baseDir;

            SetLocation (baseDir, name);

            Read ();

            if (files [assemblyFile] == null) {
                AddFile (assemblyFile);
                headers ["CheckFile"] = assemblyFile;
            }

            // Update references to other assemblies

            Hashtable rs = new Hashtable ();
            foreach (string uri in refUris) {
                rs[uri] = null;
                if (!HasReference (uri))
                    AddReference (uri);
            }

            ArrayList keys = new ArrayList ();
            keys.AddRange (references);
            foreach (ReferenceEntry re in keys)
            {
                if (!rs.Contains (re.Uri))
                    RemoveReference (re.Uri);
            }
        }
 public CodeCompletionDatabase(ParserDatabase parserDatabase)
 {
     this.parserDatabase = parserDatabase;
     rootNamespace = new NamespaceEntry ();
     files = new Hashtable ();
     references = new ArrayList ();
     headers = new Hashtable ();
 }
 public IParserDatabase CreateParserDatabase()
 {
     ParserDatabase c = new ParserDatabase (this);
     c.Initialize ();
     return c;
 }
 internal ParserContext(DefaultParserService parserService, ParserDatabase pdb, CodeCompletionDatabase db)
 {
     this.parserService = parserService;
     this.pdb = pdb;
     this.db = db;
 }
 public CompilationUnitTypeResolver(CodeCompletionDatabase db, ICompilationUnit unit, ParserDatabase parserDatabase)
 {
     this.db = db;
     this.unit = unit;
     this.parserDatabase = parserDatabase;
 }
 internal ClassInheritanceEnumerator(ParserDatabase parserDatabase, CodeCompletionDatabase db, IClass topLevelClass)
 {
     this.parserDatabase = parserDatabase;
     this.db = db;
     this.topLevelClass = topLevelClass;
     baseTypeQueue.Enqueue(topLevelClass.FullyQualifiedName);
     PutBaseClassesOnStack(topLevelClass);
     baseTypeQueue.Enqueue("System.Object");
 }
 public SimpleCodeCompletionDatabase(string file, ParserDatabase parserDatabase)
     : base(parserDatabase)
 {
     AddFile (file);
     this.file = file;
 }