Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Difference between revisions of "Graphical Modeling Framework/Versions/GMF 2.1"

(2.0 M6/RC0)
 
(63 intermediate revisions by 11 users not shown)
Line 1: Line 1:
Graphical Modeling Framework 2.0 New and Noteworthy items
+
{{Template:GMF}}
  
...broken down by milestones, (see [[GMF Project Plan]] for more details)
+
== 2.1 M1 ==
  
Back to [[Graphical Modeling Framework]]
+
=== Export Big Diagrams to Images ===
 +
Huge diagrams that fail to be exported to a single JPEG, JPG, GIF, PNG or BMP image (Bug [https://bugs.eclipse.org/bugs/show_bug.cgi?id=160386&query_format=specific&order=relevance+desc&bug_status=__open__ 160386]), now can be exported to a number of images that combined together will display the image of the whole diagram (or selected editparts). An HTML file is created to view the whole image. The HTML file essentially contains a table, each cell of which is occupied by the appropriate piece of diagram's image (i.e. by the image file corresponding to that particular piece of the diagram). GMF's UI for exporting diagrams to images has been added a checkbox "Export to HTML", which will trigger exporting the diagram as described above.
  
 +
[[Image:CopyToImageDialog.gif]]
  
== GMF Release 1.0 (June 30, 2006) ==
+
The result of exporting a huge Geoshape diagram to HTML with the HTML file opened looks as follows:
[http://www.eclipse.org/gmf/new/gmf-new-1.0.php GMF 1.0 New and Noteworthy]
+
  
<span id="R20"></span>
+
[[Image:CopyToHTMLResult.gif]]
== 2.0 M1 (September 04, 2006) ==
+
  
===Merging for plugin.xml and plugin.properties===
+
<span id="R21"></span>
Protected region is defined in plugin.xml where users may add their extensions. These extensions will be preserved on diagram editor regeneration. Properties file plugin.properties is merged using EMF merger for property files.
+
  
 +
== 2.1 M3 ==
  
[[Image:ProtectedRegionPluginXML.png]]
+
=== Label Enhancements in the GMF Runtime ===
 +
There were a number of usability bugs with the WrapLabel implementation and the TextDirectEditManager.  The TextCompartmentEditPart and its helper classes also made assumptions that the figure of a TextCompartmentEditPart was a WrapLabel, making it difficult for clients to use any other label figures.
  
 +
A new WrappingLabel has been created that uses GEF's Flow Figure classes to perform that text wrapping.  The TextCompartmentEditPart and its helper classes have been modified so that there is only a dependency on a new interface, ILabelDelegate, which a client could use with any figure for displaying the label.  The TextDirectEditManager has been changed to fix a few bugs and work with an ILabelDelegate.
  
===Add custom edit policies in gmfgen model===
+
Existing GMF Runtime clients need not make any code changes to enjoy the benefits of the new WrappingLabel as the existing WrapLabel subclasses the new WrappingLabel.  However, it would be wise to test all behavior with text on diagrams to ensure there are no regressions.
Custom behaviour may be added to diagram element using CustomBehaviour object. In generated code this means inserting custom edit policy in edit part of diagram element.
+
  
 +
A document which discusses the design, gives an overview of the changes made, and provides documentation for the clients on how to use the new WrappingLabel is attached to the bugzilla: [https://bugs.eclipse.org/bugs/show_bug.cgi?id=162932 Bug 162932]
  
[[Image:GMFCustomBehaviour.png]]
+
== 2.1 M4 ==
  
 +
=== Group/Ungroup Functionality in the GMF Runtime ===
 +
The GMF Runtime now has the ability to group and ungroup shapes.  Check out the GMF Runtime Logic and Geoshapes Examples to see the new functionality.  It's under the Format menu when multiple shapes are selected.  The group/ungroup actions are not contributed by default by the GMF Runtime.  To learn how to adopt the group/ungroup in a GMF diagram, see the document attached to [https://bugs.eclipse.org/bugs/show_bug.cgi?id=111892 Bug 111892].  Note at this point, the group/ungroup functionality has not yet been adopted by the GMF Code Generator.
  
===Default mapping creation wizard creates canvas mapping===
+
=== Additional Snap to Grid Functionality in the GMF Runtime ===
Mapping wizard generated by EMF is enhanced by adding pages to select domain model, diagram canvas and palette. If specified domain, graphical and tooling definition models are loaded and canvas mapping that binds them is added.
+
The GMF Runtime has extended the use of snap to grid for two existing components.
  
 +
==== Arrange All / Arrange Selection ====
 +
Edit parts selected will now snap to grid at the end of the arrange session, if the snap to grid property is enabled. [https://bugs.eclipse.org/bugs/show_bug.cgi?id=119252 Bugzilla 119252] Screen shots of "arrange all" in action with snap to grid on is shown below.
  
[[Image:GMFMappingWizardResult.png]]
+
{| border="1" cellpadding="2"
 +
!width="300"|Before Using Arrange All
 +
!width="300"|After Using Arrange All
 +
|-
 +
| [[Image:arrange_before.jpg]] || [[Image:arrange_after.jpg]]
 +
|}
  
 +
==== Connection Bend Points ====
 +
Connection bend points will now snap to grid when being dragged by the user, if the snap to grid property is enabled.
 +
[https://bugs.eclipse.org/bugs/show_bug.cgi?id=194282 Bugzilla 194282]  A screen shot of bend points snapped to grid
 +
is shown below.
  
===Unit-testing===
+
[[Image:connection_bendpoint.jpg]]
Unit-tests covering following parts of generated code were implemented:
+
  
- toolbar tools
+
=== GEF Alignment Feature: Snap To Geometry added in the GMF Runtime ===
 +
The GMF Runtime now has the capability to allow edit parts to snap to each other when editing. [https://bugs.eclipse.org/bugs/show_bug.cgi?id=188974 Bugzilla 188974] The snap to geometry property can be enabled and disabled in the ruler/grid property section. Snapping to other edit parts inside compartments are also supported.  However, edit parts can only snap to other edit parts that share the same parent. (e.g: edit parts inside a compartment can only snap to each other)  Some screen shots of this new feature are shown below.
  
- diagram and model resources saving
 
  
- diagram node hierarchy creation
+
{| border="1" cellpadding="5" cellspacing="0" align="center"
 +
|-
 +
|-
 +
| [[Image:snapGeo_01.jpg]]
 +
| [[Image:snapGeo_02.jpg]]
 +
| [[Image:snapGeo_03.jpg]]
 +
|-
 +
| colspan="3" align="center" |
 +
{| border="0"
 +
|-
 +
| align="center" | [[Image:snapGeo_04.jpg]]
 +
|}
 +
|}
  
- compilation test for user models with “instance class name” property specified
+
=== Customize Palette Capability in the GMF Runtime ===
  
== 2.0 M2 ==
+
It is now possible for users to customize the palette in an application using the GMF Runtime.  Users can: hide palette entries, rename palette entries, and set drawers to be open and/or pinned on startup.  The customizations are saved in the workspace preferences.
  
=== Wizards to reconcile graphical and tooling definition models ===
+
At this point, saving the customizations does not work in GMF generated diagram editors because these editors do not have palette ids.
  
Wizards that infer graphical and tooling definitions from domain model now can reconcile results with existing models. One may start such wizards explicitly using File -> New -> Other menu or use GMF Dashboard where 'Derive' actions switch wizards to reconcile mode if graphical and tooling definitions are selected for the project.
+
For further details see: [https://bugs.eclipse.org/bugs/show_bug.cgi?id=114117 Bugzilla 114117]
  
 +
[[Image:CustomizeMenu.jpg]] || [[Image:CustomizeDialog.jpg]]
  
[[Image:GMFDefReconcile.png]]
+
== 2.1 M5 ==
  
 +
=== Palette Enhancements in the GMF Runtime ===
  
 +
# The palette can be resized, moved to the west side of the diagram, and minimized by the user; however, these settings were never persisted.  Now these customizations are saved in the workspace preferences.  See [https://bugs.eclipse.org/bugs/show_bug.cgi?id=117917 Bugzilla 117917]
 +
# There is a new method getInitialDockLocation() in DiagramEditorWithFlyOutPalette that allows the client to change the default docking location of the palette to be the west side.  See [https://bugs.eclipse.org/bugs/show_bug.cgi?id=206371 Bugzilla 206371]
  
=== Diagram Content Navigator ===
+
=== Moving Shapes with the Keyboard ===
  
Diagram content could be provided below diagram file node in standard Project Explorer Eclipse view. Read-only properties of underlying semantic element available for single-element selection.  
+
There have been complaints that it is too hard to move a shape with the keyboard. The current behavior requires the user to press the ‘.’ key which shows the move handle, then the arrow keys to move the shape, and then enter to accept the position.  
  
[[GMF_Diagram_Navigator_Use_Cases#GMF_GenModel_modifications|GenNavigator]] metaclass was added to [[GMF GenModel]]. Default Navigator structure will be created automatically by [[GMF MapModel]] - [[GMF GenModel]] transformer, so it is necessary to run this transformation and regenerate the code from newly created [[GMF GenModel]] to get Navigator generated.  
+
The behavior has been changed in the GMF Runtime so that the user can now use the arrow keys to move a selected shape.  The shape moves immediately when an arrow key is pressed.  The Tab and Ctrl + Tab keys are now used to navigate between shapes on the diagram.
  
 +
For further information regarding this work, see the feature design document attached to [https://bugs.eclipse.org/bugs/show_bug.cgi?id=111901 Bugzilla 111901].
  
[[Image:GMFEcoreDiagramNavigator.PNG]]
+
For a complete listing of keyboard shortcuts in GMF, see the document titled "Developer Guide to Keyboard Accessibility" in the GMF documentation.
  
 +
== 2.1 M6 ==
  
=== ILinkHelper implementation generated ===
+
=== New Palette Look and Feel in the GMF Runtime ===
  
Project Explorer selection could be synchronized with open diagram selection if "Link open editors with content in the Navigator" button pressed on Project Explorer toolbar. To implement this functionality additional class <DiagramPrefix>NavigatorLinkHelper will be generated.
+
There have been many changes made in both GEF and GMF to add a new look and feel to the palette. The enhancement requests that addressed these are:
  
 +
[https://bugs.eclipse.org/bugs/show_bug.cgi?id=133385 Bugzilla 133385 palette UI look and feel changes]
  
[[Image:NavigatorLinkHelper.PNG]]
+
[https://bugs.eclipse.org/bugs/show_bug.cgi?id=220381 Bugzilla 220381 Pinnable Stacks and UI Changes]
  
=== Option to create a GenModel if it's missing  ===
+
More specifically:
 +
# New color treatment for drawers: Closed, expanded and hover.
 +
# New color treatment for groups and tools: white background, mouse hover and selected (blue and yellow).
 +
# New color treatment for stacks: white background, mouse hover and selected (blue and yellow).
 +
# New Pin in and Pin out icons
 +
# New Palette icon
 +
# New dock and expanded look.
 +
# Drawer icon is optional.
 +
# Addition of a toolbar in the palette.
 +
# New look for stack flyout.
 +
# Stacks can be pinned open.
  
If during transformation appropriate .genmodel was not detected, toolsmith could browse for existing with an option to either create a new blank model with regular defaults or to launch EMF wizard to create .genmodel manually.
+
Here are a few screenshots of the new palette look:
 +
[[Image:NewPaletteUI.JPG]]
  
[[Image:gmf-missed-genmodel-dialog.png]]
+
=== WYSIWYG .gmfgraph editor improvements ===
 +
# Property pages for Styles, Layout and LayoutData are fully generated using new org.eclipse.gmf.formtk plug-in
 +
# GridLayout is now supported by WYSISYG .gmfgraph editor
 +
# Property page with possibility to modify Location, Preferred, Minimum and Maximum figure size was added
  
 +
=== Generator model improvements ===
 +
# Property to support tree routing style for links, now true by default
  
=== Basic support for diagram partitioning ===
+
=== Dynamic (code-less) EMF models for domain ===
 +
[https://bugs.eclipse.org/150177 Bugzilla 150177 Should be able to use dynamic EMF instead of the generated code to store underlying diagram model]
  
GMFMap's MappingEntry has a link to other CanvasMappings now. Once it's defined, transofrmation attaches OpenDiagramBehaviour to appropriate GenNode, and there's OpenDiagramEditPolicy generated that tries to open editor for the diagram.
+
GMF Tooling used to require what seems to be regular EMF usecase - Java code for model implementation. However, there are scenarios when generating Java code is impractical (e.g. embedded domain, huge models (often completely derived from XSD), etc). With introduction of dynamic_package extension point in EMF 2.4, which makes it possible to distribute/publish models without generated implementation code easily, the need for GMF to support such model is undisputed.
  
 +
There's new element in the GMFGen model, DynamicModelAccess (<tt>GenEditorGenerator#modelAccess</tt>), which, when added, forces GMF Tooling to produce a helper facility (default called MetaModelFacility with class/feature lookup methods, along with analogs for instanceof check and so on). Right-click the Gen Editor Generator -> New Child -> Dynamic Model Access. Rest of the generated code uses the facility to check domain model condition, create new elements and so on.
  
=== Do not generate superfluous code in few particular cases ===
+
By default, facility uses global package registry (and hence relies on domain model being registered with dynamic_package extension point). This can be easily changed in <tt>#getRegistry()</tt> method of the generated facility class (don't forget to mark it <tt>@generated '''NOT'''</tt>).
  
'''CanonicalEditPolicy''' is no longer generated for elements without immediate children to be updated. '''GraphicalNodeEditPolicy''' is generated only when there are links with inverted direction. You may notice that these policies are no longer registered within node's '''createDefaultEditPolicies()''' method after regeneration and remove respective classes. Alternatively, if you didn't change the edit policies' code, you may remove all classes extending '''CanonicalEditPolicy''' and '''GraphicalNodeEditPolicy''' in your plug-in and regenerate the code. This will leave only those policies that are needed.
+
=== Inject Java Expression Body ===
 +
The way expressions with language 'Java' being handled has changed. Prior to 2.1, body of the expression was used to generate placeholder implementation method. This seems quite odd when a method ''name'' is taken from ''body'', and has been changed in 2.1. Now, method names are generated automatically, and (the fruitful part) there's a new boolean attribute in <tt>GenJavaExpressionProvider</tt>, which controls whether body of the Java expression should be injected into generated method. In most cases this allows toolsmith not to bother with <tt>@generated NOT</tt> for the Java expression methods, rather keeping their implementation in the model and having them injected on regeneration. Use <tt>GenJavaExpressionProvider#injectExpressionBody</tt> (defaults to false) to control injection for all expressions referenced by this provider.
  
== 2.0 M3 ==
+
=== Missing implementation for Java Expressions ===
=== Double-click support for diagrams in navigator ===
+
To fill placeholder methods for Java Expressions, GMF Tooling used to generate code that throws a runtime exception. This behavior left as default, however there's new attribute, <tt>GenJavaExpressionProvider#throwException</tt> that allows Toolsmith to turn it off. When <tt>throwException</tt> is false, and <tt>injectExpressionBody</tt> (see previous N&N item) is also false, code generator places some compilable expression (appropriate for the context) instead of <tt>throws</tt> clause. For example, when Java expression used in metric, with expected Double return value, a <tt>Double.NaN</tt> return value would get generated.
Corresponding diagram will be opened in editor (activated if already opened) on double-clicking to the diagram node in diagram file content sub-tree provided to the Project Explorer Eclipse view. Useful for the situation then several diagrams are stored in the same diagram file (see [[GMF_New_and_Noteworthy#Basic_support_for_diagram_partitioning|Basic support for diagram partitioning]]).
+
  
=== Mapping Model Visual Editor ===
+
=== Extensible GMFGraph and GMFGen models ===
Diagram editor that uses GMF mapping model as domain model. In other words now you may design diagram editor in diagram editor )))
+
[https://bugs.eclipse.org/220598 Bugzilla 220598 Utilize EMF child extenders for GMF models]
You need ''org.eclipse.gmf.map.editor'' plugin.
+
  
[[Image:GMFMapDE.png]]
+
It used to be a pain to augment GMF Tooling in a model-driven way. Say, one needed to add an extra figure class into graphical definition or custom attributes to utilize during editor codegeneration. With EMF child extenders enabled for GMFGraph and GMFGen models it's easy now to capture your custom extensions with an EMF model and still use default editors to edit GMF models.
  
=== Automatic diagram editor refresh ===
+
=== FeatureValueSpec structural change ===
Generated diagram editor will be automatically refreshed on any changes in the eclipse resource subsystem made outside of the editor without reopening. Examples of such changes are:
+
[https://bugs.eclipse.org/227505 Bugzilla 227505 Replace FeatureValueSpec generalization of ValueExpression with aggregation]
  
- modifications made in domain model inside EMF-generated tree editor
+
There's a conceptual flaw where FeatureValueSpec (essentially, an entity to pair a feature and a value to assign to the feature) generalized ValueExpression, instead of aggregating/associating. This has been fixed now, both for GMFMap and GMFGen elements. Migration support updates existing value specifications, replacing FeatureValueSpec fields with aggregation of ValueExpression.
  
- modifications made on another diagram created in the same diagram resource using [[GMF_New_and_Noteworthy#Basic_support_for_diagram_partitioning|diagram partitioning]] feature
+
=== Text Alignment Enhancement ===
 +
[https://bugs.eclipse.org/224473 Bugzilla 224473 Text alignment enhancement]
  
- diagram/domain model resource rename/move in the workspace
+
The GMF Runtime now includes a text style to the notational meta model with a text alignment attribute.
  
- changes in diagram/domain resource downloaded from version control
+
Text can be left, center or right aligned. The default is left aligned.
  
Corresponding dialogs will appear on following editor activation/saving if editor state was dirty at the moment of changes in the eclipse resources subsystem.
+
The enhancement is adopted for note, text and geometric shapes in the GMF Runtime and can be adopted by clients.
  
=== Xpand Template Engine ===
+
Text alignment can be set using four standard UI mechanisms that exist as standard features in GMF based diagrams:
JET alternative which is much more handy for complex template we've got in GMF is now part of SDK. Figure generation (''org.eclipse.gmf.graphdef.codegen'') has been rewritten with Xpand.
+
For more details on Xpand read the [[http://www.eclipsecon.org/summiteurope2006/presentations/ESE2006-EclipseModelingSymposium3_ModeltoText.pdf paper]] from Eclipse Summit Europe.
+
  
=== Merge for plugin.xml ===
+
#From the Diagram main menu (Diagram + Text Alignment + Center).
 +
#From the popup menu on the diagram (Text Alignment + Center).
 +
#From the appearance tab in the properties view.
 +
#From the advanced tab in the properties view.
  
Protected regions added in M1 were replaced with per-extension 'generated' marker in form of XML processing instruction. Any tag not marked as generated will be preserved during merging. Extensions marked as generated are matched using respective point id (note, multiple extensions for same point may have merging issues, we are going to further refine matching using extension ids or additional attribute in the processing instruction).
+
[[Image:TextAlignmentDiagram.png]]
  
== 2.0 M4 ==
+
=== Line Styles Enhancement ===
 +
[https://bugs.eclipse.org/225137 Bugzilla 225137 Line styles enhancement]
  
=== RCP Application ===
+
The GMF Runtime now includes new line styles in the notational meta model to support:
It's possible to generate diagram editor as RCP application based on full GMF runtime:
+
  
[[Image:GMF_RCP_Application.png]]
+
*Line Width, in points, the default is one point (one pixel)
 +
*Line Type, solid, dot, dash, dash-dot, dash-dot-dot, the default is solid
 +
*Arrow Type, none, open arrow, solid arrow.
  
=== TypeLink creation commands are generated as separate classes ===
+
The enhancement follows from text alignment in terms of adoption by standard shapes and can be set using the four standard UI mechanisms.
Separate class implementing link creation command will be generated for each TypeLink. This is first part of the fix for [https://bugs.eclipse.org/bugs/show_bug.cgi?id=157683 request #157683] significantly simplifying generated code modification in case of TypeLinks connecting abstract super-class(es) of several domain elements.
+
  
Since in previous version of generator link creation commands were generated as inner-classes inside source/target ???NodeItemSemanticEditPolicy, these classes will be removed by next code generation. If some of the link creation commands were marked as "@generated NOT" and customized by user then corresponding code should be manually stored prior to the code generation and then moved into the newly generated ???TypeLinkCreateCommands.
+
[[Image:Line_styles_after.png]]
  
You have to re-transform .gmfgen model from .gmfmap model to generate correct code.
+
=== Multi-platform Diagram Printing  ===
 +
[https://bugs.eclipse.org/196834 Bugzilla 196834 Multi-platform Diagram Printing]
  
=== Compartment Scrolling Thumbs ===
+
Printing support is now supported on more platforms than just Windows. We added generic printing support and tested on Linux and Solaris.
To resolve compartment scrolling issues [https://bugs.eclipse.org/bugs/show_bug.cgi?id=110971 request #110971], transparent compartment scrolling thumbs have been added to make the scrollbars more usable on compartments:
+
All non windows platforms that support GMF should have printing available.
  
[[Image:Scroll_thumbs.gif]]
+
Here is the print dialog from RedHat Linux:
  
=== SemanticNode creation commands are generated as separate classes ===
+
[[Image:Print_diagram.png]]
Separate class implementing node creation command will be generated for each SemanticNode (not pure design one). This is a second part of the fix for [https://bugs.eclipse.org/bugs/show_bug.cgi?id=157683 request #157683]. It reduces a number of generated inner-classes then the same GenNode references as a child node from several containers as a result simplifying generated code modifications.
+
  
Since in previous version of generator node creation commands were generated as inner-classes inside ???NodeItemSemanticEditPolicy, these classes will be removed by next code generation. If some of the link creation commands were marked as "@generated NOT" and customized by user then corresponding code should be manually stored prior to the code generation and then moved into the newly generated ???CreateCommands.
+
=== Additional Printing Enhancements ===
 +
[https://bugs.eclipse.org/bugs/buglist.cgi?query_format=advanced&short_desc_type=allwordssubstr&short_desc=&classification=Modeling&product=GMF&target_milestone=2.1+M1&target_milestone=2.1+M2&target_milestone=2.1+M3&target_milestone=2.1+M4&target_milestone=2.1+M5&target_milestone=2.1+M6&target_milestone=2.1+M7&target_milestone=2.1+RC&target_milestone=2.1&long_desc_type=allwordssubstr&long_desc=&bug_file_loc_type=allwordssubstr&bug_file_loc=&status_whiteboard_type=allwordssubstr&status_whiteboard=&keywords_type=allwords&keywords=&bug_status=RESOLVED&bug_status=VERIFIED&bug_status=CLOSED&emailtype1=substring&email1=&emailassigned_to2=1&emailtype2=substring&email2=jbruck%40ca.ibm.com&bugidtype=include&bug_id=&votes=&chfieldfrom=&chfieldto=Now&chfieldvalue=&cmdtype=doit&order=Reuse+same+sort+as+last+time&field0-0-0=noop&type0-0-0=noop&value0-0-0= The Bugzilla List]
  
You have to re-transform .gmfgen model from .gmfmap model to generate correct code.
+
There were many additional smaller printing cleanup and Bugzilla resolution fixes related to printing.
  
=== Fully qualified names in templates are organized as imports after generation ===
+
We also added support for multiple languages (28 to be exact). Some examples:
  
Organization of import statements was added recently to gmf generator ([https://bugs.eclipse.org/bugs/show_bug.cgi?id=165864 request #165864]). So now most of qualified names you use in templates will be moved to java-imports after generation. Therefore there is no need in ''importManager'' calls from JET anymore, and it is supposed to be a good style using the fully qualified names right as they are. Besides, being a post-generator facility, this applies to xPand templates as well as JET ones.
+
Polish:
  
== 2.0 M5 ==
+
[[Image:image001_polish.jpg]]
  
=== Diagram Preferences ===
+
Hebrew:
Diagram editor genmodel (gmfgen) now describes default diagram preferences (GenDiagramPreferences class) and preference pages.
+
  
Default diagram preferences are reflected in generated DiagramPreferenceHint class that records them in preference store.
+
[[Image:image002_hebrew.jpg]]
  
[[Image:GMF_DiagramPreferences.png]]
+
Greek:
  
Preference page may be one of the standard preference pages (Appearance, Connections, etc.) or custom one with class name specified in gmfgen model.
+
[[Image:image003_greek.jpg]]
  
[[Image:GMF_PreferencePages.png]]
+
Korean:
  
=== RCP Menu And Toolbar ===
+
[[Image:image004_korean.jpg]]
Menu and toolbar of RCP diagram editor are fully described in gmfgen model so only desired items are available. When gmfmap model is transformed to gmfgen model reasonable set of default items is created.
+
 
+
[[Image:GMF_RCP_ModelItems.png]]
+
 
+
[[Image:GMF_RCP_DEItems.png]]
+
 
+
=== Greate Generator Model Wizard ===
+
"Greate generator model" wizard helps to collect information to create gmfgen model. It starts from standard "Create new file" and "Load Mapping model" pages and then allows toolsmith to either load existing .genmodel or recreate it with EMF facilities as well as reload stale .genmodel if required.
+
 
+
[[Image:GMF_GMFGEN_Wizard_GenModel.PNG]]
+
 
+
Other transformation options could be also specified here.
+
 
+
[[Image:GMF_GMFGEN_Wizard_Options.PNG]]
+
 
+
=== Path Maps Preference Page ===
+
The Path Maps preference page is significantly revamped for 2.0.
+
 
+
Path Variables can now be managed within this page, without having first to visit the
+
Linked Resources page to create/remove them, close the Preferences dialog, and launch it again.
+
Now, it's just as easy as pressing the "New..." button, entering the variable name, and
+
browsing for a folder.
+
 
+
[[Image:GMF_2_0M5_PathMapsPrefPage.png]]
+
 
+
Path maps that are registered on the
+
<code style="color:DarkGreen">org.eclipse.gmf.runtime.emf.core.PathMaps</code> extension point are
+
shown as locked; they cannot be unchecked, edited, or removed.  The "New..." and "Edit..." dialogs
+
provide other convenient validation, including:
+
 
+
* verifying that the path variable name is a valid URI segment
+
* verifying that the location is a folder (not a file)
+
* warning when specifying a location that is already defined by a different path variable
+
 
+
=== Stop using *EditorInputProxy ===
+
Generated code will not use URI/FileEditorInputProxy classes anymore. From now standard URI/FileEditorInput are used by tooling.
+
 
+
== 2.0 M6 ==
+
=== Domain Model Content Navigator ===
+
Domain model content could be visualized below domain model file node in standard Project Explorer Eclipse view by generated code. Read-only properties are available for single-element selection.
+
 
+
Set of properties suitable for generation domain model structure providers for common Project Explorer were added to GenNavigator. Domain model navigator will be generated if GenNavigator.generateDomainModelNavigator == true. In case of several diagrams generated for the same domain model from different .gmfgen models this property should be true for the only one GenNavigator instance in one selected .gmfgen model.
+
 
+
[[Image:DomainModelNavigator.PNG]]
+
 
+
=== Diagram & Domain Model Navigator refresh ===
+
Generated Diagram and Domain model navigator content will be automatically updated on any changes in underlying eclipse resources. From now all the modifications made on diagram/in EMF tree editor will be reflected in Navigator. Request [http://bugs.eclipse.org/bugs/show_bug.cgi?id=167983 #167983]
+
 
+
=== Generating proper ???CanonicalEditPolicy.shouldDeleteView() ===
+
There was a lot of complains concerning generated ???CanonicalEditPolicy.shouldDeleteView() method. All these problems should be fixed with closing request [http://bugs.eclipse.org/bugs/show_bug.cgi?id=157148 #157148]. From not it is not necessary to override .shouldDeleteView() with some custom patches - try to replace "@generated NOT" with "@generated" for this method and regenerating the code.
+
 
+
=== Reconciler for GenNavigator ===
+
If the following properties of GenNavigator were modified by user then corresponding values will be preserved on next .gmfmap -> .gmfgen model transformation:
+
 
+
* generateDomainModelNavigator
+
* domainContentExtensionID
+
* domainContentExtensionName
+
* domainContentExtensionPriority
+
* domainContentProviderClassName
+
* domainLabelProviderClassName
+
* domainModelElementTesterClassName
+
* domainNavigatorItemClassName
+
* contentExtensionID
+
* contentExtensionName
+
* contentExtensionPriority
+
* linkHelperExtensionID
+
* sorterExtensionID
+
* actionProviderID
+
* contentProviderClassName
+
* labelProviderClassName
+
* linkHelperClassName
+
* sorterClassName
+
* actionProviderClassName
+
* abstractNavigatorItemClassName
+
* navigatorGroupClassName
+
* navigatorItemClassName
+
* uriInputTesterClassName
+
* packageName
+
 
+
In addition, once removed GenNavigator will never be created by .gmfmap -> .gmfgen model transformation. If you decided to return back GenNavigator you should create new empty one and execute .gmfmap -> .gmfgen model transformation – default GenNavigator content will be initialized for you.
+
 
+
=== Links to Links ===
+
From now it is possible to draw links to/from other links in the generated diagram editor. Each link represented by LinkMapping with specified Domain Model Element can be source/target of another link. Another link should either has target feature pointing to the corresponding Domain Model Element of first link or source/containment feature pointing to/contained in the corresponding Domain Model Element.
+
 
+
Known issue: currently it is impossible re-create diagram with links to links from the domain model file. This problem is covered in the separate feature request: [http://bugs.eclipse.org/bugs/show_bug.cgi?id=180786 link #180786]
+
 
+
[[Image:Links2Links.png]]
+
 
+
=== '''Graphdef''' visual editor (''org.eclipse.gmf.graphdef.editor'') enhanced ===
+
First, bootstrapping Graphdef editor have been completely rewritten to xPand to conform the latest GMF state and behavior. Then it was significantly enhanced with new rich customized properties editing.
+
 
+
[[Image:StylesPage3.png]]
+
 
+
Graphdef editor itself can serve as some real world complicated example of customization gmf code best practices. Property tabs UI is completely generated with the help of aspect-oriented customization of gmf codegen templates. Moreover, and what is most fascinating, this complicated UI is actually written in our provided property-widgets (our domain) specific language using the concept of custom joint metamodel, referencing the base gmf genmodel ones. Look at the way it is described now:
+
 
+
[[Image:Propsheet.png]]
+
 
+
Therefore, additionally we have provided a small framework with metamodel for describing custom tabbed property sheet UI which is able to operate any domain metamodel.
+
See our tutorial for  [[GMF_Propsheet_Customization|How To Customize Property Sheet For Your GMF Editor]] if you want to know more.
+
 
+
=== Links Rerouting ===
+
Links may be rerouted between acceptable sources and targets. Link constraints that apply to link creation are considered during rerouting.
+
 
+
[[Image:GMF_Link_Rerouting.gif]]
+
 
+
=== Dynamic GMFGraph templates ===
+
One can specify path to dynamic templates to be used for generation of GEF figures from gmfgraph model (bugzilla [https://bugs.eclipse.org/bugs/show_bug.cgi?id=171782 171782])
+
 
+
[[Image:gmfgraph-dynamic-templates.png]]
+
 
+
[[Category:Modeling]] [[Category:GMF]]
+
 
+
== 2.0 M7 (May 18, 2007) ==
+
 
+
=== Merge MANIFEST.MF ===
+
<tt>META-INF/MANIFEST.MF</tt> is no longer overwritten during while generating diagram code. Any new header, value or attribute (e.g. ''visibility:=reexport'', or ''bundle-version="[2.3.0,3.0.0)"'' you might have added will survive now. Simple values (not comma-separated, multivalued, e.g. '''Bundle-Version''') are still overwritten. New headers added by generator will get inserted as well. To further control merge behaviour, one can use '''GMF-IgnoreMerge''' header. Put name of the header you would like to keep intact as a value of this header and merge won't try neither to merge, replace or insert such headers (bugzilla [https://bugs.eclipse.org/bugs/show_bug.cgi?id=146774 146774]).
+
 
+
=== Separate DiagramUpdater ===
+
From now GMF is generating separate ???DiagramUpdater class. This class contains a number of static methods and is able to return:
+
 
+
- all semantic children of this diagram element<br>
+
- all the links incoming/outgoing/contained in this diagram element
+
 
+
This class will be called from generated ???CanonicalEditPolicies and ???NewDiagramFileWizard (for non-synchronized diagrams) while reconstructing actual diagram contents from the domain model.<br>
+
This class could be called by user-defined actions to query corresponding model elements (for example from “Add shortcut to link” action).
+
 
+
=== Generated ???VisualIDRegistry structure changed ===
+
Generated ???VisualIDRegistry will not have isNode*() and isLink*() methods anymore. These methods were originally created to provide user with possibility to put additional constraint for domain model elements manually written in java there. Currently GMF supports OCL, regexp and Java-based constraints so it’s not necessary to generate this bunch of methods anymore.
+
 
+
For those who used generated isNode*()/isLink*() methods by specifying “@generated NOT” comment and placing some custom code there migration path is:<br>
+
- add constraint with language == Java, body = <nameOfTheGeneratedMethod> to the corresponding node in .gmfmap model<br>
+
- transform .gmfmap to .gmfgen and regenerate the code<br>
+
- review and copy existing implementation of isNode*()/isLink*() into the newly generated methods<br>
+
- Remove obsolete isNode*()/isLink*() methods<br>
+
 
+
=== Improved link navigation ===
+
Select source and select target action on any connection in the navigate context menu.
+
 
+
=== Improved link routing ===
+
New Border Item Rectilinear router. This router will pick the side it connects to based on the border item location examples for the results with and without the new router:
+
 
+
[[Image:BorderItemRectilinearRouter.gif]]
+
 
+
=== New label text format options ===
+
 
+
In addition to MessageFormat toolsmith may choose native, regexp and printf options to format label text. New "editorPattern" attribute in feature label mapping allows to define text for inplace editor.
+
 
+
See http://wiki.eclipse.org/index.php/GMF_Labels for details.
+

Latest revision as of 06:18, 7 December 2011



GMF
Website
Download
Dev Builds
Update Site releases milestones
Community
Mailing ListNewsgroupIRC
Bugzilla
Open
Help Wanted
Bug Day
Source
GMF Notation: View CVS repo

GMF Runtime: View CVS repo
GMF Tooling: View Git Repo, GitHub


2.1 M1

Export Big Diagrams to Images

Huge diagrams that fail to be exported to a single JPEG, JPG, GIF, PNG or BMP image (Bug 160386), now can be exported to a number of images that combined together will display the image of the whole diagram (or selected editparts). An HTML file is created to view the whole image. The HTML file essentially contains a table, each cell of which is occupied by the appropriate piece of diagram's image (i.e. by the image file corresponding to that particular piece of the diagram). GMF's UI for exporting diagrams to images has been added a checkbox "Export to HTML", which will trigger exporting the diagram as described above.

CopyToImageDialog.gif

The result of exporting a huge Geoshape diagram to HTML with the HTML file opened looks as follows:

CopyToHTMLResult.gif

2.1 M3

Label Enhancements in the GMF Runtime

There were a number of usability bugs with the WrapLabel implementation and the TextDirectEditManager. The TextCompartmentEditPart and its helper classes also made assumptions that the figure of a TextCompartmentEditPart was a WrapLabel, making it difficult for clients to use any other label figures.

A new WrappingLabel has been created that uses GEF's Flow Figure classes to perform that text wrapping. The TextCompartmentEditPart and its helper classes have been modified so that there is only a dependency on a new interface, ILabelDelegate, which a client could use with any figure for displaying the label. The TextDirectEditManager has been changed to fix a few bugs and work with an ILabelDelegate.

Existing GMF Runtime clients need not make any code changes to enjoy the benefits of the new WrappingLabel as the existing WrapLabel subclasses the new WrappingLabel. However, it would be wise to test all behavior with text on diagrams to ensure there are no regressions.

A document which discusses the design, gives an overview of the changes made, and provides documentation for the clients on how to use the new WrappingLabel is attached to the bugzilla: Bug 162932

2.1 M4

Group/Ungroup Functionality in the GMF Runtime

The GMF Runtime now has the ability to group and ungroup shapes. Check out the GMF Runtime Logic and Geoshapes Examples to see the new functionality. It's under the Format menu when multiple shapes are selected. The group/ungroup actions are not contributed by default by the GMF Runtime. To learn how to adopt the group/ungroup in a GMF diagram, see the document attached to Bug 111892. Note at this point, the group/ungroup functionality has not yet been adopted by the GMF Code Generator.

Additional Snap to Grid Functionality in the GMF Runtime

The GMF Runtime has extended the use of snap to grid for two existing components.

Arrange All / Arrange Selection

Edit parts selected will now snap to grid at the end of the arrange session, if the snap to grid property is enabled. Bugzilla 119252 Screen shots of "arrange all" in action with snap to grid on is shown below.

Before Using Arrange All After Using Arrange All
Arrange before.jpg Arrange after.jpg

Connection Bend Points

Connection bend points will now snap to grid when being dragged by the user, if the snap to grid property is enabled. Bugzilla 194282 A screen shot of bend points snapped to grid is shown below.

Connection bendpoint.jpg

GEF Alignment Feature: Snap To Geometry added in the GMF Runtime

The GMF Runtime now has the capability to allow edit parts to snap to each other when editing. Bugzilla 188974 The snap to geometry property can be enabled and disabled in the ruler/grid property section. Snapping to other edit parts inside compartments are also supported. However, edit parts can only snap to other edit parts that share the same parent. (e.g: edit parts inside a compartment can only snap to each other) Some screen shots of this new feature are shown below.


SnapGeo 01.jpg SnapGeo 02.jpg SnapGeo 03.jpg
SnapGeo 04.jpg

Customize Palette Capability in the GMF Runtime

It is now possible for users to customize the palette in an application using the GMF Runtime. Users can: hide palette entries, rename palette entries, and set drawers to be open and/or pinned on startup. The customizations are saved in the workspace preferences.

At this point, saving the customizations does not work in GMF generated diagram editors because these editors do not have palette ids.

For further details see: Bugzilla 114117

CustomizeMenu.jpg || CustomizeDialog.jpg

2.1 M5

Palette Enhancements in the GMF Runtime

  1. The palette can be resized, moved to the west side of the diagram, and minimized by the user; however, these settings were never persisted. Now these customizations are saved in the workspace preferences. See Bugzilla 117917
  2. There is a new method getInitialDockLocation() in DiagramEditorWithFlyOutPalette that allows the client to change the default docking location of the palette to be the west side. See Bugzilla 206371

Moving Shapes with the Keyboard

There have been complaints that it is too hard to move a shape with the keyboard. The current behavior requires the user to press the ‘.’ key which shows the move handle, then the arrow keys to move the shape, and then enter to accept the position.

The behavior has been changed in the GMF Runtime so that the user can now use the arrow keys to move a selected shape. The shape moves immediately when an arrow key is pressed. The Tab and Ctrl + Tab keys are now used to navigate between shapes on the diagram.

For further information regarding this work, see the feature design document attached to Bugzilla 111901.

For a complete listing of keyboard shortcuts in GMF, see the document titled "Developer Guide to Keyboard Accessibility" in the GMF documentation.

2.1 M6

New Palette Look and Feel in the GMF Runtime

There have been many changes made in both GEF and GMF to add a new look and feel to the palette. The enhancement requests that addressed these are:

Bugzilla 133385 palette UI look and feel changes

Bugzilla 220381 Pinnable Stacks and UI Changes

More specifically:

  1. New color treatment for drawers: Closed, expanded and hover.
  2. New color treatment for groups and tools: white background, mouse hover and selected (blue and yellow).
  3. New color treatment for stacks: white background, mouse hover and selected (blue and yellow).
  4. New Pin in and Pin out icons
  5. New Palette icon
  6. New dock and expanded look.
  7. Drawer icon is optional.
  8. Addition of a toolbar in the palette.
  9. New look for stack flyout.
  10. Stacks can be pinned open.

Here are a few screenshots of the new palette look: NewPaletteUI.JPG

WYSIWYG .gmfgraph editor improvements

  1. Property pages for Styles, Layout and LayoutData are fully generated using new org.eclipse.gmf.formtk plug-in
  2. GridLayout is now supported by WYSISYG .gmfgraph editor
  3. Property page with possibility to modify Location, Preferred, Minimum and Maximum figure size was added

Generator model improvements

  1. Property to support tree routing style for links, now true by default

Dynamic (code-less) EMF models for domain

Bugzilla 150177 Should be able to use dynamic EMF instead of the generated code to store underlying diagram model

GMF Tooling used to require what seems to be regular EMF usecase - Java code for model implementation. However, there are scenarios when generating Java code is impractical (e.g. embedded domain, huge models (often completely derived from XSD), etc). With introduction of dynamic_package extension point in EMF 2.4, which makes it possible to distribute/publish models without generated implementation code easily, the need for GMF to support such model is undisputed.

There's new element in the GMFGen model, DynamicModelAccess (GenEditorGenerator#modelAccess), which, when added, forces GMF Tooling to produce a helper facility (default called MetaModelFacility with class/feature lookup methods, along with analogs for instanceof check and so on). Right-click the Gen Editor Generator -> New Child -> Dynamic Model Access. Rest of the generated code uses the facility to check domain model condition, create new elements and so on.

By default, facility uses global package registry (and hence relies on domain model being registered with dynamic_package extension point). This can be easily changed in #getRegistry() method of the generated facility class (don't forget to mark it @generated NOT).

Inject Java Expression Body

The way expressions with language 'Java' being handled has changed. Prior to 2.1, body of the expression was used to generate placeholder implementation method. This seems quite odd when a method name is taken from body, and has been changed in 2.1. Now, method names are generated automatically, and (the fruitful part) there's a new boolean attribute in GenJavaExpressionProvider, which controls whether body of the Java expression should be injected into generated method. In most cases this allows toolsmith not to bother with @generated NOT for the Java expression methods, rather keeping their implementation in the model and having them injected on regeneration. Use GenJavaExpressionProvider#injectExpressionBody (defaults to false) to control injection for all expressions referenced by this provider.

Missing implementation for Java Expressions

To fill placeholder methods for Java Expressions, GMF Tooling used to generate code that throws a runtime exception. This behavior left as default, however there's new attribute, GenJavaExpressionProvider#throwException that allows Toolsmith to turn it off. When throwException is false, and injectExpressionBody (see previous N&N item) is also false, code generator places some compilable expression (appropriate for the context) instead of throws clause. For example, when Java expression used in metric, with expected Double return value, a Double.NaN return value would get generated.

Extensible GMFGraph and GMFGen models

Bugzilla 220598 Utilize EMF child extenders for GMF models

It used to be a pain to augment GMF Tooling in a model-driven way. Say, one needed to add an extra figure class into graphical definition or custom attributes to utilize during editor codegeneration. With EMF child extenders enabled for GMFGraph and GMFGen models it's easy now to capture your custom extensions with an EMF model and still use default editors to edit GMF models.

FeatureValueSpec structural change

Bugzilla 227505 Replace FeatureValueSpec generalization of ValueExpression with aggregation

There's a conceptual flaw where FeatureValueSpec (essentially, an entity to pair a feature and a value to assign to the feature) generalized ValueExpression, instead of aggregating/associating. This has been fixed now, both for GMFMap and GMFGen elements. Migration support updates existing value specifications, replacing FeatureValueSpec fields with aggregation of ValueExpression.

Text Alignment Enhancement

Bugzilla 224473 Text alignment enhancement

The GMF Runtime now includes a text style to the notational meta model with a text alignment attribute.

Text can be left, center or right aligned. The default is left aligned.

The enhancement is adopted for note, text and geometric shapes in the GMF Runtime and can be adopted by clients.

Text alignment can be set using four standard UI mechanisms that exist as standard features in GMF based diagrams:

  1. From the Diagram main menu (Diagram + Text Alignment + Center).
  2. From the popup menu on the diagram (Text Alignment + Center).
  3. From the appearance tab in the properties view.
  4. From the advanced tab in the properties view.

File:TextAlignmentDiagram.png

Line Styles Enhancement

Bugzilla 225137 Line styles enhancement

The GMF Runtime now includes new line styles in the notational meta model to support:

  • Line Width, in points, the default is one point (one pixel)
  • Line Type, solid, dot, dash, dash-dot, dash-dot-dot, the default is solid
  • Arrow Type, none, open arrow, solid arrow.

The enhancement follows from text alignment in terms of adoption by standard shapes and can be set using the four standard UI mechanisms.

Line styles after.png

Multi-platform Diagram Printing

Bugzilla 196834 Multi-platform Diagram Printing

Printing support is now supported on more platforms than just Windows. We added generic printing support and tested on Linux and Solaris. All non windows platforms that support GMF should have printing available.

Here is the print dialog from RedHat Linux:

Print diagram.png

Additional Printing Enhancements

The Bugzilla List

There were many additional smaller printing cleanup and Bugzilla resolution fixes related to printing.

We also added support for multiple languages (28 to be exact). Some examples:

Polish:

Image001 polish.jpg

Hebrew:

Image002 hebrew.jpg

Greek:

Image003 greek.jpg

Korean:

Image004 korean.jpg

Back to the top