RE: compile error to source links

2001-07-12 Thread Troy Daniels

At 03:30 PM 7/12/01 -0400, Javier Lopez wrote:
   Where is compile.el. I checked the emacs lisp directory and 
 xemacs-packages directory. I could not find it. I am using XEmacs 21
In the distribution of Emacs I am using is in 
emacs-root/lisp/progmodes/compile.el


Depending on how emacs was installed, there may only be compile.elc and not 
compile.el.  The .elc file is a compiled version of the .el file, and not 
human-readable.  In that case, you would have to find an emacs distribution 
that includes the lisp sources.

Troy

Javier




Re: A func to insert Timer code?

2002-01-24 Thread Troy Daniels

I think a better template to use is the following:

// Original version
int getValue() {
   return super.getValue() * 5;
}

// Instrumented version
int getValue() {
   try {
 Timer.startTimer(Test.getValue());
  return super.getValue() * 5;
   } finally {
 Timer.stopTimer(Test.getValue());
   }
}

This also handles correctly cases where there are multiple return 
statements, and you get timing information even if there's an 
exception.  The implementation is fairly simple:

(beginning-of-defun)
(insert try {\n  Timer.startTime( (get-function-name) );\n)
(end-of-defun)
(insert } finally {\n  Timer.stopTimer( (get-function-name) );\n}\n)

This isn't quite right.  At least on my emacs, the defun functions put you 
on the wrong side of the braces.  get-function-name is probably also not 
the right function name, but there is some function that does that.  (The 
name shows up in my modeline, so probably semantic/senator knows it.)

Troy

At 09:02 PM 1/24/02 +0100, Paul Ebermann wrote:
Altmann, Michael skribis:

  I have been using xemacs and jde for quite a while, but I am not much of an
  elisp programmer.  Could someone help me (or point me to the appropriate
  online resource) write the following elisp function?  I have a java class
  called Timer that I use to time various chunks of code.  It has methods
  startTimer and stopTimer that should surround any code I want to time.  I
  would like an elisp function to insert calls to Timer for the current java
  method.  For example, given a java program that looks like
 
[...]
 
  I would like code inserted like
 
[...]
  void bar() {
  Timer.startTimer(Test.bar);
  int x=3;
  Timer.stopTimer(Test.bar);
  }
  }

(Sorry for missing tabs, my newsreader ignores or deletes them.)

What should be done here?
---
int getValue() {
 return super.getValue()*5;
}
---
The simple Version
---
int getValue() {
 Timer.startTimer(Test.getValue());
 Timer.stopTimer(Test.getValue());
 return super.getValue() * 5;
}
---
is not really helpful (it does not time
anything time-consuming).
You may need something like
---
int getValue() {
 Timer.startTimer(Test.getValue());
 int temp = super.getValue() * 5;
 Timer.stopTimer(Test.getValue());
 return temp;
}
---
So your function has to choose a name for a
temporary variable, and using the right type ...


Sorry, this does not really help, but only
shows a possible problem.

Paul

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




Byte-compiling (Was RE: JDE config problem?)

2002-02-12 Thread Troy Daniels

At 09:07 AM 2/12/02 -0500, Paul Kinnucan wrote:
Berndl, Klaus writes:
   I've run the JDE with eieio both compiled and uncompiled and I've
   never noticed any difference in performance.  Further, I can't imagine
   why it should cause bad performance.  eieio is not used to do any
   computationally intensive tasks.
  

On a related but orthogonal note, do you have an idea how byte-compiling 
would affect memory usage?  Most (all?) of the time when a JDE command is 
slow, I'm fairly certain that it's because I'm low on memory and the 
program is swapping.  (Compiling with the compile server often takes less 
than a second, but can take more than 15.)

Troy

   First of all not only JDE uses eieio but also semantic which in turn
   is used by JDE.
  
   Secondly macros  defsubst functions are inlined if byte-compiled
   and eieio has a lot of them (if i remember right, Eric has told
   me this).
   BTW: This argument would also recommend, that we should
   semantic byte-compile!
  
   But here comes the original explanation from Eric, the author of eieio:
  
   Byte compilation converts the lisp program into a stack based program
   with integer IDs for all built-in symbols.  The core of EIEIO uses
   almost all built in commands (like car, cdr, assoc, etc).  In
   particular, the method dispatch mechanism does a lot of work.  When
   EIEIO core is not byte compiled, the method dispatch runs between
   every single EIEIO method call.  The byte compilation step speeds
   this up a lot.
  
   Therefore my strong recommendation: At least eieio and semantic
   should be byte-compiled.
   And for other packages it is IMHO at least a good way to detect some
   errors...
  
   If you have noticed bad performance, I'd like to know under what
   circumstances so that I can investigate. There may be ways to
   improve the performance.
  
   Yes, just byte-compile eieio and semantic :-)

