Skip to main content



      Home
Home » Modeling » GMF (Graphical Modeling Framework) » semantic vs. displayed properties and labels
semantic vs. displayed properties and labels [message #141952] Tue, 10 July 2007 11:11 Go to next message
Eclipse UserFriend
Originally posted by: jacob.barde.swri.org

My application requires many of the item properties/attributes to be
stored (in file) using SI-based units within the semantic model. The
semantic model is parsed by an external program which requires SI
measurements / units. Additionally, the single unit basis for the
semantic model is for compatibility between the given diagram/model and
any imported/referenced models.

Due to the nature of the software requirements, the diagram will be
required to display in a user-selected measurement system
(US/English, Metric, or SI) for labels and property values.

Has anyone had to do something like this in a GMF-based project? Any
thoughts or suggestions would be very much appreciated.

Regards,

Jacob
Re: semantic vs. displayed properties and labels [message #142347 is a reply to message #141952] Thu, 12 July 2007 09:43 Go to previous messageGo to next message
Eclipse UserFriend
Jacob,

GMF supports alternative measurement systems. Take a look at the
IMapMode interface. The GMF Logic Diagram Example uses a himetric
coordinate system. Google "himetric and GMF" and you will find some
more tidbits of information.

Regards,
Cherie

Jacob Barde wrote:
> My application requires many of the item properties/attributes to be
> stored (in file) using SI-based units within the semantic model. The
> semantic model is parsed by an external program which requires SI
> measurements / units. Additionally, the single unit basis for the
> semantic model is for compatibility between the given diagram/model and
> any imported/referenced models.
>
> Due to the nature of the software requirements, the diagram will be
> required to display in a user-selected measurement system
> (US/English, Metric, or SI) for labels and property values.
>
> Has anyone had to do something like this in a GMF-based project? Any
> thoughts or suggestions would be very much appreciated.
>
> Regards,
>
> Jacob
Re: semantic vs. displayed properties and labels [message #142716 is a reply to message #142347] Sun, 15 July 2007 16:05 Go to previous message
Eclipse UserFriend
Originally posted by: jacob.barde.swri.org

Cherie,

Not sure if I elaborated enough on my previous post, but I'm not looking
to modify the diagram coordinate system (for node placement)... Unless
you are telling me that I can somehow extend MeasurementUnit and utilize
IMapMode to do the following:

- The application has a menu toggle to display node labels and/or
properties-tab node attribute values in either US/English, Metric or
SI.
- All node attribute values are stored in SI units.

e.g.
semantic:
<xml:XMI ...>
<foo:FooDiagram xmi:id="..." displayUnits="USEnglish">

<!-- NOTE: All measurements in SI/Metric meters -->
<node name="Bar" length="10.0" diameter="0.25"/>

...
</foo:FooDiagram>
<notation:Diagram ...>
...
</notation:Diagram>
</xmi:XMI>


Yet in labels or properties tabs these measurements will be shown in the
user-preferred measurement system...
Node Properties
Name | Bar |
Length | 10.936133 | yards
Diameter | 0.820209974 | feet


Basically, I'm looking to see if it is possible to create a plugin that
would perhaps override the components of GMF that handle properties and
labels and this plugin would then convert this measurement data on the
fly as it is read or written (note: I've already found an OS library
for unit conversions).

The other option I was also considering (and trying to avoid) dealt more
with modifying the semantic (EMF) model to accommodate the storage of
one attribute in SI then having another attribute for display purposes
(properties/labels) and modify the code from genmodel to do the
conversions of any display-attributes that are set. e.g.
Node
.length
.lengthDisp
.diameter
.diameterDisp


I figured that perhaps a few other people have had to do something
similar... or perhaps have done this using a different method than the
two previous methods I proposed.

Regards,

Jacob


Cherie Revells wrote:
> Jacob,
>
> GMF supports alternative measurement systems. Take a look at the
> IMapMode interface. The GMF Logic Diagram Example uses a himetric
> coordinate system. Google "himetric and GMF" and you will find some
> more tidbits of information.
>
> Regards,
> Cherie
>
Previous Topic:SVG in GMF2.0
Next Topic:Mind Map example Copy paste not working
Goto Forum:
  


Current Time: Thu Jul 17 20:56:10 EDT 2025

Powered by FUDForum. Page generated in 3.14906 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top