incubator-nmaven-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sisb...@apache.org
Subject svn commit: r527426 - in /incubator/nmaven/branches/SI_XPT/assemblies: ./ NMaven.Core/ NMaven.IDE/ NMaven.IDE/src/ NMaven.IDE/src/main/ NMaven.IDE/src/main/csharp/ NMaven.IDE/src/main/csharp/NMaven/ NMaven.IDE/src/main/csharp/NMaven/IDE/ NMaven.IDE/src...
Date Wed, 11 Apr 2007 09:15:16 GMT
Author: sisbell
Date: Wed Apr 11 02:15:12 2007
New Revision: 527426

URL: http://svn.apache.org/viewvc?view=rev&rev=527426
Log:
Initial import of the IDE. This provides a win form that displays the pom projects and allows
the user to execute phases of the build.

Added:
    incubator/nmaven/branches/SI_XPT/assemblies/NMaven.IDE/
    incubator/nmaven/branches/SI_XPT/assemblies/NMaven.IDE/NMaven.IDE.sln
    incubator/nmaven/branches/SI_XPT/assemblies/NMaven.IDE/pom.xml   (with props)
    incubator/nmaven/branches/SI_XPT/assemblies/NMaven.IDE/src/
    incubator/nmaven/branches/SI_XPT/assemblies/NMaven.IDE/src/main/
    incubator/nmaven/branches/SI_XPT/assemblies/NMaven.IDE/src/main/csharp/
    incubator/nmaven/branches/SI_XPT/assemblies/NMaven.IDE/src/main/csharp/NMaven/
    incubator/nmaven/branches/SI_XPT/assemblies/NMaven.IDE/src/main/csharp/NMaven.IDE.csproj
    incubator/nmaven/branches/SI_XPT/assemblies/NMaven.IDE/src/main/csharp/NMaven.IDE.sln
    incubator/nmaven/branches/SI_XPT/assemblies/NMaven.IDE/src/main/csharp/NMaven/IDE/
    incubator/nmaven/branches/SI_XPT/assemblies/NMaven.IDE/src/main/csharp/NMaven/IDE/Commands/
    incubator/nmaven/branches/SI_XPT/assemblies/NMaven.IDE/src/main/csharp/NMaven/IDE/Commands/BuildCommand.cs
    incubator/nmaven/branches/SI_XPT/assemblies/NMaven.IDE/src/main/csharp/NMaven/IDE/Factory.cs
    incubator/nmaven/branches/SI_XPT/assemblies/NMaven.IDE/src/main/csharp/NMaven/IDE/IIdeConfiguration.cs
    incubator/nmaven/branches/SI_XPT/assemblies/NMaven.IDE/src/main/csharp/NMaven/IDE/IIdeContext.cs
    incubator/nmaven/branches/SI_XPT/assemblies/NMaven.IDE/src/main/csharp/NMaven/IDE/Impl/
    incubator/nmaven/branches/SI_XPT/assemblies/NMaven.IDE/src/main/csharp/NMaven/IDE/Impl/IdeContextImpl.cs
    incubator/nmaven/branches/SI_XPT/assemblies/NMaven.IDE/src/main/csharp/NMaven/IDE/View/
    incubator/nmaven/branches/SI_XPT/assemblies/NMaven.IDE/src/main/csharp/NMaven/IDE/View/MainForm.Designer.cs
    incubator/nmaven/branches/SI_XPT/assemblies/NMaven.IDE/src/main/csharp/NMaven/IDE/View/MainForm.cs
Modified:
    incubator/nmaven/branches/SI_XPT/assemblies/NMaven.Core/pom.xml
    incubator/nmaven/branches/SI_XPT/assemblies/NMaven.Plugin.Resx/pom.xml
    incubator/nmaven/branches/SI_XPT/assemblies/pom-M_2_2.xml

Modified: incubator/nmaven/branches/SI_XPT/assemblies/NMaven.Core/pom.xml
URL: http://svn.apache.org/viewvc/incubator/nmaven/branches/SI_XPT/assemblies/NMaven.Core/pom.xml?view=diff&rev=527426&r1=527425&r2=527426
==============================================================================
--- incubator/nmaven/branches/SI_XPT/assemblies/NMaven.Core/pom.xml (original)
+++ incubator/nmaven/branches/SI_XPT/assemblies/NMaven.Core/pom.xml Wed Apr 11 02:15:12 2007
@@ -20,7 +20,7 @@
     <dependency>
       <groupId>Microsoft.Build.Engine</groupId>
       <artifactId>Microsoft.Build.Engine</artifactId>
-      <type>gac</type>
+      <type>gac_msil</type>
       <version>2.0.0.0__b03f5f7f11d50a3a</version>
     </dependency>
     <dependency>

Added: incubator/nmaven/branches/SI_XPT/assemblies/NMaven.IDE/NMaven.IDE.sln
URL: http://svn.apache.org/viewvc/incubator/nmaven/branches/SI_XPT/assemblies/NMaven.IDE/NMaven.IDE.sln?view=auto&rev=527426
==============================================================================
--- incubator/nmaven/branches/SI_XPT/assemblies/NMaven.IDE/NMaven.IDE.sln (added)
+++ incubator/nmaven/branches/SI_XPT/assemblies/NMaven.IDE/NMaven.IDE.sln Wed Apr 11 02:15:12
2007
@@ -0,0 +1,16 @@
+Microsoft Visual Studio Solution File, Format Version 9.00
+# SharpDevelop 2.0.0.1710
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NMaven.IDE", "src\main\csharp\NMaven.IDE.csproj",
"{f6d6becb-cfa4-411d-a67c-789cdcdd728f}"
+EndProject
+Global
+	GlobalSection(SolutionConfigurationPlatforms) = preSolution
+		Debug|Any CPU = Debug|Any CPU
+		Release|Any CPU = Release|Any CPU
+	EndGlobalSection
+	GlobalSection(ProjectConfigurationPlatforms) = postSolution
+		{F6D6BECB-CFA4-411D-A67C-789CDCDD728F}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{F6D6BECB-CFA4-411D-A67C-789CDCDD728F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{F6D6BECB-CFA4-411D-A67C-789CDCDD728F}.Release|Any CPU.Build.0 = Release|Any CPU
+		{F6D6BECB-CFA4-411D-A67C-789CDCDD728F}.Release|Any CPU.ActiveCfg = Release|Any CPU
+	EndGlobalSection
+EndGlobal

Added: incubator/nmaven/branches/SI_XPT/assemblies/NMaven.IDE/pom.xml
URL: http://svn.apache.org/viewvc/incubator/nmaven/branches/SI_XPT/assemblies/NMaven.IDE/pom.xml?view=auto&rev=527426
==============================================================================
--- incubator/nmaven/branches/SI_XPT/assemblies/NMaven.IDE/pom.xml (added)
+++ incubator/nmaven/branches/SI_XPT/assemblies/NMaven.IDE/pom.xml Wed Apr 11 02:15:12 2007
@@ -0,0 +1,27 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0">
+  <parent>
+    <groupId>NMaven</groupId>
+    <version>0.14</version>
+    <artifactId>NMaven.Assemblies</artifactId>
+  </parent>
+  <modelVersion>4.0.0</modelVersion>
+  <groupId>NMaven.IDE</groupId>
+  <artifactId>NMaven.IDE</artifactId>
+  <packaging>library</packaging>
+  <version>0.14</version>
+  <name>NMaven.IDE</name>
+  <dependencies>
+    <dependency>
+      <groupId>NMaven.Service</groupId>
+      <artifactId>NMaven.Service.Embedder</artifactId>
+      <version>0.14</version>
+      <type>library</type>
+    </dependency>
+    <dependency>
+      <groupId>NMaven.Logging</groupId>
+      <artifactId>NMaven.Logging</artifactId>
+      <version>0.14</version>
+      <type>library</type>
+    </dependency>
+  </dependencies>
+</project>
\ No newline at end of file

Propchange: incubator/nmaven/branches/SI_XPT/assemblies/NMaven.IDE/pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/nmaven/branches/SI_XPT/assemblies/NMaven.IDE/src/main/csharp/NMaven.IDE.csproj
URL: http://svn.apache.org/viewvc/incubator/nmaven/branches/SI_XPT/assemblies/NMaven.IDE/src/main/csharp/NMaven.IDE.csproj?view=auto&rev=527426
==============================================================================
--- incubator/nmaven/branches/SI_XPT/assemblies/NMaven.IDE/src/main/csharp/NMaven.IDE.csproj
(added)
+++ incubator/nmaven/branches/SI_XPT/assemblies/NMaven.IDE/src/main/csharp/NMaven.IDE.csproj
Wed Apr 11 02:15:12 2007
@@ -0,0 +1,57 @@
+<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <PropertyGroup>
+    <ProjectGuid>{f6d6becb-cfa4-411d-a67c-789cdcdd728f}</ProjectGuid>
+    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+    <RootNameSpace>NMaven.IDE</RootNameSpace>
+    <AssemblyName>NMaven.IDE</AssemblyName>
+    <BaseIntermediateOutputPath>..\..\..\target\obj\</BaseIntermediateOutputPath>
+    <OutputType>WinExe</OutputType>
+    <OutputPath>..\..\..\target\bin\Debug\</OutputPath>
+    <TargetFrameworkVersion>v2.0</TargetFrameworkVersion>
+    <Optimize>False</Optimize>
+    <AllowUnsafeBlocks>False</AllowUnsafeBlocks>
+    <CheckForOverflowUnderflow>False</CheckForOverflowUnderflow>
+    <NoStdLib>False</NoStdLib>
+    <DebugType>None</DebugType>
+    <RegisterForComInterop>False</RegisterForComInterop>
+    <GenerateSerializationAssemblies>Auto</GenerateSerializationAssemblies>
+    <BaseAddress>4194304</BaseAddress>
+    <PlatformTarget>AnyCPU</PlatformTarget>
+    <FileAlignment>4096</FileAlignment>
+    <WarningLevel>4</WarningLevel>
+    <TreatWarningsAsErrors>false</TreatWarningsAsErrors>
+    <DebugSymbols>false</DebugSymbols>
+  </PropertyGroup>
+  <ItemGroup>
+    <Reference Include="System" />
+    <Reference Include="System.Xml" />
+    <Reference Include="NMaven.Logging">
+      <HintPath>..\..\..\..\..\..\..\.m2\repository\NMaven\Logging\NMaven.Logging\0.14\NMaven.Logging.dll</HintPath>
+      <SpecificVersion>False</SpecificVersion>
+    </Reference>
+    <Reference Include="System.Web.Services" />
+    <Reference Include="System.Windows.Forms" />
+    <Reference Include="System.Drawing" />
+    <Reference Include="NMaven.Service.Embedder">
+      <HintPath>..\..\..\..\..\..\..\.m2\repository\NMaven\Service\NMaven.Service.Embedder\0.14\NMaven.Service.Embedder.dll</HintPath>
+      <SpecificVersion>False</SpecificVersion>
+    </Reference>
+  </ItemGroup>
+  <ItemGroup>
+    <Compile Include="NMaven\IDE\IIdeContext.cs" />
+    <Compile Include="NMaven\IDE\Impl\IdeContextImpl.cs" />
+    <Compile Include="NMaven\IDE\IIdeConfiguration.cs" />
+    <Compile Include="NMaven\IDE\Factory.cs" />
+    <Compile Include="NMaven\IDE\View\MainForm.cs" />
+    <Compile Include="NMaven\IDE\View\MainForm.Designer.cs" />
+    <Compile Include="NMaven\IDE\Commands\BuildCommand.cs" />
+  </ItemGroup>
+  <ItemGroup>
+    <Folder Include="NMaven" />
+    <Folder Include="NMaven\IDE" />
+    <Folder Include="NMaven\IDE\Impl" />
+    <Folder Include="NMaven\IDE\View" />
+    <Folder Include="NMaven\IDE\Commands" />
+  </ItemGroup>
+  <Import Project="$(SharpDevelopBinPath)\SharpDevelop.Build.CSharp.targets" />
+</Project>
\ No newline at end of file

Added: incubator/nmaven/branches/SI_XPT/assemblies/NMaven.IDE/src/main/csharp/NMaven.IDE.sln
URL: http://svn.apache.org/viewvc/incubator/nmaven/branches/SI_XPT/assemblies/NMaven.IDE/src/main/csharp/NMaven.IDE.sln?view=auto&rev=527426
==============================================================================
--- incubator/nmaven/branches/SI_XPT/assemblies/NMaven.IDE/src/main/csharp/NMaven.IDE.sln
(added)
+++ incubator/nmaven/branches/SI_XPT/assemblies/NMaven.IDE/src/main/csharp/NMaven.IDE.sln
Wed Apr 11 02:15:12 2007
@@ -0,0 +1,13 @@
+Microsoft Visual Studio Solution File, Format Version 9.00
+# SharpDevelop 2.0.0.1710
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NMaven.IDE", "NMaven.IDE.csproj", "{f6d6becb-cfa4-411d-a67c-789cdcdd728f}"
+EndProject
+Global
+	GlobalSection(SolutionConfigurationPlatforms) = preSolution
+		Debug|Any CPU = Debug|Any CPU
+	EndGlobalSection
+	GlobalSection(ProjectConfigurationPlatforms) = postSolution
+		{F6D6BECB-CFA4-411D-A67C-789CDCDD728F}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{F6D6BECB-CFA4-411D-A67C-789CDCDD728F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+	EndGlobalSection
+EndGlobal

Added: incubator/nmaven/branches/SI_XPT/assemblies/NMaven.IDE/src/main/csharp/NMaven/IDE/Commands/BuildCommand.cs
URL: http://svn.apache.org/viewvc/incubator/nmaven/branches/SI_XPT/assemblies/NMaven.IDE/src/main/csharp/NMaven/IDE/Commands/BuildCommand.cs?view=auto&rev=527426
==============================================================================
--- incubator/nmaven/branches/SI_XPT/assemblies/NMaven.IDE/src/main/csharp/NMaven/IDE/Commands/BuildCommand.cs
(added)
+++ incubator/nmaven/branches/SI_XPT/assemblies/NMaven.IDE/src/main/csharp/NMaven/IDE/Commands/BuildCommand.cs
Wed Apr 11 02:15:12 2007
@@ -0,0 +1,61 @@
+using System;
+using NMaven.Service;
+using NMaven.IDE;
+
+namespace NMaven.IDE.Commands
+{
+	/// <summary>
+	/// Description of BuildCommand
+	/// </summary>
+	public class BuildCommand
+	{
+		private string goal;
+		
+		private string pomFile;
+		
+		private IIdeContext ideContext;
+		
+		public BuildCommand()
+		{
+		}
+				
+		public void Init(IIdeContext ideContext)
+		{
+			this.ideContext = ideContext;
+		}
+		
+        public void Execute(object sender, EventArgs args)
+        {
+        	MavenExecutionRequest request = new MavenExecutionRequest();
+        	request.goal = this.Goal;
+        	request.pomFile = this.PomFile;
+        	ideContext.Build(request);
+        }			
+			public String Goal
+			{
+				get
+				{
+					return goal;	
+				}
+				
+				set
+				{
+					goal = value;	
+				}
+			}		
+			
+		
+			public String PomFile
+			{
+				get
+				{
+					return pomFile;	
+				}
+				
+				set
+				{
+					pomFile = value;	
+				}
+			}				
+	}
+}

Added: incubator/nmaven/branches/SI_XPT/assemblies/NMaven.IDE/src/main/csharp/NMaven/IDE/Factory.cs
URL: http://svn.apache.org/viewvc/incubator/nmaven/branches/SI_XPT/assemblies/NMaven.IDE/src/main/csharp/NMaven/IDE/Factory.cs?view=auto&rev=527426
==============================================================================
--- incubator/nmaven/branches/SI_XPT/assemblies/NMaven.IDE/src/main/csharp/NMaven/IDE/Factory.cs
(added)
+++ incubator/nmaven/branches/SI_XPT/assemblies/NMaven.IDE/src/main/csharp/NMaven/IDE/Factory.cs
Wed Apr 11 02:15:12 2007
@@ -0,0 +1,50 @@
+using System;
+using NMaven.Logging;
+
+namespace NMaven.IDE
+{
+	/// <summary>
+	/// Description of Factory.
+	/// </summary>
+	public static class Factory
+	{
+		
+		public static IIdeConfiguration CreateIdeConfiguration()
+		{
+			return new IdeConfigurationImpl();
+		}
+		
+		private class IdeConfigurationImpl : IIdeConfiguration
+		{
+			private Logger logger;
+			
+			private int socketLoggerPort;
+			
+			public Logger Logger
+			{
+				get
+				{
+					return logger;	
+				}
+				
+				set
+				{
+					logger = value;	
+				}
+			}
+			
+			public int SocketLoggerPort
+			{
+				get
+				{
+					return socketLoggerPort;	
+				}
+				
+				set
+				{
+					socketLoggerPort = value;	
+				}
+			}				
+		}
+	}
+}

Added: incubator/nmaven/branches/SI_XPT/assemblies/NMaven.IDE/src/main/csharp/NMaven/IDE/IIdeConfiguration.cs
URL: http://svn.apache.org/viewvc/incubator/nmaven/branches/SI_XPT/assemblies/NMaven.IDE/src/main/csharp/NMaven/IDE/IIdeConfiguration.cs?view=auto&rev=527426
==============================================================================
--- incubator/nmaven/branches/SI_XPT/assemblies/NMaven.IDE/src/main/csharp/NMaven/IDE/IIdeConfiguration.cs
(added)
+++ incubator/nmaven/branches/SI_XPT/assemblies/NMaven.IDE/src/main/csharp/NMaven/IDE/IIdeConfiguration.cs
Wed Apr 11 02:15:12 2007
@@ -0,0 +1,23 @@
+using System;
+using NMaven.Logging;
+
+namespace NMaven.IDE
+{
+	/// <summary>
+	/// Description of IIdeConfiguration.
+	/// </summary>
+	public interface IIdeConfiguration
+	{
+		int SocketLoggerPort
+		{
+			get;
+			set;
+		}	
+		
+		Logger Logger
+		{
+			get;
+			set;
+		}			
+	}
+}

Added: incubator/nmaven/branches/SI_XPT/assemblies/NMaven.IDE/src/main/csharp/NMaven/IDE/IIdeContext.cs
URL: http://svn.apache.org/viewvc/incubator/nmaven/branches/SI_XPT/assemblies/NMaven.IDE/src/main/csharp/NMaven/IDE/IIdeContext.cs?view=auto&rev=527426
==============================================================================
--- incubator/nmaven/branches/SI_XPT/assemblies/NMaven.IDE/src/main/csharp/NMaven/IDE/IIdeContext.cs
(added)
+++ incubator/nmaven/branches/SI_XPT/assemblies/NMaven.IDE/src/main/csharp/NMaven/IDE/IIdeContext.cs
Wed Apr 11 02:15:12 2007
@@ -0,0 +1,24 @@
+using System;
+using System.Collections.Generic;
+using NMaven.Service;
+using NMaven.Logging;
+
+namespace NMaven.IDE
+{
+	/// <summary>
+	/// Description of IIdeContext.
+	/// </summary>
+	public interface IIdeContext
+	{
+		void Init(IIdeConfiguration configuration);
+		
+		void Dispose();
+		
+		Logger GetLogger();
+		
+		List<MavenProject> GetMavenProjects();
+		
+		void Build(MavenExecutionRequest request);
+		
+	}
+}

Added: incubator/nmaven/branches/SI_XPT/assemblies/NMaven.IDE/src/main/csharp/NMaven/IDE/Impl/IdeContextImpl.cs
URL: http://svn.apache.org/viewvc/incubator/nmaven/branches/SI_XPT/assemblies/NMaven.IDE/src/main/csharp/NMaven/IDE/Impl/IdeContextImpl.cs?view=auto&rev=527426
==============================================================================
--- incubator/nmaven/branches/SI_XPT/assemblies/NMaven.IDE/src/main/csharp/NMaven/IDE/Impl/IdeContextImpl.cs
(added)
+++ incubator/nmaven/branches/SI_XPT/assemblies/NMaven.IDE/src/main/csharp/NMaven/IDE/Impl/IdeContextImpl.cs
Wed Apr 11 02:15:12 2007
@@ -0,0 +1,91 @@
+using System;
+using System.Collections.Generic;
+using System.Net;
+using System.Net.Sockets;
+using System.Text;
+using System.Web.Services.Protocols;
+
+using NMaven.Logging;
+using NMaven.IDE;
+using NMaven.Service;
+
+namespace NMaven.IDE.Impl
+{
+	/// <summary>
+	/// Description of IdeContextImpl.
+	/// </summary>
+	public class IdeContextImpl : IIdeContext
+	{		
+		private Logger logger;
+		
+		private Socket socket;
+		
+		private IIdeConfiguration configuration;
+		
+		public IdeContextImpl()
+		{
+		}
+		
+		public void Build(MavenExecutionRequest request)
+		{
+			MavenEmbedderService service = new MavenEmbedderService();
+			try {
+				service.execute(request);
+			}
+			catch(SoapHeaderException e)
+			{
+				Console.Error.WriteLine(", " + e.Code + ", " + e.SubCode + "," + e.StackTrace);
+				throw new Exception(e.StackTrace + "," + e.Code, null);
+			}						
+		}
+		
+		public List<MavenProject> GetMavenProjects()
+		{
+			MavenEmbedderService service = new MavenEmbedderService();
+			List<MavenProject> mavenProjects = new List<MavenProject>();
+			mavenProjects.AddRange(service.getMavenProjectsFor(@"C:\Documents and Settings\shane\nmaven-apache\SI_XPT\assemblies"));
+			return mavenProjects;
+		}
+		
+		public void Init(IIdeConfiguration configuration)
+		{
+			this.configuration = configuration;
+			this.logger = configuration.Logger;
+	
+            System.Threading.Thread loggerThread =
+            	new System.Threading.Thread(new System.Threading.ThreadStart(WriteBuildResults));
+            loggerThread.IsBackground = true;
+            loggerThread.Start();           
+		}
+		
+		public void Dispose()
+		{
+			socket.Close();
+		}
+		
+		public Logger GetLogger()
+		{
+			return logger;
+		}
+		
+        private void WriteBuildResults()
+        {
+            socket = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp);
+            socket.Bind(new IPEndPoint(IPAddress.Any, configuration.SocketLoggerPort));
+            socket.Listen(10);        	
+            while (true)
+            {
+            	logger.Log(Level.INFO, "Waiting on client...");
+                Socket client = socket.Accept();
+                logger.Log(Level.INFO, "Accepted Client");
+                byte[] buffer = new byte[1024];
+                int i;
+                while ((i = client.Receive(buffer)) > 0)
+                {
+                    logger.Log(Level.INFO, Encoding.ASCII.GetString(buffer, 0, i));
+                }
+                client.Close();
+            }         
+        }		
+	}
+}

Added: incubator/nmaven/branches/SI_XPT/assemblies/NMaven.IDE/src/main/csharp/NMaven/IDE/View/MainForm.Designer.cs
URL: http://svn.apache.org/viewvc/incubator/nmaven/branches/SI_XPT/assemblies/NMaven.IDE/src/main/csharp/NMaven/IDE/View/MainForm.Designer.cs?view=auto&rev=527426
==============================================================================
--- incubator/nmaven/branches/SI_XPT/assemblies/NMaven.IDE/src/main/csharp/NMaven/IDE/View/MainForm.Designer.cs
(added)
+++ incubator/nmaven/branches/SI_XPT/assemblies/NMaven.IDE/src/main/csharp/NMaven/IDE/View/MainForm.Designer.cs
Wed Apr 11 02:15:12 2007
@@ -0,0 +1,40 @@
+
+namespace NMaven.IDE.View
+{
+	partial class MainForm : System.Windows.Forms.Form
+	{
+		/// <summary>
+		/// Designer variable used to keep track of non-visual components.
+		/// </summary>
+		private System.ComponentModel.IContainer components = null;
+		
+		/// <summary>
+		/// Disposes resources used by the form.
+		/// </summary>
+		/// <param name="disposing">true if managed resources should be disposed; otherwise,
false.</param>
+		protected override void Dispose(bool disposing)
+		{
+			if (disposing) {
+				if (components != null) {
+					components.Dispose();
+				}
+			}
+			base.Dispose(disposing);
+		}
+		
+		/// <summary>
+		/// This method is required for Windows Forms designer support.
+		/// Do not change the method contents inside the source code editor. The Forms designer
might
+		/// not be able to load this method if it was changed manually.
+		/// </summary>
+		private void InitializeComponent()
+		{
+			// 
+			// MainForm
+			// 
+			this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+			this.Text = "WindowsAppTest";
+			this.Name = "MainForm";
+		}
+	}
+}

Added: incubator/nmaven/branches/SI_XPT/assemblies/NMaven.IDE/src/main/csharp/NMaven/IDE/View/MainForm.cs
URL: http://svn.apache.org/viewvc/incubator/nmaven/branches/SI_XPT/assemblies/NMaven.IDE/src/main/csharp/NMaven/IDE/View/MainForm.cs?view=auto&rev=527426
==============================================================================
--- incubator/nmaven/branches/SI_XPT/assemblies/NMaven.IDE/src/main/csharp/NMaven/IDE/View/MainForm.cs
(added)
+++ incubator/nmaven/branches/SI_XPT/assemblies/NMaven.IDE/src/main/csharp/NMaven/IDE/View/MainForm.cs
Wed Apr 11 02:15:12 2007
@@ -0,0 +1,102 @@
+
+using System;
+using System.Collections.Generic;
+using System.Drawing;
+using System.Windows.Forms;
+using NMaven.IDE;
+using NMaven.IDE.Impl;
+using NMaven.Service;
+using NMaven.IDE.Commands;
+
+namespace NMaven.IDE.View {
+	/// <summary>
+	/// Description of MainForm.
+	/// </summary>
+	public partial class MainForm
+	{
+		
+		private IIdeContext ideContext;
+		
+		private ContextMenu contextmenu = new ContextMenu();
+
+        private TreeView treeView = new TreeView();
+		
+		[STAThread]
+		public static void Main(string[] args)
+		{
+			Application.EnableVisualStyles();
+			Application.SetCompatibleTextRenderingDefault(false);
+			Application.Run(new MainForm());
+		}
+				
+		public MainForm()
+		{
+			InitializeComponent();
+			Init();
+		}
+		
+		private TreeNode CreateTreeNodeFor(MavenProject mavenProject)
+		{
+			TreeNode rootNode = new TreeNode();
+            rootNode.Text = mavenProject.artifactId;
+            
+            if(mavenProject.mavenProjects != null) 
+            {
+	            foreach(MavenProject childMavenProject in mavenProject.mavenProjects)
+	            {
+	            	TreeNode childNode = CreateTreeNodeFor(childMavenProject);
+	            	rootNode.Nodes.Add(childNode);
+	            }            	
+            }
+            rootNode.Tag = mavenProject;
+            return rootNode;
+		}
+		
+		public void Init()
+		{
+	        treeView.ClientSize = this.Size;
+			ideContext = new IdeContextImpl();
+			List<MavenProject> mavenProjects = ideContext.GetMavenProjects();
+			foreach(MavenProject mavenProject in mavenProjects)
+			{
+				treeView.Nodes.Add(CreateTreeNodeFor(mavenProject));
+			}
+					            
+            treeView.MouseClick += new MouseEventHandler(this.treeView_MouseUp);
+            Controls.Add(treeView);		
+
+		}
+		
+		private MenuItem CreateMenuItemFor(String text, String goal, String pomFile)
+		{
+                MenuItem menuItem = new MenuItem();
+                menuItem.Text = text;   
+                BuildCommand buildCommand = new BuildCommand();
+                buildCommand.Init(ideContext);
+                buildCommand.Goal = goal;
+                buildCommand.PomFile = pomFile;
+				menuItem.Click += new EventHandler(buildCommand.Execute);
+				return menuItem;
+                		
+		}
+
+        private void treeView_MouseUp(object sender, MouseEventArgs e)
+        {
+            if (e.Button == MouseButtons.Right)
+            {
+                Point point = new Point(e.X, e.Y);
+                TreeNode node = treeView.GetNodeAt(point);
+                if (node == null) return;
+                MavenProject mavenProject = (MavenProject) node.Tag;
+                contextmenu.MenuItems.Clear();              
+                contextmenu.MenuItems.Add(CreateMenuItemFor("Compile Project", "compile",
mavenProject.pomPath));
+                contextmenu.MenuItems.Add(CreateMenuItemFor("Clean Project", "clean", mavenProject.pomPath));
+                contextmenu.MenuItems.Add(CreateMenuItemFor("Test Project", "test", mavenProject.pomPath));
+                contextmenu.MenuItems.Add(CreateMenuItemFor("Install Project", "install",
mavenProject.pomPath));
+                
+                contextmenu.Show(this, PointToClient(treeView.PointToScreen(point)));
+            }
+        }
+        
+	}
+}

Modified: incubator/nmaven/branches/SI_XPT/assemblies/NMaven.Plugin.Resx/pom.xml
URL: http://svn.apache.org/viewvc/incubator/nmaven/branches/SI_XPT/assemblies/NMaven.Plugin.Resx/pom.xml?view=diff&rev=527426&r1=527425&r2=527426
==============================================================================
--- incubator/nmaven/branches/SI_XPT/assemblies/NMaven.Plugin.Resx/pom.xml (original)
+++ incubator/nmaven/branches/SI_XPT/assemblies/NMaven.Plugin.Resx/pom.xml Wed Apr 11 02:15:12
2007
@@ -32,5 +32,4 @@
       </build>
     </profile>
   </profiles>
-
 </project>

Modified: incubator/nmaven/branches/SI_XPT/assemblies/pom-M_2_2.xml
URL: http://svn.apache.org/viewvc/incubator/nmaven/branches/SI_XPT/assemblies/pom-M_2_2.xml?view=diff&rev=527426&r1=527425&r2=527426
==============================================================================
--- incubator/nmaven/branches/SI_XPT/assemblies/pom-M_2_2.xml (original)
+++ incubator/nmaven/branches/SI_XPT/assemblies/pom-M_2_2.xml Wed Apr 11 02:15:12 2007
@@ -120,6 +120,10 @@
     <module>NMaven.Plugin.Resx</module>
     <module>NMaven.Plugin.Settings</module>
     <module>NMaven.Plugin.Solution</module>
+    <module>NMaven.IDE</module>
+    <module>NMaven.Logging</module>
+    <module>NMaven.Service/Embedder</module>    
+    <module>NMaven.VisualStudio</module>
   </modules>
   <build>
     <sourceDirectory>src/main/csharp</sourceDirectory>



Mime
View raw message