[Monodevelop-patches-list] r699 - in trunk/MonoDevelop: . build/AddIns src/AddIns/DisplayBindings/TextEditor src/AddIns/DisplayBindings/TextEditor/Commands src/AddIns/DisplayBindings/TextEditor/Gui/Editor src/Main/Base

commit-watcher at mono-cvs.ximian.com commit-watcher at mono-cvs.ximian.com
Tue Jan 27 23:04:40 EST 2004


Author: benm
Date: 2004-01-27 23:04:39 -0500 (Tue, 27 Jan 2004)
New Revision: 699

Removed:
   trunk/MonoDevelop/src/AddIns/DisplayBindings/TextEditor/Commands/BookmarkCommands.cs
Modified:
   trunk/MonoDevelop/Makefile
   trunk/MonoDevelop/build/AddIns/MonoDevelopBufferCommands.addin
   trunk/MonoDevelop/src/AddIns/DisplayBindings/TextEditor/Gui/Editor/TextEditorDisplayBinding.cs
   trunk/MonoDevelop/src/AddIns/DisplayBindings/TextEditor/Makefile
   trunk/MonoDevelop/src/Main/Base/Makefile
Log:
refactorize

Modified: trunk/MonoDevelop/Makefile
===================================================================
--- trunk/MonoDevelop/Makefile	2004-01-28 03:44:23 UTC (rev 698)
+++ trunk/MonoDevelop/Makefile	2004-01-28 04:04:39 UTC (rev 699)
@@ -3,7 +3,7 @@
 GTKMOZEMBED=build/bin/gtkmozembed-sharp.dll
 QMAKE=@ $(MAKE)
 
-$(PROGRAM): $(GTKMOZEMBED) MonoDevelop.Base MonoDevelop.DefaultTexteditor SourceEditor CSharpBinding StartPage
+$(PROGRAM): $(GTKMOZEMBED) MonoDevelop.Base MonoDevelop.EditorBindings MonoDevelop.DefaultTexteditor SourceEditor CSharpBinding StartPage
 	@ echo Building $@
 	$(QMAKE) -C src/Main/StartUp
 
@@ -63,6 +63,10 @@
 	@ echo Building $@
 	$(QMAKE) -C src/AddIns/DisplayBindings/SourceEditor
 
+MonoDevelop.EditorBindings :
+	@ echo Building $@
+	$(QMAKE) -C src/AddIns/DisplayBindings/EditorBindings
+	
 clean:
 	find ./build/ -name '*.dll' | xargs rm -f
 	find ./build/ -name '*.exe' | xargs rm -f

Modified: trunk/MonoDevelop/build/AddIns/MonoDevelopBufferCommands.addin
===================================================================
--- trunk/MonoDevelop/build/AddIns/MonoDevelopBufferCommands.addin	2004-01-28 03:44:23 UTC (rev 698)
+++ trunk/MonoDevelop/build/AddIns/MonoDevelopBufferCommands.addin	2004-01-28 04:04:39 UTC (rev 699)
@@ -12,6 +12,7 @@
 	<Runtime>
 		<Import assembly="../bin/MonoDevelop.TextEditor.dll"/>
 		<Import assembly="../bin/MonoDevelop.DefaultTexteditor.dll"/>
+		<Import assembly="../bin/MonoDevelop.EditorBindings.dll"/>
 	</Runtime>
 	
 	<Extension path = "/SharpDevelop/Dialogs/OptionsDialog/CodingOptions">
@@ -150,19 +151,19 @@
 				<ToolbarItem id = "ToggleBookmark"
 				             icon = "Icons.16x16.ToggleBookmark"
 				             tooltip = "${res:XML.MainMenu.SearchMenu.ToggleBookmark.Description}"
-				             class = "ICSharpCode.SharpDevelop.DefaultEditor.Commands.ToggleBookmark"/>
+				             class = "MonoDevelop.EditorBindings.Commands.ToggleBookmark"/>
 				<ToolbarItem id = "PrevBookmark"
 				             icon = "Icons.16x16.GotoPrevbookmark"
 				             tooltip = "${res:XML.MainMenu.SearchMenu.PrevBookmark.Description}"
-				             class = "ICSharpCode.SharpDevelop.DefaultEditor.Commands.PrevBookmark"/>
+				             class = "MonoDevelop.EditorBindings.Commands.PrevBookmark"/>
 				<ToolbarItem id = "NextBookmark"
 				             icon = "Icons.16x16.GotoNextbookmark"
 				             tooltip = "${res:XML.MainMenu.SearchMenu.NextBookmark.Description}"
-				             class = "ICSharpCode.SharpDevelop.DefaultEditor.Commands.NextBookmark"/>
+				             class = "MonoDevelop.EditorBindings.Commands.NextBookmark"/>
 				<ToolbarItem id = "ClearBookmarks"
 				             icon = "Icons.16x16.ClearAllBookmarks"
 					     tooltip = "${res:XML.MainMenu.SearchMenu.ClrBookmark.Description}"
