Permalink
Browse files

Major release of O2.Platform.VisualStudio extension

  • Loading branch information...
1 parent 89fa486 commit 3c925aebf5bfd82bc1f6d30be6c3ea6c650c18a9 @DinisCruz DinisCruz committed Oct 1, 2012
@@ -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>
@@ -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">
@@ -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>
@@ -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>
@@ -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
{
@@ -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();
}
@@ -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
@@ -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")]
@@ -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>
@@ -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>
@@ -1,66 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using O2.Kernel;
-using O2.DotNetWrappers.DotNet;
-using O2.DotNetWrappers.ExtensionMethods;
-using O2.External.SharpDevelop.ExtensionMethods;
-using O2.FluentSharp.REPL;
-//O2File:../ExtensionMethods\VisualStudio_2010_ExtensionMethods.cs
-namespace O2.FluentSharp
-{
- public class O2_Menus_In_VisualStudio
- {
- public void buildMenus()
- {
- var o2Timer = new O2Timer("CreatedMenus in").start();
- "[O2_Menus_In_VisualStudio] building menus".debug();
- var dte = VisualStudio_2010.DTE2;
- var o2Menu = dte.add_TopMenu("Tools"); //shouldn't need to create since it is usually already there
- var o2PlatformMenu = o2Menu.add_Menu_Button("O2 Platform");
-
- /*o2Menu.add_Menu_Button("C# REPL Script", () => this.openScriptEditor());
- o2Menu.add_Menu_Button("Log Viewer", () => this.openLogViewer());
- o2Menu.add_Menu_Button("Development Environment", () => open.devEnvironment());
- o2Menu.add_Menu_Button("Code Editor", () => this.openCodeEditor());
- o2Menu.add_Menu_Button("Create Dock Window", () => this.createDocWindow());
- o2Menu.add_Menu_Button("O2Script: Util - O2 Available scripts", ()=> "Util - O2 Available scripts.h2".local().executeH2Script());
- o2Menu.add_Menu_Button("O2Script: Main O2 Gui", () => "Main O2 Gui.h2".local().executeH2Script());
- o2Menu.add_Menu_Button("Update O2 Scripts (download from GitHub)", () => O2Scripts.downloadO2Scripts());
- */
- o2Timer.stop();
- }
- public void openLogViewer()
- {
- "O2 LogViewer".create_WinForms_Window_Float().add_LogViewer();
- }
- public void openCodeEditor()
- {
- "O2 Script Editor".create_WinForms_Window_Float().add_SourceCodeEditor();
- }
- public void openScriptEditor()
- {
- var script = "C# REPL Script".create_WinForms_Window_Float().add_Script(true);
- script.Code =
-@"var visualStudio = new VisualStudio_2010();
-
-visualStudio.mainWindow().title(""Hello from O2"");
-visualStudio.create_WinForms_Window_Float(""Web Browser"")
- .add_WebBrowser().open(""http://www.google.com"");
-
-return visualStudio;
-
-//O2"+@"File:ExtensionMethods\VisualStudio_2010_ExtensionMethods.cs";
- }
- public void createDocWindow()
- {
- var panel = "O2 Platform".create_WinForms_Window();
- panel.add_Panel().add_Link("C# REPL Script", 10, 10, () => this.openScriptEditor())
- .append_Below_Link("Log Viewer", () => this.openLogViewer())
- .append_Below_Link("Development Environment", () => open.devEnvironment())
- .append_Below_Link("Code Editor", () => this.openCodeEditor())
- .append_Below_Link("Add O2 Menu", () => this.buildMenus());
- }
- }
-}
@@ -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
{
@@ -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();
}
}
@@ -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>
@@ -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>
Oops, something went wrong.

0 comments on commit 3c925ae

Please sign in to comment.