Exemplo n.º 1
0
 private static void GetProjects(EnvDTE.Projects projects, List <EnvDTE.Project> projectList)
 {
     foreach (EnvDTE.Project project in projects)
     {
         GetProjects(project, projectList);
     }
 }
Exemplo n.º 2
0
        /// <summary>
        /// Parses the solution passed in.
        /// </summary>
        public override void parse(string solutionFilename)
        {
            try
            {
                m_parsedSolution.Name = solutionFilename;

                // We create the COM automation objects to open the solution...
                openSolution();

                // We get the root collection of projects and parse them.
                EnvDTE.Projects rootProjects = Utils.call(() => (m_dteSolution.Projects));
                parseProjects(rootProjects);

                // We find the dependencies between projects...
                parseDependencies();
            }
            catch (Exception ex)
            {
                // There was an error parsing this solution...
                string message = String.Format("Failed to parse solution {0} [{1}].", solutionFilename, ex.Message);
                throw new Exception(message);
            }
            finally
            {
                // We always quit the DTE object, to make sure that the instance
                // of Visual Studio we are automating is closed down...
                if (m_dte != null)
                {
                    m_dte.Quit();
                }
            }
        }
Exemplo n.º 3
0
        public static IEnumerable <FileData> GetSolutionsFiles(CancellationToken?cancelToken = null)
        {
            System.Diagnostics.Debug.WriteLine("GetSolutionsFiles " + Common.Instance.DTE2.Solution.FileName);
            EnvDTE.Projects projects = Common.Instance.DTE2.Solution.Projects;
            if (null != projects)
            {
                List <FileData> newFiles = new List <FileData>();

                var projectsIte = projects.GetEnumerator();
                while (projectsIte.MoveNext())
                //foreach (EnvDTE.Project project in projects)
                {
                    var project = (EnvDTE.Project)projectsIte.Current;
                    System.Diagnostics.Debug.WriteLine("Project " + project.FileName);
                    if (cancelToken.HasValue && cancelToken.Value.IsCancellationRequested)
                    {
                        return(null);
                    }
                    if (null != project.ProjectItems)
                    {
                        FillProjectItems(newFiles, project.ProjectItems, cancelToken);
                    }
                }
                return(newFiles);
            }

            return(null);
        }
Exemplo n.º 4
0
        private void button1_Click(object sender, RoutedEventArgs e)
        {
            //MessageBox.Show(
            //    string.Format(System.Globalization.CultureInfo.CurrentUICulture, "Invoked '{0}'", this.ToString()),
            //    "VListWindow");

            //EnvDTE80.DTE2 dte2 = (EnvDTE80.DTE2)System.Runtime.InteropServices.Marshal.GetActiveObject("VisualStudio.DTE.14.0");

            //List<FGetter.CppProj> projects = FGetter.getSolutionStruct();

            EnvDTE.Projects projects = FGetter.GetProjects();

            content_list.Clear();

            foreach (EnvDTE.Project project in projects)
            {
                content_list.AddRange(FGetter.ListProjectVariables(project));
            }

            List <string> name_list = new List <string>();

            foreach (FGetter.M3DCppFct fct in content_list)
            {
                name_list.Add(fct.FullName);
            }

            ResListBox.ItemsSource = name_list;
        }
        public FrmActivateMemoryContracts(EnvDTE.Projects projects, string contractsAssemblyPath)
        {
            InitializeComponent();

            this.projects = projects;
            this.contractsAssemblyPath = contractsAssemblyPath;
        }
Exemplo n.º 6
0
        private void BuildFilesListInSolution()
        {
            List <string> ret = new List <string>();

            EnvDTE.Projects proj = m_app.Solution.Projects;
            foreach (EnvDTE.Project obj in proj)
            {
                try
                {
                    if (obj.ProjectItems != null)
                    {
                        foreach (EnvDTE.ProjectItem item in obj.ProjectItems)
                        {
                            try
                            {
                                EnumProjectItems(item);
                            }
                            catch (Exception ex)
                            {
                                System.Diagnostics.Debug.Print(ex.Message);
                            }
                        }
                    }
                }
                catch (Exception eee)
                {
                    System.Diagnostics.Debug.Print("ZAssist : " + eee.Message);
                }
            }
        }
