Quantcast
Channel: SharpDevelop Community
Viewing all articles
Browse latest Browse all 1764

Applying Custom Highlighting in AddIn

$
0
0

I'm trying to create an SharpDevelop addin that applies a custom highlighting strategy to all *.data files opened in SharpDevelop. I have created the xshd file that defines the strategy and successfully loaded it as an embedded resource:

using (Stream stream = Assembly.GetExecutingAssembly().GetManifestResourceStream("MyAddin.Resources.MyHighlighting.xshd"))
                using (XmlTextReader reader = new XmlTextReader(stream))
                    highlightingDef = HighlightingLoader.Load(reader, HighlightingManager.Instance);

(The code above works.)

How do I apply the highlighting strategy to the appropriate files? I have tried for a couple of hours but can't find a way.

Thanks for your help in advance!


Viewing all articles
Browse latest Browse all 1764

Trending Articles