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:
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
parentf7062e64c292af495006e0b9a9bb654b5c59ce19 (diff)
parent945e9e89c6d7b992d3309a53f5f4c4b5f81c211e (diff)
Merge branch 'master' into newresolver
Conflicts: main/src/addins/CSharpBinding/MonoDevelop.CSharp.Parser/CSharpFoldingParser.cs
Diffstat (limited to 'main/src')
-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
-rw-r--r--main/src/core/Mono.Texteditor/Mono.TextEditor/Document.cs12
-rw-r--r--main/src/core/MonoDevelop.Ide/gtk-gui/MonoDevelop.Ide.FindInFiles.FindInFilesDialog.cs1
-rw-r--r--main/src/core/MonoDevelop.Ide/gtk-gui/MonoDevelop.Ide.Gui.Dialogs.TipOfTheDayWindow.cs1
8 files changed, 94 insertions, 15 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);
diff --git a/main/src/core/Mono.Texteditor/Mono.TextEditor/Document.cs b/main/src/core/Mono.Texteditor/Mono.TextEditor/Document.cs
index 7b6b8c84a7..d01e79ab50 100644
--- a/main/src/core/Mono.Texteditor/Mono.TextEditor/Document.cs
+++ b/main/src/core/Mono.Texteditor/Mono.TextEditor/Document.cs
@@ -995,6 +995,7 @@ namespace Mono.TextEditor
var newSegments = (List<FoldSegment>)e.Argument;
var oldSegments = new List<FoldSegment> (FoldSegments);
int oldIndex = 0;
+ bool foldedSegmentAdded = false;
newSegments.Sort ();
var newFoldedSegments = new HashSet<FoldSegment> ();
foreach (FoldSegment newFoldSegment in newSegments) {
@@ -1013,8 +1014,10 @@ namespace Mono.TextEditor
curSegment.EndColumn = curSegment.EndOffset - curSegment.EndLine.Offset + 1;
curSegment.Column = offset - curSegment.StartLine.Offset + 1;
- if (newFoldSegment.IsFolded)
+ if (newFoldSegment.IsFolded) {
+ foldedSegmentAdded |= !curSegment.IsFolded;
curSegment.isFolded = true;
+ }
if (curSegment.isFolded)
newFoldedSegments.Add (curSegment);
oldIndex++;
@@ -1024,6 +1027,7 @@ namespace Mono.TextEditor
newFoldSegment.EndColumn = newFoldSegment.EndOffset - endLine.Offset + 1;
newFoldSegment.Column = offset - startLine.Offset + 1;
newFoldSegment.isAttached = true;
+ foldedSegmentAdded |= newFoldSegment.IsFolded;
if (oldIndex < oldSegments.Count && newFoldSegment.Length == oldSegments [oldIndex].Length) {
newFoldSegment.isFolded = oldSegments [oldIndex].IsFolded;
}
@@ -1036,17 +1040,19 @@ namespace Mono.TextEditor
RemoveFolding (oldSegments [oldIndex]);
oldIndex++;
}
+ bool countChanged = foldedSegments.Count != newFoldedSegments.Count;
if (worker != null) {
Gtk.Application.Invoke (delegate {
- bool countChanged = foldedSegments.Count != newFoldedSegments.Count;
foldedSegments = newFoldedSegments;
InformFoldTreeUpdated ();
- if (countChanged)
+ if (foldedSegmentAdded || countChanged)
CommitUpdateAll ();
});
} else {
foldedSegments = newFoldedSegments;
InformFoldTreeUpdated ();
+ if (foldedSegmentAdded || countChanged)
+ CommitUpdateAll ();
}
}
diff --git a/main/src/core/MonoDevelop.Ide/gtk-gui/MonoDevelop.Ide.FindInFiles.FindInFilesDialog.cs b/main/src/core/MonoDevelop.Ide/gtk-gui/MonoDevelop.Ide.FindInFiles.FindInFilesDialog.cs
index fbe36dd14c..d41cd934db 100644
--- a/main/src/core/MonoDevelop.Ide/gtk-gui/MonoDevelop.Ide.FindInFiles.FindInFilesDialog.cs
+++ b/main/src/core/MonoDevelop.Ide/gtk-gui/MonoDevelop.Ide.FindInFiles.FindInFilesDialog.cs
@@ -54,6 +54,7 @@ namespace MonoDevelop.Ide.FindInFiles
this.toggleFindInFiles.TooltipMarkup = "Switch to Find in Files";
this.toggleFindInFiles.CanFocus = true;
this.toggleFindInFiles.Name = "toggleFindInFiles";
+ this.toggleFindInFiles.Active = true;
this.toggleFindInFiles.DrawIndicator = false;
this.toggleFindInFiles.UseUnderline = true;
this.toggleFindInFiles.Relief = ((global::Gtk.ReliefStyle)(2));
diff --git a/main/src/core/MonoDevelop.Ide/gtk-gui/MonoDevelop.Ide.Gui.Dialogs.TipOfTheDayWindow.cs b/main/src/core/MonoDevelop.Ide/gtk-gui/MonoDevelop.Ide.Gui.Dialogs.TipOfTheDayWindow.cs
index 890fbc07a9..5bc366d997 100644
--- a/main/src/core/MonoDevelop.Ide/gtk-gui/MonoDevelop.Ide.Gui.Dialogs.TipOfTheDayWindow.cs
+++ b/main/src/core/MonoDevelop.Ide/gtk-gui/MonoDevelop.Ide.Gui.Dialogs.TipOfTheDayWindow.cs
@@ -100,7 +100,6 @@ namespace MonoDevelop.Ide.Gui.Dialogs
w7.Fill = false;
// Container child hbox5.Gtk.Box+BoxChild
this.hbuttonbox1 = new global::Gtk.HButtonBox ();
- this.hbuttonbox1.Name = "hbuttonbox1";
this.hbuttonbox1.Spacing = 10;
this.hbuttonbox1.LayoutStyle = ((global::Gtk.ButtonBoxStyle)(4));
// Container child hbuttonbox1.Gtk.ButtonBox+ButtonBoxChild