Exemplo n.º 7
0
        /// <summary>
        /// Parses projects in the collection of projects passed in.
        /// </summary>
        private void parseProjects(EnvDTE.Projects projects)
        {
            // We parse each project in the collection.
            // Note that this may end up recursing back into this function,
            // as there may be projects nested in other projects...
            int numProjects = Utils.call(() => (projects.Count));

            for (int i = 1; i <= numProjects; ++i)
            {
                EnvDTE.Project project = Utils.call(() => (projects.Item(i)));
                parseProject(project);
            }
        }
        /// <summary>
        /// This function returns the currently-active project object, provided that it is a valid
        /// project. Validity is defined as:
        /// - It's open
        /// - All items in the project are stored off of the root directory where the
        /// project itself is located
        /// </summary>
        private EnvDTE.Project GetValidProject(string strName)
        {
            EnvDTE.Project CurrentProj = null;

            if (strName == EnvDTE.Constants.vsMiscFilesProjectUniqueName)
            {
                // Copying the Misc Files project doesn't make any sense...
                return(null);
            }

            try
            {
                EnvDTE.Projects     CurrentProjs = null;
                EnvDTE.ProjectItems Items        = null;
                int    nLastIndex;
                string strProjectRootPath;

                CurrentProjs = m_application.Solution.Projects;
                CurrentProj  = CurrentProjs.Item(strName);
                if (CurrentProj == null)
                {
                    return(null);
                }
                strProjectRootPath = CurrentProj.FileName;

                nLastIndex = strProjectRootPath.LastIndexOf('\\');
                if (nLastIndex == -1)
                {
                    nLastIndex = strProjectRootPath.LastIndexOf('/');
                    if (nLastIndex == -1)
                    {
                        return(null);
                    }
                }
                strProjectRootPath = strProjectRootPath.Substring(0, nLastIndex + 1);                 // Just keep the 'path\' of 'path\name'
                strProjectRootPath = strProjectRootPath.ToUpper();

                Items = CurrentProj.ProjectItems;
                if (!ValidProjectItems(Items, strProjectRootPath))
                {
                    return(null);
                }
            }
            catch (Exception /*e*/)
            {
                return(null);
            }

            return(CurrentProj);
        }
Exemplo n.º 9
0
        public static EnvDTE.Project GetFirstLuaProject(EnvDTE.DTE dte)
        {
            EnvDTE.Projects projects = dte.Solution.Projects;
            if (projects == null)
            {
                return(null);
            }

            foreach (EnvDTE.Project project in projects)
            {
                if (project.Kind.ToUpper() == LuaProjectFactoryGuid)
                {
                    return(project);
                }
            }
            return(null);
        }
Exemplo n.º 10
0
        private void button_Click_c_ex_btn(object sender, RoutedEventArgs e)
        {
            EnvDTE.Projects projects = FGetter.GetProjects();
            if (projects.Count == 0)
            {
                return;
            }

            //projects.Item(1).ProjectItems.AddFolder("M3D AutoExport");
            string template_path = ((EnvDTE80.Solution2)FGetter.dte2.Solution).GetProjectItemTemplate("Mext Cpp Export File.zip", "VC");

            if (!CheckForProjectItem(projects.Item(1), "M3D_export.cpp"))
            {
                projects.Item(1).ProjectItems.AddFromTemplate(template_path, "M3D_export.cpp");
            }
            else
            {
                MessageBox.Show(string.Format(System.Globalization.CultureInfo.CurrentUICulture, "File already exists"), "Can't create file!");
            }
        }
Exemplo n.º 11
0
        public static void CloseAllTempLuaProject()
        {
            EnvDTE.DTE dte = Babe.Lua.Package.BabePackage.Current.DTE;

            EnvDTE.Projects projects = dte.Solution.Projects;
            if (projects == null)
            {
                return;
            }

            string projectFolder = System.IO.Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments), SettingFolder, ProjectFolder);

            string solutionFullName = dte.Solution.FullName;

            foreach (EnvDTE.Project project in projects)
            {
                if (project.Kind.ToUpper() == LuaProjectFactoryGuid)
                {
                    string fullName = project.FullName;
                    if (project.FullName.Contains(projectFolder))
                    {
                        project.Save();
                        project.Delete();
                    }
                    //dte.Solution.Remove(project);
                }
            }
            if (dte.Solution.Count == 0)
            {
                dte.Solution.Close(false);
            }
            else
            {
                //dte.Solution.SaveAs(solutionFullName);
            }
        }
        public IEnumerable <EnvDTE.Project> GetDteProjects(EnvDTE.Projects projects)
        {
            if (projects == null)
            {
                yield break;
            }

            for (var i = 1; i <= projects.Count; i++)
            {
                EnvDTE.Project item;

                try
                {
                    item = projects.Item(i);
                }
                catch (Exception ex)
                {
                    _tracer.TraceError("Error loading a project: " + ex.Message);
                    continue;
                }

                yield return(item);
            }
        }
