RE: A func to insert Timer code?

2002-01-24 Thread David Ponce

Hi,

> Excellent point.  When I call beginning-of-defun interactively it
> works great, but when I call it from a program it goes to the
> beginning of the file.  Is there some trick to getting the "java"
> version of beginning-of-defun?
> Also, I tried to call mark-defun indent-region after I inserted my
> instrumentation code, but that barfs too.  Here is my attempt.  I
> haven't tracked donw how to get the class and method name.
[...]

Currently the "java" version (actually the Semantic version ;) of
`beginning-of-defun', `end-of-defun', etc., are enabled only when
these functions are called interactively (and `senator-minor-mode' is
enabled).  This avoid compatibility problems with existing libraries
(like font-lock).

If you want to get the Semantic version of `beginning-of-defun',
`end-of-defun', etc., simply call their senator counterpart, that is:
`senator-beginning-of-defun', `senator-end-of-defun',
`senator-mark-defun', etc. (see senator.el in the Semantic
distribution for details).

Hope this helps!
David

Faites un voeu et puis Voila ! www.voila.fr 
Avec Voila Mail, consultez vos e-mails sur votre mobile Wap. 



RE: A func to insert Timer code?

2002-01-24 Thread Altmann, Michael

Excellent point.  When I call beginning-of-defun interactively it works
great, but when I call it from a program it goes to the beginning of the
file.  Is there some trick to getting the "java" version of
beginning-of-defun?
Also, I tried to call mark-defun indent-region after I inserted my
instrumentation code, but that barfs too.  Here is my attempt.  I haven't
tracked donw how to get the class and method name.  




(defun add-timer()
  (interactive)
  "Add Timer calls"
  (beginning-of-defun)
;  (re-search-forward "\{")
  (next-line 1)
  (beginning-of-line)
  (insert "try {\n" "Timer.startTimer(\"" "X" "\");\n")

  (end-of-defun)
;;  (re-search-backward "}")
  (next-line -1)
  (beginning-of-line)
  (insert "} finally {\n"
  "Timer.stopTimer(\"" "X" "\");\n"
  "}\n")

  (mark-defun)
  (indent-region)
 )




-Original Message-
From: Troy Daniels [mailto:[EMAIL PROTECTED]]
Sent: Thursday, January 24, 2002 4:32 PM
To: [EMAIL PROTECTED]
Subject: Re: A func to insert Timer code?


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



Re: Gosling interview

2002-01-24 Thread Daniel Hegyi

>In contrast, there are some tasks that are better handled through a
>GUI. For example, GUIs are better for doing things like browsing an
>RMI registry to see which objects are registered, managing a set of
>web servers which you execute your web apps on, or displaying data
>about how HTTP requests are processed by the servlet engine.

And don't forget that "the tyranny of the blank screen" is awful to novices. 
They don't know of much functionality because most of it isn't presented in 
the UI. Sure, once you know that a function for your problem exists then you 
can M-x ...


Daniel

_
Chat with friends online, try MSN Messenger: http://messenger.msn.com




Re: Gosling interview

2002-01-24 Thread Ana von Klopp


I agree with Paul, and I want to make it clear that I didn't want to
imply that Emacs is "just" an editor (in which case I wouldn't be a
member of this mailing list). My current opinion (if anybody cares) is
that there are some development related tasks that IDEs tend to handle 
with dialogs and graphical features when it would have been more
efficient to bypass the GUI and use key strokes to initiate and some
simple text input mechanism to complete. Here, IDEs do poorly, and
Emacs/JDE provides a stronger solution. 

In contrast, there are some tasks that are better handled through a
GUI. For example, GUIs are better for doing things like browsing an
RMI registry to see which objects are registered, managing a set of
web servers which you execute your web apps on, or displaying data
about how HTTP requests are processed by the servlet engine. 

So I think some IDE type tasks can, and even should, be handled by
editor extensions, while others are best done through a bona fide GUI
framework. Which means that the combination of Emacs/JDE and Netbeans
is actually pretty much ideal from my perspective :)

Ana



Re: JDE vs. java-mode

2002-01-24 Thread Scott Evans

> Scott Evans writes:
>  > >  > Invalid function: (macro . #&optional search-parts search-includes) "...(15)" [search-includes search-parts 
>streamorbuffer token semantic-find-nonterminal-by-function lambda (tok) eq 
>((semantic-token-token tok))] 6 ("c:\\Program 
>Files\\XEmacs\\xemacs-packages\\lisp\\semantic\\semantic-util.elc" . 14003)>)
>  > >  
>  > > Classic error that occurs when you compile lisp file A, which
>  > > requires macros defined by lisp file B, without first ensuring that
>  > > lisp file B has been loaded. Either delete the compiled versions of
>  > > the semantic lisp files or use the included makefile to compile
>  > > them.
>  > 
>  > Hm... I'm using the semantic version (1.4b8) that came with the
>  > today's new XEmacs sumo tarball, so if it's built wrong that's not
>  > good.
>  > 
>  > Anyway, I tried nuking the semantic .elc files and I still get the
>  > same error.
> 
> If that's the case, then there is another version of semantic in
> the XEmacs command path that IS compiled and IS getting loaded because
> the error message that you include references semantic-util.elc, which
> is a compiled file.

Sorry Paul, I spoke to soon -- as someone else pointed out, it's
actually a different error:

Signaling: (invalid-function (macro lambda (token streamorbuffer &optional 
search-parts search-includes) "Find all nonterminals with a token TOKEN within 
STREAMORBUFFER.
TOKEN is a symbol representing the type of the tokens to find.
Optional argument SEARCH-PARTS and SEARCH-INCLUDE are passed to
`semantic-find-nonterminal-by-function'." (backquote 
(semantic-find-nonterminal-by-function (lambda (tok) (eq (\, token) 
(semantic-token-token tok))) (\, streamorbuffer) (\, search-parts) (\, 
search-includes)
  semantic-find-nonterminal-by-token(... lots of stuff ...)
  jde-import-get-import-insertion-point()
  jde-import-insert-imports-into-buffer(("java.util.Vector"))
  jde-import-insert-imports(("java.util.Vector"))
  #("Vector")
  call-interactively(jde-import-find-and-import)




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




RE: Netbeans (WAS: Gosling interview)

2002-01-24 Thread Wang, Changzhou

> It is quite possible to use Emacs and Netbeans at the same time
> concurrently without the editor integration module, which is what I
> do, most of the time. There are occasional delays of a couple of
> seconds if you open the same file both in Emacs and with the IDE's
> editor; but there is usually no need to do that. 
> 
> Ana
It works fine most of time if you open the same file in both Emacs and
Netbean: if you finish your editing in either of them, save it   so that the
other will detect the file change. 

The externaleditor module seems to promise more features, such as
synchronize modification at a finer level. What I am particularly interested
is the claim that the guarded area (generated code by Netbean) will be
specially marked in emacs so that you cannot edit them unintensionaly.

Does anyone know whether the developement of externaleditor module for
Netbean is active or not? (Sorry I am asking the question in the wrong
mailing list, but I really don't want to dig into another list).

Thanks!
Chang



Re: JDE vs. java-mode

2002-01-24 Thread Paul Kinnucan

Scott Evans writes:
 > >  > Invalid function: (macro . #search-parts search-includes) "...(15)" [search-includes search-parts streamorbuffer 
 >token semantic-find-nonterminal-by-function lambda (tok) eq ((semantic-token-token 
 >tok))] 6 ("c:\\Program 
 >Files\\XEmacs\\xemacs-packages\\lisp\\semantic\\semantic-util.elc" . 14003)>)
 > >  
 > > Classic error that occurs when you compile lisp file A, which
 > > requires macros defined by lisp file B, without first ensuring that
 > > lisp file B has been loaded. Either delete the compiled versions of
 > > the semantic lisp files or use the included makefile to compile
 > > them.
 > 
 > Hm... I'm using the semantic version (1.4b8) that came with the
 > today's new XEmacs sumo tarball, so if it's built wrong that's not
 > good.
 > 
 > Anyway, I tried nuking the semantic .elc files and I still get the
 > same error.

If that's the case, then there is another version of semantic in
the XEmacs command path that IS compiled and IS getting loaded because
the error message that you include references semantic-util.elc, which
is a compiled file.

- Paul

> (and fwiw, there's no semantic makefile in the sumo distro.)
 > 
 > 
 > 
 > scott
 > 




Re: JDE vs. java-mode

2002-01-24 Thread Jim Crossley

Paul Kinnucan <[EMAIL PROTECTED]> writes:

> Scott Evans writes:

[...]

>  > imports to work though; I get an error as such:
>  > 
>  > Invalid function: (macro . #  > streamorbuffer &optional search-parts search-includes) "...(15)"
>  > [search-includes search-parts streamorbuffer token
>  > semantic-find-nonterminal-by-function lambda (tok) eq
>  > ((semantic-token-token tok))] 6 ("c:\\Program
>  > Files\\XEmacs\\xemacs-packages\\lisp\\semantic\\semantic-util.elc"
>  > . 14003)>)
>  
> Classic error that occurs when you compile lisp file A, which
> requires macros defined by lisp file B, without first ensuring that
> lisp file B has been loaded. Either delete the compiled versions of
> the semantic lisp files or use the included makefile to compile
> them.

I get this error, too.  And when I remove the semantic *.elc files,
the error turns to this:

Invalid function: (macro lambda (token streamorbuffer &optional
search-parts search-includes) "Find all nonterminals with a token
TOKEN within STREAMORBUFFER.  TOKEN is a symbol representing the type
of the tokens to find.  Optional argument SEARCH-PARTS and
SEARCH-INCLUDE are passed to `semantic-find-nonterminal-by-function'."
(backquote (semantic-find-nonterminal-by-function (lambda (tok) (eq
(\, token) (semantic-token-token tok))) (\, streamorbuffer) (\,
search-parts) (\, search-includes

Any other ideas?



Netbeans (WAS: Gosling interview)

2002-01-24 Thread Ana von Klopp


Kevin Esler writes:

#   > There's actually an experimental Netbeans module providing Emacs
#   > integration available now.

# this sounds interesting. Where can I take a look at it ?

A little background for those of you who are not familiar with
Netbeans: it is an open source platform to build development tools
with, and specifically there are a lot of modules for Java
development. http://www.netbeans.org. Sun's Forte for Java IDE, which
comes in two versions (one of which is free), is based on Netbeans.

There used to be an experimental module that was targeted specifically
at Emacsen (all versions). I looked at the site now, and it looks like
that specific module has been superseeded by one that specifically
targets XEmacs and Vim just now. http://externaleditor.netbeans.org/

It is quite possible to use Emacs and Netbeans at the same time
concurrently without the editor integration module, which is what I
do, most of the time. There are occasional delays of a couple of
seconds if you open the same file both in Emacs and with the IDE's
editor; but there is usually no need to do that. 

Ana



Re: A func to insert Timer code?

2002-01-24 Thread Paul Ebermann

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



jde-help-symbol to use existing browser instance

2002-01-24 Thread Paul Kinnucan

J K writes:
 > Hi,
 > 
 > JDE 2.2.8
 > Windows 2000
 > 
 > When I use jde-help-symbol I find that a new instance of the browser is 
 > started to show the Javadoc. Is there a way to say, 'show the documentation 
 > in the existing browser window'
 > 
 
Set browse-url-new-window-flag on Emacs 21 or browser-url-new-window-p on
earler versions of Emacs to nil.

- Paul




Re: JDE vs. java-mode

2002-01-24 Thread Scott Evans

>  > Invalid function: (macro . #search-parts search-includes) "...(15)" [search-includes search-parts streamorbuffer 
>token semantic-find-nonterminal-by-function lambda (tok) eq ((semantic-token-token 
>tok))] 6 ("c:\\Program 
>Files\\XEmacs\\xemacs-packages\\lisp\\semantic\\semantic-util.elc" . 14003)>)
>  
> Classic error that occurs when you compile lisp file A, which
> requires macros defined by lisp file B, without first ensuring that
> lisp file B has been loaded. Either delete the compiled versions of
> the semantic lisp files or use the included makefile to compile
> them.

Hm... I'm using the semantic version (1.4b8) that came with the
today's new XEmacs sumo tarball, so if it's built wrong that's not
good.

Anyway, I tried nuking the semantic .elc files and I still get the
same error.  (and fwiw, there's no semantic makefile in the sumo distro.)



scott




jde-help-symbol to use existing browser instance

2002-01-24 Thread J K

Hi,

JDE 2.2.8
Windows 2000

When I use jde-help-symbol I find that a new instance of the browser is 
started to show the Javadoc. Is there a way to say, 'show the documentation 
in the existing browser window'

Cheers,

JK



_
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp.




Re: JDE vs. java-mode

2002-01-24 Thread Paul Kinnucan

Scott Evans writes:
 > > Stuff that java-mode does not do which is VERY usefull :)
 > > 
 > >  * import of a class with a simple keystroke (C-v-z)
 > >  * lookup java doc for a class or symbol (C-v-w)
 > >  * lookup java source code for class (C-v-y)
 > >  * auto-completion (C-v .)
 > 
 > Hey, some of those *are* pretty cool.  Thanks.
 > 
 > I've got #2 and #3 working and they're nifty.  I can't seem to get
 > imports to work though; I get an error as such:
 > 
 > Invalid function: (macro . #search-parts search-includes) "...(15)" [search-includes search-parts streamorbuffer 
 >token semantic-find-nonterminal-by-function lambda (tok) eq ((semantic-token-token 
 >tok))] 6 ("c:\\Program 
 >Files\\XEmacs\\xemacs-packages\\lisp\\semantic\\semantic-util.elc" . 14003)>)
 
Classic error that occurs when you compile lisp file A, which requires macros
defined by lisp file B, without first ensuring that lisp file B has been loaded. 
Either delete the compiled versions of the semantic lisp files or use the included 
makefile to compile them.

Paul




Re: JDE vs. java-mode

2002-01-24 Thread Max Rydahl Andersen

> > Stuff that java-mode does not do which is VERY usefull :)
> >
> >  * import of a class with a simple keystroke (C-v-z)
> >  * lookup java doc for a class or symbol (C-v-w)
> >  * lookup java source code for class (C-v-y)
> >  * auto-completion (C-v .)
>
> Hey, some of those *are* pretty cool.  Thanks.

You're welcome :)

>
> I've got #2 and #3 working and they're nifty.  I can't seem to get
> imports to work though; I get an error as such:
>
> Invalid function: (macro . #)

> I haven't tried to debug this yet.

I would suggest upgrading to the newest jde.

> As for ECB, I'll play with it sometime later... don't feel like
downloading
> a new version of semantic right now. :)

I'm using the latest semantic without any problemsso just do it :)

With hope
 Max
>
>
>
> scott
>
>
> >  and more :)
> >
> > And try and combine it with ecb (Emacs code browser) and you get a
fab
> > combination :)
> >
> >
> > ""Scott Evans"" <[EMAIL PROTECTED]> wrote in message
> > [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > > (sorry if this is a duplicate; I sent this message once, but I believe
> > > I sent it to the wrong address.)
> > >
> > > I've been using JDE for a while now but I just realized that I'm not
> > > sure I need it.  I do pretty vanilla servlet development.
> > >   - I don't use the JDE debugger
> > >   - I do my builds with ant (via a custom build script) but that runs
> > > fine if I simply run it under "M-x compile".
> > >   - I don't need Java code generation
> > >   - I never found speedbar very useful
> > >   - I *do* like jumping to methods by name, but I generally use
> > > func-menu for that (I think senator provides this functionality
> > > for JDE?).
> > >
> > > So it seems like the only thing I get form using JDE is notably slower
> > > file-open times.
> > >
> > > Forgive me if this is a FAQ, but for basic stuff like fontification
> > > and indentation, is there any reason to use JDE instead of java-mode?
> > > JDE inherits from java-mode so I assume all the fontification and
> > > indentation code comes from cc-mode...
> > >
> > > I haven't read the JDE code to see, but I figure if there are
> > > persuasive reasons to choose JDE over java-mode (like "java-mode
> > > gets a bunch of things really wrong!"), this is the place to ask.
> > >
> > > Thanks!
> > >
> > >
> > >
> > > scott
> > >
> >
> >
> >
>





Re: JDE vs. java-mode

2002-01-24 Thread Scott Evans

> Stuff that java-mode does not do which is VERY usefull :)
> 
>  * import of a class with a simple keystroke (C-v-z)
>  * lookup java doc for a class or symbol (C-v-w)
>  * lookup java source code for class (C-v-y)
>  * auto-completion (C-v .)

Hey, some of those *are* pretty cool.  Thanks.

I've got #2 and #3 working and they're nifty.  I can't seem to get
imports to work though; I get an error as such:

Invalid function: (macro . #)

I haven't tried to debug this yet.

As for ECB, I'll play with it sometime later... don't feel like downloading
a new version of semantic right now. :)



scott


>  and more :)
> 
> And try and combine it with ecb (Emacs code browser) and you get a fab
> combination :)
> 
> 
> ""Scott Evans"" <[EMAIL PROTECTED]> wrote in message
> [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > (sorry if this is a duplicate; I sent this message once, but I believe
> > I sent it to the wrong address.)
> >
> > I've been using JDE for a while now but I just realized that I'm not
> > sure I need it.  I do pretty vanilla servlet development.
> >   - I don't use the JDE debugger
> >   - I do my builds with ant (via a custom build script) but that runs
> > fine if I simply run it under "M-x compile".
> >   - I don't need Java code generation
> >   - I never found speedbar very useful
> >   - I *do* like jumping to methods by name, but I generally use
> > func-menu for that (I think senator provides this functionality
> > for JDE?).
> >
> > So it seems like the only thing I get form using JDE is notably slower
> > file-open times.
> >
> > Forgive me if this is a FAQ, but for basic stuff like fontification
> > and indentation, is there any reason to use JDE instead of java-mode?
> > JDE inherits from java-mode so I assume all the fontification and
> > indentation code comes from cc-mode...
> >
> > I haven't read the JDE code to see, but I figure if there are
> > persuasive reasons to choose JDE over java-mode (like "java-mode
> > gets a bunch of things really wrong!"), this is the place to ask.
> >
> > Thanks!
> >
> >
> >
> > scott
> >
> 
> 
> 




Re: jde-file-to-url which are compatible with Opera and internet explorer

2002-01-24 Thread Paul Kinnucan

Max Rydahl Andersen writes:
 > And now I have tested it with IE6 and it works! halleluja! :)
 > 

Thank you, Max.

- Paul > ""Max Rydahl Andersen"" <[EMAIL PROTECTED]> wrote in message
 > a2pm59$ei1$[EMAIL PROTECTED]">news:a2pm59$ei1$[EMAIL PROTECTED]...
 > >
 > > "Paul Kinnucan" <[EMAIL PROTECTED]> wrote in message
 > > [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 > > > Schewe, Jon  (MN65) writes:
 > > >  > I just tried it in IE6 and it doesn't work.  Sorry to spoil you're
 > day.
 > > >  >
 > > >
 > > > Maybe I spoke too fast. This bears further investigation.
 > > >
 > > > - Paul
 > > >
 > >
 > > ok - I have now tried this function with IE5, Opera 6, Mozilla 0.9.7 - can
 > > anyone check it on IE6 and others ?
 > > It simply just uses a empty-string for localhost insted (as in accordance
 > to
 > > http://www.w3.org/Addressing/rfc1738.txt)
 > > With hope :)
 > >
 > > (defun jde-file-to-url (file)
 > >   "Convert FILE path to a URL. If FILE is a DOS path, this
 > > function replaces the colon in the drive specifier with a
 > > vertical bar (|) because both Internet Explorer and Netscape
 > > accept the resulting URL whereas Netscape does not accept
 > > a drive specifier with a colon."
 > >   (if (or (string-match "http:" file)
 > >(string-match "file:" file))
 > >   file
 > > (format "file:///%s"
 > >  ;; Check for DOS path.
 > >  (if (string-match "[a-zA-Z]:" file)
 > >   (substitute ?| ?: file)
 > >(jde-convert-cygwin-path file)
 > >
 > 
 > 




Re: jde-file-to-url which are compatible with Opera and internet explorer

2002-01-24 Thread Max Rydahl Andersen

And now I have tested it with IE6 and it works! halleluja! :)

""Max Rydahl Andersen"" <[EMAIL PROTECTED]> wrote in message
a2pm59$ei1$[EMAIL PROTECTED]">news:a2pm59$ei1$[EMAIL PROTECTED]...
>
> "Paul Kinnucan" <[EMAIL PROTECTED]> wrote in message
> [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > Schewe, Jon  (MN65) writes:
> >  > I just tried it in IE6 and it doesn't work.  Sorry to spoil you're
day.
> >  >
> >
> > Maybe I spoke too fast. This bears further investigation.
> >
> > - Paul
> >
>
> ok - I have now tried this function with IE5, Opera 6, Mozilla 0.9.7 - can
> anyone check it on IE6 and others ?
> It simply just uses a empty-string for localhost insted (as in accordance
to
> http://www.w3.org/Addressing/rfc1738.txt)
> With hope :)
>
> (defun jde-file-to-url (file)
>   "Convert FILE path to a URL. If FILE is a DOS path, this
> function replaces the colon in the drive specifier with a
> vertical bar (|) because both Internet Explorer and Netscape
> accept the resulting URL whereas Netscape does not accept
> a drive specifier with a colon."
>   (if (or (string-match "http:" file)
>(string-match "file:" file))
>   file
> (format "file:///%s"
>  ;; Check for DOS path.
>  (if (string-match "[a-zA-Z]:" file)
>   (substitute ?| ?: file)
>(jde-convert-cygwin-path file)
>





Re: problems with jde-help-docsets

2002-01-24 Thread Max Rydahl Andersen

Hello Paul,

Always ready to help a great and usable project :)

Thursday, January 24, 2002, 9:26:09 PM, you wrote:

Paul> Max Rydahl Andersen writes:
Paul>  > I've discovered a "oddity" with jde-help-docsets :)
Paul>  > 
Paul>  > It seems that the third parameter  which designates the doc-lookup-function
Paul>  > has to be something other than nil, even though it is ignored by the jde
Paul>  > lookup facility when it simply is a "javadoc" type of docset.
Paul>  > 
Paul>  > Customise will not let me save manually added docsets which has no function
Paul>  > present
Paul>  > and C-v-w complains about a function definition being nil if I set it
Paul>  > programaticlly.
Paul>  > 
Paul>  > My current workaround is just to put in a name of an existing function -
Paul>  > then it works.
Paul>  > 
Paul>  > Just so you know :)

Paul> Hey Max,

Paul> Looks like I'm going to have a busy night tonight. Thanks for today's
Paul> many contributions.

Paul> Regards,

Paul> Paul
 



-- 
Best regards,
 Maxmailto:[EMAIL PROTECTED]




problems with jde-help-docsets

2002-01-24 Thread Paul Kinnucan

Max Rydahl Andersen writes:
 > I've discovered a "oddity" with jde-help-docsets :)
 > 
 > It seems that the third parameter  which designates the doc-lookup-function
 > has to be something other than nil, even though it is ignored by the jde
 > lookup facility when it simply is a "javadoc" type of docset.
 > 
 > Customise will not let me save manually added docsets which has no function
 > present
 > and C-v-w complains about a function definition being nil if I set it
 > programaticlly.
 > 
 > My current workaround is just to put in a name of an existing function -
 > then it works.
 > 
 > Just so you know :)

Hey Max,

Looks like I'm going to have a busy night tonight. Thanks for today's
many contributions.

Regards,

Paul
 




Re: Gosling interview

2002-01-24 Thread Peter Woo

Ok, as per Ana's posting, will give a try to NetBeans and see whether it
helps.

I am not particularly opposing GUI as I am using the Windows interface
daily.  If for Windows C++ development, I would have used the Visual Studio
also.

However, for Java, the graphical IDE providers usually have no complete
control of the whole platform like Windows, and as you have pointed out
correctly, can never catch up with the evolution due to the tight coupling
with components that they have no control of.  And in this regard, Emacs is
appealing as it works with components that it has no control upon for a long
time.  What usually requires a simple hook in Emacs for adaptation (and
fallback) would means a complete upgrade for others, which might then end up
you need to downgrade later on for compatibility with some other components.

What ends up to be is that most graphical IDEs then promote their
'productivity' aids to compensate for the compatibility issues, and
sometimes generate really bloated codes, and yet not complete enough so that
you still need to hand tailor the codes afterwards.

So, if NetBeans is not just another 'productivity' aids which end up
requiring the programmer to write more rather than less, then I withdraw my
previous comment of relating it to the Visual Age's absurdity.

P.





problems with jde-help-docsets

2002-01-24 Thread Max Rydahl Andersen

I've discovered a "oddity" with jde-help-docsets :)

It seems that the third parameter  which designates the doc-lookup-function
has to be something other than nil, even though it is ignored by the jde
lookup facility when it simply is a "javadoc" type of docset.

Customise will not let me save manually added docsets which has no function
present
and C-v-w complains about a function definition being nil if I set it
programaticlly.

My current workaround is just to put in a name of an existing function -
then it works.

Just so you know :)

Max





RE: Auto import-collapse

2002-01-24 Thread Wang, Changzhou

A simple solution would be to compile the current buffer, grep the
compilation output for "cannot resolve symbol\nsymbol: class", and then
invoke jde-import-find-and-import for each occurrence of them. 

Since the same name could refer to different classes, like java.util.Date
and java.sql.Date, jde-import-find-and-import may be invoked for different
occurrences of the same class name, preferable with the initial selection
set to the previous choice. For example, if the user already select
java.util.Date for the first Date, the initial choice of subsequent Date
shall be java.util.Date instead of java.sql.Date. It would be even better if
a customizable user option is provided to control this behaviour.

BTW, I vote for this "jde-import-all-interactively" feature.

Chang

> -Original Message-
> From: Nick Sieger [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, January 24, 2002 10:45 AM
> To: 'Sandip Chitale'; 'Matthew Rippa'
> Cc: 'JDE Mailing List'
> Subject: RE: Auto import-collapse
> 
> 
> > There was some discussion on this some months ago.
> > In fact I have written a BCEL based tool to do the expansion
> > of import.I think Nick Sieger had started a JDEE extension 
> to do that
> > kind of stuff using my tool.I do not know what is the current 
> > state of that
> > though. Does anyone have any clue ? Is it part of JDEE now ?
> > 
> > Check the following threads -
> > 
> > http://www.mail-archive.com/jde@sunsite.dk/msg01022.html
> > 
> > http://www.mail-archive.com/jde@sunsite.dk/msg01127.html
> > 
> > 
> > -regards,
> > sandip
> 
> Unfortunately, the auto-importer I wrote only works if you 
> already have a
> compiled version of that class.  It appears that Matt needs to do this
> before the first compile.  So there needs to be some parsing 
> of symbols in
> the java file in order to automate the import of all 
> unqualified symbols.
> Unfortunately, semantic 1.x does not parse method bodies so 
> there would have
> to be another way to do it.  Personally, I use `next-error' 
> in tandem with
> `jde-import-find-and-import' quite a bit.
> 
> Best,
> /Nick
> 
> > 
> > > -Original Message-
> > > From: Matthew Rippa [mailto:[EMAIL PROTECTED]]
> > > Sent: Tuesday, January 22, 2002 11:14 AM
> > > To: JDE Mailing List
> > > Subject: Auto import-collapse
> > > 
> > > 
> > > HI,
> > > 
> > > I know this is just being lazy, but is there a way, after 
> > > just witing a 
> > > class, to have the JDEE import and collapse all necessary classes?
> > > 
> > > I seem to be spending "considerable" time using C-c C-v C-z 
> > > on each class 
> > > name. --although I coudn't live without that feature! 8-)
> > > 
> > > Thanks for any help,
> > > -Matt
> > > 
> > 
> > 
> 



RE: jde-file-to-url which are compatible with Opera and internet explorer

2002-01-24 Thread Paul Kinnucan

Schewe, Jon  (MN65) writes:
 > I just tried it in IE6 and it doesn't work.  Sorry to spoil you're day.
 > 

Maybe I spoke too fast. This bears further investigation.

- Paul