Function List - Java Code

Syntax highlighting, code folding, brace matching, code indenting, and function list

Function List - Java Code

Postby vfire » Thu Aug 05, 2004 3:04 am

:?:
---------- Tester.java

public class Tester {

public String testing( String arg0,
String arg1 )
throws Exception {

return null;
}
}

-----------
I am using UltraEdit32 10.10a. I found the ultraedit did not show the function list properly if the argument is in multiple lines.
Any setting i can adjust to show the function list properly ? Thanks!
User avatar
vfire
Newbie
 
Posts: 2
Joined: Wed Aug 04, 2004 11:00 pm

Re: Function List - Java Code

Postby DanKirkd » Thu Aug 05, 2004 10:33 pm

Edit your wordfile.txt file definition for Java so it uses the following function strings:

/Function String = "%[ ^t]++[ps][a-z]+[ ^t]+[a-z0-9]+[ ^t]+[a-z0-9]+[ ^t]+^(*(*[^p]++[~)]++)^)[~;]++$"
/Function String 1 = "%[ ^t]++[ps][a-z]+[ ^t]+[a-z0-9]+[ ^t]+^(*(*[^p]++[~)]++)^)[~;]++$"
/Function String 2 = "%[ ^t]++[ps][a-z]+[ ^t]+^([a-z0-9]+[ ^t]++(*[^p]++[~)]++)^)[~;]++$"


Should pickup the second argument just fine.

This is from the Java 1.4 wordfile available at http://www.ultraedit.com/files/wf/java14.uew.

Dan
User avatar
DanKirkd
Basic User
Basic User
 
Posts: 39
Joined: Wed Jul 14, 2004 11:00 pm

Re: Function List - Java Code

Postby vfire » Thu Aug 05, 2004 10:43 pm

It works fine. Thanks.
User avatar
vfire
Newbie
 
Posts: 2
Joined: Wed Aug 04, 2004 11:00 pm

Re: Function List - Java Code

Postby Hamlet » Fri Aug 20, 2004 7:42 am

Do you know how to get this C++ function to be recognized?

extern "C" LIBEXPORT RETURN_STRUCT *calculateDiscrete(
char* assign_num,
char* plan_date,
char* split_indicator
)
{
...
}

I've been toying with the word file for a while but to no avail. :(
User avatar
Hamlet
Newbie
 
Posts: 1
Joined: Thu Aug 19, 2004 11:00 pm

Re: Function List - Java Code

Postby DanKirkd » Fri Aug 20, 2004 11:39 am

I suggest you post a new topic asking this question so that it can be tracked better.

Dan
User avatar
DanKirkd
Basic User
Basic User
 
Posts: 39
Joined: Wed Jul 14, 2004 11:00 pm

Re: Function List - Java Code

Postby xusooxusoo » Tue Oct 19, 2004 9:00 pm

Hi,
It works well with most Java methods,except for these two methods:
1)function with default access modifier.
void someMethod1(int anArg, Object anotherArg, String yetAnotherArg,
Object andStillAnother) {
...
}

2)function whose return type is an array.
private byte[] someMethod2(int anArg,Object anotherArg) {
...
}

It makes big trouble since I use UltraEdit in 1999,your help would be appreciated very much.


Regards,
Xu Song
User avatar
xusooxusoo
Newbie
 
Posts: 5
Joined: Sat Oct 16, 2004 11:00 pm

Re: Function List - Java Code

Postby toddm » Wed Oct 20, 2004 9:30 am

Hamlet wrote:Do you know how to get this C++ function to be recognized?

I made a slight modification to my C++ function strings to handle this function. The "C" caused a problem before. I did notice a problem where the last function in the file might not be recognized if it is an empty function. I'll have to look into that.

Code: Select all
//
// Handles the case where Class:: is the type
//                  type                 function name              (  parameters or none               
/Function String = "[a-zA-Z_0-9*&]+[:]+^([~(){} ^t^p]+[ ^t]++[(]+[~;{]++)[~;{:]++^)[{=]+"
//
// Handles the case where type on same line as function
//                                    type                         function name       ( parameters or none             
/Function String 2 = "%[~(){} ^t^p#/]+[a-zA-Z_0-9*&<>: ^t^"]+[ ^t]+^([~(){} ^t^p]+[ ^t]++([~(=;]+)[~()=;{]+^)[{=]+"
//
// Handles the case where type on different line as function
//                    type                           function name              (  parameters or none             
/Function String 3 = "[a-zA-Z_0-9*&<>]+[ ^t]++[^p]+^([a-zA-Z_0-9*&=<^~]+[ ^t]++[(]+[a-zA-Z_0-9<>&* ^t,^p:/^[^]]++[)]+[ ^t^pa-zA-Z/]++^)[{=]+"
//
// Special case for TEST_MAIN
//                       function name(  parameters or none          filler    start of function               
/Function String 4 = "%^(TEST_MAIN[ ^t(]+[a-zA-Z_0-9<>&* ^t,^p]++[)]+[ ^t^p]+^)[{=]+"
//
User avatar
toddm
Advanced User
Advanced User
 
Posts: 83
Joined: Wed Jul 28, 2004 11:00 pm

Re: Function List - Java Code

Postby toddm » Wed Oct 20, 2004 9:31 am

Function string 2 handles the function in question.
User avatar
toddm
Advanced User
Advanced User
 
Posts: 83
Joined: Wed Jul 28, 2004 11:00 pm


Return to Syntax Highlighting