jde-build suggestion: use C-u for args

2004-12-15 Thread Kai Grossjohann
I suggest that C-u C-c C-v C-b invert the meaning of the
jde-read-{make,ant}-args flag.

I often want to issue the same build command, but sometimes a
different one.  So I set jde-read-make-args to t, but now I have to
press an extra key in 99% of the build invocations: C-c C-v C-b RET.

What do people think?

Kai



Re: first time emacs and JDE --having problem with JDE Configuration

2004-12-07 Thread Kai Grossjohann
"Sharif Sharif M" <[EMAIL PROTECTED]> writes:

> yes it does exist the file. Now what i did is i copied that file to my home 
> directory
> /home/Owner/common/cedet.el  then i modified .emacs file. Now i am not 
> getting the same error but i am getting this error now require(inversion).. 
> File error: "Cannot open load file", "inversion". any idea how to fix this 
> problem..

You mustn't copy the cedet.el file.  Instead, specify the correct path
in your ~/.emacs file.

Inside Emacs, use C-x C-f and filename completion with TAB to find out
which name to specify for the cedet.el that's part of your tarball.

Kai




Re: first time emacs and JDE --having problem with JDE Configuration

2004-12-06 Thread Kai Grossjohann
"Sharif Sharif M" <[EMAIL PROTECTED]> writes:

> i am having problem of configuring JDE. i have installed emacs latestone as
> well as JDE latest one .. can anyone tell me step by step what i need to do
> to install all the packegs and where i will be copying all the packegs.
> thank you so much in advance..

Well, there are installation instructions, but you don't say whether
you read them or not.

Also, you don't say what's failing.  Did you install Emacs?  Does it
work?  What was the next step after installing Emacs?  How did you
verify that this step worked?  Which other steps did you take before
things failed?  When it failed, what did you attempt to do?  What
happened when you did that?  What did you expect to happen?

It isn't nice to answer questions with counter-questions, but I can't
think of anything else that might help you.

Kai



Re: Problems with cvs-gtk2-emacs

2004-12-02 Thread Kai Grossjohann
Carsten Weinberg <[EMAIL PROTECTED]> writes:

> jdee doesn't work with cvs-gtk2-emacs. Any idea?

I think that the most recent Emacs CVS reverted the change that broke
this.

Anyhow, you can easily search for the spot where it tries to add stuff
to the Files menu.  It changed its name between `file' and `files', or
was it `file' and `File'?

Kai




Investigating quickfix functionality

2004-11-28 Thread Kai Grossjohann
I had been using Eclipse for some time a year ago.  One thing I really
liked about it was the quickfix functionality.  When the compiler
found an error in your source code, you could hit Ctrl+1 to pop up a
little menu which suggested some remedies.

Because I missed it so much, I investigate whether it would be
possible to get this in Emacs, as well.  It seems it would be possible
in principle.

This version only knows two kinds of errors: unreported exception, and
cannot resolve symbol class Foo.

I'd appreciate any comments or help or patches.

What do people think?

Kai



qfix.el
Description: qfix.el


Re: Preconfigure align.el?

2004-11-25 Thread Kai Grossjohann
Paul Kinnucan <[EMAIL PROTECTED]> writes:

> Perhaps because Emacs does not support the notion of mode inheritance,
> i.e., the value of major-mode in a jde-mode buffer is 'jde-mode, not
> '(cc-mode java-mode jde-mode) so align has no way of knowing that
> jde-mode is a subclass of java-mode.

Well, adding mode inheritance would be cool, but having JDEE
preconfigure align.el would be easy enough to do in the interim.

Or should I ask align.el to be changed to know JDEE?

Kai



Which buffer is compilation buffer created by C-c C-v C-b?

2004-11-25 Thread Kai Grossjohann
If I do C-c C-v C-b, how do I later find the *compilation* buffer
created by the command?

If I do M-x compile RET, then I can access the variable
next-error-last-buffer.

Kai



Preconfigure align.el?

2004-11-25 Thread Kai Grossjohann
I have this in ~/.emacs:

