Skip to content

Commit

Permalink
Major release of O2.Platform.VisualStudio extension
Browse files Browse the repository at this point in the history
  • Loading branch information
DinisCruz committed Oct 1, 2012
1 parent 89fa486 commit 3c925ae
Show file tree
Hide file tree
Showing 14 changed files with 162 additions and 168 deletions.
55 changes: 27 additions & 28 deletions O2.Platform.VisualStudio_2010/O2.Platform.VisualStudio_2010.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<OutputPath>..\..\O2_Platform_ReferencedAssemblies\O2_Assemblies\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
Expand All @@ -44,13 +44,37 @@
<Private>false</Private>
</Reference>
<Reference Include="Microsoft.VisualStudio.Shell.Immutable.10.0" />
<Reference Include="O2_FluentSharp_BCL, Version=4.4.0.0, Culture=neutral, PublicKeyToken=55a0f9bf4256d533, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\VisualStudio Solution Files\packages\FluentSharp.BCL.4.4.0.0\lib\net35\O2_FluentSharp_BCL.dll</HintPath>
</Reference>
<Reference Include="O2_FluentSharp_CoreLib, Version=4.4.0.0, Culture=neutral, PublicKeyToken=55a0f9bf4256d533, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\VisualStudio Solution Files\packages\FluentSharp.CoreLib.4.4.0.0\lib\net35\O2_FluentSharp_CoreLib.dll</HintPath>
</Reference>
<Reference Include="O2_FluentSharp_REPL, Version=4.4.0.0, Culture=neutral, PublicKeyToken=55a0f9bf4256d533, processorArchitecture=x86">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\VisualStudio Solution Files\packages\FluentSharp.REPL.4.4.0.0\lib\net35\O2_FluentSharp_REPL.exe</HintPath>
</Reference>
<Reference Include="O2_FluentSharp_VisualStudio_2010, Version=4.4.2.0, Culture=neutral, PublicKeyToken=0eea3742d7f750b9, processorArchitecture=MSIL">
<HintPath>..\VisualStudio Solution Files\packages\FluentSharp.VisualStudio2010.4.4.2.0\lib\net40\O2_FluentSharp_VisualStudio_2010.dll</HintPath>
</Reference>
<Reference Include="O2_FluentSharp_WPF, Version=4.4.0.0, Culture=neutral, PublicKeyToken=55a0f9bf4256d533, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\VisualStudio Solution Files\packages\FluentSharp.WPF.4.4.0.0\lib\net40\O2_FluentSharp_WPF.dll</HintPath>
</Reference>
<Reference Include="PresentationCore" />
<Reference Include="PresentationFramework" />
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Data" />
<Reference Include="System.Design" />
<Reference Include="System.Drawing" />
<Reference Include="System.Windows.Forms" />
<Reference Include="System.Xaml" />
<Reference Include="System.Xml" />
<Reference Include="WindowsBase" />
<Reference Include="WindowsFormsIntegration" />
</ItemGroup>
<ItemGroup>
<COMReference Include="EnvDTE">
Expand Down Expand Up @@ -132,9 +156,8 @@
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<IncludeInVSIX>true</IncludeInVSIX>
</Content>
<Resource Include="VS_Scripts\O2_Menus_In_VisualStudio.cs.txt">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Resource>
<None Include="app.config" />
<None Include="packages.config" />
<None Include="source.extension.vsixmanifest">
<SubType>Designer</SubType>
</None>
Expand All @@ -156,30 +179,6 @@
<IncludeInVSIX>true</IncludeInVSIX>
</Content>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\O2.FluentSharp\O2.FluentSharp.BCL\O2.FluentSharp.BCL.csproj">
<Project>{DF7E73CB-02AC-4689-BB8C-AC21FFCCDDC5}</Project>
<Name>O2.FluentSharp.BCL</Name>
</ProjectReference>
<ProjectReference Include="..\..\O2.FluentSharp\O2.FluentSharp.CoreLib\O2.FluentSharp.CoreLib.csproj">
<Project>{0A7CE0E0-B092-43B5-AB80-99BA909019C9}</Project>
<Name>O2.FluentSharp.CoreLib</Name>
</ProjectReference>
<ProjectReference Include="..\..\O2.FluentSharp\O2.FluentSharp.REPL\O2.FluentSharp.REPL.csproj">
<Project>{D742BBEF-BFDC-477F-9880-5E0E2C89B6B2}</Project>
<Name>O2.FluentSharp.REPL</Name>
</ProjectReference>
<ProjectReference Include="..\..\O2.FluentSharp\O2.FluentSharp.VisualStudio_2010\O2.FluentSharp.VisualStudio_2010.csproj">
<Project>{38AFBBBD-48E5-4792-B90E-B9A1A540F906}</Project>
<Name>O2.FluentSharp.VisualStudio_2010</Name>
<IncludeOutputGroupsInVSIX>BuiltProjectOutputGroup%3bBuiltProjectOutputGroupDependencies%3bGetCopyToOutputDirectoryItems%3bPkgdefProjectOutputGroup%3b</IncludeOutputGroupsInVSIX>
<IncludeOutputGroupsInVSIXLocalOnly>DebugSymbolsProjectOutputGroup%3b</IncludeOutputGroupsInVSIXLocalOnly>
</ProjectReference>
<ProjectReference Include="..\O2_External_SharpDevelop\O2_External_SharpDevelop.csproj">
<Project>{E76BCE43-8511-4CE8-A965-C0150F713CE9}</Project>
<Name>O2_External_SharpDevelop</Name>
</ProjectReference>
</ItemGroup>
<PropertyGroup>
<UseCodebase>true</UseCodebase>
</PropertyGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,11 @@
using Microsoft.VisualStudio.Shell.Interop;
using Microsoft.VisualStudio.OLE.Interop;
using Microsoft.VisualStudio.Shell;
using O2.FluentSharp;
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
{
Expand All @@ -26,8 +30,9 @@ public sealed class O2_Platform_VisualStudio_2010Package : NoSolution_Package
{

public O2_Platform_VisualStudio_2010Package()
{

{
O2ConfigSettings.O2Version = "O2_VS2010_4.4.5";
PublicDI.config = new O2.Kernel.InterfacesBaseImpl.KO2Config();
}


Expand All @@ -37,13 +42,25 @@ public O2_Platform_VisualStudio_2010Package()
#region Package Members

protected override void Initialize()
{
//VisualStudio_O2_Utils.open_LogViewer();
//VisualStudio_O2_Utils.open_ScriptEditor();
//new NoSolution_Package().Initialize(); //
VisualStudio_O2_Utils.compileAndExecuteScript(@"VS_Scripts\O2_Platform_Gui.cs", "O2_Platform_Gui", "buildGui");
{
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

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");
}


base.Initialize();

}
#endregion
Expand Down
4 changes: 2 additions & 2 deletions O2.Platform.VisualStudio_2010/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@
// You can specify all the values or you can default the Revision and Build Numbers
// by using the '*' as shown below:

[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyVersion("4.4.5.0")]
[assembly: AssemblyFileVersion("4.4.5.0")]



Original file line number Diff line number Diff line change
Expand Up @@ -4,33 +4,27 @@
"In Create TeamMentor Menu Script".info();
var visualStudio = new VisualStudio_2010();
var o2PlatformGui = new O2_Platform_Gui();
var toolsMenu = visualStudio.dte().add_TopMenu("Tools");

// var o2Menu = dte.add_TopMenu("Tools"); //shouldn't need to create since it is usually already there
var o2Menu = toolsMenu.add_SubMenu("O2 Platform",1);
o2Menu .add_Menu_Button("O2 VisualStudio PlugIns Editor", ()=&gt; o2PlatformGui.openScriptsViewer())
.add_Menu_Button("C# REPL Script", () =&gt; o2PlatformGui.openScriptsViewer())
.add_Menu_Button("Log Viewer", () =&gt; visualStudio.open_LogViewer())
.add_Menu_Button("Development Environment", () =&gt; open.devEnvironment())
//o2Menu.add_Menu_Button("Code Editor", () =&gt; visualStudio.open_CodeEditor());
//o2Menu.add_Menu_Button("Create Dock Window", () =&gt; this.createDocWindow());
var replMenu = visualStudio.dte().add_TopMenu("REPL");

replMenu.add_Menu_Button("C# REPL - VisualStudio 2010 API", () =&gt; visualStudio.open_ScriptEditor_With_VisualStudio_API())
.add_Menu_Button("C# REPL - VisualStudio 2010 API (code sample)", () =&gt; visualStudio.open_ScriptEditor_With_VisualStudio_CodeSample())
.add_Menu_Button("C# REPL - 'Hello World'", () =&gt; visualStudio.open_ScriptEditor().set_Code("return \"Hello World\";"))
.add_Menu_Button("C# REPL - Tool Creator", () =&gt; open.scriptEditor())
.add_Menu_Button("Log Viewer", () =&gt; visualStudio.open_LogViewer());

var o2Menu = replMenu.add_SubMenu("O2 Platform",0);
o2Menu .add_Menu_Button("O2 VisualStudio PlugIns Editor", ()=&gt; o2PlatformGui.openScriptsViewer())
.add_Menu_Button("Development Environment", () =&gt; open.devEnvironment())
.add_Menu_Button("O2Script: Util - O2 Available scripts", ()=&gt; "Util - O2 Available scripts.h2".local().executeH2Script())
.add_Menu_Button("O2Script: Main O2 Gui", () =&gt; "Main O2 Gui.h2".local().executeH2Script())
.add_Menu_Button("Update O2 Scripts (download from GitHub)", () =&gt; O2Scripts.downloadO2Scripts());

/*TeamMentorMenu//.add_Menu_Button("--",()=&gt;{})
.add_Menu_Button("Open TeamMentor Landing Pages Window", ()=&gt; teamMentorGui.createLandingPagesWindow())
.add_Menu_Button("Open TeamMentor + Cat.Net Config Window", ()=&gt; teamMentorGui.createOptionsWindow())
.add_Menu_Button("Open Cat.NET -&gt; TeamMentor Mappings", ()=&gt; visualStudio.open_Document(@"TeamMentor_Files\CatNet_Mappings_TM_Embedded.xml".local()))
.add_Menu_Button("------- Debug-----")
.add_Menu_Button("Trigger Scan", () =&gt; visualStudio.dte().Solution.SolutionBuild.Build())
.add_Menu_Button("LogViewer", () =&gt; visualStudio.open_LogViewer())
.add_Menu_Button("Scripts Editor", ()=&gt; scriptsFolder.open_Script_Viewer_GUI())
.add_Menu_Button("Stand Alone Script Editor ", () =&gt; visualStudio.open_ScriptEditor());
*/
return visualStudio;

//using O2.FluentSharp.REPL
//using O2.Platform.VisualStudio_2010_Extension
//O2File:VS_Scripts\O2_Platform_Gui.cs
//O2Ref:TeamMentor_VisualStudio_with_CatNet.dll</SourceCode>
</SourceCode>
<ReferencedAssemblies />
</H2>
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
<?xml version="1.0"?>
<H2>
<SourceCode>var o2DevDir = @"E:\O2_V4\O2.FluentSharp\O2.FluentSharp.VisualStudio_2010";
CompileEngine.LocalFoldersToSearchForCodeFiles.clear().add(o2DevDir);
var o2PlatformGui = new O2_Platform_Gui();
o2PlatformGui.openScriptsViewer();
<SourceCode>var o2DevDir = @"E:\O2_V4\O2.Platform.Projects\O2.Platform.VisualStudio_2010";
CompileEngine.LocalFoldersToSearchForCodeFiles.clear().add(o2DevDir);
var o2PlatformGui = new O2_Platform_Gui();
o2PlatformGui.openScriptsViewer();
//using O2.Platform.VisualStudio_2010_Extension
//O2File:VS_Scripts\O2_Platform_Gui.cs</SourceCode>
<ReferencedAssemblies />
</H2>

This file was deleted.

13 changes: 3 additions & 10 deletions O2.Platform.VisualStudio_2010/VS_Scripts/O2_Platform_Gui.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,10 @@
using O2.DotNetWrappers.ExtensionMethods;
using O2.External.SharpDevelop.ExtensionMethods;
using O2.FluentSharp.REPL;
using O2.FluentSharp.VisualStudio;

//O2File:ExtensionMethods\VisualStudio_2010_ExtensionMethods.cs


namespace O2.FluentSharp
namespace O2.Platform.VisualStudio_2010_Extension
{
public class O2_Platform_Gui
{
Expand Down Expand Up @@ -43,13 +42,7 @@ public O2_Platform_Gui createTopLevelMenu()
public DockPanel openScriptsViewer()
{
var scriptsFolder = @"VS_O2_PlugIns\Create O2 Platform Menu.h2".local().parentFolder();
return scriptsFolder.open_Script_Viewer_GUI();

/*var panel = visualStudio.create_WinForms_Window_Float("O2 Platform VisualStudio Scripts")
.add_Panel()
.insert_LogViewer();
var script = panel.add_Script_With_FolderViewer(scriptsFolder);
scriptsFolder*/
return scriptsFolder.open_Script_Viewer_GUI();
}
}

Expand Down
15 changes: 15 additions & 0 deletions O2.Platform.VisualStudio_2010/app.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="O2_FluentSharp_CoreLib" publicKeyToken="55a0f9bf4256d533" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.4.0.0" newVersion="4.4.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="O2_FluentSharp_BCL" publicKeyToken="55a0f9bf4256d533" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.1.3.0" newVersion="4.1.3.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>
8 changes: 8 additions & 0 deletions O2.Platform.VisualStudio_2010/packages.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="FluentSharp.BCL" version="4.4.0.0" targetFramework="net40" />
<package id="FluentSharp.CoreLib" version="4.4.0.0" targetFramework="net40" />
<package id="FluentSharp.REPL" version="4.4.0.0" targetFramework="net40" />
<package id="FluentSharp.VisualStudio2010" version="4.4.2.0" targetFramework="net40" />
<package id="FluentSharp.WPF" version="4.4.0.0" targetFramework="net40" />
</packages>
Loading

0 comments on commit 3c925ae

Please sign in to comment.