RE: Any way to customize where import generates the import statement?

2004-11-15 Thread Paul Kinnucan
Karr, David writes:
 > > -Original Message-
 > > From: Paul Kinnucan [mailto:[EMAIL PROTECTED] 
 > > 
 > > Karr, David writes:
 > >  > Nope, that didn't help.  I first tried just renaming the 
 > > "semantic"  > directory in the xemacs tree, which didn't 
 > > help, so then I tried  > specifically uninstalling that 
 > > package from the Xemacs installer, and  > that also didn't 
 > > help.  It still inserts the imports at the top of the  > file.
 > > 
 > > David,
 > > 
 > > Does the Classes menu appear in the Java source buffer into 
 > > which you are trying to import classes. If so, does this 
 > > message correctly display the variables and methods of the 
 > > classes in that buffer?
 > > 
 > > Does the senator menu?
 > 
 > I'm not sure where to look for either of those menus.  I don't see
 > either "classes" or "senator" as either a top-level or second-level menu
 > item.

The fact that these menus are missing means that semantic is not
operative in JDEE buffers on your system, which in turn explains why
imports don't work correctly. There is something wrong with your
setup. A full problem report should reveal what is wrong.
 
> 
 > > Also please post a complete problem report so that we don't 
 > > have to guess what your setup is.
 > 
 > Send it to "[EMAIL PROTECTED]" as it specifies?

No, post it to the list. The more eyes on your problem, the better.

Paul


 > 
 > > 
 > > Paul
 > > 
 > >  
 > >  > 
 > >  > > -Original Message-
 > >  > > From: Paul Kinnucan [mailto:[EMAIL PROTECTED] 
 > >  > > Sent: Monday, November 15, 2004 2:44 PM
 > >  > > To: Karr, David
 > >  > > Cc: [EMAIL PROTECTED]
 > >  > > Subject: RE: Any way to customize where import generates the 
 > >  > > import statement?
 > >  > > 
 > >  > > 
 > >  > > Karr, David writes:
 > >  > >  > Note that my setup did not "replace" the version of 
 > >  > > Semantic, I just put  > it in the load-path before other 
 > >  > > instances of Semantic (and I verified  > that by inspecting 
 > >  > > the value after startup).  The User Guide  > specifically 
 > >  > > says to REMOVE the older instances.  Is there any reason to  
 > >  > > > expect this might be my problem?
 > >  > > 
 > >  > > Yes. XEmacs seems to always load packages included in the 
 > >  > > distribution before any packages on the load-path.
 > >  > > 
 > >  > > Paul
 > >  > > 
 > >  > > 
 > >  > >  > 
 > >  > >  > > -Original Message-
 > >  > >  > > From: Paul Kinnucan [mailto:[EMAIL PROTECTED] 
 > >  > >  > > Sent: Sunday, November 14, 2004 10:02 PM
 > >  > >  > > To: Karr, David
 > >  > >  > > Cc: [EMAIL PROTECTED]
 > >  > >  > > Subject: RE: Any way to customize where import 
 > > generates the 
 > >  > >  > > import statement?
 > >  > >  > > 
 > >  > >  > > 
 > >  > >  > > Karr, David writes:
 > >  > >  > >  > I see now that the user guide just says it 
 > > inserts at the 
 > >  > >  > > head of the  > buffer, but the code appears to be a little 
 > >  > >  > > more sophisticated, where it  > tries to figure out 
 > > where it 
 > >  > >  > > should insert the import  > 
 > >  > >  > > (jde-import-get-import-insertion-point).  However, 
 > > the result 
 > >  > >  > > is the  > same.  It just inserts the new import before the 
 > >  > >  > > package statement.  I  > guess I'll try a little 
 > > debugging of 
 > >  > >  > > that function.
 > >  > >  > > 
 > >  > >  > > Hi David,
 > >  > >  > > 
 > >  > >  > > The import statements are supposed to be inserted AFTER the 
 > >  > >  > > package statement. That's how it's always worked for me and 
 > >  > >  > > how it worked when I just tested it by creating:
 > >  > >  > > 
 > >  > >  > > file Foo.java
 > >  > >  > > package jmath;
 > >  > >  > > 
 > >  > >  > > class Foo {
 > >  > >  > >  JButton button;
 > >  > >  > > }
 > >  > >  > > 
 > >  > >  > > and doing C-c C-v C-z with point on JButton. The 
 > > result is  > > 
 > >  > >  > > package jmath;
 > >  > >  > > 
 > >  > >  > > import javax.swing.JButton;
 > >  > >  > > 
 > >  > >  > > public class Foo {
 > >  > >  > >   JButton button;
 > >  > >  > > }
 > >  > >  > > 
 > >  > >  > > 
 > >  > >  > > I'm mystified that it works differently for you. 
 > > Please send 
 > >  > >  > > a test case that I can use to reproduce the bug.
 > >  > >  > > 
 > >  > >  > > Paul
 > >  > >  > > 
 > >  > >  > > 
 > >  > >  > >  > 
 > >  > >  > >  > > -Original Message-
 > >  > >  > >  > > From: Karr, David 
 > >  > >  > >  > > 
 > >  > >  > >  > > Is there any way to customize where import 
 > > statements are 
 > >  > >  > >  > > generated?  It presently inserts them at the 
 > > head of the 
 > >  > >  > >  > > buffer, which means I still have to move them 
 > > after they're 
 > >  > >  > >  > > generated.  I always put imports in a block 
 > > with no blank 
 > >  > >  > >  > > lines, after the "package" statement, with a 
 > > blank line 
 > >  > >  > >  > > before and after the block.  I see there are 
 > > options for 
 > >  > >  > >  > > specifyin

RE: Any way to customize where import generates the import statement?

2004-11-15 Thread Karr, David
> -Original Message-
> From: Paul Kinnucan [mailto:[EMAIL PROTECTED] 
> 
> Karr, David writes:
>  > Nope, that didn't help.  I first tried just renaming the 
> "semantic"  > directory in the xemacs tree, which didn't 
> help, so then I tried  > specifically uninstalling that 
> package from the Xemacs installer, and  > that also didn't 
> help.  It still inserts the imports at the top of the  > file.
> 
> David,
> 
> Does the Classes menu appear in the Java source buffer into 
> which you are trying to import classes. If so, does this 
> message correctly display the variables and methods of the 
> classes in that buffer?
> 
> Does the senator menu?

I'm not sure where to look for either of those menus.  I don't see
either "classes" or "senator" as either a top-level or second-level menu
item.

> Also please post a complete problem report so that we don't 
> have to guess what your setup is.

Send it to "[EMAIL PROTECTED]" as it specifies?

> 
> Paul
> 
>  
>  > 
>  > > -Original Message-
>  > > From: Paul Kinnucan [mailto:[EMAIL PROTECTED] 
>  > > Sent: Monday, November 15, 2004 2:44 PM
>  > > To: Karr, David
>  > > Cc: [EMAIL PROTECTED]
>  > > Subject: RE: Any way to customize where import generates the 
>  > > import statement?
>  > > 
>  > > 
>  > > Karr, David writes:
>  > >  > Note that my setup did not "replace" the version of 
>  > > Semantic, I just put  > it in the load-path before other 
>  > > instances of Semantic (and I verified  > that by inspecting 
>  > > the value after startup).  The User Guide  > specifically 
>  > > says to REMOVE the older instances.  Is there any reason to  
>  > > > expect this might be my problem?
>  > > 
>  > > Yes. XEmacs seems to always load packages included in the 
>  > > distribution before any packages on the load-path.
>  > > 
>  > > Paul
>  > > 
>  > > 
>  > >  > 
>  > >  > > -Original Message-
>  > >  > > From: Paul Kinnucan [mailto:[EMAIL PROTECTED] 
>  > >  > > Sent: Sunday, November 14, 2004 10:02 PM
>  > >  > > To: Karr, David
>  > >  > > Cc: [EMAIL PROTECTED]
>  > >  > > Subject: RE: Any way to customize where import 
> generates the 
>  > >  > > import statement?
>  > >  > > 
>  > >  > > 
>  > >  > > Karr, David writes:
>  > >  > >  > I see now that the user guide just says it 
> inserts at the 
>  > >  > > head of the  > buffer, but the code appears to be a little 
>  > >  > > more sophisticated, where it  > tries to figure out 
> where it 
>  > >  > > should insert the import  > 
>  > >  > > (jde-import-get-import-insertion-point).  However, 
> the result 
>  > >  > > is the  > same.  It just inserts the new import before the 
>  > >  > > package statement.  I  > guess I'll try a little 
> debugging of 
>  > >  > > that function.
>  > >  > > 
>  > >  > > Hi David,
>  > >  > > 
>  > >  > > The import statements are supposed to be inserted AFTER the 
>  > >  > > package statement. That's how it's always worked for me and 
>  > >  > > how it worked when I just tested it by creating:
>  > >  > > 
>  > >  > > file Foo.java
>  > >  > > package jmath;
>  > >  > > 
>  > >  > > class Foo {
>  > >  > >  JButton button;
>  > >  > > }
>  > >  > > 
>  > >  > > and doing C-c C-v C-z with point on JButton. The 
> result is  > > 
>  > >  > > package jmath;
>  > >  > > 
>  > >  > > import javax.swing.JButton;
>  > >  > > 
>  > >  > > public class Foo {
>  > >  > >   JButton button;
>  > >  > > }
>  > >  > > 
>  > >  > > 
>  > >  > > I'm mystified that it works differently for you. 
> Please send 
>  > >  > > a test case that I can use to reproduce the bug.
>  > >  > > 
>  > >  > > Paul
>  > >  > > 
>  > >  > > 
>  > >  > >  > 
>  > >  > >  > > -Original Message-
>  > >  > >  > > From: Karr, David 
>  > >  > >  > > 
>  > >  > >  > > Is there any way to customize where import 
> statements are 
>  > >  > >  > > generated?  It presently inserts them at the 
> head of the 
>  > >  > >  > > buffer, which means I still have to move them 
> after they're 
>  > >  > >  > > generated.  I always put imports in a block 
> with no blank 
>  > >  > >  > > lines, after the "package" statement, with a 
> blank line 
>  > >  > >  > > before and after the block.  I see there are 
> options for 
>  > >  > >  > > specifying how imports are grouped, but I 
> assume that's 
>  > >  > >  > > separate from where they're initially 
> inserted.  > >  > > 
>  > >  > > 
>  > > 
>  > > 
> 
> 


another bug in JDEE 2.3.4

2004-11-15 Thread Paul Kinnucan
Jon Schewe writes:
 > You did a nice job of making sure pipes are used when executing java for
 > everything, except ant.  Below is the advice required to fix it.
 > 
 > 
 > (defadvice jde-ant-build (around fix-for-process-connection-type-2)
 >   "Fix process type to be pipes for java"
 >   (let ((process-connection-type nil))
 > (setq ad-return-value ad-do-it)))
 > 

Hi John,

I've updated jde-ant.el to force use of pipes. I also simplified the
code for jde-ant-build, which was unnecessarily prolix. Would you
please download the updated file from the JDEE's CVS repository and
test it to make sure that I did not introduce any regressions.

Paul

 > 
 > -- 
 > Jon Schewe | http://mtu.net/~jpschewe
 > GPG signature at http://mtu.net/~jpschewe/gpg.sig.html
 > For I am convinced that neither death nor life, neither angels 
 > nor demons, neither the present nor the future, nor any 
 > powers, neither height nor depth, nor anything else in all 
 > creation, will be able to separate us from the love of God that 
 > is in Christ Jesus our Lord. - Romans 8:38-39
 > 
 > 
 > 
 > 
 >   
 >   
 > 
 > 
 > You did a nice job of making sure pipes are used when executing java for 
 > everything, except ant.  Below is the advice required to fix it.
 > 
 > (defadvice jde-ant-build (around fix-for-process-connection-type-2)
 >   "Fix process type to be pipes for java"
 >   (let ((process-connection-type nil))
 >     (setq ad-return-value ad-do-it)))
 > 
 > 
 > 
 > 
 > -- 
 > Jon Schewe | http://mtu.net/~jpschewe
 > GPG signature at http://mtu.net/~jpschewe/gpg.sig.html
 > For I am convinced that neither death nor life, neither angels 
 > nor demons, neither the present nor the future, nor any 
 > powers, neither height nor depth, nor anything else in all 
 > creation, will be able to separate us from the love of God that 
 > is in Christ Jesus our Lord. - Romans 8:38-39
 > 
 > 
 > 
 > 
 > 
 > 
 > 



Problem with JDEE 2.3.4

2004-11-15 Thread Paul Kinnucan
Jon Schewe writes:
 > Can you please not override efc-query-options-function with a function
 > that creates a dialog box even if the user has asked XEmacs not to
 > display them under any circumstances?  Please rewrite this to pay
 > attention to the use-dialog-box variable.
 > 
 > `use-dialog-box' is a variable declared in Lisp.
 >   -- loaded from "/usr/share/xemacs/21.4.15/lisp/minibuf.elc"
 > 
 > Value: nil
 > 
 > Documentation:
 > *Variable controlling usage of the dialog box.
 > If nil, the dialog box will never be used, even in response to mouse
 > events.

The documentation for this variable has the archaic clarity of an
oracle. However, I have made the requested change to efc-xemacs.el.

Paul

 > 
 > -- 
 > Jon Schewe | http://mtu.net/~jpschewe
 > GPG signature at http://mtu.net/~jpschewe/gpg.sig.html
 > For I am convinced that neither death nor life, neither angels 
 > nor demons, neither the present nor the future, nor any 
 > powers, neither height nor depth, nor anything else in all 
 > creation, will be able to separate us from the love of God that 
 > is in Christ Jesus our Lord. - Romans 8:38-39
 > 
 > 
 > 
 > 
 >   
 >   
 > 
 > 
 > Can you please not override efc-query-options-function with a function that 
 > creates a dialog box even if the user has asked XEmacs not to display them 
 > under any circumstances?  Please rewrite this to pay attention to the 
 > use-dialog-box variable.
 > 
 > `use-dialog-box' is a variable declared in Lisp.
 >   -- loaded from 
 > "/usr/share/xemacs/21.4.15/lisp/minibuf.elc"
 > 
 > Value: nil
 > 
 > Documentation:
 > *Variable controlling usage of the dialog box.
 > If nil, the dialog box will never be used, even in response to mouse 
 > events.
 > 
 > 
 > 
 > 
 > -- 
 > Jon Schewe | http://mtu.net/~jpschewe
 > GPG signature at http://mtu.net/~jpschewe/gpg.sig.html
 > For I am convinced that neither death nor life, neither angels 
 > nor demons, neither the present nor the future, nor any 
 > powers, neither height nor depth, nor anything else in all 
 > creation, will be able to separate us from the love of God that 
 > is in Christ Jesus our Lord. - Romans 8:38-39
 > 
 > 
 > 
 > 
 > 
 > 
 > 



RE: Any way to customize where import generates the import statement?

2004-11-15 Thread Paul Kinnucan
Karr, David writes:
 > Nope, that didn't help.  I first tried just renaming the "semantic"
 > directory in the xemacs tree, which didn't help, so then I tried
 > specifically uninstalling that package from the Xemacs installer, and
 > that also didn't help.  It still inserts the imports at the top of the
 > file.

David,

Does the Classes menu appear in the Java source buffer into which you
are trying to import classes. If so, does this message correctly
display the variables and methods of the classes in that buffer?

Does the senator menu?

Also please post a complete problem report so that we don't have to
guess what your setup is.

Paul

 
 > 
 > > -Original Message-
 > > From: Paul Kinnucan [mailto:[EMAIL PROTECTED] 
 > > Sent: Monday, November 15, 2004 2:44 PM
 > > To: Karr, David
 > > Cc: [EMAIL PROTECTED]
 > > Subject: RE: Any way to customize where import generates the 
 > > import statement?
 > > 
 > > 
 > > Karr, David writes:
 > >  > Note that my setup did not "replace" the version of 
 > > Semantic, I just put  > it in the load-path before other 
 > > instances of Semantic (and I verified  > that by inspecting 
 > > the value after startup).  The User Guide  > specifically 
 > > says to REMOVE the older instances.  Is there any reason to  
 > > > expect this might be my problem?
 > > 
 > > Yes. XEmacs seems to always load packages included in the 
 > > distribution before any packages on the load-path.
 > > 
 > > Paul
 > > 
 > > 
 > >  > 
 > >  > > -Original Message-
 > >  > > From: Paul Kinnucan [mailto:[EMAIL PROTECTED] 
 > >  > > Sent: Sunday, November 14, 2004 10:02 PM
 > >  > > To: Karr, David
 > >  > > Cc: [EMAIL PROTECTED]
 > >  > > Subject: RE: Any way to customize where import generates the 
 > >  > > import statement?
 > >  > > 
 > >  > > 
 > >  > > Karr, David writes:
 > >  > >  > I see now that the user guide just says it inserts at the 
 > >  > > head of the  > buffer, but the code appears to be a little 
 > >  > > more sophisticated, where it  > tries to figure out where it 
 > >  > > should insert the import  > 
 > >  > > (jde-import-get-import-insertion-point).  However, the result 
 > >  > > is the  > same.  It just inserts the new import before the 
 > >  > > package statement.  I  > guess I'll try a little debugging of 
 > >  > > that function.
 > >  > > 
 > >  > > Hi David,
 > >  > > 
 > >  > > The import statements are supposed to be inserted AFTER the 
 > >  > > package statement. That's how it's always worked for me and 
 > >  > > how it worked when I just tested it by creating:
 > >  > > 
 > >  > > file Foo.java
 > >  > > package jmath;
 > >  > > 
 > >  > > class Foo {
 > >  > >  JButton button;
 > >  > > }
 > >  > > 
 > >  > > and doing C-c C-v C-z with point on JButton. The result is  > > 
 > >  > > package jmath;
 > >  > > 
 > >  > > import javax.swing.JButton;
 > >  > > 
 > >  > > public class Foo {
 > >  > >   JButton button;
 > >  > > }
 > >  > > 
 > >  > > 
 > >  > > I'm mystified that it works differently for you. Please send 
 > >  > > a test case that I can use to reproduce the bug.
 > >  > > 
 > >  > > Paul
 > >  > > 
 > >  > > 
 > >  > >  > 
 > >  > >  > > -Original Message-
 > >  > >  > > From: Karr, David 
 > >  > >  > > 
 > >  > >  > > Is there any way to customize where import statements are 
 > >  > >  > > generated?  It presently inserts them at the head of the 
 > >  > >  > > buffer, which means I still have to move them after they're 
 > >  > >  > > generated.  I always put imports in a block with no blank 
 > >  > >  > > lines, after the "package" statement, with a blank line 
 > >  > >  > > before and after the block.  I see there are options for 
 > >  > >  > > specifying how imports are grouped, but I assume that's 
 > >  > >  > > separate from where they're initially inserted.
 > >  > > 
 > >  > > 
 > > 
 > > 



jde-complete generates imports I don't want

2004-11-15 Thread Paul Kinnucan
Kai Grossjohann writes:
 > 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.

Because there is a class named a on hyour classpath, the JDEE assumes
that you are trying to complete a static member of that class and
therefore creates an import statement for class a. As it is unlikely
that you will ever intend to use class a in your programs, you can
easily deal with this problem by excluding the org.apache.ecs class
from importation via jde-import-excluded-classes.


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

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.

Paul

 > 
 > 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: Any way to customize where import generates the import statement?

2004-11-15 Thread Karr, David
Nope, that didn't help.  I first tried just renaming the "semantic"
directory in the xemacs tree, which didn't help, so then I tried
specifically uninstalling that package from the Xemacs installer, and
that also didn't help.  It still inserts the imports at the top of the
file.

> -Original Message-
> From: Paul Kinnucan [mailto:[EMAIL PROTECTED] 
> Sent: Monday, November 15, 2004 2:44 PM
> To: Karr, David
> Cc: [EMAIL PROTECTED]
> Subject: RE: Any way to customize where import generates the 
> import statement?
> 
> 
> Karr, David writes:
>  > Note that my setup did not "replace" the version of 
> Semantic, I just put  > it in the load-path before other 
> instances of Semantic (and I verified  > that by inspecting 
> the value after startup).  The User Guide  > specifically 
> says to REMOVE the older instances.  Is there any reason to  
> > expect this might be my problem?
> 
> Yes. XEmacs seems to always load packages included in the 
> distribution before any packages on the load-path.
> 
> Paul
> 
> 
>  > 
>  > > -Original Message-
>  > > From: Paul Kinnucan [mailto:[EMAIL PROTECTED] 
>  > > Sent: Sunday, November 14, 2004 10:02 PM
>  > > To: Karr, David
>  > > Cc: [EMAIL PROTECTED]
>  > > Subject: RE: Any way to customize where import generates the 
>  > > import statement?
>  > > 
>  > > 
>  > > Karr, David writes:
>  > >  > I see now that the user guide just says it inserts at the 
>  > > head of the  > buffer, but the code appears to be a little 
>  > > more sophisticated, where it  > tries to figure out where it 
>  > > should insert the import  > 
>  > > (jde-import-get-import-insertion-point).  However, the result 
>  > > is the  > same.  It just inserts the new import before the 
>  > > package statement.  I  > guess I'll try a little debugging of 
>  > > that function.
>  > > 
>  > > Hi David,
>  > > 
>  > > The import statements are supposed to be inserted AFTER the 
>  > > package statement. That's how it's always worked for me and 
>  > > how it worked when I just tested it by creating:
>  > > 
>  > > file Foo.java
>  > > package jmath;
>  > > 
>  > > class Foo {
>  > >  JButton button;
>  > > }
>  > > 
>  > > and doing C-c C-v C-z with point on JButton. The result is  > > 
>  > > package jmath;
>  > > 
>  > > import javax.swing.JButton;
>  > > 
>  > > public class Foo {
>  > >   JButton button;
>  > > }
>  > > 
>  > > 
>  > > I'm mystified that it works differently for you. Please send 
>  > > a test case that I can use to reproduce the bug.
>  > > 
>  > > Paul
>  > > 
>  > > 
>  > >  > 
>  > >  > > -Original Message-
>  > >  > > From: Karr, David 
>  > >  > > 
>  > >  > > Is there any way to customize where import statements are 
>  > >  > > generated?  It presently inserts them at the head of the 
>  > >  > > buffer, which means I still have to move them after they're 
>  > >  > > generated.  I always put imports in a block with no blank 
>  > >  > > lines, after the "package" statement, with a blank line 
>  > >  > > before and after the block.  I see there are options for 
>  > >  > > specifying how imports are grouped, but I assume that's 
>  > >  > > separate from where they're initially inserted.
>  > > 
>  > > 
> 
> 


RE: Any way to customize where import generates the import statement?

2004-11-15 Thread Karr, David
Ok, I'll try moving the existing semantic package out of the way before
restarting it.

> -Original Message-
> From: Paul Kinnucan [mailto:[EMAIL PROTECTED] 
> Sent: Monday, November 15, 2004 2:44 PM
> To: Karr, David
> Cc: [EMAIL PROTECTED]
> Subject: RE: Any way to customize where import generates the 
> import statement?
> 
> 
> Karr, David writes:
>  > Note that my setup did not "replace" the version of 
> Semantic, I just put  > it in the load-path before other 
> instances of Semantic (and I verified  > that by inspecting 
> the value after startup).  The User Guide  > specifically 
> says to REMOVE the older instances.  Is there any reason to  
> > expect this might be my problem?
> 
> Yes. XEmacs seems to always load packages included in the 
> distribution before any packages on the load-path.
> 
> Paul
> 
> 
>  > 
>  > > -Original Message-
>  > > From: Paul Kinnucan [mailto:[EMAIL PROTECTED] 
>  > > Sent: Sunday, November 14, 2004 10:02 PM
>  > > To: Karr, David
>  > > Cc: [EMAIL PROTECTED]
>  > > Subject: RE: Any way to customize where import generates the 
>  > > import statement?
>  > > 
>  > > 
>  > > Karr, David writes:
>  > >  > I see now that the user guide just says it inserts at the 
>  > > head of the  > buffer, but the code appears to be a little 
>  > > more sophisticated, where it  > tries to figure out where it 
>  > > should insert the import  > 
>  > > (jde-import-get-import-insertion-point).  However, the result 
>  > > is the  > same.  It just inserts the new import before the 
>  > > package statement.  I  > guess I'll try a little debugging of 
>  > > that function.
>  > > 
>  > > Hi David,
>  > > 
>  > > The import statements are supposed to be inserted AFTER the 
>  > > package statement. That's how it's always worked for me and 
>  > > how it worked when I just tested it by creating:
>  > > 
>  > > file Foo.java
>  > > package jmath;
>  > > 
>  > > class Foo {
>  > >  JButton button;
>  > > }
>  > > 
>  > > and doing C-c C-v C-z with point on JButton. The result is  > > 
>  > > package jmath;
>  > > 
>  > > import javax.swing.JButton;
>  > > 
>  > > public class Foo {
>  > >   JButton button;
>  > > }
>  > > 
>  > > 
>  > > I'm mystified that it works differently for you. Please send 
>  > > a test case that I can use to reproduce the bug.
>  > > 
>  > > Paul
>  > > 
>  > > 
>  > >  > 
>  > >  > > -Original Message-
>  > >  > > From: Karr, David 
>  > >  > > 
>  > >  > > Is there any way to customize where import statements are 
>  > >  > > generated?  It presently inserts them at the head of the 
>  > >  > > buffer, which means I still have to move them after they're 
>  > >  > > generated.  I always put imports in a block with no blank 
>  > >  > > lines, after the "package" statement, with a blank line 
>  > >  > > before and after the block.  I see there are options for 
>  > >  > > specifying how imports are grouped, but I assume that's 
>  > >  > > separate from where they're initially inserted.
>  > > 
>  > > 
> 
> 


RE: Any way to customize where import generates the import statement?

2004-11-15 Thread Paul Kinnucan
Karr, David writes:
 > Note that my setup did not "replace" the version of Semantic, I just put
 > it in the load-path before other instances of Semantic (and I verified
 > that by inspecting the value after startup).  The User Guide
 > specifically says to REMOVE the older instances.  Is there any reason to
 > expect this might be my problem?

Yes. XEmacs seems to always load packages included in the distribution
before any packages on the load-path.

Paul


 > 
 > > -Original Message-
 > > From: Paul Kinnucan [mailto:[EMAIL PROTECTED] 
 > > Sent: Sunday, November 14, 2004 10:02 PM
 > > To: Karr, David
 > > Cc: [EMAIL PROTECTED]
 > > Subject: RE: Any way to customize where import generates the 
 > > import statement?
 > > 
 > > 
 > > Karr, David writes:
 > >  > I see now that the user guide just says it inserts at the 
 > > head of the  > buffer, but the code appears to be a little 
 > > more sophisticated, where it  > tries to figure out where it 
 > > should insert the import  > 
 > > (jde-import-get-import-insertion-point).  However, the result 
 > > is the  > same.  It just inserts the new import before the 
 > > package statement.  I  > guess I'll try a little debugging of 
 > > that function.
 > > 
 > > Hi David,
 > > 
 > > The import statements are supposed to be inserted AFTER the 
 > > package statement. That's how it's always worked for me and 
 > > how it worked when I just tested it by creating:
 > > 
 > > file Foo.java
 > > package jmath;
 > > 
 > > class Foo {
 > >  JButton button;
 > > }
 > > 
 > > and doing C-c C-v C-z with point on JButton. The result is
 > > 
 > > package jmath;
 > > 
 > > import javax.swing.JButton;
 > > 
 > > public class Foo {
 > >   JButton button;
 > > }
 > > 
 > > 
 > > I'm mystified that it works differently for you. Please send 
 > > a test case that I can use to reproduce the bug.
 > > 
 > > Paul
 > > 
 > > 
 > >  > 
 > >  > > -Original Message-
 > >  > > From: Karr, David 
 > >  > > 
 > >  > > Is there any way to customize where import statements are 
 > >  > > generated?  It presently inserts them at the head of the 
 > >  > > buffer, which means I still have to move them after they're 
 > >  > > generated.  I always put imports in a block with no blank 
 > >  > > lines, after the "package" statement, with a blank line 
 > >  > > before and after the block.  I see there are options for 
 > >  > > specifying how imports are grouped, but I assume that's 
 > >  > > separate from where they're initially inserted.
 > > 
 > > 



RE: Any way to customize where import generates the import statement?

2004-11-15 Thread Karr, David
Note that my setup did not "replace" the version of Semantic, I just put
it in the load-path before other instances of Semantic (and I verified
that by inspecting the value after startup).  The User Guide
specifically says to REMOVE the older instances.  Is there any reason to
expect this might be my problem?

> -Original Message-
> From: Paul Kinnucan [mailto:[EMAIL PROTECTED] 
> Sent: Sunday, November 14, 2004 10:02 PM
> To: Karr, David
> Cc: [EMAIL PROTECTED]
> Subject: RE: Any way to customize where import generates the 
> import statement?
> 
> 
> Karr, David writes:
>  > I see now that the user guide just says it inserts at the 
> head of the  > buffer, but the code appears to be a little 
> more sophisticated, where it  > tries to figure out where it 
> should insert the import  > 
> (jde-import-get-import-insertion-point).  However, the result 
> is the  > same.  It just inserts the new import before the 
> package statement.  I  > guess I'll try a little debugging of 
> that function.
> 
> Hi David,
> 
> The import statements are supposed to be inserted AFTER the 
> package statement. That's how it's always worked for me and 
> how it worked when I just tested it by creating:
> 
> file Foo.java
> package jmath;
> 
> class Foo {
>  JButton button;
> }
> 
> and doing C-c C-v C-z with point on JButton. The result is
> 
> package jmath;
> 
> import javax.swing.JButton;
> 
> public class Foo {
>   JButton button;
> }
> 
> 
> I'm mystified that it works differently for you. Please send 
> a test case that I can use to reproduce the bug.
> 
> Paul
> 
> 
>  > 
>  > > -Original Message-
>  > > From: Karr, David 
>  > > 
>  > > Is there any way to customize where import statements are 
>  > > generated?  It presently inserts them at the head of the 
>  > > buffer, which means I still have to move them after they're 
>  > > generated.  I always put imports in a block with no blank 
>  > > lines, after the "package" statement, with a blank line 
>  > > before and after the block.  I see there are options for 
>  > > specifying how imports are grouped, but I assume that's 
>  > > separate from where they're initially inserted.
> 
> 


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.