Exemplo n.º 13
0
        /// <summary>
        /// Called by the vs shell to start debugging (managed or unmanaged).
        /// Override this method to support other debug engines.
        /// </summary>
        /// <param name="grfLaunch">A flag that determines the conditions under which to start the debugger. For valid grfLaunch values, see __VSDBGLAUNCHFLAGS</param>
        /// <returns>If the method succeeds, it returns S_OK. If it fails, it returns an error code</returns>

        /*public override int DebugLaunch(uint grfLaunch)
         * {
         *  // System.Windows.Forms.MessageBox.Show("SquirrelProjectConfig.DebugLaunch", "Debugger debugging", System.Windows.Forms.MessageBoxButtons.OK, 0);
         *
         *  //CCITracing.TraceCall();
         *
         *  try
         *  {
         *
         *      VsDebugTargetInfo info = new VsDebugTargetInfo();
         *      info.cbSize = (uint)Marshal.SizeOf(info);
         *      info.dlo = Microsoft.VisualStudio.Shell.Interop.DEBUG_LAUNCH_OPERATION.DLO_CreateProcess;
         *
         *      string interpreter;
         *      string workingdirectory;
         *      bool localhost = false;
         *      int port = 1234;
         *      string targetaddress;
         *      string commandlineoptions;
         *      string pathfixup;
         *      bool suspendonstartup = false;
         *      bool autoruninterpreter = true;
         *
         *      string projectfolder = ProjectMgr.ProjectFolder;
         *      interpreter = FetchStringProperty("Interpreter", "");
         *      workingdirectory = FetchStringProperty("WorkingDirectory", Path.GetDirectoryName(interpreter));
         *      suspendonstartup = FetchBoolProperty("SuspendOnStartup", false);
         *      autoruninterpreter = true;//FetchBoolProperty("AutorunInterpreter", true);
         *
         *      localhost = FetchBoolProperty("Localhost", true);
         *      targetaddress = FetchStringProperty("TargetAddress", "127.0.0.1");
         *      pathfixup = FetchStringProperty("PathFixup", "");
         *      pathfixup = pathfixup.Replace(',', '#');
         *      if (localhost)
         *      {
         *          //overrides the setting if localhost is true
         *          targetaddress = "127.0.0.1";
         *      }
         *      commandlineoptions = FetchStringProperty("CommandLineOptions", "");
         *      port = FetchIntProperty("Port", 1234);
         *
         *      info.bstrExe = interpreter;
         *      info.bstrCurDir = workingdirectory;
         *      info.bstrArg = commandlineoptions;
         *      info.bstrOptions = targetaddress + "," + port.ToString() + "," + autoruninterpreter.ToString() + "," + suspendonstartup.ToString() + "," + projectfolder + "," + pathfixup;
         *
         *
         *      //squirrel debugger
         *      info.bstrPortName = "SquirrelPort";
         *      info.clsidPortSupplier = SQProjectGuids.guidPortSupplier;
         *      info.clsidCustom = SQProjectGuids.guidDebugEngine;
         *      info.grfLaunch = grfLaunch;
         *      VsShellUtilities.LaunchDebugger(this.ProjectMgr.Site, info);
         *  }
         *  catch (Exception e)
         *  {
         *      Trace.WriteLine("Exception : " + e.Message);
         *
         *      return Marshal.GetHRForException(e);
         *  }
         *
         *  return VSConstants.S_OK;
         * }*/
        public override int DebugLaunch(uint grfLaunch)
        {
            //CCITracing.TraceCall();

            try
            {
                EnvDTE.DTE dte = ProjectMgr.Site.GetService(typeof(EnvDTE.DTE)) as EnvDTE.DTE;
                // EnvDTE.DTE dte = (EnvDTE.DTE)_ls.GetService(typeof(EnvDTE.DTE));
                List <KeyValuePair <string, string> > pns = new List <KeyValuePair <string, string> >();
                EnvDTE.Projects projects = dte.Solution.Projects;
                foreach (object prj in projects)
                {
                    SQAutomationProject p = prj as SQAutomationProject;
                    if (p != null)
                    {
                        ProjectNode spn       = p.Project as ProjectNode;
                        string      pathfixup = spn.GetProjectProperty(Resources.PathFixup);//.BuildProject.EvaluatedProperties;
                        if (string.IsNullOrEmpty(pathfixup))
                        {
                            continue;
                        }
                        //string pathfixup = (string)bpg["PathFixup"];
                        string projfolder = spn.ProjectFolder;
                        if (!projfolder.EndsWith("\\"))
                        {
                            projfolder += "\\";
                        }
                        KeyValuePair <string, string> pair = new KeyValuePair <string, string>(projfolder, pathfixup);
                        pns.Add(pair);
                    }
                    else
                    {
                        //this sometimes happens even if there is only 1 project, is wierdm, who knows!?
                        //Console.WriteLine(prj.ToString());
                    }
                }
                VsDebugTargetInfo info = new VsDebugTargetInfo();
                info.cbSize = (uint)Marshal.SizeOf(info);
                info.dlo    = Microsoft.VisualStudio.Shell.Interop.DEBUG_LAUNCH_OPERATION.DLO_CreateProcess;

                string interpreter;
                string workingdirectory;
                bool   localhost = false;
                int    port      = 1234;
                string targetaddress;
                string commandlineoptions;
                //string pathfixup;
                bool suspendonstartup   = false;
                bool autoruninterpreter = true;

                string projectfolder = ProjectMgr.ProjectFolder;
                interpreter = FetchStringProperty("Interpreter", "");
                if (string.IsNullOrEmpty(interpreter) || !File.Exists(interpreter))
                {
                    throw new Exception("The Interpreter path is invalid. Please change this in the Project Settings > Debugger > Interpreter.");
                }
                workingdirectory   = FetchStringProperty("WorkingDirectory", Path.GetDirectoryName(interpreter));
                suspendonstartup   = FetchBoolProperty("SuspendOnStartup", false);
                autoruninterpreter = FetchBoolProperty("AutorunInterpreter", true);

                localhost     = FetchBoolProperty("Localhost", true);
                targetaddress = FetchStringProperty("TargetAddress", "127.0.0.1");
                //string pathfixup = FetchStringProperty("PathFixup", "");
                //pathfixup = pathfixup.Replace(',', '#');
                if (localhost)
                {
                    //overrides the setting if localhost is true
                    targetaddress = "127.0.0.1";
                }
                commandlineoptions = FetchStringProperty("CommandLineOptions", "");
                port = FetchIntProperty("Port", 1234);
                int connectiondelay = FetchIntProperty("ConnectionDelay", 1000);
                int connectiontries = FetchIntProperty("ConnectionTries", 3);

                StringBuilder     sb  = new StringBuilder();
                XmlWriterSettings xws = new XmlWriterSettings();
                xws.Indent             = true;
                xws.OmitXmlDeclaration = true;
                XmlWriter w = XmlWriter.Create(sb, xws);
                w.WriteStartDocument();
                w.WriteStartElement("params");
                w.WriteAttributeString("targetaddress", targetaddress);
                w.WriteAttributeString("port", port.ToString());
                w.WriteAttributeString("autoruninterpreter", autoruninterpreter.ToString());
                w.WriteAttributeString("suspendonstartup", suspendonstartup.ToString());
                w.WriteAttributeString("connectiondelay", connectiondelay.ToString());
                w.WriteAttributeString("connectiontries", connectiontries.ToString());
                foreach (KeyValuePair <string, string> kv in pns)
                {
                    w.WriteStartElement("context");
                    w.WriteAttributeString("rootpath", kv.Key);
                    w.WriteAttributeString("pathfixup", kv.Value);
                    w.WriteEndElement();
                }
                w.WriteEndElement();
                w.WriteEndDocument();
                w.Flush();
                w.Close();

                info.bstrExe     = interpreter;
                info.bstrCurDir  = workingdirectory;
                info.bstrArg     = commandlineoptions;
                info.bstrOptions = sb.ToString();// targetaddress + "," + port.ToString() + "," + autoruninterpreter.ToString() + "," + suspendonstartup.ToString() + "," + projectfolder + "," + pathfixup;


                //squirrel debugger
                info.bstrPortName      = "SquirrelPort";
                info.clsidPortSupplier = SQProjectGuids.guidPortSupplier; //new Guid("{C419451D-BC37-44f7-901E-880E74B7D886}");
                info.clsidCustom       = SQProjectGuids.guidDebugEngine;  //new Guid("{3F1D8F51-4A1C-4ac2-962B-BA96794D8373}");
                info.grfLaunch         = grfLaunch;
                VsShellUtilities.LaunchDebugger(this.ProjectMgr.Site, info);
            }
            catch (Exception e)
            {
                Trace.WriteLine("Exception : " + e.Message);

                return(Marshal.GetHRForException(e));
            }

            return(VSConstants.S_OK);
        }
