Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/monodevelop.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/main
diff options
context:
space:
mode:
authorMichael Hutchinson <mhutchinson@novell.com>2008-03-26 18:20:16 +0300
committerMichael Hutchinson <mhutchinson@novell.com>2008-03-26 18:20:16 +0300
commit6df28b60ddb1bf4c0c4a808f786e7fa549e07ce9 (patch)
tree0cf692365c614aa9c959fa6179d889919790e418 /main
parentf53ec4a499dabb88f6d89298d98ad8be961843f7 (diff)
* MonoDevelop.XmlEditor/XmlTextEditorExtension.cs: When using the
Mono.TextEditor/SourceEditor2 editor, enable XML syntax highlighting for all user-registered XML filetypes. * MonoDevelop.XmlEditor/XmlSchemaCompletionDataCollection.cs: Oops, fix null check that prevented access to full set of schemas. svn path=/trunk/monodevelop/; revision=99032
Diffstat (limited to 'main')
-rw-r--r--main/src/addins/MonoDevelop.XmlEditor/ChangeLog8
-rwxr-xr-xmain/src/addins/MonoDevelop.XmlEditor/MonoDevelop.XmlEditor/XmlSchemaCompletionDataCollection.cs2
-rw-r--r--main/src/addins/MonoDevelop.XmlEditor/MonoDevelop.XmlEditor/XmlTextEditorExtension.cs10
3 files changed, 19 insertions, 1 deletions
diff --git a/main/src/addins/MonoDevelop.XmlEditor/ChangeLog b/main/src/addins/MonoDevelop.XmlEditor/ChangeLog
index 856cb9f569..f6b671dc29 100644
--- a/main/src/addins/MonoDevelop.XmlEditor/ChangeLog
+++ b/main/src/addins/MonoDevelop.XmlEditor/ChangeLog
@@ -1,3 +1,11 @@
+2008-03-26 Michael Hutchinson <mhutchinson@novell.com>
+
+ * MonoDevelop.XmlEditor/XmlTextEditorExtension.cs: When using the
+ Mono.TextEditor/SourceEditor2 editor, enable XML syntax
+ highlighting for all user-registered XML filetypes.
+ * MonoDevelop.XmlEditor/XmlSchemaCompletionDataCollection.cs: Oops, fix
+ null check that prevented access to full set of schemas.
+
2008-03-24 Michael Hutchinson <mhutchinson@novell.com>
* MonoDevelop.XmlEditor/XmlTextEditorExtension.cs: Remove redundant
diff --git a/main/src/addins/MonoDevelop.XmlEditor/MonoDevelop.XmlEditor/XmlSchemaCompletionDataCollection.cs b/main/src/addins/MonoDevelop.XmlEditor/MonoDevelop.XmlEditor/XmlSchemaCompletionDataCollection.cs
index fc954a8d23..1f929c5a12 100755
--- a/main/src/addins/MonoDevelop.XmlEditor/MonoDevelop.XmlEditor/XmlSchemaCompletionDataCollection.cs
+++ b/main/src/addins/MonoDevelop.XmlEditor/MonoDevelop.XmlEditor/XmlSchemaCompletionDataCollection.cs
@@ -95,7 +95,7 @@ namespace MonoDevelop.XmlEditor
public IEnumerator<XmlSchemaCompletionData> GetEnumerator ()
{
foreach (XmlSchemaCompletionData x in builtin)
- if (user[x.NamespaceUri] != null)
+ if (user[x.NamespaceUri] == null)
yield return x;
foreach (XmlSchemaCompletionData x in user)
yield return x;
diff --git a/main/src/addins/MonoDevelop.XmlEditor/MonoDevelop.XmlEditor/XmlTextEditorExtension.cs b/main/src/addins/MonoDevelop.XmlEditor/MonoDevelop.XmlEditor/XmlTextEditorExtension.cs
index 29b375a096..cbc2c44598 100644
--- a/main/src/addins/MonoDevelop.XmlEditor/MonoDevelop.XmlEditor/XmlTextEditorExtension.cs
+++ b/main/src/addins/MonoDevelop.XmlEditor/MonoDevelop.XmlEditor/XmlTextEditorExtension.cs
@@ -56,6 +56,16 @@ namespace MonoDevelop.XmlEditor
XmlSchemaManager.UserSchemaAdded += UserSchemaAdded;
XmlSchemaManager.UserSchemaRemoved += UserSchemaRemoved;
SetInitialValues();
+
+ MonoDevelop.SourceEditor.SourceEditorView view =
+ Document.GetContent<MonoDevelop.SourceEditor.SourceEditorView> ();
+ if (view != null && view.Document.SyntaxMode == null) {
+ Mono.TextEditor.Highlighting.SyntaxMode mode = Mono.TextEditor.Highlighting.SyntaxModeService.GetSyntaxMode (ApplicationXmlMimeType);
+ if (mode != null)
+ view.Document.SyntaxMode = mode;
+ else
+ LoggingService.LogWarning ("XmlTextEditorExtension could not get SyntaxMode for mimetype '" + ApplicationXmlMimeType + "'.");
+ }
}
bool disposed;