X-CGP-ClamAV-Result: CLEAN X-VirusScanner: Niversoft's CGPClamav Helper v1.25a (ClamAV 0.103.11/27272) X-Junk-Score: 0 [] X-KAS-Score: 0 [] Return-Path: Received: from mail01.rucotec.ch ([65.21.159.64] verified) by post.selbstdenker.com (CommuniGate Pro SMTP 6.3.18) with ESMTPS id 32487698 for webobjects-dev@wocommunity.org; Sun, 12 May 2024 08:59:48 +0200 Received-SPF: pass receiver=post.selbstdenker.com; client-ip=65.21.159.64; envelope-from=markus.ruggiero@rucotec.ch Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id 1C0665EC0A for ; Sun, 12 May 2024 08:59:36 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rucotec.ch; s=dkim; t=1715497177; h=from:subject:date:message-id:to:mime-version:content-type:in-reply-to: references; bh=lj8ugEklhQGq1IgMwYC18IucL+LrcWMe7UNH+FeTOLQ=; b=f7sVEbH6amO5ZdE+4ZNZMl+TY24DPk+tdU+31puBti8Cqedqns68CnfXsceiG3E9tuj47q dEOQ+df5qMO9B1+dJY1gBZQM2KPoEn/nMDvKOdPPzvMzOx5JgkgLOUJU6X2A6Thl/nRb+r fb1gI+yTAnZ730xwjiRWDp9sQy71j2rtA+yuAdxxKANX9w4VZxcQ3GQbQx6QRn72HFHAqq XyjHP2GYg3pvKrtx2UaMzhFeli34uQtn+tY5hsqsSo6RI1Et5A+zaeufko07MOqM3b6bqz fkZX2c9xT/riJ0ih7A5aRjIz/b058eI04Ta2woKUjAnwSUgAqwLX6vCk5sMHGQ== From: "Markus Ruggiero (rucotec)" Content-Type: multipart/alternative; boundary="Apple-Mail=_FC8F5E2A-F739-4A36-96FD-8C4873B143D3" Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3774.500.171.1.1\)) Subject: Re: [WO-DEV] How can I access EOEntity userInfo documentation with EOGenerator? Date: Sun, 12 May 2024 08:59:25 +0200 References: To: WebObjects & WOnder Development In-Reply-To: Message-Id: X-Mailer: Apple Mail (2.3774.500.171.1.1) X-Last-TLS-Session-Version: TLSv1.2 --Apple-Mail=_FC8F5E2A-F739-4A36-96FD-8C4873B143D3 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > On 11 May 2024, at 18:24, Ralf Schuchardt wrote: >=20 > The documentation from EntityModeller should be directly accessible = under the documentation key, e.g. >=20 > /** > #if ($entity.documentation) * ${entity.documentation} > #end > */ > public abstract class ${entity.prefixClassNameWithoutPackage} >=20 > I have similar constructs in my template for attributes, relationships = and fetch specifications. >=20 > Ralf >=20 Thanks, that works. Who would have thought so? As far as I know EOEntity = does not have a documentation accessor, so there must be some internal = coding that maps the dictionaries and extracts the documentation. But now I have the next problem: I can put the comments into _MyClass.java and MyClass.java. Once EOGen = has run there will not be any updates to MyClass.java anymore. What if I = update the documentation? The updated doc goes into the regenerated = _MyClass.java but is NOT reflected in MyClass.java. The javadoc = {@inheritDoc} only works for stuff _inside_ the class definition but not = for the class documentation itself. Do you know of any way to make hovering over MyClass in Eclipse show the = combined javadoc from _MyClass and MyClass? The conceptual documentation of an entity clearly goes into _MyClass and = additional implementation specific documentation should go into MyClass. = But often I need to see the conceptual documentation of MyClass. Of = course I can command-click MyClass to open MyClass.java where I can = hover over the super class and see the doc but this =E2=80=9Cmesses up = my mental editing context=E2=80=9D and I lose track where I was and = where to go back to. Any idea? ---markus--- > Markus Ruggiero (rucotec) schrieb am 11. May 2024, um 14:54 Uhr: >=20 > When creating documentation for an entity in the Documentation tab in = EntityModeler the resulting doc is put into the userInfo dictionary. How = can I access this with EOGenerator? >=20 > userInfo =3D {=20 > "_EntityModeler" =3D {=20 > documentation =3D "doc for EMRTreatmentStep\n
    \n\t
  • a list = entry
  • \n