Klaus,

I don't doubt that byte-compiling eieio improves performance. What I
doubt is that byte-compiling eieo improves JDE performance
perceptibly. The JDE does not use eieio for any computation-intensive
tasks. A few microseconds of difference in the execution of a debugger
step command or the creation of a dialog buffer is not going to be
perceptible to a human being with ordinary powers of perception. My
experience running the JDE with eieio both compiled and uncompiled
confirms this. On the other hand, incorrectly compiling eieo does make
a PERCEPTIBLE difference in the response time of JDEE commands. It
increases the response time to INFINITY and forces me to repeatedly
having to tutor new users on the correct way to byte-compile sets of
interdependent Lisp files. This takes up a significant portion of my
time, which is why I try to discourage people, especially novices,
from byte compiling the JDE. The only way you are going to convince me
to change this policy is to cite a SPECIFIC JDE command that is
PERCEPTIBLY improved by byte-compiling eieio.

As for semantic, compiling semantic does shorten loading of large Java
files but otherwise does not make a significant enough difference, in
my opinion, to warrant encouraging new users to compile the JDE.

I've used a lot of Emacs applications and the only one that I have
used where compilation is absolutely necessary is psgml because
compiling psgmal reduces parsing of the Docbook DTD from hours to a
few seconds.


- Paul

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




Re: Why JDEE ?

2002-02-25 Thread Troy Daniels

At 01:30 PM 2/25/02 -0500, Paul Kinnucan wrote:
John Cobo writes:
   Paul,
  
   Am I correct in thinking that your JDEE allows a
   single set up of the JDK, Emacs, Tomcat, Web server,
   any shared JAR, WAR files for the development team,
   etc. on a shared server.  Developers can then 'simply'
   access the environment through a window on to the
   server ?
  

Do you mean use a shell window running
on a PC to open an instance of Emacs on a Unix server
and then interact with the Emacs running on Unix
through the shell window running on the PC? Although
I've never tried working this way, I'm pretty sure
it would break some of the JDEE's features. A better
bet would be to run X Servers on the PCs that would
allow the PC users to start instances of Emacs on
the Unix server that could then display on the PC
in a full window that supports all JDEE features.
You could use the server to maintain a shared
source code repository from which developers created
their own sandboxes on their PCs.

At my company, the Unix disks can be mounted on the PC using samba, so that 
it looks like a network drive.  I then run emacs on my PC, and can read and 
compile the files on the Unix disk.  Actually running the code requires a 
window on the Unix machine*.  This may work better or worse, depending on 
(at least) the availability of samba, and whether the net lag is worse for 
interacting with emacs or for writting the class files.

Troy

* You could probably configure jde to execute an rsh command to run the code.
Troy Daniels
[EMAIL PROTECTED]
781-273-3388 x218




Re: Why JDEE ?

2002-02-25 Thread Troy Daniels

At 08:56 PM 2/25/02 +, Phillip Lord wrote:
  Troy == Troy Daniels [EMAIL PROTECTED] writes:

   Troy At 01:30 PM 2/25/02 -0500, Paul Kinnucan wrote:
John Cobo writes:  Paul,

 Am I correct in thinking that your JDEE allows a single set up
of the JDK, Emacs, Tomcat, Web server, any shared JAR, WAR files
for the development team, etc. on a shared server.  Developers
can then 'simply' access the environment through a window on to
the server ?


   Troy At my company, the Unix disks can be mounted on the PC using
   Troy samba, so that it looks like a network drive.  I then run
   Troy emacs on my PC, and can read and compile the files on the Unix
   Troy disk.  Actually running the code requires a window on the Unix
   Troy machine*.  This may work better or worse, depending on (at
   Troy least) the availability of samba, and whether the net lag is
   Troy worse for interacting with emacs or for writting the class
   Troy files.

 Another possibility would be to have a go with TRAMP, which
is ange-ftp for the new millenium. I use it across ssh, which works
very well.

 I've not tried it on windows though, and I don't know how
much JDE functionality it would break. I'd be interested to know.

