[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/phpinspect f8bf0b611a 035/126: WIP: List static methods
From: |
ELPA Syncer |
Subject: |
[elpa] externals/phpinspect f8bf0b611a 035/126: WIP: List static methods when requested |
Date: |
Sat, 12 Aug 2023 00:58:38 -0400 (EDT) |
branch: externals/phpinspect
commit f8bf0b611ad5f50eb912e755eeea8e428938dbc2
Author: Hugo Thunnissen <devel@hugot.nl>
Commit: Hugo Thunnissen <devel@hugot.nl>
WIP: List static methods when requested
---
phpinspect-class.el | 7 +++++++
phpinspect.el | 8 ++++++--
2 files changed, 13 insertions(+), 2 deletions(-)
diff --git a/phpinspect-class.el b/phpinspect-class.el
index d03a21a336..c2918f6ca2 100644
--- a/phpinspect-class.el
+++ b/phpinspect-class.el
@@ -122,6 +122,13 @@
(phpinspect--class-methods class))
methods))
+(cl-defmethod phpinspect--class-get-static-method-list ((class
phpinspect--class))
+ (let ((methods))
+ (maphash (lambda (key method)
+ (push method methods))
+ (phpinspect--class-static-methods class))
+ methods))
+
(cl-defmethod phpinspect--class-update-static-method ((class phpinspect--class)
(method
phpinspect--function))
(let ((existing (gethash (phpinspect--function-name-symbol method)
diff --git a/phpinspect.el b/phpinspect.el
index a6cc848fef..e0eec178b1 100644
--- a/phpinspect.el
+++ b/phpinspect.el
@@ -212,7 +212,9 @@ accompanied by all of its enclosing tokens."
(when class
(phpinspect--log "Retrieved class index, starting method collection
%s (%s)"
project-root class-fqn)
- (phpinspect--class-get-method-list class)))))
+ (if static
+ (phpinspect--class-get-static-method-list class)
+ (phpinspect--class-get-method-list class))))))
(defmacro phpinspect-find-function-in-list (method-name list)
(let ((break-sym (gensym))
@@ -677,7 +679,9 @@ resolve types of function argument variables."
(let ((class (phpinspect-get-or-create-cached-project-class
(phpinspect-project-root)
class-name)))
- (when class (phpinspect--class-variables class))))
+ ;; TODO return static variables/constants when static is set
+ (when class
+ (phpinspect--class-variables class))))
(defun phpinspect--get-methods-for-class
(resolvecontext buffer-classes class &optional static)
- [elpa] externals/phpinspect 3838e02820 067/126: Prevent worker thread from associating with the current buffer, (continued)
- [elpa] externals/phpinspect 3838e02820 067/126: Prevent worker thread from associating with the current buffer, ELPA Syncer, 2023/08/12
- [elpa] externals/phpinspect 91e24b97d4 074/126: Make bmap-token-meta error on unexpected input, ELPA Syncer, 2023/08/12
- [elpa] externals/phpinspect 7f76ba4c11 072/126: Fix some bugs introduced by the incremental parsing feature, ELPA Syncer, 2023/08/12
- [elpa] externals/phpinspect 1ec0e0cfa2 078/126: Limit token lookback range and start completion from the first non-blank character, ELPA Syncer, 2023/08/12
- [elpa] externals/phpinspect 6c767fc877 089/126: Implement eldoc for object attributes, ELPA Syncer, 2023/08/12
- [elpa] externals/phpinspect d1d34a4249 084/126: Move more functionalities from main file to separate modules, ELPA Syncer, 2023/08/12
- [elpa] externals/phpinspect 05ca0ace20 116/126: Fix all remaining byte compiler warnings, ELPA Syncer, 2023/08/12
- [elpa] externals/phpinspect 2d2f9912c1 102/126: Wrap queue items in a queue object, ELPA Syncer, 2023/08/12
- [elpa] externals/phpinspect f5cc681105 113/126: Fix let parenthesis in test-buffer.el, ELPA Syncer, 2023/08/12
- [elpa] externals/phpinspect e57edab86e 025/126: Index new files when no FQN can be found for a type, ELPA Syncer, 2023/08/12
- [elpa] externals/phpinspect f8bf0b611a 035/126: WIP: List static methods when requested,
ELPA Syncer <=
- [elpa] externals/phpinspect faa936a4f0 024/126: Test type-resolver + make type resolving work for "blocked" namespaces, ELPA Syncer, 2023/08/12
- [elpa] externals/phpinspect 43ab1bd99b 047/126: Make sure that the worker is running during tests, ELPA Syncer, 2023/08/12
- [elpa] externals/phpinspect 7e7914befa 062/126: Convert CI definition to new (woodpecker) format, ELPA Syncer, 2023/08/12
- [elpa] externals/phpinspect c2b06fe265 063/126: Another attempt at fixing CI, ELPA Syncer, 2023/08/12
- [elpa] externals/phpinspect 5fab07b426 082/126: Keep track of multi-call edits of the same region, ELPA Syncer, 2023/08/12
- [elpa] externals/phpinspect 111fa2f4b5 093/126: Fix bugs in splay tree "find" functions, ELPA Syncer, 2023/08/12
- [elpa] externals/phpinspect 4c5a70d4af 096/126: Make buffer re-parse non-interruptible + add interactive function to view tree, ELPA Syncer, 2023/08/12
- [elpa] externals/phpinspect b68baaec83 094/126: Make parse context cancellable and restore state after interrupt, ELPA Syncer, 2023/08/12
- [elpa] externals/phpinspect 55a24065a6 087/126: Remove obsolete comment (incremental parsing has been implemented), ELPA Syncer, 2023/08/12
- [elpa] externals/phpinspect c35c00ceff 086/126: Implement strategy pattern for completion backend, ELPA Syncer, 2023/08/12