Re[1]: update: problem with wisent

2005-08-12 Thread Eric M. Ludlam
The file wisent-yourlanguagedefhere-wy.el is a generated file.  If you
did a make clean or similar in cedet or cedet/semantic, it will
delete those files.  If you follow the INSTALL instructions for
building CEDET, it should eventually construct those files for you.

Eric

 Ernst Reissner [EMAIL PROTECTED] seems to think that:
Hello,

i just updated to 2.3.5 and now jde is not loaded at all.
A look into the messages buffer shows:

Loading wisent-java-tags (source)...
eval-buffer:
Cannot open load file: wisent-java-tags-wy
Loading lazy-lock...done
Fontifying BasicTypesCompatibilityChecker.java... (regexps..)
Loading lazy-lock...done
Loading mwheel...done


a, yes, a look into 
/usr/share/emacs/cedet-1.0beta3b/semantic/wisent/wisent-java-tags.el
shows the line

(require 'wisent-java-tags-wy)

and there is no file wisent-java-tags-wy.el
only
wisent-java-tags.el  wisent-java-tags.wy  wisent-java.el   
wisent-java.wy

What's wrong here?


greetings

Ernst


-- 
  Eric Ludlam: [EMAIL PROTECTED], [EMAIL PROTECTED]
   Home: http://www.ludlam.netSiege: www.siege-engine.com
Emacs: http://cedet.sourceforge.net   GNU: www.gnu.org


Re[6]: header line bugs and artifacts

2005-04-28 Thread Eric M. Ludlam
Howdy,

 Jens Lautenbacher [EMAIL PROTECTED] seems to think that:
On Thu, 2005-04-28 at 08:08 -0400, Eric M. Ludlam wrote:
 Hi,
   To be clear, is it just the header line, and semantic decorations
 that scare people away, or the whole set of code helpers including
 imenu, summary-mode, completion mode, and what-not.

It's different.

The header line is most problematic in my case (and maybe others) as I
use the very cool tabbar.el by David Ponce (which is unexplainable to me
still not part of standard emacs...) - So putting something there
exclusively doesn't work for me.

I queried the emacs devel mailing list some time ago about multi-line
headers, or having methods for two tools to operate on the header-line
so tabbar could work with stickyfunc mode.  Sadly, they cannot be
combined. :(

Semantic decorations of methods would be nice, but I never understood
the somehow arbitrary exclusion of small methods/functions, but as

I'll remove that arbitrary restriction.

Nascif said in another mail, it would be ever so much nicer to use the
fringe to have e.g. clickeable markers for methods which could be used
to show/hide them on demand.=20

There is a contributed semantic-tag-folding mode that could be
enabled.  Custom fringe bitmaps can only currently be done in the CVS
version of Emacs.  His folding mode is very high on the glitz
factor.  He recently sent me a patch to make it a little less shocking
on first use which I hope to integrate into CVS soon.

His mode also exposed a limitation in the current decoration system I
need to figure out how to solve, though I haven't had time to test his
patch yet to see if it was resolved.

Completion mode is quite nice, but seems to have problems, e.g. (or it's
a problem of semantic/java - I can't decide) the following construct,
point at end of it in second line, will not complete as it doesn't
seem to recognize iter to be in scope:
for (Iterator iter =3D in.iterator(); iter.hasNext();) {
   itpoint
}
Another thing from a users point of view is that it would be really cool
to have jde's class file based completion of methods and semantics
source based completion of in-scope variables merged into _one_. The
problem of semantic in this regard (and the problem many of my coworkers
seem to have with it) is that it has some GUI related features, that
somehow peek through the tools that use it (like JDE, ECB) without
really integrating with them.=20

I have the good fortune to not only work at the same company as Paul
K. but also in the same building.  We have spent many an hour
contemplating the various merits of Emacs things.

Alternately, we come from surprisingly different backgrounds on how to
use Emacs.  My fingers have a hard time using his configuration. ;)

Anyway, Paul has been very helpful with contributions to semantic,
including the first imenu implementation, and the first draft code for
what is now the semanticdb back-end abstraction.

I would like nothing more than for there to be a JDE based back-end to
semanticdb.  It is my understanding that there is a method name
nomenclature issue preventing a simple implementation, in addition to
the usual gads, I don't have time type thing.

Paul and I have different goals as well, as I need to somehow write an
API that lets Java and Makefiles look sort-of the same to tools like
ECB.  Paul just wants to make Emacs be the best thing for working on
Java.

I could expound some more, but I need to give my kids a bath.

Please don't take this as an insult to your great work (and the great
work the ECB and JDE guys do) - it's just the impression of the user
visible parts and how they interact.

I have a pretty thick skin after 10 years of emacs contributions. ;)
I appreciate your thoughtful suggestions.  Some just take longer to
tidy up than others.

Thanks!
Eric



Thanks,
   jtl


 Thanks
 Eric
=20
  Nascif Abousalh-Neto [EMAIL PROTECTED] seems to think t=
hat:
 Hi Eric,
 
 This approach can also be overwhelming and frustrating - I saw it
 first hand with some co-workers, having to stop their work to find out
 and turn off new features they didn't want in the first place.
 
 Another tactic might be to start with the more powerful features
 disabled and provide documentation on them, including
 screenshots. Curious users will find the info and tinker with them,
 and spread the word in wikis and mailing lists; less sophisticated
 users won't be frustrated with all the colors and extra fontification
 getting in their way, coming from nowhere, as soon as they install the
 new library. They might them be more receptive to turn them on later.
 
 Best regards,
   Nascif
 
 
  -Original Message-
  From: Eric M. Ludlam [mailto:[EMAIL PROTECTED]
  Sent: Saturday, April 23, 2005 8:46 AM
  To: Felix Dorner
  Cc: jde@sunsite.dk
  Subject: Re[2]: header line bugs and artifacts
 =20
  Hi,
 =20
Stickyfunc mode puts the first line of the method/class=20
  that is on the top line of the window into the header line. =20

Re[6]: header line bugs and artifacts

2005-04-28 Thread Eric M. Ludlam
The distinctions between some of the APIs, and the various modes is
very thin.

My goal with semantic is to provide a set of APIs to get and
manipulate tags.

The various modes, such as boundary mode, or sticky func, are usually
very thin wrappers around the built-in APIs that add things such as a
face and the mode functions, and the hook-glue to make them work.  For
example, the meat of the tag-boundary mode is 28 lines, half of which
is effectivly white-space.

Anyway, I'll continue to tune the initial set up based on what input I
get.

I addressed the folding feature you mention below in a different email
to the jde mailing list.

Eric

 Nascif Abousalh-Neto [EMAIL PROTECTED] seems to think that:
Hi again,

I think those improvements will be nice. As for your question, I would
guess that in 90% of the times what scares people away (and creates
the urge to turn things off) are the semantic decorations, that 1) are
visually very intrusive and 2) come as a complete surprise. I think a
lot of users are getting CEDET because it is a requirememnt for JDE
and/or ECB - so they may have not read its documentation, assuming it
is just a under-the-covers library like a parser (which it is) not
realizing it has also UI-affecting features. Underlines are also bad
because they hide underscores (a small problem that can be annoying
sometimes).

Perhaps using the fringe now that Emacs allows you to have more
control on what goes there? I think other IDEs (e.g. Eclipse) take
that approach, of adding small icons on a left to give you feedback
about the code. Just an idea :-)

