[Monodevelop-patches-list] r2053 - in trunk/MonoDevelop/Core/src/Main/Base: . Commands Commands/ClassBrowserCommands Commands/ProjectBrowserCommands Commands/VBConverter Gui Gui/BrowserDisplayBinding Gui/Components Gui/Components/LocalizedPropertyGrid Gui/Components/SideBar Gui/Dialogs Gui/Dialogs/CombineConfiguration Gui/Dialogs/OptionPanels Gui/Dialogs/OptionPanels/IDEOptions Gui/Dialogs/OptionPanels/ProjectOptions Gui/Dialogs/ReferenceDialog Gui/Dialogs/Wizard Gui/ErrorHandlers Gui/Pads Gui/Pads/ClassScout Gui/Pads/ClassScout/NodeBuilder Gui/Pads/FileScout Gui/Pads/HelpBrowser Gui/Pads/ProjectBrowser Gui/Pads/ProjectBrowser/BrowserNode Gui/Pads/ProjectBrowser/NodeBuilder Gui/Workbench Gui/Workbench/Layouts Services Services/File

commit-watcher at mono-cvs.ximian.com commit-watcher at mono-cvs.ximian.com
Mon Dec 6 10:43:16 EST 2004


Author: lluis
Date: 2004-12-06 10:43:16 -0500 (Mon, 06 Dec 2004)
New Revision: 2053

Added:
   trunk/MonoDevelop/Core/src/Main/Base/Gui/GuiService.cs
   trunk/MonoDevelop/Core/src/Main/Base/Services/Runtime.cs
Removed:
   trunk/MonoDevelop/Core/src/Main/Base/Services/ClassBrowserIcons/
Modified:
   trunk/MonoDevelop/Core/src/Main/Base/ChangeLog
   trunk/MonoDevelop/Core/src/Main/Base/Commands/AutostartCommands.cs
   trunk/MonoDevelop/Core/src/Main/Base/Commands/ClassBrowserCommands/ClassBrowserCommands.cs
   trunk/MonoDevelop/Core/src/Main/Base/Commands/CustomStringTagProvider.cs
   trunk/MonoDevelop/Core/src/Main/Base/Commands/FileCommands.cs
   trunk/MonoDevelop/Core/src/Main/Base/Commands/HelpCommands.cs
   trunk/MonoDevelop/Core/src/Main/Base/Commands/MenuItemBuilders.cs
   trunk/MonoDevelop/Core/src/Main/Base/Commands/ProjectBrowserCommands/CombineNodeCommands.cs
   trunk/MonoDevelop/Core/src/Main/Base/Commands/ProjectBrowserCommands/FolderNodeCommands.cs
   trunk/MonoDevelop/Core/src/Main/Base/Commands/ProjectBrowserCommands/GeneralNodeCommands.cs
   trunk/MonoDevelop/Core/src/Main/Base/Commands/ProjectBrowserCommands/ProjectNodeCommands.cs
   trunk/MonoDevelop/Core/src/Main/Base/Commands/ProjectBrowserCommands/ReferenceFolderNodeCommands.cs
   trunk/MonoDevelop/Core/src/Main/Base/Commands/ProjectBrowserCommands/ResourceFolderNodeCommands.cs
   trunk/MonoDevelop/Core/src/Main/Base/Commands/ProjectCommands.cs
   trunk/MonoDevelop/Core/src/Main/Base/Commands/RunCommands.cs
   trunk/MonoDevelop/Core/src/Main/Base/Commands/ToolsCommands.cs
   trunk/MonoDevelop/Core/src/Main/Base/Commands/VBConverter/ConvertBuffer.cs
   trunk/MonoDevelop/Core/src/Main/Base/Commands/VBConverter/ConvertProject.cs
   trunk/MonoDevelop/Core/src/Main/Base/Gui/AbstractViewContent.cs
   trunk/MonoDevelop/Core/src/Main/Base/Gui/BrowserDisplayBinding/HtmlViewPane.cs
   trunk/MonoDevelop/Core/src/Main/Base/Gui/Components/LocalizedPropertyGrid/LocalizedPropertyDescriptor.cs
   trunk/MonoDevelop/Core/src/Main/Base/Gui/Components/SdMenu.cs
   trunk/MonoDevelop/Core/src/Main/Base/Gui/Components/SdMenuCheckBox.cs
   trunk/MonoDevelop/Core/src/Main/Base/Gui/Components/SdMenuCommand.cs
   trunk/MonoDevelop/Core/src/Main/Base/Gui/Components/SideBar/SharpDevelopSideTabItem.cs
   trunk/MonoDevelop/Core/src/Main/Base/Gui/Dialogs/CombineConfiguration/CombineBuildOptions.cs
   trunk/MonoDevelop/Core/src/Main/Base/Gui/Dialogs/CombineConfiguration/CombineStartupPanel.cs
   trunk/MonoDevelop/Core/src/Main/Base/Gui/Dialogs/CommonAboutDialog.cs
   trunk/MonoDevelop/Core/src/Main/Base/Gui/Dialogs/DirtyFilesDialog.cs
   trunk/MonoDevelop/Core/src/Main/Base/Gui/Dialogs/NewFileDialog.cs
   trunk/MonoDevelop/Core/src/Main/Base/Gui/Dialogs/NewProjectDialog.cs
   trunk/MonoDevelop/Core/src/Main/Base/Gui/Dialogs/OptionPanels/EditTemplateDialog.cs
   trunk/MonoDevelop/Core/src/Main/Base/Gui/Dialogs/OptionPanels/ExternalToolPanel.cs
   trunk/MonoDevelop/Core/src/Main/Base/Gui/Dialogs/OptionPanels/IDEOptions/BuildPanel.cs
   trunk/MonoDevelop/Core/src/Main/Base/Gui/Dialogs/OptionPanels/IDEOptions/CodeGenerationPanel.cs
   trunk/MonoDevelop/Core/src/Main/Base/Gui/Dialogs/OptionPanels/IDEOptions/LoadSavePanel.cs
   trunk/MonoDevelop/Core/src/Main/Base/Gui/Dialogs/OptionPanels/IDEOptions/ProjectAndCombinePanel.cs
   trunk/MonoDevelop/Core/src/Main/Base/Gui/Dialogs/OptionPanels/IDEOptions/SelectStylePanel.cs
   trunk/MonoDevelop/Core/src/Main/Base/Gui/Dialogs/OptionPanels/ProjectOptions/CompileFileProjectOptions.cs
   trunk/MonoDevelop/Core/src/Main/Base/Gui/Dialogs/OptionPanels/ProjectOptions/DeployFileOptions.cs
   trunk/MonoDevelop/Core/src/Main/Base/Gui/Dialogs/OptionPanels/ProjectOptions/GeneralProjectOptions.cs
   trunk/MonoDevelop/Core/src/Main/Base/Gui/Dialogs/ProjectOptionsDialog.cs
   trunk/MonoDevelop/Core/src/Main/Base/Gui/Dialogs/ReferenceDialog/AssemblyReferencePanel.cs
   trunk/MonoDevelop/Core/src/Main/Base/Gui/Dialogs/ReferenceDialog/GacReferencePanel.cs
   trunk/MonoDevelop/Core/src/Main/Base/Gui/Dialogs/ReferenceDialog/ProjectReferencePanel.cs
   trunk/MonoDevelop/Core/src/Main/Base/Gui/Dialogs/SharpDevelopAboutPanels.cs
   trunk/MonoDevelop/Core/src/Main/Base/Gui/Dialogs/TipOfTheDay.cs
   trunk/MonoDevelop/Core/src/Main/Base/Gui/Dialogs/TreeViewOptions.cs
   trunk/MonoDevelop/Core/src/Main/Base/Gui/Dialogs/ViewGPLDialog.cs
   trunk/MonoDevelop/Core/src/Main/Base/Gui/Dialogs/Wizard/StatusPanel.cs
   trunk/MonoDevelop/Core/src/Main/Base/Gui/Dialogs/Wizard/WizardDialog.cs
   trunk/MonoDevelop/Core/src/Main/Base/Gui/Dialogs/WordCountDialog.cs
   trunk/MonoDevelop/Core/src/Main/Base/Gui/ErrorHandlers/GenericError.cs
   trunk/MonoDevelop/Core/src/Main/Base/Gui/Pads/ClassScout/ClassScout.cs
   trunk/MonoDevelop/Core/src/Main/Base/Gui/Pads/ClassScout/NodeBuilder/DefaultDotNetClassScoutNodeBuilder.cs
   trunk/MonoDevelop/Core/src/Main/Base/Gui/Pads/FileScout/FileList.cs
   trunk/MonoDevelop/Core/src/Main/Base/Gui/Pads/FileScout/FileScout.cs
   trunk/MonoDevelop/Core/src/Main/Base/Gui/Pads/HelpBrowser/HelpViewer.cs
   trunk/MonoDevelop/Core/src/Main/Base/Gui/Pads/HelpBrowser/MonodocTreePad.cs
   trunk/MonoDevelop/Core/src/Main/Base/Gui/Pads/OpenTaskView.cs
   trunk/MonoDevelop/Core/src/Main/Base/Gui/Pads/ProjectBrowser/BrowserNode/AbstractBrowserNode.cs
   trunk/MonoDevelop/Core/src/Main/Base/Gui/Pads/ProjectBrowser/BrowserNode/CombineBrowserNode.cs
   trunk/MonoDevelop/Core/src/Main/Base/Gui/Pads/ProjectBrowser/BrowserNode/DirectoryNode.cs
   trunk/MonoDevelop/Core/src/Main/Base/Gui/Pads/ProjectBrowser/BrowserNode/FileNode.cs
   trunk/MonoDevelop/Core/src/Main/Base/Gui/Pads/ProjectBrowser/BrowserNode/ProjectBrowserNode.cs
   trunk/MonoDevelop/Core/src/Main/Base/Gui/Pads/ProjectBrowser/BrowserNode/ReferenceNode.cs
   trunk/MonoDevelop/Core/src/Main/Base/Gui/Pads/ProjectBrowser/NodeBuilder/DefaultDotNetNodeBuilder.cs
   trunk/MonoDevelop/Core/src/Main/Base/Gui/Pads/ProjectBrowser/ProjectBrowserView.cs
   trunk/MonoDevelop/Core/src/Main/Base/Gui/Pads/SideBarView.cs
   trunk/MonoDevelop/Core/src/Main/Base/Gui/PixbufList.cs
   trunk/MonoDevelop/Core/src/Main/Base/Gui/Workbench/DefaultWorkbench.cs
   trunk/MonoDevelop/Core/src/Main/Base/Gui/Workbench/Layouts/SdiWorkspaceLayout.cs
   trunk/MonoDevelop/Core/src/Main/Base/Gui/Workbench/Layouts/SdiWorkspaceWindow.cs
   trunk/MonoDevelop/Core/src/Main/Base/Gui/WorkbenchSingleton.cs
   trunk/MonoDevelop/Core/src/Main/Base/Makefile.am
   trunk/MonoDevelop/Core/src/Main/Base/Services/File/DefaultFileService.cs
   trunk/MonoDevelop/Core/src/Main/Base/Services/IconService.cs
   trunk/MonoDevelop/Core/src/Main/Base/Services/ResourceService.cs
Log:
2004-12-06  Lluis Sanchez Gual  <lluis at novell.com>

	* Services/Runtime.cs: Root class that gives access to all services.
	* Gui/GuiService.cs: Root class that gives access to some gui-related
	services.
	* Services/ClassBrowserIcons/ClassBrowserIconsService.cs: Moved to
	IconService.cs.
	* Services/ResourceService.cs: Format.
	* Services/IconService.cs: Moved here methods from ClassBrowserIcons.
	* Makefile.am: Added new files.
	* *.cs: Removed all calls to ServiceManager.GetService (some files
	are still missing).



Modified: trunk/MonoDevelop/Core/src/Main/Base/ChangeLog
===================================================================
--- trunk/MonoDevelop/Core/src/Main/Base/ChangeLog	2004-12-05 09:39:17 UTC (rev 2052)
+++ trunk/MonoDevelop/Core/src/Main/Base/ChangeLog	2004-12-06 15:43:16 UTC (rev 2053)
@@ -1,3 +1,16 @@
+2004-12-06  Lluis Sanchez Gual  <lluis at novell.com>
+
+	* Services/Runtime.cs: Root class that gives access to all services.
+	* Gui/GuiService.cs: Root class that gives access to some gui-related
+	services.
+	* Services/ClassBrowserIcons/ClassBrowserIconsService.cs: Moved to
+	IconService.cs.
+	* Services/ResourceService.cs: Format.
+	* Services/IconService.cs: Moved here methods from ClassBrowserIcons.
+	* Makefile.am: Added new files.
+	* *.cs: Removed all calls to ServiceManager.GetService (some files
+	are still missing).
+
 2004-12-05  John BouAntoun  <jba-mono at optusnet.com.au>
 
 	* Internal/Project/Combine/Combine.cs: made it work with mono svn head Posix OEE

Modified: trunk/MonoDevelop/Core/src/Main/Base/Commands/AutostartCommands.cs
===================================================================
--- trunk/MonoDevelop/Core/src/Main/Base/Commands/AutostartCommands.cs	2004-12-05 09:39:17 UTC (rev 2052)
+++ trunk/MonoDevelop/Core/src/Main/Base/Commands/AutostartCommands.cs	2004-12-06 15:43:16 UTC (rev 2053)
@@ -38,8 +38,7 @@
 	{
 		public override void Run()
 		{
-			DefaultParserService parserService = (DefaultParserService)ServiceManager.GetService(typeof(DefaultParserService));
-			parserService.StartParserThread();
+			((DefaultParserService)Runtime.ParserService).StartParserThread();
 		}
 	}
 
@@ -50,19 +49,14 @@
 		public override void Run()
 		{
 			// register string tag provider (TODO: move to add-in tree :)
-			StringParserService stringParserService = (StringParserService)ServiceManager.GetService(typeof(StringParserService));
-			stringParserService.RegisterStringTagProvider(new MonoDevelop.Commands.SharpDevelopStringTagProvider());
+			Runtime.StringParserService.RegisterStringTagProvider(new MonoDevelop.Commands.SharpDevelopStringTagProvider());
 			
-			PropertyService propertyService = (PropertyService)ServiceManager.GetService(typeof(PropertyService));
-			
-			IProjectService projectService = (IProjectService)MonoDevelop.Core.Services.ServiceManager.GetService(typeof(IProjectService));
-			
 			// load previous combine
-			if ((bool)propertyService.GetProperty("SharpDevelop.LoadPrevProjectOnStartup", false)) {
+			if ((bool)Runtime.Properties.GetProperty("SharpDevelop.LoadPrevProjectOnStartup", false)) {
 	                        RecentOpen recentOpen = ((IFileService)MonoDevelop.Core.Services.ServiceManager.GetService (typeof (IFileService))).RecentOpen;
 
 				if (recentOpen.RecentProject != null && recentOpen.RecentProject.Length > 0) { 
-					projectService.OpenCombine(recentOpen.RecentProject[0].ToString());
+					Runtime.ProjectService.OpenCombine(recentOpen.RecentProject[0].ToString());
 				}
 			}
 			
@@ -72,7 +66,7 @@
 					case ".CMBX":
 					case ".PRJX":
 						try {
-							projectService.OpenCombine(file);
+							Runtime.ProjectService.OpenCombine (file);
 						} catch (Exception e) {
 							CombineLoadError.HandleError(e, file);
 						}
@@ -80,8 +74,7 @@
 						break;
 					default:
 						try {
-							IFileService fileService = (IFileService)MonoDevelop.Core.Services.ServiceManager.GetService(typeof(IFileService));
-							fileService.OpenFile(file);
+							Runtime.FileService.OpenFile (file);
 						
 						} catch (Exception e) {
 							Console.WriteLine("unable to open file {0} exception was :\n{1}", file, e.ToString());
@@ -91,7 +84,7 @@
 			}
 			
 			((Gtk.Window)WorkbenchSingleton.Workbench).ShowAll ();
-			WorkbenchSingleton.Workbench.SetMemento ((IXmlConvertable)propertyService.GetProperty (workbenchMemento, new WorkbenchMemento ()));
+			WorkbenchSingleton.Workbench.SetMemento ((IXmlConvertable)Runtime.Properties.GetProperty (workbenchMemento, new WorkbenchMemento ()));
 			((Gtk.Window)WorkbenchSingleton.Workbench).Visible = true;
 			WorkbenchSingleton.Workbench.RedrawAllComponents ();
 			((Gtk.Window)WorkbenchSingleton.Workbench).Present ();

Modified: trunk/MonoDevelop/Core/src/Main/Base/Commands/ClassBrowserCommands/ClassBrowserCommands.cs
===================================================================
--- trunk/MonoDevelop/Core/src/Main/Base/Commands/ClassBrowserCommands/ClassBrowserCommands.cs	2004-12-05 09:39:17 UTC (rev 2052)
+++ trunk/MonoDevelop/Core/src/Main/Base/Commands/ClassBrowserCommands/ClassBrowserCommands.cs	2004-12-06 15:43:16 UTC (rev 2053)
@@ -40,8 +40,7 @@
 			AbstractClassScoutNode node = browser.SelectedNode as AbstractClassScoutNode;
 			
 			if (node != null) {
-				IMessageService messageService =(IMessageService)ServiceManager.GetService(typeof(IMessageService));
-				messageService.ShowWarning(GettextCatalog.GetString ("Not implemented"));
+				Runtime.MessageService.ShowWarning(GettextCatalog.GetString ("Not implemented"));
 			}
 		}
 	}