I expect that it breaks compiling and running.  Assuming it uses 
ange-ftp-style names,  c:\jdk1.3.1\javac \\user@host:\dir\file.java is 
unlikely to succeed.  :-)

Troy

 Phil



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




JDEbug and LinkedList

2003-01-10 Thread Troy Daniels
Hello,

There appears to be a bug in JDEbug regarding circular references.  I was 
trying to look at a java.util.LinkedList.  The implementation in my JDK 
uses a class like the following:

class LLNode {
  Object element;
  LLNode next;
  LLNode previous;
}

where next and previous point to the next and previous elements of the 
list.  Looking at the first element was fine.  I clicked on the reference 
to the first LLNode, and expanded element.  When I tried to look at the 
second element by expanding next, the mechanism to presever the expanded 
state imploded.  It expanded the LLNode for next, then next.previous, then 
next.previous.next, and so on, looping between those two two objects until 
it hit some iteration limit.

As a result, I couldn't look at any local variables.  It apparently even 
failed to set up the properties so that I could close the objects.  This 
persisted through exiting the debugger and starting a new run.

In general, the mechanism is good and user full, but is there a way to turn 
if off in cases like this?

Troy


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



Re: cc-mode indenting

2003-02-06 Thread Troy Daniels
At 11:42 AM 2/6/2003 -0500, Le Wang wrote:


Hi,

This is the current indentation style:

code
gmo.options = MQC.MQGMO_WAIT |
  MQC.MQGMO_FAIL_IF_QUIESCING |
  MQC.MQGMO_SYNCPOINT |
  MQC.MQGMO_CONVERT;
/code

I would like:

code
gmo.options = MQC.MQGMO_WAIT |
  MQC.MQGMO_FAIL_IF_QUIESCING |
  MQC.MQGMO_SYNCPOINT |
  MQC.MQGMO_CONVERT;
/code


What I do in this case is rewrite it as

gmo.options = (MQC.MQGMO_WAIT |
  MQC.MQGMO_FAIL_IF_QUIESCING |
  MQC.MQGMO_SYNCPOINT |
  MQC.MQGMO_CONVERT);

The parentheses change the context, so that it formats it like you 
want.  Probably not the best solution, but it's one that works.

Troy


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



Excluding specific jars from classpath

2004-04-05 Thread Troy Daniels
While answering a question about classpaths,
At 10:51 AM 4/3/2004 +0200, Petter Måhlén wrote:

What you should do is something like this:

1. M-x customize-variable RET jde-global-classpath RET
2. Add the directories/jars that you want, one in each list entry (note that
if you add a directory, JDE will pick up any jars in that directory
automatically)
Is there a way to exclude a particular jar when JDE does this?  In our 
project, we have a jars directory that contains all of the jars we 
use.  Our build script also creates a jar here with all the classes from 
our project.  I'd like to exclude that jar for several reasons.

1.  Some of the classes in it might be out of date if I've compiled a file 
in JDE without rerunning out build script.
2.  If the beanshell is running and the project jar is in it's classpath, 
our build script fails because it's unable to delete the jar file, since 
it's in use.  This results in me repeatedly exiting and restarting the 
beanshell.

If this can't be done, I'll try to modify the appropriate function to add 
it as an option.

Troy


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


Re: Error when running an application within JDE

2004-11-10 Thread Troy Daniels
At 01:09 PM 11/10/2004 -0500, Paul Kinnucan wrote:
Troy Daniels writes:
  To: [EMAIL PROTECTED]
  Subject:
  --text follows this line--
 
  Please enter the details of your bug report here
 
