From c61f92b1aa9f73e099ea6ec982ca081e8b40372c Mon Sep 17 00:00:00 2001 From: "Matthew O. Smith" Date: Thu, 25 Jun 2015 21:05:42 -0600 Subject: [PATCH] gh-177 updating changes to ede --- src/main/lisp/malabar-ede-gradle.el | 2 +- src/main/lisp/malabar-ede-maven.el | 10 +++++----- src/main/lisp/malabar-mode.el | 9 ++++++--- src/main/lisp/malabar-project.el | 4 ++-- 4 files changed, 14 insertions(+), 11 deletions(-) diff --git a/src/main/lisp/malabar-ede-gradle.el b/src/main/lisp/malabar-ede-gradle.el index 863758a..3432e5d 100755 --- a/src/main/lisp/malabar-ede-gradle.el +++ b/src/main/lisp/malabar-ede-gradle.el @@ -206,7 +206,7 @@ :name "MALABAR GRADLE" :file 'ede/gradle :proj-file "build.gradle" - :proj-root 'ede-maven2-project-root + ;:proj-root 'ede-maven2-project-root :load-type 'malabar-gradle-load :class-sym 'ede-malabar-gradle-project :new-p nil diff --git a/src/main/lisp/malabar-ede-maven.el b/src/main/lisp/malabar-ede-maven.el index cd75738..52e6518 100755 --- a/src/main/lisp/malabar-ede-maven.el +++ b/src/main/lisp/malabar-ede-maven.el @@ -205,12 +205,12 @@ (ede-project-autoload "malabar-maven2" :name "MALABAR MAVEN2" :file 'ede/maven2 - :proj-file "pom.xml" + ;:proj-file "pom.xml" ;:proj-root 'ede-maven2-project-root - :load-type 'malabar-maven2-load - :class-sym 'ede-malabar-maven2-project - :new-p nil - :safe-p t + ;:load-type 'malabar-maven2-load + ;:class-sym 'ede-malabar-maven2-project + ;:new-p nil + ;:safe-p t ) 'unique) diff --git a/src/main/lisp/malabar-mode.el b/src/main/lisp/malabar-mode.el index 5fc0003..d218603 100755 --- a/src/main/lisp/malabar-mode.el +++ b/src/main/lisp/malabar-mode.el @@ -626,7 +626,8 @@ install locations in addition to the directories in (let* ((jdk-alist (malabar-jdk-installed-jvms)) (port (+ 49152 (random (- 65535 49152)))) (jdk-home (cadr (assoc jdk jdk-alist))) - (cwd (ede-find-project-root "pom.xml")) + (project-instance (ede-current-project)) + (cwd (oref project-instance file)) (rtnval (malabar-http-call "spawn" (list "pm" "maven" ;; just a place holder @@ -1709,10 +1710,12 @@ current buffer. Also set the server logging level to FINEST. See the *groovy* (ede-minor-mode) (easy-menu-add-item nil '("Development") malabar-mode-menu-map "JVM") - (let ((project-dir (ede-find-project-root "pom.xml"))) + (let* ((project-instance (ede-current-project)) + (project-file (oref project-instance file)) + (project-dir (file-name-directory project-file))) (setq malabar-mode-project-dir project-dir ) (setq malabar-mode-project-manager "maven" ) - (setq malabar-mode-project-file (format "%spom.xml" project-dir )) + (setq malabar-mode-project-file project-file) (setq malabar-mode-project-name (file-name-nondirectory (directory-file-name project-dir)))) (malabar-post-additional-classpath) diff --git a/src/main/lisp/malabar-project.el b/src/main/lisp/malabar-project.el index b985ba9..6cbb2ca 100755 --- a/src/main/lisp/malabar-project.el +++ b/src/main/lisp/malabar-project.el @@ -146,8 +146,8 @@ (defun malabar--project-file (dir) "Return the directory containing the project file" - (ede-find-project-root "pom.xml" dir)) - + (let ((project-instance (ede-current-project))) + (oref project-instance file))) (defun malabar-project-populate-buffer-locals (&optional dir buffer)