[Monodevelop-patches-list] r663 - in trunk/MonoDevelop: build/AddIns build/AddIns/AddIns/BackendBindings data/resources src/Main/Core/AddIns

commit-watcher at mono-cvs.ximian.com commit-watcher at mono-cvs.ximian.com
Mon Jan 26 19:09:50 EST 2004


Author: benm
Date: 2004-01-26 19:09:49 -0500 (Mon, 26 Jan 2004)
New Revision: 663

Modified:
   trunk/MonoDevelop/build/AddIns/AddIns/BackendBindings/BackendBindings.addin
   trunk/MonoDevelop/build/AddIns/SharpDevelopCore.addin
   trunk/MonoDevelop/build/AddIns/SharpDevelopDefaultTextEditor.addin
   trunk/MonoDevelop/data/resources/AddIn.xsd
   trunk/MonoDevelop/src/Main/Core/AddIns/AddIn.cs
Log:
shuffle to allow starting without the default editor

Modified: trunk/MonoDevelop/build/AddIns/AddIns/BackendBindings/BackendBindings.addin
===================================================================
--- trunk/MonoDevelop/build/AddIns/AddIns/BackendBindings/BackendBindings.addin	2004-01-26 23:29:31 UTC (rev 662)
+++ trunk/MonoDevelop/build/AddIns/AddIns/BackendBindings/BackendBindings.addin	2004-01-27 00:09:49 UTC (rev 663)
@@ -3,7 +3,8 @@
        copyright   = "GPL"
        url         = "http://www.icsharpcode.net"
        description = "NCvs core module"
-       version     = "1.0.0">
+       version     = "1.0.0"
+       if-not-env = "NEW_EDITOR">
 	
 	<Runtime>
 		<Import assembly = "CSharpBinding.dll"/>
@@ -126,63 +127,7 @@
 			<Class id ="JavaFormatter" insertbefore="DefaultFormatter" class = "JavaBinding.FormattingStrategy.JavaFormattingStrategy"/>
 		</Conditional>
 	</Extension>
-	
-	<Extension path = "/Workspace/Icons">
-		<!-- C# -->
-		<Icon id         = "C#Prj"
-		      language   = "C#"
-		      resource   = "C#.ProjectIcon"/>
 
-		<Icon id         = "C#File"
-		      extensions = ".cs"
-		      resource   = "C#.FileIcon"/>
-		
-		<!-- VB.NET -->
-		<Icon id         = "VBPrj"
-		      language   = "VBNET"
-		      resource   = "VB.ProjectIcon"/>
-		<Icon id         = "VBFile"
-		      extensions = ".vb"
-		      resource   = "VB.FileIcon"/>
-
-		<!-- Java -->
-                <Icon id         = "JavaPrj"
-		      language   = "Java"
-		      resource   = "Java.ProjectIcon"/>
-                <Icon id         = "JavaFile"
-		      extensions = ".java"
-		      resource   = "Java.FileIcon"/>
-		      
-		<!-- Java Script -->
-                <Icon id         = "JScriptPrj"
-		      language   = "JScript"
-		      resource   = "JScript.ProjectIcon"/>
-                <Icon id         = "JScriptFile"
-		      extensions = ".js"
-		      resource   = "JScript.FileIcon"/>
-		
-		<!-- C++ -->
-                <Icon id         = "C++Project"
-		      language   = "C++"
-		      resource   = "C++.ProjectIcon"/>
-                <Icon id         = "C++File"
-		      extensions = ".cpp"
-		      resource   = "C++.FileIcon"/>
-		
-		<!-- Resources -->
-		<Icon id         = "ResourceFileIcon"
-		      extensions = ".resources,.resx"
-		      resource   = "Icons.16x16.ResourceFileIcon" />
-		<!-- XML -->
-		<Icon id         = "XmlFileIcon"
-		      extensions = ".xml"
-		      resource   = "FileIcons.XmlIcon" />
-		<!-- TextFiles -->
-		<Icon id         = "TextFileIcon"
-		      extensions = ".txt,.doc"
-		      resource   = "Icons.16x16.TextFileIcon"/>
-	</Extension>
-
 	<Extension path = "/SharpDevelop/Workbench/LanguageBindings">
 		<LanguageBinding id    = "CSharp"
 		                 supportedextensions = ".cs"