";=20 > };=20 > }; >=20 > Tried different KV-paths in the template file but failed whenever I = explicitly used the key =E2=80=9C_EntityModeler=E2=80=9D with/out = =E2=80=9C_=E2=80=9D, with/out capital =E2=80=9CE=E2=80=9D. Using =E2=80=9C= _=E2=80=9D results in a syntax error during generation. >=20 > Accessing the user info dict itself works >=20 > Using=20 > ${entity.userInfo} >=20 > results in=20 > {_EntityModeler=3D{documentation=3Ddoc for EMRTreatmentStep=20 >
    =20 >
  • a list entry
  • =20 >
}} >=20 > Which is great so far but two key too high in the key path.=20 > However going deeper only dumps the given path itself into the result=20= > ${entity.userInfo.entityModeler} >=20 > results in=20 > ${entity.userInfo.entityModeler} >=20 > I expect this to result in something like=20 > {documentation=3Ddoc for EMRTreatmentStep=20 >
    =20 >
  • a list entry
  • =20 >
} >=20 > Seems like EOGenerator explicitly ignores the key =E2=80=9C_EntityModele= r=E2=80=9D >=20 > I can put my own javaDoc key into the user info dict, this works, but = the text input field in WOLips EntityModeler is way too small in the = userInfo editor.=20 > What is the documentation good for if I cannot access it? >=20 > Any ideas? >=20 --Apple-Mail=_FC8F5E2A-F739-4A36-96FD-8C4873B143D3 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=utf-8
On 11 May = 2024, at 18:24, Ralf Schuchardt <rasc@gmx.de> wrote:

=

The documentation from = EntityModeller should be directly accessible under the documentation key, e.g.

/**
#if ($entity.documentation) * ${entity.documentation}
#end
 */
public abstract class ${entity.prefixClassNameWithoutPackage}

I have similar constructs in my template = for attributes, relationships and fetch specifications.

Ralf


T= hanks, that works. Who would have thought so? As far as I know EOEntity = does not have a documentation accessor, so there must be some internal = coding that maps the dictionaries and extracts the = documentation.

But now I have the next = problem:

I can put the comments into = _MyClass.java and MyClass.java. Once EOGen has run there will not be any = updates to MyClass.java anymore. What if I update the documentation? The = updated doc goes into the regenerated _MyClass.java but is NOT reflected = in MyClass.java. The javadoc {@inheritDoc} only works for stuff _inside_ = the class definition but not for the class  documentation = itself.

Do you know of any way to make hovering = over MyClass in Eclipse show the combined javadoc from _MyClass and = MyClass?

The conceptual documentation of an = entity clearly goes into _MyClass and additional implementation specific = documentation should go into MyClass. But often I need to see the = conceptual documentation of MyClass. Of course I can command-click = MyClass to open MyClass.java where I can hover over the super class and = see the doc but this =E2=80=9Cmesses up my mental editing context=E2=80=9D= and I lose track where I was and where to go back = to.

Any = idea?

---markus---

Markus = Ruggiero (rucotec) schrieb am 11. May 2024, um 14:54 Uhr:

When = creating documentation for an entity in the Documentation tab in = EntityModeler the resulting doc is put into the userInfo dictionary. How = can I access this with EOGenerator?

userInfo =3D = {
"_EntityModeler" =3D {
documentation =3D "doc for = EMRTreatmentStep\n<ul>\n\t<li>a list = entry</li>\n</ul>";
};
};

Tried different KV-paths in the template file = but failed whenever I explicitly used the key =E2=80=9C_EntityModeler=E2=80= =9D with/out =E2=80=9C_=E2=80=9D, with/out capital =E2=80=9CE=E2=80=9D. = Using =E2=80=9C_=E2=80=9D results in a syntax error during = generation.

Accessing the user info dict itself = works

Using
${entity.userInfo}

results in
{_EntityModeler=3D{documentation=3Ddoc for EMRTreatmentStep
<ul>
<li>a list entry</li>
</ul>}}

Which is great so far but two key = too high in the key path.
However going deeper only dumps the given path itself into the result
${entity.userInfo.entityModeler}

results in
${entity.userInfo.entityModeler}

I expect this = to result in something like
{documentation=3Ddoc for EMRTreatmentStep
<ul>
<li>a list entry</li>
</ul>}

Seems like EOGenerator explicitly = ignores the key =E2=80=9C_EntityModeler=E2=80=9D

I = can put my own javaDoc key into the user info dict, this works, but the = text input field in WOLips EntityModeler is way too small in the = userInfo editor.
What is the documentation good for if I cannot access it?

Any ideas?



= --Apple-Mail=_FC8F5E2A-F739-4A36-96FD-8C4873B143D3--