Exemplo n.º 14
0
        private void MenuItemCallback(bool split)
        {
            ThreadHelper.ThrowIfNotOnUIThread();
            try
            {
                ////////////////////////
                /// Reorder parser productions.
                ////////////////////////

                if (!(((IServiceProvider)ServiceProvider).GetService(typeof(VsTextManagerClass)) is IVsTextManager manager))
                {
                    return;
                }
                manager.GetActiveView(1, null, out IVsTextView view);
                if (view == null)
                {
                    return;
                }
                view.GetCaretPos(out int l, out int c);
                view.GetBuffer(out IVsTextLines buf);
                if (buf == null)
                {
                    return;
                }
                ITextBuffer buffer = AntlrLanguageClient.AdaptersFactory.GetWpfTextView(view)?.TextBuffer;
                string      ffn    = buffer.GetFFN();
                if (ffn == null)
                {
                    return;
                }
                Workspaces.Document document = Workspaces.Workspace.Instance.FindDocument(ffn);
                if (document == null)
                {
                    return;
                }
                int pos = new LanguageServer.Module().GetIndex(l, c, document);
                Dictionary <string, string> changes = AntlrLanguageClient.CMSplitCombineGrammars(ffn, split);
                EnvDTE.Project project       = null;
                string         the_namespace = "";
                for (; ;)
                {
                    string current_grammar_ffn = ffn;
                    (EnvDTE.Project, EnvDTE.ProjectItem)p_f_original_grammar = LspAntlr.MakeChanges.FindProjectAndItem(current_grammar_ffn);
                    project = p_f_original_grammar.Item1;
                    try
                    {
                        object prop = p_f_original_grammar.Item2.Properties.Item("CustomToolNamespace").Value;
                        the_namespace = prop.ToString();
                    }
                    catch (Exception)
                    {
                    }
                    break;
                }
                if (project == null)
                {
                    EnvDTE.DTE      dte      = (EnvDTE.DTE)Package.GetGlobalService(typeof(EnvDTE.DTE));
                    EnvDTE.Projects projects = dte.Solution.Projects;
                    project = projects.Item(EnvDTE.Constants.vsMiscFilesProjectUniqueName);
                }
                if (changes == null)
                {
                    return;
                }
                MakeChanges.EnterChanges(changes, project, the_namespace);
            }
            catch (Exception exception)
            {
                Logger.Log.Notify(exception.StackTrace);
            }
        }
        /// <summary>
        /// This function is the callback used to execute the command when the menu item is clicked.
        /// See the constructor to see how the menu item is associated with this function using
        /// OleMenuCommandService service and MenuCommand class.
        /// </summary>
        /// <param name="sender">Event sender.</param>
        /// <param name="e">Event args.</param>
        private void Execute(object sender, EventArgs e)
        {
            ThreadHelper.ThrowIfNotOnUIThread();
            EnvDTE.DTE      dte      = (EnvDTE.DTE) this.ServiceProvider.GetServiceAsync(typeof(EnvDTE.DTE)).Result;
            EnvDTE.Projects projects = dte.Solution.Projects;

            string vcxfilepath  = "";
            string projFilePath = "";
            string props        = "";

            foreach (EnvDTE.Project project in projects)
            {
                foreach (EnvDTE.Property property in project.Properties)
                {
                    try
                    {
                        props += property.Name + ":\t" + property.Value.ToString() + '\n';
                    }
                    catch (Exception)
                    {
                    }

                    if (property.Name == "Kind" && property.Value.ToString() != "VCProject")
                    {
                        throw new Exception("Wrong project type, needs to be a C++ project");
                    }

                    if (property.Name == "ShowAllFiles")
                    {
                        property.Value = "True";
                    }
                    else if (property.Name == "ProjectFile")
                    {
                        vcxfilepath = property.Value.ToString();
                    }
                    else if (property.Name == "ProjectDirectory")
                    {
                        projFilePath = property.Value.ToString();
                    }
                }
                break;
            }

            //VsShellUtilities.ShowMessageBox(this.package, props, "", 0, 0, 0);

            if (!vcxfilepath.Equals(""))
            {
                VCXProjFileHandler.ModifyVCXProjWin32(vcxfilepath);
            }

            Directory.CreateDirectory(projFilePath + "\\src");

            using (FileStream writer = new FileStream(projFilePath + "\\src\\pch.cpp", FileMode.Create))
            {
                byte[] arr = Encoding.ASCII.GetBytes("#include \"pch.h\"\n\n\n");
                writer.Write(arr, 0, 19);
            }

            using (FileStream writer = new FileStream(projFilePath + "\\src\\pch.h", FileMode.Create))
            {
                byte[] arr = Encoding.ASCII.GetBytes("#pragma once\n\n\n#include <Windows.h>\n\n");
                writer.Write(arr, 0, 37);
            }

            using (FileStream writer = new FileStream(projFilePath + "\\src\\main.cpp", FileMode.Create))
            {
                byte[] arr = Encoding.ASCII.GetBytes("#include \"pch.h\"\n\n\n\nint WINAPI wWinMain(_In_ HINSTANCE hInstance, _In_opt_ HINSTANCE hPrevInstance, _In_ PWSTR pCmdLine, _In_ int nCmdShow)\n{\n\t\n}\n\n");
                writer.Write(arr, 0, 147);
            }
        }