Modified: trunk/MonoDevelop/build/AddIns/SharpDevelopCore.addin
===================================================================
--- trunk/MonoDevelop/build/AddIns/SharpDevelopCore.addin	2004-01-26 23:29:31 UTC (rev 662)
+++ trunk/MonoDevelop/build/AddIns/SharpDevelopCore.addin	2004-01-27 00:09:49 UTC (rev 663)
@@ -20,8 +20,7 @@
 		       class = "ICSharpCode.SharpDevelop.Commands.InitializeWorkbenchCommand"/>
 		<Class id = "StartCodeCompletionWizard" 
 		       class = "ICSharpCode.SharpDevelop.Commands.StartCodeCompletionWizard"/>
-		<Class id = "StartParserServiceThread" 
-		       class = "ICSharpCode.SharpDevelop.Commands.StartParserServiceThread"/>
+
 		<!-- #assembly preload -->
 <!--		<Class id = "StartSharpAssemblyPreloadThread"
 		       class = "ICSharpCode.SharpDevelop.Commands.StartSharpAssemblyPreloadThread"/>-->
@@ -29,25 +28,24 @@
 		       class = "ICSharpCode.SharpDevelop.Commands.StartWorkbenchCommand"/>
 	</Extension>
 	
+	<Extension path = "/Workspace/Autostart" if-not-env = "NEW_EDITOR">
+		<Class id = "StartParserServiceThread" 
+		       class = "ICSharpCode.SharpDevelop.Commands.StartParserServiceThread"/>
+	</Extension>
+	
 	<Extension path = "/Workspace/Services">
 		<Class id    = "ProjectService"
 		       class = "ICSharpCode.SharpDevelop.Services.DefaultProjectService"/>
 		<Class id    = "FileService"
 		       class = "ICSharpCode.SharpDevelop.Services.DefaultFileService"/>
-		<Class id    = "ParserService"
-		       class = "ICSharpCode.SharpDevelop.Services.DefaultParserService"/>
 		<Class id    = "TaskService"
 		       class = "ICSharpCode.SharpDevelop.Services.TaskService"/>
 		<Class id    = "StatusBarService"
 		       class = "ICSharpCode.SharpDevelop.Services.DefaultStatusBarService"/>
 		<Class id    = "ToolbarService"
 		       class = "ICSharpCode.SharpDevelop.Services.ToolbarService"/>
-		<Class id    = "LanguageService"
-		       class = "ICSharpCode.SharpDevelop.Services.LanguageService"/>
 		<Class id    = "ClassBrowserIconsService"
 		       class = "ICSharpCode.SharpDevelop.Services.ClassBrowserIconsService"/>
-		<Class id    = "LanguageBindingService"
-		       class = "ICSharpCode.SharpDevelop.Services.LanguageBindingService"/>
 		<Class id    = "DisplayBindingService"
 		       class = "ICSharpCode.SharpDevelop.Services.DisplayBindingService"/>
 		<Class id    = "AmbienceService"
@@ -55,7 +53,14 @@
 		<Class id    = "MenuService"
 		       class = "ICSharpCode.SharpDevelop.Services.MenuService"/>
 	</Extension>
-
+	
+	<Extension path = "/Workspace/Services" if-not-env = "NEW_EDITOR">
+		<Class id    = "LanguageService"
+		       class = "ICSharpCode.SharpDevelop.Services.LanguageService"/>
+		<Class id    = "ParserService"
+		       class = "ICSharpCode.SharpDevelop.Services.DefaultParserService"/>
+	</Extension>
+	
 	<Extension path = "/SharpDevelop/Workbench/DisplayBindings">
 		<DisplayBinding id    = "Browser"
 		                supportedformats = "Web Pages"
@@ -486,15 +491,9 @@
 				             tooltip = "${res:XML.MainMenu.EditMenu.Delete.Description}"
 				             class = "ICSharpCode.SharpDevelop.Commands.Delete"/>
 			</Conditional>