-				             class = "ICSharpCode.SharpDevelop.DefaultEditor.Commands.ClearBookmarks"/>
+				             class = "MonoDevelop.EditorBindings.Commands.ClearBookmarks"/>
 			</Conditional>
 	</Extension>
 	
@@ -215,24 +216,24 @@
 		                          description = "${res:XML.MainMenu.SearchMenu.ToggleBookmark.Description}" 
 		                          shortcut = "Control|F2"
 		                          icon = "Icons.16x16.ToggleBookmark"
-		                          class = "ICSharpCode.SharpDevelop.DefaultEditor.Commands.ToggleBookmark"/>
+		                          class = "MonoDevelop.EditorBindings.Commands.ToggleBookmark"/>
 		                <MenuItem id = "PrevBookmark"
 		                          label = "${res:XML.MainMenu.SearchMenu.PrevBookmark}" 
 		                          description = "${res:XML.MainMenu.SearchMenu.PrevBookmark.Description}" 
 		                          shortcut = "Alt|F2"
 		                          icon = "Icons.16x16.GotoPrevbookmark"
-		                          class = "ICSharpCode.SharpDevelop.DefaultEditor.Commands.PrevBookmark"/>
+		                          class = "MonoDevelop.EditorBindings.Commands.PrevBookmark"/>
 		                <MenuItem id = "NextBookmark"
 		                          label = "${res:XML.MainMenu.SearchMenu.NextBookmark}" 
 		                          description = "${res:XML.MainMenu.SearchMenu.NextBookmark.Description}" 
 		                          shortcut = "F2" 
 		                          icon = "Icons.16x16.GotoNextbookmark"
-		                          class = "ICSharpCode.SharpDevelop.DefaultEditor.Commands.NextBookmark"/>
+		                          class = "MonoDevelop.EditorBindings.Commands.NextBookmark"/>
 		                <MenuItem id = "ClearBookmarks"
 		                          label = "${res:XML.MainMenu.SearchMenu.ClrBookmark}" 
 		                          description = "${res:XML.MainMenu.SearchMenu.ClrBookmark.Description}"
 		                          icon = "Icons.16x16.ClearAllBookmarks"
-		                          class = "ICSharpCode.SharpDevelop.DefaultEditor.Commands.ClearBookmarks"/>
+		                          class = "MonoDevelop.EditorBindings.Commands.ClearBookmarks"/>
 		                <MenuItem id = "Separator2" label = "-" />
 		                <MenuItem id = "GotoLineNr"
 		                          label = "${res:XML.MainMenu.SearchMenu.GotoLineNr}" 

Deleted: trunk/MonoDevelop/src/AddIns/DisplayBindings/TextEditor/Commands/BookmarkCommands.cs
===================================================================
--- trunk/MonoDevelop/src/AddIns/DisplayBindings/TextEditor/Commands/BookmarkCommands.cs	2004-01-28 03:44:23 UTC (rev 698)
+++ trunk/MonoDevelop/src/AddIns/DisplayBindings/TextEditor/Commands/BookmarkCommands.cs	2004-01-28 04:04:39 UTC (rev 699)
@@ -1,85 +0,0 @@
-// <file>
-//     <copyright see="prj:///doc/copyright.txt"/>
-//     <license see="prj:///doc/license.txt"/>
-//     <owner name="Mike Krüger" email="mike at icsharpcode.net"/>
-//     <version value="$version"/>
-// </file>
-
-using System;
-using System.IO;
-using System.Threading;
-using System.Drawing;
-using System.Drawing.Printing;
-using System.Collections;
-using System.ComponentModel;
-using System.Diagnostics;
-using System.Text;
-
-using ICSharpCode.Core.AddIns;
-
-using ICSharpCode.Core.Properties;
-using ICSharpCode.Core.AddIns.Codons;
-
-using ICSharpCode.SharpDevelop.Gui.Dialogs;
-using ICSharpCode.TextEditor.Document;
-using ICSharpCode.SharpDevelop.DefaultEditor.Gui.Editor;
-using ICSharpCode.SharpDevelop.Gui;
-using ICSharpCode.TextEditor;
-using ICSharpCode.TextEditor.Actions;
-
-namespace ICSharpCode.SharpDevelop.DefaultEditor.Commands
-{
-	public abstract class AbstractEditActionMenuCommand : AbstractMenuCommand
-	{
-		public abstract IEditAction EditAction {
-			get;
-		}
-		
-		public override void Run()
-		{
-			IWorkbenchWindow window = WorkbenchSingleton.Workbench.ActiveWorkbenchWindow;
-			
-			if (window == null || !(window.ViewContent is ITextEditorControlProvider)) {
-				return;
-			}
-			TextEditorControl textEditor = ((ITextEditorControlProvider)window.ViewContent).TextEditorControl;
-			EditAction.Execute(textEditor.ActiveTextAreaControl.TextArea);
-		}
-	}
-	
-	public class ToggleBookmark : AbstractEditActionMenuCommand
-	{
-		public override IEditAction EditAction {
-			get {
-				return new ICSharpCode.TextEditor.Actions.ToggleBookmark();
-			}
-		}
-	}
-	
-	public class PrevBookmark : AbstractEditActionMenuCommand
-	{
-		public override IEditAction EditAction {
-			get {
-				return new ICSharpCode.TextEditor.Actions.GotoPrevBookmark();
-			}
-		}
-	}
-		
-	public class NextBookmark : AbstractEditActionMenuCommand
-	{
-		public override IEditAction EditAction {
-			get {
-				return new ICSharpCode.TextEditor.Actions.GotoNextBookmark();
-			}
-		}
-	}
-		
-	public class ClearBookmarks : AbstractEditActionMenuCommand
-	{
-		public override IEditAction EditAction {
-			get {
-				return new ICSharpCode.TextEditor.Actions.ClearAllBookmarks();
-			}
-		}
-	}
-}

