Bug 124826 - Support nodes with border items in gmf models
Summary: Support nodes with border items in gmf models
Status: NEW
Alias: None
Product: GMF-Tooling (ARCHIVED)
Classification: Modeling
Component: Core (show other bugs)
Version: 2.0   Edit
Hardware: All All
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: Michael Golubev CLA
QA Contact:
URL:
Whiteboard:
Keywords: contributed
Depends on:
Blocks:
 
Reported: 2006-01-23 03:22 EST by Dmitry Stadnik CLA
Modified: 2010-07-19 22:22 EDT (History)
8 users (show)

See Also:


Attachments
Fixes the subj (167.60 KB, patch)
2006-08-21 14:07 EDT, Michael Golubev CLA
no flags Details | Diff
Icons for new gmfgen classes (zipped) (1.63 KB, application/octet-stream)
2006-08-21 14:07 EDT, Michael Golubev CLA
no flags Details
Fixes the subj even better (170.41 KB, patch)
2006-08-22 13:54 EDT, Michael Golubev CLA
no flags Details | Diff
Fixes the subj even more better (200.73 KB, patch)
2006-08-24 13:26 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.
Comment 1 Michael Golubev CLA 2006-08-21 14:07:02 EDT
Created attachment 48315 [details]
Fixes the subj

Proposed patch contents: 

GMFMap model: ChildReference#affixedSide attribute introduced. Allowed values: NONE (default, for backward compatibility), ANY (most common behavior), SOUTH, NORTH, WEST, EAST (that is, multiple preferred sides like (SOUTH or WEST) are not supported). This attribute is directly editable from GMFMap editor.

GMFMap model: Also new constraints added to prevent pure labels and compartment-ed children to be side-affixed.

GMFGen model: GenChildSideAffixedNode extends GenChildNode class introduced. It does not has any editable attributes and used only as a marker that side-affixed edit parts should be generated.

Templates: NodeEditPart.javajet checks combination of the isSideAffixed() / hasSideAffixedChildren() properties and uses appropriate runtime superclass for generated editparts. Some other adjustments introduced into template to make the code compilable. In case if node is nether bordered nor border item, generated code is the same as before.

New enum attribute affixedSide intri
Fixes the subj using common runtime infrastructure for bordered/border editparts, that is BorderedBorderItemEditPart, AbstractBorderItemEditPart and AbstractBorderedShapeEditPart)
Comment 2 Michael Golubev CLA 2006-08-21 14:07:57 EDT
Created attachment 48316 [details]
Icons for new gmfgen classes (zipped)
Comment 3 Michael Golubev CLA 2006-08-22 13:54:22 EDT
Created attachment 48395 [details]
Fixes the subj even better

Slightly enchanced version of the patch that fixes the subj.
Changes: 
1. int GMFGen.GenChildSideAfficedNode#preferredSide -> String GMFGen.GenChildSideAfficedNode#preferredSideName to replave magic numbers with constants from d2d.PositionConstants
2. NodeEditPart.javajet now takes into account the preferred side of the parent 
3. Validation OCL for gmfmap corrected
Comment 4 Artem Tikhomirov CLA 2006-08-24 10:51:20 EDT
affixedSide is not gmfmap's attribute, it has nothing to do with mapping domain elements to visual, rather is an attribute of the diagram node.
Comment 5 Michael Golubev CLA 2006-08-24 13:26:23 EDT
Created attachment 48612 [details]
Fixes the subj even more better

User-editable values are now in gmfgraph model (Node#affixedParentSide : Direction)
+ Added basic reconcilation for Viewmap attributes for border nodes
Comment 6 Richard Gronback CLA 2006-09-28 16:39:56 EDT
Added contributed keyword for IP log automation.  Patch appears to have been committed by atikhomirov, according to CVS log.
Comment 7 Michael Golubev CLA 2006-10-17 04:00:39 EDT
I have just got notification about new CC added and would like to clarify. 

AFAIK, this patch was comitted into the 2.0 stream, and border items are supported now in the gmfgraph model. The only reason for this item to be still opened is the lack of unit tests. Certainly, before commit it was carefully checked with manual testing. 

Artem, could you please confirm this? 

Regards, 
Michael
Comment 8 Artem Tikhomirov CLA 2007-04-16 12:13:11 EDT
(In reply to comment #7)
Yes, the reason this bugzilla is still open is that someone promised to write few tests to cover this functionality ;)
Comment 9 Eclipse Webmaster CLA 2010-07-19 22:22:50 EDT
[GMF Restructure] Bug 319140 : product GMF and component
Models was the original product and component for this bug