-			<ToolbarItem id = "CutSeparator" insertafter ="Delete" insertbefore ="Find" tooltip = "-"/>
-	                <Conditional action="Disable">
-	                	<Or>
-	                		<Condition activewindow="ICSharpCode.SharpDevelop.DefaultEditor.Gui.Editor.ITextAreaControlProvider"/>
-	                		<Condition iscombineopen="True"/>
-	                	</Or>
-			</Conditional>
+			<ToolbarItem id = "CutSeparator" tooltip = "-"/>
 			
-			<ToolbarItem id = "CompileSeparator" insertafter = "ClearBookmarks" tooltip = "-"/>
+			
 	                <Conditional action="Disable">
 	                	<Or>
 	                		<Condition activewindow="ICSharpCode.SharpDevelop.DefaultEditor.Gui.Editor.ITextAreaControlProvider"/>
@@ -514,6 +513,7 @@
 				             tooltip = "${res:XML.MainMenu.RunMenu.Run.Description}"
 				             class = "ICSharpCode.SharpDevelop.Commands.RunCommand"/>
 			</Conditional>
+			<ToolbarItem id = "CompileSeparator" tooltip = "-"/>
 		</ToolbarItem>
 	</Extension>
 
@@ -1005,4 +1005,61 @@
 		          class = "ICSharpCode.SharpDevelop.Gui.Pads.PropertyPadShowDescriptionCommand"/>
 	</Extension>
 	
+	
+	<Extension path = "/Workspace/Icons">
+		<!-- C# -->
+		<Icon id         = "C#Prj"
+		      language   = "C#"
+		      resource   = "C#.ProjectIcon"/>
+
+		<Icon id         = "C#File"
+		      extensions = ".cs"
+		      resource   = "C#.FileIcon"/>
+		
+		<!-- VB.NET -->
+		<Icon id         = "VBPrj"
+		      language   = "VBNET"
+		      resource   = "VB.ProjectIcon"/>
+		<Icon id         = "VBFile"
+		      extensions = ".vb"
+		      resource   = "VB.FileIcon"/>
+
+		<!-- Java -->
+                <Icon id         = "JavaPrj"
+		      language   = "Java"
+		      resource   = "Java.ProjectIcon"/>
+                <Icon id         = "JavaFile"
+		      extensions = ".java"
+		      resource   = "Java.FileIcon"/>
+		      
+		<!-- Java Script -->
+                <Icon id         = "JScriptPrj"
+		      language   = "JScript"
+		      resource   = "JScript.ProjectIcon"/>
+                <Icon id         = "JScriptFile"
+		      extensions = ".js"
+		      resource   = "JScript.FileIcon"/>
+		
+		<!-- C++ -->
+                <Icon id         = "C++Project"
+		      language   = "C++"
+		      resource   = "C++.ProjectIcon"/>
+                <Icon id         = "C++File"
+		      extensions = ".cpp"
+		      resource   = "C++.FileIcon"/>
+		
+		<!-- Resources -->
+		<Icon id         = "ResourceFileIcon"
+		      extensions = ".resources,.resx"
+		      resource   = "Icons.16x16.ResourceFileIcon" />
+		<!-- XML -->
+		<Icon id         = "XmlFileIcon"
+		      extensions = ".xml"
+		      resource   = "FileIcons.XmlIcon" />
+		<!-- TextFiles -->
+		<Icon id         = "TextFileIcon"
+		      extensions = ".txt,.doc"
+		      resource   = "Icons.16x16.TextFileIcon"/>
+	</Extension>
+	
 </AddIn>

Modified: trunk/MonoDevelop/build/AddIns/SharpDevelopDefaultTextEditor.addin
===================================================================
--- trunk/MonoDevelop/build/AddIns/SharpDevelopDefaultTextEditor.addin	2004-01-26 23:29:31 UTC (rev 662)
+++ trunk/MonoDevelop/build/AddIns/SharpDevelopDefaultTextEditor.addin	2004-01-27 00:09:49 UTC (rev 663)
@@ -3,7 +3,8 @@
        copyright   = "GPL"
        url         = "http://www.icsharpcode.net"
        description = "NCvs texteditor module"
