Improve matching pattern for class name.
authorOleksandr Gavenko <gavenkoa@gmail.com>
Mon, 28 Jul 2014 15:26:58 +0300
changeset 1152 0654c471df55
parent 1151 350534cdf7be
child 1154 676a36b10cd3
Improve matching pattern for class name.
maven-central.el
--- a/maven-central.el	Mon Jul 28 15:07:52 2014 +0300
+++ b/maven-central.el	Mon Jul 28 15:26:58 2014 +0300
@@ -185,7 +185,7 @@
     (let (pkg cls)
       (re-search-forward "package +\\([[:alnum:]_.]+\\) *;" nil t)
       (setq pkg (match-string-no-properties 1))
-      (re-search-forward "class +\\([[:alnum:]_]+\\)\s *" nil t)
+      (re-search-forward "class\\s +\\([[:alnum:]_]+\\)\\(\\s \\|\n\\|implements [^{]*\\|extents [^{]*\\)*{" nil t)
       (setq cls (match-string-no-properties 1))
       (when (and pkg cls)
         (concat pkg "." cls))) ))