Modified: trunk/MonoDevelop/Core/src/Main/Base/Commands/CustomStringTagProvider.cs
===================================================================
--- trunk/MonoDevelop/Core/src/Main/Base/Commands/CustomStringTagProvider.cs	2004-12-05 09:39:17 UTC (rev 2052)
+++ trunk/MonoDevelop/Core/src/Main/Base/Commands/CustomStringTagProvider.cs	2004-12-06 15:43:16 UTC (rev 2053)
@@ -28,7 +28,7 @@
 {
 	public class SharpDevelopStringTagProvider :  IStringTagProvider 
 	{
-		IProjectService projectService = (IProjectService)MonoDevelop.Core.Services.ServiceManager.GetService(typeof(IProjectService));
+		IProjectService projectService = Runtime.ProjectService;
 		
 		public string[] Tags {
 			get {

Modified: trunk/MonoDevelop/Core/src/Main/Base/Commands/FileCommands.cs
===================================================================
--- trunk/MonoDevelop/Core/src/Main/Base/Commands/FileCommands.cs	2004-12-05 09:39:17 UTC (rev 2052)
+++ trunk/MonoDevelop/Core/src/Main/Base/Commands/FileCommands.cs	2004-12-06 15:43:16 UTC (rev 2053)
@@ -50,8 +50,6 @@
 
 	public class SaveFile : AbstractMenuCommand
 	{
-		static PropertyService PropertyService = (PropertyService)ServiceManager.GetService (typeof (PropertyService));
-		
 		public override void Run()
 		{
 			IWorkbenchWindow window = WorkbenchSingleton.Workbench.ActiveWorkbenchWindow;
@@ -75,15 +73,13 @@
 						SaveFileAs sfa = new SaveFileAs();
 						sfa.Run();
 					} else {						
-						IProjectService projectService = (IProjectService)MonoDevelop.Core.Services.ServiceManager.GetService(typeof(IProjectService));
-						FileUtilityService fileUtilityService = (FileUtilityService)ServiceManager.GetService(typeof(FileUtilityService));
-						projectService.MarkFileDirty(window.ViewContent.ContentName);
+						Runtime.ProjectService.MarkFileDirty(window.ViewContent.ContentName);
 						string fileName = window.ViewContent.ContentName;
 						// save backup first						
-						if((bool) PropertyService.GetProperty ("SharpDevelop.CreateBackupCopy", false)) {
-							fileUtilityService.ObservedSave(new NamedFileOperationDelegate(window.ViewContent.Save), fileName + "~");
+						if((bool) Runtime.Properties.GetProperty ("SharpDevelop.CreateBackupCopy", false)) {
+							Runtime.FileUtilityService.ObservedSave (new NamedFileOperationDelegate(window.ViewContent.Save), fileName + "~");
 						}
-						fileUtilityService.ObservedSave(new NamedFileOperationDelegate(window.ViewContent.Save), fileName);
+						Runtime.FileUtilityService.ObservedSave (new NamedFileOperationDelegate(window.ViewContent.Save), fileName);
 					}
 				}
 			}
@@ -108,8 +104,7 @@
 			IWorkbenchWindow window = WorkbenchSingleton.Workbench.ActiveWorkbenchWindow;
 			
 			if (window != null && window.ViewContent.ContentName != null && !window.ViewContent.IsViewOnly) {
-				IMessageService messageService =(IMessageService)ServiceManager.GetService(typeof(IMessageService));
-				if (messageService.AskQuestion(GettextCatalog.GetString ("Are you sure that you want to reload the file?"))) {
+				if (Runtime.MessageService.AskQuestion(GettextCatalog.GetString ("Are you sure that you want to reload the file?"))) {
 					IXmlConvertable memento = null;
 					if (window.ViewContent is IMementoCapable) {
 						memento = ((IMementoCapable)window.ViewContent).CreateMemento();
@@ -125,8 +120,6 @@
 	
 	public class SaveFileAs : AbstractMenuCommand
 	{
-		static PropertyService PropertyService = (PropertyService)ServiceManager.GetService (typeof (PropertyService));
-		
 		public override void Run()
 		{
 			IWorkbenchWindow window = WorkbenchSingleton.Workbench.ActiveWorkbenchWindow;
@@ -160,22 +153,19 @@
 					fdiag.Hide ();
 				
 					if (response == (int)Gtk.ResponseType.Ok) {
-						IFileService fileService = (IFileService)MonoDevelop.Core.Services.ServiceManager.GetService(typeof(IFileService));
-						FileUtilityService fileUtilityService = (FileUtilityService)ServiceManager.GetService(typeof(FileUtilityService));
-						if (!fileUtilityService.IsValidFileName(filename)) {
-							IMessageService messageService =(IMessageService)ServiceManager.GetService(typeof(IMessageService));
-							messageService.ShowMessage(String.Format (GettextCatalog.GetString ("File name {0} is invalid"), filename));
+						if (!Runtime.FileUtilityService.IsValidFileName (filename)) {
+							Runtime.MessageService.ShowMessage(String.Format (GettextCatalog.GetString ("File name {0} is invalid"), filename));
 							return;
 						}
 
 					// save backup first
-					if((bool) PropertyService.GetProperty ("SharpDevelop.CreateBackupCopy", false)) {
-						fileUtilityService.ObservedSave(new NamedFileOperationDelegate(window.ViewContent.Save), filename + "~");
+					if((bool) Runtime.Properties.GetProperty ("SharpDevelop.CreateBackupCopy", false)) {
+						Runtime.FileUtilityService.ObservedSave (new NamedFileOperationDelegate(window.ViewContent.Save), filename + "~");
 					}
 					
 					// do actual save
-					if (fileUtilityService.ObservedSave(new NamedFileOperationDelegate(window.ViewContent.Save), filename) == FileOperationResult.OK) {
-						fileService.RecentOpen.AddLastFile (filename, null);
+					if (Runtime.FileUtilityService.ObservedSave (new NamedFileOperationDelegate(window.ViewContent.Save), filename) == FileOperationResult.OK) {
+						Runtime.FileService.RecentOpen.AddLastFile (filename, null);
 					}
 				}
 			}
@@ -186,8 +176,6 @@
 	{
 		public override void Run()
 		{
-			FileUtilityService fileUtilityService = (FileUtilityService)ServiceManager.GetService(typeof(FileUtilityService));
-			
 			foreach (IViewContent content in WorkbenchSingleton.Workbench.ViewContentCollection) {
 				if (content.IsViewOnly) {
 					continue;
@@ -208,10 +196,9 @@
 								fileName = Path.ChangeExtension(fileName, "");
 							}
 
-							if (fileUtilityService.ObservedSave(new NamedFileOperationDelegate(content.Save), fileName) == FileOperationResult.OK)
+							if (Runtime.FileUtilityService.ObservedSave (new NamedFileOperationDelegate(content.Save), fileName) == FileOperationResult.OK)
 							{
-								IMessageService messageService =(IMessageService)ServiceManager.GetService(typeof(IMessageService));
-								messageService.ShowMessage(fileName, GettextCatalog.GetString ("File saved"));
+								Runtime.MessageService.ShowMessage(fileName, GettextCatalog.GetString ("File saved"));
 							}
 						}
 					
@@ -220,7 +207,7 @@
 				}
 				else
 				{
-					fileUtilityService.ObservedSave(new FileOperationDelegate(content.Save), content.ContentName);
+					Runtime.FileUtilityService.ObservedSave (new FileOperationDelegate(content.Save), content.ContentName);
 				}
 			}
 		}
@@ -228,8 +215,6 @@
 	
 	public class OpenCombine : AbstractMenuCommand
 	{
-		static PropertyService PropertyService = (PropertyService)ServiceManager.GetService (typeof (PropertyService));
-		
 		public override void Run()
 		{
 			using (FileSelector fs = new FileSelector (GettextCatalog.GetString ("File to Open"))) {
@@ -241,19 +226,15 @@
 					switch (Path.GetExtension(name).ToUpper()) {
 						case ".CMBX": // Don't forget the 'recent' projects if you chance something here
 						case ".PRJX":
-							IProjectService projectService = (IProjectService)MonoDevelop.Core.Services.ServiceManager.GetService(typeof(IProjectService));
-							
 							try {
-								//projectService.OpenCombine(name);
-								IFileService fileService = (IFileService)MonoDevelop.Core.Services.ServiceManager.GetService(typeof(IFileService));
-								fileService.OpenFile(name);
+								//Runtime.ProjectService.OpenCombine(name);
+								Runtime.FileService.OpenFile(name);
 							} catch (Exception ex) {
 								CombineLoadError.HandleError(ex, name);
 							}
 							break;
 						default:
-							IMessageService messageService =(IMessageService)ServiceManager.GetService(typeof(IMessageService));
-							messageService.ShowError(String.Format (GettextCatalog.GetString ("Can't open file {0} as project"), name));
+							Runtime.MessageService.ShowError(String.Format (GettextCatalog.GetString ("Can't open file {0} as project"), name));
 							break;
 					}
 				}
@@ -263,8 +244,6 @@
 	
 	public class OpenFile : AbstractMenuCommand
 	{
-		static PropertyService PropertyService = (PropertyService)ServiceManager.GetService (typeof (PropertyService));
-		
 		public override void Run()
 		{
 			//string[] fileFilters  = (string[])(AddInTreeSingleton.AddInTree.GetTreeNode("/SharpDevelop/Workbench/FileFilter").BuildChildItems(this)).ToArray(typeof(string));
@@ -302,15 +281,13 @@
 				string name = fs.Filename;
 				fs.Hide ();
 				if (response == (int)Gtk.ResponseType.Ok) {
-					IFileService fileService = (IFileService)MonoDevelop.Core.Services.ServiceManager.GetService(typeof(IFileService));
-					IProjectService proj = (IProjectService)ServiceManager.GetService (typeof (IProjectService));
 					switch (System.IO.Path.GetExtension (name).ToUpper()) {
 					case ".PRJX":
 					case ".CMBX":
-						proj.OpenCombine (name);
+						Runtime.ProjectService.OpenCombine (name);
 						break;
 					default:
-						fileService.OpenFile(name);
+						Runtime.FileService.OpenFile(name);
 						break;
 					}
 				}	
@@ -322,9 +299,7 @@
 	{
 		public override void Run()
 		{
-			IProjectService projectService = (IProjectService)MonoDevelop.Core.Services.ServiceManager.GetService(typeof(IProjectService));
-			
-			projectService.CloseCombine();
+			Runtime.ProjectService.CloseCombine();
 		}
 	}
 		
@@ -400,12 +375,9 @@
 		public override void Run()
 		{			
 			try {
-				IFileService fileService = (IFileService)MonoDevelop.Core.Services.ServiceManager.GetService(typeof(IFileService));
-				IMessageService messageService = (IMessageService) MonoDevelop.Core.Services.ServiceManager.GetService(typeof(IMessageService));
-				
-				if (fileService.RecentOpen.RecentFile != null && fileService.RecentOpen.RecentFile.Length > 0 && messageService.AskQuestion(GettextCatalog.GetString ("Are you sure you want to clear recent files list?"), GettextCatalog.GetString ("Clear recent files")))
+				if (Runtime.FileService.RecentOpen.RecentFile != null && Runtime.FileService.RecentOpen.RecentFile.Length > 0 && Runtime.MessageService.AskQuestion(GettextCatalog.GetString ("Are you sure you want to clear recent files list?"), GettextCatalog.GetString ("Clear recent files")))
 				{
-					fileService.RecentOpen.ClearRecentFiles();
+					Runtime.FileService.RecentOpen.ClearRecentFiles();
 				}
 			} catch {}
 		}
@@ -416,12 +388,9 @@
 		public override void Run()
 		{			
 			try {
-				IFileService fileService = (IFileService)MonoDevelop.Core.Services.ServiceManager.GetService(typeof(IFileService));
-				IMessageService messageService = (IMessageService) MonoDevelop.Core.Services.ServiceManager.GetService(typeof(IMessageService));
-				
-				if (fileService.RecentOpen.RecentProject != null && fileService.RecentOpen.RecentProject.Length > 0 && messageService.AskQuestion(GettextCatalog.GetString ("Are you sure you want to clear recent projects list?"), GettextCatalog.GetString ("Clear recent projects")))
+				if (Runtime.FileService.RecentOpen.RecentProject != null && Runtime.FileService.RecentOpen.RecentProject.Length > 0 && Runtime.MessageService.AskQuestion(GettextCatalog.GetString ("Are you sure you want to clear recent projects list?"), GettextCatalog.GetString ("Clear recent projects")))
 				{
-					fileService.RecentOpen.ClearRecentProjects();
+					Runtime.FileService.RecentOpen.ClearRecentProjects();
 				}
 			} catch {}
 		}

Modified: trunk/MonoDevelop/Core/src/Main/Base/Commands/HelpCommands.cs
===================================================================
--- trunk/MonoDevelop/Core/src/Main/Base/Commands/HelpCommands.cs	2004-12-05 09:39:17 UTC (rev 2052)
+++ trunk/MonoDevelop/Core/src/Main/Base/Commands/HelpCommands.cs	2004-12-06 15:43:16 UTC (rev 2053)
@@ -24,8 +24,7 @@
 	{
 		public override void Run()
 		{
-			FileUtilityService fileUtilityService = (FileUtilityService)ServiceManager.GetService(typeof(FileUtilityService));
-			string fileName = fileUtilityService.SharpDevelopRootPath + 
+			string fileName = Runtime.FileUtilityService.SharpDevelopRootPath + 
 			              Path.DirectorySeparatorChar + "doc" +
 			              Path.DirectorySeparatorChar + "help" +
 			              Path.DirectorySeparatorChar + "sharpdevelop.chm";
@@ -54,8 +53,7 @@
 		
 		public override void Run()
 		{
-			IFileService fileService = (IFileService)MonoDevelop.Core.Services.ServiceManager.GetService(typeof(IFileService));
-			fileService.OpenFile(site);
+			Runtime.FileService.OpenFile (site);
 		}
 	}
 	
@@ -71,13 +69,11 @@
 		
 		public override void Run()
 		{
-			FileUtilityService fileUtilityService = (FileUtilityService)ServiceManager.GetService(typeof(FileUtilityService));
-			string file = site.StartsWith("home://") ? fileUtilityService.GetDirectoryNameWithSeparator(fileUtilityService.SharpDevelopRootPath) + "bin" + Path.DirectorySeparatorChar + site.Substring(7).Replace('/', Path.DirectorySeparatorChar) : site;
+			string file = site.StartsWith("home://") ? Runtime.FileUtilityService.GetDirectoryNameWithSeparator (Runtime.FileUtilityService.SharpDevelopRootPath) + "bin" + Path.DirectorySeparatorChar + site.Substring(7).Replace('/', Path.DirectorySeparatorChar) : site;
 			try {
 				Process.Start(file);
 			} catch (Exception) {
-				IMessageService messageService =(IMessageService)ServiceManager.GetService(typeof(IMessageService));
-				messageService.ShowError(String.Format (GettextCatalog.GetString ("Can not execute or view {0}\n Please check that the file exists and that you can open this file."), file));
+				Runtime.MessageService.ShowError(String.Format (GettextCatalog.GetString ("Can not execute or view {0}\n Please check that the file exists and that you can open this file."), file));
 			}
 		}
 	}

Modified: trunk/MonoDevelop/Core/src/Main/Base/Commands/MenuItemBuilders.cs
===================================================================
--- trunk/MonoDevelop/Core/src/Main/Base/Commands/MenuItemBuilders.cs	2004-12-05 09:39:17 UTC (rev 2052)
+++ trunk/MonoDevelop/Core/src/Main/Base/Commands/MenuItemBuilders.cs	2004-12-06 15:43:16 UTC (rev 2053)
@@ -46,11 +46,8 @@
 		
 		public Gtk.MenuItem[] BuildSubmenu(ConditionCollection conditionCollection, object owner)
 		{
-			IFileService fileService = (IFileService)MonoDevelop.Core.Services.ServiceManager.GetService(typeof(IFileService));
-			StringParserService stringParserService = (StringParserService)ServiceManager.GetService(typeof(StringParserService));
+			RecentOpen recentOpen = Runtime.FileService.RecentOpen;
 			
-			RecentOpen recentOpen = fileService.RecentOpen;
-			
 			if (recentOpen.RecentFile != null && recentOpen.RecentFile.Length > 0) {
 				RFMItem[] items = new RFMItem[recentOpen.RecentFile.Length];
 				
@@ -73,8 +70,7 @@
 		void LoadRecentFile(object sender, EventArgs e)
 		{
 			SdMenuCommand item = (SdMenuCommand)sender;
-			IFileService fileService = (IFileService)MonoDevelop.Core.Services.ServiceManager.GetService(typeof(IFileService));
-			fileService.OpenFile(item.Tag.ToString());
+			Runtime.FileService.OpenFile (item.Tag.ToString());
 		}
 	}
 	
@@ -89,11 +85,8 @@
 		
 		public Gtk.MenuItem[] BuildSubmenu(ConditionCollection conditionCollection, object owner)
 		{
-			IFileService fileService = (IFileService)MonoDevelop.Core.Services.ServiceManager.GetService(typeof(IFileService));
-			StringParserService stringParserService = (StringParserService)ServiceManager.GetService(typeof(StringParserService));
+			RecentOpen recentOpen = Runtime.FileService.RecentOpen;
 			
-			RecentOpen recentOpen = fileService.RecentOpen;
-			
 			if (recentOpen.RecentProject != null && recentOpen.RecentProject.Length > 0) {
 				RPMItem[] items = new RPMItem[recentOpen.RecentProject.Length];
 				for (int i = 0; i < recentOpen.RecentProject.Length; ++i) {
@@ -115,14 +108,13 @@
 		void LoadRecentProject(object sender, EventArgs e)
 		{
 			SdMenuCommand item = (SdMenuCommand)sender;
-			IProjectService projectService = (IProjectService)MonoDevelop.Core.Services.ServiceManager.GetService(typeof(IProjectService));
 			
 			//FIXME:THIS IS BROKEN!!
 			
 			string filename = item.Tag.ToString();
 			
 			try {
-				projectService.OpenCombine(filename);
+				Runtime.ProjectService.OpenCombine(filename);
 			} catch (Exception ex) {
 				CombineLoadError.HandleError(ex, filename);
 			}
@@ -151,10 +143,7 @@
 		void ToolEvt(object sender, EventArgs e)
 		{
 			SdMenuCommand item = (SdMenuCommand)sender;
-			IProjectService projectService = (IProjectService)MonoDevelop.Core.Services.ServiceManager.GetService(typeof(IProjectService));
-			StringParserService stringParserService = (StringParserService)ServiceManager.GetService(typeof(StringParserService));
-			FileUtilityService fileUtilityService = (FileUtilityService)ServiceManager.GetService(typeof(FileUtilityService));
-			MessageService messageService =(MessageService)ServiceManager.GetService(typeof(MessageService));
+			StringParserService stringParserService = Runtime.StringParserService;
 			
 			for (int i = 0; i < ToolLoader.Tool.Count; ++i) {
 				if (item.Text == ToolLoader.Tool[i].ToString()) {
@@ -166,7 +155,7 @@
 					string args = stringParserService.Parse(tool.Arguments);
 					// prompt for args if needed
 					if (tool.PromptForArguments) {
-						args = messageService.GetTextResponse(String.Format (GettextCatalog.GetString ("Enter any arguments you want to use while launching tool, {0}:"), tool.MenuCommand), String.Format (GettextCatalog.GetString ("Command Arguments for {0}"), tool.MenuCommand), args);
+						args = Runtime.MessageService.GetTextResponse(String.Format (GettextCatalog.GetString ("Enter any arguments you want to use while launching tool, {0}:"), tool.MenuCommand), String.Format (GettextCatalog.GetString ("Command Arguments for {0}"), tool.MenuCommand), args);
 							
 						// if user selected cancel string will be null
 						if (args == null) {
@@ -193,7 +182,8 @@
 						// FIXME: need to find a way to wire the console output into the output window if specified
 						Process.Start(startinfo);
 						
-					} catch (Exception ex) {								messageService.ShowError(ex, String.Format (GettextCatalog.GetString ("External program execution failed.\nError while starting:\n '{0} {1}'"), command, args));
+					} catch (Exception ex) {
+						Runtime.MessageService.ShowError(ex, String.Format (GettextCatalog.GetString ("External program execution failed.\nError while starting:\n '{0} {1}'"), command, args));
 					}
 					break;
 				}
@@ -321,8 +311,7 @@
 					finfo.BuildAction = BuildAction.Compile;
 				}
 			}
-			IProjectService projectService = (IProjectService)MonoDevelop.Core.Services.ServiceManager.GetService(typeof(IProjectService));
-			projectService.SaveCombine();
+			Runtime.ProjectService.SaveCombine();
 		}
 		
 		void ChangeDeployInclude(object sender, EventArgs e)
@@ -341,8 +330,7 @@
 					node.Project.DeployInformation.AddExcludedFile(finfo.Name);
 				}
 			}
-			IProjectService projectService = (IProjectService)MonoDevelop.Core.Services.ServiceManager.GetService(typeof(IProjectService));
-			projectService.SaveCombine();
+			Runtime.ProjectService.SaveCombine();
 		}
 	}
 	

Modified: trunk/MonoDevelop/Core/src/Main/Base/Commands/ProjectBrowserCommands/CombineNodeCommands.cs
===================================================================
--- trunk/MonoDevelop/Core/src/Main/Base/Commands/ProjectBrowserCommands/CombineNodeCommands.cs	2004-12-05 09:39:17 UTC (rev 2052)
+++ trunk/MonoDevelop/Core/src/Main/Base/Commands/ProjectBrowserCommands/CombineNodeCommands.cs	2004-12-06 15:43:16 UTC (rev 2053)
@@ -33,15 +33,11 @@
 		NewProjectDialog npdlg;
 		ProjectBrowserView browser;
 		CombineBrowserNode node;
-		MessageService msg;
-		IProjectService projectService;
 
 		public override void Run()
 		{
-			projectService = (IProjectService)ServiceManager.GetService(typeof(IProjectService));
 			browser     = (ProjectBrowserView)Owner;
 			node        = browser.SelectedNode as CombineBrowserNode;
-			msg             = (MessageService)ServiceManager.GetService (typeof (MessageService));
 			
 			if (node != null) {
 				npdlg = new NewProjectDialog(false);
@@ -54,13 +50,13 @@
 			try 
 			{
 				int newNodeIndex = node.Nodes.Add(ProjectBrowserView.BuildProjectTreeNode((IProject)node.Combine.AddEntry(npdlg.NewProjectLocation)));
-				projectService.SaveCombine();
+				Runtime.ProjectService.SaveCombine ();
 			// expand to the new node
 				node.Nodes[newNodeIndex].Expand();
 			}
 			catch
 			{
-				msg.ShowError (GettextCatalog.GetString ("Invalid Project File"));
+				Runtime.MessageService.ShowError (GettextCatalog.GetString ("Invalid Project File"));
 			}
 			npdlg = null;
 		}	
@@ -68,18 +64,14 @@
 		
 	public class AddNewCombineToCombine : AbstractMenuCommand
 	{
-		IProjectService projectService;
 		ProjectBrowserView browser;
 		CombineBrowserNode node;
-		MessageService msg;
 		NewProjectDialog npdlg;
 
 		public override void Run()
 		{
-			projectService = (IProjectService)MonoDevelop.Core.Services.ServiceManager.GetService(typeof(IProjectService));
 			browser = (ProjectBrowserView)Owner;
 			node    = browser.SelectedNode as CombineBrowserNode;
-			msg         = (MessageService)ServiceManager.GetService (typeof (MessageService));
 			
 			if (node != null) {
 				npdlg = new NewProjectDialog(false);
@@ -92,14 +84,14 @@
 			try 
 			{
 				int newNodeIndex = node.Nodes.Add(ProjectBrowserView.BuildCombineTreeNode((Combine)node.Combine.AddEntry(npdlg.NewCombineLocation)));
-				projectService.SaveCombine();
+				Runtime.ProjectService.SaveCombine ();
 				
 				// expand to the new node
 				node.Nodes[newNodeIndex].Expand();
 			}
 			catch
 			{
-				msg.ShowError (GettextCatalog.GetString ("Invalid Solution File"));
+				Runtime.MessageService.ShowError (GettextCatalog.GetString ("Invalid Solution File"));
 			}
 			npdlg = null;
 		}
@@ -109,7 +101,6 @@
 	{
 		public override void Run()
 		{
-			IProjectService projectService = (IProjectService)MonoDevelop.Core.Services.ServiceManager.GetService(typeof(IProjectService));
 			ProjectBrowserView browser = (ProjectBrowserView)Owner;
 			CombineBrowserNode node    = browser.SelectedNode as CombineBrowserNode;
 			PropertyService propertyService = (PropertyService)ServiceManager.GetService (typeof (PropertyService));
@@ -127,7 +118,7 @@
 							} else {
 								newNodeIndex = node.Nodes.Add(ProjectBrowserView.BuildCombineTreeNode((Combine)obj));
 							}
-							projectService.SaveCombine();
+							Runtime.ProjectService.SaveCombine ();
 						
 							if (newNodeIndex > -1) {
 								// expand to the new node
@@ -136,7 +127,7 @@
 						}
 						catch 
 						{
-							((MessageService)ServiceManager.GetService (typeof (MessageService))).ShowError (GettextCatalog.GetString ("Invalid Project File"));
+							Runtime.MessageService.ShowError (GettextCatalog.GetString ("Invalid Project File"));
 						}
 					}
 
@@ -150,7 +141,6 @@
 	{
 		public override void Run()
 		{
-			IProjectService projectService = (IProjectService)MonoDevelop.Core.Services.ServiceManager.GetService(typeof(IProjectService));
 			ProjectBrowserView browser = (ProjectBrowserView)Owner;
 			CombineBrowserNode node    = browser.SelectedNode as CombineBrowserNode;
 			PropertyService propertyService = (PropertyService)ServiceManager.GetService (typeof (PropertyService));
@@ -169,7 +159,7 @@
 							} else {
 								newNodeIndex = node.Nodes.Add(ProjectBrowserView.BuildCombineTreeNode((Combine)obj));
 							}
-							projectService.SaveCombine();
+							Runtime.ProjectService.SaveCombine ();
 							
 							if (newNodeIndex > -1) {
 								// expand to the new node
@@ -178,7 +168,7 @@
 						}
 						catch 
 						{
-							((MessageService)ServiceManager.GetService (typeof (MessageService))).ShowError (GettextCatalog.GetString ("Invalid Solution File"));
+							Runtime.MessageService.ShowError (GettextCatalog.GetString ("Invalid Solution File"));
 						}
 					}
 
@@ -192,7 +182,6 @@
 	{
 		public override void Run()
 		{
-			IProjectService projectService = (IProjectService)MonoDevelop.Core.Services.ServiceManager.GetService(typeof(IProjectService));
 			ProjectBrowserView browser = (ProjectBrowserView)Owner;
 			CombineBrowserNode node    = browser.SelectedNode as CombineBrowserNode;
 			
@@ -207,7 +196,7 @@
 			//		optionsDialog.TransientFor = (Gtk.Window)WorkbenchSingleton.Workbench;
 					optionsDialog.Run ();
 			//		optionsDialog.Hide ();
-					projectService.SaveCombine();
+					Runtime.ProjectService.SaveCombine ();
 				}
 			}
 	}

Modified: trunk/MonoDevelop/Core/src/Main/Base/Commands/ProjectBrowserCommands/FolderNodeCommands.cs
===================================================================
--- trunk/MonoDevelop/Core/src/Main/Base/Commands/ProjectBrowserCommands/FolderNodeCommands.cs	2004-12-05 09:39:17 UTC (rev 2052)
+++ trunk/MonoDevelop/Core/src/Main/Base/Commands/ProjectBrowserCommands/FolderNodeCommands.cs	2004-12-06 15:43:16 UTC (rev 2053)
@@ -77,7 +77,7 @@
 								}
 								catch 
 								{
-									((MessageService)ServiceManager.GetService (typeof (MessageService))).ShowError (GettextCatalog.GetString ("An error occurred while attempt to move/copy that file. Please check your permissions."));
+									Runtime.MessageService.ShowError (GettextCatalog.GetString ("An error occurred while attempt to move/copy that file. Please check your permissions."));
 								}
 							}
 						}
@@ -123,13 +123,12 @@
 			string extension = Path.GetExtension(window.ViewContent.UntitledName);
 				
 			// first try the default untitled name of the viewcontent filename
-			FileUtilityService fileUtilityService = (FileUtilityService)ServiceManager.GetService(typeof(FileUtilityService));
-			string fileName = fileUtilityService.GetDirectoryNameWithSeparator(baseFolderPath) + baseName +  extension;
+			string fileName = Runtime.FileUtilityService.GetDirectoryNameWithSeparator(baseFolderPath) + baseName +  extension;
 				
 			// if it is already in the project, or it does exists we try to get a name that is
 			// untitledName + Numer + extension
 			while (node.Project.IsFileInProject(fileName) || System.IO.File.Exists(fileName)) {
-				fileName = fileUtilityService.GetDirectoryNameWithSeparator(baseFolderPath) + baseName + count.ToString() + extension;
+				fileName = Runtime.FileUtilityService.GetDirectoryNameWithSeparator(baseFolderPath) + baseName + count.ToString() + extension;
 				++count;
 			}
 				
@@ -157,8 +156,7 @@
 			browser.SelectedNode = newNode;
 			browser.StartLabelEdit();
 				
-			IProjectService projectService = (IProjectService)MonoDevelop.Core.Services.ServiceManager.GetService(typeof(IProjectService));
-			projectService.SaveCombine();
+			Runtime.ProjectService.SaveCombine();
 			
 		}
 	}
@@ -190,9 +188,7 @@
 			string baseFolderPath = SearchBasePath(selectedNode);
 			
 			if (baseFolderPath != null && baseFolderPath.Length > 0) {
-				FileUtilityService fileUtilityService = (FileUtilityService)ServiceManager.GetService(typeof(FileUtilityService));
-				
-				string directoryName = fileUtilityService.GetDirectoryNameWithSeparator(baseFolderPath) + GettextCatalog.GetString("New Folder");
+				string directoryName = Runtime.FileUtilityService.GetDirectoryNameWithSeparator(baseFolderPath) + GettextCatalog.GetString("New Folder");
 				int    index         = -1;
 				
 				if (Directory.Exists(directoryName)) {

Modified: trunk/MonoDevelop/Core/src/Main/Base/Commands/ProjectBrowserCommands/GeneralNodeCommands.cs
===================================================================
--- trunk/MonoDevelop/Core/src/Main/Base/Commands/ProjectBrowserCommands/GeneralNodeCommands.cs	2004-12-05 09:39:17 UTC (rev 2052)
+++ trunk/MonoDevelop/Core/src/Main/Base/Commands/ProjectBrowserCommands/GeneralNodeCommands.cs	2004-12-06 15:43:16 UTC (rev 2053)
@@ -33,7 +33,6 @@
 		{
 			ProjectBrowserView  browser = (ProjectBrowserView)Owner;
 			AbstractBrowserNode node    = browser.SelectedNode as AbstractBrowserNode;
-			IProjectService projectService = (IProjectService)MonoDevelop.Core.Services.ServiceManager.GetService(typeof(IProjectService));
 			
 			if (node.IsEditing) { // TODO : throw remove key to the browser component.
 				return;
@@ -42,7 +41,7 @@
 			if (node != null && node.Parent != null) {
 				if (node.RemoveNode()) {
 					node.Parent.Nodes.Remove(node);
-					projectService.SaveCombine();
+					Runtime.ProjectService.SaveCombine();
 				}
 			}
 		}

Modified: trunk/MonoDevelop/Core/src/Main/Base/Commands/ProjectBrowserCommands/ProjectNodeCommands.cs
===================================================================
--- trunk/MonoDevelop/Core/src/Main/Base/Commands/ProjectBrowserCommands/ProjectNodeCommands.cs	2004-12-05 09:39:17 UTC (rev 2052)
+++ trunk/MonoDevelop/Core/src/Main/Base/Commands/ProjectBrowserCommands/ProjectNodeCommands.cs	2004-12-06 15:43:16 UTC (rev 2053)
@@ -37,8 +37,7 @@
 				Combine combine                = node.Combine;
 				combine.SingleStartProjectName = node.Project.Name;
 				combine.SingleStartupProject   = true;
-				IProjectService projectService = (IProjectService)MonoDevelop.Core.Services.ServiceManager.GetService(typeof(IProjectService));
-				projectService.SaveCombine();
+				Runtime.ProjectService.SaveCombine();
 			}
 		}
 	}

Modified: trunk/MonoDevelop/Core/src/Main/Base/Commands/ProjectBrowserCommands/ReferenceFolderNodeCommands.cs
===================================================================
--- trunk/MonoDevelop/Core/src/Main/Base/Commands/ProjectBrowserCommands/ReferenceFolderNodeCommands.cs	2004-12-05 09:39:17 UTC (rev 2052)
+++ trunk/MonoDevelop/Core/src/Main/Base/Commands/ProjectBrowserCommands/ReferenceFolderNodeCommands.cs	2004-12-06 15:43:16 UTC (rev 2053)
@@ -47,8 +47,7 @@
 					}
 					
 					DefaultDotNetNodeBuilder.InitializeReferences(node, project);
-					IProjectService projectService = (IProjectService)MonoDevelop.Core.Services.ServiceManager.GetService(typeof(IProjectService));
-					projectService.SaveCombine();
+					Runtime.ProjectService.SaveCombine();
 				}
 				selDialog.Hide ();
 			}
@@ -85,9 +84,6 @@
 			
 			if (node != null) {
 				IProject project = ((ProjectBrowserNode)node.Parent).Project;
-				FileUtilityService fileUtilityService = (FileUtilityService)ServiceManager.GetService(typeof(FileUtilityService));
-				IProjectService projectService = (IProjectService)MonoDevelop.Core.Services.ServiceManager.GetService(typeof(IProjectService));
-				IParserService parserService = (IParserService)MonoDevelop.Core.Services.ServiceManager.GetService(typeof(IParserService));					
 			
 /*				using (AddWebReferenceDialog refDialog = new AddWebReferenceDialog(project)) {
 					if (refDialog.ShowDialog() == DialogResult.OK) {						

Modified: trunk/MonoDevelop/Core/src/Main/Base/Commands/ProjectBrowserCommands/ResourceFolderNodeCommands.cs
===================================================================
--- trunk/MonoDevelop/Core/src/Main/Base/Commands/ProjectBrowserCommands/ResourceFolderNodeCommands.cs	2004-12-05 09:39:17 UTC (rev 2052)
+++ trunk/MonoDevelop/Core/src/Main/Base/Commands/ProjectBrowserCommands/ResourceFolderNodeCommands.cs	2004-12-06 15:43:16 UTC (rev 2053)
@@ -57,15 +57,13 @@
 				
 					foreach (string file in files) {
 						if (!System.IO.File.Exists (file)) {
-							IMessageService messageService = (IMessageService) ServiceManager.GetService (typeof (IMessageService));
-							messageService.ShowError (String.Format (GettextCatalog.GetString ("Resource file '{0}' does not exist"), file));
+							Runtime.MessageService.ShowError (String.Format (GettextCatalog.GetString ("Resource file '{0}' does not exist"), file));
 							goto show_dialog;
 						}
 					}
 				
-					IProjectService projectService = (IProjectService)MonoDevelop.Core.Services.ServiceManager.GetService(typeof(IProjectService));
 					foreach (string fileName in files) {
-						ProjectFile fileInformation = projectService.AddFileToProject(project, fileName, BuildAction.EmbedAsResource);
+						ProjectFile fileInformation = Runtime.ProjectService.AddFileToProject(project, fileName, BuildAction.EmbedAsResource);
 					
 						AbstractBrowserNode newResNode = new FileNode(fileInformation);
 						newResNode.Image = Stock.ResourceFileIcon;
@@ -73,7 +71,7 @@
 					}
 
 					node.Expand();
-					projectService.SaveCombine();
+					Runtime.ProjectService.SaveCombine ();
 				}
 			}
 		}

Modified: trunk/MonoDevelop/Core/src/Main/Base/Commands/ProjectCommands.cs
===================================================================
--- trunk/MonoDevelop/Core/src/Main/Base/Commands/ProjectCommands.cs	2004-12-05 09:39:17 UTC (rev 2052)
+++ trunk/MonoDevelop/Core/src/Main/Base/Commands/ProjectCommands.cs	2004-12-06 15:43:16 UTC (rev 2053)
@@ -25,19 +25,14 @@
 	{
 		public override void Run()
 		{
-			IProjectService projectService = (IProjectService)MonoDevelop.Core.Services.ServiceManager.GetService(typeof(IProjectService));
-			
-			if (projectService.CurrentSelectedProject != null) {
-				LanguageBindingService languageBindingService = (LanguageBindingService)MonoDevelop.Core.Services.ServiceManager.GetService(typeof(LanguageBindingService));
-				ILanguageBinding csc = languageBindingService.GetBindingPerLanguageName(projectService.CurrentSelectedProject.ProjectType);
-				string assembly = csc.GetCompiledOutputName(projectService.CurrentSelectedProject);
+			if (Runtime.ProjectService.CurrentSelectedProject != null) {
+				ILanguageBinding csc = Runtime.Languages.GetBindingPerLanguageName (Runtime.ProjectService.CurrentSelectedProject.ProjectType);
+				string assembly = csc.GetCompiledOutputName (Runtime.ProjectService.CurrentSelectedProject);
 				
 				if (!File.Exists(assembly)) {
-					IMessageService messageService =(IMessageService)ServiceManager.GetService(typeof(IMessageService));
-					messageService.ShowError(GettextCatalog.GetString ("Assembly not Found (Compile the project first)"));
+					Runtime.MessageService.ShowError (GettextCatalog.GetString ("Assembly not Found (Compile the project first)"));
 				} else {
-					FileUtilityService fileUtilityService = (FileUtilityService)ServiceManager.GetService(typeof(FileUtilityService));
-					string command = fileUtilityService.SharpDevelopRootPath + 
+					string command = Runtime.FileUtilityService.SharpDevelopRootPath + 
 					                 Path.DirectorySeparatorChar + "bin" + 
 					                 Path.DirectorySeparatorChar + "nunit" + 
 					                 Path.DirectorySeparatorChar + "nunit-gui.exe";
@@ -52,8 +47,7 @@
 	{
 		public override void Run()
 		{
-			IProjectService projectService = (IProjectService)MonoDevelop.Core.Services.ServiceManager.GetService(typeof(IProjectService));
-			IProject        selectedProject = projectService.CurrentSelectedProject;
+			IProject selectedProject = Runtime.ProjectService.CurrentSelectedProject;
 			if (selectedProject == null) {
 				return;
 			}
@@ -63,10 +57,10 @@
 			
 			ProjectOptionsDialog optionsDialog = new ProjectOptionsDialog(selectedProject, generalOptionsNode, configurationPropertiesNode);
 			if (optionsDialog.Run() == (int)Gtk.ResponseType.Ok) {
-					projectService.MarkProjectDirty(projectService.CurrentSelectedProject);
+					Runtime.ProjectService.MarkProjectDirty (selectedProject);
 			}
 			
-			projectService.SaveCombine();
+			Runtime.ProjectService.SaveCombine();
 		}
 	}
 	
@@ -74,14 +68,13 @@
 	{
 		public override void Run()
 		{
-			IProjectService projectService = (IProjectService)MonoDevelop.Core.Services.ServiceManager.GetService(typeof(IProjectService));
 			foreach (IViewContent viewContent in WorkbenchSingleton.Workbench.ViewContentCollection) {
 				if (viewContent.IsDirty) {
 					viewContent.Save();
 				}
 			}
-			if (projectService.CurrentSelectedProject != null) {
-				DeployInformation.Deploy(projectService.CurrentSelectedProject);
+			if (Runtime.ProjectService.CurrentSelectedProject != null) {
+				DeployInformation.Deploy (Runtime.ProjectService.CurrentSelectedProject);
 			}
 		}
 	}
@@ -91,13 +84,10 @@
 		public override void Run()
 		{
 			try {
-				IProjectService projectService = (IProjectService)MonoDevelop.Core.Services.ServiceManager.GetService(typeof(IProjectService));
-				
-				if (projectService.CurrentSelectedProject != null) {
-					LanguageBindingService languageBindingService = (LanguageBindingService)MonoDevelop.Core.Services.ServiceManager.GetService(typeof(LanguageBindingService));
-					ILanguageBinding csc = languageBindingService.GetBindingPerLanguageName(projectService.CurrentSelectedProject.ProjectType);
+				if (Runtime.ProjectService.CurrentSelectedProject != null) {
+					ILanguageBinding csc = Runtime.Languages.GetBindingPerLanguageName (Runtime.ProjectService.CurrentSelectedProject.ProjectType);
 					
-					string assembly    = csc.GetCompiledOutputName(projectService.CurrentSelectedProject);
+					string assembly    = csc.GetCompiledOutputName (Runtime.ProjectService.CurrentSelectedProject);
 					string projectFile = Path.ChangeExtension(assembly, ".ndoc");
 					if (!File.Exists(projectFile)) {
 						StreamWriter sw = File.CreateText(projectFile);
@@ -163,15 +153,14 @@
 						sw.WriteLine("    				</project>");
 						sw.Close();
 					}
-					FileUtilityService fileUtilityService = (FileUtilityService)ServiceManager.GetService(typeof(FileUtilityService));
-					string command = fileUtilityService.SharpDevelopRootPath +
+					string command = Runtime.FileUtilityService.SharpDevelopRootPath +
 					Path.DirectorySeparatorChar + "bin" +
 					Path.DirectorySeparatorChar + "ndoc" +
 					Path.DirectorySeparatorChar + "NDocGui.exe";
 					string args    = '"' + projectFile + '"';
 					
 					ProcessStartInfo psi = new ProcessStartInfo(command, args);
-					psi.WorkingDirectory = fileUtilityService.SharpDevelopRootPath +
+					psi.WorkingDirectory = Runtime.FileUtilityService.SharpDevelopRootPath +
 					Path.DirectorySeparatorChar + "bin" +
 					Path.DirectorySeparatorChar + "ndoc";
 					psi.UseShellExecute = false;

Modified: trunk/MonoDevelop/Core/src/Main/Base/Commands/RunCommands.cs
===================================================================
--- trunk/MonoDevelop/Core/src/Main/Base/Commands/RunCommands.cs	2004-12-05 09:39:17 UTC (rev 2052)
+++ trunk/MonoDevelop/Core/src/Main/Base/Commands/RunCommands.cs	2004-12-06 15:43:16 UTC (rev 2053)
@@ -20,7 +20,6 @@
 using Gtk;
 using System.Diagnostics;
 
-using MonoDevelop.Core.Services;
 using MonoDevelop.Core.AddIns;
 
 using MonoDevelop.Core.Properties;
@@ -40,13 +39,10 @@
 		
 		public static void ShowAfterCompileStatus()
 		{
-			TaskService taskService = (TaskService)MonoDevelop.Core.Services.ServiceManager.GetService(typeof(TaskService));
-			IStatusBarService statusBarService = (IStatusBarService)MonoDevelop.Core.Services.ServiceManager.GetService(typeof(IStatusBarService));
-			if (!taskService.SomethingWentWrong) {
-				statusBarService.SetMessage(GettextCatalog.GetString ("Successful"));
+			if (!Runtime.TaskService.SomethingWentWrong) {
+				Runtime.Gui.StatusBar.SetMessage (GettextCatalog.GetString ("Successful"));
 			} else {
-				StringParserService stringParserService = (StringParserService)ServiceManager.GetService(typeof(StringParserService));
-				statusBarService.SetMessage(String.Format (GettextCatalog.GetString ("{0} errors, {1} warnings"), taskService.Errors.ToString (), taskService.Warnings.ToString ()));
+				Runtime.Gui.StatusBar.SetMessage (String.Format (GettextCatalog.GetString ("{0} errors, {1} warnings"), Runtime.TaskService.Errors.ToString (), Runtime.TaskService.Warnings.ToString ()));
 			}
 		}
 		
@@ -56,22 +52,19 @@
 				CombineEntry.BuildProjects = 0;
 				CombineEntry.BuildErrors   = 0;
 				
-				TaskService taskService = (TaskService)MonoDevelop.Core.Services.ServiceManager.GetService(typeof(TaskService));
-				IProjectService projectService = (IProjectService)MonoDevelop.Core.Services.ServiceManager.GetService(typeof(IProjectService));
-				StringParserService stringParserService = (StringParserService)ServiceManager.GetService(typeof(StringParserService));
+				TaskService taskService = Runtime.TaskService;
+				IProjectService projectService = Runtime.ProjectService;
 				try {
 					if (projectService.CurrentOpenCombine != null) {
 						projectService.CompileCombine();
 						ShowAfterCompileStatus();
 					} else {
 						if (WorkbenchSingleton.Workbench.ActiveWorkbenchWindow != null) {
-							LanguageBindingService languageBindingService = (LanguageBindingService)MonoDevelop.Core.Services.ServiceManager.GetService(typeof(LanguageBindingService));
-							ILanguageBinding binding = languageBindingService.GetBindingPerFileName(WorkbenchSingleton.Workbench.ActiveWorkbenchWindow.ViewContent.ContentName);
+							ILanguageBinding binding = Runtime.Languages.GetBindingPerFileName(WorkbenchSingleton.Workbench.ActiveWorkbenchWindow.ViewContent.ContentName);
 							
 							if (binding != null) {
 								if (binding == null || !binding.CanCompile(WorkbenchSingleton.Workbench.ActiveWorkbenchWindow.ViewContent.ContentName)) {
-									IMessageService messageService =(IMessageService)ServiceManager.GetService(typeof(IMessageService));
-									messageService.ShowError(String.Format (GettextCatalog.GetString ("Language binding {0} can't compile {1}"), binding.Language, WorkbenchSingleton.Workbench.ActiveWorkbenchWindow.ViewContent.ContentName));
+									Runtime.MessageService.ShowError(String.Format (GettextCatalog.GetString ("Language binding {0} can't compile {1}"), binding.Language, WorkbenchSingleton.Workbench.ActiveWorkbenchWindow.ViewContent.ContentName));
 								} else {
 									new SaveFile().Run();
 									ICompilerResult res = binding.CompileFile(WorkbenchSingleton.Workbench.ActiveWorkbenchWindow.ViewContent.ContentName);
@@ -84,16 +77,14 @@
 									ShowAfterCompileStatus();
 								}
 							} else {
-								IMessageService messageService =(IMessageService)ServiceManager.GetService(typeof(IMessageService));
-								messageService.ShowError(GettextCatalog.GetString ("No source file for compilation found. Please save unsaved files"));
+								Runtime.MessageService.ShowError(GettextCatalog.GetString ("No source file for compilation found. Please save unsaved files"));
 							}
 						}
 					}
 					taskService.CompilerOutput += String.Format (GettextCatalog.GetString ("---------------------- Done ----------------------\n\nBuild: {0} succeeded, {1} failed\n"), CombineEntry.BuildProjects.ToString (), CombineEntry.BuildErrors.ToString ());
 				} catch (Exception e) {
 					Console.WriteLine (e);
-					IMessageService messageService =(IMessageService)ServiceManager.GetService(typeof(IMessageService));
-					messageService.ShowError(e, GettextCatalog.GetString ("Error while compiling"));
+					Runtime.MessageService.ShowError(e, GettextCatalog.GetString ("Error while compiling"));
 				}
 				projectService.OnEndBuild();
 			//}
@@ -107,12 +98,9 @@
 		public override void Run()
 		{
 			lock (CompileLockObject) {
-				TaskService taskService = (TaskService)MonoDevelop.Core.Services.ServiceManager.GetService(typeof(TaskService));
-				IProjectService projectService = (IProjectService)MonoDevelop.Core.Services.ServiceManager.GetService(typeof(IProjectService));
-				
-				if (projectService.CurrentOpenCombine != null) {
-					taskService.CompilerOutput = String.Empty;
-					projectService.OnStartBuild();
+				if (Runtime.ProjectService.CurrentOpenCombine != null) {
+					Runtime.TaskService.CompilerOutput = String.Empty;
+					Runtime.ProjectService.OnStartBuild();
 					RunWithWait();
 					//Thread t = new Thread(new ThreadStart(CompileThread));
 					//t.IsBackground  = true;
@@ -129,9 +117,8 @@
 			lock (Compile.CompileLockObject) {
 				CombineEntry.BuildProjects = 0;
 				CombineEntry.BuildErrors   = 0;
-				TaskService taskService = (TaskService)MonoDevelop.Core.Services.ServiceManager.GetService(typeof(TaskService));
-				IProjectService projectService = (IProjectService)MonoDevelop.Core.Services.ServiceManager.GetService(typeof(IProjectService));
-				StringParserService stringParserService = (StringParserService)ServiceManager.GetService(typeof(StringParserService));
+				TaskService taskService = Runtime.TaskService;
+				IProjectService projectService = Runtime.ProjectService;
 				try {
 					
 					if (projectService.CurrentOpenCombine != null) {
@@ -139,13 +126,11 @@
 						Compile.ShowAfterCompileStatus();
 					} else {
 						if (WorkbenchSingleton.Workbench.ActiveWorkbenchWindow != null) {
-							LanguageBindingService languageBindingService = (LanguageBindingService)MonoDevelop.Core.Services.ServiceManager.GetService(typeof(LanguageBindingService));
-							ILanguageBinding binding = languageBindingService.GetBindingPerFileName(WorkbenchSingleton.Workbench.ActiveWorkbenchWindow.ViewContent.ContentName);
+							ILanguageBinding binding = Runtime.Languages.GetBindingPerFileName(WorkbenchSingleton.Workbench.ActiveWorkbenchWindow.ViewContent.ContentName);
 							
 							if (binding != null) {
 								if (binding == null || !binding.CanCompile(WorkbenchSingleton.Workbench.ActiveWorkbenchWindow.ViewContent.ContentName)) {
-									IMessageService messageService =(IMessageService)ServiceManager.GetService(typeof(IMessageService));
-									messageService.ShowError(String.Format (GettextCatalog.GetString ("Language binding {0} can't compile {1}"), binding.Language, WorkbenchSingleton.Workbench.ActiveWorkbenchWindow.ViewContent.ContentName));
+									Runtime.MessageService.ShowError(String.Format (GettextCatalog.GetString ("Language binding {0} can't compile {1}"), binding.Language, WorkbenchSingleton.Workbench.ActiveWorkbenchWindow.ViewContent.ContentName));
 								} else {
 									new SaveFile().Run();
 									ICompilerResult res = binding.CompileFile(WorkbenchSingleton.Workbench.ActiveWorkbenchWindow.ViewContent.ContentName);
@@ -158,16 +143,14 @@
 									Compile.ShowAfterCompileStatus();
 								}
 							} else {
-								IMessageService messageService =(IMessageService)ServiceManager.GetService(typeof(IMessageService));
-								messageService.ShowError(GettextCatalog.GetString ("No source file for compilation found. Please save unsaved files"));
+								Runtime.MessageService.ShowError(GettextCatalog.GetString ("No source file for compilation found. Please save unsaved files"));
 							}
 						}
 					}
 					taskService.CompilerOutput += String.Format (GettextCatalog.GetString ("---------------------- Done ----------------------\n\nBuild: {0} succeeded, {1} failed\n"), CombineEntry.BuildProjects.ToString(), CombineEntry.BuildErrors.ToString());
 				} catch (Exception e) {
 					Console.WriteLine (e);
-					IMessageService messageService =(IMessageService)ServiceManager.GetService(typeof(IMessageService));
-					messageService.ShowError(e, GettextCatalog.GetString ("Error while compiling"));
+					Runtime.MessageService.ShowError (e, GettextCatalog.GetString ("Error while compiling"));
 				}
 				projectService.OnEndBuild();
 			}
@@ -176,12 +159,10 @@
 		public override void Run()
 		{
 //			if (Monitor.TryEnter(Compile.CompileLockObject)) {
-				TaskService taskService = (TaskService)MonoDevelop.Core.Services.ServiceManager.GetService(typeof(TaskService));
-				IProjectService projectService = (IProjectService)MonoDevelop.Core.Services.ServiceManager.GetService(typeof(IProjectService));
-				if (projectService.CurrentOpenCombine != null) {
+				if (Runtime.ProjectService.CurrentOpenCombine != null) {
 	
-					taskService.CompilerOutput = String.Empty;
-					projectService.OnStartBuild();
+					Runtime.TaskService.CompilerOutput = String.Empty;
+					Runtime.ProjectService.OnStartBuild();
 					CompileThread ();
 					//Thread t = new Thread(new ThreadStart(CompileThread));
 					//t.IsBackground  = true;
@@ -198,54 +179,47 @@
 		bool RunThread()
 		{
 			lock (Compile.CompileLockObject) {
-				TaskService taskService = (TaskService)MonoDevelop.Core.Services.ServiceManager.GetService(typeof(TaskService));
-				IProjectService projectService = (IProjectService)MonoDevelop.Core.Services.ServiceManager.GetService(typeof(IProjectService));
-				IStatusBarService statusBarService = (IStatusBarService)MonoDevelop.Core.Services.ServiceManager.GetService(typeof(IStatusBarService));
+				IProjectService projectService = Runtime.ProjectService;
 				try {
-					statusBarService.SetMessage(GettextCatalog.GetString ("Executing"));
+					Runtime.Gui.StatusBar.SetMessage(GettextCatalog.GetString ("Executing"));
 					if (projectService.CurrentOpenCombine != null) {
 						try {
 							if (projectService.NeedsCompiling) {
 								projectService.CompileCombine();
 							}
-							if (taskService.Errors == 0) {
+							if (Runtime.TaskService.Errors == 0) {
 								projectService.OnBeforeStartProject();
 								projectService.CurrentOpenCombine.Execute();
 							}
 							
 						} catch (NoStartupCombineDefinedException) {
-							IMessageService messageService =(IMessageService)ServiceManager.GetService(typeof(IMessageService));
-							messageService.ShowError(GettextCatalog.GetString ("Cannot execute Run command, cannot find startup project.\nPlease define a startup project for the combine in the combine properties."));
+							Runtime.MessageService.ShowError(GettextCatalog.GetString ("Cannot execute Run command, cannot find startup project.\nPlease define a startup project for the combine in the combine properties."));
 						}
 					} else {
 						if (WorkbenchSingleton.Workbench.ActiveWorkbenchWindow != null) {
 							new Compile().RunWithWait();
-							if (taskService.Errors == 0) {
-								LanguageBindingService languageBindingService = (LanguageBindingService)MonoDevelop.Core.Services.ServiceManager.GetService(typeof(LanguageBindingService));
-								ILanguageBinding binding = languageBindingService.GetBindingPerFileName(WorkbenchSingleton.Workbench.ActiveWorkbenchWindow.ViewContent.ContentName);
+							if (Runtime.TaskService.Errors == 0) {
+								ILanguageBinding binding = Runtime.Languages.GetBindingPerFileName(WorkbenchSingleton.Workbench.ActiveWorkbenchWindow.ViewContent.ContentName);
 								if (binding != null) {
 									projectService.OnBeforeStartProject();
 									binding.Execute(WorkbenchSingleton.Workbench.ActiveWorkbenchWindow.ViewContent.ContentName);
 								} else {
-									IMessageService messageService =(IMessageService)ServiceManager.GetService(typeof(IMessageService));
-									messageService.ShowError(GettextCatalog.GetString ("No runnable executable found."));
+									Runtime.MessageService.ShowError(GettextCatalog.GetString ("No runnable executable found."));
 								}
 							}
 						}
 					}
 				} catch (Exception e) {
-					IMessageService messageService =(IMessageService)ServiceManager.GetService(typeof(IMessageService));
-					messageService.ShowError(e, GettextCatalog.GetString ("Error while running"));
+					Runtime.MessageService.ShowError(e, GettextCatalog.GetString ("Error while running"));
 				}
-				statusBarService.SetMessage(GettextCatalog.GetString ("Ready"));
+				Runtime.Gui.StatusBar.SetMessage(GettextCatalog.GetString ("Ready"));
 				return false;
 			}
 		}
 		
 		public override void Run()
 		{
-			IProjectService projectService = (IProjectService)MonoDevelop.Core.Services.ServiceManager.GetService(typeof(IProjectService));
-			if (projectService.CurrentOpenCombine != null) {
+			if (Runtime.ProjectService.CurrentOpenCombine != null) {
 				RunThread(); // TODO FIXME PEDRO
 				
 				//Thread t = new Thread(new ThreadStart(RunThread));
@@ -260,14 +234,11 @@
 		public override void Run()
 		{
 			lock (Compile.CompileLockObject) {
-				TaskService taskService = (TaskService)MonoDevelop.Core.Services.ServiceManager.GetService(typeof(TaskService));
-				IProjectService projectService = (IProjectService)MonoDevelop.Core.Services.ServiceManager.GetService(typeof(IProjectService));
-				IStatusBarService statusBarService = (IStatusBarService)MonoDevelop.Core.Services.ServiceManager.GetService(typeof(IStatusBarService));
+				TaskService taskService = Runtime.TaskService;
+				IProjectService projectService = Runtime.ProjectService;
 				
 				if (projectService.CurrentSelectedProject != null) {
 					try {
-						StringParserService stringParserService = (StringParserService)ServiceManager.GetService(typeof(StringParserService));
-						
 						CombineEntry.BuildProjects = 0;
 						CombineEntry.BuildErrors   = 0;
 						taskService.CompilerOutput = String.Empty;
@@ -277,8 +248,7 @@
 						projectService.CompileProject(projectService.CurrentSelectedProject);
 						taskService.CompilerOutput += String.Format (GettextCatalog.GetString ("---------------------- Done ----------------------\n\nBuild: {0} succeeded, {1} failed\n"), CombineEntry.BuildProjects.ToString(), CombineEntry.BuildErrors.ToString());
 					} catch (Exception e) {
-						IMessageService messageService =(IMessageService)ServiceManager.GetService(typeof(IMessageService));
-						messageService.ShowError(e, String.Format (GettextCatalog.GetString ("Error while compiling project {0}"), projectService.CurrentSelectedProject.Name));
+						Runtime.MessageService.ShowError(e, String.Format (GettextCatalog.GetString ("Error while compiling project {0}"), projectService.CurrentSelectedProject.Name));
 					}
 					projectService.OnEndBuild();
 				}
@@ -292,14 +262,11 @@
 		public override void Run()
 		{
 			lock (Compile.CompileLockObject) {
-				TaskService taskService = (TaskService)MonoDevelop.Core.Services.ServiceManager.GetService(typeof(TaskService));
-				IProjectService projectService = (IProjectService)MonoDevelop.Core.Services.ServiceManager.GetService(typeof(IProjectService));
-				IStatusBarService statusBarService = (IStatusBarService)MonoDevelop.Core.Services.ServiceManager.GetService(typeof(IStatusBarService));
+				TaskService taskService = Runtime.TaskService;
+				IProjectService projectService = Runtime.ProjectService;
 				
 				if (projectService.CurrentSelectedProject != null) {
 					try {
-						StringParserService stringParserService = (StringParserService)ServiceManager.GetService(typeof(StringParserService));
-						
 						CombineEntry.BuildProjects = 0;
 						CombineEntry.BuildErrors   = 0;
 						taskService.CompilerOutput = String.Empty;
@@ -309,8 +276,7 @@
 						projectService.RecompileProject(projectService.CurrentSelectedProject);
 						taskService.CompilerOutput += String.Format (GettextCatalog.GetString ("---------------------- Done ----------------------\n\nBuild: {0} succeeded, {1} failed\n"), CombineEntry.BuildProjects.ToString(), CombineEntry.BuildErrors.ToString());
 					} catch (Exception e) {
-						IMessageService messageService =(IMessageService)ServiceManager.GetService(typeof(IMessageService));
-						messageService.ShowError(e, String.Format (GettextCatalog.GetString ("Error while compiling project {0}"), projectService.CurrentSelectedProject.Name));
+						Runtime.MessageService.ShowError(e, String.Format (GettextCatalog.GetString ("Error while compiling project {0}"), projectService.CurrentSelectedProject.Name));
 					}
 					projectService.OnEndBuild();
 				}					
@@ -323,9 +289,8 @@
 		
 		public override void Run () 
 		{
-			IProjectService projectservice = (IProjectService)ServiceManager.GetService (typeof (IProjectService));
-			if (projectservice.CurrentOpenCombine != null) {
-				projectservice.GenerateMakefiles ();
+			if (Runtime.ProjectService.CurrentOpenCombine != null) {
+				Runtime.ProjectService.GenerateMakefiles ();
 			}
 		}
 	}

Modified: trunk/MonoDevelop/Core/src/Main/Base/Commands/ToolsCommands.cs
===================================================================
--- trunk/MonoDevelop/Core/src/Main/Base/Commands/ToolsCommands.cs	2004-12-05 09:39:17 UTC (rev 2052)
+++ trunk/MonoDevelop/Core/src/Main/Base/Commands/ToolsCommands.cs	2004-12-06 15:43:16 UTC (rev 2053)
@@ -9,7 +9,7 @@
 using System.Collections;
 using System.CodeDom.Compiler;
 
-using MonoDevelop.Core.Services;
+using MonoDevelop.Services;
 using MonoDevelop.Core.AddIns;
 using MonoDevelop.Core.Properties;
 using MonoDevelop.Core.AddIns.Codons;
@@ -23,8 +23,7 @@
 	{
 		public override void Run()
 		{
-			PropertyService propertyService = (PropertyService)ServiceManager.GetService(typeof(PropertyService));
-			TreeViewOptions optionsDialog = new TreeViewOptions((IProperties)propertyService.GetProperty("MonoDevelop.TextEditor.Document.Document.DefaultDocumentAggregatorProperties", new DefaultProperties()),
+			TreeViewOptions optionsDialog = new TreeViewOptions((IProperties)Runtime.Properties.GetProperty("MonoDevelop.TextEditor.Document.Document.DefaultDocumentAggregatorProperties", new DefaultProperties()),
 			                                                           AddInTreeSingleton.AddInTree.GetTreeNode("/SharpDevelop/Dialogs/OptionsDialog"));
 			//optionsDialog.ShowAll ();
 			//	optionsDialog.FormBorderStyle = FormBorderStyle.FixedDialog;

Modified: trunk/MonoDevelop/Core/src/Main/Base/Commands/VBConverter/ConvertBuffer.cs
===================================================================
--- trunk/MonoDevelop/Core/src/Main/Base/Commands/VBConverter/ConvertBuffer.cs	2004-12-05 09:39:17 UTC (rev 2052)
+++ trunk/MonoDevelop/Core/src/Main/Base/Commands/VBConverter/ConvertBuffer.cs	2004-12-06 15:43:16 UTC (rev 2053)
@@ -43,16 +43,14 @@
 				p.Parse(new Lexer(new ICSharpCode.SharpRefactory.Parser.StringReader(((IEditable)window.ViewContent).Text)));
 				
 				if (p.Errors.count > 0) {
-					IMessageService messageService =(IMessageService)ServiceManager.GetService(typeof(IMessageService));
-					messageService.ShowError("Correct source code errors first (only compileable C# source code would convert).");
+					Runtime.MessageService.ShowError("Correct source code errors first (only compileable C# source code would convert).");
 					return;
 				}
 				VBNetVisitor vbv = new VBNetVisitor();
 				vbv.Visit(p.compilationUnit, null);
 				
-				IFileService fileService = (IFileService)MonoDevelop.Core.Services.ServiceManager.GetService(typeof(IFileService));
 				Console.WriteLine(vbv.SourceText.ToString());
-				fileService.NewFile("Generated.VB", "VBNET", vbv.SourceText.ToString());
+				Runtime.FileService.NewFile ("Generated.VB", "VBNET", vbv.SourceText.ToString());
 			}
 		}
 	}

Modified: trunk/MonoDevelop/Core/src/Main/Base/Commands/VBConverter/ConvertProject.cs
===================================================================
--- trunk/MonoDevelop/Core/src/Main/Base/Commands/VBConverter/ConvertProject.cs	2004-12-05 09:39:17 UTC (rev 2052)
+++ trunk/MonoDevelop/Core/src/Main/Base/Commands/VBConverter/ConvertProject.cs	2004-12-06 15:43:16 UTC (rev 2053)
@@ -52,10 +52,8 @@
 		
 		public override void Run()
 		{
-			IProjectService projectService = (IProjectService)MonoDevelop.Core.Services.ServiceManager.GetService(typeof(IProjectService));
-			
-			if (projectService.CurrentSelectedProject != null) {
-				foreach (ProjectFile file in projectService.CurrentSelectedProject.ProjectFiles) {
+			if (Runtime.ProjectService.CurrentSelectedProject != null) {
+				foreach (ProjectFile file in Runtime.ProjectService.CurrentSelectedProject.ProjectFiles) {
 					ConvertFile(file.Name, @"C:\\vbout\\" + Path.GetFileName(file.Name));
 				}
 			}

Modified: trunk/MonoDevelop/Core/src/Main/Base/Gui/AbstractViewContent.cs
===================================================================
--- trunk/MonoDevelop/Core/src/Main/Base/Gui/AbstractViewContent.cs	2004-12-05 09:39:17 UTC (rev 2052)
+++ trunk/MonoDevelop/Core/src/Main/Base/Gui/AbstractViewContent.cs	2004-12-06 15:43:16 UTC (rev 2053)
@@ -127,8 +127,7 @@
 			get
 			{
 				if (HasProject) {
-					FileUtilityService fus = (FileUtilityService)ServiceManager.GetService (typeof (FileUtilityService));
-					return fus.AbsoluteToRelativePath (project.BaseDirectory, ContentName).Substring (2);
+					return Runtime.FileUtilityService.AbsoluteToRelativePath (project.BaseDirectory, ContentName).Substring (2);
 				}
 				return null;
 			}

Modified: trunk/MonoDevelop/Core/src/Main/Base/Gui/BrowserDisplayBinding/HtmlViewPane.cs
===================================================================
--- trunk/MonoDevelop/Core/src/Main/Base/Gui/BrowserDisplayBinding/HtmlViewPane.cs	2004-12-05 09:39:17 UTC (rev 2052)
+++ trunk/MonoDevelop/Core/src/Main/Base/Gui/BrowserDisplayBinding/HtmlViewPane.cs	2004-12-06 15:43:16 UTC (rev 2053)
@@ -135,7 +135,6 @@
 	public class HtmlViewPane : Gtk.Frame
 	{
 		MozillaControl htmlControl = null;
-		IStatusBarService statusbarService = (IStatusBarService) ServiceManager.GetService (typeof (IStatusBarService));
 		SdStatusBar status;
 		
 		VBox topPanel = new VBox (false, 2);
@@ -153,7 +152,7 @@
 		{
 			Shadow = Gtk.ShadowType.In;
 			VBox mainbox = new VBox (false, 2);
-			status = (SdStatusBar) statusbarService.ProgressMonitor;
+			status = (SdStatusBar) Runtime.Gui.StatusBar.ProgressMonitor;
 			
 			if (showNavigation) {
 				
@@ -195,7 +194,7 @@
 
 		private void OnNetStart (object o, EventArgs args)
 		{
-			statusbarService.SetMessage (GettextCatalog.GetString ("Loading..."));
+			Runtime.Gui.StatusBar.SetMessage (GettextCatalog.GetString ("Loading..."));
 			loading = true;
 			GLib.Idle.Add (new GLib.IdleHandler (Pulse));
 		}
@@ -208,7 +207,7 @@
 				return true;
 			}
 			status.Done ();
-			statusbarService.SetMessage (GettextCatalog.GetString ("Done."));
+			Runtime.Gui.StatusBar.SetMessage (GettextCatalog.GetString ("Done."));
 			return false;
 		}
 

Modified: trunk/MonoDevelop/Core/src/Main/Base/Gui/Components/LocalizedPropertyGrid/LocalizedPropertyDescriptor.cs
===================================================================
--- trunk/MonoDevelop/Core/src/Main/Base/Gui/Components/LocalizedPropertyGrid/LocalizedPropertyDescriptor.cs	2004-12-05 09:39:17 UTC (rev 2052)
+++ trunk/MonoDevelop/Core/src/Main/Base/Gui/Components/LocalizedPropertyGrid/LocalizedPropertyDescriptor.cs	2004-12-06 15:43:16 UTC (rev 2053)
@@ -4,6 +4,7 @@
 using System.Resources;
 using System.Reflection;
 
+using MonoDevelop.Services;
 using MonoDevelop.Core.Services;
 
 namespace MonoDevelop.Gui.Components
@@ -14,7 +15,7 @@
 	/// </summary>
 	public class LocalizedPropertyDescriptor : PropertyDescriptor
 	{
-		static StringParserService stringParserService = (StringParserService)ServiceManager.GetService(typeof(StringParserService));
+		static StringParserService stringParserService = Runtime.StringParserService;
 		
 		PropertyDescriptor basePropertyDescriptor; 
 		

Modified: trunk/MonoDevelop/Core/src/Main/Base/Gui/Components/SdMenu.cs
===================================================================
--- trunk/MonoDevelop/Core/src/Main/Base/Gui/Components/SdMenu.cs	2004-12-05 09:39:17 UTC (rev 2052)
+++ trunk/MonoDevelop/Core/src/Main/Base/Gui/Components/SdMenu.cs	2004-12-06 15:43:16 UTC (rev 2053)
@@ -28,8 +28,6 @@
 	
 	public class SdMenu : Gtk.ImageMenuItem, IStatusUpdate
 	{
-		static StringParserService stringParserService = (StringParserService)ServiceManager.GetService(typeof(StringParserService));
-		
 		ConditionCollection conditionCollection;
 		object caller;
 		public string localizedText = String.Empty;

Modified: trunk/MonoDevelop/Core/src/Main/Base/Gui/Components/SdMenuCheckBox.cs
===================================================================
--- trunk/MonoDevelop/Core/src/Main/Base/Gui/Components/SdMenuCheckBox.cs	2004-12-05 09:39:17 UTC (rev 2052)
+++ trunk/MonoDevelop/Core/src/Main/Base/Gui/Components/SdMenuCheckBox.cs	2004-12-06 15:43:16 UTC (rev 2053)
@@ -13,12 +13,13 @@
 using MonoDevelop.Core.AddIns.Conditions;
 using MonoDevelop.Core.AddIns.Codons;
 using MonoDevelop.Core.Services;
+using MonoDevelop.Services;
 
 namespace MonoDevelop.Gui.Components
 {
 	public class SdMenuCheckBox : Gtk.CheckMenuItem, IStatusUpdate
 	{
-		static StringParserService stringParserService = (StringParserService)ServiceManager.GetService(typeof(StringParserService));
+		static StringParserService stringParserService = Runtime.StringParserService;
 			
 		object caller;
 		ConditionCollection conditionCollection;

Modified: trunk/MonoDevelop/Core/src/Main/Base/Gui/Components/SdMenuCommand.cs
===================================================================
--- trunk/MonoDevelop/Core/src/Main/Base/Gui/Components/SdMenuCommand.cs	2004-12-05 09:39:17 UTC (rev 2052)
+++ trunk/MonoDevelop/Core/src/Main/Base/Gui/Components/SdMenuCommand.cs	2004-12-06 15:43:16 UTC (rev 2053)
@@ -13,6 +13,7 @@
 using MonoDevelop.Core.AddIns.Conditions;
 using MonoDevelop.Core.AddIns.Codons;
 using MonoDevelop.Core.Services;
+using MonoDevelop.Services;
 
 //using Reflector.UserInterface;
 
@@ -20,7 +21,7 @@
 {
 	public class SdMenuCommand : Gtk.ImageMenuItem, IStatusUpdate
 	{
-		static StringParserService stringParserService = (StringParserService)ServiceManager.GetService(typeof(StringParserService));
+		static StringParserService stringParserService = Runtime.StringParserService;
 			
 		object caller;
 		ConditionCollection conditionCollection;

Modified: trunk/MonoDevelop/Core/src/Main/Base/Gui/Components/SideBar/SharpDevelopSideTabItem.cs
===================================================================
--- trunk/MonoDevelop/Core/src/Main/Base/Gui/Components/SideBar/SharpDevelopSideTabItem.cs	2004-12-05 09:39:17 UTC (rev 2052)
+++ trunk/MonoDevelop/Core/src/Main/Base/Gui/Components/SideBar/SharpDevelopSideTabItem.cs	2004-12-06 15:43:16 UTC (rev 2053)
@@ -10,7 +10,7 @@
 using System.Drawing;
 using System.Xml;
 
-using MonoDevelop.Core.Services;
+using MonoDevelop.Services;
 
 using MonoDevelop.Core.Properties;
 using MonoDevelop.Internal.Templates;
@@ -19,16 +19,14 @@
 {
 	public class SharpDevelopSideTabItem : AxSideTabItem
 	{
-		ResourceService resourceService = (ResourceService)ServiceManager.GetService(typeof(ResourceService));
-		
 		public SharpDevelopSideTabItem(string name) : base(name)
 		{
-			//Icon = resourceService.GetBitmap("Icons.16x16.SideBarDocument");
+			//Icon = Runtime.Gui.Resources.GetBitmap("Icons.16x16.SideBarDocument");
 		}
 		
 		public SharpDevelopSideTabItem(string name, object tag) : base(name, tag)
 		{
-			//Icon = resourceService.GetBitmap("Icons.16x16.SideBarDocument");
+			//Icon = Runtime.Gui.Resources.GetBitmap("Icons.16x16.SideBarDocument");
 		}
 		
 		public SharpDevelopSideTabItem(string name, object tag, Bitmap icon) : base(name, tag, icon)

Modified: trunk/MonoDevelop/Core/src/Main/Base/Gui/Dialogs/CombineConfiguration/CombineBuildOptions.cs
===================================================================
--- trunk/MonoDevelop/Core/src/Main/Base/Gui/Dialogs/CombineConfiguration/CombineBuildOptions.cs	2004-12-05 09:39:17 UTC (rev 2052)
+++ trunk/MonoDevelop/Core/src/Main/Base/Gui/Dialogs/CombineConfiguration/CombineBuildOptions.cs	2004-12-06 15:43:16 UTC (rev 2053)
@@ -29,13 +29,6 @@
 			[Glade.WidgetAttribute] Entry buildOutputLoc;
 			[Glade.WidgetAttribute] Button OutputDirBrowse;
 			
-			// Services
-			StringParserService StringParserService = (StringParserService)ServiceManager.GetService (
-										typeof (StringParserService));
-			static PropertyService propertyService = (PropertyService)ServiceManager.GetService(
-										typeof(PropertyService));
-			FileUtilityService fileUtilityService = (FileUtilityService)ServiceManager.GetService (typeof (FileUtilityService));
-			
 			Combine combine;
 
 			public  CombineBuildOptionsWidget(IProperties CustomizationObject) : 

Modified: trunk/MonoDevelop/Core/src/Main/Base/Gui/Dialogs/CombineConfiguration/CombineStartupPanel.cs
===================================================================
--- trunk/MonoDevelop/Core/src/Main/Base/Gui/Dialogs/CombineConfiguration/CombineStartupPanel.cs	2004-12-05 09:39:17 UTC (rev 2052)
+++ trunk/MonoDevelop/Core/src/Main/Base/Gui/Dialogs/CombineConfiguration/CombineStartupPanel.cs	2004-12-06 15:43:16 UTC (rev 2053)
@@ -38,11 +38,6 @@
  			[Glade.Widget] Gtk.TreeView entryTreeView;
  			public ListStore store;
 
-			// Services
-			StringParserService StringParserService = (StringParserService)ServiceManager.GetService (
-										typeof (StringParserService));
-			static PropertyService propertyService = (PropertyService)ServiceManager.GetService(
-										typeof(PropertyService));
 			Combine combine;
 
 			public  CombineStartupPanelWidget(IProperties CustomizationObject) : 
@@ -80,9 +75,9 @@
 				entryTreeView.Model = store;
 				
 				TreeIter iter = new TreeIter ();
- 				string entryHeader = StringParserService.Parse("Entry");
+ 				string entryHeader = Runtime.StringParserService.Parse("Entry");
  				entryTreeView.AppendColumn (entryHeader, new CellRendererText (), "text", 0);
- 				string actionHeader = StringParserService.Parse( "Action");
+ 				string actionHeader = Runtime.StringParserService.Parse( "Action");
  				entryTreeView.AppendColumn (actionHeader, new CellRendererText (), "text", 1);
 				
 				// sanity check to ensure we had a proper execture definitions save last time rounf
@@ -102,8 +97,7 @@
 					}
 					
 					// tell the user we encountered and worked around an issue 
-					IMessageService messageService =(IMessageService)ServiceManager.GetService(typeof(IMessageService));
-					messageService.ShowError(GettextCatalog.GetString ("The Combine Execute Definitions for this Combine were invalid. A new empty set of Execute Definitions has been created."));
+					Runtime.MessageService.ShowError(GettextCatalog.GetString ("The Combine Execute Definitions for this Combine were invalid. A new empty set of Execute Definitions has been created."));
 				}
 					
  				entryTreeView.Selection.Changed += new EventHandler(SelectedEntryChanged);

Modified: trunk/MonoDevelop/Core/src/Main/Base/Gui/Dialogs/CommonAboutDialog.cs
===================================================================
--- trunk/MonoDevelop/Core/src/Main/Base/Gui/Dialogs/CommonAboutDialog.cs	2004-12-05 09:39:17 UTC (rev 2052)
+++ trunk/MonoDevelop/Core/src/Main/Base/Gui/Dialogs/CommonAboutDialog.cs	2004-12-06 15:43:16 UTC (rev 2053)
@@ -40,8 +40,7 @@
 			this.Realized += new EventHandler (OnRealized);
 			this.ExposeEvent += new ExposeEventHandler (OnExposed);
 			
-			ResourceService resourceService = (ResourceService)ServiceManager.GetService(typeof(ResourceService));
-			image = resourceService.GetBitmap ("Icons.AboutImage");
+			image = Runtime.Gui.Resources.GetBitmap ("Icons.AboutImage");
 			string trans = GettextCatalog.GetString ("translator-credits");
 			
 			text = "<b>Ported and developed by:</b>\nTodd Berman\nPedro Abelleira Seco\nJohn Luke\nDaniel Kornhauser\nAlex Graveley\nnricciar\nJohn Bou Antoun\nBen Maurer\nJeroen Zwartepoorte\nGustavo Giráldez\nMiguel de Icaza\nInigo Illan\nIain McCoy\nNick Drochak\nPaweł Różański\nRichard Torkar\nErik Dasque\nPaco Martinez\nLluis Sanchez Gual";
@@ -107,7 +106,6 @@
 	
 	public class CommonAboutDialog : Dialog
 	{
-		static FileUtilityService fileUtilityService = (FileUtilityService)ServiceManager.GetService(typeof(FileUtilityService));
 		
 		AuthorAboutTabPage aatp;
 		//ChangeLogTabPage changelog;

Modified: trunk/MonoDevelop/Core/src/Main/Base/Gui/Dialogs/DirtyFilesDialog.cs
===================================================================
--- trunk/MonoDevelop/Core/src/Main/Base/Gui/Dialogs/DirtyFilesDialog.cs	2004-12-05 09:39:17 UTC (rev 2052)
+++ trunk/MonoDevelop/Core/src/Main/Base/Gui/Dialogs/DirtyFilesDialog.cs	2004-12-06 15:43:16 UTC (rev 2053)
@@ -23,11 +23,10 @@
 		{
 			tsFiles = new TreeStore (typeof (string), typeof (bool), typeof (SdiWorkspaceWindow), typeof (bool));
 			tvFiles = new TreeView (tsFiles);
-			IProjectService projectService = (IProjectService) ServiceManager.GetService (typeof (IProjectService));
 			TreeIter topCombineIter = TreeIter.Zero;
 			Hashtable projectIters = new Hashtable ();
-			if (projectService.CurrentOpenCombine != null) {
-				topCombineIter = tsFiles.AppendValues (String.Format (GettextCatalog.GetString ("Solution: {0}"), projectService.CurrentOpenCombine.Name), true, null, false);
+			if (Runtime.ProjectService.CurrentOpenCombine != null) {
+				topCombineIter = tsFiles.AppendValues (String.Format (GettextCatalog.GetString ("Solution: {0}"), Runtime.ProjectService.CurrentOpenCombine.Name), true, null, false);
 			}
 			foreach (IViewContent viewcontent in WorkbenchSingleton.Workbench.ViewContentCollection) {
 				if (!viewcontent.IsDirty)
@@ -100,9 +99,8 @@
 		void SaveAndQuit (object o, EventArgs e)
 		{
 			tsFiles.Foreach (new TreeModelForeachFunc (CollectWorkbenches));
-			FileUtilityService fileUtilityService = (FileUtilityService)ServiceManager.GetService(typeof(FileUtilityService));
 			foreach (SdiWorkspaceWindow window in arrSaveWorkbenches) {
-				fileUtilityService.ObservedSave(new FileOperationDelegate(window.ViewContent.Save), window.ViewContent.ContentName , FileErrorPolicy.ProvideAlternative);
+				Runtime.FileUtilityService.ObservedSave(new FileOperationDelegate(window.ViewContent.Save), window.ViewContent.ContentName , FileErrorPolicy.ProvideAlternative);
 			}
 
 			Respond (Gtk.ResponseType.Ok);

Modified: trunk/MonoDevelop/Core/src/Main/Base/Gui/Dialogs/NewFileDialog.cs
===================================================================
--- trunk/MonoDevelop/Core/src/Main/Base/Gui/Dialogs/NewFileDialog.cs	2004-12-05 09:39:17 UTC (rev 2052)
+++ trunk/MonoDevelop/Core/src/Main/Base/Gui/Dialogs/NewFileDialog.cs	2004-12-06 15:43:16 UTC (rev 2053)
@@ -43,16 +43,13 @@
 		Button cancelButton;
 		Label infoLabel;
 
-		ResourceService iconService = (ResourceService)ServiceManager.GetService (typeof(ResourceService));
-		DispatchService dispatcher = (DispatchService)ServiceManager.GetService (typeof (DispatchService));
-		
 		public NewFileDialog () : base ()
 		{
 			this.TransientFor = (Window) WorkbenchSingleton.Workbench;
 			this.BorderWidth = 6;
 			this.HasSeparator = false;
 			
-			dispatcher.BackgroundDispatch (new MessageHandler (InitializeTemplates));
+			Runtime.DispatchService.BackgroundDispatch (new MessageHandler (InitializeTemplates));
 		}
 		
 		void InitializeView()
@@ -60,13 +57,13 @@
 			PixbufList smalllist  = new PixbufList();
 			PixbufList imglist    = new PixbufList();
 			
-			smalllist.Add(iconService.GetBitmap("Icons.32x32.EmptyFileIcon"));
-			imglist.Add(iconService.GetBitmap("Icons.32x32.EmptyFileIcon"));
+			smalllist.Add(Runtime.Gui.Resources.GetBitmap("Icons.32x32.EmptyFileIcon"));
+			imglist.Add(Runtime.Gui.Resources.GetBitmap("Icons.32x32.EmptyFileIcon"));
 			
 			int i = 0;
 			Hashtable tmp = new Hashtable(icons);
 			foreach (DictionaryEntry entry in icons) {
-				Gdk.Pixbuf bitmap = iconService.GetBitmap(entry.Key.ToString(), Gtk.IconSize.LargeToolbar);
+				Gdk.Pixbuf bitmap = Runtime.Gui.Resources.GetBitmap(entry.Key.ToString(), Gtk.IconSize.LargeToolbar);
 				if (bitmap != null) {
 					smalllist.Add(bitmap);
 					imglist.Add(bitmap);
@@ -135,7 +132,7 @@
 				}
 				alltemplates.Add(titem);
 			}
-			dispatcher.GuiDispatch (new MessageHandler (InitializeComponents));
+			Runtime.DispatchService.GuiDispatch (new MessageHandler (InitializeComponents));
 		}
 		
 		// tree view event handlers
@@ -149,7 +146,7 @@
 				foreach (TemplateItem item in (ArrayList)((Gtk.TreeStore)mdl).GetValue (iter, 2)) {
 					//templateStore.AppendValues (item.Name, item.Template);
 					
-					TemplateView.AddIcon(new Gtk.Image(iconService.GetBitmap (item.Template.Icon, Gtk.IconSize.Dnd)), item.Name, item.Template);
+					TemplateView.AddIcon(new Gtk.Image(Runtime.Gui.Resources.GetBitmap (item.Template.Icon, Gtk.IconSize.Dnd)), item.Name, item.Template);
 				}
 				okButton.Sensitive = false;
 			}
@@ -183,8 +180,7 @@
 		
 		public void SaveFile(string filename, string content, string languageName, bool showFile)
 		{
-			IFileService fileService = (IFileService)MonoDevelop.Core.Services.ServiceManager.GetService(typeof(IFileService));
-			fileService.NewFile(filename, languageName, content);
+			Runtime.FileService.NewFile(filename, languageName, content);
 		}
 
 		public event EventHandler OnOked;	
@@ -346,8 +342,8 @@
 			this.VBox.PackStart (infoLabelFrame, false, false, 6);
 
 			cat_imglist = new PixbufList();
-			cat_imglist.Add(iconService.GetBitmap("Icons.16x16.OpenFolderBitmap"));
-			cat_imglist.Add(iconService.GetBitmap("Icons.16x16.ClosedFolderBitmap"));
+			cat_imglist.Add(Runtime.Gui.Resources.GetBitmap("Icons.16x16.OpenFolderBitmap"));
+			cat_imglist.Add(Runtime.Gui.Resources.GetBitmap("Icons.16x16.ClosedFolderBitmap"));
 			catView.Selection.Changed += new EventHandler (CategoryChange);
 			TemplateView.IconSelected += new EventHandler(SelectedIndexChange);
 			TemplateView.IconDoubleClicked += new EventHandler(OpenEvent);

Modified: trunk/MonoDevelop/Core/src/Main/Base/Gui/Dialogs/NewProjectDialog.cs
===================================================================
--- trunk/MonoDevelop/Core/src/Main/Base/Gui/Dialogs/NewProjectDialog.cs	2004-12-05 09:39:17 UTC (rev 2052)
+++ trunk/MonoDevelop/Core/src/Main/Base/Gui/Dialogs/NewProjectDialog.cs	2004-12-06 15:43:16 UTC (rev 2053)
@@ -49,11 +49,7 @@
 		[Glade.Widget] Gtk.TreeView lst_template_types;
 		[Glade.Widget] HBox hbox_template, hbox_for_browser;
 		
-		FileUtilityService  fileUtilityService = (FileUtilityService)ServiceManager.GetService(typeof(FileUtilityService));
-		StringParserService stringParserService = (StringParserService)ServiceManager.GetService(typeof(StringParserService));
-		PropertyService     propertyService = (PropertyService)ServiceManager.GetService(typeof(PropertyService));
-		MessageService      messageService = (MessageService)ServiceManager.GetService(typeof(MessageService));
-		DispatchService     dispatcher = (DispatchService)ServiceManager.GetService (typeof (DispatchService));
+		FileUtilityService  fileUtilityService = Runtime.FileUtilityService;
 		bool openCombine;
 		
 		public NewProjectDialog (bool openCombine)
@@ -62,7 +58,7 @@
 			new Glade.XML (null, "Base.glade", "NewProjectDialog", null).Autoconnect (this);
 			dialog.TransientFor = (Window) WorkbenchSingleton.Workbench;			
 
-			dispatcher.BackgroundDispatch (new MessageHandler (InitializeTemplates));
+			Runtime.DispatchService.BackgroundDispatch (new MessageHandler (InitializeTemplates));
 		}
 		
 		void InitializeView()
@@ -116,7 +112,7 @@
 				//	titem.Selected = true;
 				alltemplates.Add(titem);
 			}
-			dispatcher.GuiDispatch (new MessageHandler (InitializeComponents));
+			Runtime.DispatchService.GuiDispatch (new MessageHandler (InitializeComponents));
 		}
 		
 		void CategoryChange(object sender, EventArgs e)
@@ -169,13 +165,12 @@
 			project.ProjectFiles.Add (new ProjectFile(filename));
 			
 			StreamWriter sr = System.IO.File.CreateText (filename);
-			sr.Write(stringParserService.Parse(content, new string[,] { {"PROJECT", txt_name.Text}, {"FILE", System.IO.Path.GetFileName(filename)}}));
+			sr.Write (Runtime.StringParserService.Parse(content, new string[,] { {"PROJECT", txt_name.Text}, {"FILE", System.IO.Path.GetFileName(filename)}}));
 			sr.Close();
 			
 			if (showFile) {
-				string longfilename = fileUtilityService.GetDirectoryNameWithSeparator (ProjectSolution) + stringParserService.Parse(filename, new string[,] { {"PROJECT", txt_name.Text}});
-				IFileService fileService = (IFileService) MonoDevelop.Core.Services.ServiceManager.GetService(typeof(IFileService));
-				fileService.OpenFile (longfilename);
+				string longfilename = fileUtilityService.GetDirectoryNameWithSeparator (ProjectSolution) + Runtime.StringParserService.Parse(filename, new string[,] { {"PROJECT", txt_name.Text}});
+				Runtime.FileService.OpenFile (longfilename);
 			}
 		}
 		
@@ -184,24 +179,20 @@
 		
 		void OpenEvent(object sender, EventArgs e)
 		{
-			PropertyService propertyService = (PropertyService)ServiceManager.GetService(typeof(PropertyService));
 			if (TemplateView.CurrentlySelected != null) {
-				propertyService.SetProperty("Dialogs.NewProjectDialog.LastSelectedCategory", ((ProjectTemplate)TemplateView.CurrentlySelected).Name);
-				//propertyService.SetProperty("Dialogs.NewProjectDialog.LargeImages", ((RadioButton)ControlDictionary["largeIconsRadioButton"]).Checked);
+				Runtime.Properties.SetProperty("Dialogs.NewProjectDialog.LastSelectedCategory", ((ProjectTemplate)TemplateView.CurrentlySelected).Name);
+				//Runtime.Properties.SetProperty("Dialogs.NewProjectDialog.LargeImages", ((RadioButton)ControlDictionary["largeIconsRadioButton"]).Checked);
 			}
 			
-			FileUtilityService fileUtilityService = (FileUtilityService)ServiceManager.GetService(typeof(FileUtilityService));
 			string solution = txt_subdirectory.Text;
 			string name     = txt_name.Text;
 			string location = entry_location.Path;
 
-			IProjectService projService = (IProjectService)ServiceManager.GetService(typeof(IProjectService));			
-						
 			if(solution.Equals("")) solution = name; //This was empty when adding after first combine
 			
 			//The one below seemed to be failing sometimes.
 			if(solution.IndexOfAny("$#@!%^&*/?\\|'\";:}{".ToCharArray()) > -1) {
-				messageService.ShowError(GettextCatalog.GetString ("Illegal project name. \nOnly use letters, digits, space, '.' or '_'."));
+				Runtime.MessageService.ShowError(GettextCatalog.GetString ("Illegal project name. \nOnly use letters, digits, space, '.' or '_'."));
 				dialog.Respond(Gtk.ResponseType.Reject);
 				dialog.Hide();
 				return;
@@ -211,18 +202,18 @@
 				&& (!fileUtilityService.IsValidFileName (solution) || solution.IndexOf(System.IO.Path.DirectorySeparatorChar) >= 0)) ||
 			    !fileUtilityService.IsValidFileName(name)     || name.IndexOf(System.IO.Path.DirectorySeparatorChar) >= 0 ||
 			    !fileUtilityService.IsValidFileName(location)) {
-				messageService.ShowError(GettextCatalog.GetString ("Illegal project name.\nOnly use letters, digits, space, '.' or '_'."));
+				Runtime.MessageService.ShowError(GettextCatalog.GetString ("Illegal project name.\nOnly use letters, digits, space, '.' or '_'."));
 				return;
 			}
 
-			if(projService.ExistsEntryWithName(name)) {
-				messageService.ShowError(GettextCatalog.GetString ("A Project with that name is already in your Project Space"));
+			if(Runtime.ProjectService.ExistsEntryWithName(name)) {
+				Runtime.MessageService.ShowError(GettextCatalog.GetString ("A Project with that name is already in your Project Space"));
 				dialog.Respond(Gtk.ResponseType.Reject);
 				dialog.Hide();
 				return;
 			}
 			
-			propertyService.SetProperty (
+			Runtime.Properties.SetProperty (
 				"MonoDevelop.Gui.Dialogs.NewProjectDialog.AutoCreateProjectSubdir",
 				chk_combine_directory.Active);
 			
@@ -235,11 +226,11 @@
 				}
 				catch (IOException ioException)
 				{
-					messageService.ShowError (String.Format (GettextCatalog.GetString ("Could not create file {0}. File already exists."), ProjectSolution));
+					Runtime.MessageService.ShowError (String.Format (GettextCatalog.GetString ("Could not create file {0}. File already exists."), ProjectSolution));
 				}
 				catch (UnauthorizedAccessException accessException)
 				{
-					messageService.ShowError (String.Format (GettextCatalog.GetString ("You do not have permission to create to {0}"), ProjectSolution));
+					Runtime.MessageService.ShowError (String.Format (GettextCatalog.GetString ("You do not have permission to create to {0}"), ProjectSolution));
 					return;
 				}
 				
@@ -247,7 +238,7 @@
 				
 				cinfo.CombinePath     = ProjectLocation;
 				cinfo.ProjectBasePath = ProjectSolution;
-//				cinfo.Description     = stringParserService.Parse(item.Template.Description);
+//				cinfo.Description     = Runtime.StringParserService.Parse(item.Template.Description);
 				
 				cinfo.ProjectName     = name;
 //				cinfo.ProjectTemplate = item.Template;
@@ -275,7 +266,7 @@
 		void SelectedIndexChange(object sender, EventArgs e)
 		{
 			if (TemplateView.CurrentlySelected != null)
-				lbl_template_descr.Text = stringParserService.Parse (((ProjectTemplate)TemplateView.CurrentlySelected).Description);
+				lbl_template_descr.Text = Runtime.StringParserService.Parse (((ProjectTemplate)TemplateView.CurrentlySelected).Description);
 			else
 				lbl_template_descr.Text = String.Empty;
 			
@@ -321,7 +312,7 @@
 			hbox_for_browser.PackStart (entry_location, true, true, 0);
 			
 			
-			entry_location.DefaultPath = propertyService.GetProperty ("MonoDevelop.Gui.Dialogs.NewProjectDialog.DefaultPath", fileUtilityService.GetDirectoryNameWithSeparator (Environment.GetEnvironmentVariable ("HOME")) + "Projects").ToString ();
+			entry_location.DefaultPath = Runtime.Properties.GetProperty ("MonoDevelop.Gui.Dialogs.NewProjectDialog.DefaultPath", fileUtilityService.GetDirectoryNameWithSeparator (Environment.GetEnvironmentVariable ("HOME")) + "Projects").ToString ();
 			
 			PathChanged (null, null);
 			
@@ -372,7 +363,7 @@
 			
 			public TemplateItem(ProjectTemplate template)
 			{
-				name = ((StringParserService)ServiceManager.GetService(typeof(StringParserService))).Parse(template.Name);
+				name = Runtime.StringParserService.Parse(template.Name);
 				this.template = template;
 			}
 			

Modified: trunk/MonoDevelop/Core/src/Main/Base/Gui/Dialogs/OptionPanels/EditTemplateDialog.cs
===================================================================
--- trunk/MonoDevelop/Core/src/Main/Base/Gui/Dialogs/OptionPanels/EditTemplateDialog.cs	2004-12-05 09:39:17 UTC (rev 2052)
+++ trunk/MonoDevelop/Core/src/Main/Base/Gui/Dialogs/OptionPanels/EditTemplateDialog.cs	2004-12-06 15:43:16 UTC (rev 2053)
@@ -22,9 +22,6 @@
 		Gtk.Entry templateTextBox;
 		Gtk.Entry descriptionTextBox;
 		
-		// Services
-		StringParserService StringParserService = (StringParserService)ServiceManager.GetService (typeof (StringParserService));
-		
 		public CodeTemplate CodeTemplate {
 			get {
 				return codeTemplate;

Modified: trunk/MonoDevelop/Core/src/Main/Base/Gui/Dialogs/OptionPanels/ExternalToolPanel.cs
===================================================================
--- trunk/MonoDevelop/Core/src/Main/Base/Gui/Dialogs/OptionPanels/ExternalToolPanel.cs	2004-12-05 09:39:17 UTC (rev 2052)
+++ trunk/MonoDevelop/Core/src/Main/Base/Gui/Dialogs/OptionPanels/ExternalToolPanel.cs	2004-12-06 15:43:16 UTC (rev 2053)
@@ -76,18 +76,6 @@
 				{GettextCatalog.GetString ("MonoDevelop Startup Directory"), "${StartupPath}"},
 			};
 			 
-			// Services
-			FileUtilityService FileUtilityService = (FileUtilityService) ServiceManager.GetService(
-				typeof (FileUtilityService));
-			StringParserService StringParserService = (StringParserService) ServiceManager.GetService (
-				typeof (StringParserService));
-			PropertyService PropertyService = (PropertyService) ServiceManager.GetService(
-				typeof (PropertyService));
-			MessageService MessageService = (MessageService) ServiceManager.GetService(
-				typeof (MessageService));
-			MenuService MenuService = (MenuService) ServiceManager.GetService(
-				typeof (MenuService));
-
 			// gtk controls
 			[Glade.Widget] ListStore toolListBoxStore;
 			[Glade.Widget] Gtk.TreeView toolListBox;
@@ -139,11 +127,11 @@
 					 
 				toolListBox.AppendColumn (GettextCatalog.GetString ("_Tools"), new CellRendererText (), "text", 0);
 
-				MenuService.CreateQuickInsertMenu (argumentTextBox,
+				Runtime.Gui.Menus.CreateQuickInsertMenu (argumentTextBox,
 						argumentQuickInsertButton,
 						argumentQuickInsertMenu);
 
-				MenuService.CreateQuickInsertMenu (workingDirTextBox,
+				Runtime.Gui.Menus.CreateQuickInsertMenu (workingDirTextBox,
 						workingDirQuickInsertButton,
 						workingDirInsertMenu);
 					 
@@ -348,7 +336,7 @@
 			{
 				foreach (Widget control in controls) {				
 					if (control == null) {
-						MessageService.ShowError (GettextCatalog.GetString ("Control not found!"));
+						Runtime.MessageService.ShowError (GettextCatalog.GetString ("Control not found!"));
 					} else {
 						control.Sensitive = enabled;
 					}
@@ -368,14 +356,14 @@
 						 
 					ExternalTool tool = toolListBox.Model.GetValue (current, 1) as ExternalTool;
 					
-					if (!FileUtilityService.IsValidFileName (tool.Command)) {
-						MessageService.ShowError (String.Format(GettextCatalog.GetString ("The command of tool \"{0}\" is invalid."), 
+					if (!Runtime.FileUtilityService.IsValidFileName (tool.Command)) {
+						Runtime.MessageService.ShowError (String.Format(GettextCatalog.GetString ("The command of tool \"{0}\" is invalid."), 
 										 tool.MenuCommand));
 						return false;
 					}
 					
-					if ((tool.InitialDirectory != "") && (!FileUtilityService.IsValidFileName(tool.InitialDirectory))) {
-						MessageService.ShowError (String.Format(GettextCatalog.GetString ("The working directory of tool \"{0}\" is invalid.") ,
+					if ((tool.InitialDirectory != "") && (!Runtime.FileUtilityService.IsValidFileName(tool.InitialDirectory))) {
+						Runtime.MessageService.ShowError (String.Format(GettextCatalog.GetString ("The working directory of tool \"{0}\" is invalid.") ,
 											 tool.MenuCommand));
 						return false;
 					}

Modified: trunk/MonoDevelop/Core/src/Main/Base/Gui/Dialogs/OptionPanels/IDEOptions/BuildPanel.cs
===================================================================
--- trunk/MonoDevelop/Core/src/Main/Base/Gui/Dialogs/OptionPanels/IDEOptions/BuildPanel.cs	2004-12-05 09:39:17 UTC (rev 2052)
+++ trunk/MonoDevelop/Core/src/Main/Base/Gui/Dialogs/OptionPanels/IDEOptions/BuildPanel.cs	2004-12-06 15:43:16 UTC (rev 2053)
@@ -26,9 +26,6 @@
 	public class BuildPanel : AbstractOptionPanel
 	{
 
-		// service instances needed
-		PropertyService PropertyService = (PropertyService)ServiceManager.GetService (typeof (PropertyService));
-		
 		BuildPanelWidget widget;
 		const string projectAndCombineProperty = "SharpDevelop.UI.ProjectAndCombineOptions";
 
@@ -56,12 +53,6 @@
 			[Glade.Widget] public Gtk.CheckButton showOutputCheckBox;
 			[Glade.Widget] public Gtk.Label buildAndRunOptionsLabel;   
 
-			// service instances needed
-			StringParserService StringParserService = (StringParserService)ServiceManager.GetService (
-				typeof (StringParserService));
-			PropertyService PropertyService = (PropertyService)ServiceManager.GetService (
-				typeof (PropertyService));
-
 			public  BuildPanelWidget () : base ("Base.glade", "BuildPanel")
 			{
 			        //
@@ -71,15 +62,15 @@
 				//
 				// reading properties
 				//
-				BeforeCompileAction action = (BeforeCompileAction) PropertyService.GetProperty(
+				BeforeCompileAction action = (BeforeCompileAction) Runtime.Properties.GetProperty(
 					"SharpDevelop.Services.DefaultParserService.BeforeCompileAction", 
 					BeforeCompileAction.SaveAllFiles);
 				saveChangesRadioButton.Active = action.Equals(BeforeCompileAction.SaveAllFiles);
 				promptChangesRadioButton.Active = action.Equals(BeforeCompileAction.PromptForSave);
 				noSaveRadioButton.Active = action.Equals(BeforeCompileAction.Nothing);
-				showTaskListCheckBox.Active = (bool)PropertyService.GetProperty(
+				showTaskListCheckBox.Active = (bool)Runtime.Properties.GetProperty(
 					"SharpDevelop.ShowTaskListAfterBuild", true);
-				showOutputCheckBox.Active = (bool)PropertyService.GetProperty(
+				showOutputCheckBox.Active = (bool)Runtime.Properties.GetProperty(
 					"SharpDevelop.ShowOutputWindowAtBuild", true);
 			}
 			
@@ -87,18 +78,18 @@
 			{
 				// set properties
 				if (saveChangesRadioButton.Active) {
-					PropertyService.SetProperty("SharpDevelop.Services.DefaultParserService.BeforeCompileAction", 
+					Runtime.Properties.SetProperty("SharpDevelop.Services.DefaultParserService.BeforeCompileAction", 
 							BeforeCompileAction.SaveAllFiles);
 				} else if (promptChangesRadioButton.Active) {
-					PropertyService.SetProperty("SharpDevelop.Services.DefaultParserService.BeforeCompileAction", 
+					Runtime.Properties.SetProperty("SharpDevelop.Services.DefaultParserService.BeforeCompileAction", 
 							BeforeCompileAction.PromptForSave);
 				} else if (noSaveRadioButton.Active) {
-					PropertyService.SetProperty("SharpDevelop.Services.DefaultParserService.BeforeCompileAction", 
+					Runtime.Properties.SetProperty("SharpDevelop.Services.DefaultParserService.BeforeCompileAction", 
 							BeforeCompileAction.Nothing);
 				}
 				
-				PropertyService.SetProperty("SharpDevelop.ShowTaskListAfterBuild", showTaskListCheckBox.Active);
-				PropertyService.SetProperty("SharpDevelop.ShowOutputWindowAtBuild", showOutputCheckBox.Active);
+				Runtime.Properties.SetProperty("SharpDevelop.ShowTaskListAfterBuild", showTaskListCheckBox.Active);
+				Runtime.Properties.SetProperty("SharpDevelop.ShowOutputWindowAtBuild", showOutputCheckBox.Active);
 			}
 		}
 	}

Modified: trunk/MonoDevelop/Core/src/Main/Base/Gui/Dialogs/OptionPanels/IDEOptions/CodeGenerationPanel.cs
===================================================================
--- trunk/MonoDevelop/Core/src/Main/Base/Gui/Dialogs/OptionPanels/IDEOptions/CodeGenerationPanel.cs	2004-12-05 09:39:17 UTC (rev 2052)
+++ trunk/MonoDevelop/Core/src/Main/Base/Gui/Dialogs/OptionPanels/IDEOptions/CodeGenerationPanel.cs	2004-12-06 15:43:16 UTC (rev 2053)
@@ -16,6 +16,7 @@
 using MonoDevelop.Gui.Components;
 using MonoDevelop.Core.Services;
 using MonoDevelop.Core.AddIns;
+using MonoDevelop.Services;
 
 using Gtk;
 using MonoDevelop.Gui.Widgets;
@@ -24,8 +25,7 @@
 	public class CodeGenerationPanel : AbstractOptionPanel {
 		
 		class CodeGenerationPanelWidget : GladeWidgetExtract {
-			PropertyService p = (PropertyService)ServiceManager.GetService (typeof (PropertyService));
-			StringParserService StringParserService = (StringParserService)ServiceManager.GetService (typeof (StringParserService));
+			PropertyService p = Runtime.Properties;
 			
 			[Glade.Widget] Label hdr_code_generation_options;
 			
@@ -73,7 +73,6 @@
 		
 		CodeGenerationPanelWidget widget;
 		
-		PropertyService PropertyService = (PropertyService)ServiceManager.GetService (typeof (PropertyService));
 		const string codeGenerationProperty = "SharpDevelop.UI.CodeGenerationOptions";
 		
 		public override void LoadPanelContents ()

Modified: trunk/MonoDevelop/Core/src/Main/Base/Gui/Dialogs/OptionPanels/IDEOptions/LoadSavePanel.cs
===================================================================
--- trunk/MonoDevelop/Core/src/Main/Base/Gui/Dialogs/OptionPanels/IDEOptions/LoadSavePanel.cs	2004-12-05 09:39:17 UTC (rev 2052)
+++ trunk/MonoDevelop/Core/src/Main/Base/Gui/Dialogs/OptionPanels/IDEOptions/LoadSavePanel.cs	2004-12-06 15:43:16 UTC (rev 2053)
@@ -10,7 +10,7 @@
 using System.Collections;
 
 using MonoDevelop.Gui.Dialogs;
-using MonoDevelop.Core.Services;
+using MonoDevelop.Services;
 using MonoDevelop.Core.AddIns.Codons;
 
 using Gtk;
@@ -57,16 +57,6 @@
 			[Glade.Widget] public Gtk.Label terminatorLabel;	
 			[Glade.Widget] public Gtk.Label locationLabel;
 			
-			// services needed
-			StringParserService StringParserService = (StringParserService)ServiceManager.GetService (
-				typeof (StringParserService));
-			PropertyService PropertyService = (PropertyService)ServiceManager.GetService (
-				typeof (PropertyService));
-			FileUtilityService FileUtilityService = (FileUtilityService)ServiceManager.GetService (
-				typeof (FileUtilityService));
-			MessageService MessageService = (MessageService)ServiceManager.GetService (
-				typeof (MessageService));
-
 			public enum LineTerminatorStyle {
 				Windows,
 				Macintosh,
@@ -78,7 +68,7 @@
 				//
 				// load the internationalized strings.
 				//
-				projectLocationTextBox.GtkEntry.Text = PropertyService.GetProperty(
+				projectLocationTextBox.GtkEntry.Text = Runtime.Properties.GetProperty(
 					"MonoDevelop.Gui.Dialogs.NewProjectDialog.DefaultPath", 
 					System.IO.Path.Combine(System.Environment.GetEnvironmentVariable ("HOME"),
 							"Projects")).ToString();
@@ -86,23 +76,23 @@
 				//
 				// setup the properties
 				//
-				loadUserDataCheckButton.Active = PropertyService.GetProperty (
+				loadUserDataCheckButton.Active = Runtime.Properties.GetProperty (
 					"SharpDevelop.LoadDocumentProperties", true);
-				createBackupCopyCheckButton.Active = PropertyService.GetProperty (
+				createBackupCopyCheckButton.Active = Runtime.Properties.GetProperty (
 					"SharpDevelop.CreateBackupCopy", false);
-				loadPrevProjectCheckButton.Active = (bool) PropertyService.GetProperty(
+				loadPrevProjectCheckButton.Active = (bool) Runtime.Properties.GetProperty(
 					"SharpDevelop.LoadPrevProjectOnStartup", false);
 				
 				if (LineTerminatorStyle.Windows.Equals (
-					    PropertyService.GetProperty (
+					    Runtime.Properties.GetProperty (
 						    "SharpDevelop.LineTerminatorStyle", LineTerminatorStyle.Unix)))  {
 					windowsRadioButton.Active = true;}
 				else if  (LineTerminatorStyle.Macintosh.Equals (
-						  PropertyService.GetProperty 
+						  Runtime.Properties.GetProperty 
 						  ("SharpDevelop.LineTerminatorStyle", LineTerminatorStyle.Unix)))  {
 					macintoshRadioButton.Active = true;}
 				else if (LineTerminatorStyle.Unix.Equals (
-						 PropertyService.GetProperty (
+						 Runtime.Properties.GetProperty (
 							 "SharpDevelop.LineTerminatorStyle", LineTerminatorStyle.Unix))) {
 					unixRadioButton.Active = true;}
 				
@@ -115,26 +105,26 @@
 			
 			public bool Store () 
 			{
-				PropertyService.SetProperty("SharpDevelop.LoadPrevProjectOnStartup", loadPrevProjectCheckButton.Active);
-				PropertyService.SetProperty ("SharpDevelop.LoadDocumentProperties",  loadUserDataCheckButton.Active);
-				PropertyService.SetProperty ("SharpDevelop.CreateBackupCopy",        createBackupCopyCheckButton.Active);
+				Runtime.Properties.SetProperty("SharpDevelop.LoadPrevProjectOnStartup", loadPrevProjectCheckButton.Active);
+				Runtime.Properties.SetProperty ("SharpDevelop.LoadDocumentProperties",  loadUserDataCheckButton.Active);
+				Runtime.Properties.SetProperty ("SharpDevelop.CreateBackupCopy",        createBackupCopyCheckButton.Active);
 				
 				if (windowsRadioButton.Active) {
-					PropertyService.SetProperty ("SharpDevelop.LineTerminatorStyle", LineTerminatorStyle.Windows);} 
+					Runtime.Properties.SetProperty ("SharpDevelop.LineTerminatorStyle", LineTerminatorStyle.Windows);} 
 				else if (macintoshRadioButton.Active) {
-					PropertyService.SetProperty ("SharpDevelop.LineTerminatorStyle", LineTerminatorStyle.Macintosh);} 
+					Runtime.Properties.SetProperty ("SharpDevelop.LineTerminatorStyle", LineTerminatorStyle.Macintosh);} 
 				else if (unixRadioButton.Active){
-					PropertyService.SetProperty ("SharpDevelop.LineTerminatorStyle", LineTerminatorStyle.Unix);}
+					Runtime.Properties.SetProperty ("SharpDevelop.LineTerminatorStyle", LineTerminatorStyle.Unix);}
 				
 				// check for correct settings
 				string projectPath = projectLocationTextBox.GtkEntry.Text;
 				if (projectPath.Length > 0) {
-					if (!FileUtilityService.IsValidFileName(projectPath)) {
-						MessageService.ShowError("Invalid project path specified");
+					if (!Runtime.FileUtilityService.IsValidFileName(projectPath)) {
+						Runtime.MessageService.ShowError("Invalid project path specified");
 						return false;
 					}
 				}
-				PropertyService.SetProperty("MonoDevelop.Gui.Dialogs.NewProjectDialog.DefaultPath", projectPath);
+				Runtime.Properties.SetProperty("MonoDevelop.Gui.Dialogs.NewProjectDialog.DefaultPath", projectPath);
 				
 				return true;
 			}

Modified: trunk/MonoDevelop/Core/src/Main/Base/Gui/Dialogs/OptionPanels/IDEOptions/ProjectAndCombinePanel.cs
===================================================================
--- trunk/MonoDevelop/Core/src/Main/Base/Gui/Dialogs/OptionPanels/IDEOptions/ProjectAndCombinePanel.cs	2004-12-05 09:39:17 UTC (rev 2052)
+++ trunk/MonoDevelop/Core/src/Main/Base/Gui/Dialogs/OptionPanels/IDEOptions/ProjectAndCombinePanel.cs	2004-12-06 15:43:16 UTC (rev 2053)
@@ -27,9 +27,6 @@
 	public class ProjectAndCombinePanel : AbstractOptionPanel
 	{
 
-		// service instances needed
-		PropertyService PropertyService = (PropertyService)ServiceManager.GetService (typeof (PropertyService));
-		
 		ProjectAndCombinePanelWidget widget;
 		const string projectAndCombineProperty = "SharpDevelop.UI.ProjectAndCombineOptions";
 
@@ -59,25 +56,20 @@
 			[Glade.Widget] public Gtk.Label buildAndRunOptionsLabel;   
 
 			// service instances needed
-			StringParserService StringParserService = (StringParserService)ServiceManager.GetService (
-				typeof (StringParserService));
-			PropertyService PropertyService = (PropertyService)ServiceManager.GetService (
-				typeof (PropertyService));
-
 			public  ProjectAndCombinePanelWidget () : base ("Base.glade", "ProjectAndCombinePanel")
 			{
 				//
 				// reading properties
 				//
-				BeforeCompileAction action = (BeforeCompileAction) PropertyService.GetProperty(
+				BeforeCompileAction action = (BeforeCompileAction) Runtime.Properties.GetProperty(
 					"SharpDevelop.Services.DefaultParserService.BeforeCompileAction", 
 					BeforeCompileAction.SaveAllFiles);
 				saveChangesRadioButton.Active = action.Equals(BeforeCompileAction.SaveAllFiles);
 				promptChangesRadioButton.Active = action.Equals(BeforeCompileAction.PromptForSave);
 				noSaveRadioButton.Active = action.Equals(BeforeCompileAction.Nothing);
-				showTaskListCheckBox.Active = (bool)PropertyService.GetProperty(
+				showTaskListCheckBox.Active = (bool)Runtime.Properties.GetProperty(
 					"SharpDevelop.ShowTaskListAfterBuild", true);
-				showOutputCheckBox.Active = (bool)PropertyService.GetProperty(
+				showOutputCheckBox.Active = (bool)Runtime.Properties.GetProperty(
 					"SharpDevelop.ShowOutputWindowAtBuild", true);
 			}
 			
@@ -85,18 +77,18 @@
 			{
 				// set properties
 				if (saveChangesRadioButton.Active) {
-					PropertyService.SetProperty("SharpDevelop.Services.DefaultParserService.BeforeCompileAction", 
+					Runtime.Properties.SetProperty("SharpDevelop.Services.DefaultParserService.BeforeCompileAction", 
 							BeforeCompileAction.SaveAllFiles);
 				} else if (promptChangesRadioButton.Active) {
-					PropertyService.SetProperty("SharpDevelop.Services.DefaultParserService.BeforeCompileAction", 
+					Runtime.Properties.SetProperty("SharpDevelop.Services.DefaultParserService.BeforeCompileAction", 
 							BeforeCompileAction.PromptForSave);
 				} else if (noSaveRadioButton.Active) {
-					PropertyService.SetProperty("SharpDevelop.Services.DefaultParserService.BeforeCompileAction", 
+					Runtime.Properties.SetProperty("SharpDevelop.Services.DefaultParserService.BeforeCompileAction", 
 							BeforeCompileAction.Nothing);
 				}
 				
-				PropertyService.SetProperty("SharpDevelop.ShowTaskListAfterBuild", showTaskListCheckBox.Active);
-				PropertyService.SetProperty("SharpDevelop.ShowOutputWindowAtBuild", showOutputCheckBox.Active);
+				Runtime.Properties.SetProperty("SharpDevelop.ShowTaskListAfterBuild", showTaskListCheckBox.Active);
+				Runtime.Properties.SetProperty("SharpDevelop.ShowOutputWindowAtBuild", showOutputCheckBox.Active);
 			}
 		}
 	}

Modified: trunk/MonoDevelop/Core/src/Main/Base/Gui/Dialogs/OptionPanels/IDEOptions/SelectStylePanel.cs
===================================================================
--- trunk/MonoDevelop/Core/src/Main/Base/Gui/Dialogs/OptionPanels/IDEOptions/SelectStylePanel.cs	2004-12-05 09:39:17 UTC (rev 2052)
+++ trunk/MonoDevelop/Core/src/Main/Base/Gui/Dialogs/OptionPanels/IDEOptions/SelectStylePanel.cs	2004-12-06 15:43:16 UTC (rev 2053)
@@ -12,7 +12,7 @@
 using MonoDevelop.Core.AddIns.Codons;
 using MonoDevelop.Core.Properties;
 using MonoDevelop.Gui.Components;
-using MonoDevelop.Core.Services;
+using MonoDevelop.Services;
 using MonoDevelop.Core.AddIns;
 
 using Gtk;
@@ -22,7 +22,6 @@
 {
 	public class SelectStylePanel : AbstractOptionPanel
 	{
-		PropertyService PropertyService = (PropertyService)ServiceManager.GetService (typeof (PropertyService));
 		SelectStylePanelWidget widget;
 		const string selectStyleProperty = "SharpDevelop.UI.SelectStyleOptions";
 
@@ -39,8 +38,6 @@
 
 		class SelectStylePanelWidget : GladeWidgetExtract 
 		{
-
-			PropertyService p = (PropertyService)ServiceManager.GetService (typeof (PropertyService));
 			//FIXME: Hashtables are wrong here.
 			//FIXME: Yes, this is a dirty hack.
 			//FIXME: Lets use something else.
@@ -56,8 +53,8 @@
 					
 			public SelectStylePanelWidget () : base ("Base.glade", "SelectStylePanel")
 			{
-				extensionButton.Active  = p.GetProperty("MonoDevelop.Gui.ProjectBrowser.ShowExtensions", true);
-				hiddenButton.Active  = p.GetProperty("MonoDevelop.Gui.FileScout.ShowHidden", false);
+				extensionButton.Active  = Runtime.Properties.GetProperty("MonoDevelop.Gui.ProjectBrowser.ShowExtensions", true);
+				hiddenButton.Active  = Runtime.Properties.GetProperty("MonoDevelop.Gui.FileScout.ShowHidden", false);
 
 // commented out by jba - 23 feb 04, deosn't seem to be used
 //				ambienceMenu = new Gtk.Menu ();
@@ -83,8 +80,8 @@
 			
 			public void Store()
 			{
-				p.SetProperty("MonoDevelop.Gui.ProjectBrowser.ShowExtensions", extensionButton.Active);
-				p.SetProperty("MonoDevelop.Gui.FileScout.ShowHidden", hiddenButton.Active);
+				Runtime.Properties.SetProperty("MonoDevelop.Gui.ProjectBrowser.ShowExtensions", extensionButton.Active);
+				Runtime.Properties.SetProperty("MonoDevelop.Gui.FileScout.ShowHidden", hiddenButton.Active);
 //				p.SetProperty("SharpDevelop.UI.CurrentAmbience", (string)MenuToValue[ambienceMenu.Active]);
 			}
 		}

Modified: trunk/MonoDevelop/Core/src/Main/Base/Gui/Dialogs/OptionPanels/ProjectOptions/CompileFileProjectOptions.cs
===================================================================
--- trunk/MonoDevelop/Core/src/Main/Base/Gui/Dialogs/OptionPanels/ProjectOptions/CompileFileProjectOptions.cs	2004-12-05 09:39:17 UTC (rev 2052)
+++ trunk/MonoDevelop/Core/src/Main/Base/Gui/Dialogs/OptionPanels/ProjectOptions/CompileFileProjectOptions.cs	2004-12-06 15:43:16 UTC (rev 2053)
@@ -25,8 +25,6 @@
 {
 	public class CompileFileProjectOptions : AbstractOptionPanel
 	{
-		static MessageService messageService = (MessageService) ServiceManager.GetService (typeof (MessageService));
-
 		class CompileFileOptionsWidget : GladeWidgetExtract 
 		{
 			// Gtk Controls
@@ -34,10 +32,6 @@
 			[Glade.Widget] Gtk.TreeView includeTreeView;
 			public ListStore store;
 			
-			// Services
-			StringParserService StringParserService = (StringParserService) ServiceManager.GetService (typeof (StringParserService));
-			FileUtilityService fileUtilityService = (FileUtilityService) ServiceManager.GetService (typeof (FileUtilityService));
-
 			IProject project;
 
 			public CompileFileOptionsWidget (IProperties CustomizationObject) : 
@@ -59,7 +53,7 @@
 				
 				foreach (ProjectFile info in project.ProjectFiles) {
 					if (info.BuildAction == BuildAction.Nothing || info.BuildAction == BuildAction.Compile) {
-						string name = fileUtilityService.AbsoluteToRelativePath(
+						string name = Runtime.FileUtilityService.AbsoluteToRelativePath(
 							project.BaseDirectory, info.Name).Substring(2);
 						iter = store.AppendValues (info.BuildAction == BuildAction.Compile ? true : false, name);
 					}
@@ -88,7 +82,7 @@
 				for (int i = 0; i < store.IterNChildren() - 1 ; ++i) {
 					if (i != 0)
 						store.IterNext(ref current);
-					string name = fileUtilityService.RelativeToAbsolutePath(
+					string name = Runtime.FileUtilityService.RelativeToAbsolutePath(
 						project.BaseDirectory, "." + System.IO.Path.DirectorySeparatorChar + store.GetValue(current, 1));
 					int j = 0;
 					while (j < project.ProjectFiles.Count && project.ProjectFiles[j].Name != name) {
@@ -97,7 +91,7 @@
 					if (j < project.ProjectFiles.Count) {
 						project.ProjectFiles[j].BuildAction = (bool) store.GetValue(current, 0) ? BuildAction.Compile : BuildAction.Nothing;
 					} else {
-						messageService.ShowError (String.Format (GettextCatalog.GetString ("File {0} not found in {1}."), name, project.Name));
+						Runtime.MessageService.ShowError (String.Format (GettextCatalog.GetString ("File {0} not found in {1}."), name, project.Name));
 						success = false;
 					}
 				}

Modified: trunk/MonoDevelop/Core/src/Main/Base/Gui/Dialogs/OptionPanels/ProjectOptions/DeployFileOptions.cs
===================================================================
--- trunk/MonoDevelop/Core/src/Main/Base/Gui/Dialogs/OptionPanels/ProjectOptions/DeployFileOptions.cs	2004-12-05 09:39:17 UTC (rev 2052)
+++ trunk/MonoDevelop/Core/src/Main/Base/Gui/Dialogs/OptionPanels/ProjectOptions/DeployFileOptions.cs	2004-12-06 15:43:16 UTC (rev 2053)
@@ -43,9 +43,7 @@
 
 			// Services
 			IProject project;
-			static FileUtilityService fileUtilityService = (FileUtilityService) ServiceManager.GetService(typeof(FileUtilityService));
-			StringParserService StringParserService = (StringParserService)ServiceManager.GetService (typeof (StringParserService));
-			MessageService messageService = (MessageService) ServiceManager.GetService (typeof (MessageService));
+			static FileUtilityService fileUtilityService = Runtime.FileUtilityService;
 
 			public DeployFileOptionsWidget (IProperties CustomizationObject) : 
 				base ("Base.glade", "DeployFileOptionsPanel")
@@ -129,20 +127,20 @@
 			{
 				if (deployTargetEntry.Text.Length > 0) {
 					if (!fileUtilityService.IsValidFileName(deployTargetEntry.Text)) {
-						messageService.ShowError (GettextCatalog.GetString ("Invalid deploy target specified"));
+						Runtime.MessageService.ShowError (GettextCatalog.GetString ("Invalid deploy target specified"));
 						return false;
 					}
 				}
 				
 				if (deployScriptEntry.Text.Length > 0) {
 					if (!fileUtilityService.IsValidFileName(deployScriptEntry.Text)) {
-						messageService.ShowError (GettextCatalog.GetString ("Invalid deploy script specified"));
+						Runtime.MessageService.ShowError (GettextCatalog.GetString ("Invalid deploy script specified"));
 						return false;				
 					}
 				}
 				
 				if (!System.IO.File.Exists(deployScriptEntry.Text)) {
-					messageService.ShowError (GettextCatalog.GetString ("Deploy script doesn't exists"));
+					Runtime.MessageService.ShowError (GettextCatalog.GetString ("Deploy script doesn't exists"));
 					return false;
  				}
 			

Modified: trunk/MonoDevelop/Core/src/Main/Base/Gui/Dialogs/OptionPanels/ProjectOptions/GeneralProjectOptions.cs
===================================================================
--- trunk/MonoDevelop/Core/src/Main/Base/Gui/Dialogs/OptionPanels/ProjectOptions/GeneralProjectOptions.cs	2004-12-05 09:39:17 UTC (rev 2052)
+++ trunk/MonoDevelop/Core/src/Main/Base/Gui/Dialogs/OptionPanels/ProjectOptions/GeneralProjectOptions.cs	2004-12-06 15:43:16 UTC (rev 2053)
@@ -43,9 +43,6 @@
  			[Glade.Widget] CheckButton autoInsertNewFilesCheckButton;
  			[Glade.Widget] CheckButton enableViewStateCheckButton;
 
-			// Services
-			StringParserService StringParserService = (StringParserService)ServiceManager.GetService (
-							typeof (StringParserService));
 			IProject project;
 
 

Modified: trunk/MonoDevelop/Core/src/Main/Base/Gui/Dialogs/ProjectOptionsDialog.cs
===================================================================
--- trunk/MonoDevelop/Core/src/Main/Base/Gui/Dialogs/ProjectOptionsDialog.cs	2004-12-05 09:39:17 UTC (rev 2052)
+++ trunk/MonoDevelop/Core/src/Main/Base/Gui/Dialogs/ProjectOptionsDialog.cs	2004-12-06 15:43:16 UTC (rev 2053)
@@ -31,8 +31,6 @@
 		Gtk.CellRendererText textRenderer;		// used to set an editable node
 		Gtk.TreeViewColumn textColumn;			// used to set an editable node
 	
-		StringParserService StringParserService = (StringParserService)ServiceManager.GetService (typeof(StringParserService));
-		
 		public ProjectOptionsDialog(IProject project, IAddInTreeNode node, IAddInTreeNode configurationNode) : base(null, null)
 		{
 			this.project = project;
@@ -292,12 +290,10 @@
 	
 					// now see if the iter is the configuration root node iter
 					if (iter.Equals(configurationTreeNode)) {							
-						MenuService menuService = (MenuService)MonoDevelop.Core.Services.ServiceManager.GetService(typeof(MenuService));
-						menuService.ShowContextMenu(this, configNodeMenu, TreeView);
+						Runtime.Gui.Menus.ShowContextMenu(this, configNodeMenu, TreeView);
 					} else if (path.Indices[0] == configPath.Indices[0] && (path.Depth - configPath.Depth) == 1) {
 						// now see if it's a specific configuration node (i.e. the configuration root node is it's parent
-						MenuService menuService = (MenuService)MonoDevelop.Core.Services.ServiceManager.GetService(typeof(MenuService));
-						menuService.ShowContextMenu(this, selectConfigNodeMenu, TreeView);
+						Runtime.Gui.Menus.ShowContextMenu(this, selectConfigNodeMenu, TreeView);
 					}
 					
 				}

Modified: trunk/MonoDevelop/Core/src/Main/Base/Gui/Dialogs/ReferenceDialog/AssemblyReferencePanel.cs
===================================================================
--- trunk/MonoDevelop/Core/src/Main/Base/Gui/Dialogs/ReferenceDialog/AssemblyReferencePanel.cs	2004-12-05 09:39:17 UTC (rev 2052)
+++ trunk/MonoDevelop/Core/src/Main/Base/Gui/Dialogs/ReferenceDialog/AssemblyReferencePanel.cs	2004-12-06 15:43:16 UTC (rev 2053)
@@ -33,7 +33,6 @@
 		
 		void SelectReferenceDialog(object sender, EventArgs e)
 		{
-			StringParserService stringParserService = (StringParserService)ServiceManager.GetService(typeof(StringParserService));
 			using (FileSelector fdiag = new FileSelector (GettextCatalog.GetString ("Find .Net Assembly"))) {
 			// FIXME: this should only allow dll's and exe's
 			// fdiag.Complete("*");
@@ -57,9 +56,8 @@
 							System.IO.Path.GetFileName(file),
 							file);
 						} else {
-							IMessageService messageService =(IMessageService)ServiceManager.GetService(typeof(IMessageService));
 							// FIXME: il8n this
-							messageService.ShowError(String.Format (GettextCatalog.GetString ("File {0} is not a valid .Net Assembly"), file));
+							Runtime.MessageService.ShowError(String.Format (GettextCatalog.GetString ("File {0} is not a valid .Net Assembly"), file));
 						}
 					}
 				}

Modified: trunk/MonoDevelop/Core/src/Main/Base/Gui/Dialogs/ReferenceDialog/GacReferencePanel.cs
===================================================================
--- trunk/MonoDevelop/Core/src/Main/Base/Gui/Dialogs/ReferenceDialog/GacReferencePanel.cs	2004-12-05 09:39:17 UTC (rev 2052)
+++ trunk/MonoDevelop/Core/src/Main/Base/Gui/Dialogs/ReferenceDialog/GacReferencePanel.cs	2004-12-06 15:43:16 UTC (rev 2053)
@@ -136,8 +136,7 @@
 				}
 			}
 			#endif
-			SystemAssemblyService sas = (SystemAssemblyService)ServiceManager.GetService (typeof (SystemAssemblyService));
-			foreach (string assemblyPath in sas.AssemblyPaths) {
+			foreach (string assemblyPath in Runtime.SystemAssemblyService.AssemblyPaths) {
 				try {
 					System.Reflection.AssemblyName an = System.Reflection.AssemblyName.GetAssemblyName (assemblyPath);
 					store.AppendValues (an.Name, an.Version.ToString (), System.IO.Path.GetFileName (assemblyPath), false, an.FullName);

Modified: trunk/MonoDevelop/Core/src/Main/Base/Gui/Dialogs/ReferenceDialog/ProjectReferencePanel.cs
===================================================================
--- trunk/MonoDevelop/Core/src/Main/Base/Gui/Dialogs/ReferenceDialog/ProjectReferencePanel.cs	2004-12-05 09:39:17 UTC (rev 2052)
+++ trunk/MonoDevelop/Core/src/Main/Base/Gui/Dialogs/ReferenceDialog/ProjectReferencePanel.cs	2004-12-06 15:43:16 UTC (rev 2053)
@@ -48,8 +48,7 @@
 		void AddReference (TreeModel model, TreePath path, TreeIter iter)
 		{
 			IProject project = (IProject) model.GetValue (iter, 2);
-			LanguageBindingService languageBindingService = (LanguageBindingService)MonoDevelop.Core.Services.ServiceManager.GetService(typeof(LanguageBindingService));
-			ILanguageBinding binding = languageBindingService.GetBindingPerLanguageName(project.ProjectType);
+			ILanguageBinding binding = Runtime.Languages.GetBindingPerLanguageName(project.ProjectType);
 			
 			selectDialog.AddReference(ReferenceType.Project,
 						  project.Name,
@@ -63,10 +62,8 @@
 		
 		void PopulateListView ()
 		{
-			IProjectService projectService = (IProjectService)MonoDevelop.Core.Services.ServiceManager.GetService(typeof(IProjectService));
+			Combine openCombine = Runtime.ProjectService.CurrentOpenCombine;
 			
-			Combine openCombine = projectService.CurrentOpenCombine;
-			
 			if (openCombine == null) {
 				return;
 			}

Modified: trunk/MonoDevelop/Core/src/Main/Base/Gui/Dialogs/SharpDevelopAboutPanels.cs
===================================================================
--- trunk/MonoDevelop/Core/src/Main/Base/Gui/Dialogs/SharpDevelopAboutPanels.cs	2004-12-05 09:39:17 UTC (rev 2052)
+++ trunk/MonoDevelop/Core/src/Main/Base/Gui/Dialogs/SharpDevelopAboutPanels.cs	2004-12-06 15:43:16 UTC (rev 2053)
@@ -55,26 +55,22 @@
 		public AuthorAboutTabPage()
 		{
 			try {
-				FileUtilityService fileUtilityService = (FileUtilityService)ServiceManager.GetService(typeof(FileUtilityService));
-				PropertyService propertyService = (PropertyService)ServiceManager.GetService(typeof(PropertyService));
-				
-				string html = ConvertXml.ConvertToString(fileUtilityService.SharpDevelopRootPath +
+				string html = ConvertXml.ConvertToString (Runtime.FileUtilityService.SharpDevelopRootPath +
 				                   System.IO.Path.DirectorySeparatorChar + "doc" +
 				                   System.IO.Path.DirectorySeparatorChar + "AUTHORS.xml",
 				                   
-				                   propertyService.DataDirectory +
+				                   Runtime.Properties.DataDirectory +
 				                   System.IO.Path.DirectorySeparatorChar + "ConversionStyleSheets" + 
 				                   System.IO.Path.DirectorySeparatorChar + "ShowAuthors.xsl");
 				
 				
-				base.Css = propertyService.DataDirectory + System.IO.Path.DirectorySeparatorChar +
+				base.Css = Runtime.Properties.DataDirectory + System.IO.Path.DirectorySeparatorChar +
 				                           "resources" + System.IO.Path.DirectorySeparatorChar +
 				                           "css" + System.IO.Path.DirectorySeparatorChar +
 				                           "SharpDevelopStandard.css";
 				base.Html = html;
 			} catch (Exception e) {
-				IMessageService messageService = (IMessageService)ServiceManager.GetService(typeof(IMessageService));
-				messageService.ShowError(e);
+				Runtime.MessageService.ShowError(e);
 			}
 		}
 	}
@@ -84,18 +80,15 @@
 		public ChangeLogTabPage()
 		{
 			try {
-				FileUtilityService fileUtilityService = (FileUtilityService)ServiceManager.GetService(typeof(FileUtilityService));
-				PropertyService propertyService = (PropertyService)ServiceManager.GetService(typeof(PropertyService));
-				
-				string html = ConvertXml.ConvertToString(fileUtilityService.SharpDevelopRootPath +
+				string html = ConvertXml.ConvertToString (Runtime.FileUtilityService.SharpDevelopRootPath +
 				                   System.IO.Path.DirectorySeparatorChar + "doc" +
 				                   System.IO.Path.DirectorySeparatorChar + "ChangeLog.xml",
 				                   
-				                   propertyService.DataDirectory +
+				                   Runtime.Properties.DataDirectory +
 				                   System.IO.Path.DirectorySeparatorChar + "ConversionStyleSheets" + 
 				                   System.IO.Path.DirectorySeparatorChar + "ShowChangeLog.xsl");
 				
-				base.Css = propertyService.DataDirectory + System.IO.Path.DirectorySeparatorChar +
+				base.Css = Runtime.Properties.DataDirectory + System.IO.Path.DirectorySeparatorChar +
 				                           "resources" + System.IO.Path.DirectorySeparatorChar +
 				                           "css" + System.IO.Path.DirectorySeparatorChar +
 				                           "SharpDevelopStandard.css";
@@ -117,8 +110,7 @@
 				+ "</ul></body></html>";*/
 				
 			} catch (Exception e) {
-				IMessageService messageService = (IMessageService)ServiceManager.GetService(typeof(IMessageService));
-				messageService.ShowError(e);
+				Runtime.MessageService.ShowError (e);
 			}
 		}
 	}

Modified: trunk/MonoDevelop/Core/src/Main/Base/Gui/Dialogs/TipOfTheDay.cs
===================================================================
--- trunk/MonoDevelop/Core/src/Main/Base/Gui/Dialogs/TipOfTheDay.cs	2004-12-05 09:39:17 UTC (rev 2052)
+++ trunk/MonoDevelop/Core/src/Main/Base/Gui/Dialogs/TipOfTheDay.cs	2004-12-06 15:43:16 UTC (rev 2053)
@@ -12,14 +12,12 @@
 using Gtk;
 using MonoDevelop.Gui;
 using MonoDevelop.Core.Properties;
-using MonoDevelop.Core.Services;
+using MonoDevelop.Services;
 
 namespace MonoDevelop.Gui.Dialogs
 {
 	public class TipOfTheDayWindow
 	{
- 		PropertyService propertyService = (PropertyService)ServiceManager.GetService (typeof (PropertyService));
-
 		[Glade.Widget] Label categoryLabel;
 		[Glade.Widget] TextView tipTextview;
 		[Glade.Widget] CheckButton noshowCheckbutton;
@@ -39,14 +37,14 @@
 					
 			tipOfTheDayWindow.TypeHint = Gdk.WindowTypeHint.Dialog;
 
-			noshowCheckbutton.Active = propertyService.GetProperty ("MonoDevelop.Gui.Dialog.TipOfTheDayView.ShowTipsAtStartup", false);
+			noshowCheckbutton.Active = Runtime.Properties.GetProperty ("MonoDevelop.Gui.Dialog.TipOfTheDayView.ShowTipsAtStartup", false);
 			noshowCheckbutton.Toggled += new EventHandler (OnNoshow);
 			nextButton.Clicked += new EventHandler (OnNext);
 			closeButton.Clicked += new EventHandler (OnClose);
 			tipOfTheDayWindow.DeleteEvent += new DeleteEventHandler (OnDelete);
 
  			XmlDocument doc = new XmlDocument();
- 			doc.Load (propertyService.DataDirectory +
+ 			doc.Load (Runtime.Properties.DataDirectory +
 				  System.IO.Path.DirectorySeparatorChar + "options" +
 				  System.IO.Path.DirectorySeparatorChar + "TipsOfTheDay.xml");
 			ParseTips (doc.DocumentElement);
@@ -57,12 +55,11 @@
 
 		private void ParseTips (XmlElement el)
 		{
- 			StringParserService stringParserService = (StringParserService)ServiceManager.GetService (typeof (StringParserService));
  			XmlNodeList nodes = el.ChildNodes;
  			tips = new string[nodes.Count];
 			
  			for (int i = 0; i < nodes.Count; i++) {
- 				tips[i] = stringParserService.Parse (nodes[i].InnerText);
+ 				tips[i] = Runtime.StringParserService.Parse (nodes[i].InnerText);
  			}
 			
  			currentTip = (new Random ().Next ()) % nodes.Count;
@@ -70,7 +67,7 @@
 
 		void OnNoshow (object obj, EventArgs args)
 		{
-			propertyService.SetProperty ("MonoDevelop.Gui.Dialog.TipOfTheDayView.ShowTipsAtStartup",
+			Runtime.Properties.SetProperty ("MonoDevelop.Gui.Dialog.TipOfTheDayView.ShowTipsAtStartup",
 						    noshowCheckbutton.Active);
 		}
 

Modified: trunk/MonoDevelop/Core/src/Main/Base/Gui/Dialogs/TreeViewOptions.cs
===================================================================
--- trunk/MonoDevelop/Core/src/Main/Base/Gui/Dialogs/TreeViewOptions.cs	2004-12-05 09:39:17 UTC (rev 2052)
+++ trunk/MonoDevelop/Core/src/Main/Base/Gui/Dialogs/TreeViewOptions.cs	2004-12-06 15:43:16 UTC (rev 2053)
@@ -38,8 +38,6 @@
 		[Glade.Widget] Gtk.Image     panelImage;
 		[Glade.Widget] Gtk.Dialog    TreeViewOptionDialog;
 		
-		StringParserService StringParserService = (StringParserService) ServiceManager.GetService (typeof (StringParserService));
-		
 		public IProperties Properties {
 			get {
 				return properties;

Modified: trunk/MonoDevelop/Core/src/Main/Base/Gui/Dialogs/ViewGPLDialog.cs
===================================================================
--- trunk/MonoDevelop/Core/src/Main/Base/Gui/Dialogs/ViewGPLDialog.cs	2004-12-05 09:39:17 UTC (rev 2052)
+++ trunk/MonoDevelop/Core/src/Main/Base/Gui/Dialogs/ViewGPLDialog.cs	2004-12-06 15:43:16 UTC (rev 2053)
@@ -10,7 +10,7 @@
 using Gtk;
 
 using MonoDevelop.Core.Properties;
-using MonoDevelop.Core.Services;
+using MonoDevelop.Services;
 
 namespace MonoDevelop.Gui.Dialogs
 {
@@ -21,12 +21,11 @@
 
 		public ViewGPLDialog () 
 		{
-			FileUtilityService fileUtilityService = (FileUtilityService)ServiceManager.GetService(typeof(FileUtilityService));
-			string filename = fileUtilityService.SharpDevelopRootPath + 
+			string filename = Runtime.FileUtilityService.SharpDevelopRootPath + 
 			System.IO.Path.DirectorySeparatorChar + "doc" +
 			System.IO.Path.DirectorySeparatorChar + "license.txt";
 			
-			if (fileUtilityService.TestFileExists(filename)) {
+			if (Runtime.FileUtilityService.TestFileExists(filename)) {
 				Glade.XML gplDialog = new Glade.XML (null, "Base.glade", "GPLDialog", null);
 				gplDialog.Autoconnect (this);
 				GPLDialog.DefaultResponse = ResponseType.Close;

Modified: trunk/MonoDevelop/Core/src/Main/Base/Gui/Dialogs/Wizard/StatusPanel.cs
===================================================================
--- trunk/MonoDevelop/Core/src/Main/Base/Gui/Dialogs/Wizard/StatusPanel.cs	2004-12-05 09:39:17 UTC (rev 2052)
+++ trunk/MonoDevelop/Core/src/Main/Base/Gui/Dialogs/Wizard/StatusPanel.cs	2004-12-06 15:43:16 UTC (rev 2053)
@@ -34,7 +34,6 @@
 		Pango.FontDescription smallFont;
 		Pango.FontDescription normalFont;
 		Pango.FontDescription boldFont;
-		ResourceService resourceService = (ResourceService)ServiceManager.GetService(typeof(ResourceService));
 		
 		public StatusPanel(WizardDialog wizard)
 		{
@@ -47,7 +46,7 @@
 			this.wizard = wizard;
 			SetSizeRequest (198, 400);
 
-			bitmap = resourceService.GetBitmap ("GeneralWizardBackground");
+			bitmap = Runtime.Gui.Resources.GetBitmap ("GeneralWizardBackground");
 
 			AddEvents ((int) (Gdk.EventMask.ExposureMask));
 			ExposeEvent += new Gtk.ExposeEventHandler (OnPaint);

Modified: trunk/MonoDevelop/Core/src/Main/Base/Gui/Dialogs/Wizard/WizardDialog.cs
===================================================================
--- trunk/MonoDevelop/Core/src/Main/Base/Gui/Dialogs/Wizard/WizardDialog.cs	2004-12-05 09:39:17 UTC (rev 2052)
+++ trunk/MonoDevelop/Core/src/Main/Base/Gui/Dialogs/Wizard/WizardDialog.cs	2004-12-06 15:43:16 UTC (rev 2053)
@@ -280,8 +280,6 @@
 		
 		void InitializeComponents()
 		{
-			PropertyService propertyService = (PropertyService)ServiceManager.GetService(typeof(PropertyService));
-		
 			dialogPanel.Shadow = Gtk.ShadowType.None;
 		
 			//this.GdkWindow.SkipPagerHint = true;

Modified: trunk/MonoDevelop/Core/src/Main/Base/Gui/Dialogs/WordCountDialog.cs
===================================================================
--- trunk/MonoDevelop/Core/src/Main/Base/Gui/Dialogs/WordCountDialog.cs	2004-12-05 09:39:17 UTC (rev 2052)
+++ trunk/MonoDevelop/Core/src/Main/Base/Gui/Dialogs/WordCountDialog.cs	2004-12-06 15:43:16 UTC (rev 2053)
@@ -28,9 +28,6 @@
 		ArrayList items;
 		Report total;
 		
-		StringParserService stringParserService = (StringParserService)MonoDevelop.Core.Services.ServiceManager.GetService(typeof(StringParserService));
-		MessageService messageService = (MessageService)MonoDevelop.Core.Services.ServiceManager.GetService (typeof(MessageService));
-		
 		internal class Report
 		{
 			public string name;
@@ -95,7 +92,7 @@
 					IWorkbenchWindow window = WorkbenchSingleton.Workbench.ActiveWorkbenchWindow;
 					if (window != null) {
 						if (window.ViewContent.ContentName == null) {
-							messageService.ShowWarning (GettextCatalog.GetString ("You must save the file"));
+							Runtime.MessageService.ShowWarning (GettextCatalog.GetString ("You must save the file"));
 						} else {
 							Report r = GetReport(window.ViewContent.ContentName);
 							if (r != null) items.Add(r);
@@ -112,7 +109,7 @@
 					total = new Report (GettextCatalog.GetString ("total"), 0, 0, 0);
 					foreach (IViewContent content in WorkbenchSingleton.Workbench.ViewContentCollection) {
 						if (content.ContentName == null) {
-							messageService.ShowWarning (GettextCatalog.GetString ("You must save the file"));
+							Runtime.MessageService.ShowWarning (GettextCatalog.GetString ("You must save the file"));
 							continue;
 						} else {
 							Report r = GetReport(content.ContentName);
@@ -127,7 +124,7 @@
 					}
 					
 					if (dirty) {
-						messageService.ShowWarning (GettextCatalog.GetString ("Unsaved changed to open files were not included in counting"));
+						Runtime.MessageService.ShowWarning (GettextCatalog.GetString ("Unsaved changed to open files were not included in counting"));
 					}
 					
 					store.AppendValues ("", "", "", "");
@@ -137,14 +134,12 @@
 				break;
 				}
 				case 2: {// whole project
-					IProjectService projectService = (IProjectService)MonoDevelop.Core.Services.ServiceManager.GetService(typeof(IProjectService));
-					
-					if (projectService.CurrentOpenCombine == null) {
-						messageService.ShowError (GettextCatalog.GetString ("You must be in project mode"));
+					if (Runtime.ProjectService.CurrentOpenCombine == null) {
+						Runtime.MessageService.ShowError (GettextCatalog.GetString ("You must be in project mode"));
 						break;
 					}
 					total = new Report (GettextCatalog.GetString ("total"), 0, 0, 0);
-					CountCombine(projectService.CurrentOpenCombine, ref total);
+					CountCombine (Runtime.ProjectService.CurrentOpenCombine, ref total);
 					store.AppendValues ("", "", "", "");
 					//string[] allItems = all.ToListItem ();
 					//store.AppendValues (allItems[0], allItems[1], allItems[2], allItems[3]);
@@ -314,8 +309,7 @@
 			store.AppendValues ("", "", "", "");
 			resultListView.Model = store;
 			
-			ResourceService resourceService = (ResourceService) ServiceManager.GetService(typeof(ResourceService));
-			this.Icon = resourceService.GetIcon ("Icons.16x16.FindIcon");
+			this.Icon = Runtime.Gui.Resources.GetIcon ("Icons.16x16.FindIcon");
 			this.TransientFor = (Window) WorkbenchSingleton.Workbench;
 			
 			HBox hbox = new HBox (false, 0);

Modified: trunk/MonoDevelop/Core/src/Main/Base/Gui/ErrorHandlers/GenericError.cs
===================================================================
--- trunk/MonoDevelop/Core/src/Main/Base/Gui/ErrorHandlers/GenericError.cs	2004-12-05 09:39:17 UTC (rev 2052)
+++ trunk/MonoDevelop/Core/src/Main/Base/Gui/ErrorHandlers/GenericError.cs	2004-12-06 15:43:16 UTC (rev 2053)
@@ -5,7 +5,7 @@
 //     <version value="$version"/>
 // </file>
 
-using MonoDevelop.Core.Services;
+using MonoDevelop.Services;
 
 namespace MonoDevelop.Gui.ErrorHandlers
 {
@@ -18,8 +18,7 @@
 		
 		public static void DisplayError(string message)
 		{
-			IMessageService messageService =(IMessageService)ServiceManager.GetService(typeof(IMessageService));
-			messageService.ShowError(message);
+			Runtime.MessageService.ShowError (message);
 		}
 	}
 }

Added: trunk/MonoDevelop/Core/src/Main/Base/Gui/GuiService.cs
===================================================================
--- trunk/MonoDevelop/Core/src/Main/Base/Gui/GuiService.cs	2004-12-05 09:39:17 UTC (rev 2052)
+++ trunk/MonoDevelop/Core/src/Main/Base/Gui/GuiService.cs	2004-12-06 15:43:16 UTC (rev 2053)
@@ -0,0 +1,69 @@
+
+using MonoDevelop.Core.Services;
+using MonoDevelop.Services;
+
+namespace MonoDevelop.Gui
+{
+	public class GuiService
+	{
+		DisplayBindingService displayBindingService;
+		MenuService menuService;
+		IWorkbench workbench;
+		ToolbarService toolbarService;
+		IconService icons;
+		ResourceService resourceService;
+		IStatusBarService statusBarService;
+		
+		public IWorkbench Workbench {
+			get { return MonoDevelop.Gui.WorkbenchSingleton.Workbench; }
+		}
+	
+		public DisplayBindingService DisplayBindings {
+			get {
+				if (displayBindingService == null)
+					displayBindingService = (DisplayBindingService) ServiceManager.GetService (typeof(DisplayBindingService));
+				return displayBindingService;
+			}
+		}
+	
+		public MenuService Menus {
+			get {
+				if (menuService == null)
+					menuService = (MenuService) ServiceManager.GetService (typeof(MenuService));
+				return menuService;
+			}
+		}
+	
+		public IStatusBarService StatusBar {
+			get {
+				if (statusBarService == null)
+					statusBarService = (IStatusBarService) ServiceManager.GetService (typeof(IStatusBarService));
+				return statusBarService;
+			}
+		}
+	
+		public ToolbarService Toolbars {
+			get {
+				if (toolbarService == null)
+					toolbarService = (ToolbarService) ServiceManager.GetService (typeof(ToolbarService));
+				return toolbarService;
+			}
+		}
+
+		public ResourceService Resources {
+			get {
+				if (resourceService == null)
+					resourceService = (ResourceService) ServiceManager.GetService (typeof(ResourceService));
+				return resourceService;
+			}
+		}
+	
+		public IconService Icons {
+			get {
+				if (icons == null)
+					icons = (IconService) ServiceManager.GetService (typeof(IconService));
+				return icons;
+			}
+		}
+	}
+}

Modified: trunk/MonoDevelop/Core/src/Main/Base/Gui/Pads/ClassScout/ClassScout.cs
===================================================================
--- trunk/MonoDevelop/Core/src/Main/Base/Gui/Pads/ClassScout/ClassScout.cs	2004-12-05 09:39:17 UTC (rev 2052)
+++ trunk/MonoDevelop/Core/src/Main/Base/Gui/Pads/ClassScout/ClassScout.cs	2004-12-06 15:43:16 UTC (rev 2053)
@@ -99,22 +99,17 @@
 		{
 			changeClassInformationHandler = new ClassInformationEventHandler(OnClassInformationChanged);
 			
-			FileUtilityService fileUtilityService = (FileUtilityService)ServiceManager.GetService(typeof(FileUtilityService));
-
 			LabelEdit     = false;
 
-			IProjectService projectService = (IProjectService)MonoDevelop.Core.Services.ServiceManager.GetService(typeof(IProjectService));
+			Runtime.ProjectService.CombineOpened += new CombineEventHandler(OnCombineOpen);
+			Runtime.ProjectService.CombineClosed += new CombineEventHandler(OnCombineClosed);
 
-			projectService.CombineOpened += new CombineEventHandler(OnCombineOpen);
-			projectService.CombineClosed += new CombineEventHandler(OnCombineClosed);
-
 			Gtk.ScrolledWindow sw = new Gtk.ScrolledWindow ();
 			sw.Add(this);
 			contentPanel = new Gtk.Frame();
 			contentPanel.Add(sw);
 			
-			AmbienceService ambienceService = (AmbienceService)ServiceManager.GetService(typeof(AmbienceService));
-			ambienceService.AmbienceChanged += new EventHandler(AmbienceChangedEvent);
+			Runtime.Ambience.AmbienceChanged += new EventHandler(AmbienceChangedEvent);
 
 			RowActivated += new Gtk.RowActivatedHandler(OnNodeActivated);
 			PopupMenu += OnPopupMenu;
@@ -141,15 +136,13 @@
 
 		void OnCombineClosed(object sender, CombineEventArgs e)
 		{
-			IParserService parserService  = (IParserService)MonoDevelop.Core.Services.ServiceManager.GetService(typeof(IParserService));
-			parserService.ClassInformationChanged -= changeClassInformationHandler;
+			Runtime.ParserService.ClassInformationChanged -= changeClassInformationHandler;
 			Nodes.Clear();
 		}
 		
 		void OnClassInformationChanged(object sender, ClassInformationEventArgs e)
 		{
-			DispatchService dispatcher = (DispatchService)ServiceManager.GetService (typeof (DispatchService));
-			dispatcher.GuiDispatch (new StatefulMessageHandler (ChangeClassInfo), e);
+			Runtime.DispatchService.GuiDispatch (new StatefulMessageHandler (ChangeClassInfo), e);
 		}
 		
 		void ChangeClassInfo (object e)
@@ -164,10 +157,8 @@
 			TreeNode node = SelectedNode;
 			if (node != null) {
 				ClassScoutTag tag = node.Tag as ClassScoutTag;
-				if (tag != null) {
-					IFileService fileService = (IFileService)MonoDevelop.Core.Services.ServiceManager.GetService(typeof(IFileService));
-					fileService.OpenFile(tag.FileName,new FileOpeningFinished(OnFileOpened));
-				}
+				if (tag != null)
+					Runtime.FileService.OpenFile(tag.FileName,new FileOpeningFinished(OnFileOpened));
 			}
 		}
 		
@@ -175,8 +166,7 @@
 		{
 			TreeNode node = SelectedNode;
 			ClassScoutTag tag = node.Tag as ClassScoutTag;
-			IFileService fileService = (IFileService)MonoDevelop.Core.Services.ServiceManager.GetService(typeof(IFileService));
-			IWorkbenchWindow window = fileService.GetOpenFile(tag.FileName);
+			IWorkbenchWindow window = Runtime.FileService.GetOpenFile(tag.FileName);
 			if (window == null) {
 				return;
 			}
@@ -236,8 +226,7 @@
 		{
 			AbstractClassScoutNode selectedBrowserNode = (AbstractClassScoutNode) SelectedNode;
 			if (selectedBrowserNode.ContextmenuAddinTreePath != null && selectedBrowserNode.ContextmenuAddinTreePath.Length > 0) {
-			MenuService menuService = (MenuService) MonoDevelop.Core.Services.ServiceManager.GetService (typeof (MenuService));
-			menuService.ShowContextMenu(this, selectedBrowserNode.ContextmenuAddinTreePath, this);
+				Runtime.Gui.Menus.ShowContextMenu(this, selectedBrowserNode.ContextmenuAddinTreePath, this);
 			}
 		}
 
@@ -271,8 +260,7 @@
 			Gdk.Threads.Enter();
 			DoPopulate();
 			Gdk.Threads.Leave();
-			IParserService parserService  = (IParserService)MonoDevelop.Core.Services.ServiceManager.GetService(typeof(IParserService));
-			parserService.ClassInformationChanged += changeClassInformationHandler;
+			Runtime.ParserService.ClassInformationChanged += changeClassInformationHandler;
 		}
 
 		public void ParseCombine(Combine combine)
@@ -291,8 +279,7 @@
 			if (p.ProjectType == "C#") {
 	 			foreach (ProjectFile finfo in p.ProjectFiles) {
 					if (finfo.BuildAction == BuildAction.Compile) {
-						IParserService parserService = (IParserService)MonoDevelop.Core.Services.ServiceManager.GetService(typeof(IParserService));
-						parserService.ParseFile(finfo.Name);
+						Runtime.ParserService.ParseFile (finfo.Name);
 					}
 	 			}
 			}
@@ -317,9 +304,7 @@
 
 		public void Populate(Combine combine, TreeNodeCollection nodes)
 		{
-			ClassBrowserIconsService classBrowserIconService = (ClassBrowserIconsService)ServiceManager.GetService(typeof(ClassBrowserIconsService));
 			TreeNode combineNode = new TreeNode(combine.Name);
-			//combineNode.SelectedImageIndex = combineNode.ImageIndex = classBrowserIconService.CombineIndex;
 			combineNode.Image = Stock.CombineIcon;
 			
 			lock (combine.Entries) {
@@ -352,10 +337,8 @@
 			// no builder found -> create 'dummy' node
 			if (!builderFound) {
 				TreeNode prjNode = new TreeNode(p.Name);
-				FileUtilityService fileUtilityService = (FileUtilityService)ServiceManager.GetService(typeof(FileUtilityService));
-				IconService iconService = (IconService)ServiceManager.GetService(typeof(IconService));
 				//prjNode.SelectedImageIndex = prjNode.ImageIndex = imageIndexOffset + iconService.GetImageIndexForProjectType(p.ProjectType);
-				prjNode.Image = iconService.GetImageForProjectType(p.ProjectType);
+				prjNode.Image = Runtime.Gui.Icons.GetImageForProjectType(p.ProjectType);
 				prjNode.Nodes.Add(new TreeNode(GettextCatalog.GetString ("No class builder found")));
 				prjNode.Tag = p;
 				nodes.Add(prjNode);

Modified: trunk/MonoDevelop/Core/src/Main/Base/Gui/Pads/ClassScout/NodeBuilder/DefaultDotNetClassScoutNodeBuilder.cs
===================================================================
--- trunk/MonoDevelop/Core/src/Main/Base/Gui/Pads/ClassScout/NodeBuilder/DefaultDotNetClassScoutNodeBuilder.cs	2004-12-05 09:39:17 UTC (rev 2052)
+++ trunk/MonoDevelop/Core/src/Main/Base/Gui/Pads/ClassScout/NodeBuilder/DefaultDotNetClassScoutNodeBuilder.cs	2004-12-06 15:43:16 UTC (rev 2053)
@@ -41,10 +41,7 @@
 
 		void GetCurrentAmbience()
 		{
-			ClassBrowserIconsService classBrowserIconService = (ClassBrowserIconsService)ServiceManager.GetService(typeof(ClassBrowserIconsService));
-			AmbienceService          ambienceService = (AmbienceService)ServiceManager.GetService(typeof(AmbienceService));
-
-			languageConversion = ambienceService.CurrentAmbience;
+			languageConversion = Runtime.Ambience.CurrentAmbience;
 			languageConversion.ConversionFlags = ConversionFlags.None;
 		}
 
@@ -61,8 +58,6 @@
 		
 		void RemoveFromClassTree (TreeNode projectNode, ClassCollection removed)
 		{
-			ClassBrowserIconsService classBrowserIconService = (ClassBrowserIconsService)ServiceManager.GetService(typeof(ClassBrowserIconsService));
-			
 			foreach (IClass c in removed) {
 				// TODO: Perf check
 				TreeNode node = GetNodeByPath (c.Namespace, projectNode, false);
@@ -92,14 +87,11 @@
 		public TreeNode BuildClassTreeNode(IProject p)
 		{
 			Type fus = typeof (FileUtilityService);
-			FileUtilityService fileUtilityService = (FileUtilityService)ServiceManager.GetService(fus);
-			Type iconserv = typeof (IconService);
 			
-			IconService iconService = (IconService)ServiceManager.GetService(iconserv);
 			GetCurrentAmbience();
 
 			TreeNode prjNode = new AbstractClassScoutNode(p.Name);
-			prjNode.Image = iconService.GetImageForProjectType(p.ProjectType);
+			prjNode.Image = Runtime.Gui.Icons.GetImageForProjectType(p.ProjectType);
 			prjNode.Nodes.Add (new TreeNode (""));
 			prjNode.Tag = p;
 			return prjNode;
@@ -132,8 +124,7 @@
 			if (!NeedsExpansion (node)) return;
 			node.Nodes.Clear ();
 			
-			IParserService parserService  = (IParserService)MonoDevelop.Core.Services.ServiceManager.GetService(typeof(IParserService));
-			ArrayList contents = parserService.GetNamespaceContents (project, ns, false);
+			ArrayList contents = Runtime.ParserService.GetNamespaceContents (project, ns, false);
 			foreach (object item in contents)
 			{
 				if (item is string)
@@ -180,7 +171,7 @@
 		
 		TreeNode BuildClassNode (IClass c)
 		{
-			ClassBrowserIconsService classBrowserIconService = (ClassBrowserIconsService)ServiceManager.GetService(typeof(ClassBrowserIconsService));
+			IconService classBrowserIconService = Runtime.Gui.Icons;
 
 			AbstractClassScoutNode classNode = new AbstractClassScoutNode(c.Name);
 			string file = c.Region.FileName;
@@ -253,8 +244,7 @@
 				TreeNode node = GetNodeByPath (ns, projectNode, false);
 				if (node != null && node != projectNode) {
 					if (NeedsExpansion (node)) {
-						IParserService parserService  = (IParserService)MonoDevelop.Core.Services.ServiceManager.GetService(typeof(IParserService));
-						ArrayList contents = parserService.GetNamespaceContents (projectNode.Tag as IProject, ns, false);
+						ArrayList contents = Runtime.ParserService.GetNamespaceContents (projectNode.Tag as IProject, ns, false);
 						if (contents.Count == 0)
 							node.Remove ();
 					} else if (node.Nodes.Count == 0) {
@@ -266,8 +256,6 @@
 		
 		static TreeNode GetNodeByPath (string directory, TreeNode parentNode, bool create)
 		{
-			ClassBrowserIconsService classBrowserIconService = (ClassBrowserIconsService)ServiceManager.GetService(typeof(ClassBrowserIconsService));
-
 			string[] treepath   = directory.Split(new char[] { '.' });
 			TreeNode curnode = parentNode;
 			

Modified: trunk/MonoDevelop/Core/src/Main/Base/Gui/Pads/FileScout/FileList.cs
===================================================================
--- trunk/MonoDevelop/Core/src/Main/Base/Gui/Pads/FileScout/FileList.cs	2004-12-05 09:39:17 UTC (rev 2052)
+++ trunk/MonoDevelop/Core/src/Main/Base/Gui/Pads/FileScout/FileList.cs	2004-12-06 15:43:16 UTC (rev 2053)
@@ -29,8 +29,6 @@
 		public FileList ()
 		{
 			Items = new ArrayList ();
-			FileUtilityService fileUtilityService = (FileUtilityService)ServiceManager.GetService(typeof(FileUtilityService));
-			
 			store = new Gtk.TreeStore (typeof (string), typeof (string), typeof(string), typeof(FileListItem), typeof (Gdk.Pixbuf));
 			Model = store;
 
@@ -155,9 +153,7 @@
 		
 		private void OnDeleteFiles (object sender, EventArgs e)
 		{
-			IMessageService messageService =(IMessageService)ServiceManager.GetService(typeof(IMessageService));
-	
-			if (messageService.AskQuestion(GettextCatalog.GetString ("Are you sure you want to delete this file?"), GettextCatalog.GetString ("Delete files")))
+			if (Runtime.MessageService.AskQuestion(GettextCatalog.GetString ("Are you sure you want to delete this file?"), GettextCatalog.GetString ("Delete files")))
 			{
 				try
 				{
@@ -166,7 +162,7 @@
 				}
 				catch (Exception ex)
 				{
-					messageService.ShowError (ex, "Could not delete file '" + System.IO.Path.GetFileName (selectedItem.FullName) + "'");
+					Runtime.MessageService.ShowError (ex, "Could not delete file '" + System.IO.Path.GetFileName (selectedItem.FullName) + "'");
 				} 
 			}
 		}

Modified: trunk/MonoDevelop/Core/src/Main/Base/Gui/Pads/FileScout/FileScout.cs
===================================================================
--- trunk/MonoDevelop/Core/src/Main/Base/Gui/Pads/FileScout/FileScout.cs	2004-12-05 09:39:17 UTC (rev 2052)
+++ trunk/MonoDevelop/Core/src/Main/Base/Gui/Pads/FileScout/FileScout.cs	2004-12-06 15:43:16 UTC (rev 2053)
@@ -63,8 +63,7 @@
 		{
 			filelister.Clear ();
 
-			PropertyService p = (PropertyService)ServiceManager.GetService(typeof(PropertyService));
-			bool ignoreHidden = !p.GetProperty ("MonoDevelop.Gui.FileScout.ShowHidden", false);
+			bool ignoreHidden = !Runtime.Properties.GetProperty ("MonoDevelop.Gui.FileScout.ShowHidden", false);
 			fb.IgnoreHidden = ignoreHidden;
 
 			foreach (string f in fb.Files)
@@ -88,10 +87,6 @@
 
 		void FileSelected (object sender, Gtk.RowActivatedArgs e)
 		{
-			IProjectService projectService = (IProjectService)MonoDevelop.Core.Services.ServiceManager.GetService(typeof(IProjectService));
-			IFileService    fileService    = (IFileService)MonoDevelop.Core.Services.ServiceManager.GetService(typeof(IFileService));
-			FileUtilityService fileUtilityService = (FileUtilityService)ServiceManager.GetService(typeof(FileUtilityService));
-
 			Gtk.TreeIter iter;
 			Gtk.TreeModel model;
 
@@ -106,11 +101,11 @@
 				switch (System.IO.Path.GetExtension (item.FullName).ToUpper ()) {
 					case ".cmbx":
 					case ".prjx":
-						projectService.OpenCombine (item.FullName);
+						Runtime.ProjectService.OpenCombine (item.FullName);
 						break;
 					default:
 						//Console.WriteLine (item.FullName);
-						fileService.OpenFile (item.FullName);
+						Runtime.FileService.OpenFile (item.FullName);
 						break;
 				}
 			}

Modified: trunk/MonoDevelop/Core/src/Main/Base/Gui/Pads/HelpBrowser/HelpViewer.cs
===================================================================
--- trunk/MonoDevelop/Core/src/Main/Base/Gui/Pads/HelpBrowser/HelpViewer.cs	2004-12-05 09:39:17 UTC (rev 2052)
+++ trunk/MonoDevelop/Core/src/Main/Base/Gui/Pads/HelpBrowser/HelpViewer.cs	2004-12-06 15:43:16 UTC (rev 2053)
@@ -19,9 +19,6 @@
 
 		ScrolledWindow scroller = new ScrolledWindow ();
 
-		MonodocService mds;
-		IStatusBarService statusBarService = (IStatusBarService)        MonoDevelop.Core.Services.ServiceManager.GetService(typeof(IStatusBarService));
-
 		public override bool IsViewOnly {
 			get { return true; }
 		}
@@ -36,8 +33,6 @@
 
 		public HelpViewer ()
 		{
-			mds = (MonodocService)ServiceManager.GetService (typeof (MonodocService));
-	
 			html_viewer.LinkClicked += new LinkClickedHandler (LinkClicked);
 			html_viewer.UrlRequested += new UrlRequestedHandler (UrlRequested);
 			html_viewer.OnUrl += new OnUrlHandler (OnUrl);
@@ -47,15 +42,15 @@
 		void OnUrl (object sender, OnUrlArgs args)
 		{
 			if (args.Url == null)
-				statusBarService.SetMessage ("");
+				Runtime.Gui.StatusBar.SetMessage ("");
 			else
-				statusBarService.SetMessage (args.Url);
+				Runtime.Gui.StatusBar.SetMessage (args.Url);
 		}
 
 		void UrlRequested (object sender, UrlRequestedArgs args)
 		{
 			Console.WriteLine ("Image requested: " + args.Url);
-			Stream s = mds.HelpTree.GetImage (args.Url);
+			Stream s = Runtime.Documentation.HelpTree.GetImage (args.Url);
 			
 			if (s != null) {
 				byte [] buffer = new byte [8192];
@@ -82,7 +77,7 @@
 			
 			Node node;
 			
-			string res = mds.HelpTree.RenderUrl (url, out node);
+			string res = Runtime.Documentation.HelpTree.RenderUrl (url, out node);
 			if (res != null) {
 				Render (res, node, url);
 			}

Modified: trunk/MonoDevelop/Core/src/Main/Base/Gui/Pads/HelpBrowser/MonodocTreePad.cs
===================================================================
--- trunk/MonoDevelop/Core/src/Main/Base/Gui/Pads/HelpBrowser/MonodocTreePad.cs	2004-12-05 09:39:17 UTC (rev 2052)
+++ trunk/MonoDevelop/Core/src/Main/Base/Gui/Pads/HelpBrowser/MonodocTreePad.cs	2004-12-06 15:43:16 UTC (rev 2053)
@@ -19,8 +19,6 @@
 {
 	public class HelpTree : AbstractPadContent
 	{
-		MonodocService mds;
-	
 		TreeStore store;
 		TreeView  tree_view;
 
@@ -29,7 +27,6 @@
 	
 		public HelpTree () : base (GettextCatalog.GetString ("Help"), Gtk.Stock.Help)
 		{
-			mds = (MonodocService)ServiceManager.GetService (typeof (MonodocService));
 			tree_view = new TreeView ();
 
 			tree_view.AppendColumn ("name_col", new CellRendererText (), "text", 0);
@@ -37,7 +34,7 @@
 			tree_view.Selection.Changed += new EventHandler (RowActivated);
 			
 			store = new TreeStore (typeof (string), typeof (Node));
-			root_iter = store.AppendValues (GettextCatalog.GetString ("Mono Documentation"), mds.HelpTree);
+			root_iter = store.AppendValues (GettextCatalog.GetString ("Mono Documentation"), Runtime.Documentation.HelpTree);
 
 			PopulateNode (root_iter);
 
@@ -103,7 +100,7 @@
 					}
 				}
 
-				s = mds.HelpTree.RenderUrl (url, out match);
+				s = Runtime.Documentation.HelpTree.RenderUrl (url, out match);
 				if (s != null) {
 					ShowDocs (s, match, url);
 					return;

Modified: trunk/MonoDevelop/Core/src/Main/Base/Gui/Pads/OpenTaskView.cs
===================================================================
--- trunk/MonoDevelop/Core/src/Main/Base/Gui/Pads/OpenTaskView.cs	2004-12-05 09:39:17 UTC (rev 2052)
+++ trunk/MonoDevelop/Core/src/Main/Base/Gui/Pads/OpenTaskView.cs	2004-12-06 15:43:16 UTC (rev 2053)
@@ -54,9 +54,6 @@
 		
 		public OpenTaskView()
 		{
-			TaskService taskService        = (TaskService) ServiceManager.GetService (typeof(TaskService));
-			IProjectService projectService = (IProjectService) ServiceManager.GetService (typeof(IProjectService));
-			
 			store = new Gtk.ListStore (
 				typeof (Gdk.Pixbuf), // image
 				typeof (int),        // line
@@ -78,11 +75,11 @@
 			sw.ShadowType = ShadowType.In;
 			sw.Add (view);
 			
-			taskService.TasksChanged     += new EventHandler (ShowResults);
-			taskService.TaskAdded        += new TaskEventHandler (TaskAdded);
-			projectService.EndBuild      += new EventHandler (SelectTaskView);
-			projectService.CombineOpened += new CombineEventHandler (OnCombineOpen);
-			projectService.CombineClosed += new CombineEventHandler (OnCombineClosed);
+			Runtime.TaskService.TasksChanged     += new EventHandler (ShowResults);
+			Runtime.TaskService.TaskAdded        += new TaskEventHandler (TaskAdded);
+			Runtime.ProjectService.EndBuild      += new EventHandler (SelectTaskView);
+			Runtime.ProjectService.CombineOpened += new CombineEventHandler (OnCombineOpen);
+			Runtime.ProjectService.CombineClosed += new CombineEventHandler (OnCombineClosed);
 			view.RowActivated            += new RowActivatedHandler (OnRowActivated);
 		}
 
@@ -169,13 +166,11 @@
 		
 		void SelectTaskView (object sender, EventArgs e)
 		{
-			TaskService taskService = (TaskService) ServiceManager.GetService (typeof (TaskService));
-			if (taskService.Tasks.Count > 0) {
+			if (Runtime.TaskService.Tasks.Count > 0) {
 				try {
-					PropertyService propertyService = (PropertyService) ServiceManager.GetService (typeof (PropertyService));
 					if (WorkbenchSingleton.Workbench.WorkbenchLayout.IsVisible (this)) {
 						WorkbenchSingleton.Workbench.WorkbenchLayout.ActivatePad (this);
-					} else if ((bool) propertyService.GetProperty ("SharpDevelop.ShowTaskListAfterBuild", true)) {
+					} else if ((bool) Runtime.Properties.GetProperty ("SharpDevelop.ShowTaskListAfterBuild", true)) {
 						WorkbenchSingleton.Workbench.WorkbenchLayout.ShowPad (this);
 						WorkbenchSingleton.Workbench.WorkbenchLayout.ActivatePad (this);
 					}
@@ -199,9 +194,8 @@
 		public void ShowResults (object sender, EventArgs e)
 		{
 			store.Clear ();
-			TaskService taskService = (TaskService) ServiceManager.GetService (typeof (TaskService));
 			
-			foreach (Task t in taskService.Tasks) {
+			foreach (Task t in Runtime.TaskService.Tasks) {
 				AddTask (t);
 			}
 			SelectTaskView(null, null);
@@ -214,7 +208,6 @@
 		
 		public void AddTask (Task t)
 		{
-			FileUtilityService fileUtilityService = (FileUtilityService) ServiceManager.GetService (typeof (FileUtilityService));
 			Gdk.Pixbuf stock;
 			switch (t.TaskType) {
 				case TaskType.Warning:
@@ -236,7 +229,7 @@
 			
 			string tmpPath = t.FileName;
 			if (t.Project != null)
-				tmpPath = fileUtilityService.AbsoluteToRelativePath (t.Project.BaseDirectory, t.FileName);
+				tmpPath = Runtime.FileUtilityService.AbsoluteToRelativePath (t.Project.BaseDirectory, t.FileName);
 			
 			string fileName = tmpPath;
 			string path     = tmpPath;

Modified: trunk/MonoDevelop/Core/src/Main/Base/Gui/Pads/ProjectBrowser/BrowserNode/AbstractBrowserNode.cs
===================================================================
--- trunk/MonoDevelop/Core/src/Main/Base/Gui/Pads/ProjectBrowser/BrowserNode/AbstractBrowserNode.cs	2004-12-05 09:39:17 UTC (rev 2052)
+++ trunk/MonoDevelop/Core/src/Main/Base/Gui/Pads/ProjectBrowser/BrowserNode/AbstractBrowserNode.cs	2004-12-06 15:43:16 UTC (rev 2053)
@@ -16,6 +16,7 @@
 using MonoDevelop.Core.AddIns;
 using MonoDevelop.Internal.Project;
 using MonoDevelop.Gui.Widgets;
+using MonoDevelop.Services;
 
 namespace MonoDevelop.Gui.Pads.ProjectBrowser
 {
@@ -26,7 +27,7 @@
 	public abstract class AbstractBrowserNode : TreeNode, IDisposable
 	{
 		//Gdk.Pixbuf  iconImage = null;
-		public static bool ShowExtensions = ((PropertyService)ServiceManager.GetService (typeof(PropertyService))).GetProperty ("MonoDevelop.Gui.ProjectBrowser.ShowExtensions", true);
+		public static bool ShowExtensions = Runtime.Properties.GetProperty ("MonoDevelop.Gui.ProjectBrowser.ShowExtensions", true);
 		
 		protected bool   canLabelEdited = true;
 		protected object userData  = null;

Modified: trunk/MonoDevelop/Core/src/Main/Base/Gui/Pads/ProjectBrowser/BrowserNode/CombineBrowserNode.cs
===================================================================
--- trunk/MonoDevelop/Core/src/Main/Base/Gui/Pads/ProjectBrowser/BrowserNode/CombineBrowserNode.cs	2004-12-05 09:39:17 UTC (rev 2052)
+++ trunk/MonoDevelop/Core/src/Main/Base/Gui/Pads/ProjectBrowser/BrowserNode/CombineBrowserNode.cs	2004-12-06 15:43:16 UTC (rev 2053)
@@ -63,7 +63,7 @@
 		bool ContainsNoInvalidChars (string name)
 		{
 			if (name.IndexOfAny (new char [] { '\'', '(', ')', '"', '{', '}', '|' } ) != -1) {
-				((MessageService)ServiceManager.GetService (typeof (MessageService))).ShowError (String.Format (GettextCatalog.GetString ("Solution name may not contain any of the following characters: {0}"), "', (, ), \", {, }, |"));
+				Runtime.MessageService.ShowError (String.Format (GettextCatalog.GetString ("Solution name may not contain any of the following characters: {0}"), "', (, ), \", {, }, |"));
 				return false;
 			}
 			return true;
@@ -103,8 +103,7 @@
 			
 			CombineBrowserNode cmbNode = (CombineBrowserNode)Parent;
 			
-			IMessageService messageService = (IMessageService) ServiceManager.GetService (typeof (IMessageService));
-			bool yes = messageService.AskQuestion (String.Format (GettextCatalog.GetString ("Do you really want to remove solution {0} from solution {1}?"), combine.Name, cmbNode.Combine.Name));
+			bool yes = Runtime.MessageService.AskQuestion (String.Format (GettextCatalog.GetString ("Do you really want to remove solution {0} from solution {1}?"), combine.Name, cmbNode.Combine.Name));
 
 			if (!yes)
 				return false;

Modified: trunk/MonoDevelop/Core/src/Main/Base/Gui/Pads/ProjectBrowser/BrowserNode/DirectoryNode.cs
===================================================================
--- trunk/MonoDevelop/Core/src/Main/Base/Gui/Pads/ProjectBrowser/BrowserNode/DirectoryNode.cs	2004-12-05 09:39:17 UTC (rev 2052)
+++ trunk/MonoDevelop/Core/src/Main/Base/Gui/Pads/ProjectBrowser/BrowserNode/DirectoryNode.cs	2004-12-06 15:43:16 UTC (rev 2053)
@@ -95,19 +95,15 @@
 				if (oldFoldername != newFoldername) {
 					try {
 						
-						IFileService fileService = (IFileService)MonoDevelop.Core.Services.ServiceManager.GetService(typeof(IFileService));
-						FileUtilityService fileUtilityService = (FileUtilityService)MonoDevelop.Core.Services.ServiceManager.GetService(typeof(FileUtilityService));
-						if (fileUtilityService.IsValidFileName(newFoldername)) {
-							fileService.RenameFile(oldFoldername, newFoldername);
+						if (Runtime.FileUtilityService.IsValidFileName(newFoldername)) {
+							Runtime.FileService.RenameFile (oldFoldername, newFoldername);
 							Text       = newName;
 							folderName = newFoldername;
 						}
 					} catch (System.IO.IOException) {   // assume duplicate file
-						IMessageService messageService =(IMessageService)ServiceManager.GetService(typeof(IMessageService));
-						messageService.ShowError(GettextCatalog.GetString ("File or directory name is already in use, choose a different one."));
+						Runtime.MessageService.ShowError(GettextCatalog.GetString ("File or directory name is already in use, choose a different one."));
 					} catch (System.ArgumentException) { // new file name with wildcard (*, ?) characters in it
-						IMessageService messageService =(IMessageService)ServiceManager.GetService(typeof(IMessageService));
-						messageService.ShowError(GettextCatalog.GetString ("The file name you have chosen contains illegal characters. Please choose a different file name."));
+						Runtime.MessageService.ShowError(GettextCatalog.GetString ("The file name you have chosen contains illegal characters. Please choose a different file name."));
 					}
 				}
 			}
@@ -123,20 +119,17 @@
 				return false;
 			}
 			
-			IMessageService messageService = (IMessageService) ServiceManager.GetService (typeof (IMessageService));
-			bool yes = messageService.AskQuestion (String.Format (GettextCatalog.GetString ("Do you want to remove folder {0} from project {1}?"), Text, Project.Name));
+			bool yes = Runtime.MessageService.AskQuestion (String.Format (GettextCatalog.GetString ("Do you want to remove folder {0} from project {1}?"), Text, Project.Name));
 
 			if (!yes)
 				return false;
 			
-			//IFileService fileService = (IFileService)MonoDevelop.Core.Services.ServiceManager.GetService(typeof(IFileService));
-			IProjectService projectService = (IProjectService)MonoDevelop.Core.Services.ServiceManager.GetService(typeof(IProjectService));
 			//switch (ret) {
 				//case 0:
-					projectService.RemoveFileFromProject(FolderName);
+					Runtime.ProjectService.RemoveFileFromProject(FolderName);
 				//	break;
 				//case 1:
-				//	fileService.RemoveFile(FolderName);
+				//	Runtime.FileService.RemoveFile(FolderName);
 				//	break;
 			//}
 			return true;

Modified: trunk/MonoDevelop/Core/src/Main/Base/Gui/Pads/ProjectBrowser/BrowserNode/FileNode.cs
===================================================================
--- trunk/MonoDevelop/Core/src/Main/Base/Gui/Pads/ProjectBrowser/BrowserNode/FileNode.cs	2004-12-05 09:39:17 UTC (rev 2052)
+++ trunk/MonoDevelop/Core/src/Main/Base/Gui/Pads/ProjectBrowser/BrowserNode/FileNode.cs	2004-12-06 15:43:16 UTC (rev 2053)
@@ -28,8 +28,6 @@
 		public readonly static string ProjectFileContextMenuPath = "/SharpDevelop/Views/ProjectBrowser/ContextMenu/ProjectFileNode";
 		public readonly static string DefaultContextMenuPath = "/SharpDevelop/Views/ProjectBrowser/ContextMenu/DefaultFileNode";
 		
-		IMessageService messageService = (IMessageService) ServiceManager.GetService (typeof (IMessageService));
-
 		/// <summary>
 		/// Generates a Drag & Drop data object. If this property returns null
 		/// the node indicates that it can't be dragged.
@@ -66,8 +64,7 @@
 		
 		protected virtual void SetNodeIcon()
 		{
-			IconService iconService = (IconService)ServiceManager.GetService(typeof(IconService));
-			Image = iconService.GetImageForFile(((ProjectFile)userData).Name);
+			Image = Runtime.Gui.Icons.GetImageForFile (((ProjectFile)userData).Name);
 		}
 		
 		protected virtual void SetNodeLabel()
@@ -91,11 +88,8 @@
 		
 		public override void ActivateItem()
 		{
-			if (userData != null && userData is ProjectFile) {
-				IFileService fileService = (IFileService)MonoDevelop.Core.Services.ServiceManager.GetService(typeof(IFileService));
-				
-				fileService.OpenFile (((ProjectFile)userData).Name);
-			}
+			if (userData != null && userData is ProjectFile)
+				Runtime.FileService.OpenFile (((ProjectFile)userData).Name);
 		}
 		
 		public override void AfterLabelEdit(string newName)
@@ -109,18 +103,16 @@
 				string newname = Path.GetDirectoryName(oldname) + Path.DirectorySeparatorChar + newName;
 				if (oldname != newname) {
 					try {
-						IFileService fileService = (IFileService) ServiceManager.GetService (typeof (IFileService));
-						FileUtilityService fileUtilityService = (FileUtilityService) ServiceManager.GetService (typeof (FileUtilityService));
-						if (fileUtilityService.IsValidFileName(newname)) {
-							fileService.RenameFile(oldname, newname);
+						if (Runtime.FileUtilityService.IsValidFileName(newname)) {
+							Runtime.FileService.RenameFile(oldname, newname);
 							SetNodeLabel();
 							SetNodeIcon();
 							UpdateBacking ();
 						}
 					} catch (System.IO.IOException) {   // assume duplicate file
-						messageService.ShowError (GettextCatalog.GetString ("File or directory name is already in use, choose a different one."));
+						Runtime.MessageService.ShowError (GettextCatalog.GetString ("File or directory name is already in use, choose a different one."));
 					} catch (System.ArgumentException) { // new file name with wildcard (*, ?) characters in it
-						messageService.ShowError (GettextCatalog.GetString ("The file name you have chosen contains illegal characters. Please choose a different file name."));
+						Runtime.MessageService.ShowError (GettextCatalog.GetString ("The file name you have chosen contains illegal characters. Please choose a different file name."));
 					}
 				}
 			}
@@ -133,12 +125,11 @@
 		{
 			DateTime old = DateTime.Now;
 			
-			bool yes = messageService.AskQuestion (String.Format (GettextCatalog.GetString ("Are you sure you want to remove file {0} from project {1}?"), Path.GetFileName (((ProjectFile)userData).Name), Project.Name));
+			bool yes = Runtime.MessageService.AskQuestion (String.Format (GettextCatalog.GetString ("Are you sure you want to remove file {0} from project {1}?"), Path.GetFileName (((ProjectFile)userData).Name), Project.Name));
 			if (!yes)
 				return false;
 
-			IProjectService projectService = (IProjectService)MonoDevelop.Core.Services.ServiceManager.GetService(typeof(IProjectService));
-			projectService.RemoveFileFromProject(((ProjectFile)userData).Name);
+			Runtime.ProjectService.RemoveFileFromProject (((ProjectFile)userData).Name);
 			return true;
 		}
 	}

Modified: trunk/MonoDevelop/Core/src/Main/Base/Gui/Pads/ProjectBrowser/BrowserNode/ProjectBrowserNode.cs
===================================================================
--- trunk/MonoDevelop/Core/src/Main/Base/Gui/Pads/ProjectBrowser/BrowserNode/ProjectBrowserNode.cs	2004-12-05 09:39:17 UTC (rev 2052)
+++ trunk/MonoDevelop/Core/src/Main/Base/Gui/Pads/ProjectBrowser/BrowserNode/ProjectBrowserNode.cs	2004-12-06 15:43:16 UTC (rev 2053)
@@ -105,8 +105,7 @@
 			IProject prj = project;
 			CombineEntry removeEntry = null;
 			
-			IMessageService messageService = (IMessageService) ServiceManager.GetService (typeof (IMessageService));
-			bool yes = messageService.AskQuestion (String.Format (GettextCatalog.GetString ("Do you really want to remove project {0} from solution {1}"), project.Name, cmb.Name));
+			bool yes = Runtime.MessageService.AskQuestion (String.Format (GettextCatalog.GetString ("Do you really want to remove project {0} from solution {1}"), project.Name, cmb.Name));
 
 			if (!yes)
 				return false;

Modified: trunk/MonoDevelop/Core/src/Main/Base/Gui/Pads/ProjectBrowser/BrowserNode/ReferenceNode.cs
===================================================================
--- trunk/MonoDevelop/Core/src/Main/Base/Gui/Pads/ProjectBrowser/BrowserNode/ReferenceNode.cs	2004-12-05 09:39:17 UTC (rev 2052)
+++ trunk/MonoDevelop/Core/src/Main/Base/Gui/Pads/ProjectBrowser/BrowserNode/ReferenceNode.cs	2004-12-06 15:43:16 UTC (rev 2053)
@@ -75,10 +75,8 @@
 		
 		public override void ActivateItem()
 		{
-			if (userData != null && userData is ProjectReference) {
-				IFileService fileService = (IFileService)MonoDevelop.Core.Services.ServiceManager.GetService(typeof(IFileService));
-				fileService.OpenFile(((ProjectReference)userData).GetReferencedFileName(Project));
-			}
+			if (userData != null && userData is ProjectReference)
+				Runtime.FileService.OpenFile (((ProjectReference)userData).GetReferencedFileName(Project));
 		}
 		
 		/// <summary>

Modified: trunk/MonoDevelop/Core/src/Main/Base/Gui/Pads/ProjectBrowser/NodeBuilder/DefaultDotNetNodeBuilder.cs
===================================================================
--- trunk/MonoDevelop/Core/src/Main/Base/Gui/Pads/ProjectBrowser/NodeBuilder/DefaultDotNetNodeBuilder.cs	2004-12-05 09:39:17 UTC (rev 2052)
+++ trunk/MonoDevelop/Core/src/Main/Base/Gui/Pads/ProjectBrowser/NodeBuilder/DefaultDotNetNodeBuilder.cs	2004-12-06 15:43:16 UTC (rev 2053)
@@ -24,8 +24,6 @@
 {
 	public class DefaultDotNetNodeBuilder : IProjectNodeBuilder
 	{
-		static FileUtilityService fileUtilityService = (FileUtilityService)ServiceManager.GetService(typeof(FileUtilityService));
-
 		public bool CanBuildProjectTree(IProject project)
 		{
 			return true;
@@ -46,11 +44,9 @@
 
 		public AbstractBrowserNode BuildProjectTreeNode(IProject project)
 		{
-			IconService iconService = (IconService)ServiceManager.GetService(typeof(IconService));
 			ProjectBrowserNode projectNode = new ProjectBrowserNode(project);
+			projectNode.Image = Runtime.Gui.Icons.GetImageForProjectType (project.ProjectType);
 
-			projectNode.Image = iconService.GetImageForProjectType (project.ProjectType);
-
 			FolderNode resourceNode = new NamedFolderNode(GettextCatalog.GetString ("Resource Files"), 0);
 			resourceNode.ContextmenuAddinTreePath = "/SharpDevelop/Views/ProjectBrowser/ContextMenu/ResourceFolderNode";
 			resourceNode.OpenedImage = Stock.OpenResourceFolder;
@@ -209,13 +205,13 @@
 
 			// only works for relative paths right now!
 			AbstractBrowserNode parentNode = null;
-			string relativeFile = fileUtilityService.AbsoluteToRelativePath(project.BaseDirectory, projectFile.Name);
+			string relativeFile = Runtime.FileUtilityService.AbsoluteToRelativePath(project.BaseDirectory, projectFile.Name);
 			string fileName     = Path.GetFileName(projectFile.Name);
 			parentNode = projectNode;
 
 			if(projectFile.DependsOn != String.Empty && projectFile.DependsOn != null) {
 				// make sure the dependant node exists
-				AbstractBrowserNode dependNode = GetPath(fileUtilityService.AbsoluteToRelativePath(project.BaseDirectory,projectFile.DependsOn), projectNode, false);
+				AbstractBrowserNode dependNode = GetPath(Runtime.FileUtilityService.AbsoluteToRelativePath(project.BaseDirectory,projectFile.DependsOn), projectNode, false);
 				if(dependNode == null) {
 					// dependsOn does not exist, do what?
 				}
@@ -386,7 +382,7 @@
 
 				if (node == null) {
 					if (create) {
-						DirectoryNode newFolderNode  = new DirectoryNode(fileUtilityService.GetDirectoryNameWithSeparator(ConstructFolderName(curpathnode)) + path);
+						DirectoryNode newFolderNode  = new DirectoryNode(Runtime.FileUtilityService.GetDirectoryNameWithSeparator(ConstructFolderName(curpathnode)) + path);
 						curpathnode.Nodes.Add (newFolderNode);
 						curpathnode = newFolderNode;
 						continue;

Modified: trunk/MonoDevelop/Core/src/Main/Base/Gui/Pads/ProjectBrowser/ProjectBrowserView.cs
===================================================================
--- trunk/MonoDevelop/Core/src/Main/Base/Gui/Pads/ProjectBrowser/ProjectBrowserView.cs	2004-12-05 09:39:17 UTC (rev 2052)
+++ trunk/MonoDevelop/Core/src/Main/Base/Gui/Pads/ProjectBrowser/ProjectBrowserView.cs	2004-12-06 15:43:16 UTC (rev 2053)
@@ -40,9 +40,6 @@
 		Font               boldFont  = null;
 		Gtk.Frame contentPanel = new Gtk.Frame();
 
-		static FileUtilityService fileUtilityService = (FileUtilityService)ServiceManager.GetService(typeof(FileUtilityService));
-		static PropertyService propertyService = (PropertyService)ServiceManager.GetService(typeof(PropertyService));
-
 		public Gtk.Widget Control {
 			get {
 				return contentPanel;
@@ -68,7 +65,7 @@
 		public void RedrawContent()
 		{
 			BeginUpdate();
-			AbstractBrowserNode.ShowExtensions = propertyService.GetProperty("MonoDevelop.Gui.ProjectBrowser.ShowExtensions", true);
+			AbstractBrowserNode.ShowExtensions = Runtime.Properties.GetProperty("MonoDevelop.Gui.ProjectBrowser.ShowExtensions", true);
 			foreach (AbstractBrowserNode node in Nodes) {
 				node.UpdateNaming();
 			}
@@ -78,11 +75,10 @@
 		public ProjectBrowserView() : base (true, TreeNodeComparer.GtkProjectNode)
 		{
 			WorkbenchSingleton.Workbench.ActiveWorkbenchWindowChanged += new EventHandler(ActiveWindowChanged);
-			IProjectService projectService = (IProjectService)MonoDevelop.Core.Services.ServiceManager.GetService(typeof(IProjectService));
 
-			projectService.CombineOpened += new CombineEventHandler(OpenCombine);
-			projectService.CombineClosed += new CombineEventHandler(CloseCombine);
-			propertyService.PropertyChanged += new PropertyEventHandler (TrackPropertyChange);
+			Runtime.ProjectService.CombineOpened += new CombineEventHandler(OpenCombine);
+			Runtime.ProjectService.CombineClosed += new CombineEventHandler(CloseCombine);
+			Runtime.Properties.PropertyChanged += new PropertyEventHandler (TrackPropertyChange);
 
 			Gtk.ScrolledWindow sw = new Gtk.ScrolledWindow ();
 			sw.Add(this);
@@ -170,8 +166,7 @@
 			((AbstractBrowserNode) node).AfterLabelEdit (new_text);
 			
 			// save changes
-			IProjectService projectService = (IProjectService) ServiceManager.GetService (typeof(IProjectService));
-			projectService.SaveCombine();
+			Runtime.ProjectService.SaveCombine();
 		}
 
 		void DisposeProjectNodes()
@@ -267,9 +262,8 @@
 		public void UpdateCombineTree()
 		{
 			XmlElement storedTree = new TreeViewMemento(this).ToXmlElement(new XmlDocument());
-			IProjectService projectService = (IProjectService)MonoDevelop.Core.Services.ServiceManager.GetService(typeof(IProjectService));
-			CloseCombine(this,new CombineEventArgs(projectService.CurrentOpenCombine));
-			OpenCombine(this, new CombineEventArgs(projectService.CurrentOpenCombine));
+			CloseCombine(this,new CombineEventArgs(Runtime.ProjectService.CurrentOpenCombine));
+			OpenCombine(this, new CombineEventArgs(Runtime.ProjectService.CurrentOpenCombine));
 			((TreeViewMemento)new TreeViewMemento().FromXmlElement(storedTree)).Restore(this);
 			ActiveWindowChanged(this, EventArgs.Empty);
 		}
@@ -330,11 +324,9 @@
 		void ShowPopup ()
 		{
 			AbstractBrowserNode node = (AbstractBrowserNode) SelectedNode;
-			IProjectService projectService = (IProjectService)MonoDevelop.Core.Services.ServiceManager.GetService(typeof(IProjectService));
-			projectService.CurrentSelectedProject = node.Project;
-			projectService.CurrentSelectedCombine = node.Combine;
-			MenuService menuService = (MenuService)MonoDevelop.Core.Services.ServiceManager.GetService(typeof(MenuService));
-			menuService.ShowContextMenu(this, node.ContextmenuAddinTreePath, this);
+			Runtime.ProjectService.CurrentSelectedProject = node.Project;
+			Runtime.ProjectService.CurrentSelectedCombine = node.Combine;
+			Runtime.Gui.Menus.ShowContextMenu(this, node.ContextmenuAddinTreePath, this);
 
 		}
 
@@ -507,7 +499,7 @@
 		public static void MoveCopyFile(string filename, AbstractBrowserNode node, bool move, bool alreadyInPlace)
 		{
 			//			FileType type      = FileUtility.GetFileType(filename);
-			bool     directory = fileUtilityService.IsDirectory(filename);
+			bool     directory = Runtime.FileUtilityService.IsDirectory(filename);
 			if (
 //			    type == FileType.Dll ||
 //			    type == FileType.Resource ||
@@ -527,10 +519,10 @@
 
 			string name        = System.IO.Path.GetFileName(filename);
 			string baseDirectory = node is DirectoryNode ? ((DirectoryNode)node).FolderName : node.Project.BaseDirectory;
-			string newfilename = alreadyInPlace ? filename : fileUtilityService.GetDirectoryNameWithSeparator(baseDirectory) + name;
+			string newfilename = alreadyInPlace ? filename : Runtime.FileUtilityService.GetDirectoryNameWithSeparator(baseDirectory) + name;
 
-			string oldrelativename = fileUtilityService.AbsoluteToRelativePath(baseDirectory, filename);
-			string newrelativename = fileUtilityService.AbsoluteToRelativePath(baseDirectory, newfilename);
+			string oldrelativename = Runtime.FileUtilityService.AbsoluteToRelativePath(baseDirectory, filename);
+			string newrelativename = Runtime.FileUtilityService.AbsoluteToRelativePath(baseDirectory, newfilename);
 
 			AbstractBrowserNode oldparent = DefaultDotNetNodeBuilder.GetPath(oldrelativename, GetRootProjectNode(node), false);          // TODO : change this for more projects
 			AbstractBrowserNode newparent = node;
@@ -556,8 +548,7 @@
 			if (move) {
 				if (filename != newfilename) {
 					File.Copy(filename, newfilename);
-					IFileService fileService = (IFileService)MonoDevelop.Core.Services.ServiceManager.GetService(typeof(IFileService));
-					fileService.RemoveFile(filename);
+					Runtime.FileService.RemoveFile (filename);
 				}
 				if (oldnode != null) {
 					oldparent.Nodes.Remove(oldnode);
@@ -569,19 +560,18 @@
 			}
 
 			ProjectFile fInfo;
-			IProjectService projectService = (IProjectService)MonoDevelop.Core.Services.ServiceManager.GetService(typeof(IProjectService));
 
 			if (newparent.Project.IsCompileable(newfilename)) {
-				fInfo = projectService.AddFileToProject(newparent.Project, newfilename, BuildAction.Compile);
+				fInfo = Runtime.ProjectService.AddFileToProject(newparent.Project, newfilename, BuildAction.Compile);
 			} else {
-				fInfo = projectService.AddFileToProject(newparent.Project, newfilename, BuildAction.Nothing);
+				fInfo = Runtime.ProjectService.AddFileToProject(newparent.Project, newfilename, BuildAction.Nothing);
 			}
 
 			AbstractBrowserNode pbn = new FileNode(fInfo);
 			newparent.Nodes.Add (pbn);
 			
 			pbn.EnsureVisible();
-			projectService.SaveCombine();
+			Runtime.ProjectService.SaveCombine();
 		}
 
 

Modified: trunk/MonoDevelop/Core/src/Main/Base/Gui/Pads/SideBarView.cs
===================================================================
--- trunk/MonoDevelop/Core/src/Main/Base/Gui/Pads/SideBarView.cs	2004-12-05 09:39:17 UTC (rev 2052)
+++ trunk/MonoDevelop/Core/src/Main/Base/Gui/Pads/SideBarView.cs	2004-12-06 15:43:16 UTC (rev 2053)
@@ -56,8 +56,7 @@
 		{
 			try {
 				XmlDocument doc = new XmlDocument();
-				PropertyService propertyService = (PropertyService)ServiceManager.GetService(typeof(PropertyService));
-				doc.Load(propertyService.ConfigDirectory + "SideBarConfig.xml");
+				doc.Load (Runtime.Properties.ConfigDirectory + "SideBarConfig.xml");
 				if (doc.DocumentElement.Attributes["version"] == null || doc.DocumentElement.Attributes["version"].InnerText != "1.0") {
 					GenerateStandardSideBar();
 				} else {

Modified: trunk/MonoDevelop/Core/src/Main/Base/Gui/PixbufList.cs
===================================================================
--- trunk/MonoDevelop/Core/src/Main/Base/Gui/PixbufList.cs	2004-12-05 09:39:17 UTC (rev 2052)
+++ trunk/MonoDevelop/Core/src/Main/Base/Gui/PixbufList.cs	2004-12-06 15:43:16 UTC (rev 2053)
@@ -1,5 +1,5 @@
 using System.Collections;
-using MonoDevelop.Core.Services;
+using MonoDevelop.Services;
 using Gdk;
 
 namespace MonoDevelop.Gui
@@ -8,10 +8,8 @@
 	{
 		public PixbufList (params string [] resIcons) : base (resIcons.Length)
 		{
-			ResourceService rs = (ResourceService) ServiceManager.GetService (typeof (ResourceService));
-			
 			foreach (string s in resIcons)
-				Add (rs.GetBitmap (s));
+				Add (Runtime.Gui.Resources.GetBitmap (s));
 		}
 		
 		public new Pixbuf this[int idx] {

Modified: trunk/MonoDevelop/Core/src/Main/Base/Gui/Workbench/DefaultWorkbench.cs
===================================================================
--- trunk/MonoDevelop/Core/src/Main/Base/Gui/Workbench/DefaultWorkbench.cs	2004-12-05 09:39:17 UTC (rev 2052)
+++ trunk/MonoDevelop/Core/src/Main/Base/Gui/Workbench/DefaultWorkbench.cs	2004-12-06 15:43:16 UTC (rev 2053)
@@ -51,8 +51,6 @@
 
 		static GType gtype;
 		
-		protected static PropertyService propertyService = (PropertyService)ServiceManager.GetService(typeof(PropertyService));
-
 		public Gtk.MenuBar TopMenu = null;
 
 		enum TargetList {
@@ -136,7 +134,6 @@
 		{
 			Title = "MonoDevelop";
 			Console.WriteLine ("Creating DefaultWorkbench");
-			ResourceService resourceService = (ResourceService)ServiceManager.GetService(typeof(ResourceService));
 		
 			windowChangeEventHandler = new EventHandler(OnActiveWindowChanged);
 
@@ -144,10 +141,10 @@
 			HeightRequest = normalBounds.Height;
 
 			DeleteEvent += new Gtk.DeleteEventHandler (OnClosing);
-			this.Icon = resourceService.GetBitmap ("Icons.SharpDevelopIcon");
+			this.Icon = Runtime.Gui.Resources.GetBitmap ("Icons.SharpDevelopIcon");
 			//this.WindowPosition = Gtk.WindowPosition.None;
 
-			IDebuggingService dbgr = (IDebuggingService)ServiceManager.GetService (typeof (IDebuggingService));
+			IDebuggingService dbgr = Runtime.DebuggingService;
 			if (dbgr != null) {
 				dbgr.StartedEvent += new EventHandler (onDebuggerStarted);
 				dbgr.PausedEvent += new EventHandler (onDebuggerPaused);
@@ -179,16 +176,14 @@
 					case ".CMBX":
 					case ".PRJX":
 						try {
-							IProjectService projectService = (IProjectService)ServiceManager.GetService (typeof (IProjectService));
-							projectService.OpenCombine(file);
+							Runtime.ProjectService.OpenCombine(file);
 						} catch (Exception e) {
 						}
 						
 						break;
 					default:
 						try {
-							IFileService fileService = (IFileService)MonoDevelop.Core.Services.ServiceManager.GetService(typeof(IFileService));
-							fileService.OpenFile(file);
+							Runtime.FileService.OpenFile (file);
 							
 						} catch (Exception e) {
 							Console.WriteLine("unable to open file {0} exception was :\n{1}", file, e.ToString());
@@ -201,14 +196,13 @@
 		
 		void onDebuggerPaused (object o, EventArgs e)
 		{
-			IDebuggingService dbgr = (IDebuggingService)ServiceManager.GetService (typeof (IDebuggingService));
+			IDebuggingService dbgr = Runtime.DebuggingService;
 			if (dbgr != null) {
 				cur_dbgFilename = dbgr.CurrentFilename;
 				cur_dbgLineNumber = dbgr.CurrentLineNumber - 1;
 
 				if (cur_dbgFilename != String.Empty) {
-					IFileService fs = (IFileService)ServiceManager.GetService (typeof (IFileService));
-					fs.OpenFile (cur_dbgFilename);
+					Runtime.FileService.OpenFile (cur_dbgFilename);
 					if (ActiveWorkbenchWindow.ViewContent is IDebuggableEditor) 
 						((IDebuggableEditor)ActiveWorkbenchWindow.ViewContent).ExecutingAt (cur_dbgLineNumber);
 				}
@@ -242,17 +236,14 @@
 			// FIXME: GTKize
 			ActiveWorkbenchWindowChanged += new EventHandler(UpdateMenu);
 			
-			IProjectService projectService = (IProjectService)MonoDevelop.Core.Services.ServiceManager.GetService(typeof(IProjectService));
-			IFileService fileService = (IFileService)MonoDevelop.Core.Services.ServiceManager.GetService(typeof(IFileService));
-			
-			projectService.CurrentProjectChanged += new ProjectEventHandler(SetProjectTitle);
-			projectService.CombineOpened         += new CombineEventHandler(CombineOpened);
+			Runtime.ProjectService.CurrentProjectChanged += new ProjectEventHandler(SetProjectTitle);
+			Runtime.ProjectService.CombineOpened         += new CombineEventHandler(CombineOpened);
 
-			fileService.FileRemoved += new FileEventHandler(CheckRemovedFile);
-			fileService.FileRenamed += new FileEventHandler(CheckRenamedFile);
+			Runtime.FileService.FileRemoved += new FileEventHandler(CheckRemovedFile);
+			Runtime.FileService.FileRenamed += new FileEventHandler(CheckRenamedFile);
 			
-			fileService.FileRemoved += new FileEventHandler(fileService.RecentOpen.FileRemoved);
-			fileService.FileRenamed += new FileEventHandler(fileService.RecentOpen.FileRenamed);
+			Runtime.FileService.FileRemoved += new FileEventHandler (Runtime.FileService.RecentOpen.FileRemoved);
+			Runtime.FileService.FileRenamed += new FileEventHandler (Runtime.FileService.RecentOpen.FileRenamed);
 			
 //			TopMenu.Selected   += new CommandHandler(OnTopMenuSelected);
 //			TopMenu.Deselected += new CommandHandler(OnTopMenuDeselected);
@@ -263,7 +254,7 @@
 				
 		public void CloseContent(IViewContent content)
 		{
-			if (propertyService.GetProperty("SharpDevelop.LoadDocumentProperties", true) && content is IMementoCapable) {
+			if (Runtime.Properties.GetProperty("SharpDevelop.LoadDocumentProperties", true) && content is IMementoCapable) {
 				StoreMemento(content);
 			}
 			if (workbenchContentCollection.Contains(content)) {
@@ -290,7 +281,7 @@
 		{
 			Debug.Assert(layout != null);
 			ViewContentCollection.Add(content);
-			if (propertyService.GetProperty("SharpDevelop.LoadDocumentProperties", true) && content is IMementoCapable) {
+			if (Runtime.Properties.GetProperty("SharpDevelop.LoadDocumentProperties", true) && content is IMementoCapable) {
 				try {
 					IXmlConvertable memento = GetStoredMemento(content);
 					if (memento != null) {
@@ -334,17 +325,14 @@
 		public IXmlConvertable GetStoredMemento(IViewContent content)
 		{
 			if (content != null && content.ContentName != null) {
-				PropertyService propertyService = (PropertyService)ServiceManager.GetService(typeof(PropertyService));
-				
-				string directory = propertyService.ConfigDirectory + "temp";
+				string directory = Runtime.Properties.ConfigDirectory + "temp";
 				if (!Directory.Exists(directory)) {
 					Directory.CreateDirectory(directory);
 				}
 				string fileName = content.ContentName.Substring(3).Replace('/', '.').Replace('\\', '.').Replace(System.IO.Path.DirectorySeparatorChar, '.');
 				string fullFileName = directory + System.IO.Path.DirectorySeparatorChar + fileName;
 				// check the file name length because it could be more than the maximum length of a file name
-				FileUtilityService fileUtilityService = (FileUtilityService)ServiceManager.GetService(typeof(FileUtilityService));
-				if (fileUtilityService.IsValidFileName(fullFileName) && File.Exists(fullFileName)) {
+				if (Runtime.FileUtilityService.IsValidFileName(fullFileName) && File.Exists(fullFileName)) {
 					IXmlConvertable prototype = ((IMementoCapable)content).CreateMemento();
 					XmlDocument doc = new XmlDocument();
 					doc.Load (File.OpenRead (fullFileName));
@@ -360,8 +348,7 @@
 			if (content.ContentName == null) {
 				return;
 			}
-			PropertyService propertyService = (PropertyService)ServiceManager.GetService(typeof(PropertyService));
-			string directory = propertyService.ConfigDirectory + "temp";
+			string directory = Runtime.Properties.ConfigDirectory + "temp";
 			if (!Directory.Exists(directory)) {
 				Directory.CreateDirectory(directory);
 			}
@@ -373,17 +360,15 @@
 			fileAttribute.InnerText = content.ContentName;
 			doc.DocumentElement.Attributes.Append(fileAttribute);
 			
-			
 			IXmlConvertable memento = ((IMementoCapable)content).CreateMemento();
 			
 			doc.DocumentElement.AppendChild(memento.ToXmlElement(doc));
 			
 			string fileName = content.ContentName.Substring(3).Replace('/', '.').Replace('\\', '.').Replace(System.IO.Path.DirectorySeparatorChar, '.');
-			FileUtilityService fileUtilityService = (FileUtilityService)ServiceManager.GetService(typeof(FileUtilityService));
 			// check the file name length because it could be more than the maximum length of a file name
 			string fullFileName = directory + System.IO.Path.DirectorySeparatorChar + fileName;
-			if (fileUtilityService.IsValidFileName(fullFileName)) {
-				fileUtilityService.ObservedSave(new NamedFileOperationDelegate(doc.Save), fullFileName, FileErrorPolicy.ProvideAlternative);
+			if (Runtime.FileUtilityService.IsValidFileName(fullFileName)) {
+				Runtime.FileUtilityService.ObservedSave(new NamedFileOperationDelegate(doc.Save), fullFileName, FileErrorPolicy.ProvideAlternative);
 			}
 		}
 		
@@ -492,8 +477,7 @@
 		
 		public bool Close() 
 		{
-			IProjectService projectService = (IProjectService)MonoDevelop.Core.Services.ServiceManager.GetService(typeof(IProjectService));
-			projectService.SaveCombinePreferences ();
+			Runtime.ProjectService.SaveCombinePreferences ();
 
 			bool showDirtyDialog = false;
 
@@ -512,8 +496,8 @@
 					return false;
 			}
 			
-			projectService.CloseCombine (false);
-			propertyService.SetProperty("SharpDevelop.Workbench.WorkbenchMemento", WorkbenchSingleton.Workbench.CreateMemento());
+			Runtime.ProjectService.CloseCombine (false);
+			Runtime.Properties.SetProperty("SharpDevelop.Workbench.WorkbenchMemento", WorkbenchSingleton.Workbench.CreateMemento());
 			OnClosed (null);
 			return true;
 		}
@@ -535,8 +519,7 @@
 		
 		void SetStandardStatusBar(object sender, EventArgs e)
 		{
-			IStatusBarService statusBarService = (IStatusBarService)MonoDevelop.Core.Services.ServiceManager.GetService(typeof(IStatusBarService));
-			statusBarService.SetMessage(GettextCatalog.GetString ("Ready"));
+			Runtime.Gui.StatusBar.SetMessage(GettextCatalog.GetString ("Ready"));
 		}
 		
 		void OnActiveWindowChanged(object sender, EventArgs e)
@@ -601,8 +584,7 @@
 		void CreateToolBars()
 		{
 			if (ToolBars == null) {
-				ToolbarService toolBarService = (ToolbarService)MonoDevelop.Core.Services.ServiceManager.GetService(typeof(ToolbarService));
-				Gtk.Toolbar[] toolBars = toolBarService.CreateToolbars();
+				Gtk.Toolbar[] toolBars = Runtime.Gui.Toolbars.CreateToolbars();
 				ToolBars = toolBars;
 			}
 		}

Modified: trunk/MonoDevelop/Core/src/Main/Base/Gui/Workbench/Layouts/SdiWorkspaceLayout.cs
===================================================================
--- trunk/MonoDevelop/Core/src/Main/Base/Gui/Workbench/Layouts/SdiWorkspaceLayout.cs	2004-12-05 09:39:17 UTC (rev 2052)
+++ trunk/MonoDevelop/Core/src/Main/Base/Gui/Workbench/Layouts/SdiWorkspaceLayout.cs	2004-12-06 15:43:16 UTC (rev 2053)
@@ -26,8 +26,7 @@
 	/// </summary>
 	public class SdiWorkbenchLayout : IWorkbenchLayout
 	{
-		static PropertyService propertyService = (PropertyService)ServiceManager.GetService(typeof(PropertyService));
-		static string configFile = propertyService.ConfigDirectory + "DefaultEditingLayout.xml";
+		static string configFile = Runtime.Properties.ConfigDirectory + "DefaultEditingLayout.xml";
 
 		// contains the fully qualified name of the current layout (ie. Edit.Default)
 		string currentLayout = "";
@@ -105,8 +104,7 @@
 
 			workbench.Add (vbox);
 			
-			IStatusBarService statusBarService = (IStatusBarService) ServiceManager.GetService (typeof (IStatusBarService));
-			vbox.PackEnd (statusBarService.Control, false, true, 0);
+			vbox.PackEnd (Runtime.Gui.StatusBar.Control, false, true, 0);
 			
 			foreach (IViewContent content in workbench.ViewContentCollection)
 				ShowView (content);
@@ -155,8 +153,6 @@
 
 		void SwitchContext (WorkbenchContext ctxt)
 		{
-			PropertyService propertyService =
-				(PropertyService) ServiceManager.GetService (typeof (PropertyService));
 			PadContentCollection old = activePadCollection;
 			
 			// switch pad collections
@@ -180,7 +176,7 @@
 			}
 			
 			// get the default layout for the new context from the property service
-			CurrentLayout = propertyService.GetProperty
+			CurrentLayout = Runtime.Properties.GetProperty
 				("MonoDevelop.Gui.SdiWorkbenchLayout." + ctxt.ToString (), "Default");
 			
 			// make sure invalid pads for the new context are not visible
@@ -230,9 +226,7 @@
 				currentLayout = newLayout;
 
 				// persist the selected layout for the current context
-				PropertyService propertyService =
-					(PropertyService) ServiceManager.GetService (typeof (PropertyService));
-				propertyService.SetProperty ("MonoDevelop.Gui.SdiWorkbenchLayout." +
+				Runtime.Properties.SetProperty ("MonoDevelop.Gui.SdiWorkbenchLayout." +
 				                             workbenchContext.ToString (), value);
 			}
 		}

Modified: trunk/MonoDevelop/Core/src/Main/Base/Gui/Workbench/Layouts/SdiWorkspaceWindow.cs
===================================================================
--- trunk/MonoDevelop/Core/src/Main/Base/Gui/Workbench/Layouts/SdiWorkspaceWindow.cs	2004-12-05 09:39:17 UTC (rev 2052)
+++ trunk/MonoDevelop/Core/src/Main/Base/Gui/Workbench/Layouts/SdiWorkspaceWindow.cs	2004-12-06 15:43:16 UTC (rev 2053)
@@ -35,7 +35,6 @@
 		
 		string myUntitledTitle     = null;
 		string _titleHolder = "";
-		static StringParserService stringParserService = (StringParserService)ServiceManager.GetService(typeof(StringParserService));
 		
 		public Widget TabPage {
 			get {
@@ -183,8 +182,7 @@
 			
 			if (content.IsDirty) {
 				newTitle += "*";
-				IProjectService prj = (IProjectService)ServiceManager.GetService (typeof (IProjectService));
-				prj.MarkFileDirty (content.ContentName);
+				Runtime.ProjectService.MarkFileDirty (content.ContentName);
 			} else if (content.IsReadOnly) {
 				newTitle += "+";
 			}
@@ -216,8 +214,7 @@
 		public void CloseWindow(bool force, bool fromMenu, int pageNum)
 		{
 			if (!force && ViewContent != null && ViewContent.IsDirty) {
-				IMessageService messageService =(IMessageService)ServiceManager.GetService(typeof(IMessageService));
-				bool response = messageService.AskQuestion (GettextCatalog.GetString ("Do you want to save the current changes"));
+				bool response = Runtime.MessageService.AskQuestion (GettextCatalog.GetString ("Do you want to save the current changes"));
 				
 				switch (response) {
 					case true:
@@ -225,7 +222,7 @@
 							while (true) {
 								new MonoDevelop.Commands.SaveFileAs().Run();
 								if (ViewContent.IsDirty) {
-									if (messageService.AskQuestion(GettextCatalog.GetString ("Do you really want to discard your changes ?"))) {
+									if (Runtime.MessageService.AskQuestion(GettextCatalog.GetString ("Do you really want to discard your changes ?"))) {
 										break;
 									}
 								} else {
@@ -234,8 +231,7 @@
 							}
 							
 						} else {
-							FileUtilityService fileUtilityService = (FileUtilityService)ServiceManager.GetService(typeof(FileUtilityService));
-							fileUtilityService.ObservedSave(new FileOperationDelegate(ViewContent.Save), ViewContent.ContentName , FileErrorPolicy.ProvideAlternative);
+							Runtime.FileUtilityService.ObservedSave(new FileOperationDelegate(ViewContent.Save), ViewContent.ContentName , FileErrorPolicy.ProvideAlternative);
 						}
 						break;
 					case false:

Modified: trunk/MonoDevelop/Core/src/Main/Base/Gui/WorkbenchSingleton.cs
===================================================================
--- trunk/MonoDevelop/Core/src/Main/Base/Gui/WorkbenchSingleton.cs	2004-12-05 09:39:17 UTC (rev 2052)
+++ trunk/MonoDevelop/Core/src/Main/Base/Gui/WorkbenchSingleton.cs	2004-12-06 15:43:16 UTC (rev 2053)
@@ -9,7 +9,7 @@
 using System.CodeDom.Compiler;
 
 using MonoDevelop.Core.Properties;
-using MonoDevelop.Core.Services;
+using MonoDevelop.Services;
 using MonoDevelop.Gui;
 using MonoDevelop.Internal.Project;
 using MonoDevelop.Internal.Templates;
@@ -35,8 +35,7 @@
 		
 		static WorkbenchSingleton()
 		{
-			PropertyService propertyService = (PropertyService)ServiceManager.GetService(typeof(PropertyService));
-			propertyService.PropertyChanged += new PropertyEventHandler(TrackPropertyChanges);
+			Runtime.Properties.PropertyChanged += new PropertyEventHandler(TrackPropertyChanges);
 		}
 		
 		static void SetWbLayout()

Modified: trunk/MonoDevelop/Core/src/Main/Base/Makefile.am
===================================================================
--- trunk/MonoDevelop/Core/src/Main/Base/Makefile.am	2004-12-05 09:39:17 UTC (rev 2052)
+++ trunk/MonoDevelop/Core/src/Main/Base/Makefile.am	2004-12-06 15:43:16 UTC (rev 2053)
@@ -41,6 +41,7 @@
 Gui/ISecondaryViewContent.cs \
 Gui/IViewContent.cs \
 Gui/AbstractViewContent.cs \
+Gui/GuiService.cs \
 Gui/Components/SdMenuSeparator.cs \
 Gui/Components/SharpMessageBox.cs \
 Gui/Components/StatusBar/AxStatusBar.cs \
@@ -192,7 +193,6 @@
 Services/StatusBar/IStatusBarService.cs \
 Services/Language/LanguageService.cs \
 Services/Language/Language.cs \
-Services/ClassBrowserIcons/ClassBrowserIconsService.cs \
 Services/ResourceNotFoundException.cs \
 Services/ParserService/DefaultParserService.cs \
 Services/ParserService/CodeCompletionDatabase.cs \
@@ -210,6 +210,7 @@
 Services/IDebuggerService.cs \
 Services/SystemAssemblyService.cs \
 Services/DispatchService/DispatchService.cs \
+Services/Runtime.cs \
 Internal/Undo/IUndoableOperation.cs \
 Internal/Undo/UndoStack.cs \
 Internal/Undo/UndoQueue.cs \

Modified: trunk/MonoDevelop/Core/src/Main/Base/Services/File/DefaultFileService.cs
===================================================================
--- trunk/MonoDevelop/Core/src/Main/Base/Services/File/DefaultFileService.cs	2004-12-05 09:39:17 UTC (rev 2052)
+++ trunk/MonoDevelop/Core/src/Main/Base/Services/File/DefaultFileService.cs	2004-12-06 15:43:16 UTC (rev 2053)
@@ -24,7 +24,6 @@
 	{
 		string currentFile;
 		RecentOpen       recentOpen = null;
-		FileUtilityService fileUtilityService = (FileUtilityService)ServiceManager.GetService(typeof(FileUtilityService));
 	
 		private class FileInformation
 		{
@@ -74,26 +73,23 @@
 					newContent.Project = project;
 				}
 				WorkbenchSingleton.Workbench.ShowView(newContent);
-				DisplayBindingService displayBindingService = (DisplayBindingService)MonoDevelop.Core.Services.ServiceManager.GetService(typeof(DisplayBindingService));
-				displayBindingService.AttachSubWindows(newContent.WorkbenchWindow);
+				Runtime.Gui.DisplayBindings.AttachSubWindows(newContent.WorkbenchWindow);
 			}
 		}
 		
 		public void OpenFile (string fileName)
 		{
-			DispatchService dispatcher = (DispatchService)ServiceManager.GetService (typeof (DispatchService));
 			FileInformation openFileInfo=new FileInformation();
 			openFileInfo.OnFileOpened=null;
 			openFileInfo.FileName=fileName;
-			dispatcher.GuiDispatch (new StatefulMessageHandler (realOpenFile), openFileInfo);
+			Runtime.DispatchService.GuiDispatch (new StatefulMessageHandler (realOpenFile), openFileInfo);
 		}
 
 		public void OpenFile (string fileName, FileOpeningFinished OnFileOpened){
-			DispatchService dispatcher = (DispatchService)ServiceManager.GetService (typeof (DispatchService));
 			FileInformation openFileInfo=new FileInformation();
 			openFileInfo.OnFileOpened=OnFileOpened;
 			openFileInfo.FileName=fileName;
-			dispatcher.GuiDispatch (new StatefulMessageHandler (realOpenFile), openFileInfo);
+			Runtime.DispatchService.GuiDispatch (new StatefulMessageHandler (realOpenFile), openFileInfo);
 		}
 		
 		void realOpenFile (object openFileInfo)
@@ -118,8 +114,8 @@
 			if (!fileName.StartsWith ("http://"))
 				fileName = System.IO.Path.GetFullPath (fileName);
 			
-			//Debug.Assert(fileUtilityService.IsValidFileName(fileName));
-			if (fileUtilityService.IsDirectory (fileName)) {
+			//Debug.Assert(Runtime.FileUtilityService.IsValidFileName(fileName));
+			if (Runtime.FileUtilityService.IsDirectory (fileName)) {
 				return;
 			}
 			// test, if file fileName exists
@@ -134,7 +130,7 @@
 						}
 					}
 				} else 
-				if (!fileUtilityService.TestFileExists(fileName)) {
+				if (!Runtime.FileUtilityService.TestFileExists(fileName)) {
 					if(oFileInfo.OnFileOpened!=null) oFileInfo.OnFileOpened();
 					return;
 				}
@@ -149,11 +145,8 @@
 				}
 			}
 			
-			DisplayBindingService displayBindingService = (DisplayBindingService)MonoDevelop.Core.Services.ServiceManager.GetService(typeof(DisplayBindingService));
+			IDisplayBinding binding = Runtime.Gui.DisplayBindings.GetBindingPerFileName(fileName);
 			
-			IFileService fileService = (IFileService)MonoDevelop.Core.Services.ServiceManager.GetService(typeof(IFileService));
-			IDisplayBinding binding = displayBindingService.GetBindingPerFileName(fileName);
-			
 			if (binding != null) {
 				IProject project = null;
 				Combine combine = null;
@@ -161,14 +154,14 @@
 				
 				if (combine != null && project != null)
 				{
-					if (fileUtilityService.ObservedLoad(new NamedFileOperationDelegate(new LoadFileWrapper(binding, project).Invoke), fileName) == FileOperationResult.OK) {
-						fileService.RecentOpen.AddLastFile (fileName, project.Name);
+					if (Runtime.FileUtilityService.ObservedLoad(new NamedFileOperationDelegate(new LoadFileWrapper(binding, project).Invoke), fileName) == FileOperationResult.OK) {
+						Runtime.FileService.RecentOpen.AddLastFile (fileName, project.Name);
 					}
 				}
 				else
 				{
-					if (fileUtilityService.ObservedLoad(new NamedFileOperationDelegate(new LoadFileWrapper(binding, null).Invoke), fileName) == FileOperationResult.OK) {
-						fileService.RecentOpen.AddLastFile (fileName, null);
+					if (Runtime.FileUtilityService.ObservedLoad(new NamedFileOperationDelegate(new LoadFileWrapper(binding, null).Invoke), fileName) == FileOperationResult.OK) {
+						Runtime.FileService.RecentOpen.AddLastFile (fileName, null);
 					}
 				}
 			} else {
@@ -181,8 +174,8 @@
 						Gnome.Url.Show ("file://" + fileName);
 					}
 				} catch {
-					if (fileUtilityService.ObservedLoad(new NamedFileOperationDelegate (new LoadFileWrapper (displayBindingService.LastBinding, null).Invoke), fileName) == FileOperationResult.OK) {
-						fileService.RecentOpen.AddLastFile (fileName, null);
+					if (Runtime.FileUtilityService.ObservedLoad(new NamedFileOperationDelegate (new LoadFileWrapper (Runtime.Gui.DisplayBindings.LastBinding, null).Invoke), fileName) == FileOperationResult.OK) {
+						Runtime.FileService.RecentOpen.AddLastFile (fileName, null);
 					}
 				}
 			}
@@ -191,8 +184,7 @@
 		
 		protected void GetProjectAndCombineFromFile (string fileName, out IProject project, out Combine combine)
 		{
-			IProjectService projectService = (IProjectService) ServiceManager.GetService(typeof(IProjectService));
-			combine = projectService.CurrentOpenCombine;
+			combine = Runtime.ProjectService.CurrentOpenCombine;
 			project = null;
 			
 			if (combine != null)
@@ -211,8 +203,7 @@
 		
 		public void NewFile(string defaultName, string language, string content)
 		{
-			DisplayBindingService displayBindingService = (DisplayBindingService)MonoDevelop.Core.Services.ServiceManager.GetService(typeof(DisplayBindingService));
-			IDisplayBinding binding = displayBindingService.GetBindingPerLanguageName(language);
+			IDisplayBinding binding = Runtime.Gui.DisplayBindings.GetBindingPerLanguageName(language);
 			
 			if (binding != null) {
 				IViewContent newContent = binding.CreateContentForLanguage(language, content, defaultName);
@@ -223,7 +214,7 @@
 				newContent.IsDirty      = false;
 				WorkbenchSingleton.Workbench.ShowView(newContent);
 				
-				displayBindingService.AttachSubWindows(newContent.WorkbenchWindow);
+				Runtime.Gui.DisplayBindings.AttachSubWindows(newContent.WorkbenchWindow);
 			} else {
 				throw new ApplicationException("Can't create display binding for language " + language);				
 			}
@@ -257,8 +248,7 @@
 				try {
 					Directory.Delete(fileName);
 				} catch (Exception e) {
-					IMessageService messageService = (IMessageService)ServiceManager.GetService(typeof(IMessageService));
-					messageService.ShowError(e, String.Format (GettextCatalog.GetString ("Can't remove directory {0}"), fileName));
+					Runtime.MessageService.ShowError(e, String.Format (GettextCatalog.GetString ("Can't remove directory {0}"), fileName));
 					return;
 				}
 				OnFileRemoved(new FileEventArgs(fileName, true));
@@ -266,8 +256,7 @@
 				try {
 					File.Delete(fileName);
 				} catch (Exception e) {
-					IMessageService messageService = (IMessageService)ServiceManager.GetService(typeof(IMessageService));
-					messageService.ShowError(e, String.Format (GettextCatalog.GetString ("Can't remove file {0}"), fileName));
+					Runtime.MessageService.ShowError(e, String.Format (GettextCatalog.GetString ("Can't remove file {0}"), fileName));
 					return;
 				}
 				OnFileRemoved(new FileEventArgs(fileName, false));
@@ -281,8 +270,7 @@
 					try {
 						Directory.Move(oldName, newName);
 					} catch (Exception e) {
-						IMessageService messageService = (IMessageService)ServiceManager.GetService(typeof(IMessageService));
-						messageService.ShowError(e, String.Format (GettextCatalog.GetString ("Can't rename directory {0}"), oldName));
+						Runtime.MessageService.ShowError(e, String.Format (GettextCatalog.GetString ("Can't rename directory {0}"), oldName));
 						return;
 					}
 					OnFileRenamed(new FileEventArgs(oldName, newName, true));
@@ -290,8 +278,7 @@
 					try {
 						File.Move(oldName, newName);
 					} catch (Exception e) {
-						IMessageService messageService = (IMessageService)ServiceManager.GetService(typeof(IMessageService));
-						messageService.ShowError(e, String.Format (GettextCatalog.GetString ("Can't rename file {0}"), oldName));
+						Runtime.MessageService.ShowError(e, String.Format (GettextCatalog.GetString ("Can't rename file {0}"), oldName));
 						return;
 					}
 					OnFileRenamed(new FileEventArgs(oldName, newName, false));

Modified: trunk/MonoDevelop/Core/src/Main/Base/Services/IconService.cs
===================================================================
--- trunk/MonoDevelop/Core/src/Main/Base/Services/IconService.cs	2004-12-05 09:39:17 UTC (rev 2052)
+++ trunk/MonoDevelop/Core/src/Main/Base/Services/IconService.cs	2004-12-06 15:43:16 UTC (rev 2053)
@@ -17,6 +17,7 @@
 using System.Diagnostics;
 using System.Threading;
 using System.Xml;
+using MonoDevelop.Internal.Parser;
 
 using MonoDevelop.Core.Services;
 using MonoDevelop.Core.AddIns;
@@ -79,5 +80,140 @@
 					projectFileHashtable [iconCodon.Language] = image;
 			}
 		}
+		
+		string GetWithModifiers (ModifierEnum modifier, string mod_public, string mod_protected, string mod_internal, string mod_private)
+		{
+			if ((modifier & ModifierEnum.Public) == ModifierEnum.Public)
+				return mod_public;
+			
+			if ((modifier & ModifierEnum.Protected) == ModifierEnum.Protected)
+				return mod_protected;
+
+			if ((modifier & ModifierEnum.Internal) == ModifierEnum.Internal)
+				return mod_internal;
+			
+			return mod_private;
+		}
+		
+		public string GetIcon (IMethod method)
+		{
+			return GetWithModifiers (method.Modifiers, Stock.Method, Stock.ProtectedMethod, Stock.InternalMethod, Stock.PrivateMethod);
+		}
+		
+		public string GetIcon (IProperty method)
+		{
+			return GetWithModifiers (method.Modifiers, Stock.Property, Stock.ProtectedProperty, Stock.InternalProperty, Stock.PrivateProperty);
+		}
+		
+		public string GetIcon (IField field)
+		{
+			if (field.IsLiteral)
+				return Stock.Literal;
+			
+			return GetWithModifiers (field.Modifiers, Stock.Field, Stock.ProtectedField, Stock.InternalField, Stock.PrivateField);
+		}
+		
+		public string GetIcon (IEvent evt)
+		{
+			return GetWithModifiers (evt.Modifiers, Stock.Event, Stock.ProtectedEvent, Stock.InternalEvent, Stock.PrivateEvent);
+		}
+		
+		public string GetIcon (IClass c)
+		{
+			switch (c.ClassType) {
+			case ClassType.Delegate:
+				return GetWithModifiers (c.Modifiers, Stock.Delegate, Stock.ProtectedDelegate, Stock.InternalDelegate, Stock.PrivateDelegate);
+			case ClassType.Enum:
+				return GetWithModifiers (c.Modifiers, Stock.Enum, Stock.ProtectedEnum, Stock.InternalEnum, Stock.PrivateEnum);
+			case ClassType.Struct:
+				return GetWithModifiers (c.Modifiers, Stock.Struct, Stock.ProtectedStruct, Stock.InternalStruct, Stock.PrivateStruct);
+			case ClassType.Interface:
+				return GetWithModifiers (c.Modifiers, Stock.Interface, Stock.ProtectedInterface, Stock.InternalInterface, Stock.PrivateInterface);
+			default:
+				return GetWithModifiers (c.Modifiers, Stock.Class, Stock.ProtectedClass, Stock.InternalClass, Stock.PrivateClass);
+			}
+		}
+		
+		string GetWithModifiers (MethodBase mb, string mod_public, string mod_protected, string mod_internal, string mod_private)
+		{
+			if (mb.IsAssembly)
+				return mod_internal;
+			
+			if (mb.IsPrivate)
+				return mod_private;
+			
+			if (!(mb.IsPrivate || mb.IsPublic))
+				return mod_protected;
+			
+			return mod_public;
+		}
+		
+		public string GetIcon (MethodBase m)
+		{
+			return GetWithModifiers (m, Stock.Method, Stock.ProtectedMethod, Stock.InternalMethod, Stock.PrivateMethod);
+		}
+		
+		public string GetIcon (PropertyInfo propertyinfo)
+		{
+			MethodBase m;
+			if ((propertyinfo.CanRead  && (m = propertyinfo.GetGetMethod (true)) != null) || 
+			    (propertyinfo.CanWrite && (m = propertyinfo.GetSetMethod (true)) != null))
+				return GetWithModifiers (m, Stock.Property, Stock.ProtectedProperty, Stock.InternalProperty, Stock.PrivateProperty);
+			
+			return Stock.Property;
+		}
+		
+		public string GetIcon (FieldInfo fieldinfo)
+		{
+			if (fieldinfo.IsLiteral)
+				return Stock.Literal;
+			
+			if (fieldinfo.IsAssembly)
+				return Stock.InternalField;
+			
+			if (fieldinfo.IsPrivate)
+				return Stock.PrivateField;
+			
+			if (!(fieldinfo.IsPrivate || fieldinfo.IsPublic))
+				return Stock.ProtectedField;
+			
+			return Stock.Field;
+		}
+				
+		public string GetIcon(EventInfo eventinfo)
+		{
+			if (eventinfo.GetAddMethod (true) != null)
+				return GetWithModifiers (eventinfo.GetAddMethod (true), Stock.Event, Stock.ProtectedEvent, Stock.InternalEvent, Stock.PrivateEvent);
+			
+			return Stock.Event;
+		}
+		
+		public string GetIcon(System.Type type)
+		{
+			ModifierEnum mod;
+			
+			if (type.IsNestedPrivate)
+				mod = ModifierEnum.Private;
+			else if (type.IsNotPublic || type.IsNestedAssembly)
+				mod = ModifierEnum.Internal;
+			else if (type.IsNestedFamily)
+				mod = ModifierEnum.Protected;
+			else
+				mod = ModifierEnum.Public;
+			
+			if (type.IsValueType)
+				return GetWithModifiers (mod, Stock.Struct, Stock.ProtectedStruct, Stock.InternalStruct, Stock.PrivateStruct);
+			
+			if (type.IsEnum)
+				return GetWithModifiers (mod, Stock.Enum, Stock.ProtectedEnum, Stock.InternalEnum, Stock.PrivateEnum);
+			
+			if (type.IsInterface)
+				return GetWithModifiers (mod, Stock.Interface, Stock.ProtectedInterface, Stock.InternalInterface, Stock.PrivateInterface);
+			
+			if (type.IsSubclassOf (typeof (System.Delegate)))
+				return GetWithModifiers (mod, Stock.Delegate, Stock.ProtectedDelegate, Stock.InternalDelegate, Stock.PrivateDelegate);
+			
+			return GetWithModifiers (mod, Stock.Class, Stock.ProtectedClass, Stock.InternalClass, Stock.PrivateClass);
+		}
 	}
 }

Modified: trunk/MonoDevelop/Core/src/Main/Base/Services/ResourceService.cs
===================================================================
--- trunk/MonoDevelop/Core/src/Main/Base/Services/ResourceService.cs	2004-12-05 09:39:17 UTC (rev 2052)
+++ trunk/MonoDevelop/Core/src/Main/Base/Services/ResourceService.cs	2004-12-06 15:43:16 UTC (rev 2053)
@@ -37,6 +37,11 @@
 	
 	public class ResourceService : AbstractService
 	{
+		Hashtable userStrings = null;
+		Hashtable userIcons   = null;
+		static Gtk.IconFactory iconFactory = null;
+		static Hashtable stockMappings = null;
+		
 		static ResourceService()
 		{
 			iconFactory = new Gtk.IconFactory ();
@@ -48,9 +53,6 @@
 			iconFactory.AddDefault ();
 		}
 		
-		Hashtable userStrings = null;
-		Hashtable userIcons   = null;
-		
 		/// <summary>
 		/// The LoadFont routines provide a safe way to load fonts.
 		/// </summary>
@@ -205,9 +207,6 @@
 			return new Gtk.Image (GetBitmap (name));
 		}
 		
-		static Gtk.IconFactory iconFactory = null;
-		static Hashtable stockMappings = null;
-
 		internal static void AddToIconFactory (string stockId,
 		                                       string filename,
 						       Gtk.IconSize iconSize)

Added: trunk/MonoDevelop/Core/src/Main/Base/Services/Runtime.cs
===================================================================
--- trunk/MonoDevelop/Core/src/Main/Base/Services/Runtime.cs	2004-12-05 09:39:17 UTC (rev 2052)
+++ trunk/MonoDevelop/Core/src/Main/Base/Services/Runtime.cs	2004-12-06 15:43:16 UTC (rev 2053)
@@ -0,0 +1,146 @@
+
+using MonoDevelop.Core.Services;
+using MonoDevelop.Gui;
+
+namespace MonoDevelop.Services
+{
+	public class Runtime
+	{
+		static PropertyService propertyService;
+		static AmbienceService ambienceService;
+		static DispatchService dispatchService;
+		static IFileService fileService;
+		static IParserService parserService;
+		static IProjectService projectService;
+		static TaskService taskService;
+		static IDebuggingService debuggingService;
+		static MessageService messageService;
+		static MonodocService monodocService;
+		static StringParserService stringParserService;
+		static GuiService guiService;
+		static LanguageBindingService languageBindingService;
+		static SystemAssemblyService systemAssemblyService;
+		static FileUtilityService fileUtilityService;
+	
+		public static PropertyService Properties {
+			get {
+				if (propertyService == null)
+					propertyService = (PropertyService) ServiceManager.GetService (typeof(PropertyService));
+				return propertyService ;
+			}
+		}
+	
+		public static AmbienceService Ambience {
+			get {
+				if (ambienceService == null)
+					ambienceService = (AmbienceService) ServiceManager.GetService (typeof(AmbienceService));
+				return ambienceService;
+			}
+		}
+	
+		public static LanguageBindingService Languages {
+			get {
+				if (languageBindingService == null)
+					languageBindingService = (LanguageBindingService) ServiceManager.GetService (typeof(LanguageBindingService));
+				return languageBindingService;
+			}
+		}
+	
+		public static MonodocService Documentation {
+			get {
+				if (monodocService == null)
+					monodocService = (MonodocService) ServiceManager.GetService (typeof(MonodocService));
+				return monodocService;
+			}
+		}
+	
+		public static DispatchService DispatchService {
+			get {
+				if (dispatchService == null)
+					dispatchService = (DispatchService) ServiceManager.GetService (typeof(DispatchService));
+				return dispatchService;
+			}
+		}
+	
+	
+		public static IFileService FileService {
+			get {
+				if (fileService == null)
+					fileService = (IFileService) ServiceManager.GetService (typeof(IFileService));
+				return fileService;
+			}
+		}
+	
+		public static IParserService ParserService {
+			get {
+				if (parserService == null)
+					parserService = (IParserService) ServiceManager.GetService (typeof(IParserService));
+				return parserService;
+			}
+		}
+	
+		public static IProjectService ProjectService {
+			get {
+				if (projectService == null)
+					projectService = (IProjectService) ServiceManager.GetService (typeof(IProjectService));
+				return projectService;
+			}
+		}
+	
+		public static TaskService TaskService {
+			get {
+				if (taskService == null)
+					taskService = (TaskService) ServiceManager.GetService (typeof(TaskService));
+				return taskService;
+			}
+		}
+	
+		public static IDebuggingService DebuggingService {
+			get {
+				if (debuggingService == null)
+					debuggingService = (IDebuggingService) ServiceManager.GetService (typeof(IDebuggingService));
+				return debuggingService;
+			}
+		}
+	
+		public static MessageService MessageService {
+			get {
+				if (messageService == null)
+					messageService = (MessageService) ServiceManager.GetService (typeof(MessageService));
+				return messageService;
+			}
+		}
+	
+		public static FileUtilityService FileUtilityService {
+			get {
+				if (fileUtilityService == null)
+					fileUtilityService = (FileUtilityService) ServiceManager.GetService (typeof(FileUtilityService));
+				return fileUtilityService; 
+			}
+		}
+		
+		public static StringParserService StringParserService {
+			get {
+				if (stringParserService == null)
+					stringParserService = (StringParserService) ServiceManager.GetService (typeof(StringParserService));
+				return stringParserService; 
+			}
+		}
+		
+		public static SystemAssemblyService SystemAssemblyService {
+			get {
+				if (systemAssemblyService == null)
+					systemAssemblyService = (SystemAssemblyService) ServiceManager.GetService (typeof(SystemAssemblyService));
+				return systemAssemblyService;
+			}
+		}
+	
+		public static GuiService Gui {
+			get {
+				if (guiService == null)
+					guiService = new GuiService ();
+				return guiService;
+			}
+		}
+	}
+}




More information about the Monodevelop-patches-list mailing list