Regards,
  Nascif

 -Original Message-
 From: Eric M. Ludlam [mailto:[EMAIL PROTECTED] 
 Sent: Thursday, April 28, 2005 8:08 AM
 To: Nascif Abousalh-Neto
 Cc: [EMAIL PROTECTED]; jde@sunsite.dk
 Subject: Re[4]: header line bugs and artifacts
 
 Hi,
 
   Thanks for the input.  All I usually see is What is that 
 and how to I turn it off?, and after an explanation, oh, 
 that's neat.  As such, I don't get this perspective.
 
   I've been fiddling with the header line already.  In the 
 next version, clicking on it will provide a menu with a few 
 semantic things in it, and a what is this? note in it.
 
   The decorations should probably have an explicit list in a 
 menu to be turned on and off.
 
   In the meantime, I will split the default code-helpers 
 install into two sections.  The basic code helpers will have 
 the subtle stuff, and then move stickyfunc and decoration 
 mode into the existing excessive setup fcn.
 
   I'll also update the semantic INSTALL file to make it 
 easier to do a custom setup.
 
   To be clear, is it just the header line, and semantic 
 decorations that scare people away, or the whole set of code 
 helpers including imenu, summary-mode, completion mode, and what-not.
 
 Thanks
 Eric
 
  Nascif Abousalh-Neto [EMAIL PROTECTED] 
 seems to think that:
 Hi Eric,
 
 This approach can also be overwhelming and frustrating - I 
 saw it first 
 hand with some co-workers, having to stop their work to find out and 
 turn off new features they didn't want in the first place.
 
 Another tactic might be to start with the more powerful features 
 disabled and provide documentation on them, including screenshots. 
 Curious users will find the info and tinker with them, and 
 spread the 
 word in wikis and mailing lists; less sophisticated users won't be 
 frustrated with all the colors and extra fontification 
 getting in their 
 way, coming from nowhere, as soon as they install the new 
 library. They 
 might them be more receptive to turn them on later.
 
 Best regards,
   Nascif
 
 
  -Original Message-
  From: Eric M. Ludlam [mailto:[EMAIL PROTECTED]
  Sent: Saturday, April 23, 2005 8:46 AM
  To: Felix Dorner
  Cc: jde@sunsite.dk
  Subject: Re[2]: header line bugs and artifacts
  
  Hi,
  
Stickyfunc mode puts the first line of the method/class 
 that is on 
  the top line of the window into the header line.
  That way you can always see what function you are working on. 
   It's something I always thought would be useful.
  
The overline is simply a decoration to help divide 
 different types 
  of tags from eachother in the buffer.  I copied the idea from some 
  Java editor I saw a coworker using.
   It is a part of semantic-decoration-mode.  You can 
 concoct your own 
  decorations with `define-semantic-decoration-style'.
  
I have seen several times that people look at these 
 things and go 
  Eeww!  What's all this?  and after a little bit change 
 their minds 
  and think they are useful.
  
You can turn all the code-helpers off and suffer no 
 ill effect.  
  I turn most things on in the default so you get exposed to 
 them, and 
  can later choose which tools you like and turn off the others.
  
  Eric
  
   Felix Dorner [EMAIL PROTECTED] seems to think that:
  
  
  That's the because of semantic stickyfunc mode. Try M-x 
  global-semantic-stickyfunc-mode.

  
  
  OK thanks

Re[1]: Update Tag Table messages

2005-03-02 Thread Eric M. Ludlam
 Joseph Shraibman jks@selectacast.net seems to think that:
I am being driven mad by these Update Tag Table messages that semantic 
is giving me.  Whenever this happens emacs freezes on me for a few 
seconds.  How can I turn this off?


You can either increase the idle time via
semantic-idle-scheduler-idle-time or you can disable
global-semantic-idle-scheduler-mode.

The advantage of the idle scheduler is that it provides tag summaries
and some completion features.  The disadvantage is the amount of time
it may take to parse a file.  If you don't use those, you can postpone
tag updates till you request some action from semantic via some other
mechanism.

It is supposed to be possible to interrupt the incremental parsing
mechanism by just pressing a key.  It is unclear to me why this would
not work for you.  There are atomic operations that it doesn't work
in, but I thought those were all pretty short.

Eric

-- 
  Eric Ludlam: [EMAIL PROTECTED], [EMAIL PROTECTED]
   Home: http://www.ludlam.netSiege: www.siege-engine.com
Emacs: http://cedet.sourceforge.net   GNU: www.gnu.org


Re[1]: semantic-tag-folding.el

2005-02-20 Thread Eric M. Ludlam
Hi,

  That is quite nifty.  I wrote one also which is in CEDET CVS only
right now, but yours is much niftier.  I like the highlight that is
the line down the side.  That is a nice effect.  The pre-existing
function `semantic-momentary-unhighlight-tag' could do well to emulate
it.

  In CEDET cvs, you will find new utility functions to make folding
easier, including `semantic-set-tag-folded' which works well with
isearch.  That is in CVS in semantic-decorate.el.

  I my version, if I click on the little + or - in the fringe too
much, my Emacs would crash, so I didn't persue it very far as I still
need to produce a good bug report.

 Suraj Acharya [EMAIL PROTECTED] seems to think that:
I've been working on a semantic-decoration style which allows tags to
be folded and unfolded, and uses fringe bitmaps to indicate where the
tags are.

http://www.emacswiki.org/elisp/semantic-tag-folding.el

From the commentary :

  [ ... ]

Eric,  I have a couple of questions about semantic-decorate-mode:

1)  The definition of semantic-decoration-styles seems to be missing a
:require attribute for semantic-decorate-mode. Currently, if I try to
customize its value, after starting up emacs I end with each style
listed twice in semantic-decoration-styles.

That variable maintains itself.  To fix that I probably need a second
variable that is customized, that the first references as new items
are auto-added.  I'll have to look into that.

2) I need to add a keybinding for clicking on the fringe for this
mode, it would be nice if there was key map for
semantic-decoration-mode.

If you look at semantic-fold.el from CVS, you will see how I
accomplished that task with a semantic-folding-mode of its own.  I
tend to create lots of modes for all the features to make them easy to
turn on and off without tromping other obscure features.

3) What is a good way to enable semantic-decoration-mode by default ? I tried
(add-hook 'jde-mode-hook 'semantic-decoration-mode) but it complains
Buffer Foo.java was not set up for parsing.

If you look in the INSTALL, you will see there are several startup
functions, and one is `(semantic-load-enable-code-helpers)' which
happens to have decoration mode enabled by default.

For any semantic mode, there is a `global-' version.  If you use that,
it will auto-add itself to any semantic enabled mode.

Semantic modes need to be added to `semantic-init-hooks'.  This hook
is run after the major-mode hook, which is why the buffer is not yet
setup for parsing.

4) Once semantic-decoration-mode is up and running and all the tags
have been decorated, if I make any edits in a tag it looks like all
the decorations for the tag are deleted and it is sent to the
highlight-default function again. Is there any way for the function to
be called with the old decorations intact so it can remove them only
if it wants to ?
  [ ... ]

I'm not quite sure what you mean.  Are you trying to prevent a folded
tag from being decorated by other decoration modes?  That could be
tricky as you probably want to keep some, but disable others.

Some decoration modes purposely do not decorate short functions, such
as boundary mode.  Perhaps they should just be made savvy toward tags
that are artificially shortened.  The detection of this in a generic
way may be challenging.

Lastly, you might want to run `M-x checkdoc' on your code to make your
doc-strings RMS compatible.

Your code is nifty!  Thanks.
Eric

-- 
  Eric Ludlam: [EMAIL PROTECTED], [EMAIL PROTECTED]
   Home: http://www.ludlam.netSiege: www.siege-engine.com
Emacs: http://cedet.sourceforge.net   GNU: www.gnu.org


Re[1]: [CEDET-devel] semantic-tag-folding.el

2005-02-20 Thread Eric M. Ludlam
 Suraj Acharya [EMAIL PROTECTED] seems to think that:
Hi Eric, 

Thanks for your answers.

I've just checked out the code from CVS and it is neat. If you'd like
I could take a shot at adding the addtional features from my code and
creating a patch for semantic-fold.el.

I have not spent enough time to decide which is the better
implementation to start from... other than that mine crashes Emacs. ;)

If you think the baseline in semantic-cvs is better, feel free to
upgrade it.
 
On Fri, 18 Feb 2005 22:27:23 -0500, Eric M. Ludlam
[EMAIL PROTECTED] wrote:
 Hi,
 
   That is quite nifty.  I wrote one also which is in CEDET CVS only
 right now, but yours is much niftier.  I like the highlight that is
 the line down the side.  That is a nice effect.  The pre-existing
 function `semantic-momentary-unhighlight-tag' could do well to emulate
 it.
 
   In CEDET cvs, you will find new utility functions to make folding
 easier, including `semantic-set-tag-folded' which works well with
 isearch.  That is in CVS in semantic-decorate.el.

I'll take a look. Btw, if you set the  'reveal-toggle-invisible
property on 'semantic-fold you can make the fringe bitmaps when if the
tag is opened by reveal-mode.

I'm not that familiar with that mode, but the doc makes it sound
useful.
 
   I my version, if I click on the little + or - in the fringe too
 much, my Emacs would crash, so I didn't persue it very far as I still
 need to produce a good bug report.
 
[...]
 4) Once semantic-decoration-mode is up and running and all the tags
 have been decorated, if I make any edits in a tag it looks like all
 the decorations for the tag are deleted and it is sent to the
 highlight-default function again. Is there any way for the function to
 be called with the old decorations intact so it can remove them only
 if it wants to ?
   [ ... ]
 
 I'm not quite sure what you mean.  Are you trying to prevent a folded
 tag from being decorated by other decoration modes?  That could be
 tricky as you probably want to keep some, but disable others.

What I'm trying to do is quite simple. Currently, if I unfold a tag,
make some edits inside and then move outside it, then the next time
the idle-timer kicks in and the tag is reparsed, it gets folded again.
What I'd like is that it remember the fact that I unfolded the tag and
not fold it. The simplest way to do this would be to somehow not clear
the decorations on the tag at all, since any edits would not require
them to be changed. Perhaps the decoration-style-highlight-default
function could get called only for new tags, while something like
decoration-style-update-after-edits could get called when the tag is
updated.

But I don't know much about semantic internals, so this might not make
sense. In that case  I just can store the fold state as an attribute
on the tag overlay or somewhere else.
  [ ... ]

Ah, I see.  I used decoration mode to put the markers in the file, but
not to actually fold the tags.  Having tag folded or not is a separate
attribute which I placed on the tags using the new function
`semantic-set-tag-folded'.  The option of folding all the tags (or
not) is then part of the major mode initialization.

As my version doesn't start stuff out folded, doing so would have
conflicting goals.  I've tried to set things up so files are not
parsed until after the buffer is shown, with the exception of tags
loaded in from a database.  This conflicts with the goal of forcing
the tags to be folded when the minor-mode starts up.

Loading a file might look like this:

 - find-file
 - foo-mode
   - foo-mode-hook
   - semantic-setup-foo-mode
 - semantic-init
   - semantic-init-hook
   - semanticdb-semantic-init-hook-fcn
   - semantic-tag-folding-mode
 * If no tags from DB, setup a reparse hook
   otherwise fold everything.
 * file is displayed
 - semantic-idle-scheduler
   - semantic-fetch-tags
   - semantic-after-toplevel-cache-change-hook
 - semantic-folding-tag-mode-after-first-reparse-hook
   * Decide if you want to fold all your new tags.
   * remove hook from list.

Does that make sense?

One other thing I noticed:

Here are a couple other comments I have about your code:

  Returns non-nil if TAG is to be considered for folding.  TAG
  has to have valid start and end locations in the
  buffer. Customize `semantic-tag-folding-allow-folding-of' to
  influence the output of this
  function.  
  (let ((c (semantic-tag-class tag)))
(and
 (semantic-tag-end tag)
 (semantic-tag-start tag)

You can use `semantic-tag-with-position-p' to find out if the tag has
a position.


Eric

-- 
  Eric Ludlam: [EMAIL PROTECTED], [EMAIL PROTECTED]
   Home: http://www.ludlam.netSiege: www.siege-engine.com
Emacs: http://cedet.sourceforge.net   GNU: www.gnu.org


Re[2]: java folding

2005-02-02 Thread Eric M. Ludlam
 [EMAIL PROTECTED] seems to think that:
Jens Lautenbacher wrote:
 On Wed, 2005-02-02 at 11:59 +, Phillip Lord wrote:
 Guy == Guy Thomas [EMAIL PROTECTED] writes:
 
   Guy I first of all want to have a quick overview of the method
   Guy signatures in the current file.
 
 
 ECB might be what you are looking for. If this takes up too much
 screen real estate for you, imenu, or the classes menu might be what
 you want.
 
 Still it would be nice to have (as many other IDEs do) e.g. a small
 + sign in the margin/gutter besides every method to simply
 hide/show the body of that method. I don't see how this can work
 currently, at least I never had much luck with the current
 folding/hideshow or whatever package with java files.

IMHO hideshow works well but nevertheless i agree with Jens about
the +-sign in the fringe (at least GNU Emacs calls it so... ;-)...
probably it should be possible to enhance hideshow.el so that this +
is displayed besides each method (or whatever is foldable in a buffer)
and clicking onto this + runs the appropriate commands of hideshow.el
for the related method...

I do not know the API Emacs offers for the fringe - but my assumption
is this stuff should not be too hard - gud could be a good starting-
example because displaying an arrow for the current debugging-location
is in principle nothing else then displaying a +-sign at a certain
location - the only thing i'm not sure if it is possible to make 
symbols displayed in the fringe clickable so a command can be 
bound to it??
  [ ... ]

Klaus,

  This is the sort of thing `semantic-decorate-mode' is for.  If you
take the `semantic-tag-boundary' in semantic-decorate-mode.el as a
baseline (about 44 lines), all you need to change (other than names)
is that the overlay be given a fringe/image to display instead of
underlining the text.

  Activating the +/- to keyboard input is a different story.

  I gave it a quick test and learned I don't know as much about fringe
images.  I'll provide my hack to anyone who wants to tweak it to
support fringe images properly.

Eric

-- 
  Eric Ludlam: [EMAIL PROTECTED], [EMAIL PROTECTED]
   Home: http://www.ludlam.netSiege: www.siege-engine.com
Emacs: http://cedet.sourceforge.net   GNU: www.gnu.org


Re[4]: jde and emacs memory usage

2004-11-19 Thread Eric M. Ludlam
Sounds like a good idea to me.  I'll fix it.

Eric

 Troy Daniels [EMAIL PROTECTED] seems to think that:
At 11:02 PM 11/18/2004 -0500, Eric M. Ludlam wrote:

  Raul Acevedo [EMAIL PROTECTED] seems to think that:
 Wow, that chart thing is pretty cool.   :)

There are several random chart functions, plus a chart menu item
in the Senator menu.

Is there a reason chart-space-usage explicitly calls csh with 
call-process-region?  My cygwin installation doesn't have csh, only bash 
and sh.  At the very least, you should use shell-file-name.

Troy


Troy Daniels
[EMAIL PROTECTED]
781-273-3388 x218


-- 
  Eric Ludlam: [EMAIL PROTECTED], [EMAIL PROTECTED]
   Home: http://www.ludlam.netSiege: www.siege-engine.com
Emacs: http://cedet.sourceforge.net   GNU: www.gnu.org


Re[1]: jde and emacs memory usage

2004-11-18 Thread Eric M. Ludlam
Hi,

  Here is something fun to try:

M-x load-library RET chart RET
M-x chart-emacs-storage RET

  It is possible that semantic's tag caches are filling up all your
space.  Check the size of your semanticdb.cache files for a vague clue
of how much string space is being used by semantic.

Eric

 Raul Acevedo [EMAIL PROTECTED] seems to think that:
Right now my Emacs process is using 127 Megs of memory.  While the
*jde-beanshell-scratch* buffer size is 1239491, and another buffer I
have is also just over 1 Meg, the total sum of all my buffers is still
only a few megabytes, I definitely am not consuming anywhere near 100
megabytes in buffers.

What could be taking up all the memory?  How do I free it up?  I've had
emacs run out of memory a few times in the last couple of weeks.

Raul


-- 
  Eric Ludlam: [EMAIL PROTECTED], [EMAIL PROTECTED]
   Home: http://www.ludlam.netSiege: www.siege-engine.com
Emacs: http://cedet.sourceforge.net   GNU: www.gnu.org


Re[3]: jde and emacs memory usage

2004-11-18 Thread Eric M. Ludlam
 Raul Acevedo [EMAIL PROTECTED] seems to think that:
Wow, that chart thing is pretty cool.   :)

There are several random chart functions, plus a chart menu item
in the Senator menu.

It shows strings/2 as taking up 31 Meg, which I assume means 62 Megs
and it shows it as strings/2 so the chart can be shown on a single
buffer when the next biggest item is conses at only 1 Meg.  I have 33
Java buffers averaging 10k each... so that's about 33 Meg, plus 62 Meg
for strings, adds up to 100 Meg right there. 

Why so many strings?

Most semantic.cache files are 50k, the biggest one I found is 150k.

You might have some very large hidden buffers.  Hidden buffers start
with a space character.

Probably your best task is just to get some sort of active monitor up
watching Emacs and see what you do that makes it grow very large.

Eric

Raul

On Thu, 2004-11-18 at 17:46 -0500, Eric M. Ludlam wrote:
 Hi,
 
   Here is something fun to try:
 
 M-x load-library RET chart RET
 M-x chart-emacs-storage RET
 
   It is possible that semantic's tag caches are filling up all your
 space.  Check the size of your semanticdb.cache files for a vague clue
 of how much string space is being used by semantic.
 
 Eric
 
  Raul Acevedo [EMAIL PROTECTED] seems to think that:
 Right now my Emacs process is using 127 Megs of memory.  While the
 *jde-beanshell-scratch* buffer size is 1239491, and another buffer I
 have is also just over 1 Meg, the total sum of all my buffers is still
 only a few megabytes, I definitely am not consuming anywhere near 100
 megabytes in buffers.
 
 What could be taking up all the memory?  How do I free it up?  I've had
 emacs run out of memory a few times in the last couple of weeks.
 
 Raul
 
 



Re[1]: Problem with query replace in beta?

2004-07-19 Thread Eric M. Ludlam
 Eric Raymond [EMAIL PROTECTED] seems to think that:
I just upgraded to the latest beta. I noticed two weird things:

1)  When I do a query replace, emacs seems to leave parts of the 
original string when it replaces string in some places (such as where a 
class name is expected)  For example if it replace old to new in public 
class oldOne  I get public class newldOne!  This does not always 
break.  It does seem to happen if JDEE can parse original string a class 
and if the idle thread kicks in during the replace?

Hi,

  The automatic reparse mechanism attached to an idle timer fails to
save the match data iff you let the parser reparse a previous between
the time it matches and you make your decision.  This has been fixed
in CVS and will be out in a beta soon.

2) There is a gray bar at the top of each page which seems to repeat the 
first line in the file.  Is there a way to make this go away?

  That is semantic-stickyfunc-mode, and can be turned off via that
function.  That is the default behavior when you are at the top of a
buffer.  It is supposed to show a summary of the function cut off at
the top of a window.

Eric

-- 
  Eric Ludlam: [EMAIL PROTECTED], [EMAIL PROTECTED]
   Home: http://www.ludlam.netSiege: www.siege-engine.com
Emacs: http://cedet.sourceforge.net   GNU: www.gnu.org


Re[1]: JDE 2.3.4beta3: strange overlining

2004-05-11 Thread Eric M. Ludlam
 =?iso-8859-1?Q?Petter_M=E5hl=E9n?= [EMAIL PROTECTED] seems to think that:
Hi,

I'm getting the weird effect shown in the attached GIF using JDE 2.3.4beta3
and cedet1.0beta2 on Emacs 21.3. All non-public methods are 'overlined',
which is really not pleasant. I guess it's some kind of highlighting of
non-public methods that has gone wrong - does anybody know of a
configuration setting to modify this behaviour or is it possibly a bug?
  [ ... ]

