Login | Register
My pages Projects Community openCollabNet

Discussions > users > Re: [gef-users] Anyone need org.tigris.gef.ocl?

Discussion topic

Back to topic list

Re: [gef-users] Anyone need org.tigris.gef.ocl?


Author anoncvs
Full name anonymous CVS access
Date 2004-02-20 16:01:39 PST
Message Hi Bob,

Sorry not to reply sooner.

The OCL package in GEF is not so much tied to UML. It is just
some utility classes that evaluate expressions in the .tee templates
used when saving PGML files.

TEE (Templates with embedded expressions) was my own templating language
that I invented back in 1998 or so. The embedded expressions grab
values from the Java objects, e.g, in PGML.tee there is:

<template class="java.awt.Rectangle">


<template class="org.tigris.ge​f.presentation.FigGr​oup">
<group name="<ocl>sel​f.id</ocl>"


I needed it at the time because I was using only SAX with a
parser library that did not offer any DOM objects and did not
offer to output XML.

I called the expression language "ocl" because it was a subset
of OCL and I had hoped to eventually expand it to really handle
general OCL expressions. As is, I think that it just handles
It uses java expressions to get the values of those object

I see that CmdSavePGML still uses the code in the ocl package and the
PGML.tee file. However, SVG saving using completely different code
that makes use of SVGWriter that works by building a DOM tree and then
outputting it using hard-coded formatting.

Actually, I dont see how the SVG feature could ever "save" (rather than
"export") because I dont see any references to "owner". In GEF each
Fig has an owner attribute that points to the model object that
that Fig is presenting. PGML.tee uses an href attribute
to refer to a model element URI. In contrast, SVGWriter implements
Graphics, that is much too low-level to ever get any of the owners.

ArgoUML still saves diagrams as PGML, probably because there
is no working way to save as SVG.

We dont have to use PGML or SVG, we could make a new XML DTD
specifically for GEF files if we wanted.

Here is how we could get rid of my minimalistic TEE files and
the OCLEvaluator:

1. Switch to a full template generation system, such as Velocity.
That templating engine would have its own way of evaluating expressions
using java reflection. The advantage is that it would have a whole
lot more power, and it would be maintained and debugged by more people.

2. Generate a DOM tree by starting at the Diagram and working down
to the Figs (including their owners). Since we are requiring xerces
anyway, we might as well use its DOM output capabilities.

I prefer #1 because #2 could use a ton of memory.

I'll just note one cool thing about TEE before I let it die
and be erased from history :) It was pretty clean because it
automatically recursively found templates for individual objects
based on Class and it automatically looped over collections.
You could kind of think of it as XSL in reverse.


On Fri, 2004-02-20 at 11:07, Bob Tarling wrote:
> The ocl package is specific to a UML diagram implementation. GEF
> should be a generic graph drawing kit without knowledge of specific
> applications.
> Are there any objections to me deprecating this. Any UML tools using
> GEF should move these classes to their own codebase.
> Any objections then please respond to the GEF user list.
> Regards
> Bob.

To unsubscribe, e-mail: users-unsubscribe@ge​f.tigris.org
For additional commands, e-mail: users-help at gef dot tigris dot org

« Previous message in topic | 1 of 1 | Next message in topic »


Show all messages in topic

Re: [gef-users] Anyone need org.tigris.gef.ocl? anoncvs anonymous CVS access 2004-02-20 16:01:39 PST
Messages per page: