[TxMt] Re: Javadoc snippet question
Luke Daley
ld at ldaley.com
Tue Apr 28 02:07:37 UTC 2009
I just worked this one out.
The method match was requiring a method body for a match to be made.
In particular, it was bailing out of the match if it saw a ; after the
params. This was necessary because otherwise simple statements
involving method calls can look like method declarations.
What I have done is relaxed this requirement for native and abstract
methods.
The code you have provided is now scoped correctly.
Cheers.
On 27/04/2009, at 6:26 PM, Thomas Krajacic wrote:
> Well the doc block is of course for the following method. Sorry if I
> was unclear.
> And it works as intended. it was just my stupid mistake to put the
> comment on the first line.
>
> However when I put this in a vanilla Java file:
>
> class test {
> private native long InitModel();
> private native void Step(long modelPtr, int iterationsPerStep);
> private native void Term(long modelPtr);
> private native void setValue(long modelPtr, String Key, double
> Value);
> private native double getValue(long modelPtr, String Key);
> private native void setInitValues(long modelPtr, double n1, double
> n2, double
> p2, double p26, double p3, double wf, double t44);
> }
>
>
>
> the final method () is colored differently (brown) and the two before
> it are also differently colored (white).
> Now I understand why the first 3 are yellow (with my theme) and the
> next 2 are white. This has to do with the capitalization of the
> methods.
>
> But the last one should be white in my opinion since it is also
> lowercase like the ones before it.
> I must correct myself though. even when writing all the params in one
> line it stays brown...dunno why I remember otherwise. Sorry!
>
> It colors the last method like it thinks it is the implementation...
> (because all the parameters are also colored like in the
> implementation, not the "prototype")
>
> Does this coloring scheme make sense to you?
> Maybe I am just missing something (which I in no way doubt!)
> BTW I am using the Twilight Theme in TM
>
> Thx for looking into this!
>
> Thomas
>
>
>
> On 27 Apr 2009, at 09:47, Luke Daley wrote:
>
>>
>> On 27/04/2009, at 5:19 PM, Thomas Krajacic wrote:
>>
>>> Yes I am using latest version from svn but I found the problem:
>>>
>>> enter this:
>>>
>>> class something {
>>> private native void setInitValues(long modelPtr, double n1,
>>> double n2,
>>> double p2,
>>> double p26,
>>> double p3,
>>> double wf,
>>> double t44);
>>> /** this is wrong because it starts in the fist line
>>> * @
>>> */
>>> }
>>>
>>> I mistakenly wrote my comment on the first line of the javadoc
>>> block.
>>> this seems to be wrong, as below it doesn't recognize it as javadoc
>>> block anymore.
>>> This is my fault then I guess. don't know if it's forbidden to start
>>> writing in the first line.
>>
>> That's a very strange style.
>>
>> If there is anything on the first line after /** then it is strictly
>> not javadoc. It won't be picked up by any tooling looking for
>> javadoc.
>>
>> I am not sure about putting the javadoc AFTER the method either. I
>> very much doubt that is valid.
>>
>>> But the syntax coloring for the method above still is wrong. it
>>> colors
>>> the methodname correctly when I write all the parameters in the same
>>> line.
>>
>> There must be more to it because that block of code by itself is
>> recognised fine for me, everything is scoped as it should be.
>>
>> _______________________________________________
>> textmate mailing list
>> textmate at lists.macromates.com
>> http://lists.macromates.com/listinfo/textmate
>
>
> _______________________________________________
> textmate mailing list
> textmate at lists.macromates.com
> http://lists.macromates.com/listinfo/textmate
More information about the textmate
mailing list