That is part of `semantic-show-tag-boundaries-mode'.  It actually
overlines any method over a certain length (In characters.)  It is a
part of a set of decorating minor modes.  This one is used to mimic a
feature I saw in intellij, though the graphics of Emacs are a bit
different.

Eric

-- 
  Eric Ludlam: [EMAIL PROTECTED], [EMAIL PROTECTED]
   Home: http://www.ludlam.netSiege: www.siege-engine.com
Emacs: http://cedet.sourceforge.net   GNU: www.gnu.org


Re[2]: speeding up variable loading

2004-02-09 Thread Eric M. Ludlam
 Paul Kinnucan [EMAIL PROTECTED] seems to think that:
  [ ... ]
The only solution to this problem that I can see is to provide a
custom-set function for JDEE variables that updates the dirty variable
list whenever the user customizes a variable during a session. Since
the custom-set function is also invoked by the defcustom macro to set
the variable s default value, the JDEE's custom-set function would
have to detect that it is being invoked by a defcustom macro and not
update the dirty variable list. This change will require adding the
set function to every defcustom form in the JDEE code base but is
probably worth it.
  [ ... ]

Hi Paul,

  You may want to create a macro defjdeoption other other specific
name for any variable that is part of a project, and reserve defcustom
for variables that do not get saved.  After the initial change to all
sources, this will save you lots of time in the future.

Eric

-- 
  Eric Ludlam: [EMAIL PROTECTED], [EMAIL PROTECTED]
   Home: http://www.ludlam.netSiege: www.siege-engine.com
Emacs: http://cedet.sourceforge.net   GNU: www.gnu.org


Re[2]: speeding up variable loading

2004-02-09 Thread Eric M. Ludlam
 Phillip Lord [EMAIL PROTECTED] seems to think that:
  [ ... ]
This will also make it easy for third parties to piggy back into the
JDE project system I think, without having to use the jde- namespace
which the system currently depends on. 

I'd be quite happy to give this a go if you'd like. Might take a day
or two (it's pub night tonight!).

You loose the nice fontification of defcustom in the lisp
though. Ain't there always something!
  [ ... ]

See font-lock-add-keywords on how to fix that last problem.  I think
that is only available in newer versions of Emacs.

Eric

-- 
  Eric Ludlam: [EMAIL PROTECTED], [EMAIL PROTECTED]
   Home: http://www.ludlam.netSiege: www.siege-engine.com
Emacs: http://cedet.sourceforge.net   GNU: www.gnu.org


Re[2]: cedet-1.0beta1 /Semantic 2.0 and JDEE-2.3.2

2003-12-18 Thread Eric M. Ludlam
 Paul Kinnucan [EMAIL PROTECTED] seems to think that:
 Michael == Michael Schierl [EMAIL PROTECTED] writes:
  [ ... ]
Michael (defcustom jde-enable-senator t
Michael   Enable senator minor mode.
Michael This mode provides Java-aware buffer navigation and
Michael searching commands.
Michael   :group 'jde-project :type 'boolean :set '(lambda (sym
Michael   val)
Michael   ;; Starting with version 1.4 beta 12 Semantic
Michael   ;; can globally enable `senator-minor-mode'.
Michael   ;; So don't override the global setting in
Michael   ;; JDE's buffers.
Michael   (or (and (boundp 'global-senator-minor-mode)
Michaelglobal-senator-minor-mode)
Michael t ;;  added
Michael by me
Michael   (mapc
Michael(lambda (buff)
Michael  (save-excursion
Michael(set-buffer buff) (senator-minor-mode
Michael(if val 1 -1
Michael(jde-get-java-source-buffers)))
Michael (set-default sym val)))

Michael which seems to work as expected (although i might have
Michael broken senator, but I don't care about that on my
Michael machine).

This effectively disables the resetting of existing open buffers
when a user customizes jde-enable-senator. I would rather fix the
bug then cripple a function in order to avoid it. I've narrowed
the problem, i.e., resetting the value of jde-enable-senator
triggers the error:

  Setting JDE variables to startup values... [3 times]
  wisent-java-tags-lexer: 
  Wrong type argument: stringp, nil


to the java version of the semantic-parse-region function. However, I
cannot get any further because the semantic java parser is implemented
via macros that cannot be enabled for edebugging, which is the only
way I know how to find the exact line that causes a particular
error. (BTW, I find the heavy reliance on macros a serious problem
with the design of semantic 2.0; it makes debugging problems with
semantic next to impossible, at least that has been my experience so
far.)  Perhaps Eric or David can find the line that causes the error
or suggest a way for me to find it so this bug can be fixed.
  [ ... ]

Hi Paul ( co)

  In semantic 2.0 we are spending brain power on a pair of goals in the
parser generation area.  Make it fast, and make it easy to implement
new languages.

  The best way to make a lexer fast is to cut back on the number of
regexp matches and remove as many function calls as possible.
Side-effect: funny-macros for constructing custom lexers.

  On the make it easy side, Emacs Lisp is just not a great language
for making an easy-to-read lexical analyzer.  The macros let you write
and mix individual analyzers in a convenient high-level way.

  As for debugging, there is the `semantic-lex-debug' command.  This
lets you debug the meaning of an analyzer, and is unfortunately not
what you are really looking for.

  Also, it is easy to just re-evaluate the lexer construction element,
and toggle-debug-on-error to see what aspect of a given lexer is
failing, which is what I usually use.

  I will try and track you down at work sometime to see what solutions
there may be.

Eric

-- 
  Eric Ludlam: [EMAIL PROTECTED], [EMAIL PROTECTED]
   Home: http://www.ludlam.netSiege: www.siege-engine.com
Emacs: http://cedet.sourceforge.net   GNU: www.gnu.org


Re[2]: cedet-1.0beta1 /Semantic 2.0 and JDEE-2.3.2

2003-12-18 Thread Eric M. Ludlam
 Kai Grossjohann [EMAIL PROTECTED] seems to think that:
Eric M. Ludlam [EMAIL PROTECTED] writes:

   On the make it easy side, Emacs Lisp is just not a great language
 for making an easy-to-read lexical analyzer.  The macros let you write
 and mix individual analyzers in a convenient high-level way.

My understanding was that Common Lisp has a configurable reader that
is flexible enough so that one does not need to use lexers.  Is this
true?

This I don't know, but it sounds like something CL would do.

I wonder if it would be a workable approach to augment Emacs to have a
better reader, then to use that as the lexer.

I have thought of this often.  My consideration was something like
'parse-partial-sexp'.  The Emacs syntax-table really is exactly the
way to build a nice lexical analyzer.

I don't have practical experience with building parsers.
Theoretically, one wouldn't need a lexer, just something that returns
the next character from the input would be sufficient and the rest
could be done from the grammar.  (I mean that one doesn't need lex and
could do everything in yacc instead.)  But that makes parsers
difficult to write, and also probably slow.  So one does need lexers.
But the theory seems to imply that the lexers don't need to be
all-powerful: if the lexer is too stupid, then one can still do it
from the grammar.
  [ ... ]

Lexical analysis is nice because matching characters is really easy to
to do compared to actual syntax parsing.

Regexp matching is nice because you can have fairly complex lexical
tokens such as #include.  Mixed mode code such as C preprocessor
and C code is made simpler to handle this way.

Semantic's lexers are pretty simple.  Syntax table regexps such as
\s. or \s_ are used so specific generic analyzers can be used
in most lexers.

Anyway, the problem is how to debug a lexer.  I can imagine this
being even more difficult if it were a built-in. ;)

If you were to look at a lex file sometime, it's syntax and content
is usually really simple, along the lines of (from the man page):

if|then|begin|end|procedure|function {  some action here }

which basically says if you see the characters i f, it makes a
token if.  Your action then does whatever.

Semantic lex analyzers are the same, and could be:

(define-lex-simple-regexp-analyzer my-analyzer
  obligatory docstirng
  if\\|then\\|begin\\|end\\|procedure\\|function
  'keyword
  0  ; index into the regexp
  (other code here))

so it is very similar.  What is different is that you have to then
combine your named analyzers via the define-lex call.

Another big difference is that the semantic lexer can skip over lists
like { a method body } as a single token.  The process of identifying
those characters is very fast (an Emacs built in) and when tagging a
file, often those characters are not needed anyway.  This short cut is
what makes the C and Java semantic parsers fast enough to be usable in
while editing without getting in the way too much.

Have fun
Eric

-- 
  Eric Ludlam: [EMAIL PROTECTED], [EMAIL PROTECTED]
   Home: http://www.ludlam.netSiege: www.siege-engine.com
Emacs: http://cedet.sourceforge.net   GNU: www.gnu.org


Re[3]: [jde] cedet-1.0beta1 /Semantic 2.0 and JDEE-2.3.2

2003-11-07 Thread Eric M. Ludlam
The support for highlighting unmatched syntax is still rudimentary,
but it is a longterm goal to highlight all syntactic issues.  Parsing
an entire file is pretty slow.  Parsing only the visible parts, is one
option.  For missing ; after things already being parsed (method and
type declarations) you will get the highlighting.  The new incremental
parser helps with this.

Detecting missing imports or methods is not a part of any short term
plan.  The semantic analyzer has not been modified much as we've been
concentrating on low level APIs, and speed.

The version of eieio in the beta includes a feature similar to
something I think is called flymake.  You can run a build, and it will
detect the errors, and highlight them for you.  I think flymake may
have more user features.  The version in eieio is an example program
for using a line highlighting feature.

Eric 

 =?iso-8859-1?Q?Henrik_Kj=E6r?= [EMAIL PROTECTED] seems to think that:
Hi

Will it support parsing of java files so the most obvious errors in a class,
like a missing ;, missing imports, unknown methods, etc. can be caught
before compiling.

Henrik
- Original Message - 
From: Eric M. Ludlam [EMAIL PROTECTED]
To: Raul Acevedo [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Thursday, November 06, 2003 9:01 PM
Subject: Re[1]: [jde] cedet-1.0beta1 /Semantic 2.0 and JDEE-2.3.2


 Semantic 2.0 lives in cedet-1.0beta1.tar.gz on the cedet web page.
 There was no formal announcement as I'm still working through build
 and compatibility issues for various versions of Emacs.  In fact, I'm
 a bit behind on a mountain of reports.

 For those willing to work around some of the problems, the overall
 response has been positive.  There are a few patches for some problems
 in the cedet-devel mailing list archive for those brave enough to try
 it.

 Eric

  Raul Acevedo [EMAIL PROTECTED] seems to think that:
 Semantic 2.0 is out???
 
 Paul Kinnucan wrote:
 
Ed == Ed Soniat [EMAIL PROTECTED] writes:
  
   Ed I tried install JDEE-2.3.2 which claims compatibility with
   Ed Semantic 1.blah.blah or greater.  Semantic 2.0 deleted
   Ed semantic-bnf in Aug/03 or so.
  
   Ed The change log in JDEE is out of date, makes it look like a
   Ed dead project.
  
   Install JDEE 2.3.3beta6 to get semantic 2.0 support and an updated
   change log.
  
   Paul
  
  
 

 -- 
   Eric Ludlam: [EMAIL PROTECTED],
[EMAIL PROTECTED]
Home: http://www.ludlam.netSiege: www.siege-engine.com
 Emacs: http://cedet.sourceforge.net   GNU: www.gnu.org





-- 
  Eric Ludlam: [EMAIL PROTECTED], [EMAIL PROTECTED]
   Home: http://www.ludlam.netSiege: www.siege-engine.com
Emacs: http://cedet.sourceforge.net   GNU: www.gnu.org


Re[1]: [jde] cedet-1.0beta1 /Semantic 2.0 and JDEE-2.3.2

2003-11-06 Thread Eric M. Ludlam
Semantic 2.0 lives in cedet-1.0beta1.tar.gz on the cedet web page.
There was no formal announcement as I'm still working through build
and compatibility issues for various versions of Emacs.  In fact, I'm
a bit behind on a mountain of reports.

For those willing to work around some of the problems, the overall
response has been positive.  There are a few patches for some problems
in the cedet-devel mailing list archive for those brave enough to try
it.

Eric

 Raul Acevedo [EMAIL PROTECTED] seems to think that:
Semantic 2.0 is out??? 

Paul Kinnucan wrote:

   Ed == Ed Soniat [EMAIL PROTECTED] writes:
  
  Ed I tried install JDEE-2.3.2 which claims compatibility with
  Ed Semantic 1.blah.blah or greater.  Semantic 2.0 deleted
  Ed semantic-bnf in Aug/03 or so.
  
  Ed The change log in JDEE is out of date, makes it look like a
  Ed dead project.
  
  Install JDEE 2.3.3beta6 to get semantic 2.0 support and an updated
  change log.
  
  Paul
  
  


-- 
  Eric Ludlam: [EMAIL PROTECTED], [EMAIL PROTECTED]
   Home: http://www.ludlam.netSiege: www.siege-engine.com
Emacs: http://cedet.sourceforge.net   GNU: www.gnu.org


Re[1]: Is there for the JDEE an UML tool available.

2003-10-29 Thread Eric M. Ludlam
 Theo Kromhout van der Meer [EMAIL PROTECTED] seems to think that:
Hello,

I like the JDEE a lot. Because of the I can tailor the IDE. I like to work
with Emacs.
But now I need to with UML, is there a UML tool available that integrates
with JDEE?
  [ ... ]

The cogre tool can make some pretty small and primitive UML diagrams.

http://cedet.sf.net/cogre.el

An upcoming release of semantic/cogre (real soon now) will be able to
generate complex diagrams via dot.

Eric

-- 
  Eric Ludlam: [EMAIL PROTECTED], [EMAIL PROTECTED]
   Home: http://www.ludlam.netSiege: www.siege-engine.com
Emacs: http://cedet.sourceforge.net   GNU: www.gnu.org


Re[1]: Make imenu more appropriate for interactive use?

2003-10-07 Thread Eric M. Ludlam
If you use senator, which comes with semantic, you can use the
keybinding:

C-c , j

and its effect will be similar to a flattened imenu setup.

Alternately, if you have senator running, look in the senator menu
for Imenu Config.  In there, just turn off anything that says
bin, and you will get a flattened version of imenu.

Eric

 Kai Grossjohann [EMAIL PROTECTED] seems to think that:
I have bound C-c m to the imenu command.  My idea was that I do C-c m
on a method and then jump to the definition of this method.

But, with JDEE installed, and thus Semantic installed, I instead need
to do:

C-c m   invoke imenu
c RET   invoke Classes
TAB RET select the only item, class.Foo
m RET   invoke Methods
.foo TAB RETselect the foo method

I'm glad that I have partial-completion-mode turned on, for otherwise
that last line wouldn't have worked.  I'm also glad that method
return types usually don't contain periods in my code, for in that
case my method would have failed, too.

However, I like the Speedbar display with the submenus.

Can I have the cake (better M-x imenu RET interface) and eat it, too
(keep the Semanticized Speedbar display)?

Like I said, when point is on a construct such as foo() or
x.bar(), then IWBNI M-x imenu RET selected foo (or bar) as the
default method to jump to, so that just hitting RET goes there.



-- 
  Eric Ludlam: [EMAIL PROTECTED], [EMAIL PROTECTED]
   Home: http://www.ludlam.netSiege: www.siege-engine.com
Emacs: http://cedet.sourceforge.net   GNU: www.gnu.org


Re[2]: Refactoring with JDE?

2003-09-04 Thread Eric M. Ludlam
 Andrew Hyatt [EMAIL PROTECTED] seems to think that:
  [ ... ]
I would be very interested if someone who really knew semantic well
could tell us if it could do the kind of parsing necessary for these
more advanced features.  It seems to have more then the advertised
API, since you can get the speedbar to know about types of local
variables, while the advertised API does not go into within-method
information.

Hi,

  Semantic 1.4 local variable parsing depends on programmers having
some mysterious need to declare all local variables before writing any
code.  As such, it can use the regular tagging parser within a method
body scope and do a reasonable job.  That particular function is
advertised in the manual under context parsing, not under the general
tagging information.

  As Paul mentioned, Semantic 2.0 includes David Ponce's full bison
port, and a Java parser that can parse an entire Java file, including
method code, faster than the Semantic 1.4 parser could tag the same
file.  The new incremental parser handles about 90% of common edits
without a full reparse.  My long term goals include indentation and
font lock engines, underlining bad syntax, and all that good stuff.
My long term goals could probably keep several people busy for several
decades.

  When I wrote semantic 1.0 I was learning what a parser is as I wrote
it, so the road to semantic 2.0 includes a massive renaming campaign
to give all the nouns the correct names and reduce confusion.  I
wrote the thing and it confused me.  Now it does not.

  Anyway, all that's done.  The parser API is an elegant thing to
behold.  The new tag searching and completion engines bring joy to my
heart.  The parser construction process will bring new languages into
the fold.  All the wacky new minor modes will lure the young-uns to
the glory of Emacs.

  Well, something like that.  Paul gave me a little too much credit
perhaps.

  Your other question was when?.  Here is the inside scoop on
Semantic 2.0.

Scoop 1:

   Semantic, EIEIO, Speedbar, EDE, and Corge will all be shipped
together as one package called CEDET 1.0 and have one master
Makefile, but each will maintain their own version number and
identity, and can be installed one chunk at a time.  It cuts down on
maintenance since they are all co-dependent.  Version number
dependencies will be enfoced with a new inversion package.

Scoop 2:

   We've been trying to bring the Doc to be at least vaguely relevant
to what's in CVS, and get the build harness working to desired
parameters (a bit of EDE development there.)  That's it before a CEDET
1.0 beta1 is built and published.

Note 1:

   Most major API functions had their names changed.  We devised a
nice obsoletion mechanism that lets ECB and the JDE work fine with the
new version.  They just throw lots of warnings during byte-compilation
time.  (At least I think the JDE works.  Isn't that so David?)

Note 2:

   This beta version of semantic will have no indentation or font lock
magic in it.  The substructure is there, but little attention has
been placed on it yet.

Note 3:

   I owe David Ponce a huge debt of gratitude for the amazing things
he has done to bring Semantic 2.0 to where it is today.  I am also
indebted to Richard Kim who has been instrumental to much of the new
documentation, and for writing the python parser.

Have fun
Eric

-- 
  Eric Ludlam: [EMAIL PROTECTED], [EMAIL PROTECTED]
   Home: http://www.ludlam.netSiege: www.siege-engine.com
Emacs: http://cedet.sourceforge.net   GNU: www.gnu.org


Re[2]: Syntax error indication oon the fly....the beginning...

2003-02-24 Thread Eric M. Ludlam
 Chitale, Sandip V [EMAIL PROTECTED] seems to think that:
  [ ... ]
2. Indicate the error messages using an underline (or user customizable) face
(say!) over the extent of the buffer text causing the error.

(unfortunately not all compilers give the column or column range where
the error is).

3. User can get details of the error message with mouse-over or
some key combination (I need to check if 'help-echo text property
will work for that).
  [ ... ]

Hi,

  I bumped into this thread a little late I guess.  I had a plan to do
this with a fancy utility of mine, but never got around to it.  I
brushed off the old plan and hacked it together.  Your mileage may
vary, but it is working well in grep buffers at the moment.

  It requires EIEIO to get the linemark package which any good JDEE
user should have.  Hopefully it doesn't require the CVS version of
linemark.el for Emacs.  I think I avoided those features.  I cannot
vouch for its usefulness on XEmacs as the release version of linemark
has an odd face related bug, and lmcompile is using 'help-echo to do
the mouse-overs.  That's what you get for quick hack I guess.

  To use it, perform a grep or compile, and use
`lmcompile-do-highlight'.  Sick of it, use `lmcompile-clear'.

  Because it uses the `linemark' package at it's core, you set up the
highlights once, and the linemark harness handles keeping all the
overlays up to date as you load different files in and out of memory.

  The below is just a harness of what can be done with linemark.  I've
adapted linemark for specialized tasks to great effect on other
projects, so there are many more possible features that could be
added.  See the visual studio bookmark look alike at the end of
linemark.el for examples.

  This functionality has little to do with what was already posted.
It is tackling the problem from a completely different angle.

Enjoy
Eric

-
;;; lmcompile.el --- highlight compile error lines

;;
;; Author: Eric M. Ludlam [EMAIL PROTECTED]
;; Maintainer: Eric M. Ludlam [EMAIL PROTECTED]
;; Keywords: lisp
;;
;; Copyright (C) 2003 Eric M. Ludlam
;;
;; This program is free software; you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
;; the Free Software Foundation; either version 2, or (at your option)
;; any later version.
;;
;; This program is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
;; GNU General Public License for more details.
;;
;; You should have received a copy of the GNU General Public License
;; along with GNU Emacs; see the file COPYING.  If not, write to
;; the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
;;
;;; Commentary:
;;
;;  This package uses the compile package, and the linemark package to
;; highlight all lines showing errors.

;;; Commentary:
;; 

(require 'linemark)

;;; Code:
(defclass lmcompile-linemark-group (linemark-group)
  (
   )
  Linemark Group for compile error highlights.)

(defclass lmcompile-linemark-entry (linemark-entry)
  ((errormarker :initarg :errormarker
:type marker
:documentation
Marker pointing to the source of the match.))
  Linemark Group for one compile error highlight.
Tracks additional information about the error.)

(defmethod linemark-new-entry ((g linemark-group) rest args)
  Create a new entry for G using init ARGS.
  (let ((f (plist-get args :filename))
(l (plist-get args :line)))
(apply 'lmcompile-linemark-entry (format %s %d f l)
   args)))

(defmethod linemark-display ((e lmcompile-linemark-entry) active-p)
  Set object E to be active or inactive.
  ;; A bug in linemark prevents individual entry colors.
  ;; Fix the color here.
  (when active-p
(condition-case nil
(save-excursion
  (set-buffer (marker-buffer (oref e errormarker)))
  (goto-char (oref e errormarker))
  
  (let ((face (cond ((re-search-forward error (point-at-eol) t)
 'linemark-stop-face)
((re-search-forward warning (point-at-eol) t)
 'linemark-caution-face)
(t
 'linemark-funny-face
(oset e :face face)
))
  (error nil))
)
  ;; Do the rest of our work
  (call-next-method)

  ;; Add a tool tip
  (when (and active-p
 (slot-boundp e 'overlay)
 (oref e overlay))

(let ((em (oref e errormarker))
  (txt nil))
  (condition-case nil
  (save-excursion
(set-buffer (marker-buffer em))
(goto-char em)
(setq txt (buffer-substring-no-properties
   (point-at-bol) (point-at-eol)))
)
(error nil))

  (when txt
(linemark-overlay-put (oref e overlay

Re[3]: JDEE plugins (was JUCI)

2003-02-23 Thread Eric M. Ludlam
 Nick Sieger [EMAIL PROTECTED] seems to think that:
 PK == Paul Kinnucan [EMAIL PROTECTED] writes:

PK Eric M. Ludlam writes:
 Something I always wanted to do was use EIEIO to wrap Java objects.
 EIEIO could act as a proxy for Java objects, and there could be
 Java object proxies for EIEIO objects.  In this world people who
 know Emacs could hack Java, and vice-versa w/out having to know the
 other language much.

 
PK I've suggested to Nick Sieger that he use eieio proxies for the
PK Lisp counterparts that JUCI generates for Java classes.

I'm very interested in doing this, and as soon as I find time to learn
enough about EIEIO to feel comfortable I'll do this.  But for now, a
Java method call is mapped to a plain-old-defun :-|
  [ ... ]

I can help you do this.  I don't have a working JDEE install at home
though.  I can help you create new classes and methods at runtime
instead of in code.  The secret is that if you want to use `defclass'
or `defmethod', but don't want to write out code, you can use
`eieio-defclass' and `eieio-defmethod' instead.

Let me know what data you have and what you would ideologically like,
and I can try to prototype it for you to get you started.

Eric

-- 
  Eric Ludlam: [EMAIL PROTECTED], [EMAIL PROTECTED]
   Home: http://www.ludlam.netSiege: www.siege-engine.com
Emacs: http://cedet.sourceforge.net   GNU: www.gnu.org


Re[3]: FW: Syntax error indication on the fly....

2003-02-21 Thread Eric M. Ludlam
The semantic parser is a combination of what might think of as a
compiler's parser, and an iterative loop.

A traditional compiler will sometimes spit out the warning:

too many errors, giving up.

This is because it gets lost in the source file due to perhaps a
missing { or }, and it can't figure out what is going on.

To avoid this problem in semantic, the portion of a traditional
compiler that identifies multiple top-level nonterminals (functions,
variables, etc) is left out of the grammar, and is handled in Emacs
Lisp code instead.

What this means is if you start parsing at a given point in the
buffer, if the grammar completely fails to identify anything, that
parse step exits with out using any lexical tokens.  When this
happens, the Iterative Emacs Lisp looper marks that bit of syntax as
unmatched, moves forward 1 lexical token, and tries again.

That way, if you have a stray foo floating in between methods, it
gets labeled as unmatched.  A traditional parser usually can find this
error and move on as well, but the support structure needed for error
handling in a traditional grammar file is much more complicated.

David Ponce wrote a nice piece describing the differences in the
wisent parser generator manual currently residing in Semantic's CVS
repository.

Enjoy
Eric

 Chitale, Sandip V [EMAIL PROTECTED] seems to think that:
Eric,

   Can your or someone explain what the term 
unmatched syntax means ? Does it mean syntax errors ?
Does it mean syntax and semantic errors ? Does it mean
all the compilation errors ?

thanks,
sandip

 -Original Message-
 From: Eric M. Ludlam [mailto:[EMAIL PROTECTED] 
 Sent: Friday, February 21, 2003 10:10 AM
 To: Berndl, Klaus
 Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED]
 Subject: Re[1]: FW: Syntax error indication on the fly
 
 
 Semantic only shows unmatched syntax for definitions.  All 
 code that resides inside the body of a function is skipped 
 over.  This is to make parsing go faster.
 
 Semantic 2.0 CVS includes a full Java parser.  My assumption 
 is that it could then do unmatched syntax for all the code, 
 though I am not sure how to turn it on.  That is something 
 David Ponce could better answer.
 
 Eric
  [ ... ]

-- 
  Eric Ludlam: [EMAIL PROTECTED], [EMAIL PROTECTED]
   Home: http://www.ludlam.netSiege: www.siege-engine.com
Emacs: http://cedet.sourceforge.net   GNU: www.gnu.org


Re[2]: Introspection based Java class browser....also demonstrates alittle bit of java and lisp integration...

2003-02-19 Thread Eric M. Ludlam
 Berndl, Klaus [EMAIL PROTECTED] seems to think that:
  [ ... ]
Differences to Sandips code:

- uses ECB method-window to display the class-contents
- uses semantic for getting the contents of a class
- needs the source-file of the class to work

The first point can be seen as advantage or disadvantage ;-)

Especially the latter point is a disadvantage because it prevents
from working for classes which are only available as *.class-file or
within a jar-file...
  [ ... ]

Hi Klaus,

  Your last point here about semantic not being able to look into a
.class file is valid, however the CVS version semantic 2.0 semanticdb
subsystem was recently enhanced to be extensible beyond just typical
language parsers.  The idea was Paul's originally, and I expanded on
that.

  The basic premise is to sub-class a semanticdb class, and implement
all the search methods.  Your search methods can then call external
programs, or whatever you like before returning a results table.
There is an example that will search all Emacs Lisp symbols inside
Emacs, regardless of having the sources available.  The only part
that needs to be done to make your new program support .class files
is to extend the database.

  I can provide you with more details and perhaps start the process if
you would like to try extending semanticdb.

Have fun
Eric

-- 
  Eric Ludlam: [EMAIL PROTECTED], [EMAIL PROTECTED]
   Home: http://www.ludlam.netSiege: www.siege-engine.com
Emacs: http://cedet.sourceforge.net   GNU: www.gnu.org



Re[1]: AW: Semantic 1.4.1 is released!

2002-12-16 Thread Eric M. Ludlam
 Berndl, Klaus [EMAIL PROTECTED] seems to think that:
Hello Eric and David!

I just downloaded semantic 1.4.1 and had noticed the following:

1. Bug in semantic-texi.el: It is not enough to add (defopt . 1) to
   semantic-texi-name-field-list but is also necessary to add opt to
   semantic-texi-super-regex:
   
(defvar semantic-texi-super-regex
  ^@\\(chapter\\|\\(sub\\)*section\\|unnumbered\\(\\(sub\\)*sec\\)?\\|\
\\(chap\\|\\(sub\\)+\\|major\\)?heading\\|appendix\\(\\(sub\\)*sec\\)?\\|\
centerchap\\|def\\(var\\|un\\|fn\\|opt\\)x?\\)
  Regular expression used to find special sections in a Texinfo file.)

Thanks.  I'll let David add that to the 1.4.1 branch.

2. Problems with shipped semantic-util-modes.el: With 1.4.1 there is after
   every autom. (partial) reparse a recenter of the source-buffer which is
   pretty annoying. I have replaced the version of 1.4.1 with that one shipped
   with 1.4 and all is working fine, i.e. no recentering of the source-buffer.
   
   I'm wondering why the version of semantic-util-modes.el in 1.4.1 is
   X-RCS: $Id: semantic-util-modes.el,v 1.17 2001/12/08 03:12:39
   whereas the version of 1.4 seems to be much newer:
   X-RCS: $Id: semantic-util-modes.el,v 1.17.2.2 2002/05/07 02:40:50

   There are not many differences between these versions of
   semantic-util-modes.el but nevertheless they seem to be the reason for the
   annoying recenter behavior of the source-buffer after autom. reparsing.
  [ ... ]

Semantic 1.4 was released on a 1.4 branch.  The bug you describe was
in semantic before 1.4 was released.  Perhaps the 1.4.1 file was
accidentally taken from a pre 1.4 version?  That would certainly
explain things.  I keep my 1.4.1 install at work, so I'll double
check when I get in.

Eric

-- 
  Eric Ludlam: [EMAIL PROTECTED], [EMAIL PROTECTED]
   Home: http://www.ludlam.netSiege: www.siege-engine.com
Emacs: http://cedet.sourceforge.net   GNU: www.gnu.org



Re[2]: Senator-Analyze-Speedbar Class Browser error

2002-12-06 Thread Eric M. Ludlam
 Raul Acevedo [EMAIL PROTECTED] seems to think that:
Eric M. Ludlam wrote:

  If I select Senator - Analyze - Speedbar Class Browser, I get an
  error: Symbol's function definition is void:
  semanticdb-find-nonterminal-by-token.  Any ideas what this is about?
  
You need have semanticdb enabled for that class browser to work.
This commonly is enabled when you have
`semantic-turn-useful-things-on' set when you installed semantic.

I have (setq semantic-load-turn-everything-on t) enabled, presumably
that's what I need.  Is this correct?

The program you found is supposed to show your classes, and the
inheritance between them.  It only works after semanticdb has
seen all the files you are interested in so it can correlate the
tags.  My copy in CVS seems to have developed a speedbar refresh
problem.  I'll have to investigate more.

How do I get semanticdb to do this?

If semanticdb is enabled (Use `global-semanticdb-minor-mode' to toggle
it on and off)  All you have to do then is visit those files you care
about in an Emacs buffer.  Semanticdb takes care of the rest.

A future version of semantic will have a bridge API enabling the
possibility of semantic programs querying .class files via whatever
mechanism some JDE hacker may choose to use.

Well, I have no idea what that means, but it sounds cool.   :)
  [ ... ]

