incubator-nmaven-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sisb...@apache.org
Subject svn commit: r594287 - in /incubator/nmaven/trunk/assemblies/NMaven.VisualStudio.Addin/src/main/csharp/NMaven/VisualStudio/Addin: AddArtifactsForm.cs Connect.cs
Date Mon, 12 Nov 2007 20:22:18 GMT
Author: sisbell
Date: Mon Nov 12 12:22:17 2007
New Revision: 594287

URL: http://svn.apache.org/viewvc?rev=594287&view=rev
Log:
Fixed problem where the add artifact form would lock Visual Studio if the nmaven.id repo was
not set.

Modified:
    incubator/nmaven/trunk/assemblies/NMaven.VisualStudio.Addin/src/main/csharp/NMaven/VisualStudio/Addin/AddArtifactsForm.cs
    incubator/nmaven/trunk/assemblies/NMaven.VisualStudio.Addin/src/main/csharp/NMaven/VisualStudio/Addin/Connect.cs

Modified: incubator/nmaven/trunk/assemblies/NMaven.VisualStudio.Addin/src/main/csharp/NMaven/VisualStudio/Addin/AddArtifactsForm.cs
URL: http://svn.apache.org/viewvc/incubator/nmaven/trunk/assemblies/NMaven.VisualStudio.Addin/src/main/csharp/NMaven/VisualStudio/Addin/AddArtifactsForm.cs?rev=594287&r1=594286&r2=594287&view=diff
==============================================================================
--- incubator/nmaven/trunk/assemblies/NMaven.VisualStudio.Addin/src/main/csharp/NMaven/VisualStudio/Addin/AddArtifactsForm.cs
(original)
+++ incubator/nmaven/trunk/assemblies/NMaven.VisualStudio.Addin/src/main/csharp/NMaven/VisualStudio/Addin/AddArtifactsForm.cs
Mon Nov 12 12:22:17 2007
@@ -39,6 +39,7 @@
 using VSLangProj;
 
 using NMaven.Artifact;
+using NMaven.Logging;
 using NMaven.Model.Pom;
 using NMaven.Model.Setting;
 using Castle.Windsor;
@@ -47,6 +48,11 @@
 {
     public partial class AddArtifactsForm : Form
     {
+        private List<NMaven.Artifact.Artifact> localArtifacts = new List<NMaven.Artifact.Artifact>();
+        private ArtifactContext artifactContext;
+        private Project project;
+        private NMaven.Logging.Logger logger;
+
         /// <summary>
         /// For Testing
         /// </summary>
@@ -57,12 +63,13 @@
            // localListView.View = View.Details;
         }
 
-        public AddArtifactsForm(Project project, IWindsorContainer container)
+        public AddArtifactsForm(Project project, IWindsorContainer container, Logger logger)
         {
             this.project = project;
+            this.logger = logger;
             InitializeForm();
             InitializeComponent();
-            localListView.View = View.Details;
+            localListView.View = View.Details;           
             artifactContext = (ArtifactContext) container[typeof(ArtifactContext)];     
 
         }
 
@@ -120,6 +127,13 @@
                 }
             }
 
+            if (url == null)
+            {
+                MessageBox.Show("Remote repository not set: Try 'Add Maven Repository' option
from menu. Will" +
+                    " require restart of addin.");
+                return;
+            }
+
             SetUnsafeHttpHeaderParsing();
 
             List<TreeNode> treeNodes = GetNodesFor(url);
@@ -207,10 +221,6 @@
             this.Close();
         }
 
-        private List<NMaven.Artifact.Artifact> localArtifacts = new List<NMaven.Artifact.Artifact>();
-        private ArtifactContext artifactContext;
-        private Project project;
-
         private Boolean IsIncluded(String name, String uri)
         {
             if (name.StartsWith(".") || name.Equals("Parent Directory") || name.Equals("Terms
of Use"))
@@ -254,7 +264,6 @@
             }
             return true;
         }
-
 
         private List<TreeNode> GetNodesFor(String url)
         {

Modified: incubator/nmaven/trunk/assemblies/NMaven.VisualStudio.Addin/src/main/csharp/NMaven/VisualStudio/Addin/Connect.cs
URL: http://svn.apache.org/viewvc/incubator/nmaven/trunk/assemblies/NMaven.VisualStudio.Addin/src/main/csharp/NMaven/VisualStudio/Addin/Connect.cs?rev=594287&r1=594286&r2=594287&view=diff
==============================================================================
--- incubator/nmaven/trunk/assemblies/NMaven.VisualStudio.Addin/src/main/csharp/NMaven/VisualStudio/Addin/Connect.cs
(original)
+++ incubator/nmaven/trunk/assemblies/NMaven.VisualStudio.Addin/src/main/csharp/NMaven/VisualStudio/Addin/Connect.cs
Mon Nov 12 12:22:17 2007
@@ -540,7 +540,7 @@
             //First selected project
             foreach (Project project in (Array)_applicationObject.ActiveSolutionProjects)
             {
-                AddArtifactsForm form = new AddArtifactsForm(project, container);
+                AddArtifactsForm form = new AddArtifactsForm(project, container, logger);
                 form.Show();
                 break;
             }



Mime
View raw message