[TxMt] Update needed to the Java Language Definition

Steve Lianoglou lists at arachnedesign.net
Thu Jul 6 15:56:28 UTC 2006


Hi folks,

Methods w/ Generic return types aren't being noticed as symbols and  
so aren't appearing in the symbol list and can neither be jumped-to  
with Command-Shift-T

So .. a method like this:

public ArrayList<String> getNames() {

}

won't be recognized as a symbol .. I guess the "<Something>" is  
tripping it up.

I've been trying to change the "type" part of the  
meta.definition.method.java rule from this:
(\b(void|boolean|byte|char|short|int|float|long|double|(\w+\.)*[A-Z]\w 
+)\b(\[\s*\])?)\s* # type

to:

(\b(void|boolean|byte|char|short|int|float|long|double|(\w+\.)*[A-Z]\w 
+(<(\w+\.)*[A-Z]\w+>)?)\b(\[\s*\])?)\s* # type

but it's not cutting the mustard.

That definition, btw, is found on line 69 of the java language bundle  
by way of copying the Java language definition straight from the  
bundle editor, into a normal textmate window.

I tried escaping the "\<" ... but I don't think that's necessary (and  
it didn't work)

Any language/regex gurus willing to offer some advice?

Thanks,
-steve



More information about the textmate mailing list