Modified: trunk/MonoDevelop/src/AddIns/DisplayBindings/TextEditor/Gui/Editor/TextEditorDisplayBinding.cs
===================================================================
--- trunk/MonoDevelop/src/AddIns/DisplayBindings/TextEditor/Gui/Editor/TextEditorDisplayBinding.cs	2004-01-28 03:44:23 UTC (rev 698)
+++ trunk/MonoDevelop/src/AddIns/DisplayBindings/TextEditor/Gui/Editor/TextEditorDisplayBinding.cs	2004-01-28 04:04:39 UTC (rev 699)
@@ -92,7 +92,8 @@
 		}	
 	}
 	
-	public class TextEditorDisplayBindingWrapper : AbstractViewContent, IMementoCapable, IPrintable, IEditable, IPositionable, ITextEditorControlProvider, IParseInformationListener, IClipboardHandler
+	public class TextEditorDisplayBindingWrapper : AbstractViewContent, IMementoCapable, IPrintable, IEditable, IPositionable, ITextEditorControlProvider, IParseInformationListener, IClipboardHandler,
+		IBookmarkOperations
 	{
 		public SharpDevelopTextAreaControl textAreaControl = new SharpDevelopTextAreaControl();
 
@@ -427,5 +428,12 @@
 			textAreaControl.ActiveTextAreaControl.TextArea.ClipboardHandler.Cut(sender, e);
 		}
 #endregion
+		
+#region IBookmarkOperations
+		void IBookmarkOperations.ToggleBookmark () { new ICSharpCode.TextEditor.Actions.ToggleBookmark     ().Execute (TextEditorControl.ActiveTextAreaControl.TextArea); }
+		void IBookmarkOperations.PrevBookmark ()   { new ICSharpCode.TextEditor.Actions.GotoPrevBookmark   ().Execute (TextEditorControl.ActiveTextAreaControl.TextArea); }
+		void IBookmarkOperations.NextBookmark ()   { new ICSharpCode.TextEditor.Actions.GotoNextBookmark   ().Execute (TextEditorControl.ActiveTextAreaControl.TextArea); }
+		void IBookmarkOperations.ClearBookmarks () { new ICSharpCode.TextEditor.Actions.ClearAllBookmarks  ().Execute (TextEditorControl.ActiveTextAreaControl.TextArea); }
+#endregion
 	}
 }

Modified: trunk/MonoDevelop/src/AddIns/DisplayBindings/TextEditor/Makefile
===================================================================
--- trunk/MonoDevelop/src/AddIns/DisplayBindings/TextEditor/Makefile	2004-01-28 03:44:23 UTC (rev 698)
+++ trunk/MonoDevelop/src/AddIns/DisplayBindings/TextEditor/Makefile	2004-01-28 04:04:39 UTC (rev 699)
@@ -27,7 +27,6 @@
 ./Codons/EditActionCodon.cs \
 ./Commands/ToolCommands.cs \
 ./Commands/TextAreaContextmenuCommands.cs \
-./Commands/BookmarkCommands.cs \
 ./Commands/FormatCommands.cs \
 ./Commands/ProjectCommands.cs \
 ./Commands/SearchCommands.cs \

Modified: trunk/MonoDevelop/src/Main/Base/Makefile
===================================================================
--- trunk/MonoDevelop/src/Main/Base/Makefile	2004-01-28 03:44:23 UTC (rev 698)
+++ trunk/MonoDevelop/src/Main/Base/Makefile	2004-01-28 04:04:39 UTC (rev 699)
@@ -91,6 +91,7 @@
 ./Gui/Dialogs/InputBox.cs \
 ./Gui/Dialogs/NewFileDialog.cs \
 ./Gui/Dialogs/ProjectOptionsDialog.cs \
+./Gui/ContentInterfaces/IBookmarkOperations.cs \
 ./Gui/ContentInterfaces/IClipboardHandler.cs \
 ./Gui/ContentInterfaces/IPrintable.cs \
 ./Gui/ContentInterfaces/IPositionable.cs \




More information about the Monodevelop-patches-list mailing list