[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/csharp-mode b11fcda 147/459: Imenu: Add support for int
From: |
ELPA Syncer |
Subject: |
[elpa] externals/csharp-mode b11fcda 147/459: Imenu: Add support for interface-prefixed methods. |
Date: |
Sun, 22 Aug 2021 13:59:15 -0400 (EDT) |
branch: externals/csharp-mode
commit b11fcda620aed46fbd4e702ee565448af26a1b25
Author: Jostein Kjønigsen <jostein@kjonigsen.net>
Commit: Jostein Kjønigsen <jostein@kjonigsen.net>
Imenu: Add support for interface-prefixed methods.
This fixes https://github.com/josteink/csharp-mode/issues/65
---
csharp-mode-tests.el | 9 +++++++++
csharp-mode.el | 1 +
test-files/imenu-interface-property-test.cs | 5 +++++
3 files changed, 15 insertions(+)
diff --git a/csharp-mode-tests.el b/csharp-mode-tests.el
index c24cea4..dde2d32 100644
--- a/csharp-mode-tests.el
+++ b/csharp-mode-tests.el
@@ -212,6 +212,15 @@
(should (string-match-p "prop IImenuTest.InterfaceString" imenu-items))
(kill-buffer buffer)))
+(ert-deftest imenu-parsing-supports-explicit-interface-methods ()
+ (let* ((find-file-hook nil) ;; avoid vc-mode file-hooks when opening!
+ (buffer (find-file-read-only
"./test-files/imenu-interface-property-test.cs"))
+ (imenu-index (csharp--imenu-create-index-helper nil "" t t)) ;;
same line as in `csharp-imenu-create-index'.
+ (class-entry (cl-caddr imenu-index))
+ (class-entries (cdr class-entry))
+ (imenu-items (mapconcat 'car class-entries " ")))
+ (should (string-match-p "method string MethodName" imenu-items))
+ (kill-buffer buffer)))
(ert-deftest imenu-parsing-supports-namespace ()
(let* ((find-file-hook nil) ;; avoid vc-mode file-hooks when opening!
(buffer (find-file-read-only
"./test-files/imenu-namespace-test.cs"))
diff --git a/csharp-mode.el b/csharp-mode.el
index 134a035..f8e67e9 100644
--- a/csharp-mode.el
+++ b/csharp-mode.el
@@ -1485,6 +1485,7 @@ Most other csharp functions are not instrumented.
"\\(?:override[ \t\n\r\f\v]+\\)?" ;; optional
"\\([[:alpha:]_][^\t\(\n]+\\)" ;; 2. return type -
possibly generic
"[ \t\n\r\f\v]+"
+ "\\(?:[A-Za-z_][[:alnum:]_]*\\.\\)*" ;; possible prefix
interface
"\\([[:alpha:]_][[:alnum:]_]*" ;; 3. begin name of func
"\\(?:<\\(?:[[:alpha:]][[:alnum:]]*\\)\\(?:[,
]+[[:alpha:]][[:alnum:]]*\\)*>\\)?" ;; (with optional generic type parameter(s)
"\\)" ;; 3. end of name of func
diff --git a/test-files/imenu-interface-property-test.cs
b/test-files/imenu-interface-property-test.cs
index 4818d56..2b98460 100644
--- a/test-files/imenu-interface-property-test.cs
+++ b/test-files/imenu-interface-property-test.cs
@@ -8,4 +8,9 @@ public interface IImenuTest
public class ImenuTest : IImenuTest
{
string IImenuTest.InterfaceString { get { return "i"; }}
+
+ string IIMenuTest.MethodName(string param1, int param2)
+ {
+
+ }
}
- [elpa] externals/csharp-mode 838727a 173/459: Ensure we get Emacs 24.4 for CI., (continued)
- [elpa] externals/csharp-mode 838727a 173/459: Ensure we get Emacs 24.4 for CI., ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode 405af61 076/459: Fix parsing of build-logs., ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode 1574d3e 085/459: Merge pull request #32 from binki/master, ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode f1a2e06 110/459: Add unit-test for fontification of compiler-directives., ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode 7856be4 123/459: Merge pull request #50 from syohex/workaround-18845, ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode 257602e 121/459: Test-file for https://github.com/josteink/csharp-mode/issues/46, ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode ef9d3f9 134/459: Update changelog., ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode 367ecc2 137/459: Clean up test-code., ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode e1a7622 138/459: Tenative fixes for compilation-mode., ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode 2ddd3c2 142/459: Merge pull request #62 from shoover/fontification-hang, ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode b11fcda 147/459: Imenu: Add support for interface-prefixed methods.,
ELPA Syncer <=
- [elpa] externals/csharp-mode bc3bd2a 155/459: Fix devenv.com output-parsing, ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode 9743156 158/459: Test-case for fontification error, ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode 57b2353 161/459: Bump version since we're working on vNext, ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode 682e394 162/459: Address issue with cc-mode in Emacs git master., ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode a631944 165/459: Make check-defuns a make-target., ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode ce2ff93 168/459: Make fontification-test assess-based., ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode 7fa38d2 170/459: Extend syntax propertize function for vliterals, ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode bd201c2 171/459: Remove now unused code, move log functions to top, ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode 15d2214 174/459: Clean up loading of dev-packages., ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode adb7928 175/459: New test-macros for assess., ELPA Syncer, 2021/08/22