Hi Troy,
It's possible that win32-start-process-show-window was not defined
when jde-run.elc was compiled. I'll investigate. Meanwhile, workarounds
are to run jde-run.el or try using the jde-compile-jde command to compile
the JDEE. That should ensure that the macro is defined when jde-run.el
is compiled.
I had to delete all the .elc files first, but jde-compile-jde worked.
To avoid this problem, you or Arthur might want to change line 343-345 from
cd ../$JDE_FILE/lisp
$EMACS --no-site-file -batch -l ../../compile-script -f \
batch-byte-compile *.el emacs_c.log
to
cd ../$JDE_FILE/lisp
$EMACS --no-site-file -batch -l ../../compile-script -f \
--execute (require 'jde) -f jde-compile-jde emacs_c.log
Looking at the output, I think there might be a bug in 
jde-run-etrace-show-at-mouse.  The byte-compiler complains that

Compiling file d:/Programs/emacs-21.2/site-lisp/jde/lisp/jde-run.el at Wed 
Nov 10 13:55:48 2004

While compiling jde-run-etrace-show-at-mouse:
  ** reference to free variable pos
The code for that function is
(defun jde-run-etrace-show-at-mouse (event)
  Jump to the stack position at the mouse click.
Click anywhere on the line with the stack reference.
  (interactive e)
  (if jde-xemacsp
  (set-marker (car jde-run-etrace-current-marker)
  (event-point pos)
  (window-buffer (event-window pos)))
(let ((pos (event-start event)))
  (set-marker (car jde-run-etrace-current-marker)
  (posn-point pos)
  (window-buffer (posn-window pos)
  (jde-run-etrace-goto))
Note that if jde-xemacsp, then pos is used but not defined.  I think you 
want this instead.  Unless you use the Xemacs, you won't notice the problem.

(defun jde-run-etrace-show-at-mouse (event)
  Jump to the stack position at the mouse click.
Click anywhere on the line with the stack reference.
  (interactive e)
  (let ((pos (event-start event)))  ;; this line moved here
(if jde-xemacsp
(set-marker (car jde-run-etrace-current-marker)
(event-point pos)
(window-buffer (event-window pos)))
  (set-marker (car jde-run-etrace-current-marker)
  (posn-point pos)
  (window-buffer (posn-window pos)
  (jde-run-etrace-goto))
Troy

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


Synchronization issues in JDEbug

2004-11-18 Thread Troy Daniels
Hello,
It looks like JDEbug needs to have some methods synchronized.  I tried 
setting a breakpoint while the process was running, and got the following 
in the Message window:

Setting breakpoint at line 85 in 
d:/jaguar_te1.2/KBR_ISD_VOB/Jaguar_Plan_Generator_Component/source/PhysicalNetworkBuilder/com/alphatech/kbr/jaguar/networkbuilder/SpatialSpec.java.
Error: evaluating debugger output caused a Lisp error.
  See *messages* buffer for details.
Error: evaluating output from the debugger caused a Lisp error.
Debugger output: it.framework.TestSuite TestSuite.java 208 runTest)
(list 25 junit.framework.TestSuite TestSuite.java 203 run).
Lisp error: (void-variable it.framework.TestSuite)
Breakpoint set at line 85 in class 
d:/jaguar_te1.2/KBR_ISD_VOB/Jaguar_Plan_Generator_Component/source/PhysicalNetworkBuilder/com/alphatech/kbr/jaguar/networkbuilder/SpatialSpec.java.
It also appears that, at least with JDK 1.4.2, there is a lot of useless 
traffic going from Java to emacs.   My *JDEBug* buffer is full of output 
that looks like

(jde-dbo-event-set 1 none
 (list Thread 1 main runnable suspended by debugger
   (list
  stack traces of several threads )))
Since jde-dbo-event-set is a no-op if the optional fourth arg is omitted, 
this slows down the debugger considerably.  If the java side checked for 
the fourth argument, is could avoid a lot of toString calls, bandwidth to 
Emacs and parsing of the string by Emacs.

Troy

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


Re[3]: jde and emacs memory usage

2004-11-19 Thread Troy Daniels
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


Problems using jde-ant-build with spaces in ant home

2004-12-15 Thread Troy Daniels
Please enter the details of your bug report here
I'm having problems running ant with jde-ant-build.  If I set
jde-ant-invocation-method to Script, it works fine.  The head of the
compilation buffer is below.  Note that the value of ant.home is quoted.
cd 
d:/Jaguar/dev/logging_reorg/KBR_ISD_VOB/Jaguar_Plan_Generator_Component/source/Utilities/com/alphatech/kbr/jaguar/logging/
ant -Dant.home=d:/Program Files/apache-ant-1.6.2 -buildfile 
'd:/Jaguar/dev/logging_reorg/KBR_ISD_VOB/Jaguar_Plan_Generator_Component/source/Utilities/build.xml' 
-emacs

If I set it to Ant Server, I get the following in the compilation
buffer.  Note that ant.home is not quoted.  Looking at the lisp files,
it appears that quotes are first added then removed.
AntServer output:
 -Dant.home=d:/Program Files/apache-ant-1.6.2 -buildfile 
d:/tdaniels_view/EBO/build.xml -emacs
Buildfile: d:\tdaniels_view\EBO\build.xml

BUILD FAILED
Target `Files/apache-ant-1.6.2' does not exist in this project.
Lastly, if I set jde-ant-invocation-method to Java, I get this.
Here, we have a mixture of single and double quotes.  Somehow, the
double quote and space between ant.home's value and the Main class is
interpreted as a space but not a break between paraemeters.2
c:/j2sdk1.4.1_03/bin/java.exe -classpath 'd:/Program 
Files/apache-ant-1.6.2/lib;c:/j2sdk1.4.1_03/lib/tools.jar' 
-Dant.home=d:/Program Files/apache-ant-1.6.2 org.apache.tools.ant.Main 
-buildfile 
'd:/Jaguar/dev/logging_reorg/KBR_ISD_VOB/Jaguar_Plan_Generator_Component/source/Utilities/build.xml' 
-emacs
java.lang.NoClassDefFoundError: Files/apache-ant-1/6/2 
org/apache/tools/ant/Main

If it matters, I'm running with the CVS version, not the beta listed 
below.  I launch emacs from a cygwin bash shell.

Emacs  : GNU Emacs 21.2.1 (i386-msvc-nt5.0.2195)
 of 2002-03-19 on buffy
Package: JDE version 2.3.4beta6
Required packages: cedet-1.0beta2
current state:
==
(setq
 jde-gen-session-bean-template '((jde-import-insert-imports-into-buffer 
   (list \javax.ejb.*\
 \java.rmi.RemoteException\)) '
 (jde-wiz-update-implements-clause \SessionBean\) ' 
(jde-gen-method-signature   \public\   \void\   \ejbActivate\ 
  nil   \RemoteException\  ) ' (if jde-gen-kr   ()  'n) 
\{\''n \}\''n 'n (jde-gen-method-signature   \public\ 
  \void\   \ejbPassivate\   nil   \RemoteException\  ) ' 
(if jde-gen-kr   ()  'n) \{\''n \}\''n 'n 
(jde-gen-method-signature   \public\   \void\   \ejbRemove\ 
  nil   \RemoteException\  ) ' (if jde-gen-kr   ()  'n) 
\{\''n \}\''n 'n (jde-gen-method-signature   \public\ 
  \void\   \setSessionContext\   \SessionContext ctx\ 
  \RemoteException\  ) ' (if jde-gen-kr   ()  'n) 
\{\''n \}\''n 'n (jde-gen-method-signature   \public\ 
  \void\   \unsetSessionContext\   nil   \RemoteException\  
) ' (if jde-gen-kr   ()  'n) \{\''n \}\''n 'n ')
 jde-gen-beep '((end-of-line) '
		\Toolkit.getDefaultToolkit().beep();\''n')
 jde-complete-signature-display '(Eldoc)
 jde-project-name default
 jde-wiz-toString-code-EOL '(Unix)
 jde-which-method-format '([ jde-which-method-current ])
 jde-run-classic-mode-vm nil
 jde-complete-unique-method-names nil
 jde-find-granularity '(Character)
 jde-which-method-max-length 20
 jde-javadoc-gen-nodeprecatedlist nil
 jde-imenu-include-classdef t
 jde-javadoc-gen-link-online nil
 jde-complete-display-result-type t
 jde-gen-code-templates '((Get Set Pair . jde-gen-get-set)
			  (main method . jde-gen-main-method)
			  (toString method . jde-gen-to-string-method)
			  (Deep clone . jde-gen-deep-clone)
			  (Action Listener . jde-gen-action-listener)
			  (Change Listener . jde-gen-change-listener)
			  (Window Listener . jde-gen-window-listener)
			  (Mouse Listener . jde-gen-mouse-listener)
			  (Mouse Motion Listener .
			   jde-gen-mouse-motion-listener)
			  (Inner Class . jde-gen-inner-class)
			  (println . jde-gen-println)
			  (beep . jde-gen-beep)
			  (property change support .
			   jde-gen-property-change-support)
			  (EJB Entity Bean . jde-gen-entity-bean)
			  (EJB Session Bean . jde-gen-session-bean))
 jde-gen-cflow-else '(' \else\
		  (jde-gen-electric-brace jde-gen-conditional-padding-3)
		  'r'n \}\ (if jde-gen-comments 
		   '(l \ // end of else\)) ''n)
 jde-jdk-registry '((1.3.1 . d:/Program Files/jdk1.3.1_06)
		(1.4.1 . c:/j2sdk1.4.1_03)
		(1.4.2 . c:/j2sdk1.4.2_04))
 jde-javadoc-gen-destination-directory JavaDoc
 jde-mode-line-format '(- mode-line-mule-info mode-line-modified
			mode-line-frame-identification
			mode-line-buffer-identification   global-mode-string
			 %[( mode-name mode-line-process minor-mode-alist
			%n )%]-- (line-number-mode L%l--)
			(column-number-mode C%c--) (-3 . %p)
			(jde-which-method-mode
			 (-- jde-which-method-format --))
			-%-)
 jde-mode-abbreviations '((ab . abstract) (bo . boolean)
			  (br . break) (by . byte) (byv . byvalue)
			  (cas . cast) (ca . catch) (ch . char)
			  (cl . class) (co . const)
			  (con . continue) (de . default)
			  (dou . double) 

Increasing memory for JDEbug

2005-01-18 Thread Troy Daniels
Hello,
Is it possible to allocate more memory for the debugger process?  I'm 
running into a problem where jde.debugger.Main is running out of 
memory.  One of my local variables is a very long string (about 10 Mb) and 
the debugger process runs out of memory when it tries to display it.

Troy

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


Re: Increasing memory for JDEbug

2005-01-18 Thread Troy Daniels
At 03:59 PM 1/18/2005, Paul Kinnucan wrote:
Troy Daniels writes:
  Hello,
 
  Is it possible to allocate more memory for the debugger process?  I'm
  running into a problem where jde.debugger.Main is running out of
  memory.  One of my local variables is a very long string (about 10 Mb) 
and
  the debugger process runs out of memory when it tries to display it.
 

Hi Troy,
Try increasing jde-db-option-heap-size. If this doesn't work, let me know.
The maximum is already set at 1000 Mb.  Looking at the *JDEbug* buffer, I 
don't think that's the right option for the problem I'm having.  A partial 
excerpt of the *JDEbug* buffer:

cd 
d:/dev/logging_reorg_import/KBR_ISD_VOB/Jaguar_Plan_Generator_Component/products/PGTest/test
c:/j2sdk1.4.2_04/bin/javaw.exe -classpath 
d:/Programs/emacs-21.2/site-lisp/jde/java/lib/jde.jar;c:/j2sdk1.4.2_04/lib/tools.jar 
jde.debugger.Main

JDE -1 1 launch 1 -vmexec javaw -classpath deleted -Xms400m 
-Xmx1000m  junit.textui.TestRunner 
com.alphatech.kbr.jaguar.pgtest.test.NightlyTests

I don't need to change the values in the launch command, I want to add them 
to the javaw ... jde.debugger.Main command.  The program creates a 
StringBuffer for a 10 Mb string.  That works fine.  When I step a few lines 
further and stringBuffer.toString is assigned to a local String variable, I 
get an java.lang.OutOfMemory message in the JDEbug buffer and the local 
variable window starts to act funky.  (It sometimes leaves portions drawn 
in solid grey.)

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

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


Re: Increasing memory for JDEbug

2005-01-18 Thread Troy Daniels
At 04:30 PM 1/18/2005, Paul Kinnucan wrote:
Troy Daniels writes:
  At 03:59 PM 1/18/2005, Paul Kinnucan wrote:
 
  Troy Daniels writes:
 Hello,

 Is it possible to allocate more memory for the debugger process?  I'm
 running into a problem where jde.debugger.Main is running out of
 memory.  One of my local variables is a very long string (about 
10 Mb)
   and
 the debugger process runs out of memory when it tries to display it.

  
  Hi Troy,
  
  Try increasing jde-db-option-heap-size. If this doesn't work, let me 
know.
 
  The maximum is already set at 1000 Mb.  Looking at the *JDEbug* buffer, I
  don't think that's the right option for the problem I'm having.  A 
partial
  excerpt of the *JDEbug* buffer:
 
  cd
  
d:/dev/logging_reorg_import/KBR_ISD_VOB/Jaguar_Plan_Generator_Component/products/PGTest/test
  c:/j2sdk1.4.2_04/bin/javaw.exe -classpath
  
d:/Programs/emacs-21.2/site-lisp/jde/java/lib/jde.jar;c:/j2sdk1.4.2_04/lib/tools.jar 

  jde.debugger.Main
 
  JDE -1 1 launch 1 -vmexec javaw -classpath deleted -Xms400m
  -Xmx1000m  junit.textui.TestRunner
  com.alphatech.kbr.jaguar.pgtest.test.NightlyTests
 
  I don't need to change the values in the launch command, I want to add 
them
  to the javaw ... jde.debugger.Main command.  The program creates a
  StringBuffer for a 10 Mb string.  That works fine.  When I step a few 
lines
  further and stringBuffer.toString is assigned to a local String 
variable, I
  get an java.lang.OutOfMemory message in the JDEbug buffer and the local
  variable window starts to act funky.  (It sometimes leaves portions drawn
  in solid grey.)

Hi Troy,
Try setting jde-db-option-vm-args to the vm command line option for
the heap size. Unfortunately, I don't remember the option name. I
think this will set the heap for the debugger as opposed to the heap
for the process being debugged. Let me know what happens.
That's just an alternate way to specify jde-db-option-heap-size.  The 
launch command now contains

-Xms400m -Xmx1000m -Xmx600m
which is a concatenation of the values in jde-db-option-heap-size and 
jde-db-option-vm-args.

As a side note, the jde-db-option-vm-args looks like it was copied from 
jde-run-option-vm-args and not completely updated.

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

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

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


Crashing during build

2005-02-18 Thread Troy Daniels
Hello,
Recently, emacs has started to occasionally fail on jde-build.  I'm not 
certain if the problem is even in JDE, emacs or bash.  I type C-c C-v C-b 
and the following appears in my *compilation* buffer.

cd 
d:/dev/refuel/KBR_ISD_VOB/Jaguar_Plan_Generator_Component/source/Refuel/com/alphatech/kbr/jaguar/refuel/
ant -Dant.home=d:/Program Files/apache-ant-1.6.2 -buildfile 
'd:/dev/refuel/KBR_ISD_VOB/Jaguar_Plan_Generator_Component/source/Refuel/build.xml' 
-emacs
  6 [main] bash 1904 handle_exceptions: Exception: STATUS_ACCESS_VIOLATION
  68303 [main] bash 1904 open_stackdumpfile: Dumping stack trace to 
bash.exe.stackdump

Compilation finished at Fri Feb 18 15:47:26
It works for a while, but once it starts to fail like this, it will always 
fail until I log out.  Restarting emacs isn't sufficient to fix the problem.

All the files exist, and the build works with either M-x compile (with ant 
-emacs -find build.xml as the build command) or from a bash shell in a 
different window.  Has anyone seen this or have a good guess where the 
problem might be?  I'm running cygwin on Windows for my OS.

Troy

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


Re: Regexp on sourcepath possible?

2005-03-21 Thread Troy Daniels
At 12:58 AM 3/15/2005, Paul Kinnucan wrote:
Ole Arndt writes:
  Hi Lars,
 
But I'm curious as to what kind of a project structure would
make regular expressions in source paths useful.
The structure that I have at work is one such.  We have multiple 
subprojects side by side:

source
  project1
prj.el
com/foo/project1
  *.java
  project2
prj.el
com/foo/project2
  *.java
  ...
  project17
 prj.el
 com/foo/project17
   *.java
products
  similar tree with class files
Some projects depend on others, but the dependency graph is non-cyclic, so 
we build and test project 1, then project 2 and so on.  Each prj.el sets 
jde-sourcepath to . and jde-global-classpath to include 
../products/projectName/directoriesWithClasses.  Which works, except 
when I try to jump to a source file in a different subproject.  What I'd 
like to do is set jde-sourcepath to (. ../*) but instead, I have to 
manually do (. ../project1 ../project2 ... ../projectN-1).  Which 
eventually gets built up in each prj.el.  And we frequently add more 
projects, so even if the list is complete, that's only a temporary condition.

Whether this is a good coding practice is debatable, but it is what we do.
Finally, to handle a path specification like:
*/src/java
the JDEE would have to cycle through every directory on your system,
appending /src/java to it, testing whether such a directory exists,
and then searching that directory for the source file? Seems
like a pretty time-consuming operation that might make finding
and opening source files a very slow process.
I'd be happy with just something that expands * like a unix wildcard.  So 
*/src/java woudn't be the equivalent of a unix find command, but more like 
the equivalent of ls */src/java.

Troy
Paul
 
  Just be sure to never save your project files with jde-save-project,
  or you will lose your changes.
 
  I have written myself a small module for a related purpose: Read the
  dependencies from a maven project.xml file and build the
  jde-global-classpath from this information. My .prj.el files now typically
  look like this:
 
  (setq pom (pom-read-pom))
  (jde-set-variables
   '(jde-global-classpath (pom-get-classpath pom))
   '(jde-project-name (pom-get-project-id pom))
   '(jde-sourcepath (quote (./src/java ./src/test
 
  I have, of course, also a prj.el file for all my default settings in
  my top level source directory.
 
  Ole
  --
  Ole Arndt http://www.sugarshark.com
 

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


Re: Regexp on sourcepath possible?

2005-03-21 Thread Troy Daniels
At 12:58 AM 3/15/2005, Paul Kinnucan wrote:
Ole Arndt writes:
  Hi Lars,
 
  Lars Degerstedt [EMAIL PROTECTED] writes:
 
 Also, I've
never understood the big attraction of having to manually find and
open a project file, edit it, and then save it, an error-prone and
tedious process.  Not my idea of a good time but, heck, to each
his own.
Why do we use JDEE at all instead of just using the customize interface to 
make emacs perform like we want to?  Because there's no option that turns 
on all the functionality we want.  I generally edit prj.el by using the 
customize interface, but I'll sometimes edit prj.el directly.  There's a 
few cases where I do this, which probably indicates my wish list of prj.el 
enhancements.

I'm copying a prj.el file to a new but related project.  I want most of the 
settings to be the same, but there's some points where the project name is 
hard-coded.  M-x replace-string is actually better than 
jde-customize-variable, because I know I won't skip a variable.

 I want to run the program with a different set of arguments, but be able 
to swap back to the old arguments.  Generally, this involves changing the 
arguments passed to junit.textui.TestRunner from package.SmokeTestSuite 
to package.NightlyTestSuite.  I copy the old value to a comment, and then 
(usually) uncomment the value from the last time I did this.

I want to turn on profiling or remote debugging, so I want to 
comment/uncomment a fairly complex set of arguments and not have to 
remember how I set them.

Of course, there's always the alternative of proposing a change to the
JDEE to enhance the customization interface to support features
that you need, e.g., providing the option to specify a function
to compute jde-sourcepath or as in this case regular expressions.
This is the better long-term solution, assuming somebody has the time and 
knowledge to implement the solution.

Troy

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


Re: Java-1.5 font-lock support?

2005-04-07 Thread Troy Daniels
At 05:29 PM 4/6/2005, jeff peck wrote:
Is there a version of Java font-lock that supports Java-1.5?
To so something reasonable with Generics and varargs (Object... args)
and other 1.5-isms?
While we're discussing 1.5, any idea when Semantic will support it?
Troy

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


bsh and jde-expand-classpath-p

2005-08-30 Thread Troy Daniels

Hello,

There appears to be a bug in the use of jde-expand-classpath-p and the 
bsh.  With this directory structure,


root
  prj.el  (defines jde-global-classpath)
  subdir
 prj.el   (inherits jde-global-classpath)

the classpath that is passed to the bsh expands jde-global-classpath with 
respect to subdir, not root.  As a result, directories this jar files are 
passed in as the directory, not the set of jars in the directory.


The patch below resolves this problem for me.  It won't do the right thing 
if the classpath is being set from something other than 
jde-global-classpath (e.g., if it's set from CLASSPATH).


*** jde.el.~1.357.~ Thu Dec 23 18:42:48 2004
--- jde.el  Tue Aug 30 16:55:30 2005
***
*** 2372,2378 
  environment variable.
(let* ((directory-sep-char ?/)  ;; Override NT/XEmacs setting
 (classpath
! (jde-build-path-arg nil (jde-get-global-classpath) t)))
  (format jde.util.JdeUtilities.setProjectValues(\%s\, %s);
jde-current-project
classpath)))
--- 2372,2379 
  environment variable.
(let* ((directory-sep-char ?/)  ;; Override NT/XEmacs setting
 (classpath
! (jde-build-path-arg nil (jde-get-global-classpath)
! t 'jde-global-classpath)))
  (format jde.util.JdeUtilities.setProjectValues(\%s\, %s);
jde-current-project
classpath)))

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



Re: JDEbug and static variables

2005-09-16 Thread Troy Daniels

At 10:06 PM 9/15/2005, John wrote:


Hi,

I recently installed JDEE 2.3.5 in a GNU Emacs 21.3 environment running on
Windows XP Pro. I'm using Java J2SE 1.5.0_04. The debugger works fine,
however, I can't seem to view static variables. Am I missing something 
obvious

or does JDEbug not work with static variables. Thanks in advance.


JDEbug shows static variables inside objects that are local variables 
(including this).  Inside a static method, it won't show the static 
variables for the class.  I'm not aware of a method to display static 
variables from other classes (e.g., BorderLayout.CENTER) unless you have an 
instance of that class.


Troy


Regards,
John



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