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:
authorMike Krüger <mkrueger@xamarin.com>2012-01-18 10:45:56 +0400
committerMike Krüger <mkrueger@xamarin.com>2012-01-18 10:45:56 +0400
commita3e2833df21cbdb59fe9667de0b89fa595d08184 (patch)
treee6d64e604d82f24123eb6b50c7015130ed5e4f44 /main/src/addins
parentf7062e64c292af495006e0b9a9bb654b5c59ce19 (diff)
parent945e9e89c6d7b992d3309a53f5f4c4b5f81c211e (diff)
Merge branch 'master' into newresolver
Conflicts: main/src/addins/CSharpBinding/MonoDevelop.CSharp.Parser/CSharpFoldingParser.cs
Diffstat (limited to 'main/src/addins')
-rw-r--r--main/src/addins/CSharpBinding/MonoDevelop.CSharp.Parser/CSharpFoldingParser.cs9
-rw-r--r--main/src/addins/CSharpBinding/MonoDevelop.CSharp.Parser/McsParser.cs3
-rw-r--r--main/src/addins/MonoDevelop.Debugger.Soft/Mono.Debugging.Soft/VariableValueReference.cs5
-rwxr-xr-xmain/src/addins/MonoDevelop.MacDev/ObjCIntegration/NSObjectProjectInfo.cs6
-rw-r--r--main/src/addins/VersionControl/MonoDevelop.VersionControl.Git/MonoDevelop.VersionControl.Git/RepositoryStatus.cs72
5 files changed, 84 insertions, 11 deletions
diff --git a/main/src/addins/CSharpBinding/MonoDevelop.CSharp.Parser/CSharpFoldingParser.cs b/main/src/addins/CSharpBinding/MonoDevelop.CSharp.Parser/CSharpFoldingParser.cs
index 798643fd37..8b8da7aa2a 100644
--- a/main/src/addins/CSharpBinding/MonoDevelop.CSharp.Parser/CSharpFoldingParser.cs
+++ b/main/src/addins/CSharpBinding/MonoDevelop.CSharp.Parser/CSharpFoldingParser.cs
@@ -52,7 +52,7 @@ namespace MonoDevelop.CSharp.Parser
while (ptr < endPtr) {
switch (*ptr) {
case '/':
- if (inString || inChar || inVerbatimString)
+ if (inString || inChar || inVerbatimString || inMultiLineComment || inSingleComment)
break;
if (ptr + 1 < endPtr) {
char nextCh = *(ptr + 1);
@@ -102,11 +102,16 @@ namespace MonoDevelop.CSharp.Parser
break;
case '\n':
if (inSingleComment) {
+ bool isDocumentation = *beginPtr == '/';
+ if (isDocumentation)
+ beginPtr++;
+
result.Add (new MonoDevelop.TypeSystem.Comment () {
Region = new DomRegion (startLoc, new TextLocation (line, column)),
CommentType = CommentType.SingleLine,
Text = content.Substring ((int)(beginPtr - startPtr), (int)(ptr - beginPtr)),
- CommentStartsLine = hasStartedAtLine
+ CommentStartsLine = hasStartedAtLine,
+ IsDocumentation = isDocumentation
});
inSingleComment = false;
}
diff --git a/main/src/addins/CSharpBinding/MonoDevelop.CSharp.Parser/McsParser.cs b/main/src/addins/CSharpBinding/MonoDevelop.CSharp.Parser/McsParser.cs
index 92d9a33f65..545a2b199c 100644
--- a/main/src/addins/CSharpBinding/MonoDevelop.CSharp.Parser/McsParser.cs
+++ b/main/src/addins/CSharpBinding/MonoDevelop.CSharp.Parser/McsParser.cs
@@ -49,6 +49,9 @@ namespace MonoDevelop.CSharp.Parser
public override IResolver CreateResolver (ProjectDom dom, object editor, string fileName)
{
MonoDevelop.Ide.Gui.Document doc = (MonoDevelop.Ide.Gui.Document)editor;
+ if (doc.Editor == null)
+ return null;
+
return new NRefactoryResolver (dom, doc.CompilationUnit, ICSharpCode.OldNRefactory.SupportedLanguage.CSharp, doc.Editor, fileName);
}
diff --git a/main/src/addins/MonoDevelop.Debugger.Soft/Mono.Debugging.Soft/VariableValueReference.cs b/main/src/addins/MonoDevelop.Debugger.Soft/Mono.Debugging.Soft/VariableValueReference.cs
index eee0e7a825..63f591eb56 100644
--- a/main/src/addins/MonoDevelop.Debugger.Soft/Mono.Debugging.Soft/VariableValueReference.cs
+++ b/main/src/addins/MonoDevelop.Debugger.Soft/Mono.Debugging.Soft/VariableValueReference.cs
@@ -67,10 +67,7 @@ namespace Mono.Debugging.Soft
try {
return ctx.Frame.GetValue (variable);
} catch (AbsentInformationException) {
- if (((SoftDebuggerSession) ctx.Session).IsExternalCode (ctx.Frame))
- throw new EvaluatorException ("Value not available");
-
- throw;
+ throw new EvaluatorException ("Value not available");
}
}
set {
diff --git a/main/src/addins/MonoDevelop.MacDev/ObjCIntegration/NSObjectProjectInfo.cs b/main/src/addins/MonoDevelop.MacDev/ObjCIntegration/NSObjectProjectInfo.cs
index 4155d2493f..6e6c3983cd 100755
--- a/main/src/addins/MonoDevelop.MacDev/ObjCIntegration/NSObjectProjectInfo.cs
+++ b/main/src/addins/MonoDevelop.MacDev/ObjCIntegration/NSObjectProjectInfo.cs
@@ -262,7 +262,7 @@ namespace MonoDevelop.MacDev.ObjCIntegration
type.BaseCliType = dom.Compilation.LookupType (defaultNamespace, provider.CreateValidIdentifier (type.BaseObjCType)).FullName;
var message = string.Format ("Failed to resolve Objective-C type '{0}' to a type in the current solution.", type.BaseObjCType);
- message += string.Format (" If the type '{0}' exists, adding a [Register] attribute to the type will allow it to be synced correctly. Alternatively adding a [Register (\"{0}\")] attribute to any type will allow that type to be used while syncing.", type.BaseObjCType);
+ message += string.Format (" Adding a [Register (\"{0}\")] attribute to the class which corresponds to this will allow it to be synced to Objective-C.", type.BaseObjCType);
monitor.ReportError (null, new UserException ("Error while syncing", message));
}
}
@@ -278,7 +278,7 @@ namespace MonoDevelop.MacDev.ObjCIntegration
outlet.CliType = defaultNamespace + "." + provider.CreateValidIdentifier (outlet.ObjCType);
var message = string.Format ("Failed to resolve Objective-C outlet '{0}' of type '{1}' to a type in the current solution.", outlet.ObjCName, outlet.ObjCType);
- message += string.Format (" If the type '{0}' exists, adding a [Register] attribute to the type will allow it to be synced correctly. Alternatively adding a [Register (\"{0}\")] attribute to any type will allow that type to be used while syncing.", outlet.ObjCType);
+ message += string.Format (" Adding a [Register (\"{0}\")] attribute to the class which corresponds to this will allow it to be synced to Objective-C.", outlet.ObjCType);
monitor.ReportError (null, new UserException ("Error while syncing", message));
}
}
@@ -295,7 +295,7 @@ namespace MonoDevelop.MacDev.ObjCIntegration
param.CliType = defaultNamespace + "." + provider.CreateValidIdentifier (param.ObjCType);
var message = string.Format ("Failed to resolve paramater '{0}' of type '{2}' on Objective-C action '{1}' to a type in the current solution.", param.Name, action.ObjCName, param.ObjCType);
- message += string.Format (" If the type '{0}' exists, adding a [Register] attribute to the type will allow it to be synced correctly. Alternatively adding a [Register (\"{0}\")] attribute to any type will allow that type to be used while syncing.", param.ObjCType);
+ message += string.Format (" Adding a [Register (\"{0}\")] attribute to the class which corresponds to this will allow it to be synced to Objective-C.", param.ObjCType);
monitor.ReportError (null, new UserException ("Error while syncing", message));
}
}
diff --git a/main/src/addins/VersionControl/MonoDevelop.VersionControl.Git/MonoDevelop.VersionControl.Git/RepositoryStatus.cs b/main/src/addins/VersionControl/MonoDevelop.VersionControl.Git/MonoDevelop.VersionControl.Git/RepositoryStatus.cs
index 32beb5b029..4aada9f2a3 100644
--- a/main/src/addins/VersionControl/MonoDevelop.VersionControl.Git/MonoDevelop.VersionControl.Git/RepositoryStatus.cs
+++ b/main/src/addins/VersionControl/MonoDevelop.VersionControl.Git/MonoDevelop.VersionControl.Git/RepositoryStatus.cs
@@ -50,6 +50,48 @@ using NGit.Treewalk.Filter;
namespace MonoDevelop.VersionControl.Git
{
+ class SpecificStatus : NGit.Api.StatusCommand
+ {
+ WorkingTreeIterator iter;
+ IEnumerable<string> Files {
+ get; set;
+ }
+
+ public SpecificStatus (NGit.Repository repository)
+ : base (repository)
+ {
+ }
+
+ public SpecificStatus (NGit.Repository repository, IEnumerable<string> files)
+ : base (repository)
+ {
+ Files = files;
+ }
+
+ public override void SetWorkingTreeIt (WorkingTreeIterator workingTreeIt)
+ {
+ iter = workingTreeIt;
+ }
+
+ public override NGit.Api.Status Call ()
+ {
+ if (iter == null)
+ iter = new FileTreeIterator(repo);
+
+ IndexDiff diff = new IndexDiff(repo, Constants.HEAD, iter);
+ if (Files != null) {
+ var filters = Files.Select (PathFilter.Create).ToArray ();
+ if (filters.Length > 1)
+ diff.SetFilter (OrTreeFilter.Create (filters));
+ else
+ diff.SetFilter (filters [0]);
+ }
+
+ diff.Diff ();
+ return new NGit.Api.Status(diff);
+ }
+ }
+
public class RepositoryStatus
{
private string _root_path;
@@ -133,12 +175,38 @@ namespace MonoDevelop.VersionControl.Git
MergeConflict = new HashSet<string>();
if (_file_paths != null)
- UpdateDirectory (_file_paths, false);
+ UpdateSingleFiles (_file_paths.ToList ());
else if (_recursive)
UpdateDirectory (new string[] { _root_path }, true);
else
UpdateDirectory (new string[] { _root_path }, false);
}
+
+ void UpdateSingleFiles (List<string> singleFiles)
+ {
+ var status = new SpecificStatus (Repository, singleFiles).Call ();
+
+ foreach (var v in status.GetAdded ())
+ Added.Add (v);
+
+ foreach (var v in status.GetChanged ())
+ Modified.Add (v);
+
+ foreach (var v in status.GetConflicting ())
+ MergeConflict.Add (v);
+
+ foreach (var v in status.GetMissing ())
+ Missing.Add (v);
+
+ foreach (var v in status.GetModified ())
+ Modified.Add (v);
+
+ foreach (var v in status.GetRemoved ())
+ Removed.Add (v);
+
+ foreach (var v in status.GetUntracked ())
+ Untracked.Add (v);
+ }
/// <summary>
/// Run the diff operation. Until this is called, all lists will be empty
@@ -152,7 +220,7 @@ namespace MonoDevelop.VersionControl.Git
TreeWalk treeWalk = new TreeWalk (Repository);
treeWalk.Reset ();
- treeWalk.Recursive = false;
+ treeWalk.Recursive = recursive;
if (commit != null)
treeWalk.AddTree (commit.Tree);