Changes between Version 171 and Version 172 of j2p


Ignore:
Timestamp:
11/20/24 15:45:00 (5 days ago)
Author:
wouter
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • j2p

    v171 v172  
    413413Comments can contain python code to override the automatic code, if the block starts with {{{#PY}}}. This code replaces the entire object (if/case/while block; statement) that follows the comment.
    414414
    415 Place the #PY block directly before the object you want to override. For example if you place a #PY block before an annotation, you override only the annotation, not the actual method/class after the annotation.  This unfortunately will look a bit non-java but it seems the best way to accurately target the  override.
     415Place the #PY block directly before the object you want to override. So you can override also single {{{@Annotations}}} with this.
     416
     417{{{#!td style="background: #fee"
     418If you place a #PY block before an annotation, you override only the annotation. So put the override after the annotations if you want to override the method/field/class.
     419}}}
    416420
    417421If you want to insert a statement in python, not overriding an existing java statement, then insert an empty statement {{{;}}} in java, and annotate it with //#PY as usual.