Browse Source

XML editor now initialises custom syntax highlighting.

git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/trunk@2983 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61
shortcuts
Matt Ward 18 years ago
parent
commit
c48438edca
  1. 2
      src/AddIns/DisplayBindings/XmlEditor/Project/Src/XmlView.cs
  2. 8
      src/Main/Base/Project/Src/TextEditor/Gui/Editor/TextEditorDisplayBinding.cs

2
src/AddIns/DisplayBindings/XmlEditor/Project/Src/XmlView.cs

@ -113,6 +113,8 @@ namespace ICSharpCode.XmlEditor @@ -113,6 +113,8 @@ namespace ICSharpCode.XmlEditor
{
this.TabPageText = "XML";
TextEditorDisplayBinding.InitializeSyntaxModes();
xmlEditor = new XmlEditorControl();
xmlEditor.Dock = DockStyle.Fill;

8
src/Main/Base/Project/Src/TextEditor/Gui/Editor/TextEditorDisplayBinding.cs

@ -34,6 +34,14 @@ namespace ICSharpCode.SharpDevelop.DefaultEditor.Gui.Editor @@ -34,6 +34,14 @@ namespace ICSharpCode.SharpDevelop.DefaultEditor.Gui.Editor
HighlightingManager.Manager.AddSyntaxModeFileProvider(new FileSyntaxModeProvider(Path.Combine(PropertyService.DataDirectory, "modes")));
}
/// <summary>
/// Force static constructor to be called. Otherwise other editor's such as the XML editor do not
/// use custom syntax highlighting.
/// </summary>
public static void InitializeSyntaxModes()
{
}
public virtual bool CanCreateContentForFile(string fileName)
{
return true;

Loading…
Cancel
Save