From 8a3241306bdaad7e07dfc31236b2a93241d51151 Mon Sep 17 00:00:00 2001 From: Daniel Grunwald Date: Mon, 17 Oct 2005 09:58:54 +0000 Subject: [PATCH] Fixed SD2-488: Highlighting editor does not work for addin-defined syntax modes. git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/trunk@587 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61 --- data/resources/layouts/Debug.xml | Bin 18132 -> 18824 bytes data/resources/layouts/Default.xml | Bin 18124 -> 17784 bytes .../Project/Src/EditHighlightingPanel.cs | 13 ++++++++++--- .../Test/ICSharpCode.TextEditor.Test.csproj | 2 +- 4 files changed, 11 insertions(+), 4 deletions(-) diff --git a/data/resources/layouts/Debug.xml b/data/resources/layouts/Debug.xml index 10a4563edfa88503bbcb65d493762b5867b53c67..4814c247f5812129c651fd95c5a046127e572748 100644 GIT binary patch delta 250 zcmcc8%h)lQalGP@Wj z3t5OwcF;GPY$Gc*IY3ciGMAdr=3{bQOq&-dM)6PX1B!l7l$q?H%*I~IkP9?8Z}LT1 zRc0dwqsf7)=93+?Jtns(hD`ot;J|1y+1fA|uFBC^aqu^nI3`zE&6)hpOm31r u+hjjOxyj39RW?sBY-60nlW-+0 zlR!HLlU^MZv#=h#0+X;FAd?^t29p>)5RjUN|Zd{}ep# diff --git a/data/resources/layouts/Default.xml b/data/resources/layouts/Default.xml index 7e3631dd961909d910f49aceb19cd261d2118ac2..0ec2b291d198f900202eedfdc07a790185f91430 100644 GIT binary patch delta 138 zcmV;50CoS&jRE+I0k8%GlkPJHle`=XlNKu?lky!Dlkf`~lb|UEvuXpJ7qbi;<^hxb zDm(!&lkpr!lf)i6ldv8XlQlS&^Jlh8#5lV%@Cll&hzlimmhlk6W5 slS&{slkf=!lR6*}lb9ellY$@?lja~elh7a*lQbbXlO7=yvw|T?B^#bylj&d6!<1TkhcOF&S)vV*+9WV6#&WTHlY9j diff --git a/src/AddIns/Misc/HighlightingEditor/Project/Src/EditHighlightingPanel.cs b/src/AddIns/Misc/HighlightingEditor/Project/Src/EditHighlightingPanel.cs index 97ee7fa53c..27fc4787f1 100644 --- a/src/AddIns/Misc/HighlightingEditor/Project/Src/EditHighlightingPanel.cs +++ b/src/AddIns/Misc/HighlightingEditor/Project/Src/EditHighlightingPanel.cs @@ -33,8 +33,6 @@ namespace ICSharpCode.SharpDevelop.Gui.OptionPanels Button deleteButton; Button modifyButton; - ResourceSyntaxModeProvider modeProvider; - public override bool StorePanelContents() { ICSharpCode.TextEditor.Document.HighlightingManager.Manager.ReloadSyntaxModes(); @@ -128,9 +126,18 @@ namespace ICSharpCode.SharpDevelop.Gui.OptionPanels userList.Items.Add(new HighlightItem(null, str, node)); } + ISyntaxModeFileProvider modeProvider; modeProvider = new ResourceSyntaxModeProvider(); - foreach(SyntaxMode mode in modeProvider.SyntaxModes){ + foreach(SyntaxMode mode in modeProvider.SyntaxModes) { + SchemeNode node = LoadFile(modeProvider.GetSyntaxModeFile(mode), false); + if (node == null) continue; + builtinList.Items.Add(new HighlightItem(mode, null, node)); + } + + modeProvider = new ICSharpCode.SharpDevelop.DefaultEditor.Codons.AddInTreeSyntaxModeProvider(); + + foreach(SyntaxMode mode in modeProvider.SyntaxModes) { SchemeNode node = LoadFile(modeProvider.GetSyntaxModeFile(mode), false); if (node == null) continue; builtinList.Items.Add(new HighlightItem(mode, null, node)); diff --git a/src/Libraries/ICSharpCode.TextEditor/Test/ICSharpCode.TextEditor.Test.csproj b/src/Libraries/ICSharpCode.TextEditor/Test/ICSharpCode.TextEditor.Test.csproj index 327ba55119..4a1f872339 100644 --- a/src/Libraries/ICSharpCode.TextEditor/Test/ICSharpCode.TextEditor.Test.csproj +++ b/src/Libraries/ICSharpCode.TextEditor/Test/ICSharpCode.TextEditor.Test.csproj @@ -31,7 +31,7 @@ True - +