Thanks, Eric.  I'll check out ECB and eassist.  On the other hand, after
a little research I found that the fact that Emacs is a wonderful
ecosystem has yet again paid off.  With a couple of hacks and tweaks,
ido-mode leverages other tools like imenu quite nicely.  From the
EmacsWiki on ido
(http://www.emacswiki.org/emacs/InteractivelyDoThings#toc10), this hack
turns on replaces completing-read with ido-completing read.  It doesn't
filter or flatten imenu's submenus, of course, but it accelerates
navigating among them dramatically for keyboard users.

    (defvar ido-enable-replace-completing-read t
      "If t, use ido-completing-read instead of completing-read if
possible.
    
    Set it to nil using let in around-advice for functions where the
    original completing-read is required.  For example, if a function
    foo absolutely must use the original completing-read, define some
    advice like this:
    
    (defadvice foo (around original-completing-read-only activate)
      (let (ido-enable-replace-completing-read) ad-do-it))")
    
    ;; Replace completing-read wherever possible, unless directed
otherwise
    (defadvice completing-read
      (around use-ido-when-possible activate)
      (if (or (not ido-enable-replace-completing-read) ; Manual override
disable ido
              (boundp 'ido-cur-list)) ; Avoid infinite loop from ido
calling this
          ad-do-it
        (let ((allcomp (all-completions "" collection predicate)))
          (if allcomp
              (setq ad-return-value
                    (ido-completing-read prompt
                                   allcomp
                                   nil require-match initial-input hist
def))
            ad-do-it))))

I haven't looked into it, but does semantic (like, say, semantic-symref)
use completing-read, or can it be made to do so?  Not a huge deal.  Just
wondering, and I'll look into it either way.

Best,
David

> -----Original Message-----
> From: Eric M. Ludlam [mailto:[email protected]]
> Sent: Tuesday, May 11, 2010 4:51 PM
> To: David Ventimiglia
> Cc: JDEE Users Willey
> Subject: Re: [jdee-users] Flatten/filter the Classes imenu?
> 
> Hi,
> 
> It does seem like the generic tools are too generic for you.
> 
> As for ECB, you can reconfigure the windows to be just one thing on
the
> side with the bits you want, or even just put speedbar in the side.
> 
> There is also eassist (in contrib) that has some method navigation
> stuff
> you might like.
> 
> If you need help writing some new thing let me know.
> 
> Eric
> 
> On 05/11/2010 12:42 PM, David Ventimiglia wrote:
> > Thanks, Eric.  Yes, the keystroke C-c , j is great, though it
suffers
> > from too many hits.  One of my Java files has 1200+ matches (tags),
> and
> > that's not atypical.  Many of those are the import statements, which
> > I'll never want to navigate to.  Many others are method parameters,
> > which I'll also never want to navigate to.
> >
> > ECB seems a little heavyweight, since I want none of its
multi-window
> > features and only want source code navigation.
> >
> > Speedbar also doesn't work since it pops up in another frame, and
> seems
> > to favor mouse usage.
> >
> > I understand that tags have a class that can be a symbol like
> 'variable,
> > 'function, etc., and evidently semantic-imenu is smart enough to use
> > this to sort tags into buckets like "Variables" and "Methods".  It's
> > like 90% there, except that it also has everything else that I'll
> never
> > need to navigate to (imports, etc.).
> >
> > I suspect what I'm looking for doesn't exist.  I'd be happy to poke
> > around and maybe write a tiny semantic "app" if that's what's
needed.
> >
> > Best,
> > David
> >
> >> -----Original Message-----
> >> From: Eric M. Ludlam [mailto:[email protected]]
> >> Sent: Monday, May 10, 2010 7:47 PM
> >> To: David Ventimiglia
> >> Cc: JDEE Users Willey
> >> Subject: Re: [jdee-users] Flatten/filter the Classes imenu?
> >>
> >> If you are using the keyboard, use the jump command on C-c , j
> (lower
> >> case j).  Then you can just hit TAB and/or do completion by typing
a
> >> couple letters.  The completion engine lets you TAB through
> different
> >> locations in the file as well.
> >>
> >> Then, of course, there's the speedbar or ECB options that both do
> >> similar things.
> >>
> >> Eric
> >>
> >> On 05/10/2010 08:23 PM, David Ventimiglia wrote:
> >>> Thanks, Eric.  A couple of things I observe with these
> >> customizations.
> >>>
> >>> 1. semantic-imenu-index-directory is off by default
> >>> 2. semantic-imenu-bucketize-file when set to off gets rid of
> > buckets,
> >>> like "classes", "interfaces", "imports", and "packages".  That's
> >> good.
> >>> 3. type members (methods&   properties) still are grouped into
> >>> submenu-ized buckets, regardless of the other changes I make in
the
> >>> semantic-imenu customization group.  That's bad.
> >>> 4. import statements still are present.  That's bad.
> >>> 5. type members are still grouped under the class they belong to.
> >>> That's bad.
> >>>
> >>> Nos. 3&   5 above are the real problems, because they make you hit
> > TAB
> >>> numerous times when you invoke the imenu command.  With no. 5,
> >> granted,
> >>> a file can contain more than one type.  Also, types can contain
> >> nested
> >>> types.  Those facts, plus the fact that menus get unwieldy with
too
> >> many
> >>> choices, make it understandable that the items would be grouped
> into
> >>> submenus, and hierarchically-so.  But when using imenu from the
> >>> keyboard--and in particular, with TAB completion--it doesn't
really
> >>> matter if the list has lots of elements, since typically the user
> >> would
> >>> just type a character or two, hit TAB, and reduce the list size
> >>> dramatically.
> >>>
> >>> Then again, this is probably more of a Semantic issue.
> >>>
> >>> Best,
> >>> David
> >>>
> >>>> -----Original Message-----
> >>>> From: Eric M. Ludlam [mailto:[email protected]]
> >>>> Sent: Monday, May 10, 2010 4:14 PM
> >>>> To: David Ventimiglia
> >>>> Cc: JDEE Users Willey
> >>>> Subject: Re: [jdee-users] Flatten/filter the Classes imenu?
> >>>>
> >>>> Hi,
> >>>>
> >>>> If you also have senator enabled, you can choose several items
> from
> >>> the
> >>>> imenu config.  Disable 'bin by class', and possibly 'list other
> >>> files'.
> >>>>
> >>>> The variables to change are:
> >>>>
> >>>> semantic-imenu-bucketize-file
> >>>> semantic-imenu-index-directory
> >>>>
> >>>> Enjoy
> >>>> Eric
> >>>>
> >>>> On 05/10/2010 04:31 PM, David Ventimiglia wrote:
> >>>>> Hi!
> >>>>>
> >>>>> Is there a way to flatten and/or filter the Classes imenu for
> Java
> >>>>> files, to ease navigation among properties and methods? In its
> >>>> default
> >>>>> incarnation, it seems to show imports, properties, and methods,
> > for
> >>>> all
> >>>>> contained classes, organized into a hierarchical menu system. I
> >>> think
> >>>> a
> >>>>> typical use-case is that a user browses to a file, then wants
> >>> quickly
> >>>> to
> >>>>> see and navigate to the methods it contains. Occasionally, a
> > person
> >>>>> might want to browse to a property. And I suspect it's almost
> > never
> >>>> that
> >>>>> a user wants to navigate to a particular import statement. As it
> >>>> stands,
> >>>>> navigating to a method involves 4 menus/submenus. I think it'd
be
> >>>> more
> >>>>> convenient to see all the methods on just one menu. More
> > convenient
> >>>> yet
> >>>>> would be to do M-x imenu then TAB, and see a buffer listing the
> >>>> methods
> >>>>> in the file.
> >>>>>
> >>>>> Are there customizations in JDEE and/or Semantic that either
> >> flatten
> >>>> the
> >>>>> menu list and/or filter it just to show the methods?
> >>>>>
> >>>>> Thoughts?
> >>>>>
> >>>>> Thanks!
> >>>>>
> >>>>> Best,
> >>>>>
> >>>>> David Ventimiglia
> >>>>>
> >>>>>
> >>>>>
> >>>>>
> >>>
> >
---------------------------------------------------------------------
> >>>> ---------
> >>>>>
> >>>>>
> >>>>>
> >>>>>
> >>>>> _______________________________________________
> >>>>> jdee-users mailing list
> >>>>> [email protected]
> >>>>> https://lists.sourceforge.net/lists/listinfo/jdee-users
> >>>
> >>>
> >
---------------------------------------------------------------------
> >> ---------
> >>>
> >>> _______________________________________________
> >>> jdee-users mailing list
> >>> [email protected]
> >>> https://lists.sourceforge.net/lists/listinfo/jdee-users
> >>>
> >
> >
---------------------------------------------------------------------
> ---------
> >
> > _______________________________________________
> > jdee-users mailing list
> > [email protected]
> > https://lists.sourceforge.net/lists/listinfo/jdee-users
> >

------------------------------------------------------------------------------

_______________________________________________
jdee-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jdee-users

Reply via email to