Patch - jde-import-current-package-p

Paul Landes <[email protected]>
Newsgroups gmane.emacs.jdee.devel
Message-ID <[email protected]>
Tested and committed.

Thanks, Przemek.

Przemys?aw Wojnowski writes:
 > Hi!
 > Current version of this function has wrong regexp,
 > which returns true when last subpackage is the same
 > as current package. For example:
 > --- Plik.java ---
 > package tree;
 > public class Plik {
 > /* Importing this class will fail, because it's
 > in package javax.swing.tree */
 > DefaultMutableTreeNode node;
 > }
 > 
 > The class passed to this function is always fully
 > qualified, so its full package name should be
 > compared to the current.
 > 
 > Regards,
 > PrzemekIndex: jde-import.el
 > ===================================================================
 > --- jde-import.el	(wersja 131)
 > +++ jde-import.el	(kopia robocza)
 > @@ -176,10 +176,9 @@
 >  (defun jde-import-current-package-p (class)
 >    "Returns non-nil if the fully qualified classname CLASS belongs to
 >  the same package as the class in the current buffer."
 > -  (if (jde-parse-get-package-name)
 > -      (string-match
 > -       (concat (regexp-quote (jde-parse-get-package-name)) "\\.[^.]*$")
 > -       class)))
 > +  (let ((pkg (jde-parse-get-package-name)))
 > +    (if pkg
 > +	(string= pkg (jde-parse-get-package-from-name class)))))
 >  
 >  (defun jde-import-get-qualified-names (unqualified-class)
 >    "Returns a list containing all qualified name for UNQUALIFIED-CLASS."
 > ------------------------------------------------------------------------------
 > Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
 > trial. Simplify your report design, integration and deployment - and focus on 
 > what you do best, core application coding. Discover what's new with 
 > Crystal Reports now.  http://p.sf.net/sfu/bobj-july_______________________________________________
 > jdee-devel mailing list
 > [email protected]
 > https://lists.sourceforge.net/lists/listinfo/jdee-devel


-- 
Paul Landes
[email protected]

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july

_______________________________________________
jdee-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jdee-devel
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.