That was a reminder to those developing cool new JDEE features that
I'm thinking about them, and want to make their lives easier.

Eric

-- 
  Eric Ludlam: [EMAIL PROTECTED], [EMAIL PROTECTED]
   Home: http://www.ludlam.netSiege: www.siege-engine.com
Emacs: http://cedet.sourceforge.net   GNU: www.gnu.org



Re[2]: JDEE and emacs-wiki

2002-10-29 Thread Eric M. Ludlam
 Paul Kinnucan [EMAIL PROTECTED] seems to think that:
Daniel Serodio writes:
  Well, I've found some more info on this error. emacs-wiki defines a
  line-beginning-position function with 1 optional argument, and jde-bug
  defines a function with the same name but no arguments.
  
  In emacs-wiki.el:
  
  (unless (fboundp 'line-beginning-position)
(defsubst line-beginning-position (optional N)
  (save-excursion (beginning-of-line N) (point
  
  In jde-bug.el:
  
  (when jde-xemacsp
(defun line-beginning-position ()
  (point-at-bol))
(defun line-end-position ()
  (point-at-eol)))
  
  How can I solve this conflict? Thanks for any help.
  

I apparently created this code because XEmacs does not
(or did not) define these functions. I should have 
included the optional argument, which I will do in
the next release.

Meanwhile, you can just edit jde-bug.el to read:
  [ ... ]

It is much safer to wrap such functions under new names like this:

(if (not (fboundp 'whatever))
   (defun jde-whatever () (code))
  (defalias 'jde-whatever 'whatever))

and you avoid all upgrade problems.  My packages were often being
whacked by random tools that redefine code like this, including
XEmacs' own compatibility layer that wasn't that compatible a few
years ago.  I haven't had problems since I started doing the above.

Eric

-- 
  Eric Ludlam: [EMAIL PROTECTED], [EMAIL PROTECTED]
   Home: http://www.ludlam.netSiege: www.siege-engine.com
Emacs: http://cedet.sourceforge.net   GNU: www.gnu.org



Re: cedet.sourceforge.net refusing connections

2002-10-28 Thread Eric M. Ludlam
 John Collins [EMAIL PROTECTED] seems to think that:
I'm trying to set up JDEE on a new machine, and I can't get at the emacs 
tools eieio, semantic, etc. Any news?
  [ ... ]

Every once in a while the sourceforge download system fails.  I don't
know why, but it usually comes back in a little while.

Eric

-- 
  Eric Ludlam: [EMAIL PROTECTED], [EMAIL PROTECTED]
   Home: http://www.ludlam.netSiege: www.siege-engine.com
Emacs: http://cedet.sourceforge.net   GNU: www.gnu.org



Re[1]: How to turn off editing recenter feature

2002-09-24 Thread Eric M. Ludlam

 Will Taylor [EMAIL PROTECTED] seems to think that:
When I am editing and have unbalanced curly brackets and pause
for more than 3-4 seconds, the buffer is automatically recentered.
I dislike this feature and would like to know how to turn it off.
I did not see anything in the User's Guide about it.
  [ ... ]

Hi,

  This happens when global-semantic-auto-parse-mode is enabled.
  There is a bug that causes this unfortunate behavior when there is
  a list error during the lexical step.  I don't remember what the
  current state of that bug is though I thought it was fixed in
  semantic 1.4.

Eric

-- 
  Eric Ludlam: [EMAIL PROTECTED], [EMAIL PROTECTED]
   Home: http://www.ludlam.netSiege: www.siege-engine.com
Emacs: http://cedet.sourceforge.net   GNU: www.gnu.org



Re[1]: wrap compiler output lines

2002-08-28 Thread Eric M. Ludlam

 Marcel Schepers [EMAIL PROTECTED] seems to think that:
Does anyone know how to wrap the compiler output so that scrolling in 
the output window wouldn't be necessary anymore?
  [ ... ]

See the value of `scroll-step'.  You can probably locally set this to
a value = to the lines in the window, then it will appear to wrap, and
not scroll.

Eric

-- 
  Eric Ludlam: [EMAIL PROTECTED], [EMAIL PROTECTED]
   Home: http://www.ludlam.netSiege: www.siege-engine.com
Emacs: http://cedet.sourceforge.net   GNU: www.gnu.org



Re[1]: semantic-1.4 does not load

2002-08-14 Thread Eric M. Ludlam

 van Rooyen GC [EMAIL PROTECTED] seems to think that:
I tried to upgrade to semantic-1.4, speedbar-0.14beta4, ecb-1.80,
eieio-0.17, but the following error occurs.
  [ ... ]
Debugger entered--Lisp error: (void-function semantic-map-buffers)
  (semantic-map-buffers (function (lambda nil ...)))
  (cond (( arg 0) (remove-hook ... mode) (semantic-map-buffers ...) nil)
(( arg 0) (add-hook ... mode) (semantic-map-buffers ...) t) (t (memq mode
semantic-init-hooks)))
  semantic-toggle-minor-mode-globally(semantic-show-dirty-mode 1)
  (setq global-semantic-show-dirty-mode (semantic-toggle-minor-mode-globally
(quote semantic-show-dirty-mode) arg))
  global-semantic-show-dirty-mode(1)
  byte-code(,D

Hi,

  There is a require bug in semantic-util-modes.  The simplest short
term solution before I get my patch collection for semantic 1.4.1
together is to add this to your .emacs file in front of (require
'semantic)

(autoload 'semantic-map-buffers semantic-util)

  which will let Emacs know where to find it.

Eric

-- 
  Eric Ludlam: [EMAIL PROTECTED], [EMAIL PROTECTED]
   Home: www.ultranet.com/~zappoSiege: www.siege-engine.com
Emacs: http://cedet.sourceforge.net   GNU: www.gnu.org



Re[1]: Error when using eieio-0.17 with jde-2.2.9beta10.

2002-08-08 Thread Eric M. Ludlam

 Jake Gage [EMAIL PROTECTED] seems to think that:
Hey there,
  [ ... ]
  It looks like Eric Ludlam has released eieio-0.17 on 2002-08-06
(looks like two days ago), which beta10 doesn't seem to like (the CVS
version might already be changed, and I'd be much obliged if someone
could tell me if this is the case).  In any case, on:
  [ ... ]
Loading eieio-opt...done
The wrong version of Eieio is installed, please install 0.17beta3.


  Reverting my version of EIEIO and awaiting instructions.  Thanks much.

  [ ... ]

Howdy.

  All recent editions of my tools (semantic, eieio, and speedbar) now
have a function called `PACKAGENAME-require-version'.  JDE currently
has its own compare function.  The version requirement in my tools
will know when a new release of a tool is not BACKWARDS compatible,
and otherwise will allow newer versions to be used with a JDE released
with an olderversion.  It would be up to Paul to know when a needed
feature was introduced.

  I recommend that the JDE use these functions, as it will prevent
this type of problem with new releases in the future.

  I would guess it is ok to use eieio 0.17 with the JDE as it passes
the EIEIO 0.17beta4 tests.

Eric

-- 
  Eric Ludlam: [EMAIL PROTECTED], [EMAIL PROTECTED]
   Home: www.ultranet.com/~zappoSiege: www.siege-engine.com
Emacs: http://cedet.sourceforge.net   GNU: www.gnu.org



Re[1]: eieio-named is not a class?

2002-07-03 Thread Eric M. Ludlam

This happens sometimes when eieio is not byte compiled correctly.
Delete all .elc files in eieio, verify there is no other eieio on
your path, and re-run the Makefile.

Eric

 Hongbin Wang [EMAIL PROTECTED] seems to think that:
I am trying to install jde on emacs 21.1, I got the following error message.
Any idea? Thanks!
- hongbin

error message
Debugger entered--Lisp error: (error Given parent class eieio-named is not
a class)
  signal(error (Given parent class eieio-named is not a class))
  error(Given parent class %s is not a class eieio-named)
  (if (not (class-p ...)) (error Given parent class %s is not a class (car
pname)) (if (not ...) (aset ... class-children ...)) (mapcar (lambda ...
...) (class-option ... :custom-groups)) (aset newc class-parent (cons ...
...)))
  (if (and (car pname) (symbolp ...)) (if (not ...) (error Given parent
class %s is not a class ...) (if ... ...) (mapcar ... ...) (aset newc
class-parent ...)) (error Invalid parent class %s pname))
  (while pname (if (and ... ...) (if ... ... ... ... ...) (error Invalid
parent class %s pname)) (setq pname (cdr pname)))
  (progn (while pname (if ... ... ...) (setq pname ...)) (aset newc
class-parent (nreverse ...)))
  (if pname (progn (while pname ... ...) (aset newc class-parent ...)) (if
(eq cname ...) (if ... ...) (setq clearparent t) (if ... ...) (aset newc
class-parent ...)))
  (let* ((pname ...) (newc ...) (oldc ...) (groups nil) (options nil)
(clearparent nil)) (aset newc 0 (quote defclass)) (aset newc class-symbol
cname) (when oldc (aset newc class-children ...)) (cond (... ...) (... ...))
(setq options (if ... ... ...)) (if pname (progn ... ...) (if ... ... ...
... ...)) (set cname cname) (let (...) (fset csym ...)) (let (...) (fset
csym ...)) (eieio-copy-parents-into-subclass newc superclasses) (put cname
(quote eieio-class-definition) newc) (while fields (let* ... ... ... ... ...
... ... ... ... ... ... ... ...) (setq fields ...)) (aset newc
class-public-a (nreverse ...)) (aset newc class-public-d (nreverse ...))
(aset newc class-public-doc (nreverse ...)) (aset newc class-public-type
(apply ... ...)) (aset newc class-public-custom (nreverse ...)) (aset newc
class-public-custom-label (nreverse ...)) (aset newc
class-public-custom-group (nreverse ...)) (aset newc class-protection
(nreverse ...)) (aset newc class-initarg-tuples (nreverse ...)) (aset newc
class-class-allocation-type (apply ... ...)) (aset newc
class-class-allocation-values (apply ... ...)) (let* (... ... ... ... ...
... ...) (while pubsyms ... ... ... ... ...) (aset newc class-symbol-obarray
oa)) (fset cname (list ... ... ... ...)) (put cname (quote
variable-documentation) (class-option-assoc options :documentation)) (let
(...) (mapcar ... groups) (if ... ... ...)) (aset newc class-options
options) (if clearparent (aset newc class-parent nil)) (if (and ... ...)
(message Bootstrapping objects...done)) (let (...) (aset cache 0 ...)
(aset cache object-class cname) (aset cache object-name ...) (let ... ...)
(aset newc class-default-object-cache cache)) newc)
  eieio-defclass(semantic-cb-token (eieio-named eieio-speedbar) ((buttontype
:initform statictag) (buttonface :initform speedbar-tag-face) (token
:initarg :token :type semantic-token :documentation Semantic token which
represents a type.) (table :initarg :table :type semanticdb-table
:documentation This is the database table that `token' was found in.\nBe
sure to use this field when loading a token's file into memory.) (container
:initarg :container :type (or null semantic-cb-token) :documentation This
is the CB object containing this token.\nCB Containers are usually types
with attributes of methods.)) (A single semantic token.\nTokens
represented in the Class Browser database may not be loaded\nin memory, so
this forms the structure needed to access them.))
  (progn (eieio-defclass (quote semantic-cb-token) (quote ...) (quote ...)
(quote ...)))
  (eval-and-compile (eieio-defclass (quote semantic-cb-token) (quote ...)
(quote ...) (quote ...)))
  (defclass semantic-cb-token (eieio-named eieio-speedbar) ((buttontype
:initform statictag) (buttonface :initform speedbar-tag-face) (token
:initarg :token :type semantic-token :documentation Semantic token which
represents a type.) (table :initarg :table :type semanticdb-table
:documentation This is the database table that `token' was found in.\nBe
sure to use this field when loading a token's file into memory.) (container
:initarg :container :type ... :documentation This is the CB object
containing this token.\nCB Containers are usually types with attributes of
methods.)) A single semantic token.\nTokens represented in the Class
Browser database may not be loaded\nin memory, so this forms the structure
needed to access them.)
  eval-buffer(#buffer  *load*6 nil semantic-cb nil t)

load-with-code-conversion(c:/apps/emacs/emacs-21.1/site/semantic-1.4/semant
ic-cb.el semantic-cb nil t)
  require(semantic-cb)
  (progn (require (quote semantic-cb)) (require (quote 

Re[1]: speedbar and auto-moving of my mouse pointer

2002-05-31 Thread Eric M. Ludlam

If you select an item in speedbar via the mouse, the mouse should not
move.  If you use the keyboard, the act of moving keyboard focus to
the editing frame moves the mouse also.  Speedbar doesn't try to move
the mouse, it is just the frame switching code.  Try C-x 5 o after
making a few frames.  I think this is a side effect of supporting
focus follows mouse window managers.  (My personal favorite)

Eric

 Jim Snyder [EMAIL PROTECTED] seems to think that:
Dear Paul...

In my current version of JDEE, when I select a .java file from the =
speedbar, jdee properly loads the file, however my mouse cursor gets =
automatically moved to emacs' upper right corner.=20

Is this auto-moving of my mouse cursor part of speedbar? If so, how can =
I turn it off?

BTW, this happens when my X-server is either linux redhat 7.2 and exceed =
7.0 in which I've used for over the last 6 months but this auto-moving =
has been occurring for the last 1-2 months.


SunOS 5.8 Generic_108528-14 sun4u sparc SUNW,Ultra-2

EMACS 20.7.1

JDE_ELIB_VERSION=3D1.0
JDE_EIEIO_VERSION=3D0.17beta4
JDE_ECB_VERSION=3D1.31
JDE_COGRE_VERSION=3D0.2
JDE_VERSION=3D2.2.9beta9.1
JDE_SPEEDBAR_VERSION=3D0.14beta3
JDE_SEMANTIC_VERSION=3D1.4beta14
JDE_EDE_VERSION=3D1.0.beta2


Thanks...Jim


Jim Snyder
Chief Scientist
Copper Key Technologies
402 High Point Dr., #201
Cocoa, FL. 32926
www.copperkey.com
321.635.8194
[EMAIL PROTECTED]






Re[1]: Using semantic + import statement to open class source

2002-05-31 Thread Eric M. Ludlam

Hi,

  The function `semantic-find-nonterminal' will use
`semantic-find-dependency' on import statements.  This function in
turn uses `semantic-dependency-include-path' to seek out where a file
is.

  semantic-java does not yet support overloading
`semantic-find-dependency' nor `semantic-dependency-include-path'.  If
one of these mechanisms were extended in JDE's context, then tools
such as ECB, Speedbar, and Senator could all successfully jump to
imports without the need for specialty commands.  Doing so would be as
simple as using the existing code, and using semantic's function
overload facility to link them together.

  There is also the work that Paul mentioned he is doing in the
semantic database which I do not think touches upon either of these
two functions.  Perhaps semantic's find-dependency function should go
through semanticdb in the future.  (It was written before the
database.)

Have fun
Eric

 Timothy Babin [EMAIL PROTECTED] seems to think that:
Hi,
   I found the java-open package written by Rajeev Karunakaran to be
quite useful and quick.
I have written some functions which use the same concept but use semantic to
get the import statements instead
of reg-ex. This is very usefull if you don't have class files for the source
that you are looking for and for speed.
It would be nice if this could be used to open class source files before
using the beanshell or if the user could
specifiy which method to use first. It would also be nice to then fallback
to using tags.

Let me know what you think.


(defun jde-custom-find-fqimport (import-list class)
  Opens the source file for `class' if a fully qualified import statement
for
the class is found in `import-list' and returns t; returns nil otherwise.
Uses `jde-find-class-source' to open the file
  (let ((current-import)
(match-found nil)
(iterator import-list))
(while (and iterator (not match-found))
  (setq current-import (car (car iterator)))
  (message current-import)
  (if (string-match (concat .*\\. class \\') current-import)
  (progn
(if (not (jde-find-class-source current-import))
(message Can't find source))
(setq match-found t)))
  (setq iterator (cdr iterator)))
match-found
)
)

(defun jde-custom-find-starimport (import-list class)
  Opens the source file for `class' if a star import statement for
the class is found in `import-list' and returns t; returns nil otherwise.
Uses `jde-find-class-source' to open the file
  (let ((current-import)
(match-found nil)
(iterator import-list))
(while (and iterator (not match-found))
  (setq current-import (car (car iterator)))
  (message current-import)
  (if (string-match \\(.*\\.\\)\\* current-import)
  (progn
(setq current-import (replace-match \\1 t nil current-import))
(message found star import)
(message current-import)
(if (jde-find-class-source (concat current-import class))
(setq match-found t
  (setq iterator (cdr iterator)))
match-found
)
)


(defun jde-custom-open-class (optional unqual-class)
   Opens the source file for `class' if an import statement for
the class is found or the class is found in the current source file
directory or in java.lang.
Uses `jde-find-class-source' to open the file
 (interactive)
;;  (semantic-bovinate-toplevel t)
  (save-excursion
(let* ((class (or unqual-class
  (read-from-minibuffer Class:  (thing-at-point
'symbol
   (tokens (semantic-bovinate-toplevel t))
   (depends  (semantic-find-nonterminal-by-token 'include tokens)))
  (cond ((jde-custom-find-fqimport depends class))
((jde-custom-find-starimport depends class))
((progn
   ;; look for file in current directory
   (let ((fname (concat class .java)))
 (if (file-readable-p fname)
 (progn (find-file fname)  ; open file in current
dir
(message Opened %s (expand-file-name
fname)))
((jde-find-class-source (concat java.lang. class)))
((jde-open-class-source class))
)
  )))

(defun jde-custom-open-class-at-point()
  (interactive)
  (jde-custom-open-class (current-word)))




Tim Babin






Re[1]: local-set-key for Menu Classes - classes

2002-04-16 Thread Eric M. Ludlam

 =?ISO-8859-1?Q?=22Albert=2C_J=FCrgen=22?= [EMAIL PROTECTED] seems to 
think that:
is it possible to set a key (stroke) to the menu command Classes - Classes
-  I like this feature very much but dislike it to get a command only
with the mouse.
  [ ... ]

You can use the function `imenu' to get a text version of the imenu
menu.  (Unless I misunderstood your request.)

Eric

-- 
  Eric Ludlam: [EMAIL PROTECTED], [EMAIL PROTECTED]
   Home: www.ultranet.com/~zappoSiege: www.siege-engine.com
Emacs: http://cedet.sourceforge.net   GNU: www.gnu.org



Re[2]: Interfacing Java tools with JDEE

2002-03-26 Thread Eric M. Ludlam

 Nascif Abousalh-Neto[EMAIL PROTECTED] seems to think that:
  [ ... ]
 This doesn't really help the elisp illiterate plugin tool developer,
 but it would make it easy to create and maintain a plugin 
 interface for the JDEE.

What about doing it in the other direction: creating eieio classes
from existing Java classes? The generated eieio classes could extend basic
classes designed for easy integration into the JDEE plug-in framework.

Generating Lisp from Java seems to be more appropriate in this particular
problem, since typically the Java code will already exist (in the form of a
library or tool that we want to add to JDEE).
  [ ... ]

From my perspective (as a non-java programmer) a better idea might be
defining classes in a language agnostic form, such as XML.  This is
the same notion CORBA developers used when they created the C like
IDL (Interface Description Language, not the other IDL).  I don't
recommend IDL for this task, however. ;)

My intention for discussing such an interface with Paul was so I
could hack Emacs Lisp code, and have it display UML, or other types
of graphics via a slave Java process.

Eric

-- 
  Eric Ludlam: [EMAIL PROTECTED], [EMAIL PROTECTED]
   Home: www.ultranet.com/~zappoSiege: www.siege-engine.com
Emacs: http://cedet.sourceforge.net   GNU: www.gnu.org



Re[2]: jde glitches

2002-03-26 Thread Eric M. Ludlam

 Nicholas Sushkin [EMAIL PROTECTED] seems to think that:
In my case, every time the font-lock stops working, I get the following
message in *Messages*

Stack overflow in equal

I am using

Emacs  : GNU Emacs 20.7.1 (i386-redhat-linux-gnu, X toolkit)
 of Fri Mar 16 2001 on porky.devel.redhat.com
Package: JDE version 2.2.9beta9.1
Required packages: semantic-1.4beta13 eieio-0.17beta3 speedbar-0.14beta2
  [ ... ]

Hi,

  While I haven't had this problem, I am told the patch I posted to
  this list:

http://www.mail-archive.com/jde@sunsite.dk/msg04367.html

  fixed a segv and another issue.

  If this patch also fixes the stack/equal problem, please let me
  know as I haven't received confirmation for this bug instance.

Good Luck
Eric

-- 
  Eric Ludlam: [EMAIL PROTECTED], [EMAIL PROTECTED]
   Home: www.ultranet.com/~zappoSiege: www.siege-engine.com
Emacs: http://cedet.sourceforge.net   GNU: www.gnu.org



semantic 1.4beta14 patch to fix segv/font-lock death

2002-03-24 Thread Eric M. Ludlam

Hi,

  Paul told me rumors of a problem with the latest semantic causing
  font-lock to die in some versions of Emacs.  The attached patch
  should fix this problem for those older versions of Emacs.

  Apply the patch to semantic-imenu.el.

Enjoy
Eric

diff -r1.39.2.4 -r1.39.2.5
8c8
 ;; X-RCS: $Id: semantic-imenu.el,v 1.39.2.4 2002/03/07 01:26:51 zappo Exp $
---
 ;; X-RCS: $Id: semantic-imenu.el,v 1.39.2.5 2002/03/23 01:13:41 zappo Exp $
219c219,220
   (semantic-create-imenu-directory-index stream)
---
   (semantic-create-imenu-directory-index
 (or stream (semantic-bovinate-toplevel t)))

-- 
  Eric Ludlam: [EMAIL PROTECTED], [EMAIL PROTECTED]
   Home: www.ultranet.com/~zappoSiege: www.siege-engine.com
Emacs: http://cedet.sourceforge.net   GNU: www.gnu.org



Re[2]: Semantic 1.4beta11

2001-09-27 Thread Eric M. Ludlam

 Berndl, Klaus [EMAIL PROTECTED] seems to think that:
I installed the new package, and tried it on a C header file.  I have
several:

typedef struct
{
  blah,
  blah,
  blah

} blah_S;

like definitions in the file.  The *ECB Methods* buffer shows a:

  ^@

for each.  It looks like:

--
^@
^@
^@
^@
^@
[Variables][+]
--


Anyone else seen this?

Yes, me too.
It´s not a problem of ECB but of semantic; speedbar shows the same output.

Eric, do you know why this happens?

Klaus

An addition into the grammar caused the wrong information to be placed
in as the typedef name.  This will be fixed in beta 12.

Eric

-- 
  Eric Ludlam: [EMAIL PROTECTED], [EMAIL PROTECTED]
   Home: www.ultranet.com/~zappoSiege: www.siege-engine.com
Emacs: http://cedet.sourceforge.net   GNU: www.gnu.org