From 54eacfa3b2f1144ad3f7ff958640d88b7846e934 Mon Sep 17 00:00:00 2001 From: Siegfried Pammer Date: Sat, 20 Jul 2013 12:58:07 +0200 Subject: [PATCH 01/17] update "open assembly" icons in Class Browser to the new icons suggested by Michael --- .../Icons.16x16.AssemblyFromFile.png | Bin 653 -> 777 bytes .../Icons.16x16.AssemblyFromGAC.png | Bin 625 -> 729 bytes .../Project/ICSharpCode.SharpDevelop.addin | 2 +- .../Resources/BitmapResources.resources | Bin 717672 -> 717900 bytes 4 files changed, 1 insertion(+), 1 deletion(-) diff --git a/data/resources/image/BitmapResources/ClassBrowserIcons/Icons.16x16.AssemblyFromFile.png b/data/resources/image/BitmapResources/ClassBrowserIcons/Icons.16x16.AssemblyFromFile.png index 738b354a4d0680c91a68f12c7ea3141a1b16411c..1c4e382bef47f1d5e71bf3fdecbedf8d8b626b81 100644 GIT binary patch delta 666 zcmV;L0%iS;1&Icbdw&9WNklF7aq>Tc;>Ae=NPV`Jpd27~t zSe>b0xz_{bp?^p#sl}1ZMuEHuA!fik<*`L_p+(q1cLu3fXREL>RnBs+&H7;c8r6%0 z%Brz7Ry(^Px>kG#Pp^|^W!ebGrxKQX-J{uqa#^4sdsq22|@JB`T7crlzV7h128o~wEyQ8h1}dVlExZ>PQ!ExCcP58V`59xKAU z-Hzs~RLoU9*?8Hw5Lh(=-Zpt19w`FwV^A&Pc(20;s})T$Dr1YCL`hxDL)?^9xUkza z4&Dx#5%=YOSRBX~u@4vGV806uX=G#vv@qqLp%Ku;XE@KE&c@+O>DZ@`F|X|;67P87 zLDvZ^ynoJHXJd{L^u&gmRH|kNG%^Dmaf#q*&r4wXny~JoX^ZFxcIF}tN%XKRnZnos zmCS%izYt7#`?HkMn_Y5q7qp0C>S! zBs|yuNyt%(@J*x<{{)&2NT9jxQZjI#{t}|!FcbY3hgpW#&Hw-a07*qoM6N<$g18Vq AZvX%Q delta 541 zcmV+&0^)gO=rl8HA`L?bDbpcnEYiHae; zTuD&|t`k@20;kF>S-y$*ZMwTiivhC8F%BXQc) z^HzsF=UQc@o&g60YM%Ov+5|ta1V?q`K)r87d$Lk7AeuOIcy`I*B&OGPo{raElx*H# zH+RBbIqy8XWq+aBwK3znfkd9ZYv_~%1LCWh${I?c%)q51P$S_oqF?<)ndm=+_j@oV z2clx&yJauUpu|9v6>2zGO1X4|{-%OD>^)bIlmj6#@VUH-CQ)p_aS&?o)&}~Myi317 z-PB><*^VzyU08!2F)&?Xp%JVzaHa<8?LaXtd;(xkie#%Fwp*C{2AQfwZ16^Vu zUb>CO)|MM+sD|3@T~FC@56!)EOZbk*oV1wB(W6HA-~#*?#7H5I?t&V)T0}pFJLs$0 zBH??u|1`~{({%qFy5)aZO+|I^H=e@m&o}LqetlWO_p6YNcE4PtkR5$mb#-}daC=T- fun=Aw_7*Jz7e}H)!vGy300000NkvXXu0mjf+Fl8c diff --git a/data/resources/image/BitmapResources/ClassBrowserIcons/Icons.16x16.AssemblyFromGAC.png b/data/resources/image/BitmapResources/ClassBrowserIcons/Icons.16x16.AssemblyFromGAC.png index 52e916f98d371d3f70cbf88cf7a4835e999521f2..d39ab189ee282842107ca7bd74a0c0e00eb2c81c 100644 GIT binary patch delta 617 zcmV-v0+#*p1la|Udw&8*Nkl&Y(oGt+HQBt(&r~R7PD$EfQplnqj#)3(s)QqgZZXx;bs>7`4G}>aM5n zS#C)f>2vsS&f$HZFXx5BHXH4uq=TGVecgPx2XRSu@czQahJUErryYB5eUR4bSq9`g zt^FQSTU%R6&a9`r<;{{k0SFPG?)@Llv%s#4qY|sBsZk1oV9sWh5|`b!BLk{Oki40CozlFJ;1WBQqEbd+c_5Z#tdE+}s?(;TcHM1OkCkjEoG! z>-7>J86hI}oqu#G*xES?(^EeN2VcSC@sI&BNPOfig27q1T)wE>Wm>J)w6d~-ik@*Co%mUx z>Keo1VjQtpj4Y5vk|0U)6`~k{++`fcHD@vz?63|%{eR?R!S-t}Fg(2W2!8S|cMPvL zh{?$)3mgt-T%}T7W=@6T)A!R2$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J&a8H9W+hDK#GHO^&dvKo6MW!IKlAW8KzB6%+r@f*ptWtc5-bnfW{_sW)WYAOR!9w zT#QyE#452AJAPkFg%}4*C8{+{?J%LG>OnqWq#m{Cf%<^WhxDX556`u|LYk2b_^Fx#GN9lHKxf)fJbgD~weAG|*o}NFY ztx-M9N><#tf43d~=Myvkh39(LZxg%=A{Q6dzpiUovv!BuIoj;sfI;UTdzU`xSg~|y z!uOR1TT_ltj(GUgX5t{Yk{ukmVuAnf$XV1-;F9+GU)7_%Uh9vxR&2|1I{qS~{9Mp- zyCXwcyuCtc~3DtpU> zePDJ-L+f`1_gB#Ltu3ogDzY{50^>upZvmq2?rxP0oSUB-}lQ^%KNe|nGS~&>@$F6uL$@?Jh!-*Sr8NN1qCb^`Lc!h*+obh)> z-|dl378MT+J4BD~b`BNzFYfv#W5_&BCPeSDsO&sv-4N*KoU;Ge2LVqH&1yGodlc5t zRG+TPITmRuHcZi0_+VcnGEC#^mvCf~$wTwM^j zXBkA>Ndm7lpI@B%)0SPA7uKbmX{@y{dv)qi?-`5f&%9jurskV6Mmt<~v&{am(r(GV zV}FhLb;q;lqrd*1DC(h&{J%54{X?$d%wtV0Hx^R<6E}S;b*qYQpFVV>h|0C!^T(yx zd6$Sq?w%yc;+lDX+we`koR{=+<@keze`~*;ne@?LhFyvOq~G7X!Sv!7_h+LVW{%6W z(_L~NvVW!P`QA$oGt;ga2dA2~-F;>z9E%r9SX)Q5);gAX4cLwp4I80|UgBW&LHKLLp2ZU6uP From 7dbf90413e956a8b0b7690963bfc8de3212a2c10 Mon Sep 17 00:00:00 2001 From: Siegfried Pammer Date: Sat, 20 Jul 2013 19:02:22 +0200 Subject: [PATCH 02/17] updated DebugAssembly and DebugModule icons --- .../image/BitmapResources/BitmapList.txt | 1 + .../image/BitmapResources/BitmapResources.res | 1 + .../ClassBrowserIcons/Icons.16x16.Module.png | Bin 727 -> 749 bytes .../Icons.16x16.Debug.Assembly.png | Bin 0 -> 525 bytes .../Pads/ClassBrowserSupport.cs | 2 +- .../Resources/BitmapResources.resources | Bin 717900 -> 718677 bytes 6 files changed, 3 insertions(+), 1 deletion(-) create mode 100644 data/resources/image/BitmapResources/DebuggerIcons/Icons.16x16.Debug.Assembly.png diff --git a/data/resources/image/BitmapResources/BitmapList.txt b/data/resources/image/BitmapResources/BitmapList.txt index 7c72c13632..bd908cea2a 100644 --- a/data/resources/image/BitmapResources/BitmapList.txt +++ b/data/resources/image/BitmapResources/BitmapList.txt @@ -239,6 +239,7 @@ CodeCoverageIcons\CodeCoverage.Icons.16x16.Pad.png CodeCoverageIcons\CodeCoverage.Icons.16x16.Run.png DebuggerIcons\Icons.16x16.Debug.Start.png DebuggerIcons\Icons.16x16.Debug.StartWithoutDebugging.png +DebuggerIcons\Icons.16x16.Debug.Assembly.png NavigationIcons\Icons.16x16.NavigateBack.disabled.png NavigationIcons\Icons.16x16.NavigateBack.png NavigationIcons\Icons.16x16.NavigateForward.png diff --git a/data/resources/image/BitmapResources/BitmapResources.res b/data/resources/image/BitmapResources/BitmapResources.res index 51f99e517d..e3335e24ed 100644 --- a/data/resources/image/BitmapResources/BitmapResources.res +++ b/data/resources/image/BitmapResources/BitmapResources.res @@ -86,6 +86,7 @@ Icons.16x16.Debug.Continue = DebuggerIcons\Icons.16x16.Debug.Continue.png Icons.16x16.Debug.StepOver = DebuggerIcons\Icons.16x16.Debug.StepOver.png Icons.16x16.Debug.StepInto = DebuggerIcons\Icons.16x16.Debug.StepInto.png Icons.16x16.Debug.StepOut = DebuggerIcons\Icons.16x16.Debug.StepOut.png +Icons.16x16.Debug.Assembly = DebuggerIcons\Icons.16x16.Debug.Assembly.png # TestRunner Icons.16x16.TestRunner.Yellow = BitmapResources-data\Icons.16x16.TestRunner.Yellow.png diff --git a/data/resources/image/BitmapResources/ClassBrowserIcons/Icons.16x16.Module.png b/data/resources/image/BitmapResources/ClassBrowserIcons/Icons.16x16.Module.png index ce892a1562161fe5db15ee963b3f307bef2feaba..086da4b4551ce99c21808acc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To7={L5FTCwLksQs6oB zwt-cgX)LO$;`_H^wQHF#8TH*Sn>i?QF$S1pt%{f|aew3ca6K26Wx?uNNGeH~M%$rB zYZ2xG4Tu=@$l{&ZyYux%-T1nL>)_`T<`0aGOc)JwCI+Ypf{=9`$0+V> zm*upg>wlA(Nz}Y%WBZ`$H62G9RFdhN!{bBOFJ9rDVe7Y12?xn1%O4Ac4|}E37TrJd zT24pN6*RYM6?%D<#!U5E?rP`rVI@cfAZeObIx0G^0ecwHArDeZ9g%}4!ux!fmRQ`>LYb;c!C!zlpOapx;Tr~@K4P_)sA0ZvGuANR!80{~@EG1^ozeD(kU002ovPDHLkV1m|FMdkni diff --git a/data/resources/image/BitmapResources/DebuggerIcons/Icons.16x16.Debug.Assembly.png b/data/resources/image/BitmapResources/DebuggerIcons/Icons.16x16.Debug.Assembly.png new file mode 100644 index 0000000000000000000000000000000000000000..860aaf96ceedc0b013f91a5cb4ff8a8944aafd2e GIT binary patch literal 525 zcmV+o0`mQdP)N2bPDNB8 zb~7$DE-^4L^m3s900D_fL_t(IPh+4i*v~!_h-08UGQb{|Gf+&XAv+k(=>2f`52AsX z3_~_EoKbvj{9osr-G309VH2r_tYtVO{Z#iq_f^^d>K`rtgZMy9f*~sy&WJzM{LgYu z>_5XXzW*S@7?ubz1h6TmD)l zv{b2|*i{=#H)`KnwY0^LmRgek_q`6))uNb217|R%l@gkxC zJE9GNM45evoDuB%5k%>IiT-ae(R5rt^&=WK5;?{a?Fb`!o=MbkD3NzhqAt-yFUyE# z8;O#NiN3HQx)w}ycnq28P&c9r2>OW?(cC1W5>KKQICbbmbljWh+hij9459}B@b(ZQ z{|Q9qbfQU>0D;5~2)s^)wWEnD+===ESdf88ZcUVj`>FtrzTI0SN6vZ@3ngp#NVC1M<;Cf8`VH9Z9qvi~a(&)+rDss_zXd0}=2ss62rx45;GAK%zth zOGL#w1pg7N+_y!d0YrL$4FJv7VDvb2b02e(a&#sL&ex7x!|-6LLG}Bx53aXP<;$-`3Y-2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19QN?N zCTBkAY!;gj@Tn#bG3f|af~BLM%HYUigPJ|1!Zv&IQ)V-pouq+Z!nrcr)~wgA!*9}V zio*)42)V|Wo1I1U4bGqA%og;r*|+R*uvW}*lKY(a={Icni*pZo`J7# ztBdqus1Bz?Ru6R3@NL&V()CCks>!y}M>Qc<#|3lD%I-662B|qoM}wcpzvV{+i6x^Y&mm*NwEE_W zy4|MCnzI2ze@l1Bh)M4fulM$G3@8a*7L@c}=c^~(=>>haeQT}1` zgdVHswY8-=pWpKR*5$L3>`n7t$ol)@>dAl9>gT=r%FNMYz3nyY=IO6hcb@*;Fm>*s z-w(G|gzaqYZJG1I&lfx%Z0Yj#q5s9?ZSR(opIB{e+&|YbuAoh|{{4b;$tNP;zp`h@ z)w8qDI_{ldZeIN``^&xQ1qqsU@7?>hP!Rt-rkTDJ?qU zW^}At_F_i&yXQvwHD26sW$R>Pe%!4quHsQ0?rMX?y9o&99t)b=UNwkVQRj zWoIot9pth&_iWvfwcfg-J)SeJRR-SdXwLd))0%EsZq=Q(jr!x*FMjr&%cDlGsK2;v z#8~gZMOpj4T4mkWVPU|Hy~91rQzn_l=Z4%;eNhuN_ekF%=Rci)(z#I6Sdh4I$%Xou zGsBOKSa;%>)N$L(7t|N+L%KYuZ(jes__)wDpghlW-+L=tvLff|!o$w@KDT+m<{M)E z_gkwDuiNYA_*-q<^a1lD#;zzV2)I@M)n;eEC2M}}K!0=$2%R)DEBK#6-gx7!g$w>8 UVQ4VyFtixyI0Y?BUq5uE@ From c9dae5383230d865a9c59028505aa78fc9b4ae77 Mon Sep 17 00:00:00 2001 From: Andreas Weizel Date: Wed, 17 Jul 2013 22:31:59 +0200 Subject: [PATCH 03/17] Fixed PackageRepositoriesView.xaml being wrongly dependent on PagedResultsView.xaml in AddInManager2 project. --- src/AddIns/Misc/AddInManager2/Project/AddInManager2.csproj | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/AddIns/Misc/AddInManager2/Project/AddInManager2.csproj b/src/AddIns/Misc/AddInManager2/Project/AddInManager2.csproj index 126a60a00e..c9a4c03a72 100644 --- a/src/AddIns/Misc/AddInManager2/Project/AddInManager2.csproj +++ b/src/AddIns/Misc/AddInManager2/Project/AddInManager2.csproj @@ -191,9 +191,7 @@ - - PagedResultsView.xaml - + \ No newline at end of file From 8b55c77771990cf08d6a9046416f15094916fb45 Mon Sep 17 00:00:00 2001 From: Andreas Weizel Date: Thu, 18 Jul 2013 00:41:25 +0200 Subject: [PATCH 04/17] Adding AddIns to ClassBrowser, persistence and restoring of ClassBrowser workspace in config. --- src/Main/Base/Project/Dom/IAssemblyModel.cs | 11 ++ .../Base/Project/Dom/IEntityModelContext.cs | 18 +++ src/Main/SharpDevelop/Dom/AssemblyModel.cs | 6 + .../Dom/ClassBrowser/ClassBrowserPad.cs | 148 +++++++++++++++++- .../ClassBrowserTreeNodesFactory.cs | 4 + .../Dom/ClassBrowser/OpenAssemblyCommand.cs | 16 +- 6 files changed, 201 insertions(+), 2 deletions(-) diff --git a/src/Main/Base/Project/Dom/IAssemblyModel.cs b/src/Main/Base/Project/Dom/IAssemblyModel.cs index 11a081dd01..f3df5c2589 100644 --- a/src/Main/Base/Project/Dom/IAssemblyModel.cs +++ b/src/Main/Base/Project/Dom/IAssemblyModel.cs @@ -42,6 +42,11 @@ namespace ICSharpCode.SharpDevelop.Dom /// This always is the namespace without a name - it's unrelated to the 'root namespace' project setting. /// INamespaceModel RootNamespace { get; } + + /// + /// Gets the of this assembly model. + /// + IEntityModelContext Context { get; } } /// @@ -92,6 +97,12 @@ namespace ICSharpCode.SharpDevelop.Dom public INamespaceModel RootNamespace { get { return EmptyNamespaceModel.Instance; } } + + public IEntityModelContext Context { + get { + return null; + } + } } } diff --git a/src/Main/Base/Project/Dom/IEntityModelContext.cs b/src/Main/Base/Project/Dom/IEntityModelContext.cs index 5fe67f32e4..69295ef7b3 100644 --- a/src/Main/Base/Project/Dom/IEntityModelContext.cs +++ b/src/Main/Base/Project/Dom/IEntityModelContext.cs @@ -34,6 +34,16 @@ namespace ICSharpCode.SharpDevelop.Dom /// Returns true if part1 is considered a better candidate for the primary part than part2. /// bool IsBetterPart(IUnresolvedTypeDefinition part1, IUnresolvedTypeDefinition part2); + + /// + /// Short name of current assembly. + /// + string AssemblyName { get; } + + /// + /// Full path and file name of the assembly. Output assembly for projects. + /// + string Location { get; } } public class ProjectEntityModelContext : IEntityModelContext @@ -53,6 +63,10 @@ namespace ICSharpCode.SharpDevelop.Dom get { return project.AssemblyName; } } + public string Location { + get { return project.OutputAssemblyFullPath; } + } + public IProject Project { get { return project; } } @@ -88,6 +102,10 @@ namespace ICSharpCode.SharpDevelop.Dom get { return mainAssembly.AssemblyName; } } + public string Location { + get { return mainAssembly.Location; } + } + public ICompilation GetCompilation() { return compilation; diff --git a/src/Main/SharpDevelop/Dom/AssemblyModel.cs b/src/Main/SharpDevelop/Dom/AssemblyModel.cs index 1cecb2ee50..b10684186e 100644 --- a/src/Main/SharpDevelop/Dom/AssemblyModel.cs +++ b/src/Main/SharpDevelop/Dom/AssemblyModel.cs @@ -50,6 +50,12 @@ namespace ICSharpCode.SharpDevelop.Dom } } + public IEntityModelContext Context { + get { + return context; + } + } + public void Update(IUnresolvedFile oldFile, IUnresolvedFile newFile) { IList old = EmptyList.Instance; diff --git a/src/Main/SharpDevelop/Dom/ClassBrowser/ClassBrowserPad.cs b/src/Main/SharpDevelop/Dom/ClassBrowser/ClassBrowserPad.cs index 871bc7a139..168e9f1a59 100644 --- a/src/Main/SharpDevelop/Dom/ClassBrowser/ClassBrowserPad.cs +++ b/src/Main/SharpDevelop/Dom/ClassBrowser/ClassBrowserPad.cs @@ -7,12 +7,26 @@ using System.Collections.Generic; using System.Diagnostics; using System.Windows.Controls; using ICSharpCode.Core.Presentation; +using ICSharpCode.NRefactory; +using ICSharpCode.NRefactory.TypeSystem; using ICSharpCode.TreeView; using ICSharpCode.SharpDevelop.Project; using ICSharpCode.SharpDevelop.Workbench; namespace ICSharpCode.SharpDevelop.Dom.ClassBrowser { + public class PersistedWorkspace + { + public PersistedWorkspace() + { + AssemblyFiles = new List(); + } + + public string Name { get; set; } + public List AssemblyFiles { get; set; } + public bool IsActive { get; set; } + } + class ClassBrowserPad : AbstractPadContent, IClassBrowser { #region IClassBrowser implementation @@ -25,13 +39,19 @@ namespace ICSharpCode.SharpDevelop.Dom.ClassBrowser get { return treeView.AssemblyList; } set { treeView.AssemblyList = value; } } - + #endregion + + const string PersistedWorkspaceSetting = "ClassBrowser.Workspaces"; + const string DefaultWorkspaceName = ""; IProjectService projectService; ClassBrowserTreeView treeView; DockPanel panel; ToolBar toolBar; + + List persistedWorkspaces; + PersistedWorkspace activeWorkspace; public ClassBrowserPad() : this(SD.GetRequiredService()) @@ -53,6 +73,9 @@ namespace ICSharpCode.SharpDevelop.Dom.ClassBrowser //treeView.ContextMenu = CreateContextMenu("/SharpDevelop/Pads/UnitTestsPad/ContextMenu"); projectService.CurrentSolutionChanged += ProjectServiceCurrentSolutionChanged; ProjectServiceCurrentSolutionChanged(null, null); + + // Load workspaces from configuration + LoadWorkspaces(); } public override void Dispose() @@ -77,6 +100,26 @@ namespace ICSharpCode.SharpDevelop.Dom.ClassBrowser treeView.SpecialNodes.Add(new SolutionTreeNode(projectService.CurrentSolution)); } + void AssemblyListCollectionChanged(IReadOnlyCollection removedItems, IReadOnlyCollection addedItems) + { + foreach (var assembly in addedItems) { + // Add this assembly to current workspace + if (activeWorkspace != null) { + activeWorkspace.AssemblyFiles.Add(assembly.Context.Location); + } + } + + foreach (var assembly in removedItems) { + // Add this assembly to current workspace + if (activeWorkspace != null) { + activeWorkspace.AssemblyFiles.Remove(assembly.Context.Location); + } + } + + // Update workspace list in configuration + SaveWorkspaces(); + } + /// /// Virtual method so we can override this method and return /// a dummy ToolBar when testing. @@ -96,5 +139,108 @@ namespace ICSharpCode.SharpDevelop.Dom.ClassBrowser Debug.Assert(treeView != null); return MenuService.CreateContextMenu(treeView, name); } + + /// + /// Loads persisted workspaces from configuration. + /// + void LoadWorkspaces() + { + persistedWorkspaces = SD.PropertyService.GetList(PersistedWorkspaceSetting).ToList(); + if (!persistedWorkspaces.Any()) + { + // Add at least default workspace + persistedWorkspaces = new List(); + persistedWorkspaces.Add(new PersistedWorkspace() + { + Name = DefaultWorkspaceName + }); + } + + // Load all assemblies (for now always from default workspace) + PersistedWorkspace defaultWorkspace = persistedWorkspaces.FirstOrDefault(w => w.Name == DefaultWorkspaceName); + ActivateWorkspace(defaultWorkspace); + } + + /// + /// Stores currently saved workspaces in configuration. + /// + void SaveWorkspaces() + { + SD.PropertyService.SetList(PersistedWorkspaceSetting, persistedWorkspaces); + } + + public static IAssemblyModel CreateAssemblyModelFromFile(string fileName) + { + // TODO References? + + var loader = new CecilLoader(); + loader.IncludeInternalMembers = true; + loader.LazyLoad = true; + var assembly = loader.LoadAssemblyFile(fileName); + + IEntityModelContext context = new AssemblyEntityModelContext(assembly); + IAssemblyModel model = SD.GetRequiredService().CreateAssemblyModel(context); + + if (model is IUpdateableAssemblyModel) { + ((IUpdateableAssemblyModel)model).Update(EmptyList.Instance, assembly.TopLevelTypeDefinitions.ToList()); + ((IUpdateableAssemblyModel) model).AssemblyName = assembly.AssemblyName; + } + return model; + } + + void AppendAssemblyFileToList(string assemblyFile) + { + IAssemblyModel assemblyModel = CreateAssemblyModelFromFile(assemblyFile); + if (assemblyModel != null) { + AssemblyList.Assemblies.Add(assemblyModel); + } else { + // TODO Throw exception? + + } + } + + /// + /// Activates the specified workspace. + /// + void ActivateWorkspace(PersistedWorkspace workspace) + { + // Update the activation flags in workspace list + foreach (var workspaceElement in persistedWorkspaces) { + workspaceElement.IsActive = (workspaceElement == workspace); + } + + UpdateActiveWorkspace(); + } + + /// + /// Updates active workspace and AssemblyList according to flags. + /// + void UpdateActiveWorkspace() + { + if ((AssemblyList != null) && (activeWorkspace != null)) { + // Temporarily detach from event handler + AssemblyList.Assemblies.CollectionChanged -= AssemblyListCollectionChanged; + } + + activeWorkspace = persistedWorkspaces.FirstOrDefault(w => w.IsActive); + if (activeWorkspace == null) { + // If no workspace is active, activate default + var defaultWorkspace = persistedWorkspaces.FirstOrDefault(w => w.Name == DefaultWorkspaceName); + activeWorkspace = defaultWorkspace; + defaultWorkspace.IsActive = true; + } + + AssemblyList.Assemblies.Clear(); + if (activeWorkspace != null) { + foreach (string assemblyFile in activeWorkspace.AssemblyFiles) { + AppendAssemblyFileToList(assemblyFile); + } + } + + // Attach to event handler, again. + if (AssemblyList != null) { + AssemblyList.Assemblies.CollectionChanged += AssemblyListCollectionChanged; + } + } } } diff --git a/src/Main/SharpDevelop/Dom/ClassBrowser/ClassBrowserTreeNodesFactory.cs b/src/Main/SharpDevelop/Dom/ClassBrowser/ClassBrowserTreeNodesFactory.cs index c85f22786a..23fe3fcb2f 100644 --- a/src/Main/SharpDevelop/Dom/ClassBrowser/ClassBrowserTreeNodesFactory.cs +++ b/src/Main/SharpDevelop/Dom/ClassBrowser/ClassBrowserTreeNodesFactory.cs @@ -21,6 +21,8 @@ namespace ICSharpCode.SharpDevelop.Dom.ClassBrowser return typeof(ITypeDefinitionModel); if (model is IMemberModel) return typeof(IMemberModel); + if (model is IAssemblyModel) + return typeof(IAssemblyModel); return null; } @@ -36,6 +38,8 @@ namespace ICSharpCode.SharpDevelop.Dom.ClassBrowser return new TypeDefinitionTreeNode((ITypeDefinitionModel)model); if (model is IMemberModel) return new MemberTreeNode((IMemberModel)model); + if (model is IAssemblyModel) + return new AssemblyTreeNode((IAssemblyModel) model); return null; } } diff --git a/src/Main/SharpDevelop/Dom/ClassBrowser/OpenAssemblyCommand.cs b/src/Main/SharpDevelop/Dom/ClassBrowser/OpenAssemblyCommand.cs index 59851280c6..ae67f21e5e 100644 --- a/src/Main/SharpDevelop/Dom/ClassBrowser/OpenAssemblyCommand.cs +++ b/src/Main/SharpDevelop/Dom/ClassBrowser/OpenAssemblyCommand.cs @@ -2,6 +2,10 @@ // This code is distributed under the GNU LGPL (for details please see \doc\license.txt) using System; +using System.Linq; +using ICSharpCode.NRefactory; +using ICSharpCode.NRefactory.TypeSystem; +using Microsoft.Win32; namespace ICSharpCode.SharpDevelop.Dom.ClassBrowser { @@ -12,7 +16,17 @@ namespace ICSharpCode.SharpDevelop.Dom.ClassBrowser { public override void Execute(object parameter) { - throw new NotImplementedException(); + var classBrowser = SD.GetService(); + if (classBrowser != null) { + OpenFileDialog openFileDialog = new OpenFileDialog(); + openFileDialog.Filter = "Assembly files (*.exe, *.dll)|*.exe;*.dll"; + openFileDialog.CheckFileExists = true; + openFileDialog.CheckPathExists = true; + if (openFileDialog.ShowDialog() ?? false) + { + classBrowser.AssemblyList.Assemblies.Add(ClassBrowserPad.CreateAssemblyModelFromFile(openFileDialog.FileName)); + } + } } } From 0a9c01d948c69f32df6a3ac1976d941c7f2e2d75 Mon Sep 17 00:00:00 2001 From: Andreas Weizel Date: Sun, 21 Jul 2013 11:17:18 +0200 Subject: [PATCH 05/17] Context menu for removing assemblies from ClassBrowser workspace. --- .../Dom/ClassBrowser/AssemblyTreeNode.cs | 9 ++++ .../Project/ICSharpCode.SharpDevelop.addin | 19 +++++--- .../Dom/ClassBrowser/ClassBrowserPad.cs | 2 - .../{OpenAssemblyCommand.cs => Commands.cs} | 43 +++++++++++++++++-- src/Main/SharpDevelop/SharpDevelop.csproj | 2 +- 5 files changed, 63 insertions(+), 12 deletions(-) rename src/Main/SharpDevelop/Dom/ClassBrowser/{OpenAssemblyCommand.cs => Commands.cs} (52%) diff --git a/src/Main/Base/Project/Dom/ClassBrowser/AssemblyTreeNode.cs b/src/Main/Base/Project/Dom/ClassBrowser/AssemblyTreeNode.cs index ea114cacd0..b6f382bba4 100644 --- a/src/Main/Base/Project/Dom/ClassBrowser/AssemblyTreeNode.cs +++ b/src/Main/Base/Project/Dom/ClassBrowser/AssemblyTreeNode.cs @@ -3,6 +3,7 @@ using System; using System.Collections.Generic; +using ICSharpCode.Core.Presentation; using ICSharpCode.TreeView; namespace ICSharpCode.SharpDevelop.Dom.ClassBrowser @@ -46,6 +47,14 @@ namespace ICSharpCode.SharpDevelop.Dom.ClassBrowser return SD.ResourceService.GetImageSource("Icons.16x16.Assembly"); } } + + public override void ShowContextMenu() + { + var assemblyModel = this.Model as IAssemblyModel; + if (assemblyModel != null) { + var ctx = MenuService.ShowContextMenu(null, assemblyModel, "/SharpDevelop/Pads/ClassBrowser/AssemblyContextMenu"); + } + } } } diff --git a/src/Main/Base/Project/ICSharpCode.SharpDevelop.addin b/src/Main/Base/Project/ICSharpCode.SharpDevelop.addin index 11f96b3077..ba134100d2 100755 --- a/src/Main/Base/Project/ICSharpCode.SharpDevelop.addin +++ b/src/Main/Base/Project/ICSharpCode.SharpDevelop.addin @@ -908,7 +908,7 @@ - - + --> + class = "ICSharpCode.SharpDevelop.Dom.ClassBrowser.OpenAssemblyFromFileCommand"/> + class = "ICSharpCode.SharpDevelop.Dom.ClassBrowser.OpenAssemblyFromGACCommand"/> - + class = "ICSharpCode.SharpDevelop.Dom.ClassBrowser.ClassBrowserCollapseAll"/>--> @@ -988,6 +988,13 @@ class = "ICSharpCode.SharpDevelop.Gui.ClassBrowser.ClassBrowserCancelSearch"/> + + + + diff --git a/src/Main/SharpDevelop/Dom/ClassBrowser/ClassBrowserPad.cs b/src/Main/SharpDevelop/Dom/ClassBrowser/ClassBrowserPad.cs index 168e9f1a59..da5865ec00 100644 --- a/src/Main/SharpDevelop/Dom/ClassBrowser/ClassBrowserPad.cs +++ b/src/Main/SharpDevelop/Dom/ClassBrowser/ClassBrowserPad.cs @@ -171,8 +171,6 @@ namespace ICSharpCode.SharpDevelop.Dom.ClassBrowser public static IAssemblyModel CreateAssemblyModelFromFile(string fileName) { - // TODO References? - var loader = new CecilLoader(); loader.IncludeInternalMembers = true; loader.LazyLoad = true; diff --git a/src/Main/SharpDevelop/Dom/ClassBrowser/OpenAssemblyCommand.cs b/src/Main/SharpDevelop/Dom/ClassBrowser/Commands.cs similarity index 52% rename from src/Main/SharpDevelop/Dom/ClassBrowser/OpenAssemblyCommand.cs rename to src/Main/SharpDevelop/Dom/ClassBrowser/Commands.cs index ae67f21e5e..17ce0e73f1 100644 --- a/src/Main/SharpDevelop/Dom/ClassBrowser/OpenAssemblyCommand.cs +++ b/src/Main/SharpDevelop/Dom/ClassBrowser/Commands.cs @@ -2,9 +2,8 @@ // This code is distributed under the GNU LGPL (for details please see \doc\license.txt) using System; +using System.IO; using System.Linq; -using ICSharpCode.NRefactory; -using ICSharpCode.NRefactory.TypeSystem; using Microsoft.Win32; namespace ICSharpCode.SharpDevelop.Dom.ClassBrowser @@ -24,7 +23,11 @@ namespace ICSharpCode.SharpDevelop.Dom.ClassBrowser openFileDialog.CheckPathExists = true; if (openFileDialog.ShowDialog() ?? false) { + try { classBrowser.AssemblyList.Assemblies.Add(ClassBrowserPad.CreateAssemblyModelFromFile(openFileDialog.FileName)); + } catch (BadImageFormatException ex) { + SD.MessageService.ShowWarningFormatted("{0} is not a valid .NET assembly.", Path.GetFileName(openFileDialog.FileName)); + } } } } @@ -37,7 +40,41 @@ namespace ICSharpCode.SharpDevelop.Dom.ClassBrowser { public override void Execute(object parameter) { - throw new NotImplementedException(); +// throw new NotImplementedException(); + } + } + + /// + /// Description of RemoveAssemblyCommand. + /// + class RemoveAssemblyCommand : SimpleCommand + { + public override bool CanExecute(object parameter) + { + return parameter is AssemblyModel; + } + + public override void Execute(object parameter) + { + var classBrowser = SD.GetService(); + if (classBrowser != null) { + IAssemblyModel assemblyModel = (IAssemblyModel) parameter; + classBrowser.AssemblyList.Assemblies.Remove(assemblyModel); + } + } + } + + /// + /// Description of RemoveAssemblyCommand. + /// + class ClassBrowserCollapseAllCommand : SimpleCommand + { + public override void Execute(object parameter) + { +// var classBrowser = SD.GetService() as ClassBrowserPad; +// if (classBrowser != null) { +// classBrowser.TreeView +// } } } } diff --git a/src/Main/SharpDevelop/SharpDevelop.csproj b/src/Main/SharpDevelop/SharpDevelop.csproj index d62dcd7030..20ff169f9d 100644 --- a/src/Main/SharpDevelop/SharpDevelop.csproj +++ b/src/Main/SharpDevelop/SharpDevelop.csproj @@ -108,7 +108,7 @@ - + From 26ee58a5d8a01d492885d076cae2b10a87f9a4f0 Mon Sep 17 00:00:00 2001 From: Siegfried Pammer Date: Sun, 21 Jul 2013 12:19:55 +0200 Subject: [PATCH 06/17] add Icons.16x16.AssemblyError and Icons.16x16.ModuleError --- .../image/BitmapResources/BitmapList.txt | 13 +++++++------ .../image/BitmapResources/BitmapResources.res | 2 ++ .../Icons.16x16.AssemblyError.png | Bin 0 -> 713 bytes .../Icons.16x16.ModuleError.png | Bin 0 -> 822 bytes .../Resources/BitmapResources.resources | Bin 718677 -> 720684 bytes 5 files changed, 9 insertions(+), 6 deletions(-) create mode 100644 data/resources/image/BitmapResources/ClassBrowserIcons/Icons.16x16.AssemblyError.png create mode 100644 data/resources/image/BitmapResources/ClassBrowserIcons/Icons.16x16.ModuleError.png diff --git a/data/resources/image/BitmapResources/BitmapList.txt b/data/resources/image/BitmapResources/BitmapList.txt index bd908cea2a..bf111d6f0d 100644 --- a/data/resources/image/BitmapResources/BitmapList.txt +++ b/data/resources/image/BitmapResources/BitmapList.txt @@ -140,7 +140,9 @@ SharpQueryIcons\Icons.16x16.SharpQuery.Column.png SharpQueryIcons\Icons.16x16.SharpQuery.NodeError.png SharpQueryIcons\Icons.16x16.SharpQuery.Remove.png SharpQueryIcons\Icons.16x16.SharpQuery.Table.png - +ClassBrowserIcons\Icons.16x16.Workspace.png +ClassBrowserIcons\Icons.16x16.Assembly.png +ClassBrowserIcons\Icons.16x16.AssemblyError.png ------------------------------------------------------------------------------- Copied from the Fugue Icon Library and modified or mashed up with other Fugue @@ -240,6 +242,10 @@ CodeCoverageIcons\CodeCoverage.Icons.16x16.Run.png DebuggerIcons\Icons.16x16.Debug.Start.png DebuggerIcons\Icons.16x16.Debug.StartWithoutDebugging.png DebuggerIcons\Icons.16x16.Debug.Assembly.png +ClassBrowserIcons\Icons.16x16.Module.png +ClassBrowserIcons\Icons.16x16.ModuleError.png +ClassBrowserIcons\Icons.16x16.AssemblyFromFile.png +ClassBrowserIcons\Icons.16x16.AssemblyFromGAC.png NavigationIcons\Icons.16x16.NavigateBack.disabled.png NavigationIcons\Icons.16x16.NavigateBack.png NavigationIcons\Icons.16x16.NavigateForward.png @@ -556,11 +562,6 @@ ClassBrowserIcons\Icons.16x16.NameSpace.png ClassBrowserIcons\Icons.16x16.Operator.png ClassBrowserIcons\Icons.16x16.Parameter.png ClassBrowserIcons\Icons.16x16.Struct.png -ClassBrowserIcons\Icons.16x16.Workspace.png -ClassBrowserIcons\Icons.16x16.Assembly.png -ClassBrowserIcons\Icons.16x16.Module.png -ClassBrowserIcons\Icons.16x16.AssemblyFromFile.png -ClassBrowserIcons\Icons.16x16.AssemblyFromGAC.png ------------------------------------------------------------------------------- Left original (other source than Fugue Iconlibrary) diff --git a/data/resources/image/BitmapResources/BitmapResources.res b/data/resources/image/BitmapResources/BitmapResources.res index e3335e24ed..7946ddfdb6 100644 --- a/data/resources/image/BitmapResources/BitmapResources.res +++ b/data/resources/image/BitmapResources/BitmapResources.res @@ -298,7 +298,9 @@ Icons.16x16.AssemblyFromGAC = ClassBrowserIcons\Icons.16x16.AssemblyFromGA Icons.16x16.Workspace = ClassBrowserIcons\Icons.16x16.Workspace.png Icons.16x16.Assembly = ClassBrowserIcons\Icons.16x16.Assembly.png +Icons.16x16.AssemblyError = ClassBrowserIcons\Icons.16x16.AssemblyError.png Icons.16x16.Module = ClassBrowserIcons\Icons.16x16.Module.png +Icons.16x16.ModuleError = ClassBrowserIcons\Icons.16x16.ModuleError.png Icons.16x16.NameSpace = ClassBrowserIcons\Icons.16x16.NameSpace.png Icons.16x16.Literal = ClassBrowserIcons\Icons.16x16.Literal.png Icons.16x16.Reference = ClassBrowserIcons\Icons.16x16.Reference.png diff --git a/data/resources/image/BitmapResources/ClassBrowserIcons/Icons.16x16.AssemblyError.png b/data/resources/image/BitmapResources/ClassBrowserIcons/Icons.16x16.AssemblyError.png new file mode 100644 index 0000000000000000000000000000000000000000..01566b5f5e884f9d717758170be7b108c10fdccc GIT binary patch literal 713 zcmV;)0yh1LP)%j!!{k<3j30b51Zdh)b@(Jf z&gF7&6~~yoVQtj!^{x*3gL}G73;Wo)O#I-pyGYzQPdwF?Z5Rej({yB;8oJHL*b<3~ z1ILnRZQr%gGP%R10f7XbrO}&zi^RQ4F2K?$69!?5m>G1maFF>qK9x$LQvRVxzRt~b z`fl9?IFN7ekhp&tsHm2v>(EICDQ-Q&`d|yD=U!su!37l5DTskk7qO2}nB#5W0BM4$ zXZrobz<63=KuMC&C1w%v70@Dmgv1xo*MAj0@egEQwN>=Wy#(1IP!=cSef^!GSS-Lc zelIpbA6~qrP0^$tJ17dPc$+(>S*0!e*<14rIiprpjmmsUP)w){0F8=AWvlN8e40hRdF!?|MNv>HmHzo@Ej)aY z&czmRMqu5b5N2bPDNB8 zb~7$DE-^4L^m3s900Oc}L_t(IPmPd$NK;`Hhu^!+scn{<8Z-aMTth9COam>a=29bF zAK1bujr=N+i3CDfWKI!G+%hU#xuF~A%7nE{mlhFhYI-ea&RQy3lwulM>g*5kbob#9 z5%htF^ShjT4u=V&zAM-xe= zYs4t_U)E6TAtl6DJfv_lHMIvX{`qkOh%QWgxeN_2eCHDs^k&<@T4YT8^l%m=4WvS1 z|2e2^;ec`AJbeBX4=#ls)cC@f zDHcYIq1Fp5b;KA3GL_qWiyS*>8(Pf+cRaQ`8Ny!2!L529=;`FZYbkDVhj&XD_>*y=D~D%ilN^Rr61{uqLkgAP%Fd=`~ZvTY~dcEh>);}F_@ z1R`~O*#CwHj7C53c(xnP=CGiK?E;j1F@&gw9Fm3NC9=fbU|Uc|*F<%kfS_jX9FcLS zDyE6q$_5YF&Y6b{%)A)MhsyM#7yJTu3B$FjuXx>`Tga7~l07*qoM6N<$f<$s? Aa{vGU literal 0 HcmV?d00001 diff --git a/src/Main/SharpDevelop/Resources/BitmapResources.resources b/src/Main/SharpDevelop/Resources/BitmapResources.resources index 3e0c7009f52f17f35321638fbf72697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/17] ClassBrowser: Handling saved but inaccessible assemblies, showing warning icon at assembly item. --- .../Dom/ClassBrowser/AssemblyTreeNode.cs | 6 +- .../Base/Project/Dom/IEntityModelContext.cs | 13 +++ .../Dom/ClassBrowser/ClassBrowserPad.cs | 83 ++++++++++++++++--- .../SharpDevelop/Dom/ClassBrowser/Commands.cs | 4 - 4 files changed, 90 insertions(+), 16 deletions(-) diff --git a/src/Main/Base/Project/Dom/ClassBrowser/AssemblyTreeNode.cs b/src/Main/Base/Project/Dom/ClassBrowser/AssemblyTreeNode.cs index b6f382bba4..ff499c969f 100644 --- a/src/Main/Base/Project/Dom/ClassBrowser/AssemblyTreeNode.cs +++ b/src/Main/Base/Project/Dom/ClassBrowser/AssemblyTreeNode.cs @@ -44,7 +44,11 @@ namespace ICSharpCode.SharpDevelop.Dom.ClassBrowser public override object Icon { get { - return SD.ResourceService.GetImageSource("Icons.16x16.Assembly"); + if (model.Context.IsValid) { + return SD.ResourceService.GetImageSource("Icons.16x16.Assembly"); + } else { + return SD.ResourceService.GetImageSource("Icons.16x16.AssemblyError"); + } } } diff --git a/src/Main/Base/Project/Dom/IEntityModelContext.cs b/src/Main/Base/Project/Dom/IEntityModelContext.cs index 69295ef7b3..542c87d107 100644 --- a/src/Main/Base/Project/Dom/IEntityModelContext.cs +++ b/src/Main/Base/Project/Dom/IEntityModelContext.cs @@ -44,6 +44,11 @@ namespace ICSharpCode.SharpDevelop.Dom /// Full path and file name of the assembly. Output assembly for projects. /// string Location { get; } + + /// + /// Returns whether this is a valid context (based on a existing and readable definition). + /// + bool IsValid { get; } } public class ProjectEntityModelContext : IEntityModelContext @@ -80,6 +85,10 @@ namespace ICSharpCode.SharpDevelop.Dom { return EntityModelContextUtils.IsBetterPart(part1, part2, primaryCodeFileExtension); } + + public bool IsValid { + get { return true; } + } } public class AssemblyEntityModelContext : IEntityModelContext @@ -119,6 +128,10 @@ namespace ICSharpCode.SharpDevelop.Dom public IProject Project { get { return null; } } + + public bool IsValid { + get { return true; } + } } public static class EntityModelContextUtils diff --git a/src/Main/SharpDevelop/Dom/ClassBrowser/ClassBrowserPad.cs b/src/Main/SharpDevelop/Dom/ClassBrowser/ClassBrowserPad.cs index da5865ec00..891508f62b 100644 --- a/src/Main/SharpDevelop/Dom/ClassBrowser/ClassBrowserPad.cs +++ b/src/Main/SharpDevelop/Dom/ClassBrowser/ClassBrowserPad.cs @@ -2,13 +2,16 @@ // This code is distributed under the GNU LGPL (for details please see \doc\license.txt) using System; +using System.IO; using System.Linq; using System.Collections.Generic; using System.Diagnostics; using System.Windows.Controls; +using ICSharpCode.Core; using ICSharpCode.Core.Presentation; using ICSharpCode.NRefactory; using ICSharpCode.NRefactory.TypeSystem; +using ICSharpCode.SharpDevelop.Dom; using ICSharpCode.TreeView; using ICSharpCode.SharpDevelop.Project; using ICSharpCode.SharpDevelop.Workbench; @@ -27,6 +30,50 @@ namespace ICSharpCode.SharpDevelop.Dom.ClassBrowser public bool IsActive { get; set; } } + class UnresolvedAssemblyEntityModelContext : IEntityModelContext + { + string assemblyName; + string location; + + public UnresolvedAssemblyEntityModelContext(string assemblyName, string location) + { + this.assemblyName = assemblyName; + this.location = location; + } + + public ICompilation GetCompilation() + { + return null; + } + + public bool IsBetterPart(IUnresolvedTypeDefinition part1, IUnresolvedTypeDefinition part2) + { + return false; + } + + public IProject Project { + get { + return null; + } + } + + public string AssemblyName { + get { + return assemblyName; + } + } + + public string Location { + get { + return location; + } + } + + public bool IsValid { + get { return false; } + } + } + class ClassBrowserPad : AbstractPadContent, IClassBrowser { #region IClassBrowser implementation @@ -171,19 +218,33 @@ namespace ICSharpCode.SharpDevelop.Dom.ClassBrowser public static IAssemblyModel CreateAssemblyModelFromFile(string fileName) { - var loader = new CecilLoader(); - loader.IncludeInternalMembers = true; - loader.LazyLoad = true; - var assembly = loader.LoadAssemblyFile(fileName); - - IEntityModelContext context = new AssemblyEntityModelContext(assembly); - IAssemblyModel model = SD.GetRequiredService().CreateAssemblyModel(context); + try { + var loader = new CecilLoader(); + loader.IncludeInternalMembers = true; + loader.LazyLoad = true; + var assembly = loader.LoadAssemblyFile(fileName); + + IEntityModelContext context = new AssemblyEntityModelContext(assembly); + IAssemblyModel model = SD.GetRequiredService().CreateAssemblyModel(context); + if (model is IUpdateableAssemblyModel) { + ((IUpdateableAssemblyModel)model).Update(EmptyList.Instance, assembly.TopLevelTypeDefinitions.ToList()); + ((IUpdateableAssemblyModel) model).AssemblyName = assembly.AssemblyName; + } + return model; + } catch (BadImageFormatException ex) { + SD.MessageService.ShowWarningFormatted("{0} is not a valid .NET assembly.", Path.GetFileName(fileName)); + } catch (FileNotFoundException ex) { + SD.MessageService.ShowWarningFormatted("{0} is not accessible or doesn't exist anymore.", fileName); + } - if (model is IUpdateableAssemblyModel) { - ((IUpdateableAssemblyModel)model).Update(EmptyList.Instance, assembly.TopLevelTypeDefinitions.ToList()); - ((IUpdateableAssemblyModel) model).AssemblyName = assembly.AssemblyName; + // AssemblyModel for unresolved file references + IEntityModelContext unresolvedContext = new UnresolvedAssemblyEntityModelContext(Path.GetFileName(fileName), fileName); + IAssemblyModel unresolvedModel = SD.GetRequiredService().CreateAssemblyModel(unresolvedContext); + if (unresolvedModel is IUpdateableAssemblyModel) { + ((IUpdateableAssemblyModel) unresolvedModel).AssemblyName = unresolvedContext.AssemblyName; } - return model; + + return unresolvedModel; } void AppendAssemblyFileToList(string assemblyFile) diff --git a/src/Main/SharpDevelop/Dom/ClassBrowser/Commands.cs b/src/Main/SharpDevelop/Dom/ClassBrowser/Commands.cs index 17ce0e73f1..3287d4e4f9 100644 --- a/src/Main/SharpDevelop/Dom/ClassBrowser/Commands.cs +++ b/src/Main/SharpDevelop/Dom/ClassBrowser/Commands.cs @@ -23,11 +23,7 @@ namespace ICSharpCode.SharpDevelop.Dom.ClassBrowser openFileDialog.CheckPathExists = true; if (openFileDialog.ShowDialog() ?? false) { - try { classBrowser.AssemblyList.Assemblies.Add(ClassBrowserPad.CreateAssemblyModelFromFile(openFileDialog.FileName)); - } catch (BadImageFormatException ex) { - SD.MessageService.ShowWarningFormatted("{0} is not a valid .NET assembly.", Path.GetFileName(openFileDialog.FileName)); - } } } } From a20d94f6a750181b780e720a56d542e0f93eaa79 Mon Sep 17 00:00:00 2001 From: Siegfried Pammer Date: Sun, 21 Jul 2013 18:13:57 +0200 Subject: [PATCH 08/17] reactivate DefinitionViewPad --- .../Project/Src/Gui/Pads/DefinitionViewPad.cs | 46 +++++++++++-------- 1 file changed, 28 insertions(+), 18 deletions(-) diff --git a/src/Main/Base/Project/Src/Gui/Pads/DefinitionViewPad.cs b/src/Main/Base/Project/Src/Gui/Pads/DefinitionViewPad.cs index dfcdd1b60a..fe5ded64f1 100755 --- a/src/Main/Base/Project/Src/Gui/Pads/DefinitionViewPad.cs +++ b/src/Main/Base/Project/Src/Gui/Pads/DefinitionViewPad.cs @@ -6,7 +6,7 @@ using System.IO; using System.Threading.Tasks; using System.Windows; -using ICSharpCode.AvalonEdit; +using System.Windows.Threading; using ICSharpCode.AvalonEdit.Document; using ICSharpCode.AvalonEdit.Highlighting; using ICSharpCode.Core; @@ -24,14 +24,13 @@ namespace ICSharpCode.SharpDevelop.Gui public class DefinitionViewPad : AbstractPadContent { AvalonEdit.TextEditor ctl; + DispatcherTimer timer; /// /// The control representing the pad /// public override object Control { - get { - return ctl; - } + get { return ctl; } } /// @@ -42,8 +41,11 @@ namespace ICSharpCode.SharpDevelop.Gui ctl = Editor.AvalonEditTextEditorAdapter.CreateAvalonEditInstance(); ctl.IsReadOnly = true; ctl.MouseDoubleClick += OnDoubleClick; - throw new NotImplementedException(); - //ParserService.ParserUpdateStepFinished += OnParserUpdateStep; + SD.ParserService.ParseInformationUpdated += OnParserUpdateStep; + SD.ParserService.LoadSolutionProjectsThread.Finished += LoadThreadFinished; + timer = new DispatcherTimer(DispatcherPriority.Background) { Interval = TimeSpan.FromSeconds(2) }; + timer.Tick += delegate { UpdateTick(null); }; + timer.IsEnabled = !SD.ParserService.LoadSolutionProjectsThread.IsRunning; ctl.IsVisibleChanged += delegate { UpdateTick(null); }; } @@ -52,47 +54,55 @@ namespace ICSharpCode.SharpDevelop.Gui /// public override void Dispose() { - //ParserService.ParserUpdateStepFinished -= OnParserUpdateStep; + SD.ParserService.ParseInformationUpdated -= OnParserUpdateStep; + SD.ParserService.LoadSolutionProjectsThread.Finished -= LoadThreadFinished; ctl.Document = null; base.Dispose(); } void OnDoubleClick(object sender, EventArgs e) { - string fileName = currentFileName; + FileName fileName = currentFileName; if (fileName != null) { var caret = ctl.TextArea.Caret; - FileService.JumpToFilePosition(fileName, caret.Line, caret.Column); + SD.FileService.JumpToFilePosition(fileName, caret.Line, caret.Column); // refresh DefinitionView to show the definition of the expression that was double-clicked UpdateTick(null); } } - void OnParserUpdateStep(object sender, ParserUpdateStepEventArgs e) + void LoadThreadFinished(object sender, EventArgs e) + { + timer.IsEnabled = true; + UpdateTick(null); + } + + void OnParserUpdateStep(object sender, ParseInformationEventArgs e) { UpdateTick(e); } - async void UpdateTick(ParserUpdateStepEventArgs e) + async void UpdateTick(ParseInformationEventArgs e) { + timer.IsEnabled = ctl.IsVisible; if (!ctl.IsVisible) return; LoggingService.Debug("DefinitionViewPad.Update"); ResolveResult res = await ResolveAtCaretAsync(e); if (res == null) return; var pos = res.GetDefinitionRegion(); - if (pos.IsEmpty) return; + if (pos.IsEmpty) return; // TODO : try to decompile? OpenFile(pos); } - Task ResolveAtCaretAsync(ParserUpdateStepEventArgs e) + Task ResolveAtCaretAsync(ParseInformationEventArgs e) { IWorkbenchWindow window = SD.Workbench.ActiveWorkbenchWindow; - if (window == null) + if (window == null) return Task.FromResult(null); IViewContent viewContent = window.ActiveViewContent; - if (viewContent == null) + if (viewContent == null) return Task.FromResult(null); ITextEditor editor = viewContent.GetService(); if (editor == null) @@ -107,14 +117,14 @@ namespace ICSharpCode.SharpDevelop.Gui } DomRegion oldPosition; - string currentFileName; + FileName currentFileName; void OpenFile(DomRegion pos) { if (pos.Equals(oldPosition)) return; oldPosition = pos; if (pos.FileName != currentFileName) - LoadFile(pos.FileName); + LoadFile(new FileName(pos.FileName)); ctl.TextArea.Caret.Location = pos.Begin; Rect r = ctl.TextArea.Caret.CalculateCaretRectangle(); if (!r.IsEmpty) { @@ -126,7 +136,7 @@ namespace ICSharpCode.SharpDevelop.Gui /// Loads the file from the corresponding text editor window if it is /// open otherwise the file is loaded from the file system. /// - void LoadFile(string fileName) + void LoadFile(FileName fileName) { // Load the text into the definition view's text editor. ctl.Document = new TextDocument(SD.FileService.GetFileContent(fileName)); From 7b11528926304612176ca20fad2c7f97eafdb9e0 Mon Sep 17 00:00:00 2001 From: Andreas Weizel Date: Mon, 22 Jul 2013 23:37:21 +0200 Subject: [PATCH 09/17] ClassBrowser: Changed sorting of nodes in workspace, now sorting solution before custom assemblies. --- .../Dom/ClassBrowser/WorkspaceTreeNode.cs | 25 +++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) diff --git a/src/Main/Base/Project/Dom/ClassBrowser/WorkspaceTreeNode.cs b/src/Main/Base/Project/Dom/ClassBrowser/WorkspaceTreeNode.cs index d9e14d24b6..0a7117eb12 100644 --- a/src/Main/Base/Project/Dom/ClassBrowser/WorkspaceTreeNode.cs +++ b/src/Main/Base/Project/Dom/ClassBrowser/WorkspaceTreeNode.cs @@ -4,6 +4,7 @@ using System; using System.Collections.Generic; using System.Collections.ObjectModel; +using ICSharpCode.NRefactory.Utils; using ICSharpCode.TreeView; namespace ICSharpCode.SharpDevelop.Dom.ClassBrowser @@ -13,7 +14,25 @@ namespace ICSharpCode.SharpDevelop.Dom.ClassBrowser /// public class WorkspaceTreeNode : ModelCollectionTreeNode { + class WorkspaceChildComparer : IComparer + { + IComparer stringComparer = StringComparer.OrdinalIgnoreCase; + + public int Compare(SharpTreeNode x, SharpTreeNode y) + { + // Solution node has precedence over other nodes + if ((x is SolutionTreeNode) && !(y is SolutionTreeNode)) + return -1; + if (!(x is SolutionTreeNode) && (y is SolutionTreeNode)) + return 1; + + // Both nodes are solutions or not solutions, compare their Text property + return stringComparer.Compare(x.Text.ToString(), y.Text.ToString()); + } + } + WorkspaceModel workspace; + protected static readonly IComparer ChildNodeComparer = new WorkspaceChildComparer(); public IMutableModelCollection SpecialNodes { get { return workspace.SpecialNodes; } @@ -40,7 +59,7 @@ namespace ICSharpCode.SharpDevelop.Dom.ClassBrowser } protected override IComparer NodeComparer { - get { return NodeTextComparer; } + get { return ChildNodeComparer; } } public override object Text { @@ -62,7 +81,9 @@ namespace ICSharpCode.SharpDevelop.Dom.ClassBrowser protected override void InsertSpecialNodes() { - Children.AddRange(workspace.SpecialNodes); + foreach (var node in workspace.SpecialNodes) { + Children.OrderedInsert(node, ChildNodeComparer); + } } void SpecialNodesModelCollectionChanged(IReadOnlyCollection removedItems, IReadOnlyCollection addedItems) From 33addc93531eabe55e7900569f806185b3f703dc Mon Sep 17 00:00:00 2001 From: Andreas Weizel Date: Tue, 23 Jul 2013 00:59:31 +0200 Subject: [PATCH 10/17] Adding of custom assemblies to ClassBrowser from GAC through OpenFromGacDialog. --- .../SharpDevelop/Dom/ClassBrowser/Commands.cs | 11 +- .../Dom/ClassBrowser/OpenFromGacDialog.xaml | 46 +++++ .../ClassBrowser/OpenFromGacDialog.xaml.cs | 188 ++++++++++++++++++ src/Main/SharpDevelop/SharpDevelop.csproj | 5 + 4 files changed, 249 insertions(+), 1 deletion(-) create mode 100644 src/Main/SharpDevelop/Dom/ClassBrowser/OpenFromGacDialog.xaml create mode 100644 src/Main/SharpDevelop/Dom/ClassBrowser/OpenFromGacDialog.xaml.cs diff --git a/src/Main/SharpDevelop/Dom/ClassBrowser/Commands.cs b/src/Main/SharpDevelop/Dom/ClassBrowser/Commands.cs index 3287d4e4f9..7496f03f0b 100644 --- a/src/Main/SharpDevelop/Dom/ClassBrowser/Commands.cs +++ b/src/Main/SharpDevelop/Dom/ClassBrowser/Commands.cs @@ -36,7 +36,16 @@ namespace ICSharpCode.SharpDevelop.Dom.ClassBrowser { public override void Execute(object parameter) { -// throw new NotImplementedException(); + var classBrowser = SD.GetService(); + if (classBrowser != null) { + OpenFromGacDialog gacDialog = new OpenFromGacDialog(); + if (gacDialog.ShowDialog() ?? false) + { + foreach (string assemblyFile in gacDialog.SelectedFileNames) { + classBrowser.AssemblyList.Assemblies.Add(ClassBrowserPad.CreateAssemblyModelFromFile(assemblyFile)); + } + } + } } } diff --git a/src/Main/SharpDevelop/Dom/ClassBrowser/OpenFromGacDialog.xaml b/src/Main/SharpDevelop/Dom/ClassBrowser/OpenFromGacDialog.xaml new file mode 100644 index 0000000000..ae78f0982f --- /dev/null +++ b/src/Main/SharpDevelop/Dom/ClassBrowser/OpenFromGacDialog.xaml @@ -0,0 +1,46 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/Main/SharpDevelop/Dom/ClassBrowser/OpenFromGacDialog.xaml.cs b/src/Main/SharpDevelop/Dom/ClassBrowser/OpenFromGacDialog.xaml.cs new file mode 100644 index 0000000000..a13572bcf2 --- /dev/null +++ b/src/Main/SharpDevelop/Dom/ClassBrowser/OpenFromGacDialog.xaml.cs @@ -0,0 +1,188 @@ +// Copyright (c) 2011 AlphaSierraPapa for the SharpDevelop Team +// +// Permission is hereby granted, free of charge, to any person obtaining a copy of this +// software and associated documentation files (the "Software"), to deal in the Software +// without restriction, including without limitation the rights to use, copy, modify, merge, +// publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons +// to whom the Software is furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in all copies or +// substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, +// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR +// PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE +// FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +// DEALINGS IN THE SOFTWARE. + +using System; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.ComponentModel; +using System.Linq; +using System.Text; +using System.Threading; +using System.Windows; +using System.Windows.Controls; +using System.Windows.Threading; +using ICSharpCode.Core.Presentation; +using ICSharpCode.SharpDevelop.Gui; +using ICSharpCode.SharpDevelop.Parser; + +namespace ICSharpCode.SharpDevelop.Dom.ClassBrowser +{ + /// + /// Interaction logic for OpenFromGacDialog.xaml + /// + public partial class OpenFromGacDialog : Window + { + ObservableCollection gacEntries = new ObservableCollection(); + ObservableCollection filteredEntries = new ObservableCollection(); + Predicate filterMethod = _ => true; + volatile bool cancelFetchThread; + + public OpenFromGacDialog() + { + InitializeComponent(); + FormLocationHelper.ApplyWindow(this, "ICSharpCode.SharpDevelop.Dom.OpenFromGacDialog.Bounds", true); + listView.ItemsSource = filteredEntries; + SortableGridViewColumn.SetCurrentSortColumn(listView, nameColumn); + SortableGridViewColumn.SetSortDirection(listView, ColumnSortDirection.Ascending); + + new Thread(new ThreadStart(FetchGacContents)).Start(); + } + + protected override void OnClosing(CancelEventArgs e) + { + base.OnClosing(e); + cancelFetchThread = true; + } + + #region Fetch Gac Contents + sealed class GacEntry + { + readonly DomAssemblyName r; + readonly string fileName; + string formattedVersion; + + public GacEntry(DomAssemblyName r, string fileName) + { + this.r = r; + this.fileName = fileName; + } + + public string FullName { + get { return r.FullName; } + } + + public string ShortName { + get { return r.ShortName; } + } + + public string FileName { + get { return fileName; } + } + + public Version Version { + get { return r.Version; } + } + + public string FormattedVersion { + get { + if (formattedVersion == null) + formattedVersion = Version.ToString(); + return formattedVersion; + } + } + + public string Culture { + get { return r.Culture; } + } + + public string PublicKeyToken { + get { + StringBuilder s = new StringBuilder(); + foreach (byte b in r.PublicKeyToken) + s.Append(b.ToString("x2")); + return s.ToString(); + } + } + + public override string ToString() + { + return r.FullName; + } + } + + void FetchGacContents() + { + IGlobalAssemblyCacheService gacService = SD.GetService(); + HashSet fullNames = new HashSet(); + UpdateProgressBar(pg => { pg.Visibility = System.Windows.Visibility.Visible; pg.IsIndeterminate = true; }); + var list = gacService.Assemblies.TakeWhile(_ => !cancelFetchThread).ToList(); + UpdateProgressBar(pg => { pg.IsIndeterminate = false; pg.Maximum = list.Count; }); + foreach (var r in list) { + if (cancelFetchThread) + break; + if (fullNames.Add(r.FullName)) { // filter duplicates + var file = gacService.FindAssemblyInNetGac(r); + if (file != null) { + var entry = new GacEntry(r, file); + UpdateProgressBar(pg => { pg.Value = pg.Value + 1; AddNewEntry(entry); }); + } + } + } + UpdateProgressBar(pg => { pg.Visibility = System.Windows.Visibility.Hidden; }); + } + + void UpdateProgressBar(Action updateAction) + { + Dispatcher.BeginInvoke(DispatcherPriority.Normal, (Action)(() => updateAction(gacReadingProgressBar))); + } + + void AddNewEntry(GacEntry entry) + { + gacEntries.Add(entry); + if (filterMethod(entry)) + filteredEntries.Add(entry); + } + #endregion + + void FilterTextBox_TextChanged(object sender, TextChangedEventArgs e) + { + string filterString = filterTextBox.Text.Trim(); + if (filterString.Length == 0) + filterMethod = _ => true; + else { + var elements = filterString.Split(new char[] { ' ' }, StringSplitOptions.RemoveEmptyEntries); + filterMethod = entry => elements.All(el => Contains(entry.FullName, el) || Contains(entry.FormattedVersion, el)); + } + + filteredEntries.Clear(); + filteredEntries.AddRange(gacEntries.Where(entry => filterMethod(entry))); + } + + static bool Contains(string s, string subString) + { + return s.IndexOf(subString, StringComparison.OrdinalIgnoreCase) >= 0; + } + + void ListView_SelectionChanged(object sender, SelectionChangedEventArgs e) + { + okButton.IsEnabled = listView.SelectedItems.Count > 0; + } + + void OKButton_Click(object sender, RoutedEventArgs e) + { + this.DialogResult = true; + Close(); + } + + public string[] SelectedFileNames { + get { + return listView.SelectedItems.OfType().Select(e => e.FileName).ToArray(); + } + } + } +} \ No newline at end of file diff --git a/src/Main/SharpDevelop/SharpDevelop.csproj b/src/Main/SharpDevelop/SharpDevelop.csproj index 20ff169f9d..8eed81e197 100644 --- a/src/Main/SharpDevelop/SharpDevelop.csproj +++ b/src/Main/SharpDevelop/SharpDevelop.csproj @@ -109,6 +109,10 @@ + + OpenFromGacDialog.xaml + Code + @@ -331,6 +335,7 @@ + From 724d5c4de548f32b3424815278a301948fb0b370 Mon Sep 17 00:00:00 2001 From: Andreas Weizel Date: Tue, 23 Jul 2013 01:11:27 +0200 Subject: [PATCH 11/17] When "rename symbol" dialog is opened, contents of name TextBox are selected to quickly overwrite them by typing. --- .../Base/Project/Src/Editor/Dialogs/RenameSymbolDialog.xaml.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Main/Base/Project/Src/Editor/Dialogs/RenameSymbolDialog.xaml.cs b/src/Main/Base/Project/Src/Editor/Dialogs/RenameSymbolDialog.xaml.cs index 16a71c429e..580ea9ff5f 100644 --- a/src/Main/Base/Project/Src/Editor/Dialogs/RenameSymbolDialog.xaml.cs +++ b/src/Main/Base/Project/Src/Editor/Dialogs/RenameSymbolDialog.xaml.cs @@ -42,6 +42,7 @@ namespace ICSharpCode.SharpDevelop.Editor.Dialogs // Set focus into TextBox this.symbolNameTextBox.Focus(); + this.IsVisibleChanged += (sender, e) => this.symbolNameTextBox.SelectAll(); } public string OldSymbolName From 35a81d3eb4546bf01c99c3b36f6d6d61823ee8d8 Mon Sep 17 00:00:00 2001 From: Daniel Grunwald Date: Thu, 30 May 2013 16:03:56 +0200 Subject: [PATCH 12/17] Caret movement: don't stop between a base character and its combining mark (within a single grapheme) --- .../Document/TextUtilities.cs | 97 ++++++++++++------- .../SingleCharacterElementGenerator.cs | 4 +- .../Rendering/VisualLine.cs | 13 ++- 3 files changed, 76 insertions(+), 38 deletions(-) diff --git a/src/Libraries/AvalonEdit/ICSharpCode.AvalonEdit/Document/TextUtilities.cs b/src/Libraries/AvalonEdit/ICSharpCode.AvalonEdit/Document/TextUtilities.cs index 9780436238..2da8a9badc 100644 --- a/src/Libraries/AvalonEdit/ICSharpCode.AvalonEdit/Document/TextUtilities.cs +++ b/src/Libraries/AvalonEdit/ICSharpCode.AvalonEdit/Document/TextUtilities.cs @@ -14,7 +14,7 @@ namespace ICSharpCode.AvalonEdit.Document public enum CaretPositioningMode { /// - /// Normal positioning (stop at every caret position) + /// Normal positioning (stop after every grapheme) /// Normal, /// @@ -32,7 +32,12 @@ namespace ICSharpCode.AvalonEdit.Document /// /// Stop only on word borders, and anywhere in the middle of symbols. /// - WordBorderOrSymbol + WordBorderOrSymbol, + /// + /// Stop between every Unicode codepoint, even within the same grapheme. + /// This is used to implement deleting the previous grapheme when Backspace is pressed. + /// + EveryCodepoint } /// @@ -199,37 +204,43 @@ namespace ICSharpCode.AvalonEdit.Document { if (c == '\r' || c == '\n') return CharacterClass.LineTerminator; - else if (char.IsWhiteSpace(c)) - return CharacterClass.Whitespace; - else if (char.IsLetterOrDigit(c) || c == '_') + if (c == '_') return CharacterClass.IdentifierPart; - else - return CharacterClass.Other; + return GetCharacterClass(char.GetUnicodeCategory(c)); } static CharacterClass GetCharacterClass(char highSurrogate, char lowSurrogate) { if (char.IsSurrogatePair(highSurrogate, lowSurrogate)) { - switch (char.GetUnicodeCategory(highSurrogate.ToString() + lowSurrogate.ToString(), 0)) { - case UnicodeCategory.SpaceSeparator: - case UnicodeCategory.LineSeparator: - case UnicodeCategory.ParagraphSeparator: - return CharacterClass.Whitespace; - case UnicodeCategory.UppercaseLetter: - case UnicodeCategory.LowercaseLetter: - case UnicodeCategory.TitlecaseLetter: - case UnicodeCategory.ModifierLetter: - case UnicodeCategory.OtherLetter: - case UnicodeCategory.DecimalDigitNumber: - return CharacterClass.IdentifierPart; - default: - return CharacterClass.Other; - } + return GetCharacterClass(char.GetUnicodeCategory(highSurrogate.ToString() + lowSurrogate.ToString(), 0)); } else { // malformed surrogate pair return CharacterClass.Other; } } + + static CharacterClass GetCharacterClass(UnicodeCategory c) + { + switch (c) { + case UnicodeCategory.SpaceSeparator: + case UnicodeCategory.LineSeparator: + case UnicodeCategory.ParagraphSeparator: + return CharacterClass.Whitespace; + case UnicodeCategory.UppercaseLetter: + case UnicodeCategory.LowercaseLetter: + case UnicodeCategory.TitlecaseLetter: + case UnicodeCategory.ModifierLetter: + case UnicodeCategory.OtherLetter: + case UnicodeCategory.DecimalDigitNumber: + return CharacterClass.IdentifierPart; + case UnicodeCategory.NonSpacingMark: + case UnicodeCategory.SpacingCombiningMark: + case UnicodeCategory.EnclosingMark: + return CharacterClass.CombiningMark; + default: + return CharacterClass.Other; + } + } #endregion #region GetNextCaretPosition @@ -251,13 +262,16 @@ namespace ICSharpCode.AvalonEdit.Document { if (textSource == null) throw new ArgumentNullException("textSource"); - if (mode != CaretPositioningMode.Normal - && mode != CaretPositioningMode.WordBorder - && mode != CaretPositioningMode.WordStart - && mode != CaretPositioningMode.WordBorderOrSymbol - && mode != CaretPositioningMode.WordStartOrSymbol) - { - throw new ArgumentException("Unsupported CaretPositioningMode: " + mode, "mode"); + switch (mode) { + case CaretPositioningMode.Normal: + case CaretPositioningMode.EveryCodepoint: + case CaretPositioningMode.WordBorder: + case CaretPositioningMode.WordBorderOrSymbol: + case CaretPositioningMode.WordStart: + case CaretPositioningMode.WordStartOrSymbol: + break; // OK + default: + throw new ArgumentException("Unsupported CaretPositioningMode: " + mode, "mode"); } if (direction != LogicalDirection.Backward && direction != LogicalDirection.Forward) @@ -267,7 +281,7 @@ namespace ICSharpCode.AvalonEdit.Document int textLength = textSource.TextLength; if (textLength <= 0) { // empty document? has a normal caret position at 0, though no word borders - if (mode == CaretPositioningMode.Normal) { + if (IsNormal(mode)) { if (offset > 0 && direction == LogicalDirection.Backward) return 0; if (offset < 0 && direction == LogicalDirection.Forward) return 0; } @@ -286,14 +300,14 @@ namespace ICSharpCode.AvalonEdit.Document if (nextPos == 0) { // at the document start, there's only a word border // if the first character is not whitespace - if (mode == CaretPositioningMode.Normal || !char.IsWhiteSpace(textSource.GetCharAt(0))) + if (IsNormal(mode) || !char.IsWhiteSpace(textSource.GetCharAt(0))) return nextPos; } else if (nextPos == textLength) { // at the document end, there's never a word start if (mode != CaretPositioningMode.WordStart && mode != CaretPositioningMode.WordStartOrSymbol) { // at the document end, there's only a word border // if the last character is not whitespace - if (mode == CaretPositioningMode.Normal || !char.IsWhiteSpace(textSource.GetCharAt(textLength - 1))) + if (IsNormal(mode) || !char.IsWhiteSpace(textSource.GetCharAt(textLength - 1))) return nextPos; } } else { @@ -320,9 +334,19 @@ namespace ICSharpCode.AvalonEdit.Document } } + static bool IsNormal(CaretPositioningMode mode) + { + return mode == CaretPositioningMode.Normal || mode == CaretPositioningMode.EveryCodepoint; + } + static bool StopBetweenCharacters(CaretPositioningMode mode, CharacterClass charBefore, CharacterClass charAfter) { - // Stop after every character in normal mode + if (mode == CaretPositioningMode.EveryCodepoint) + return true; + // Don't stop in the middle of a grapheme + if (charAfter == CharacterClass.CombiningMark) + return false; + // Stop after every grapheme in normal mode if (mode == CaretPositioningMode.Normal) return true; if (charBefore == charAfter) { @@ -370,6 +394,11 @@ namespace ICSharpCode.AvalonEdit.Document /// /// The character is line terminator (\r or \n). /// - LineTerminator + LineTerminator, + /// + /// The character is a unicode combining mark that modifies the previous character. + /// Corresponds to the Unicode designations "Mn", "Mc" and "Me". + /// + CombiningMark } } diff --git a/src/Libraries/AvalonEdit/ICSharpCode.AvalonEdit/Rendering/SingleCharacterElementGenerator.cs b/src/Libraries/AvalonEdit/ICSharpCode.AvalonEdit/Rendering/SingleCharacterElementGenerator.cs index b1cf4e6b8b..46a600bf69 100644 --- a/src/Libraries/AvalonEdit/ICSharpCode.AvalonEdit/Rendering/SingleCharacterElementGenerator.cs +++ b/src/Libraries/AvalonEdit/ICSharpCode.AvalonEdit/Rendering/SingleCharacterElementGenerator.cs @@ -111,7 +111,7 @@ namespace ICSharpCode.AvalonEdit.Rendering public override int GetNextCaretPosition(int visualColumn, LogicalDirection direction, CaretPositioningMode mode) { - if (mode == CaretPositioningMode.Normal) + if (mode == CaretPositioningMode.Normal || mode == CaretPositioningMode.EveryCodepoint) return base.GetNextCaretPosition(visualColumn, direction, mode); else return -1; @@ -146,7 +146,7 @@ namespace ICSharpCode.AvalonEdit.Rendering public override int GetNextCaretPosition(int visualColumn, LogicalDirection direction, CaretPositioningMode mode) { - if (mode == CaretPositioningMode.Normal) + if (mode == CaretPositioningMode.Normal || mode == CaretPositioningMode.EveryCodepoint) return base.GetNextCaretPosition(visualColumn, direction, mode); else return -1; diff --git a/src/Libraries/AvalonEdit/ICSharpCode.AvalonEdit/Rendering/VisualLine.cs b/src/Libraries/AvalonEdit/ICSharpCode.AvalonEdit/Rendering/VisualLine.cs index 76d6e657c1..f1e437588e 100644 --- a/src/Libraries/AvalonEdit/ICSharpCode.AvalonEdit/Rendering/VisualLine.cs +++ b/src/Libraries/AvalonEdit/ICSharpCode.AvalonEdit/Rendering/VisualLine.cs @@ -548,6 +548,15 @@ namespace ICSharpCode.AvalonEdit.Rendering return ch.FirstCharacterIndex; } + /// + /// Gets the text view position from the specified visual column. + /// + public TextViewPosition GetTextViewPosition(int visualColumn) + { + int documentOffset = GetRelativeOffset(visualColumn) + this.FirstDocumentLine.Offset; + return new TextViewPosition(this.Document.GetLocation(documentOffset), visualColumn); + } + /// /// Gets the text view position from the specified visual position. /// If the position is within a character, it is rounded to the next character boundary. @@ -690,12 +699,12 @@ namespace ICSharpCode.AvalonEdit.Rendering static bool HasStopsInVirtualSpace(CaretPositioningMode mode) { - return mode == CaretPositioningMode.Normal; + return mode == CaretPositioningMode.Normal || mode == CaretPositioningMode.EveryCodepoint; } static bool HasImplicitStopAtLineStart(CaretPositioningMode mode) { - return mode == CaretPositioningMode.Normal; + return mode == CaretPositioningMode.Normal || mode == CaretPositioningMode.EveryCodepoint; } [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA1801:ReviewUnusedParameters", MessageId = "mode", From ebb5d25c354b9016d21583ed5c1271d3050ecc18 Mon Sep 17 00:00:00 2001 From: Daniel Grunwald Date: Thu, 30 May 2013 16:05:53 +0200 Subject: [PATCH 13/17] Backspace now deletes only a single combining mark. Backspace no longer is equivalent to Shift+Left followed by Delete. Caret movement with Shift+Left will select the whole grapheme; only backspace can be used to delete part of a grapheme. --- .../Utils/CaretNavigationTests.cs | 16 ++ .../Editing/CaretNavigationCommandHandler.cs | 200 +++++++++--------- .../Editing/EditingCommandHandler.cs | 48 ++--- .../Editing/SimpleSelection.cs | 16 +- 4 files changed, 146 insertions(+), 134 deletions(-) diff --git a/src/Libraries/AvalonEdit/ICSharpCode.AvalonEdit.Tests/Utils/CaretNavigationTests.cs b/src/Libraries/AvalonEdit/ICSharpCode.AvalonEdit.Tests/Utils/CaretNavigationTests.cs index 8439d5f2ad..366e0671ff 100644 --- a/src/Libraries/AvalonEdit/ICSharpCode.AvalonEdit.Tests/Utils/CaretNavigationTests.cs +++ b/src/Libraries/AvalonEdit/ICSharpCode.AvalonEdit.Tests/Utils/CaretNavigationTests.cs @@ -113,5 +113,21 @@ namespace ICSharpCode.AvalonEdit.Utils Assert.AreEqual(5, GetPrevCaretStop(c, 6, CaretPositioningMode.WordBorder)); Assert.AreEqual(1, GetPrevCaretStop(c, 5, CaretPositioningMode.WordBorder)); } + + [Test] + public void CombiningMark() + { + string str = " x͆ "; + Assert.AreEqual(3, GetNextCaretStop(str, 1, CaretPositioningMode.Normal)); + Assert.AreEqual(1, GetPrevCaretStop(str, 3, CaretPositioningMode.Normal)); + } + + [Test] + public void StackedCombiningMark() + { + string str = " x͆͆͆͆ "; + Assert.AreEqual(6, GetNextCaretStop(str, 1, CaretPositioningMode.Normal)); + Assert.AreEqual(1, GetPrevCaretStop(str, 6, CaretPositioningMode.Normal)); + } } } diff --git a/src/Libraries/AvalonEdit/ICSharpCode.AvalonEdit/Editing/CaretNavigationCommandHandler.cs b/src/Libraries/AvalonEdit/ICSharpCode.AvalonEdit/Editing/CaretNavigationCommandHandler.cs index 8c0774d60f..03a4598beb 100644 --- a/src/Libraries/AvalonEdit/ICSharpCode.AvalonEdit/Editing/CaretNavigationCommandHandler.cs +++ b/src/Libraries/AvalonEdit/ICSharpCode.AvalonEdit/Editing/CaretNavigationCommandHandler.cs @@ -15,6 +15,24 @@ using ICSharpCode.AvalonEdit.Utils; namespace ICSharpCode.AvalonEdit.Editing { + enum CaretMovementType + { + None, + CharLeft, + CharRight, + Backspace, + WordLeft, + WordRight, + LineUp, + LineDown, + PageUp, + PageDown, + LineStart, + LineEnd, + DocumentStart, + DocumentEnd + } + static class CaretNavigationCommandHandler { /// @@ -102,22 +120,6 @@ namespace ICSharpCode.AvalonEdit.Editing return target as TextArea; } - enum CaretMovementType - { - CharLeft, - CharRight, - WordLeft, - WordRight, - LineUp, - LineDown, - PageUp, - PageDown, - LineStart, - LineEnd, - DocumentStart, - DocumentEnd - } - static ExecutedRoutedEventHandler OnMoveCaret(CaretMovementType direction) { return (target, args) => { @@ -140,8 +142,7 @@ namespace ICSharpCode.AvalonEdit.Editing TextViewPosition oldPosition = textArea.Caret.Position; MoveCaret(textArea, direction); textArea.Selection = textArea.Selection.StartSelectionOrSetEndpoint(oldPosition, textArea.Caret.Position); - if (!textArea.Document.IsInUpdate) // if we're inside a larger update (e.g. called by EditingCommandHandler.OnDelete()), avoid calculating the caret rectangle now - textArea.Caret.BringCaretToView(); + textArea.Caret.BringCaretToView(); } }; } @@ -172,43 +173,55 @@ namespace ICSharpCode.AvalonEdit.Editing } #region Caret movement - static void MoveCaret(TextArea textArea, CaretMovementType direction) + internal static void MoveCaret(TextArea textArea, CaretMovementType direction) { - DocumentLine caretLine = textArea.Document.GetLineByNumber(textArea.Caret.Line); - VisualLine visualLine = textArea.TextView.GetOrConstructVisualLine(caretLine); - TextViewPosition caretPosition = textArea.Caret.Position; + double desiredXPos = textArea.Caret.DesiredXPos; + textArea.Caret.Position = GetNewCaretPosition(textArea.TextView, textArea.Caret.Position, direction, textArea.Selection.EnableVirtualSpace, ref desiredXPos); + textArea.Caret.DesiredXPos = desiredXPos; + } + + internal static TextViewPosition GetNewCaretPosition(TextView textView, TextViewPosition caretPosition, CaretMovementType direction, bool enableVirtualSpace, ref double desiredXPos) + { + switch (direction) { + case CaretMovementType.None: + return caretPosition; + case CaretMovementType.DocumentStart: + desiredXPos = double.NaN; + return new TextViewPosition(0, 0); + case CaretMovementType.DocumentEnd: + desiredXPos = double.NaN; + return new TextViewPosition(textView.Document.GetLocation(textView.Document.TextLength)); + } + DocumentLine caretLine = textView.Document.GetLineByNumber(caretPosition.Line); + VisualLine visualLine = textView.GetOrConstructVisualLine(caretLine); TextLine textLine = visualLine.GetTextLine(caretPosition.VisualColumn, caretPosition.IsAtEndOfLine); switch (direction) { case CaretMovementType.CharLeft: - MoveCaretLeft(textArea, caretPosition, visualLine, CaretPositioningMode.Normal); - break; + desiredXPos = double.NaN; + return GetPrevCaretPosition(textView, caretPosition, visualLine, CaretPositioningMode.Normal, enableVirtualSpace); + case CaretMovementType.Backspace: + desiredXPos = double.NaN; + return GetPrevCaretPosition(textView, caretPosition, visualLine, CaretPositioningMode.EveryCodepoint, enableVirtualSpace); case CaretMovementType.CharRight: - MoveCaretRight(textArea, caretPosition, visualLine, CaretPositioningMode.Normal); - break; + desiredXPos = double.NaN; + return GetNextCaretPosition(textView, caretPosition, visualLine, CaretPositioningMode.Normal, enableVirtualSpace); case CaretMovementType.WordLeft: - MoveCaretLeft(textArea, caretPosition, visualLine, CaretPositioningMode.WordStart); - break; + desiredXPos = double.NaN; + return GetPrevCaretPosition(textView, caretPosition, visualLine, CaretPositioningMode.WordStart, enableVirtualSpace); case CaretMovementType.WordRight: - MoveCaretRight(textArea, caretPosition, visualLine, CaretPositioningMode.WordStart); - break; + desiredXPos = double.NaN; + return GetNextCaretPosition(textView, caretPosition, visualLine, CaretPositioningMode.WordStart, enableVirtualSpace); case CaretMovementType.LineUp: case CaretMovementType.LineDown: case CaretMovementType.PageUp: case CaretMovementType.PageDown: - MoveCaretUpDown(textArea, direction, visualLine, textLine, caretPosition.VisualColumn); - break; - case CaretMovementType.DocumentStart: - SetCaretPosition(textArea, 0, 0); - break; - case CaretMovementType.DocumentEnd: - SetCaretPosition(textArea, -1, textArea.Document.TextLength); - break; + return GetUpDownCaretPosition(textView, caretPosition, direction, visualLine, textLine, enableVirtualSpace, ref desiredXPos); case CaretMovementType.LineStart: - MoveCaretToStartOfLine(textArea, visualLine, textLine); - break; + desiredXPos = double.NaN; + return GetStartOfLineCaretPosition(caretPosition.VisualColumn, visualLine, textLine, enableVirtualSpace); case CaretMovementType.LineEnd: - MoveCaretToEndOfLine(textArea, visualLine, textLine); - break; + desiredXPos = double.NaN; + return GetEndOfLineCaretPosition(visualLine, textLine); default: throw new NotSupportedException(direction.ToString()); } @@ -216,81 +229,80 @@ namespace ICSharpCode.AvalonEdit.Editing #endregion #region Home/End - static void MoveCaretToStartOfLine(TextArea textArea, VisualLine visualLine, TextLine textLine) + static TextViewPosition GetStartOfLineCaretPosition(int oldVC, VisualLine visualLine, TextLine textLine, bool enableVirtualSpace) { int newVC = visualLine.GetTextLineVisualStartColumn(textLine); if (newVC == 0) - newVC = visualLine.GetNextCaretPosition(newVC - 1, LogicalDirection.Forward, CaretPositioningMode.WordStart, textArea.Selection.EnableVirtualSpace); + newVC = visualLine.GetNextCaretPosition(newVC - 1, LogicalDirection.Forward, CaretPositioningMode.WordStart, enableVirtualSpace); if (newVC < 0) throw ThrowUtil.NoValidCaretPosition(); // when the caret is already at the start of the text, jump to start before whitespace - if (newVC == textArea.Caret.VisualColumn) + if (newVC == oldVC) newVC = 0; - int offset = visualLine.FirstDocumentLine.Offset + visualLine.GetRelativeOffset(newVC); - SetCaretPosition(textArea, newVC, offset); + return visualLine.GetTextViewPosition(newVC); } - static void MoveCaretToEndOfLine(TextArea textArea, VisualLine visualLine, TextLine textLine) + static TextViewPosition GetEndOfLineCaretPosition(VisualLine visualLine, TextLine textLine) { int newVC = visualLine.GetTextLineVisualStartColumn(textLine) + textLine.Length - textLine.TrailingWhitespaceLength; - int offset = visualLine.FirstDocumentLine.Offset + visualLine.GetRelativeOffset(newVC); - SetCaretPosition(textArea, newVC, offset, isAtEndOfLine: true); + TextViewPosition pos = visualLine.GetTextViewPosition(newVC); + pos.IsAtEndOfLine = true; + return pos; } #endregion #region By-character / By-word movement - static void MoveCaretRight(TextArea textArea, TextViewPosition caretPosition, VisualLine visualLine, CaretPositioningMode mode) + static TextViewPosition GetNextCaretPosition(TextView textView, TextViewPosition caretPosition, VisualLine visualLine, CaretPositioningMode mode, bool enableVirtualSpace) { - int pos = visualLine.GetNextCaretPosition(caretPosition.VisualColumn, LogicalDirection.Forward, mode, textArea.Selection.EnableVirtualSpace); + int pos = visualLine.GetNextCaretPosition(caretPosition.VisualColumn, LogicalDirection.Forward, mode, enableVirtualSpace); if (pos >= 0) { - SetCaretPosition(textArea, pos, visualLine.GetRelativeOffset(pos) + visualLine.FirstDocumentLine.Offset); + return visualLine.GetTextViewPosition(pos); } else { // move to start of next line DocumentLine nextDocumentLine = visualLine.LastDocumentLine.NextLine; if (nextDocumentLine != null) { - VisualLine nextLine = textArea.TextView.GetOrConstructVisualLine(nextDocumentLine); - pos = nextLine.GetNextCaretPosition(-1, LogicalDirection.Forward, mode, textArea.Selection.EnableVirtualSpace); + VisualLine nextLine = textView.GetOrConstructVisualLine(nextDocumentLine); + pos = nextLine.GetNextCaretPosition(-1, LogicalDirection.Forward, mode, enableVirtualSpace); if (pos < 0) throw ThrowUtil.NoValidCaretPosition(); - SetCaretPosition(textArea, pos, nextLine.GetRelativeOffset(pos) + nextLine.FirstDocumentLine.Offset); + return nextLine.GetTextViewPosition(pos); } else { // at end of document - Debug.Assert(visualLine.LastDocumentLine.Offset + visualLine.LastDocumentLine.TotalLength == textArea.Document.TextLength); - SetCaretPosition(textArea, -1, textArea.Document.TextLength); + Debug.Assert(visualLine.LastDocumentLine.Offset + visualLine.LastDocumentLine.TotalLength == textView.Document.TextLength); + return new TextViewPosition(textView.Document.GetLocation(textView.Document.TextLength)); } } } - static void MoveCaretLeft(TextArea textArea, TextViewPosition caretPosition, VisualLine visualLine, CaretPositioningMode mode) + static TextViewPosition GetPrevCaretPosition(TextView textView, TextViewPosition caretPosition, VisualLine visualLine, CaretPositioningMode mode, bool enableVirtualSpace) { - int pos = visualLine.GetNextCaretPosition(caretPosition.VisualColumn, LogicalDirection.Backward, mode, textArea.Selection.EnableVirtualSpace); + int pos = visualLine.GetNextCaretPosition(caretPosition.VisualColumn, LogicalDirection.Backward, mode, enableVirtualSpace); if (pos >= 0) { - SetCaretPosition(textArea, pos, visualLine.GetRelativeOffset(pos) + visualLine.FirstDocumentLine.Offset); + return visualLine.GetTextViewPosition(pos); } else { // move to end of previous line DocumentLine previousDocumentLine = visualLine.FirstDocumentLine.PreviousLine; if (previousDocumentLine != null) { - VisualLine previousLine = textArea.TextView.GetOrConstructVisualLine(previousDocumentLine); - pos = previousLine.GetNextCaretPosition(previousLine.VisualLength + 1, LogicalDirection.Backward, mode, textArea.Selection.EnableVirtualSpace); + VisualLine previousLine = textView.GetOrConstructVisualLine(previousDocumentLine); + pos = previousLine.GetNextCaretPosition(previousLine.VisualLength + 1, LogicalDirection.Backward, mode, enableVirtualSpace); if (pos < 0) throw ThrowUtil.NoValidCaretPosition(); - SetCaretPosition(textArea, pos, previousLine.GetRelativeOffset(pos) + previousLine.FirstDocumentLine.Offset); + return previousLine.GetTextViewPosition(pos); } else { // at start of document Debug.Assert(visualLine.FirstDocumentLine.Offset == 0); - SetCaretPosition(textArea, 0, 0); + return new TextViewPosition(0, 0); } } } #endregion #region Line+Page up/down - static void MoveCaretUpDown(TextArea textArea, CaretMovementType direction, VisualLine visualLine, TextLine textLine, int caretVisualColumn) + static TextViewPosition GetUpDownCaretPosition(TextView textView, TextViewPosition caretPosition, CaretMovementType direction, VisualLine visualLine, TextLine textLine, bool enableVirtualSpace, ref double xPos) { // moving up/down happens using the desired visual X position - double xPos = textArea.Caret.DesiredXPos; if (double.IsNaN(xPos)) - xPos = visualLine.GetTextLineVisualXPosition(textLine, caretVisualColumn); + xPos = visualLine.GetTextLineVisualXPosition(textLine, caretPosition.VisualColumn); // now find the TextLine+VisualLine where the caret will end up in VisualLine targetVisualLine = visualLine; TextLine targetLine; @@ -304,8 +316,8 @@ namespace ICSharpCode.AvalonEdit.Editing if (textLineIndex > 0) { targetLine = visualLine.TextLines[textLineIndex - 1]; } else if (prevLineNumber >= 1) { - DocumentLine prevLine = textArea.Document.GetLineByNumber(prevLineNumber); - targetVisualLine = textArea.TextView.GetOrConstructVisualLine(prevLine); + DocumentLine prevLine = textView.Document.GetLineByNumber(prevLineNumber); + targetVisualLine = textView.GetOrConstructVisualLine(prevLine); targetLine = targetVisualLine.TextLines[targetVisualLine.TextLines.Count - 1]; } else { targetLine = null; @@ -319,9 +331,9 @@ namespace ICSharpCode.AvalonEdit.Editing int nextLineNumber = visualLine.LastDocumentLine.LineNumber + 1; if (textLineIndex < visualLine.TextLines.Count - 1) { targetLine = visualLine.TextLines[textLineIndex + 1]; - } else if (nextLineNumber <= textArea.Document.LineCount) { - DocumentLine nextLine = textArea.Document.GetLineByNumber(nextLineNumber); - targetVisualLine = textArea.TextView.GetOrConstructVisualLine(nextLine); + } else if (nextLineNumber <= textView.Document.LineCount) { + DocumentLine nextLine = textView.Document.GetLineByNumber(nextLineNumber); + targetVisualLine = textView.GetOrConstructVisualLine(nextLine); targetLine = targetVisualLine.TextLines[0]; } else { targetLine = null; @@ -334,11 +346,11 @@ namespace ICSharpCode.AvalonEdit.Editing // Page up/down: find the target line using its visual position double yPos = visualLine.GetTextLineVisualYPosition(textLine, VisualYPosition.LineMiddle); if (direction == CaretMovementType.PageUp) - yPos -= textArea.TextView.RenderSize.Height; + yPos -= textView.RenderSize.Height; else - yPos += textArea.TextView.RenderSize.Height; - DocumentLine newLine = textArea.TextView.GetDocumentLineByVisualTop(yPos); - targetVisualLine = textArea.TextView.GetOrConstructVisualLine(newLine); + yPos += textView.RenderSize.Height; + DocumentLine newLine = textView.GetDocumentLineByVisualTop(yPos); + targetVisualLine = textView.GetOrConstructVisualLine(newLine); targetLine = targetVisualLine.GetTextLineByVisualYPosition(yPos); break; } @@ -347,30 +359,18 @@ namespace ICSharpCode.AvalonEdit.Editing } if (targetLine != null) { double yPos = targetVisualLine.GetTextLineVisualYPosition(targetLine, VisualYPosition.LineMiddle); - int newVisualColumn = targetVisualLine.GetVisualColumn(new Point(xPos, yPos), textArea.Selection.EnableVirtualSpace); - SetCaretPosition(textArea, targetVisualLine, targetLine, newVisualColumn, false); - textArea.Caret.DesiredXPos = xPos; - } - } - #endregion - - #region SetCaretPosition - static void SetCaretPosition(TextArea textArea, VisualLine targetVisualLine, TextLine targetLine, - int newVisualColumn, bool allowWrapToNextLine) - { - int targetLineStartCol = targetVisualLine.GetTextLineVisualStartColumn(targetLine); - if (!allowWrapToNextLine && newVisualColumn >= targetLineStartCol + targetLine.Length) { - if (newVisualColumn <= targetVisualLine.VisualLength) - newVisualColumn = targetLineStartCol + targetLine.Length - 1; + int newVisualColumn = targetVisualLine.GetVisualColumn(new Point(xPos, yPos), enableVirtualSpace); + + // prevent wrapping to the next line; TODO: could 'IsAtEnd' help here? + int targetLineStartCol = targetVisualLine.GetTextLineVisualStartColumn(targetLine); + if (newVisualColumn >= targetLineStartCol + targetLine.Length) { + if (newVisualColumn <= targetVisualLine.VisualLength) + newVisualColumn = targetLineStartCol + targetLine.Length - 1; + } + return targetVisualLine.GetTextViewPosition(newVisualColumn); + } else { + return caretPosition; } - int newOffset = targetVisualLine.GetRelativeOffset(newVisualColumn) + targetVisualLine.FirstDocumentLine.Offset; - SetCaretPosition(textArea, newVisualColumn, newOffset); - } - - static void SetCaretPosition(TextArea textArea, int newVisualColumn, int newOffset, bool isAtEndOfLine = false) - { - textArea.Caret.Position = new TextViewPosition(textArea.Document.GetLocation(newOffset), newVisualColumn) { IsAtEndOfLine = isAtEndOfLine }; - textArea.Caret.DesiredXPos = double.NaN; } #endregion } diff --git a/src/Libraries/AvalonEdit/ICSharpCode.AvalonEdit/Editing/EditingCommandHandler.cs b/src/Libraries/AvalonEdit/ICSharpCode.AvalonEdit/Editing/EditingCommandHandler.cs index f7cbb167ff..204489208e 100644 --- a/src/Libraries/AvalonEdit/ICSharpCode.AvalonEdit/Editing/EditingCommandHandler.cs +++ b/src/Libraries/AvalonEdit/ICSharpCode.AvalonEdit/Editing/EditingCommandHandler.cs @@ -46,12 +46,12 @@ namespace ICSharpCode.AvalonEdit.Editing static EditingCommandHandler() { - CommandBindings.Add(new CommandBinding(ApplicationCommands.Delete, OnDelete(ApplicationCommands.NotACommand), CanDelete)); - AddBinding(EditingCommands.Delete, ModifierKeys.None, Key.Delete, OnDelete(EditingCommands.SelectRightByCharacter)); - AddBinding(EditingCommands.DeleteNextWord, ModifierKeys.Control, Key.Delete, OnDelete(EditingCommands.SelectRightByWord)); - AddBinding(EditingCommands.Backspace, ModifierKeys.None, Key.Back, OnDelete(EditingCommands.SelectLeftByCharacter)); + CommandBindings.Add(new CommandBinding(ApplicationCommands.Delete, OnDelete(CaretMovementType.None), CanDelete)); + AddBinding(EditingCommands.Delete, ModifierKeys.None, Key.Delete, OnDelete(CaretMovementType.CharRight)); + AddBinding(EditingCommands.DeleteNextWord, ModifierKeys.Control, Key.Delete, OnDelete(CaretMovementType.WordRight)); + AddBinding(EditingCommands.Backspace, ModifierKeys.None, Key.Back, OnDelete(CaretMovementType.Backspace)); InputBindings.Add(TextAreaDefaultInputHandler.CreateFrozenKeyBinding(EditingCommands.Backspace, ModifierKeys.Shift, Key.Back)); // make Shift-Backspace do the same as plain backspace - AddBinding(EditingCommands.DeletePreviousWord, ModifierKeys.Control, Key.Back, OnDelete(EditingCommands.SelectLeftByWord)); + AddBinding(EditingCommands.DeletePreviousWord, ModifierKeys.Control, Key.Back, OnDelete(CaretMovementType.WordLeft)); AddBinding(EditingCommands.EnterParagraphBreak, ModifierKeys.None, Key.Enter, OnEnter); AddBinding(EditingCommands.EnterLineBreak, ModifierKeys.Shift, Key.Enter, OnEnter); AddBinding(EditingCommands.TabForward, ModifierKeys.None, Key.Tab, OnTab); @@ -225,34 +225,24 @@ namespace ICSharpCode.AvalonEdit.Editing #endregion #region Delete - static ExecutedRoutedEventHandler OnDelete(RoutedUICommand selectingCommand) + static ExecutedRoutedEventHandler OnDelete(CaretMovementType caretMovement) { return (target, args) => { TextArea textArea = GetTextArea(target); if (textArea != null && textArea.Document != null) { - // call BeginUpdate before running the 'selectingCommand' - // so that undoing the delete does not select the deleted character - using (textArea.Document.RunUpdate()) { - if (textArea.Selection.IsEmpty) { - TextViewPosition oldCaretPosition = textArea.Caret.Position; - if (textArea.Caret.IsInVirtualSpace && selectingCommand == EditingCommands.SelectRightByCharacter) - EditingCommands.SelectRightByWord.Execute(args.Parameter, textArea); - else - selectingCommand.Execute(args.Parameter, textArea); - bool hasSomethingDeletable = false; - foreach (ISegment s in textArea.Selection.Segments) { - if (textArea.GetDeletableSegments(s).Length > 0) { - hasSomethingDeletable = true; - break; - } - } - if (!hasSomethingDeletable) { - // If nothing in the selection is deletable; then reset caret+selection - // to the previous value. This prevents the caret from moving through read-only sections. - textArea.Caret.Position = oldCaretPosition; - textArea.ClearSelection(); - } - } + if (textArea.Selection.IsEmpty) { + TextViewPosition startPos = textArea.Caret.Position; + bool enableVirtualSpace = textArea.Options.EnableVirtualSpace; + // When pressing delete; don't move the caret further into virtual space - instead delete the newline + if (caretMovement == CaretMovementType.CharRight) + enableVirtualSpace = false; + double desiredXPos = textArea.Caret.DesiredXPos; + TextViewPosition endPos = CaretNavigationCommandHandler.GetNewCaretPosition( + textArea.TextView, startPos, caretMovement, enableVirtualSpace, ref desiredXPos); + // Don't select the text to be deleted; just reuse the ReplaceSelectionWithText logic + var sel = new SimpleSelection(textArea, startPos, endPos); + sel.ReplaceSelectionWithText(string.Empty); + } else { textArea.RemoveSelectedText(); } textArea.Caret.BringCaretToView(); diff --git a/src/Libraries/AvalonEdit/ICSharpCode.AvalonEdit/Editing/SimpleSelection.cs b/src/Libraries/AvalonEdit/ICSharpCode.AvalonEdit/Editing/SimpleSelection.cs index 5f053b08ac..76e48d2cf6 100644 --- a/src/Libraries/AvalonEdit/ICSharpCode.AvalonEdit/Editing/SimpleSelection.cs +++ b/src/Libraries/AvalonEdit/ICSharpCode.AvalonEdit/Editing/SimpleSelection.cs @@ -55,10 +55,16 @@ namespace ICSharpCode.AvalonEdit.Editing if (segmentsToDelete[i].Offset == SurroundingSegment.Offset && segmentsToDelete[i].Length == SurroundingSegment.Length) { newText = AddSpacesIfRequired(newText, start, end); } - int vc = textArea.Caret.VisualColumn; - textArea.Caret.Offset = segmentsToDelete[i].EndOffset; - if (string.IsNullOrEmpty(newText)) - textArea.Caret.VisualColumn = vc; + if (string.IsNullOrEmpty(newText)) { + // place caret at the beginning of the selection + if (start.CompareTo(end) <= 0) + textArea.Caret.Position = start; + else + textArea.Caret.Position = end; + } else { + // place caret so that it ends up behind the new text + textArea.Caret.Offset = segmentsToDelete[i].EndOffset; + } textArea.Document.Replace(segmentsToDelete[i], newText); } else { textArea.Document.Remove(segmentsToDelete[i]); @@ -100,7 +106,7 @@ namespace ICSharpCode.AvalonEdit.Editing /// public override bool IsEmpty { - get { return startOffset == endOffset; } + get { return startOffset == endOffset && start.VisualColumn == end.VisualColumn; } } /// From 74af3970e7728b8fe79f572af9a82e752f05ae58 Mon Sep 17 00:00:00 2001 From: Andreas Weizel Date: Wed, 24 Jul 2013 00:59:25 +0200 Subject: [PATCH 14/17] Don't show context menu of usual AssemblyTreeNodes for DebuggerModuleTreeNodes. OpenFromGacDialog now using SD's default dialog style. --- .../Debugger/Debugger.AddIn/Pads/ClassBrowserSupport.cs | 5 +++++ .../SharpDevelop/Dom/ClassBrowser/OpenFromGacDialog.xaml | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/AddIns/Debugger/Debugger.AddIn/Pads/ClassBrowserSupport.cs b/src/AddIns/Debugger/Debugger.AddIn/Pads/ClassBrowserSupport.cs index 8bfd17cf10..c64f58d09a 100644 --- a/src/AddIns/Debugger/Debugger.AddIn/Pads/ClassBrowserSupport.cs +++ b/src/AddIns/Debugger/Debugger.AddIn/Pads/ClassBrowserSupport.cs @@ -135,6 +135,11 @@ namespace ICSharpCode.SharpDevelop.Gui.Pads } } + public override void ShowContextMenu() + { + // Don't show context menu as for usual AssemblyTreeNodes. + } + static IAssemblyModel CreateAssemblyModel(Module module) { // references?? diff --git a/src/Main/SharpDevelop/Dom/ClassBrowser/OpenFromGacDialog.xaml b/src/Main/SharpDevelop/Dom/ClassBrowser/OpenFromGacDialog.xaml index ae78f0982f..44117a28f2 100644 --- a/src/Main/SharpDevelop/Dom/ClassBrowser/OpenFromGacDialog.xaml +++ b/src/Main/SharpDevelop/Dom/ClassBrowser/OpenFromGacDialog.xaml @@ -4,7 +4,7 @@ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:core="http://icsharpcode.net/sharpdevelop/core" Title="Open From GAC" - Style="{DynamicResource DialogWindow}" + Style = "{x:Static core:GlobalStyles.DialogWindowStyle}" WindowStartupLocation="CenterOwner" ResizeMode="CanResizeWithGrip" MinWidth="200" From 50a5cb4274856fa9d4d54d99eac858c6ed5c03c7 Mon Sep 17 00:00:00 2001 From: Andreas Weizel Date: Wed, 24 Jul 2013 01:35:01 +0200 Subject: [PATCH 15/17] Added sub-node with error text for unresolved assemblies in ClassBrowser. Such assemblies also don't produce an error message anymore when opening ClassBrowserPad. --- .../ClassBrowser/AssemblyLoadErrorTreeNode.cs | 27 ++++++++++ .../Dom/ClassBrowser/AssemblyTreeNode.cs | 11 ++++ .../Project/ICSharpCode.SharpDevelop.csproj | 1 + .../Dom/ClassBrowser/ClassBrowserPad.cs | 54 +++++++++---------- .../SharpDevelop/Dom/ClassBrowser/Commands.cs | 36 ++++++------- 5 files changed, 82 insertions(+), 47 deletions(-) create mode 100644 src/Main/Base/Project/Dom/ClassBrowser/AssemblyLoadErrorTreeNode.cs diff --git a/src/Main/Base/Project/Dom/ClassBrowser/AssemblyLoadErrorTreeNode.cs b/src/Main/Base/Project/Dom/ClassBrowser/AssemblyLoadErrorTreeNode.cs new file mode 100644 index 0000000000..97ce410a1f --- /dev/null +++ b/src/Main/Base/Project/Dom/ClassBrowser/AssemblyLoadErrorTreeNode.cs @@ -0,0 +1,27 @@ +// Copyright (c) AlphaSierraPapa for the SharpDevelop Team (for details please see \doc\copyright.txt) +// This code is distributed under the GNU LGPL (for details please see \doc\license.txt) + +using System; +using System.Collections.Generic; +using ICSharpCode.Core.Presentation; +using ICSharpCode.TreeView; + +namespace ICSharpCode.SharpDevelop.Dom.ClassBrowser +{ + public class AssemblyLoadErrorTreeNode : SharpTreeNode + { + public override object Text { + get { + return "(Assembly not loadable)"; + } + } + + public override object Icon { + get { + return null; + } + } + } +} + + diff --git a/src/Main/Base/Project/Dom/ClassBrowser/AssemblyTreeNode.cs b/src/Main/Base/Project/Dom/ClassBrowser/AssemblyTreeNode.cs index ff499c969f..3f91079d7a 100644 --- a/src/Main/Base/Project/Dom/ClassBrowser/AssemblyTreeNode.cs +++ b/src/Main/Base/Project/Dom/ClassBrowser/AssemblyTreeNode.cs @@ -36,6 +36,17 @@ namespace ICSharpCode.SharpDevelop.Dom.ClassBrowser } } + protected override void LoadChildren() + { + Children.Clear(); + if (model.Context.IsValid) { + base.LoadChildren(); + } else { + // This assembly could not be loaded correctly, add sub-node with error text + Children.Add(new AssemblyLoadErrorTreeNode()); + } + } + public override object Text { get { return model.AssemblyName; diff --git a/src/Main/Base/Project/ICSharpCode.SharpDevelop.csproj b/src/Main/Base/Project/ICSharpCode.SharpDevelop.csproj index c787f8550f..91a1577bd1 100644 --- a/src/Main/Base/Project/ICSharpCode.SharpDevelop.csproj +++ b/src/Main/Base/Project/ICSharpCode.SharpDevelop.csproj @@ -84,6 +84,7 @@ + diff --git a/src/Main/SharpDevelop/Dom/ClassBrowser/ClassBrowserPad.cs b/src/Main/SharpDevelop/Dom/ClassBrowser/ClassBrowserPad.cs index 891508f62b..0148056215 100644 --- a/src/Main/SharpDevelop/Dom/ClassBrowser/ClassBrowserPad.cs +++ b/src/Main/SharpDevelop/Dom/ClassBrowser/ClassBrowserPad.cs @@ -217,44 +217,42 @@ namespace ICSharpCode.SharpDevelop.Dom.ClassBrowser } public static IAssemblyModel CreateAssemblyModelFromFile(string fileName) + { + var loader = new CecilLoader(); + loader.IncludeInternalMembers = true; + loader.LazyLoad = true; + var assembly = loader.LoadAssemblyFile(fileName); + + IEntityModelContext context = new AssemblyEntityModelContext(assembly); + IAssemblyModel model = SD.GetRequiredService().CreateAssemblyModel(context); + if (model is IUpdateableAssemblyModel) { + ((IUpdateableAssemblyModel)model).Update(EmptyList.Instance, assembly.TopLevelTypeDefinitions.ToList()); + ((IUpdateableAssemblyModel) model).AssemblyName = assembly.AssemblyName; + } + return model; + } + + static IAssemblyModel SafelyCreateAssemblyModelFromFile(string fileName) { try { - var loader = new CecilLoader(); - loader.IncludeInternalMembers = true; - loader.LazyLoad = true; - var assembly = loader.LoadAssemblyFile(fileName); - - IEntityModelContext context = new AssemblyEntityModelContext(assembly); - IAssemblyModel model = SD.GetRequiredService().CreateAssemblyModel(context); - if (model is IUpdateableAssemblyModel) { - ((IUpdateableAssemblyModel)model).Update(EmptyList.Instance, assembly.TopLevelTypeDefinitions.ToList()); - ((IUpdateableAssemblyModel) model).AssemblyName = assembly.AssemblyName; + return CreateAssemblyModelFromFile(fileName); + } catch (Exception) { + // Special AssemblyModel for unresolved file references + IEntityModelContext unresolvedContext = new UnresolvedAssemblyEntityModelContext(Path.GetFileName(fileName), fileName); + IAssemblyModel unresolvedModel = SD.GetRequiredService().CreateAssemblyModel(unresolvedContext); + if (unresolvedModel is IUpdateableAssemblyModel) { + ((IUpdateableAssemblyModel) unresolvedModel).AssemblyName = unresolvedContext.AssemblyName; } - return model; - } catch (BadImageFormatException ex) { - SD.MessageService.ShowWarningFormatted("{0} is not a valid .NET assembly.", Path.GetFileName(fileName)); - } catch (FileNotFoundException ex) { - SD.MessageService.ShowWarningFormatted("{0} is not accessible or doesn't exist anymore.", fileName); - } - - // AssemblyModel for unresolved file references - IEntityModelContext unresolvedContext = new UnresolvedAssemblyEntityModelContext(Path.GetFileName(fileName), fileName); - IAssemblyModel unresolvedModel = SD.GetRequiredService().CreateAssemblyModel(unresolvedContext); - if (unresolvedModel is IUpdateableAssemblyModel) { - ((IUpdateableAssemblyModel) unresolvedModel).AssemblyName = unresolvedContext.AssemblyName; + + return unresolvedModel; } - - return unresolvedModel; } void AppendAssemblyFileToList(string assemblyFile) { - IAssemblyModel assemblyModel = CreateAssemblyModelFromFile(assemblyFile); + IAssemblyModel assemblyModel = SafelyCreateAssemblyModelFromFile(assemblyFile); if (assemblyModel != null) { AssemblyList.Assemblies.Add(assemblyModel); - } else { - // TODO Throw exception? - } } diff --git a/src/Main/SharpDevelop/Dom/ClassBrowser/Commands.cs b/src/Main/SharpDevelop/Dom/ClassBrowser/Commands.cs index 7496f03f0b..3e549efa4d 100644 --- a/src/Main/SharpDevelop/Dom/ClassBrowser/Commands.cs +++ b/src/Main/SharpDevelop/Dom/ClassBrowser/Commands.cs @@ -9,7 +9,7 @@ using Microsoft.Win32; namespace ICSharpCode.SharpDevelop.Dom.ClassBrowser { /// - /// Description of OpenAssemblyFromFileCommand. + /// OpenAssemblyFromFileCommand. /// class OpenAssemblyFromFileCommand : SimpleCommand { @@ -23,14 +23,20 @@ namespace ICSharpCode.SharpDevelop.Dom.ClassBrowser openFileDialog.CheckPathExists = true; if (openFileDialog.ShowDialog() ?? false) { - classBrowser.AssemblyList.Assemblies.Add(ClassBrowserPad.CreateAssemblyModelFromFile(openFileDialog.FileName)); + try { + classBrowser.AssemblyList.Assemblies.Add(ClassBrowserPad.CreateAssemblyModelFromFile(openFileDialog.FileName)); + } catch (BadImageFormatException) { + SD.MessageService.ShowWarningFormatted("{0} is not a valid .NET assembly.", Path.GetFileName(openFileDialog.FileName)); + } catch (FileNotFoundException) { + SD.MessageService.ShowWarningFormatted("{0} is not accessible or doesn't exist anymore.", openFileDialog.FileName); + } } } } } /// - /// Description of OpenAssemblyFromGACCommand. + /// OpenAssemblyFromGACCommand. /// class OpenAssemblyFromGACCommand : SimpleCommand { @@ -42,7 +48,13 @@ namespace ICSharpCode.SharpDevelop.Dom.ClassBrowser if (gacDialog.ShowDialog() ?? false) { foreach (string assemblyFile in gacDialog.SelectedFileNames) { - classBrowser.AssemblyList.Assemblies.Add(ClassBrowserPad.CreateAssemblyModelFromFile(assemblyFile)); + try { + classBrowser.AssemblyList.Assemblies.Add(ClassBrowserPad.CreateAssemblyModelFromFile(assemblyFile)); + } catch (BadImageFormatException) { + SD.MessageService.ShowWarningFormatted("{0} is not a valid .NET assembly.", Path.GetFileName(assemblyFile)); + } catch (FileNotFoundException) { + SD.MessageService.ShowWarningFormatted("{0} is not accessible or doesn't exist anymore.", assemblyFile); + } } } } @@ -50,7 +62,7 @@ namespace ICSharpCode.SharpDevelop.Dom.ClassBrowser } /// - /// Description of RemoveAssemblyCommand. + /// RemoveAssemblyCommand. /// class RemoveAssemblyCommand : SimpleCommand { @@ -68,18 +80,4 @@ namespace ICSharpCode.SharpDevelop.Dom.ClassBrowser } } } - - /// - /// Description of RemoveAssemblyCommand. - /// - class ClassBrowserCollapseAllCommand : SimpleCommand - { - public override void Execute(object parameter) - { -// var classBrowser = SD.GetService() as ClassBrowserPad; -// if (classBrowser != null) { -// classBrowser.TreeView -// } - } - } } From 3c4c5a34226cabe8dfd91039a8febe6ec44b2d94 Mon Sep 17 00:00:00 2001 From: Andreas Weizel Date: Thu, 25 Jul 2013 21:47:18 +0200 Subject: [PATCH 16/17] Some refactoring in ClassBrowser. --- .../Dom/ClassBrowser/ClassBrowserPad.cs | 26 ++++++++++++++++++- .../SharpDevelop/Dom/ClassBrowser/Commands.cs | 20 +++++--------- 2 files changed, 31 insertions(+), 15 deletions(-) diff --git a/src/Main/SharpDevelop/Dom/ClassBrowser/ClassBrowserPad.cs b/src/Main/SharpDevelop/Dom/ClassBrowser/ClassBrowserPad.cs index 0148056215..1c536d2306 100644 --- a/src/Main/SharpDevelop/Dom/ClassBrowser/ClassBrowserPad.cs +++ b/src/Main/SharpDevelop/Dom/ClassBrowser/ClassBrowserPad.cs @@ -217,6 +217,30 @@ namespace ICSharpCode.SharpDevelop.Dom.ClassBrowser } public static IAssemblyModel CreateAssemblyModelFromFile(string fileName) + { + try { + var loader = new CecilLoader(); + loader.IncludeInternalMembers = true; + loader.LazyLoad = true; + var assembly = loader.LoadAssemblyFile(fileName); + + IEntityModelContext context = new AssemblyEntityModelContext(assembly); + IAssemblyModel model = SD.GetRequiredService().CreateAssemblyModel(context); + if (model is IUpdateableAssemblyModel) { + ((IUpdateableAssemblyModel)model).Update(EmptyList.Instance, assembly.TopLevelTypeDefinitions.ToList()); + ((IUpdateableAssemblyModel) model).AssemblyName = assembly.AssemblyName; + } + return model; + } catch (BadImageFormatException) { + SD.MessageService.ShowWarningFormatted("{0} is not a valid .NET assembly.", Path.GetFileName(fileName)); + } catch (FileNotFoundException) { + SD.MessageService.ShowWarningFormatted("{0} is not accessible or doesn't exist anymore.", fileName); + } + + return null; + } + + static IAssemblyModel CreateAssemblyModelOrThrowException(string fileName) { var loader = new CecilLoader(); loader.IncludeInternalMembers = true; @@ -235,7 +259,7 @@ namespace ICSharpCode.SharpDevelop.Dom.ClassBrowser static IAssemblyModel SafelyCreateAssemblyModelFromFile(string fileName) { try { - return CreateAssemblyModelFromFile(fileName); + return CreateAssemblyModelOrThrowException(fileName); } catch (Exception) { // Special AssemblyModel for unresolved file references IEntityModelContext unresolvedContext = new UnresolvedAssemblyEntityModelContext(Path.GetFileName(fileName), fileName); diff --git a/src/Main/SharpDevelop/Dom/ClassBrowser/Commands.cs b/src/Main/SharpDevelop/Dom/ClassBrowser/Commands.cs index 3e549efa4d..000d46a701 100644 --- a/src/Main/SharpDevelop/Dom/ClassBrowser/Commands.cs +++ b/src/Main/SharpDevelop/Dom/ClassBrowser/Commands.cs @@ -23,13 +23,9 @@ namespace ICSharpCode.SharpDevelop.Dom.ClassBrowser openFileDialog.CheckPathExists = true; if (openFileDialog.ShowDialog() ?? false) { - try { - classBrowser.AssemblyList.Assemblies.Add(ClassBrowserPad.CreateAssemblyModelFromFile(openFileDialog.FileName)); - } catch (BadImageFormatException) { - SD.MessageService.ShowWarningFormatted("{0} is not a valid .NET assembly.", Path.GetFileName(openFileDialog.FileName)); - } catch (FileNotFoundException) { - SD.MessageService.ShowWarningFormatted("{0} is not accessible or doesn't exist anymore.", openFileDialog.FileName); - } + IAssemblyModel assemblyModel = ClassBrowserPad.CreateAssemblyModelFromFile(openFileDialog.FileName); + if (assemblyModel != null) + classBrowser.AssemblyList.Assemblies.Add(assemblyModel); } } } @@ -48,13 +44,9 @@ namespace ICSharpCode.SharpDevelop.Dom.ClassBrowser if (gacDialog.ShowDialog() ?? false) { foreach (string assemblyFile in gacDialog.SelectedFileNames) { - try { - classBrowser.AssemblyList.Assemblies.Add(ClassBrowserPad.CreateAssemblyModelFromFile(assemblyFile)); - } catch (BadImageFormatException) { - SD.MessageService.ShowWarningFormatted("{0} is not a valid .NET assembly.", Path.GetFileName(assemblyFile)); - } catch (FileNotFoundException) { - SD.MessageService.ShowWarningFormatted("{0} is not accessible or doesn't exist anymore.", assemblyFile); - } + IAssemblyModel assemblyModel = ClassBrowserPad.CreateAssemblyModelFromFile(assemblyFile); + if (assemblyModel != null) + classBrowser.AssemblyList.Assemblies.Add(assemblyModel); } } } From b60f7f66fe7f37518dd164ef39d94f24b18b2693 Mon Sep 17 00:00:00 2001 From: Andreas Weizel Date: Thu, 25 Jul 2013 22:13:26 +0200 Subject: [PATCH 17/17] Nested types in ClassBrowser. --- .../Base/Project/Dom/ClassBrowser/TypeDefinitionTreeNode.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Main/Base/Project/Dom/ClassBrowser/TypeDefinitionTreeNode.cs b/src/Main/Base/Project/Dom/ClassBrowser/TypeDefinitionTreeNode.cs index 7141734783..aaab2f62ac 100644 --- a/src/Main/Base/Project/Dom/ClassBrowser/TypeDefinitionTreeNode.cs +++ b/src/Main/Base/Project/Dom/ClassBrowser/TypeDefinitionTreeNode.cs @@ -3,10 +3,12 @@ using System; using System.Collections.Generic; +using System.Security.Policy; using ICSharpCode.Core.Presentation; using ICSharpCode.NRefactory.TypeSystem; using ICSharpCode.NRefactory.Utils; using ICSharpCode.TreeView; +using ICSharpCode.SharpDevelop.Dom; namespace ICSharpCode.SharpDevelop.Dom.ClassBrowser { @@ -48,7 +50,7 @@ namespace ICSharpCode.SharpDevelop.Dom.ClassBrowser protected override IModelCollection ModelChildren { get { - return definition.Members; + return definition.NestedTypes.Concat(definition.Members); } }