public ProjectConfig(ProjectNode project, string configuration) { this.project = project; this.configName = configuration; // Because the project can be aggregated by a flavor, we need to make sure // we get the outer most implementation of that interface (hence: project --> IUnknown --> Interface) IntPtr projectUnknown = Marshal.GetIUnknownForObject(this.ProjectMgr); try { IVsProjectFlavorCfgProvider flavorCfgProvider = (IVsProjectFlavorCfgProvider)Marshal.GetTypedObjectForIUnknown(projectUnknown, typeof(IVsProjectFlavorCfgProvider)); ErrorHandler.ThrowOnFailure(flavorCfgProvider.CreateProjectFlavorCfg(this, out flavoredCfg)); if (flavoredCfg == null) { throw new COMException(); } } finally { if (projectUnknown != IntPtr.Zero) { Marshal.Release(projectUnknown); } } // if the flavored object support XML fragment, initialize it IPersistXMLFragment persistXML = flavoredCfg as IPersistXMLFragment; if (null != persistXML) { this.project.LoadXmlFragment(persistXML, this.DisplayName); } }
public int CreateProjectFlavorCfg(IVsCfg baseProjectCfg, out IVsProjectFlavorCfg flavoredProjectCfg) { IVsProjectFlavorCfg config; _innerCfgProvider.CreateProjectFlavorCfg(baseProjectCfg, out config); flavoredProjectCfg = new SampSharpFlavorConfig(this, baseProjectCfg, config); return(VSConstants.S_OK); }
public int CreateProjectFlavorCfg(IVsCfg baseProjectCfg, out IVsProjectFlavorCfg flavoredProjectCfg) { IVsProjectFlavorCfg cfg; innerCfgProvider.CreateProjectFlavorCfg(baseProjectCfg, out cfg); flavoredProjectCfg = new MonoProgramFlavorCfg(this, baseProjectCfg, cfg); return(VSConstants.S_OK); }
public ProjectConfig(ProjectNode project, string configuration, string platform) { if (project == null) { throw new ArgumentNullException("project"); } if (configuration == null) { throw new ArgumentNullException("configuration"); } if (platform == null) { throw new ArgumentNullException("platform"); } if (string.IsNullOrEmpty("configuration")) { throw new ArgumentException("configuration cannot be null or empty"); } if (string.IsNullOrEmpty("platform")) { throw new ArgumentException("platform cannot be null or empty"); } this._project = project; this._configName = configuration; this._platform = platform; // Because the project can be aggregated by a flavor, we need to make sure // we get the outer most implementation of that interface (hence: project --> IUnknown --> Interface) IntPtr projectUnknown = Marshal.GetIUnknownForObject(this.ProjectManager); try { IVsProjectFlavorCfgProvider flavorCfgProvider = (IVsProjectFlavorCfgProvider)Marshal.GetTypedObjectForIUnknown(projectUnknown, typeof(IVsProjectFlavorCfgProvider)); ErrorHandler.ThrowOnFailure(flavorCfgProvider.CreateProjectFlavorCfg(this, out flavoredCfg)); if (flavoredCfg == null) { ErrorHandler.ThrowOnFailure(VSConstants.E_FAIL); } } finally { if (projectUnknown != IntPtr.Zero) { Marshal.Release(projectUnknown); } } // if the flavored object support XML fragment, initialize it IPersistXMLFragment persistXML = flavoredCfg as IPersistXMLFragment; if (null != persistXML) { this._project.LoadXmlFragment(persistXML, this.DisplayName); } }
public int CreateProjectFlavorCfg(IVsCfg pBaseProjectCfg, out IVsProjectFlavorCfg ppFlavorCfg) { IVsProjectFlavorCfg cfg; ErrorHandler.ThrowOnFailure( _innerVsProjectFlavorCfgProvider.CreateProjectFlavorCfg( pBaseProjectCfg, out cfg ) ); ppFlavorCfg = new NodejsUwpProjectFlavorCfg(this, pBaseProjectCfg, cfg); return(VSConstants.S_OK); }
public ProjectConfig(ProjectNode project, string configuration) { this.project = project; this.configName = configuration; // Initialize output groups // Get the list of group names from the project. // The main reason we get it from the project is to make it easier for someone to modify // it by simply overriding that method and providing the correct MSBuild target(s). IList <KeyValuePair <string, string> > groupNames = project.GetOutputGroupNames(); if (groupNames != null) { // Populate the output array foreach (KeyValuePair <string, string> group in groupNames) { OutputGroup outputGroup = CreateOutputGroup(project, group); this.outputGroups.Add(outputGroup); } } // Because the project can be aggregated by a flavor, we need to make sure // we get the outer most implementation of that interface (hence: project --> IUnknown --> Interface) IntPtr projectUnknown = Marshal.GetIUnknownForObject(this.ProjectMgr); try { IVsProjectFlavorCfgProvider flavorCfgProvider = (IVsProjectFlavorCfgProvider)Marshal.GetTypedObjectForIUnknown(projectUnknown, typeof(IVsProjectFlavorCfgProvider)); ErrorHandler.ThrowOnFailure(flavorCfgProvider.CreateProjectFlavorCfg(this, out flavoredCfg)); if (flavoredCfg == null) { throw new COMException(); } } finally { if (projectUnknown != IntPtr.Zero) { Marshal.Release(projectUnknown); } } // if the flavored object support XML fragment, initialize it if (flavoredCfg is IPersistXMLFragment) { this.project.LoadXmlFragment((IPersistXMLFragment)flavoredCfg, this.DisplayName); } }
public int CreateProjectFlavorCfg(IVsCfg pBaseProjectCfg, out IVsProjectFlavorCfg ppFlavorCfg) { Microsoft.VisualStudio.Shell.ThreadHelper.ThrowIfNotOnUIThread(); ppFlavorCfg = null; if (_innerFlavorConfig != null) { GetProperty(VSConstants.VSITEMID_ROOT, (int)__VSHPROPID.VSHPROPID_ExtObject, out var project); _innerFlavorConfig.CreateProjectFlavorCfg(pBaseProjectCfg, out IVsProjectFlavorCfg cfg); ppFlavorCfg = new GodotDebuggableProjectCfg(cfg, project as EnvDTE.Project); } return(ppFlavorCfg != null ? VSConstants.S_OK : VSConstants.E_FAIL); }
public int CreateProjectFlavorCfg(IVsCfg pBaseProjectCfg, out IVsProjectFlavorCfg ppFlavorCfg) { // We're flavored with a Web Application project and our normal project... But we don't // want the web application project to influence our config as that alters our debug // launch story. We control that w/ the Django project which is actually just letting the // base Python project handle it. So we keep the base Python project config here. IVsProjectFlavorCfg webCfg; ErrorHandler.ThrowOnFailure( _innerVsProjectFlavorCfgProvider.CreateProjectFlavorCfg( pBaseProjectCfg, out webCfg ) ); ppFlavorCfg = new DjangoProjectConfig(pBaseProjectCfg, webCfg); return(VSConstants.S_OK); }
/// <summary> /// Allows the base project to ask the project subtype to create an /// IVsProjectFlavorCfg object corresponding to each one of its /// (project subtype's) configuration objects. /// </summary> /// <param name="pBaseProjectCfg"> /// The IVsCfg object of the base project. /// </param> /// <param name="ppFlavorCfg"> /// The IVsProjectFlavorCfg object of the project subtype. /// </param> /// <returns></returns> public int CreateProjectFlavorCfg(IVsCfg pBaseProjectCfg, out IVsProjectFlavorCfg ppFlavorCfg) { IVsProjectFlavorCfg cfg = null; if (innerVsProjectFlavorCfgProvider != null) { innerVsProjectFlavorCfgProvider. CreateProjectFlavorCfg(pBaseProjectCfg, out cfg); } var configuration = new DotvvmPropertyPageProjectFlavorCfg(); configuration.Initialize(this, pBaseProjectCfg, cfg); ppFlavorCfg = (IVsProjectFlavorCfg)configuration; return(VSConstants.S_OK); }
public ProjectConfig(ProjectNode project, string configuration) { this.project = project; // !EFW - Bug in VS2015 or an incompatibility with the older MPF project system. This can get // passed an invalid configuration value such as "Debug|Any CPU". As a workaround, trim off the // invalid part. if (!String.IsNullOrWhiteSpace(configuration) && configuration.IndexOf('|') != -1) { this.configName = configuration.Substring(0, configuration.IndexOf('|')); } else { this.configName = configuration; } // Because the project can be aggregated by a flavor, we need to make sure // we get the outer most implementation of that interface (hence: project --> IUnknown --> Interface) IntPtr projectUnknown = Marshal.GetIUnknownForObject(this.ProjectMgr); try { IVsProjectFlavorCfgProvider flavorCfgProvider = (IVsProjectFlavorCfgProvider)Marshal.GetTypedObjectForIUnknown(projectUnknown, typeof(IVsProjectFlavorCfgProvider)); ErrorHandler.ThrowOnFailure(flavorCfgProvider.CreateProjectFlavorCfg(this, out flavoredCfg)); if (flavoredCfg == null) { throw new COMException(); } } finally { if (projectUnknown != IntPtr.Zero) { Marshal.Release(projectUnknown); } } // if the flavored object support XML fragment, initialize it IPersistXMLFragment persistXML = flavoredCfg as IPersistXMLFragment; if (null != persistXML) { this.project.LoadXmlFragment(persistXML, this.DisplayName); } }
public int CreateProjectFlavorCfg(IVsCfg pBaseProjectCfg, out IVsProjectFlavorCfg ppFlavorCfg) { // We're flavored with a Windows Store Application project and our normal // project... But we don't want the web application project to // influence our config as that alters our debug launch story. We // control that w/ the web project which is actually just letting // the base Python project handle it. So we keep the base Python // project config here. IVsProjectFlavorCfg uwpCfg; ErrorHandler.ThrowOnFailure( _innerVsProjectFlavorCfgProvider.CreateProjectFlavorCfg( pBaseProjectCfg, out uwpCfg ) ); ppFlavorCfg = new PythonUwpProjectConfig(pBaseProjectCfg, uwpCfg); return(VSConstants.S_OK); }
public int CreateProjectFlavorCfg(IVsCfg pBaseProjectCfg, out IVsProjectFlavorCfg ppFlavorCfg) { IVsProjectFlavorCfg cfg = null; ppFlavorCfg = null; if (innerFlavorConfig != null) { GetProperty(VSConstants.VSITEMID_ROOT, (int)__VSHPROPID.VSHPROPID_ExtObject, out object project); innerFlavorConfig.CreateProjectFlavorCfg(pBaseProjectCfg, out cfg); ppFlavorCfg = new CryEngineDebuggableConfig(cfg, project as EnvDTE.Project); } if (ppFlavorCfg != null) { return(VSConstants.S_OK); } return(VSConstants.E_FAIL); }