/// <summary> /// Parses the project passed in. /// </summary> private void parseProject(EnvDTE.Project project) { // We get the project name... string projectName = Utils.call(() => (project.Name)); // We check if the project is loaded in the solution if (Utils.call(() => project.Object) == null && Utils.call(() => project.UniqueName) != "<MiscFiles>") { Log.log("Warning: " + projectName + " is currently unloaded in the solution! No conversion performed"); return; } // We check if this project is a kind we know how to convert... string strProjectType = Utils.call(() => (project.Kind)); ProjectType eProjectType = convertProjectTypeToEnum(strProjectType); switch (eProjectType) { // It's a C++ project... case ProjectType.CPP_PROJECT: { // We get the Visual Studio project, parse it and store the // parsed project in our collection of results... VCProject vcProject = Utils.call(() => (project.Object as VCProject)); ProjectParser_CPP parser = new ProjectParser_CPP(vcProject, m_parsedSolution.RootFolderAbsolute); ProjectParser_ForCUDA cudaparser = new ProjectParser_ForCUDA(project.FileName, project.Name); // Remove cuda file. foreach (var info in cudaparser.Project.CompileInfos) { parser.Project.removeFile(info.File); } m_parsedSolution.addProjectInfo(projectName, parser.Project); m_parsedSolution.addCudaProjectInfo(projectName, cudaparser.Project); } break; // Not support... #if false // It's a C# project... case ProjectType.CSHARP_PROJECT: { // We get the Visual Studio project, parse it and store the // parsed project in our collection of results... VSProject2 vsProject = Utils.call(() => (project.Object as VSProject2)); ProjectParser_CSharp parser = new ProjectParser_CSharp(vsProject, m_parsedSolution.RootFolderAbsolute); m_parsedSolution.addProjectInfo(projectName, parser.Project); } break; #endif } // We parse the project's items, to check whether there are any nested // projects... EnvDTE.ProjectItems projectItems = Utils.call(() => (project.ProjectItems)); parseProjectItems(projectItems); }
/// <summary> /// Parses the project passed in. /// </summary> private void parseProject(EnvDTE.Project project) { // We get the project name... string projectName = Utils.call(() => (project.Name)); if (MakeItSoConfig.Instance.ignoreProject(projectName)) { Log.log("- Ignoring project: " + projectName); return; } // We check if this project is a kind we know how to convert... string strProjectType = Utils.call(() => (project.Kind)); ProjectType eProjectType = convertProjectTypeToEnum(strProjectType); switch (eProjectType) { // It's a C++ project... case ProjectType.CPP_PROJECT: { // We get the Visual Studio project, parse it and store the // parsed project in our collection of results... VCProject vcProject = Utils.call(() => (project.Object as VCProject)); ProjectParser_CPP parser = new ProjectParser_CPP(vcProject, m_parsedSolution.RootFolderAbsolute); m_parsedSolution.addProjectInfo(projectName, parser.Project); } break; // It's a C# project... case ProjectType.CSHARP_PROJECT: { // We get the Visual Studio project, parse it and store the // parsed project in our collection of results... VSProject2 vsProject = Utils.call(() => (project.Object as VSProject2)); ProjectParser_CSharp parser = new ProjectParser_CSharp(vsProject, m_parsedSolution.RootFolderAbsolute); m_parsedSolution.addProjectInfo(projectName, parser.Project); } break; } // We parse the project's items, to check whether there are any nested // projects... EnvDTE.ProjectItems projectItems = Utils.call(() => (project.ProjectItems)); parseProjectItems(projectItems); }
/// <summary> /// Parses the project passed in. /// </summary> private void parseProject(EnvDTE.Project project) { // We get the project name... string projectName = Utils.call(() => (project.Name)); // We check if the project is loaded in the solution if (Utils.call(() => project.Object) == null && Utils.call(() => project.UniqueName) != "<MiscFiles>") { Log.log("Warning: " + projectName + " is currently unloaded in the solution! No conversion performed"); return; } // We check if this project is a kind we know how to convert... string strProjectType = Utils.call(() => (project.Kind)); ProjectType eProjectType = convertProjectTypeToEnum(strProjectType); switch (eProjectType) { // It's a C++ project... case ProjectType.CPP_PROJECT: { // We get the Visual Studio project, parse it and store the // parsed project in our collection of results... VCProject vcProject = Utils.call(() => (project.Object as VCProject)); ProjectParser_CPP parser = new ProjectParser_CPP(vcProject, m_parsedSolution.RootFolderAbsolute); m_parsedSolution.addProjectInfo(projectName, parser.Project); } break; // It's a C# project... case ProjectType.CSHARP_PROJECT: { // We get the Visual Studio project, parse it and store the // parsed project in our collection of results... VSProject2 vsProject = Utils.call(() => (project.Object as VSProject2)); ProjectParser_CSharp parser = new ProjectParser_CSharp(vsProject, m_parsedSolution.RootFolderAbsolute); m_parsedSolution.addProjectInfo(projectName, parser.Project); } break; } // We parse the project's items, to check whether there are any nested // projects... EnvDTE.ProjectItems projectItems = Utils.call(() => (project.ProjectItems)); parseProjectItems(projectItems); }
/// <summary> /// Parses the project passed in. /// </summary> private void parseProject(EnvDTE.Project project) { // We get the project name... string projectName = Utils.call(() => (project.Name)); // We check if this project is a kind we know how to convert... string strProjectType = Utils.call(() => (project.Kind)); ProjectType eProjectType = convertProjectTypeToEnum(strProjectType); switch (eProjectType) { // It's a C++ project... case ProjectType.CPP_PROJECT: { // We get the Visual Studio project, parse it and store the // parsed project in our collection of results... VCProject vcProject = Utils.call(() => (project.Object as VCProject)); ProjectParser_CPP parser = new ProjectParser_CPP(vcProject, m_parsedSolution.RootFolderAbsolute); m_parsedSolution.addProjectInfo(projectName, parser.Project); } break; // It's a C# project... case ProjectType.CSHARP_PROJECT: { // We get the Visual Studio project, parse it and store the // parsed project in our collection of results... VSProject2 vsProject = Utils.call(() => (project.Object as VSProject2)); ProjectParser_CSharp parser = new ProjectParser_CSharp(vsProject, m_parsedSolution.RootFolderAbsolute); m_parsedSolution.addProjectInfo(projectName, parser.Project); } break; } // We parse the project's items, to check whether there are any nested // projects... EnvDTE.ProjectItems projectItems = Utils.call(() => (project.ProjectItems)); parseProjectItems(projectItems); }