OLD | NEW |
| (Empty) |
1 // Copyright 2009 The Native Client Authors. All rights reserved. | |
2 // Use of this source code is governed by a BSD-style license that can | |
3 // be found in the LICENSE file. | |
4 using System; | |
5 using System.Diagnostics; | |
6 using System.Runtime.InteropServices; | |
7 using Microsoft.VisualStudio; | |
8 using Microsoft.VisualStudio.Shell; | |
9 using Microsoft.VisualStudio.Shell.Interop; | |
10 using IOleServiceProvider = Microsoft.VisualStudio.OLE.Interop.IServiceProvider; | |
11 using Microsoft.VisualStudio.Project; | |
12 | |
13 namespace Google.NaClVsx.ProjectSupport { | |
14 [Guid(NaClGuids.kGuidNaClVsxProjectFactoryString)] | |
15 class NaClProjectFactory : ProjectFactory { | |
16 | |
17 public NaClProjectFactory(Package package) : base(package) { | |
18 Trace.WriteLine("Entered NaClProjectFactory constructor"); | |
19 } | |
20 | |
21 #region Implementation of IVsProjectFactory | |
22 | |
23 public int CanCreateProject(string pszFilename, | |
24 uint grfCreateFlags, | |
25 out int pfCanCreate) { | |
26 pfCanCreate = 1; | |
27 return VSConstants.S_OK; | |
28 // TO DO: Under what circumstances should we | |
29 // throw a NotImplementedException(); | |
30 } | |
31 | |
32 protected override ProjectNode CreateProject() { | |
33 ProjectNode proj = new NaClProjectNode(); | |
34 proj.SetSite((IOleServiceProvider)((IServiceProvider)this.Package).GetServ
ice(typeof(IOleServiceProvider))); | |
35 return proj; | |
36 } | |
37 | |
38 public int SetSite(IServiceProvider psp) { | |
39 throw new NotImplementedException(); | |
40 } | |
41 | |
42 public int Close() { | |
43 throw new NotImplementedException(); | |
44 } | |
45 | |
46 #endregion | |
47 } | |
48 } | |
OLD | NEW |