Exemplo n.º 16
0
        private void MenuItemCallback(object sender, EventArgs e)
        {
            ThreadHelper.ThrowIfNotOnUIThread();
            if (!(ServiceProvider.GetService(typeof(VsTextManagerClass)) is IVsTextManager manager))
            {
                return;
            }
            // If we have a view, we'll place the imported file in the parent project.
            // Otherwise the "misc project".
            EnvDTE.Project project       = null;
            string         the_namespace = "";

            for (; ;)
            {
                manager.GetActiveView(1, null, out IVsTextView view);
                if (view == null)
                {
                    break;
                }
                view.GetBuffer(out IVsTextLines buf);
                if (buf == null)
                {
                    break;
                }
                IWpfTextView xxx    = AntlrLanguageClient.AdaptersFactory.GetWpfTextView(view);
                ITextBuffer  buffer = xxx.TextBuffer;
                string       ffn    = buffer.GetFFN();
                if (ffn == null)
                {
                    break;
                }
                string current_grammar_ffn = ffn;
                (EnvDTE.Project, EnvDTE.ProjectItem)p_f_original_grammar = LspAntlr.MakeChanges.FindProjectAndItem(current_grammar_ffn);
                project = p_f_original_grammar.Item1;
                try
                {
                    object prop = p_f_original_grammar.Item2.Properties.Item("CustomToolNamespace").Value;
                    the_namespace = prop.ToString();
                }
                catch (Exception)
                {
                }
                break;
            }
            if (project == null)
            {
                EnvDTE.DTE      dte      = (EnvDTE.DTE)Package.GetGlobalService(typeof(EnvDTE.DTE));
                EnvDTE.Projects projects = dte.Solution.Projects;
                project = projects.Item(EnvDTE.Constants.vsMiscFilesProjectUniqueName);
            }
            ImportBox dialog_box = new ImportBox();

            dialog_box.ShowDialog();
            System.Collections.Generic.List <StringValue> xx = dialog_box.List;
            if (xx == null)
            {
                return;
            }
            // Note, the language client cannot be applied here because we
            // aren't focused on a grammar file, and may not even have a window
            // open!
            System.Collections.Generic.Dictionary <string, string> changes = LanguageServer.Import.ImportGrammars(xx.Select(t => t.Ffn).ToList());
            LspAntlr.MakeChanges.EnterChanges(changes, project, the_namespace);
        }