Bug 147855 - "Hide if empty" property of GenCompartment should affect compartment behaviour
Summary: "Hide if empty" property of GenCompartment should affect compartment behaviour
Status: NEW
Alias: None
Product: GMF-Tooling (ARCHIVED)
Classification: Modeling
Component: Core (show other bugs)
Version: unspecified   Edit
Hardware: PC All
: P3 normal with 2 votes (vote)
Target Milestone: 3.0   Edit
Assignee: Artem Tikhomirov CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-06-20 08:07 EDT by Michael Golubev CLA
Modified: 2010-07-19 22:19 EDT (History)
3 users (show)

See Also:


Attachments
ListCompartmentEditPolicy and its use (8.01 KB, patch)
2008-05-22 14:55 EDT, Artem Tikhomirov CLA
tikhomirov.artem: review?
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Golubev CLA 2006-06-20 08:07:00 EDT
Actually, as described at the news:e78lvr$l49$1@utils.eclipse.org, the GenCompartment#hideIfEmpty property does not affect compartment behaviour. 

Expected: compartments with such property set to true, should not appear at the diagram until they have at least one sub element to show.
Comment 1 Artem Tikhomirov CLA 2006-06-26 14:29:11 EDT
Not for 1.0
Comment 2 Dmitry Stadnik CLA 2007-06-18 13:11:50 EDT
Moving to 2.1
Comment 3 Artem Tikhomirov CLA 2008-05-22 14:55:31 EDT
Created attachment 101592 [details]
ListCompartmentEditPolicy and its use

Here's an example how one may approach the issue (using Ecore Diagram Example - updating Class and its compartments). Dmitri, could you please review and let me know if it's reasonable from GEF standpoint. Updating compartment figure visibility from #refreshChildren is my major concern. 

BTW, What I like about introduced EditPolicy is that it's sort of right fit for compartments, much better than ResizableCompartmentEditPolicy. Since we generate figures that do not allow to resize compartment anyway, and compartments themselves don't need to be drag-dropped, why should be keep all the stuff then?
Comment 4 Dmitry Stadnik CLA 2008-05-27 05:45:40 EDT
Method refreshChildren() is supposed to change editpart visually so there should be no problems. I've tested the patch and it seems to be working fine; reassigning to Artem.
Comment 5 Artem Tikhomirov CLA 2008-05-29 08:21:26 EDT
Need to move ListCompartmentEditPolicy to Runtime to avoid generating it for each non-resizable compartment. It's too late for such changes in this dev. cycle, will get addressed in the next.
Comment 6 Eclipse Webmaster CLA 2010-07-19 22:19:42 EDT
[GMF Restructure] Bug 319140 : product GMF and component
Generation was the original product and component for this bug