/
O2.Platform.VisualStudio_2010Package.cs
71 lines (59 loc) · 2.55 KB
/
O2.Platform.VisualStudio_2010Package.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
using System;
using System.Diagnostics;
using System.Globalization;
using System.Runtime.InteropServices;
using System.ComponentModel.Design;
using Microsoft.Win32;
using Microsoft.VisualStudio;
using Microsoft.VisualStudio.Shell.Interop;
using Microsoft.VisualStudio.OLE.Interop;
using Microsoft.VisualStudio.Shell;
using O2.FluentSharp.VisualStudio;
using O2.Kernel;
using O2.DotNetWrappers.DotNet;
using O2.DotNetWrappers.ExtensionMethods;
using System.Windows.Forms;
namespace O2.Platform.VisualStudio_2010_Extension
{
static class GuidList
{
public const string guidO2_Platform_VisualStudio_2010PkgString = "F886416F-3DBF-4DEE-9578-E7692FC59871";
// public const string guidO2_Platform_VisualStudio_2010CmdSetString = "dcf44788-1870-4627-9dbb-910bee34c55c";
// public static readonly Guid guidO2_Platform_VisualStudio_2010CmdSet = new Guid(guidO2_Platform_VisualStudio_2010CmdSetString);
}
[PackageRegistration(UseManagedResourcesOnly = true)]
[Guid(GuidList.guidO2_Platform_VisualStudio_2010PkgString)]
[ProvideAutoLoad(UIContextGuids80.NoSolution)] // ensures this gets called on VisualStudio start
public sealed class O2_Platform_VisualStudio_2010Package : NoSolution_Package
{
public O2_Platform_VisualStudio_2010Package()
{
O2ConfigSettings.O2Version = "O2_VS2010_4.4.16";
PublicDI.config = new O2.Kernel.InterfacesBaseImpl.KO2Config();
"aaa".popupWindow();
open.logViewer();
}
/////////////////////////////////////////////////////////////////////////////
// Overriden Package Implementation
#region Package Members
protected override void Initialize()
{
base.Initialize();
if (Control.ModifierKeys == Keys.Shift)
open.scriptEditor();
try
{
VisualStudio_O2_Utils.waitForDTEObject();
"[O2_Platform_VisualStudio_2010Package] Package: {0}, DTE: {1}".info(VisualStudio_2010.Package, VisualStudio_2010.DTE2);
CompileEngine.LocalFoldersToSearchForCodeFiles.Add(this.type().assemblyLocation().parentFolder()); // so that "{file}".local() is able to find files included with this
//CompileEngine.clearCompilationCache();
VisualStudio_O2_Utils.compileAndExecuteScript(@"VS_Scripts\O2_Platform_Gui.cs", "O2_Platform_Gui", "buildGui");
}
catch (Exception ex)
{
ex.log("in O2_Platform_VisualStudio_2010Package Initialize");
}
}
#endregion
}
}