Bug 133279 - GridLayout generated code points to unavailable package.
Summary: GridLayout generated code points to unavailable package.
Status: RESOLVED FIXED
Alias: None
Product: GMF-Tooling (ARCHIVED)
Classification: Modeling
Component: Core (show other bugs)
Version: 1.0   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 2.0   Edit
Assignee: Michael Golubev CLA
QA Contact:
URL:
Whiteboard:
Keywords: contributed, test
Depends on:
Blocks:
 
Reported: 2006-03-25 18:30 EST by Patrick Sodre CLA
Modified: 2010-07-19 22:21 EDT (History)
1 user (show)

See Also:


Attachments
Fixes the subj (42.32 KB, patch)
2006-04-14 12:04 EDT, Michael Golubev CLA
no flags Details | Diff
Corrected patch that fixes the subj, (43.12 KB, patch)
2006-06-29 05:21 EDT, Michael Golubev CLA
no flags Details | Diff
Fixed SWT constants usage in the GridLayout code (43.00 KB, patch)
2006-06-29 05:32 EDT, Michael Golubev CLA
no flags Details | Diff
With 71684 fixed, it is possible to add tests for GL in GMF (9.10 KB, patch)
2007-04-17 06:38 EDT, Michael Golubev CLA
tikhomirov.artem: review+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Patrick Sodre CLA 2006-03-25 18:30:14 EST
GMF/Eclipse Version: The one given on the CD during the EclipseCon Tutorial.

If the user selects the GridLayout as the LayoutManager for a particular figure on the .gmfgraph model, the generated code refers to "org.eclipse.gmf.internal.codegen.draw2d.GridLayout()".

The steps required to reproduce this bug are:

1- Create a Graph model that contains GridLayout.
2- Do the Mapping and Transformation to .gmfgen.
3- Generate the code.

The Error on my code looks like this:

      org.eclipse.gmf.internal.codegen.draw2d.GridLayout myGenLayoutManager = new org.eclipse.gmf.internal.codegen.draw2d.GridLayout();
      myGenLayoutManager.numColumns = 3;
      myGenLayoutManager.makeColumnsEqualWidth = true;
Comment 1 Michael Golubev CLA 2006-04-14 12:04:39 EDT
Created attachment 38601 [details]
Fixes the subj
Comment 2 Michael Golubev CLA 2006-04-14 12:14:31 EDT
The addition of SWT-like GridLayout was propoesed for GEF 3.1 release but dropped/postponed. 

While we do not have "official" layout implementation, I may only recommend to use the patch which contains missed GridLayout implementation by Asym Ullah.
Comment 3 Artem Tikhomirov CLA 2006-06-25 11:03:19 EDT
Those using GridLayout in GMF 1.0 should apply the patch. Moving to 2.0, waiting for https://bugs.eclipse.org/bugs/show_bug.cgi?id=71684 to get closed.
Comment 4 Michael Golubev CLA 2006-06-29 05:21:08 EDT
Created attachment 45523 [details]
Corrected patch that fixes the subj,

Corrected issues: 

1. Set of alignment constants now mathes the set of constants from gmfgraph model. Say, <code>GridLayoutData.BEGINNING = SWT.BEGINNING - 1 = gmf.Alignment.BEGINNING</code>.
2. Repackaged and renamed according to the naming in the generated code
Comment 5 Michael Golubev CLA 2006-06-29 05:32:17 EDT
Created attachment 45524 [details]
Fixed SWT constants usage in the GridLayout code

Layout manager code now uses set of the constants consistent with constants defined in GridLayoutData
Comment 6 biju CLA 2007-01-30 00:38:24 EST
Please help us to know : How to use the patch "Fixed SWT constants usage in the GridLayout code" ???. 

Comment 7 Artem Tikhomirov CLA 2007-04-13 11:34:51 EDT
(In reply to comment #3)
Bug #71684 has been resolved
Comment 8 Michael Golubev CLA 2007-04-17 06:38:25 EDT
Created attachment 64018 [details]
With 71684 fixed, it is possible to add tests for GL in GMF
Comment 9 Artem Tikhomirov CLA 2007-04-17 10:04:58 EDT
reviewed, few NPEs fixed and delivered into HEAD.
Comment 10 Richard Gronback CLA 2008-08-13 13:11:39 EDT
[target cleanup] 2.0 M7 was the original target milestone for this bug
Comment 11 Eclipse Webmaster CLA 2010-07-19 22:21:40 EDT
[GMF Restructure] Bug 319140 : product GMF and component
Generation was the original product and component for this bug