Permalink
Browse files

gh-4 added a way to the project classpath

  • Loading branch information...
Matthew O. Smith
Matthew O. Smith committed Jan 16, 2014
1 parent e021e09 commit fd1bf00cd2b8f9deff84f23f478c8039d44ec0d7
Showing with 19 additions and 2 deletions.
  1. +12 −0 src/main/lisp/malabar-groovy.el
  2. +7 −2 src/main/lisp/malabar-reflection.el
@@ -350,6 +350,18 @@ for it to come up."
"Pass STRING to groovysh for evaluation, and read the output for Lisp use."
(car (read-from-string (car (malabar-groovy-eval string)))))
+
+(defun malabar-eval-on-project (command &optional buffer)
+ "Execute COMMAND on the project associated with BUFFER. If BUFFER is nil, use `current-buffer`"
+ (interactive "sCommand:")
+ (let* ((buf (if buffer (get-buffer buffer) (current-buffer)))
+ (mbuf (malabar-project buf))
+ (cmd (format "Utils.printAsLisp(%s.%s)" mbuf command))
+ (rtnval (malabar-groovy-eval cmd))
+ )
+ rtnval))
+
+
(defcustom malabar-groovy-compilation-font-lock-keywords
'((malabar-groovy-highlight-compilation-message
(1 '(face nil invisible t) nil t) ;
@@ -96,8 +96,13 @@ file which is part of the project will work."
(kill-new rtnval)
(message "Copied %s" rtnval)
rtnval))
-
-
+
+
+(defun malabar-classpath-test (&optional buffer)
+ "Return the test classpath as a string for BUFFER"
+ (interactive)
+ (let ((s (car (malabar-eval-on-project "testClasspath.asClassPath()" buffer))))
+ (substring s 1 (- (length s) 1))))
(defun malabar--get-class-info-from-source (classname buffer)

0 comments on commit fd1bf00

Please sign in to comment.