From 8cc96835e6dafdb80063ba270a8b5ee759c063be Mon Sep 17 00:00:00 2001 From: "Gerrit \"Geaz\" Gazic" Date: Sat, 19 Sep 2015 13:11:14 +0200 Subject: [PATCH 1/5] Sorted language list --- src/Core/SharpDox.Core/Config/LanguageList.cs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/Core/SharpDox.Core/Config/LanguageList.cs b/src/Core/SharpDox.Core/Config/LanguageList.cs index e03d91b1..fa44ed0f 100644 --- a/src/Core/SharpDox.Core/Config/LanguageList.cs +++ b/src/Core/SharpDox.Core/Config/LanguageList.cs @@ -1,5 +1,6 @@ using System.Globalization; using SharpDox.Sdk.Config.Lists; +using System; namespace SharpDox.Core.Config { @@ -11,6 +12,11 @@ public LanguageList() { Add(language.TwoLetterISOLanguageName, language.DisplayName); } + + Sort(delegate (Tuple one, Tuple two) + { + return one.Item2.CompareTo(two.Item2); + }); } } } From 6377f385621bd9a7440b1a23e8a30c7f57f7ab93 Mon Sep 17 00:00:00 2001 From: "Gerrit \"Geaz\" Gazic" Date: Sat, 19 Sep 2015 14:32:20 +0200 Subject: [PATCH 2/5] Two GUI fixes --- src/Shells/SharpDox.GUI/Controls/ColorSelector.xaml.cs | 10 ++++++++-- src/Shells/SharpDox.GUI/Resources/Styles/Combobox.xaml | 2 +- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/src/Shells/SharpDox.GUI/Controls/ColorSelector.xaml.cs b/src/Shells/SharpDox.GUI/Controls/ColorSelector.xaml.cs index 0f40483c..3b9b9d7d 100644 --- a/src/Shells/SharpDox.GUI/Controls/ColorSelector.xaml.cs +++ b/src/Shells/SharpDox.GUI/Controls/ColorSelector.xaml.cs @@ -26,7 +26,8 @@ public partial class ColorSelector : UserControl DependencyProperty.Register("CustomHeaderText", typeof(string), typeof(ColorSelector), new PropertyMetadata("Custom Color")); private bool _userSelectsColor = false; - + private string _previousColor = string.Empty; + public ColorSelector() { InitializeComponent(); @@ -104,12 +105,17 @@ private string GetHexValue(Color color) } private void SelectedColor_Changed(object sender, EventArgs eventArgs) - { + { if (SelectedColor != null && CheckValidFormatHtmlColor(SelectedColor)) { + _previousColor = SelectedColor; var colorPreview = (Rectangle)colorSelector.Template.FindName("colorPreview", colorSelector); if (colorPreview != null) colorPreview.Fill = new SolidColorBrush((Color)ColorConverter.ConvertFromString(SelectedColor)); } + else + { + SelectedColor = _previousColor; + } } private void ColorSelector_KeyUp(object sender, KeyEventArgs e) diff --git a/src/Shells/SharpDox.GUI/Resources/Styles/Combobox.xaml b/src/Shells/SharpDox.GUI/Resources/Styles/Combobox.xaml index 1fc5a608..b4ab3e68 100644 --- a/src/Shells/SharpDox.GUI/Resources/Styles/Combobox.xaml +++ b/src/Shells/SharpDox.GUI/Resources/Styles/Combobox.xaml @@ -87,7 +87,7 @@ Name="Border" Background="White" SnapsToDevicePixels="True" - Padding="5" Margin="0,0,0,0"> + Padding="0" Margin="5"> From 68637e2a1dcf786ca83996e114f047ab3ebbbffe Mon Sep 17 00:00:00 2001 From: "Gerrit \"Geaz\" Gazic" Date: Sat, 19 Sep 2015 15:15:39 +0200 Subject: [PATCH 3/5] Fixed GUI bug --- .../Controls/ConfigGrid/Elements/ConfigComboboxControl.xaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Shells/SharpDox.GUI/Controls/ConfigGrid/Elements/ConfigComboboxControl.xaml b/src/Shells/SharpDox.GUI/Controls/ConfigGrid/Elements/ConfigComboboxControl.xaml index 55d11327..b9f0725e 100644 --- a/src/Shells/SharpDox.GUI/Controls/ConfigGrid/Elements/ConfigComboboxControl.xaml +++ b/src/Shells/SharpDox.GUI/Controls/ConfigGrid/Elements/ConfigComboboxControl.xaml @@ -31,7 +31,7 @@ + Visibility="{Binding ElementName=cbItem, Path=Text.IsEmpty, Converter={StaticResource BooleanToVisibilityConverter}}" /> From 686c71d512e94a3c33b87e23efa7fe0c480c4d15 Mon Sep 17 00:00:00 2001 From: Dave Glick Date: Mon, 21 Sep 2015 17:01:03 -0400 Subject: [PATCH 4/5] Fix link to example docs in readme --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 9cfdc028..48afd80a 100644 --- a/README.md +++ b/README.md @@ -6,8 +6,8 @@ The tool creates a model of a given c# solution and passes it to the registered The plugins transform the model to a defined output. **sharpDox** comes with a chm & html export plugin which demonstrate the possibilities of the tool. -[This](http://doc.sharpdox.de/en) is an example for a html documentation. +[This](http://sharpdox.de/en/doc/) is an example for a html documentation. If you want to try the latests development version go to my site at [AppVeyor](https://ci.appveyor.com/project/Geaz/sharpdox/history). -[![Build status](https://ci.appveyor.com/api/projects/status/vwrl041pp9tm5xp6)](https://ci.appveyor.com/project/Geaz/sharpdox) \ No newline at end of file +[![Build status](https://ci.appveyor.com/api/projects/status/vwrl041pp9tm5xp6)](https://ci.appveyor.com/project/Geaz/sharpdox) From c468a2a3df62a51f99402b5df970a92babc2795d Mon Sep 17 00:00:00 2001 From: "Gerrit \"Geaz\" Gazic" Date: Fri, 25 Sep 2015 16:57:46 +0200 Subject: [PATCH 5/5] MethodCall Parser --- CHANGELOG.txt | 5 +++++ .../SharpDox.Build.NRefactory/Loader/CSharpSolution.cs | 2 +- .../SharpDox.Build.NRefactory/Parser/MethodCallParser.cs | 7 +++++-- 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 41c6bbaa..b17c7e50 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -1,3 +1,8 @@ +Version 1.0rc2 + +- GUI bugfixes +- Method call parser bugfix + Version 1.0rc - Created two seperate executes (gui and console) diff --git a/src/Libraries/SharpDox.Build.NRefactory/Loader/CSharpSolution.cs b/src/Libraries/SharpDox.Build.NRefactory/Loader/CSharpSolution.cs index befe46eb..66bd969c 100644 --- a/src/Libraries/SharpDox.Build.NRefactory/Loader/CSharpSolution.cs +++ b/src/Libraries/SharpDox.Build.NRefactory/Loader/CSharpSolution.cs @@ -53,7 +53,7 @@ public IEnumerable AllFiles public CSharpFile GetFile(string fileName) { - return AllFiles.First(f => f.FileName == fileName); + return AllFiles.FirstOrDefault(f => f.FileName == fileName); } private static bool FileIsSolution(string pathToSolutionFile) diff --git a/src/Libraries/SharpDox.Build.NRefactory/Parser/MethodCallParser.cs b/src/Libraries/SharpDox.Build.NRefactory/Parser/MethodCallParser.cs index 1a75ba9b..d72a0cd3 100644 --- a/src/Libraries/SharpDox.Build.NRefactory/Parser/MethodCallParser.cs +++ b/src/Libraries/SharpDox.Build.NRefactory/Parser/MethodCallParser.cs @@ -24,11 +24,14 @@ internal void ParseMethodCalls() { HandleOnItemParseStart(sdMethod.Name); var file = _solution.GetFile(sdType.Region.Filename); - var methodAstNode = file.SyntaxTree.GetNodeContaining( + if(file != null) // TODO Check why file can be null sometimes! + { + var methodAstNode = file.SyntaxTree.GetNodeContaining( new TextLocation(sdMethod.Region.BeginLine, sdMethod.Region.BeginColumn), new TextLocation(sdMethod.Region.EndLine, sdMethod.Region.EndColumn)); - methodAstNode.AcceptVisitor(new MethodVisitor(_repository, sdMethod, sdType, file)); + methodAstNode.AcceptVisitor(new MethodVisitor(_repository, sdMethod, sdType, file)); + } } } }