Author: fejj
Date: 2007-04-03 16:01:19 -0400 (Tue, 03 Apr 2007)
New Revision: 75361
Modified:
trunk/monodevelop/Core/src/MonoDevelop.Core/Makefile.am
trunk/monodevelop/Core/src/MonoDevelop.Ide/ChangeLog
trunk/monodevelop/Core/src/MonoDevelop.Ide/MonoDevelop.Ide.Gui/NavigationHistory.cs
trunk/monodevelop/Core/src/MonoDevelop.Ide/MonoDevelop.Ide.Gui/NavigationService.cs
trunk/monodevelop/Core/src/MonoDevelop.Projects/Makefile.am
Log:
2007-04-03 Jeffrey Stedfast <[EMAIL PROTECTED]>
* MonoDevelop.Ide.Gui/NavigationService.cs: Only log new points if the
time interval has been >= 1 second.
* MonoDevelop.Ide.Gui/NavigationHistory.cs: Don't include the current
navpoint in the menus.
Modified: trunk/monodevelop/Core/src/MonoDevelop.Core/Makefile.am
===================================================================
--- trunk/monodevelop/Core/src/MonoDevelop.Core/Makefile.am 2007-04-03
19:56:55 UTC (rev 75360)
+++ trunk/monodevelop/Core/src/MonoDevelop.Core/Makefile.am 2007-04-03
20:01:19 UTC (rev 75361)
@@ -64,9 +64,9 @@
MonoDevelop.Core.AddIns/IAddInTree.cs \
MonoDevelop.Core.AddIns/IAddInTreeNode.cs \
MonoDevelop.Core.AddIns/IApplication.cs \
- MonoDevelop.Core.AddIns/IconCodon.cs \
MonoDevelop.Core.AddIns/ICodon.cs \
MonoDevelop.Core.AddIns/ICommand.cs \
+ MonoDevelop.Core.AddIns/IconCodon.cs \
MonoDevelop.Core.AddIns/ICondition.cs \
MonoDevelop.Core.AddIns/OwnerStateCondition.cs \
MonoDevelop.Core.AddIns/PackageExtensionNode.cs \
Modified: trunk/monodevelop/Core/src/MonoDevelop.Ide/ChangeLog
===================================================================
--- trunk/monodevelop/Core/src/MonoDevelop.Ide/ChangeLog 2007-04-03
19:56:55 UTC (rev 75360)
+++ trunk/monodevelop/Core/src/MonoDevelop.Ide/ChangeLog 2007-04-03
20:01:19 UTC (rev 75361)
@@ -1,3 +1,11 @@
+2007-04-03 Jeffrey Stedfast <[EMAIL PROTECTED]>
+
+ * MonoDevelop.Ide.Gui/NavigationService.cs: Only log new points if the
+ time interval has been >= 1 second.
+
+ * MonoDevelop.Ide.Gui/NavigationHistory.cs: Don't include the current
+ navpoint in the menus.
+
2007-04-02 Jeffrey Stedfast <[EMAIL PROTECTED]>
* MonoDevelop.Ide.Gui/NavigationHistory.cs: Implement
Modified:
trunk/monodevelop/Core/src/MonoDevelop.Ide/MonoDevelop.Ide.Gui/NavigationHistory.cs
===================================================================
---
trunk/monodevelop/Core/src/MonoDevelop.Ide/MonoDevelop.Ide.Gui/NavigationHistory.cs
2007-04-03 19:56:55 UTC (rev 75360)
+++
trunk/monodevelop/Core/src/MonoDevelop.Ide/MonoDevelop.Ide.Gui/NavigationHistory.cs
2007-04-03 20:01:19 UTC (rev 75361)
@@ -176,12 +176,12 @@
for (i = 0; i < points.Count; i++) {
point = points[i];
- if (point ==
NavigationService.CurrentPosition) {
- i++;
+ if (point ==
NavigationService.CurrentPosition)
break;
- }
}
+ i++;
+
while (i < points.Count) {
point = points[i++];
item = new MenuItem
(point.FullDescription);
Modified:
trunk/monodevelop/Core/src/MonoDevelop.Ide/MonoDevelop.Ide.Gui/NavigationService.cs
===================================================================
---
trunk/monodevelop/Core/src/MonoDevelop.Ide/MonoDevelop.Ide.Gui/NavigationService.cs
2007-04-03 19:56:55 UTC (rev 75360)
+++
trunk/monodevelop/Core/src/MonoDevelop.Ide/MonoDevelop.Ide.Gui/NavigationService.cs
2007-04-03 20:01:19 UTC (rev 75361)
@@ -43,7 +43,9 @@
#region Private members
static LinkedList<INavigationPoint> history = new
LinkedList<INavigationPoint> ();
static LinkedListNode<INavigationPoint> currentNode; //
autoinitialized to null (FxCop)
+ static LinkedListNode<INavigationPoint> lastLogged;
static bool loggingSuspended; // autoinitialized to false
(FxCop)
+ static int stamp;
#endregion
// TODO: FxCop says "find another way to do this"
(ReviewVisibleEventHandlers)
@@ -126,13 +128,27 @@
if (p == null || p.FileName == null || p.FileName ==
String.Empty)
return;
+ INavigationPoint o = lastLogged != null ?
lastLogged.Value : null;
+ int now = Environment.TickCount;
+
if (currentNode == null) {
currentNode = history.AddFirst (p);
+ lastLogged = currentNode;
+ stamp = now;
} else if (p.Equals (currentNode.Value)) {
// replace it
currentNode.Value = p;
+ lastLogged = currentNode;
+ stamp = now;
+ } else if ((now - stamp) > 1000 || o.FileName !=
p.FileName) {
+ // enough time elapsed to log a new point or
the file changed
+ currentNode = history.AddAfter (currentNode, p);
+ lastLogged = currentNode;
+ stamp = now;
} else {
- currentNode = history.AddAfter (currentNode, p);
+ // not enough time has elapsed, overwrite last
logged navpoint
+ //lastLogged.Value = p;
+ //stamp = now;
}
OnHistoryChanged ();
@@ -168,7 +184,9 @@
public static void ClearHistory (bool clearCurrentPosition)
{
INavigationPoint currentPosition = CurrentPosition;
+
history.Clear ();
+ lastLogged = null;
currentNode = null;
if (!clearCurrentPosition)
Modified: trunk/monodevelop/Core/src/MonoDevelop.Projects/Makefile.am
===================================================================
--- trunk/monodevelop/Core/src/MonoDevelop.Projects/Makefile.am 2007-04-03
19:56:55 UTC (rev 75360)
+++ trunk/monodevelop/Core/src/MonoDevelop.Projects/Makefile.am 2007-04-03
20:01:19 UTC (rev 75361)
@@ -235,9 +235,9 @@
MonoDevelop.Projects/ProjectReferenceCollection.cs \
MonoDevelop.Projects/ProjectReferenceEventArgs.cs \
MonoDevelop.Projects/ProjectRenameEventArgs.cs \
- MonoDevelop.Projects/ProjectsServices.cs \
MonoDevelop.Projects/ProjectService.cs \
MonoDevelop.Projects/ProjectServiceExtension.cs \
+ MonoDevelop.Projects/ProjectsServices.cs \
MonoDevelop.Projects/TypelibImporter.cs \
MonoDevelop.Projects/UnknownCombineEntry.cs \
MonoDevelop.Projects/UnknownProjectVersionException.cs
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches