Bug 155707 - [gmfgraph] Do not generate magic numbers for SWT.* constants in the GridLayout support code
Summary: [gmfgraph] Do not generate magic numbers for SWT.* constants in the GridLayou...
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: 1.0.2   Edit
Assignee: Michael Golubev CLA
QA Contact:
URL:
Whiteboard:
Keywords: contributed
Depends on:
Blocks:
 
Reported: 2006-08-30 12:20 EDT by Michael Golubev CLA
Modified: 2010-07-19 22:20 EDT (History)
0 users

See Also:


Attachments
Fixes the subj (7.20 KB, patch)
2006-09-12 10:32 EDT, Michael Golubev CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Golubev CLA 2006-08-30 12:20:33 EDT
Actually gridLayout generator makes assumptions about the values used in the draw2d implementation class about numer values of the SWT constants like FILL, BEGINNING etc.

That is it generates genlayout.verticalAlignment = 3 (or 4) instead of genlayout.verticalAlignment = GridLayout.FILL.

It is bad way that already forces us to change proposed GridLayout implementation to match the generated constants. 

Expected: No magic numbers are generated. Instead static constants from GridLayout class are generated that can be checked by compiler.
Comment 1 Michael Golubev CLA 2006-09-12 10:32:42 EDT
Created attachment 49937 [details]
Fixes the subj
Comment 2 Artem Tikhomirov CLA 2006-09-14 14:17:30 EDT
Reviewed and delivered to 2.0 stream. Pending being committed into 1.0.1
Comment 3 Alex Shatalin CLA 2006-10-27 10:16:47 EDT
reviewed and commited
Comment 4 Eclipse Webmaster CLA 2010-07-19 22:20:28 EDT
[GMF Restructure] Bug 319140 : product GMF and component
Generation was the original product and component for this bug