Skip to content
This repository was archived by the owner on Oct 4, 2021. It is now read-only.

Commit fc06b94

Browse files
author
David Karlaš
authored
Merge pull request #9033 from mono/dev/david/fix959380
Fix 959380: TextMate tagger does not work with extensions (VS compat issue)
2 parents 056c13f + e8f3f6a commit fc06b94

File tree

4 files changed

+25
-6
lines changed

4 files changed

+25
-6
lines changed

main/src/addins/MonoDevelop.TextEditor/MonoDevelop.TextEditor.Cocoa/TextMate/CustomRepositoryService.cs

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
using System;
2-
using System.Collections.Generic;
1+
using System.Collections.Generic;
32
using System.ComponentModel.Composition;
43
using System.IO;
54
using System.Threading.Tasks;
6-
75
using Microsoft.VisualStudio.TextMate.Core.Hosting;
6+
using Mono.Addins;
7+
using MonoDevelop.TextEditor;
88

99
namespace Microsoft.VisualStudio.TextMate.VSMac
1010
{
@@ -21,6 +21,10 @@ sealed class CustomRepositoryService : ICustomRepositoryService
2121
{
2222
(starterKitPath, Path.Combine (starterKitPath, "TextMate.cache"))
2323
};
24+
foreach (var node in AddinManager.GetExtensionNodes<TextMateRepositoryExtensionNode> ("/MonoDevelop/Ide/Editor/TextMate")) {
25+
var path = node.Addin.GetFilePath(node.FolderPath);
26+
collectionPaths.Add ((path, Path.Combine (path, "TextMate.cache")));
27+
}
2428

2529
return Task.FromResult<IList<(string, string)>> (collectionPaths);
2630
}

main/src/addins/MonoDevelop.TextEditor/MonoDevelop.TextEditor/Properties/MonoDevelop.TextEditor.addin.xml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -336,4 +336,8 @@
336336
</Extension>
337337
338338
-->
339+
<ExtensionPoint path = "/MonoDevelop/Ide/Editor/TextMate" name = "TextMate folder">
340+
<Description>TextMate folder with syntax highlighting definitions, code snippets and syntax color themes</Description>
341+
<ExtensionNode name="Repository" type="MonoDevelop.TextEditor.TextMateRepositoryExtensionNode"/>
342+
</ExtensionPoint>
339343
</ExtensionModel>
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
using System;
2+
using Mono.Addins;
3+
4+
namespace MonoDevelop.TextEditor
5+
{
6+
internal class TextMateRepositoryExtensionNode : ExtensionNode
7+
{
8+
[NodeAttribute ("folderPath")]
9+
public string FolderPath { get; set; }
10+
}
11+
}

main/src/addins/MonoDevelop.TextEditor/MonoDevelop.TextEditor/ThemeToClassification.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -126,9 +126,9 @@ public void Dispose ()
126126
("Preprocessor Keyword", "Preprocessor"),
127127
("Operator", "Keyword(Operator)"),
128128
("Literal", "Number"),
129-
("Markup Attribute", ""),
130-
("Markup Attribute Value", ""),
131-
("Markup Node", ""),
129+
("Markup Attribute", "Xml Attribute"),
130+
("Markup Attribute Value", "Xml Attribute Value"),
131+
("Markup Node", "Xml Name"),
132132
("String", "String"),
133133
("Type", "User Types"),
134134
("Number", "Number"),

0 commit comments

Comments
 (0)