(eval-after-load "align"
  '(add-to-list 'align-c++-modes 'jde-mode))

(java-mode is already listed there by default.)

WIBNI this happened automatically?

Kai



Re: jde-complete generates imports I don't want

2004-11-18 Thread Kai Grossjohann
Paul Kinnucan <[EMAIL PROTECTED]> writes:

> Based on this experiment, I believe that JDEE 2.3.4 handles the test
> case that you presented correctly within its limitations, i.e., that
> it only imports and completes things that are on the classpath.

I verified that the same thing happens with the test case in my
environment.  I didn't realize that one has to compile both *.java
files to make it work.

So now I need to work on getting a test case that demonstrates the
problem: the problem still happens with the real code that I'm
editing.

One difference between the test case and the real code is that the
real code is compiled, jared (jarred? jar'd?) and the *.jar file is in
$CLASSPATH.  But the *.class files are NOT in $CLASSPATH.

Another difference is that the real project has a prj.el file whereas
the test case didn't have one.


I'm sure that this is pilot error; I just don't know what I'm doing
wrong.

Kai



Re: jde-complete generates imports I don't want

2004-11-17 Thread Kai Grossjohann
Paul Kinnucan <[EMAIL PROTECTED]> writes:

> Kai Grossjohann writes:
>  > Paul Kinnucan <[EMAIL PROTECTED]> writes:
>  > 
>  > > Kai Grossjohann writes:
>  > >  > Then position point after "this." and invoke jde-complete (in one of
>  > >  > its flavors).  Observe how it adds an import statement for
>  > >  > javax.swing.Action.
>  > >
>  > > This is because javax.swing.Action is the only class on the classpath
>  > > at this point. Compile your Action class and then retry the completion.
>  > > The JDEE should then prompt you to choose one of the Action classes
>  > > to import.
>  > 
>  > Hm.  I just invoked "javac Action.java", then tried again.  Now I get
>  > "no completion".  The environment variable $CLASSPATH starts with
>  > ".:", and Action.class is in the current working directory, together
>  > with Action.java and BTest.java.
>
> What is the setting of jde-resolve-relative-paths-p?

t

Kai




Re: jde-complete generates imports I don't want

2004-11-16 Thread Kai Grossjohann
Paul Kinnucan <[EMAIL PROTECTED]> writes:

> Kai Grossjohann writes:
>  > Then position point after "this." and invoke jde-complete (in one of
>  > its flavors).  Observe how it adds an import statement for
>  > javax.swing.Action.
>
> This is because javax.swing.Action is the only class on the classpath
> at this point. Compile your Action class and then retry the completion.
> The JDEE should then prompt you to choose one of the Action classes
> to import.

Hm.  I just invoked "javac Action.java", then tried again.  Now I get
"no completion".  The environment variable $CLASSPATH starts with
".:", and Action.class is in the current working directory, together
with Action.java and BTest.java.

But this was just a test case, in the real code that I've got, I see
the same behavior I described originally, even though the code has
been compiled many times on this machine already, and a corresponding
*.jar file is mentioned in $CLASSPATH.

Originally, I thought that the problem comes from the "import foo.*"
statements in the *.java file -- I normally don't use asterisks in
import statements but the author of the file in question doesn't want
me to expand them.  Then I made this test case and observed the same
error.

What can I do to track down the problem?  Something weird must be
going on, but I don't know where to start looking.

Kai



jde-complete generates imports I don't want

2004-11-15 Thread Kai Grossjohann
Create a file A.java with the following contents:

public class A {
public static int main(String[] args)
{
A a = new A();
a.@
}
}

Position point on "@", delete the character, then hit C-c C-v . and
observe how it adds "import org.apache.ecs.xhtml.a;" to the beginning
of the file.

Or this one: create a file Action.java that looks like this:

public class Action {
public int foo() {
return 42;
}
}

Then create a file BTest.java that looks like this:

public class BTest extends Action {
public int bar() {
return this.
}
}

Then position point after "this." and invoke jde-complete (in one of
its flavors).  Observe how it adds an import statement for
javax.swing.Action.

Is it pilot error?

Is it just me?

Kai

PS: Using jde 2.3.4 on GNU Emacs 21.3.50.1 (i386-pc-linux-gnu, X
toolkit, Xaw3d scroll bars) of 2004-11-02 on ketchup, modified by
Debian.



Re: cedet-version

2004-06-04 Thread Kai Grossjohann
George Flaherty <[EMAIL PROTECTED]> writes:

>  (load-file "~/.emacs.d/site-lisp/cedet/common/cedet.el") 

FWIW, it seems that the above line is sufficient, at least in Emacs.

(I also frob Info-default-directory-list, but that's just the docs.)

Kai



Re: auto newline, indent and close brace on open brace, return

2004-03-14 Thread Kai Grossjohann
Suraj Acharya <[EMAIL PROTECTED]> writes:

> Intellij does this thing where if you type a open curly brace and then
> a return it inserts a matching closing brace and puts point
> on a empty line between the braces and indents the two newlines.

This functionality is a good thing.  However, I'm a little bit afraid
that people reinvent the wheel in lots of places.  For example, why
shouldn't C programmers be able to take advantage of this?

There is a package in Emacs already that allows paired insertion of
parentheses.  Maybe it is sufficient to augment this package with
doing newline and indentation?

"(autotype)Inserting Pairs" is the right info node, I believe.

Hm.

Of course, your functionality is different: you pair the brace only on
the subsequent newline.  Hm.  So maybe skeleton-pair is not the right
feature after all.

But still, why shouldn't other programmers also benefit?

Kai




Re: Trying to understand completion behaviour

2004-03-03 Thread Kai Grossjohann
Paul Kinnucan <[EMAIL PROTECTED]> writes:

> So supposing somebody took the trouble to implement completion of
> class names, how do you think the user should convey to the JDEE that
> they are seeking completion of the constructor as opposed to
> completion of a class name?

Foo completes to FooBar, FooBar( gives a list of
constructors for this class.

Replace M-TAB with whatever key you use for completion.

Kai



C-c C-v C-z adds many newlines

2004-02-18 Thread Kai Grossjohann
I open a file ~/tmp/foo.java and type the following into it:

// begin file
package tmp;

public interface foo
{
public String frob() throws IOException;
}
// end file

The package line is the first line in the file, and the } line is the
last line in the file.

I position point on the word IOException and type C-c C-v C-z RET.
Here is the result:

// begin file
package tmp;

import java.io.IOException;



public interface foo
{
public String frob() throws IOException;
}
// end file

There are now three empty lines after the import statement.  When the
package statement is missing, no empty line is inserted by C-c C-v
C-z.

How do I tell JDEE to insert fewer than three empty lines?  One is
enough, IMVHO.

Kai



Re: speeding up variable loading

2004-02-17 Thread Kai Grossjohann
Phillip Lord <[EMAIL PROTECTED]> writes:

> But I still like setting things in my .emacs because its easier to
> version and comment.

I believe you can add comments to customizations.

Kai



Re: speeding up variable loading

2004-02-15 Thread Kai Grossjohann
Phillip Lord <[EMAIL PROTECTED]> writes:

> It's an accident, as far as I know. The project file system would be
> nice to have working outside of JDE I think. 

Oh, yes!

Kai




Looking for traditional alternative to C-c C-v C-.

2004-02-02 Thread Kai Grossjohann
C-c C-v C-. displays a popup menu.  C-c C-v . does cycling
completion.

But I prefer the traditional method for completion that's more like
TAB in the shell: completing once inserts a substring of all possible
completions.  Completing again shows a *Completions* window listing
the possibilities, then entering another character to disambiguate and
completing again will insert more substrings.

Is this possible with JDEE?

Kai



Re: O.T. Regexp question

2004-01-27 Thread Kai Grossjohann
"Tim Werner" <[EMAIL PROTECTED]> writes:

> I want to open the log file with emacs, and do a
> "search-forward-regexp" to look for lines that do NOT end with "same
> date".  It turns out that I am too stoopid to figure out how to
> construct the correct regexp.

IMHO it is better to use another Emacs feature to do what you need.
For example, you could delete all lines that end with "same date",
using the flush-lines command.  Then all remaining lines are the ones
you're looking for.  Or, you write a function that looks if the
current line ends with "same date".  If not, then stop, else go one
line forward and repeat.

If it MUST be a regexp, then the idea behind it is this: a line that
does not end with "same date" is a line that does not end with "e", or
a line that ends with "e" but the character before that is not "t", or
a line that ends with "te" but the character before that is not "a",
and so on.

Here is a beginning to express this kind of logic:

[^e]$\\|[^t]e$\\|[^a]te$\\|...

You may have to add some rules for lines that are too short.  The
above logic would not find the line "ame date", for example, because
it expects a character before the "ame date".  Of course,

^$\\|^.$\\|^..$

will match lines of up to two characters, but no longer lines.

Kai




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

2003-12-18 Thread Kai Grossjohann
"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?

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 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.

So would it work in practice to "just" use an augmented Lisp reader as
the lexer?

Kai



JSP completion

2003-10-26 Thread Kai Grossjohann
I had a quick peek and found out that JDEE uses bsh to find the
completion for some classes.  So in theory it ought to be possible to
kludge it so that it first compiles the *.jsp to a *.java by invoking
Tomcat (say), and then have it compile the *.java, and then bsh can do
its thing.

Right?

How would one go about this?

I apologize for claiming previously that JDEE wasn't able to do
completion in JSP files.  Shame on me.

Kai




Re: Extend abstract class: Just one method? Parameter names?

2003-10-20 Thread Kai Grossjohann
Paul Kinnucan <[EMAIL PROTECTED]> writes:

> Yes, you can use the JDEE's override method wizard with the current
> version of the JDEE and versions of the JDK before JDK
> 1.4. Unfortunately, a change in Java reflection introduced in JDK
> 1.4 prevents the method override wizard in the current production
> and beta versions of the JDEE from overriding abstract methods
> declared or inherited by a class. I've fixed this for the next
> release.

Cool!  Then I just wait a little bit, and then it will work.

Do you think it's a good idea to try the betas, btw?

Kai




Make imenu more appropriate for interactive use?

2003-10-06 Thread Kai Grossjohann
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.