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
path: root/main/src
diff options
context:
space:
mode:
authorLluis Sanchez Gual <lluis@xamarin.com>2015-02-03 12:00:32 +0300
committerLluis Sanchez Gual <lluis@xamarin.com>2015-02-03 12:00:32 +0300
commit32731167da049be0fbbbd38d758f8edec2950063 (patch)
treebba36047ad96efde9e462db99b73c46a8189baea /main/src
parent79df1eae7178605d202236e742a4be9a3a8f2eb3 (diff)
Fix some warnings, add some docs
Diffstat (limited to 'main/src')
-rw-r--r--main/src/core/MonoDevelop.Core/MonoDevelop.Core/LoggingService.cs2
-rw-r--r--main/src/core/MonoDevelop.Core/MonoDevelop.Projects.Extensions/SolutionItemTypeNode.cs7
-rw-r--r--main/src/core/MonoDevelop.Core/MonoDevelop.Projects.Formats.MSBuild/RemoteProjectBuilder.cs6
-rw-r--r--main/src/core/MonoDevelop.Core/MonoDevelop.Projects/ProjectReference.cs2
4 files changed, 11 insertions, 6 deletions
diff --git a/main/src/core/MonoDevelop.Core/MonoDevelop.Core/LoggingService.cs b/main/src/core/MonoDevelop.Core/MonoDevelop.Core/LoggingService.cs
index 7ef6e407c6..79315ca235 100644
--- a/main/src/core/MonoDevelop.Core/MonoDevelop.Core/LoggingService.cs
+++ b/main/src/core/MonoDevelop.Core/MonoDevelop.Core/LoggingService.cs
@@ -507,7 +507,7 @@ namespace MonoDevelop.Core
public static void LogError (string message, Exception ex)
{
- LogUserError (message, ex);
+ Log (LogLevel.Error, message + (ex != null? Environment.NewLine + ex : string.Empty));
}
[Obsolete ("Use LogError")]
diff --git a/main/src/core/MonoDevelop.Core/MonoDevelop.Projects.Extensions/SolutionItemTypeNode.cs b/main/src/core/MonoDevelop.Core/MonoDevelop.Projects.Extensions/SolutionItemTypeNode.cs
index 37283b264d..5c00072556 100644
--- a/main/src/core/MonoDevelop.Core/MonoDevelop.Projects.Extensions/SolutionItemTypeNode.cs
+++ b/main/src/core/MonoDevelop.Core/MonoDevelop.Projects.Extensions/SolutionItemTypeNode.cs
@@ -109,6 +109,13 @@ namespace MonoDevelop.Projects.Extensions
return await factory.CreateItem (fileName, typeGuid);
}
try {
+ // Some subclasses (such as ProjectTypeNode) need to assign some data to
+ // the object before it is initialized. However, by default initialization
+ // is automatically made by the constructor, so to support this scenario
+ // the initialization has to be delayed. This is done by setting the
+ // MonoDevelop.DelayItemInitialization logical context property.
+ // When this property is set, the object is not initialized, and it has
+ // to be manually initialized by calling EnsureInitialized.
CallContext.LogicalSetData ("MonoDevelop.DelayItemInitialization", true);
return (SolutionItem) Activator.CreateInstance (ItemType);
} finally {
diff --git a/main/src/core/MonoDevelop.Core/MonoDevelop.Projects.Formats.MSBuild/RemoteProjectBuilder.cs b/main/src/core/MonoDevelop.Core/MonoDevelop.Projects.Formats.MSBuild/RemoteProjectBuilder.cs
index be2c6002f8..d2cefb444b 100644
--- a/main/src/core/MonoDevelop.Core/MonoDevelop.Projects.Formats.MSBuild/RemoteProjectBuilder.cs
+++ b/main/src/core/MonoDevelop.Core/MonoDevelop.Projects.Formats.MSBuild/RemoteProjectBuilder.cs
@@ -57,7 +57,7 @@ namespace MonoDevelop.Projects.Formats.MSBuild
{
try {
return engine.LoadProject (projectFile);
- } catch (Exception ex) {
+ } catch {
CheckDisconnected ();
throw;
}
@@ -78,7 +78,7 @@ namespace MonoDevelop.Projects.Formats.MSBuild
{
try {
engine.SetCulture (uiCulture);
- } catch (Exception ex) {
+ } catch {
CheckDisconnected ();
throw;
}
@@ -88,7 +88,7 @@ namespace MonoDevelop.Projects.Formats.MSBuild
{
try {
engine.SetGlobalProperties (properties);
- } catch (Exception ex) {
+ } catch {
CheckDisconnected ();
throw;
}
diff --git a/main/src/core/MonoDevelop.Core/MonoDevelop.Projects/ProjectReference.cs b/main/src/core/MonoDevelop.Core/MonoDevelop.Projects/ProjectReference.cs
index a30115c441..d24efcd308 100644
--- a/main/src/core/MonoDevelop.Core/MonoDevelop.Projects/ProjectReference.cs
+++ b/main/src/core/MonoDevelop.Core/MonoDevelop.Projects/ProjectReference.cs
@@ -76,7 +76,6 @@ namespace MonoDevelop.Projects
string customError;
FilePath hintPath;
- string originalMSBuildReferenceInclude;
string originalMSBuildReferenceHintPath;
public event EventHandler StatusChanged;
@@ -225,7 +224,6 @@ namespace MonoDevelop.Projects
var hp = buildItem.Metadata.GetValue ("HintPath");
Init (ReferenceType.Assembly, hp, null);
SetInvalid (GettextCatalog.GetString ("Invalid file path"));
- originalMSBuildReferenceInclude = buildItem.Include;
} else {
var type = File.Exists (path) ? ReferenceType.Assembly : ReferenceType.Package;
Init (type, buildItem.Include, path);