-       version     = "1.0.0">
+       version     = "1.0.0"
+       if-not-env  = "NEW_EDITOR">
 	
 	<Runtime>
 		<Import assembly="../bin/MonoDevelop.TextEditor.dll"/>
@@ -133,6 +134,7 @@
 				</Or>
 			
 				<ToolbarItem id = "Find"
+				             insertafter = "CutSeparator"
 				             icon = "Icons.16x16.FindIcon" 
 				             tooltip = "${res:XML.MainMenu.SearchMenu.Find.Description}"
 				             class = "ICSharpCode.SharpDevelop.DefaultEditor.Commands.Find"/>

Modified: trunk/MonoDevelop/data/resources/AddIn.xsd
===================================================================
--- trunk/MonoDevelop/data/resources/AddIn.xsd	2004-01-26 23:29:31 UTC (rev 662)
+++ trunk/MonoDevelop/data/resources/AddIn.xsd	2004-01-27 00:09:49 UTC (rev 663)
@@ -13,6 +13,8 @@
 		<xs:attribute name="url" type="xs:anyURI" use="required"/>
 		<xs:attribute name="description" type="xs:string" use="required"/>
 		<xs:attribute name="version" type="xs:string" use="required"/>
+		<xs:attribute name="if-not-env" type="xs:string" use="optional"/>
+		<xs:attribute name="if-env" type="xs:string" use="optional"/>
 	</xs:complexType>
 	<xs:element name="AddIn" type="AddIn"/>
 	<xs:complexType name="Import">
@@ -39,6 +41,8 @@
 			<xs:element ref="MenuItem"/>
 		</xs:choice>
 		<xs:attribute name="path" type="xs:string" use="required"/>
+		<xs:attribute name="if-not-env" type="xs:string" use="optional"/>
+		<xs:attribute name="if-env" type="xs:string" use="optional"/>
 	</xs:complexType>
 	<xs:element name="Extension" type="Extension"/>
 	<xs:complexType name="Condition">

Modified: trunk/MonoDevelop/src/Main/Core/AddIns/AddIn.cs
===================================================================
--- trunk/MonoDevelop/src/Main/Core/AddIns/AddIn.cs	2004-01-26 23:29:31 UTC (rev 662)
+++ trunk/MonoDevelop/src/Main/Core/AddIns/AddIn.cs	2004-01-27 00:09:49 UTC (rev 663)
@@ -182,6 +182,14 @@
 				url         = doc.DocumentElement.Attributes["url"].InnerText;
 				description = doc.DocumentElement.Attributes["description"].InnerText;
 				version     = doc.DocumentElement.Attributes["version"].InnerText;
+				
+				XmlAttribute if_env     = doc.DocumentElement.Attributes ["if-env"];
+				XmlAttribute if_not_env = doc.DocumentElement.Attributes ["if-not-env"];
+				
+				if (if_env != null && Environment.GetEnvironmentVariable (if_env.InnerText) == null)
+					return;
+				if (if_not_env != null && Environment.GetEnvironmentVariable (if_not_env.InnerText) != null)
+					return;
 			} catch (Exception) {
 				throw new AddInLoadException("No or malformed 'AddIn' node");
 			}
@@ -226,7 +234,13 @@
 		{
 			if (el.Attributes["path"] == null) {
 				throw new AddInLoadException("One extension node has no path attribute defined.");
-			}			
+			}
+			
+			if (el.Attributes["if-not-env"] != null && Environment.GetEnvironmentVariable (el.Attributes["if-not-env"].InnerText) != null)
+				return;
+			if (el.Attributes["if-env"] != null && Environment.GetEnvironmentVariable (el.Attributes["if-env"].InnerText) == null)
+				return;
+			
 			Extension e = new Extension(el.Attributes["path"].InnerText);
 			AddCodonsToExtension(e, el, new ConditionCollection());
 			extensions.Add(e);




More information about the Monodevelop-patches-list mailing list