public void GenerateCodeCompletionDatabase(string createPath, IProgressMonitor progressMonitor)
        {
            if (progressMonitor != null)
                progressMonitor.BeginTask(GettextCatalog.GetString ("Generating database"), assemblyList.Length);

            for (int i = 0; i < assemblyList.Length; ++i)
            {
                try {
                    AssemblyCodeCompletionDatabase db = new AssemblyCodeCompletionDatabase (codeCompletionPath, assemblyList[i], this);
                    db.ParseAll ();
                    db.Write ();

                    if (progressMonitor != null)
                        progressMonitor.Step (1);

                    if (!ContinueWithProcess (progressMonitor))
                        return;
                }
                catch (Exception ex) {
                    Runtime.LoggingService.Info (ex);
                }
            }

            if (progressMonitor != null) {
                progressMonitor.Dispose ();
            }
        }
 public void GenerateAssemblyDatabase(string baseDir, string name)
 {
     AssemblyCodeCompletionDatabase db = new AssemblyCodeCompletionDatabase (baseDir, name, (ParserDatabase) CreateParserDatabase());
     db.ParseInExternalProcess = false;
     db.ParseAll ();
     db.Write ();
 }
        internal CodeCompletionDatabase GetDatabase(string baseDir, string uri)
        {
            lock (databases)
            {
                if (baseDir == null) baseDir = codeCompletionPath;
                CodeCompletionDatabase db = (CodeCompletionDatabase) databases [uri];
                if (db == null)
                {
                    // Create/load the database

                    if (uri.StartsWith ("Assembly:"))
                    {
                        string file = uri.Substring (9);

                        // We may be trying to load an assembly db using a partial name.
                        // In this case we get the full name to avoid database conflicts
                        file = AssemblyCodeCompletionDatabase.GetFullAssemblyName (file);
                        string realUri = "Assembly:" + file;
                        db = (CodeCompletionDatabase) databases [realUri];
                        if (db != null) {
                            databases [uri] = db;
                            return db;
                        }

                        AssemblyCodeCompletionDatabase adb;
                        db = adb = new AssemblyCodeCompletionDatabase (baseDir, file, this);
                        databases [realUri] = adb;
                        if (uri != realUri)
                            databases [uri] = adb;

                        // Load referenced databases
                        foreach (ReferenceEntry re in db.References)
                            GetDatabase (baseDir, re.Uri);
                    }
                }
                return db;
            }
        }