Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Started work on MonoDevelop addin

  • Loading branch information...
commit 82fa56548c7b2c960fe4ca381b43092d302dccbc 1 parent 9648111
@praeclarum authored
View
3  .gitignore
@@ -1,7 +1,10 @@
*.suo
*.user
+*.userprefs
QuickTestVS/bin/
QuickTestVS/obj/
+QuickTestMD/bin/
+QuickTestMD/obj/
QuickTestTest/bin/
QuickTestTest/obj/
QuickTestRunner/bin/
View
20 QuickTestMD.sln
@@ -0,0 +1,20 @@
+
+Microsoft Visual Studio Solution File, Format Version 11.00
+# Visual Studio 2010
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "QuickTestMD", "QuickTestMD\QuickTestMD.csproj", "{3024504E-C68F-4DDA-8CE5-A95B4E3369A0}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Any CPU = Debug|Any CPU
+ Release|Any CPU = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {3024504E-C68F-4DDA-8CE5-A95B4E3369A0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {3024504E-C68F-4DDA-8CE5-A95B4E3369A0}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {3024504E-C68F-4DDA-8CE5-A95B4E3369A0}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {3024504E-C68F-4DDA-8CE5-A95B4E3369A0}.Release|Any CPU.Build.0 = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(MonoDevelopProperties) = preSolution
+ StartupItem = QuickTestMD\QuickTestMD.csproj
+ EndGlobalSection
+EndGlobal
View
27 QuickTestMD/AssemblyInfo.cs
@@ -0,0 +1,27 @@
+using System.Reflection;
+using System.Runtime.CompilerServices;
+
+// Information about this assembly is defined by the following attributes.
+// Change them to the values specific to your project.
+
+[assembly: AssemblyTitle("QuickTestMD")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyProduct("")]
+[assembly: AssemblyCopyright("fak")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// The assembly version has the format "{Major}.{Minor}.{Build}.{Revision}".
+// The form "{Major}.{Minor}.*" will automatically update the build and revision,
+// and "{Major}.{Minor}.{Build}.*" will update just the revision.
+
+[assembly: AssemblyVersion("1.0.*")]
+
+// The following attributes are used to specify the signing key for the assembly,
+// if desired. See the Mono documentation for more information about signing.
+
+//[assembly: AssemblyDelaySign(false)]
+//[assembly: AssemblyKeyFile("")]
+
View
56 QuickTestMD/Commands.cs
@@ -0,0 +1,56 @@
+using System;
+using System.Linq;
+using MonoDevelop.Components.Commands;
+using MonoDevelop.Ide;
+using MonoDevelop.Ide.Gui;
+
+namespace QuickTestMD
+{
+ class TestWindowPadContent : IPadContent
+ {
+ TestWindow _window;
+
+ public TestWindowPadContent ()
+ {
+ _window = new TestWindow ();
+ Control.ShowAll ();
+ }
+
+ #region IDisposable implementation
+ public void Dispose ()
+ {
+ }
+ #endregion
+
+ #region IPadContent implementation
+ public void Initialize (IPadWindow window)
+ {
+ }
+
+ public void RedrawContent ()
+ {
+ }
+
+ public Gtk.Widget Control {
+ get {
+ return _window;
+ }
+ }
+ #endregion
+ }
+
+ public class SyncHandler : CommandHandler
+ {
+ protected override void Run ()
+ {
+ var padId = "QuickTest.TestWindow";
+ var pad = IdeApp.Workbench.Pads.FirstOrDefault (p => p.Id == padId);
+ if (pad == null) {
+ var padContent = new TestWindowPadContent ();
+ pad = IdeApp.Workbench.AddPad (padContent, "QuickTest.TestWindow", "Quick Test", "", null);
+ }
+ pad.BringToFront (false);
+ }
+ }
+}
+
View
36 QuickTestMD/QuickTestMD.addin.xml
@@ -0,0 +1,36 @@
+<Addin
+ id = "QuickTest"
+ namespace = "QuickTest"
+ name = "Quick Test"
+ author = "Frank A. Krueger"
+ copyright = "MIT"
+ url = "http://github.com/praeclarum/QuickTest"
+ description = "Quick unit testing"
+ category = "IDE extensions"
+ version = "1.0.0">
+
+ <Runtime>
+ <Import assembly = "QuickTestMD.dll"/>
+ </Runtime>
+
+ <Dependencies>
+ <Addin id="::MonoDevelop.Core" version="2.8"/>
+ <Addin id="::MonoDevelop.Ide" version="2.8"/>
+ </Dependencies>
+
+ <!-- Extension Points -->
+
+ <!-- Extensions -->
+
+ <Extension path = "/MonoDevelop/Ide/Commands">
+ <Command id = "QuickTest.Commands.Sync"
+ defaultHandler = "QuickTestMD.SyncHandler"
+ _label = "_Sync Quick Test" />
+ </Extension>
+
+ <Extension path = "/MonoDevelop/Ide/MainMenu/Tools">
+ <CommandItem id = "QuickTest.Commands.Sync"
+ insertbefore="OptionsSection" />
+ </Extension>
+
+</Addin>
View
70 QuickTestMD/QuickTestMD.csproj
@@ -0,0 +1,70 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <ProductVersion>9.0.21022</ProductVersion>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{3024504E-C68F-4DDA-8CE5-A95B4E3369A0}</ProjectGuid>
+ <OutputType>Library</OutputType>
+ <RootNamespace>QuickTestMD</RootNamespace>
+ <AssemblyName>QuickTestMD</AssemblyName>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ <DebugSymbols>true</DebugSymbols>
+ <DebugType>full</DebugType>
+ <Optimize>false</Optimize>
+ <OutputPath>bin\Debug</OutputPath>
+ <DefineConstants>DEBUG;</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ <ConsolePause>false</ConsolePause>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ <DebugType>none</DebugType>
+ <Optimize>true</Optimize>
+ <OutputPath>bin\Release</OutputPath>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ <ConsolePause>false</ConsolePause>
+ </PropertyGroup>
+ <ItemGroup>
+ <Reference Include="System" />
+ <Reference Include="gtk-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" />
+ <Reference Include="gdk-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" />
+ <Reference Include="Mono.Posix, Version=2.0.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756" />
+ <Reference Include="MonoDevelop.Ide">
+ <HintPath>..\..\..\Program Files %28x86%29\MonoDevelop\bin\MonoDevelop.Ide.dll</HintPath>
+ </Reference>
+ <Reference Include="Mono.TextEditor">
+ <HintPath>..\..\..\Program Files %28x86%29\MonoDevelop\bin\Mono.TextEditor.dll</HintPath>
+ </Reference>
+ <Reference Include="glib-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f">
+ <Private>False</Private>
+ </Reference>
+ <Reference Include="atk-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f">
+ <Private>False</Private>
+ </Reference>
+ <Reference Include="ICSharpCode.NRefactory">
+ <HintPath>..\..\..\Program Files %28x86%29\MonoDevelop\bin\ICSharpCode.NRefactory.dll</HintPath>
+ </Reference>
+ <Reference Include="MonoDevelop.Core">
+ <HintPath>..\..\..\Program Files %28x86%29\MonoDevelop\bin\MonoDevelop.Core.dll</HintPath>
+ </Reference>
+ <Reference Include="System.Core" />
+ </ItemGroup>
+ <ItemGroup>
+ <Compile Include="AssemblyInfo.cs" />
+ <Compile Include="gtk-gui\generated.cs" />
+ <Compile Include="TestWindow.cs" />
+ <Compile Include="gtk-gui\QuickTestMD.TestWindow.cs" />
+ <Compile Include="Commands.cs" />
+ </ItemGroup>
+ <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
+ <ItemGroup>
+ <EmbeddedResource Include="gtk-gui\gui.stetic">
+ <LogicalName>gui.stetic</LogicalName>
+ </EmbeddedResource>
+ <EmbeddedResource Include="QuickTestMD.addin.xml" />
+ </ItemGroup>
+</Project>
View
13 QuickTestMD/TestWindow.cs
@@ -0,0 +1,13 @@
+using System;
+namespace QuickTestMD
+{
+ [System.ComponentModel.ToolboxItem(true)]
+ public partial class TestWindow : Gtk.Bin
+ {
+ public TestWindow ()
+ {
+ this.Build ();
+ }
+ }
+}
+
View
93 QuickTestMD/gtk-gui/QuickTestMD.TestWindow.cs
@@ -0,0 +1,93 @@
+
+// This file has been generated by the GUI designer. Do not modify.
+namespace QuickTestMD
+{
+ public partial class TestWindow
+ {
+ private global::Gtk.VBox vbox1;
+ private global::Gtk.HBox hbox1;
+ private global::Gtk.Button button1;
+ private global::Gtk.ComboBox combobox1;
+ private global::Gtk.HBox hbox2;
+ private global::Gtk.Image image1;
+ private global::Gtk.Label label2;
+ private global::Gtk.ProgressBar progressbar1;
+
+ protected virtual void Build ()
+ {
+ global::Stetic.Gui.Initialize (this);
+ // Widget QuickTestMD.TestWindow
+ global::Stetic.BinContainer.Attach (this);
+ this.Name = "QuickTestMD.TestWindow";
+ // Container child QuickTestMD.TestWindow.Gtk.Container+ContainerChild
+ this.vbox1 = new global::Gtk.VBox ();
+ this.vbox1.Name = "vbox1";
+ this.vbox1.Spacing = 6;
+ // Container child vbox1.Gtk.Box+BoxChild
+ this.hbox1 = new global::Gtk.HBox ();
+ this.hbox1.Name = "hbox1";
+ this.hbox1.Spacing = 6;
+ // Container child hbox1.Gtk.Box+BoxChild
+ this.button1 = new global::Gtk.Button ();
+ this.button1.CanFocus = true;
+ this.button1.Name = "button1";
+ this.button1.UseUnderline = true;
+ this.button1.Label = global::Mono.Unix.Catalog.GetString ("GtkButton");
+ this.hbox1.Add (this.button1);
+ global::Gtk.Box.BoxChild w1 = ((global::Gtk.Box.BoxChild)(this.hbox1 [this.button1]));
+ w1.Position = 0;
+ w1.Expand = false;
+ w1.Fill = false;
+ // Container child hbox1.Gtk.Box+BoxChild
+ this.combobox1 = global::Gtk.ComboBox.NewText ();
+ this.combobox1.Name = "combobox1";
+ this.hbox1.Add (this.combobox1);
+ global::Gtk.Box.BoxChild w2 = ((global::Gtk.Box.BoxChild)(this.hbox1 [this.combobox1]));
+ w2.Position = 1;
+ w2.Expand = false;
+ w2.Fill = false;
+ this.vbox1.Add (this.hbox1);
+ global::Gtk.Box.BoxChild w3 = ((global::Gtk.Box.BoxChild)(this.vbox1 [this.hbox1]));
+ w3.Position = 0;
+ w3.Expand = false;
+ w3.Fill = false;
+ // Container child vbox1.Gtk.Box+BoxChild
+ this.hbox2 = new global::Gtk.HBox ();
+ this.hbox2.Name = "hbox2";
+ this.hbox2.Spacing = 6;
+ // Container child hbox2.Gtk.Box+BoxChild
+ this.image1 = new global::Gtk.Image ();
+ this.image1.Name = "image1";
+ this.hbox2.Add (this.image1);
+ global::Gtk.Box.BoxChild w4 = ((global::Gtk.Box.BoxChild)(this.hbox2 [this.image1]));
+ w4.Position = 0;
+ w4.Expand = false;
+ w4.Fill = false;
+ // Container child hbox2.Gtk.Box+BoxChild
+ this.label2 = new global::Gtk.Label ();
+ this.label2.Name = "label2";
+ this.label2.LabelProp = global::Mono.Unix.Catalog.GetString ("label2");
+ this.hbox2.Add (this.label2);
+ global::Gtk.Box.BoxChild w5 = ((global::Gtk.Box.BoxChild)(this.hbox2 [this.label2]));
+ w5.Position = 1;
+ w5.Expand = false;
+ w5.Fill = false;
+ // Container child hbox2.Gtk.Box+BoxChild
+ this.progressbar1 = new global::Gtk.ProgressBar ();
+ this.progressbar1.Name = "progressbar1";
+ this.hbox2.Add (this.progressbar1);
+ global::Gtk.Box.BoxChild w6 = ((global::Gtk.Box.BoxChild)(this.hbox2 [this.progressbar1]));
+ w6.Position = 2;
+ this.vbox1.Add (this.hbox2);
+ global::Gtk.Box.BoxChild w7 = ((global::Gtk.Box.BoxChild)(this.vbox1 [this.hbox2]));
+ w7.Position = 1;
+ w7.Expand = false;
+ w7.Fill = false;
+ this.Add (this.vbox1);
+ if ((this.Child != null)) {
+ this.Child.ShowAll ();
+ }
+ this.Hide ();
+ }
+ }
+}
View
82 QuickTestMD/gtk-gui/generated.cs
@@ -0,0 +1,82 @@
+
+// This file has been generated by the GUI designer. Do not modify.
+namespace Stetic
+{
+ internal class Gui
+ {
+ private static bool initialized;
+
+ internal static void Initialize (Gtk.Widget iconRenderer)
+ {
+ if ((Stetic.Gui.initialized == false)) {
+ Stetic.Gui.initialized = true;
+ }
+ }
+ }
+
+ internal class BinContainer
+ {
+ private Gtk.Widget child;
+ private Gtk.UIManager uimanager;
+
+ public static BinContainer Attach (Gtk.Bin bin)
+ {
+ BinContainer bc = new BinContainer ();
+ bin.SizeRequested += new Gtk.SizeRequestedHandler (bc.OnSizeRequested);
+ bin.SizeAllocated += new Gtk.SizeAllocatedHandler (bc.OnSizeAllocated);
+ bin.Added += new Gtk.AddedHandler (bc.OnAdded);
+ return bc;
+ }
+
+ private void OnSizeRequested (object sender, Gtk.SizeRequestedArgs args)
+ {
+ if ((this.child != null)) {
+ args.Requisition = this.child.SizeRequest ();
+ }
+ }
+
+ private void OnSizeAllocated (object sender, Gtk.SizeAllocatedArgs args)
+ {
+ if ((this.child != null)) {
+ this.child.Allocation = args.Allocation;
+ }
+ }
+
+ private void OnAdded (object sender, Gtk.AddedArgs args)
+ {
+ this.child = args.Widget;
+ }
+
+ public void SetUiManager (Gtk.UIManager uim)
+ {
+ this.uimanager = uim;
+ this.child.Realized += new System.EventHandler (this.OnRealized);
+ }
+
+ private void OnRealized (object sender, System.EventArgs args)
+ {
+ if ((this.uimanager != null)) {
+ Gtk.Widget w;
+ w = this.child.Toplevel;
+ if (((w != null)
+ && typeof(Gtk.Window).IsInstanceOfType (w))) {
+ ((Gtk.Window)(w)).AddAccelGroup (this.uimanager.AccelGroup);
+ this.uimanager = null;
+ }
+ }
+ }
+ }
+
+ internal class ActionGroups
+ {
+ public static Gtk.ActionGroup GetActionGroup (System.Type type)
+ {
+ return Stetic.ActionGroups.GetActionGroup (type.FullName);
+ }
+
+ public static Gtk.ActionGroup GetActionGroup (string name)
+ {
+ return null;
+ }
+ }
+}
View
112 QuickTestMD/gtk-gui/gui.stetic
@@ -0,0 +1,112 @@
+<?xml version="1.0" encoding="utf-8"?>
+<stetic-interface>
+ <configuration>
+ <images-root-path>..\..\QuickTestMD</images-root-path>
+ <target-gtk-version>2.12</target-gtk-version>
+ </configuration>
+ <import>
+ <widget-library name="../../../../Program Files (x86)/MonoDevelop/bin/MonoDevelop.Ide.dll" />
+ <widget-library name="../../../../Program Files (x86)/MonoDevelop/bin/Mono.TextEditor.dll" />
+ <widget-library name="../bin/Debug/QuickTestMD.dll" internal="true" />
+ </import>
+ <widget class="Gtk.Bin" id="QuickTestMD.TestWindow" design-size="300 300">
+ <property name="MemberName" />
+ <property name="Visible">False</property>
+ <child>
+ <widget class="Gtk.VBox" id="vbox1">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.HBox" id="hbox1">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.Button" id="button1">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Type">TextOnly</property>
+ <property name="Label" translatable="yes">GtkButton</property>
+ <property name="UseUnderline">True</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.ComboBox" id="combobox1">
+ <property name="MemberName" />
+ <property name="IsTextCombo">True</property>
+ <property name="Items" translatable="yes" />
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <placeholder />
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.HBox" id="hbox2">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.Image" id="image1">
+ <property name="MemberName" />
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="label2">
+ <property name="MemberName" />
+ <property name="LabelProp" translatable="yes">label2</property>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.ProgressBar" id="progressbar1">
+ <property name="MemberName" />
+ </widget>
+ <packing>
+ <property name="Position">2</property>
+ <property name="AutoSize">True</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <placeholder />
+ </child>
+ </widget>
+ </child>
+ </widget>
+</stetic-interface>
Please sign in to comment.
Something went wrong with that request. Please try again.