Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/monodevelop.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarius Ungureanu <marius.ungureanu@xamarin.com>2015-07-15 17:08:48 +0300
committerMarius Ungureanu <marius.ungureanu@xamarin.com>2015-07-15 17:08:48 +0300
commit3a0ce14f6db807577f9384310dc29a763b9dd243 (patch)
treeeeeea2e1e36a4d9cc08ed24a08c4d79666a661bd
parentf979170edbce6e7583e4af01f2d13f5ac529eaa5 (diff)
parent5bdb4d5486784ad2fdcd0bcf09b7cac45dd8d072 (diff)
Merge remote-tracking branch 'origin/master' into roslyn
Conflicts: main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui/StatusProgressMonitor.cs version-checks
-rw-r--r--.gitmodules2
m---------main/external/mono-addins0
m---------main/external/xwt0
-rw-r--r--main/src/addins/MacPlatform/Dialogs/MacOpenFileDialogHandler.cs6
-rw-r--r--main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui/StatusProgressMonitor.cs42
-rw-r--r--main/tests/UserInterfaceTests/CreateBuildTemplatesTestBase.cs4
-rw-r--r--main/tests/UserInterfaceTests/Ide.cs33
7 files changed, 54 insertions, 33 deletions
diff --git a/.gitmodules b/.gitmodules
index 0cfa6fdd35..2cca62b1a3 100644
--- a/.gitmodules
+++ b/.gitmodules
@@ -34,7 +34,7 @@
[submodule "main/external/xwt"]
path = main/external/xwt
url = git://github.com/mono/xwt
- branch = image-loader
+ branch = master
[submodule "main/external/monomac"]
path = main/external/monomac
url = git://github.com/mono/monomac.git
diff --git a/main/external/mono-addins b/main/external/mono-addins
-Subproject e22febe3c4b0f448ec0aef90c63d92cdae4dcb4
+Subproject 3a4f1f720258bcce776955bc1d25d82b7b58157
diff --git a/main/external/xwt b/main/external/xwt
-Subproject 1246a86cf580a514e54e194b02559415cd7159c
+Subproject 19abd928a3c885073422821ffc62f66c24dc4f7
diff --git a/main/src/addins/MacPlatform/Dialogs/MacOpenFileDialogHandler.cs b/main/src/addins/MacPlatform/Dialogs/MacOpenFileDialogHandler.cs
index 946780fe08..71d22d6965 100644
--- a/main/src/addins/MacPlatform/Dialogs/MacOpenFileDialogHandler.cs
+++ b/main/src/addins/MacPlatform/Dialogs/MacOpenFileDialogHandler.cs
@@ -249,7 +249,11 @@ namespace MonoDevelop.MacIntegration
//re-center the accessory view in its parent, Cocoa does this for us initially and after
//resizing the window, but we need to do it again after altering its layout
- var superFrame = box.View.Superview.Frame;
+ var superView = box.View.Superview;
+ if (superView == null)
+ return;
+
+ var superFrame = superView.Frame;
var frame = box.View.Frame;
//not sure why it's ceiling, but this matches the Cocoa layout
frame.X = (float)Math.Ceiling ((superFrame.Width - frame.Width) / 2);
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui/StatusProgressMonitor.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui/StatusProgressMonitor.cs
index cc07b845d9..c28842e15a 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui/StatusProgressMonitor.cs
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui/StatusProgressMonitor.cs
@@ -91,32 +91,28 @@ namespace MonoDevelop.Ide.Gui
statusBar.EndProgress ();
- if (!CancellationToken.IsCancellationRequested) {
- try {
- if (Errors.Length > 0 || Warnings.Length > 0) {
- if (Errors.Length > 0) {
- statusBar.ShowError (Errors [Errors.Length - 1].Message);
- } else if (SuccessMessages.Length == 0) {
- statusBar.ShowWarning (Warnings [Warnings.Length - 1]);
- }
+ try {
+ if (Errors.Length > 0 || Warnings.Length > 0) {
+ if (Errors.Length > 0) {
+ statusBar.ShowError (Errors [Errors.Length - 1].Message);
+ } else if (SuccessMessages.Length == 0) {
+ statusBar.ShowWarning (Warnings [Warnings.Length - 1]);
+ }
- DesktopService.ShowGlobalProgressError ();
+ DesktopService.ShowGlobalProgressError ();
- base.OnCompleted ();
-
- if (showErrorDialogs)
- this.ShowResultDialog ();
- return;
- }
-
- if (SuccessMessages.Length > 0)
- statusBar.ShowMessage (MonoDevelop.Ide.Gui.Stock.StatusSuccess, SuccessMessages [SuccessMessages.Length - 1]);
-
- } finally {
- statusBar.StatusSourcePad = statusSourcePad;
- statusBar.Dispose ();
+ base.OnCompleted ();
+
+ if (!CancellationToken.IsCancellationRequested && showErrorDialogs)
+ this.ShowResultDialog ();
+ return;
}
- } else {
+
+ if (SuccessMessages.Length > 0)
+ statusBar.ShowMessage (MonoDevelop.Ide.Gui.Stock.StatusSuccess, SuccessMessages [SuccessMessages.Length - 1]);
+
+ } finally {
+ statusBar.StatusSourcePad = statusSourcePad;
statusBar.Dispose ();
}
diff --git a/main/tests/UserInterfaceTests/CreateBuildTemplatesTestBase.cs b/main/tests/UserInterfaceTests/CreateBuildTemplatesTestBase.cs
index db1766050d..a0ae225ef6 100644
--- a/main/tests/UserInterfaceTests/CreateBuildTemplatesTestBase.cs
+++ b/main/tests/UserInterfaceTests/CreateBuildTemplatesTestBase.cs
@@ -114,6 +114,8 @@ namespace UserInterfaceTests
OnEnterProjectDetails (newProject, projectDetails, gitOptions, miscOptions);
OnClickCreate (newProject);
+
+ FoldersToClean.Add (projectDetails.SolutionLocation);
}
protected virtual void OnSelectTemplate (NewProjectController newProject, TemplateSelectionOptions templateOptions)
@@ -178,7 +180,7 @@ namespace UserInterfaceTests
protected virtual void OnBuildTemplate (int buildTimeoutInSecs = 180)
{
try {
- Assert.IsTrue (Ide.BuildSolution (timeoutInSecs : buildTimeoutInSecs));
+ Assert.IsTrue (Ide.BuildSolution (timeoutInSecs : buildTimeoutInSecs), "Build Failed");
TakeScreenShot ("AfterBuildFinishedSuccessfully");
} catch (TimeoutException e) {
TakeScreenShot ("AfterBuildFailed");
diff --git a/main/tests/UserInterfaceTests/Ide.cs b/main/tests/UserInterfaceTests/Ide.cs
index 14a4b86857..cd16a17bb6 100644
--- a/main/tests/UserInterfaceTests/Ide.cs
+++ b/main/tests/UserInterfaceTests/Ide.cs
@@ -36,6 +36,7 @@ using NUnit.Framework;
using Gdk;
using System.Linq;
+using System.Text.RegularExpressions;
namespace UserInterfaceTests
@@ -46,6 +47,8 @@ namespace UserInterfaceTests
get { return TestService.Session; }
}
+ static Regex buildRegex = new Regex (@"Build: (?<errors>\d*) error\D*, (?<warnings>\d*) warning\D*", RegexOptions.Compiled);
+
public static void OpenFile (FilePath file)
{
Session.GlobalInvoke ("MonoDevelop.Ide.IdeApp.Workbench.OpenDocument", (string) file, true);
@@ -63,12 +66,10 @@ namespace UserInterfaceTests
return Session.GetGlobalValue<FilePath> ("MonoDevelop.Ide.IdeApp.Workbench.ActiveDocument.FileName");
}
- public static bool BuildSolution (bool isPass = true, int timeoutInSecs = 180)
+ public static bool BuildSolution (bool isPass = true, int timeoutInSecs = 360)
{
- Session.RunAndWaitForTimer (() => Session.ExecuteCommand (ProjectCommands.BuildSolution),
- "Ide.Shell.ProjectBuilt", timeout: timeoutInSecs * 1000);
- var status = IsBuildSuccessful ();
- return isPass == status;
+ Session.ExecuteCommand (ProjectCommands.BuildSolution);
+ return isPass == IsBuildSuccessful (timeoutInSecs);
}
public static void WaitUntil (Func<bool> done, int timeout = 20000, int pollStep = 200)
@@ -101,9 +102,27 @@ namespace UserInterfaceTests
return (string) Session.GetGlobalValue ("MonoDevelop.Ide.IdeApp.Workbench.RootWindow.StatusBar.renderArg.CurrentText");
}
- public static bool IsBuildSuccessful ()
+ public static bool IsBuildSuccessful (int timeoutInSecs)
{
- return Session.ErrorCount (MonoDevelop.Ide.Tasks.TaskSeverity.Error) == 0;
+ bool isBuildSuccessful = false;
+ Ide.WaitUntil (() => {
+ var actualStatusMessage = Ide.GetStatusMessage ();
+ if (actualStatusMessage == "Build successful.") {
+ isBuildSuccessful = true;
+ return true;
+ }
+ if (actualStatusMessage == "Build failed.") {
+ isBuildSuccessful = false;
+ return true;
+ }
+ var match = buildRegex.Match (actualStatusMessage);
+ if (match != null && match.Success) {
+ isBuildSuccessful = string.Equals (match.Groups ["errors"].ToString (), "0");
+ return true;
+ }
+ return false;
+ }, pollStep: 5 * 1000, timeout: timeoutInSecs * 1000);
+ return isBuildSuccessful;
}
public static void RunAndWaitForTimer (Action action, string counter, int timeout = 20000)