Author: mhutch
Date: 2008-01-23 17:22:24 -0500 (Wed, 23 Jan 2008)
New Revision: 93722
Modified:
branches/monodevelop/main/1.0/src/addins/CBinding/ChangeLog
branches/monodevelop/main/1.0/src/addins/CBinding/Parser/TagDatabaseManager.cs
branches/monodevelop/main/1.0/src/addins/SourceEditor2/ChangeLog
branches/monodevelop/main/1.0/src/addins/SourceEditor2/MonoDevelop.SourceEditor.Gui/SourceEditorBuffer.cs
branches/monodevelop/main/1.0/src/core/MonoDevelop.Core/ChangeLog
branches/monodevelop/main/1.0/src/core/MonoDevelop.Core/MonoDevelop.Core.Execution/ProcessHostController.cs
Log:
In src/addins/SourceEditor2:
2008-01-21 Mike Kr?\195?\188ger <[EMAIL PROTECTED]>
* MonoDevelop.SourceEditor.Gui/SourceEditorBuffer.cs: Fixed Bug 354248 -
Uncomment does not work when comment tag is not the first two signs.
2008-01-21 Mike Kr?\195?\188ger <[EMAIL PROTECTED]>
* MonoDevelop.SourceEditor.Gui/SourceEditorBuffer.cs: Fixed Bug 354248 -
Uncomment does not work when comment tag is not the first two signs.
In src/addins/CBinding:
2008-01-18 Marcos David Mar?\195?\173n Amador <[EMAIL PROTECTED]>
* Parser/TagDatabaseManager.cs: Cache tags into a hash table and see if
they
had been previously cached before looking for them again.
In src/core/MonoDevelop.Core:
2008-01-17 Michael Hutchinson <[EMAIL PROTECTED]>
* MonoDevelop.Core.Execution/ProcessHostController.cs:
If MD is running in debug mode (i.e. stack traces have line numbers)
then the process hosting RemoteProcessObjects should be in debug
mode too. Also, remove an "sh" call to improve portability.
Modified: branches/monodevelop/main/1.0/src/addins/CBinding/ChangeLog
===================================================================
--- branches/monodevelop/main/1.0/src/addins/CBinding/ChangeLog 2008-01-23
22:04:12 UTC (rev 93721)
+++ branches/monodevelop/main/1.0/src/addins/CBinding/ChangeLog 2008-01-23
22:22:24 UTC (rev 93722)
@@ -1,3 +1,8 @@
+2008-01-18 Marcos David Marín Amador <[EMAIL PROTECTED]>
+
+ * Parser/TagDatabaseManager.cs: Cache tags into a hash table and see if
they
+ had been previously cached before looking for them again.
+
2008-01-15 Michael Hutchinson <[EMAIL PROTECTED]>
* templates/StaticLibraryCProject.xpt.xml,
Modified:
branches/monodevelop/main/1.0/src/addins/CBinding/Parser/TagDatabaseManager.cs
===================================================================
---
branches/monodevelop/main/1.0/src/addins/CBinding/Parser/TagDatabaseManager.cs
2008-01-23 22:04:12 UTC (rev 93721)
+++
branches/monodevelop/main/1.0/src/addins/CBinding/Parser/TagDatabaseManager.cs
2008-01-23 22:22:24 UTC (rev 93722)
@@ -287,6 +287,9 @@
if (PropertyService.Get<bool>
("CBinding.ParseSystemTags", true))
UpdateSystemTags (project, filename,
system_headers);
+
+ if (cache.Count > cache_size)
+ cache.Clear ();
}
private void AddInfo (FileInformation info, Tag tag, string
ctags_output)
@@ -522,11 +525,39 @@
return null;
}
+ private struct SemiTag
+ {
+ readonly internal string name;
+ readonly internal TagKind kind;
+
+ internal SemiTag (string name, TagKind kind)
+ {
+ this.name = name;
+ this.kind = kind;
+ }
+
+ public override int GetHashCode ()
+ {
+ return (name + kind.ToString ()).GetHashCode ();
+ }
+ }
+
+ private const int cache_size = 10000;
+ private Dictionary<SemiTag, Tag> cache = new
Dictionary<SemiTag, Tag> ();
+
public Tag FindTag (string name, TagKind kind, string
ctags_output)
{
- string[] ctags_lines = ctags_output.Split ('\n');
-
- return BinarySearch (ctags_lines, kind, name);
+ SemiTag semiTag = new SemiTag (name, kind);
+
+ if (cache.ContainsKey (semiTag))
+ return cache[semiTag];
+ else {
+ string[] ctags_lines = ctags_output.Split
('\n');
+ Tag tag = BinarySearch (ctags_lines, kind,
name);
+ cache.Add (semiTag, tag);
+
+ return tag;
+ }
}
private static string[] diff (string[] a1, string[] a2)
Modified: branches/monodevelop/main/1.0/src/addins/SourceEditor2/ChangeLog
===================================================================
--- branches/monodevelop/main/1.0/src/addins/SourceEditor2/ChangeLog
2008-01-23 22:04:12 UTC (rev 93721)
+++ branches/monodevelop/main/1.0/src/addins/SourceEditor2/ChangeLog
2008-01-23 22:22:24 UTC (rev 93722)
@@ -1,3 +1,13 @@
+2008-01-21 Mike Krüger <[EMAIL PROTECTED]>
+
+ * MonoDevelop.SourceEditor.Gui/SourceEditorBuffer.cs: Fixed Bug 354248 -
+ Uncomment does not work when comment tag is not the first two signs.
+
+2008-01-21 Mike Krüger <[EMAIL PROTECTED]>
+
+ * MonoDevelop.SourceEditor.Gui/SourceEditorBuffer.cs: Fixed Bug 354248 -
+ Uncomment does not work when comment tag is not the first two signs.
+
2008-01-14 Lluis Sanchez Gual <[EMAIL PROTECTED]>
* MonoDevelop.SourceEditor.Gui/SourceEditorDisplayBinding.cs: Set the
file
Modified:
branches/monodevelop/main/1.0/src/addins/SourceEditor2/MonoDevelop.SourceEditor.Gui/SourceEditorBuffer.cs
===================================================================
---
branches/monodevelop/main/1.0/src/addins/SourceEditor2/MonoDevelop.SourceEditor.Gui/SourceEditorBuffer.cs
2008-01-23 22:04:12 UTC (rev 93721)
+++
branches/monodevelop/main/1.0/src/addins/SourceEditor2/MonoDevelop.SourceEditor.Gui/SourceEditorBuffer.cs
2008-01-23 22:22:24 UTC (rev 93722)
@@ -777,17 +777,17 @@
TextIter textStart;
TextIter textEnd;
GetSelectionBounds (out textStart, out textEnd);
- if (textStart.Line == textEnd.Line)
- { // all the code is in one line, just uncomment is
text starts with comment tag
- textStart.LineOffset = 0;
- textEnd = textStart;
- textEnd.ForwardChars (commentTag.Length);
- if (textStart.GetText (textEnd) == commentTag)
- Delete (ref textStart, ref textEnd);
- }
- else
+// if (textStart.Line == textEnd.Line)
+// { // all the code is in one line, just uncomment is
text starts with comment tag
+// textStart.LineOffset = 0;
+// textEnd = textStart;
+// textEnd.ForwardChars (commentTag.Length);
+// if (textStart.GetText (textEnd) == commentTag)
+// Delete (ref textStart, ref textEnd);
+// }
+// else
{ // uncomment the entire lines
- int numberOfLines = textEnd.Line -
textStart.Line + 1;
+ int numberOfLines = textStart.Line ==
textEnd.Line ? 1 : textEnd.Line - textStart.Line + 1;
TextMark mTextStart = CreateMark (null,
textStart, true);
TextMark mTextTmp = mTextStart;
Modified: branches/monodevelop/main/1.0/src/core/MonoDevelop.Core/ChangeLog
===================================================================
--- branches/monodevelop/main/1.0/src/core/MonoDevelop.Core/ChangeLog
2008-01-23 22:04:12 UTC (rev 93721)
+++ branches/monodevelop/main/1.0/src/core/MonoDevelop.Core/ChangeLog
2008-01-23 22:22:24 UTC (rev 93722)
@@ -10,6 +10,13 @@
* MonoDevelop.Core/Runtime.cs: Use a version specific default MD add-in
repo.
+2008-01-17 Michael Hutchinson <[EMAIL PROTECTED]>
+
+ * MonoDevelop.Core.Execution/ProcessHostController.cs:
+ If MD is running in debug mode (i.e. stack traces have line numbers)
+ then the process hosting RemoteProcessObjects should be in debug
+ mode too. Also, remove an "sh" call to improve portability.
+
2008-01-17 Lluis Sanchez Gual <[EMAIL PROTECTED]>
* MonoDevelop.Core/Runtime.cs: Get add-ins from a version specific
Modified:
branches/monodevelop/main/1.0/src/core/MonoDevelop.Core/MonoDevelop.Core.Execution/ProcessHostController.cs
===================================================================
---
branches/monodevelop/main/1.0/src/core/MonoDevelop.Core/MonoDevelop.Core.Execution/ProcessHostController.cs
2008-01-23 22:04:12 UTC (rev 93721)
+++
branches/monodevelop/main/1.0/src/core/MonoDevelop.Core/MonoDevelop.Core.Execution/ProcessHostController.cs
2008-01-23 22:22:24 UTC (rev 93722)
@@ -82,7 +82,11 @@
try {
process = new Process ();
process.Exited += new EventHandler
(ProcessExited);
- process.StartInfo = new
ProcessStartInfo ("sh", "-c \"mono mdhost.exe " + id + "\"");
+ string location = Path.GetDirectoryName
(System.Reflection.Assembly.GetExecutingAssembly ().Location);
+ string args = string.Empty;
+ if (isDebugMode) args += " --debug";
+ args += " '" + Path.Combine (location,
"mdhost.exe") + "' " + id;
+ process.StartInfo = new
ProcessStartInfo ("mono", args);
process.StartInfo.WorkingDirectory =
AppDomain.CurrentDomain.BaseDirectory;
process.StartInfo.UseShellExecute =
false;
process.StartInfo.RedirectStandardInput
= true;
@@ -97,6 +101,13 @@
}
}
}
+
+ bool isDebugMode
+ {
+ get {
+ return System.Environment.StackTrace.IndexOf
("ProcessHostController.cs:") > -1;
+ }
+ }
void ProcessExited (object sender, EventArgs args)
{
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches