[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/csharp-mode b8073ed 151/459: Imenu: correctly report na
From: |
ELPA Syncer |
Subject: |
[elpa] externals/csharp-mode b8073ed 151/459: Imenu: correctly report namespace for all types |
Date: |
Sun, 22 Aug 2021 13:59:16 -0400 (EDT) |
branch: externals/csharp-mode
commit b8073ede208699d32ccda46aae5215d127706289
Author: Jostein Kjønigsen <jostein@kjonigsen.net>
Commit: Jostein Kjønigsen <jostein@kjonigsen.net>
Imenu: correctly report namespace for all types
Previously interfaces would not get their containing namespace included
in imenu index-name. Same applied to enums.
These changes are preparations for adressing
https://github.com/josteink/csharp-mode/issues/60.
---
csharp-mode-tests.el | 9 +++++++++
csharp-mode.el | 19 +++++++++++--------
test-files/imenu-namespace-test.cs | 11 +++++++++++
3 files changed, 31 insertions(+), 8 deletions(-)
diff --git a/csharp-mode-tests.el b/csharp-mode-tests.el
index 6a0b128..8614bdc 100644
--- a/csharp-mode-tests.el
+++ b/csharp-mode-tests.el
@@ -223,6 +223,15 @@
(ns-item (car ns-entry)))
(should (string-match-p "namespace ImenuTest" ns-item))))
+(def-imenutest imenu-parsing-provides-types-with-namespace-names
+ "./test-files/imenu-namespace-test.cs" imenu-index
+ (let* ((ns-entry (cadr imenu-index))
+ (ns-items (cdr ns-entry))
+ (imenu-items (mapconcat 'car ns-items " ")))
+ (should (string-match-p "interface ImenuTest.ImenuTestInterface"
imenu-items))
+ (should (string-match-p "class ImenuTest.ImenuTestClass" imenu-items))
+ (should (string-match-p "enum ImenuTest.ImenuTestEnum" imenu-items))))
+
(defvar csharp-hook1 nil)
(defvar csharp-hook2 nil)
diff --git a/csharp-mode.el b/csharp-mode.el
index aa22c24..42c3c26 100644
--- a/csharp-mode.el
+++ b/csharp-mode.el
@@ -2448,14 +2448,17 @@ more open-curlies are found.
(csharp--on-enum-open-curly-p))
(setq consider-namespaces nil
consider-usings nil
- this-menu
- (append this-menu
- (list
- (cons (concat
- (match-string-no-properties 1) ;; thing
flavor
- " "
- (match-string-no-properties 2)) ;; intf name
- (match-beginning 1)))))
+ container-name (if parent-ns
+ (concat parent-ns ".")
+ nil)
+ this-menu (append this-menu
+ (list
+ (cons (concat
+ (match-string-no-properties 1) ;;
thing flavor
+ " "
+ container-name
+ (match-string-no-properties 2)) ;;
intf name
+ (match-beginning 1)))))
(forward-sexp 1))
diff --git a/test-files/imenu-namespace-test.cs
b/test-files/imenu-namespace-test.cs
index 3411281..1a922ca 100644
--- a/test-files/imenu-namespace-test.cs
+++ b/test-files/imenu-namespace-test.cs
@@ -2,4 +2,15 @@ using System;
namespace ImenuTest
{
+ public interface IMenuTestInterface
+ {
+ }
+
+ public class IMenuTestClass
+ {
+ }
+
+ public enum IMenuTestEnum
+ {
+ }
}
- [elpa] externals/csharp-mode d4c7a5c 086/459: Support compilation output from msbuild /maxcpucount (/m)., (continued)
- [elpa] externals/csharp-mode d4c7a5c 086/459: Support compilation output from msbuild /maxcpucount (/m)., ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode e277562 084/459: Set all as the default Makefile target., ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode 165d1f2 206/459: Fix indexing of generic methods., ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode 26737de 211/459: Fix build by cheating., ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode 7ced65e 225/459: Require cc-fonts, ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode 571c4c7 240/459: Stop misleading our poor users., ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode d72e5c6 242/459: Revert changes in changelog., ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode 0f39f84 122/459: Apply bug#18845 workaround, ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode 73e7ed6 125/459: Merge pull request #53 from ymarkovitch/master, ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode d01f22f 149/459: Imenu: fix interface-prefixed members, ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode b8073ed 151/459: Imenu: correctly report namespace for all types,
ELPA Syncer <=
- [elpa] externals/csharp-mode ed030e7 152/459: Ensure test-cases don't overlap., ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode c7932f9 156/459: Remove useless autoloads, ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode ee9125d 163/459: Fix looking-back warnings., ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode f9e95d1 167/459: Ensure tests reproduce fontification bugs., ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode ca394f1 188/459: imenu: Fix indexing of methods in test-file., ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode c206dbc 191/459: extern is a modifier-keyword, not "other" keyword., ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode a8d8ef8 195/459: imenu: Index delegates, ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode 897c85a 197/459: imenu: Fix indexing of delegates., ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode fe3ca7e 200/459: Inline square-parenthesis detection., ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode f9122bb 208/459: Fix indentation for array collection initializers., ELPA Syncer, 2021/08/22