Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 342270 - [Eclipse Platform Utilities] Allow the possibility of not showing group frame when creating the group content
Summary: [Eclipse Platform Utilities] Allow the possibility of not showing group frame...
Status: CLOSED FIXED
Alias: None
Product: Sphinx
Classification: Automotive
Component: Core (show other bugs)
Version: 0.7.0   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: 0.7.0   Edit
Assignee: Stephan Eberle CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-04-08 07:43 EDT by Idrissa Dieng CLA
Modified: 2021-07-14 02:15 EDT (History)
0 users

See Also:


Attachments
Allow the possibility of not showing group frame when creating the group content. (11.53 KB, patch)
2011-04-08 07:44 EDT, Idrissa Dieng CLA
no flags Details | Diff
Refactor AbstractGroup#createContent() method (11.79 KB, patch)
2011-04-11 06:58 EDT, Idrissa Dieng CLA
no flags Details | Diff
Refactor AbstractGroup#createContent() method and Add JavaDoc (32.45 KB, patch)
2011-04-12 10:46 EDT, Idrissa Dieng CLA
idydieng: iplog+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Idrissa Dieng CLA 2011-04-08 07:43:49 EDT
Allow the possibility of not showing group frame when creating the group content.
Comment 1 Idrissa Dieng CLA 2011-04-08 07:44:39 EDT
Created attachment 192816 [details]
Allow the possibility of not showing group frame when creating the group content.
Comment 2 Stephan Eberle CLA 2011-04-08 20:47:53 EDT
The creation of the frame (i.e., SWT Group widget) is repeated in each IGroup implementation:

if (suppressGroupFrame) {
			parentComposite = parent;
} else {
			Group fileSelectionGroup = new Group(parent, SWT.SHADOW_NONE);
			fileSelectionGroup.setText(groupName);
			parentComposite = fileSelectionGroup;
}

If would be better to refactor this part into AbstractGroup#createContent() and then call AbstractGroup#doCreateContent() with the old signature, i.e., without the additional suppressGroupFrame parameter.

Aside from that, please make sure that the method 

	void createContent(Composite parent, int numColumns);

gets added to the IGroup interface. Currently it is only on AbstractGroup.
Comment 3 Idrissa Dieng CLA 2011-04-11 06:55:44 EDT
(In reply to comment #2)
> The creation of the frame (i.e., SWT Group widget) is repeated in each IGroup
> implementation:
> 
> if (suppressGroupFrame) {
>             parentComposite = parent;
> } else {
>             Group fileSelectionGroup = new Group(parent, SWT.SHADOW_NONE);
>             fileSelectionGroup.setText(groupName);
>             parentComposite = fileSelectionGroup;
> }
> 
> If would be better to refactor this part into AbstractGroup#createContent() and
> then call AbstractGroup#doCreateContent() with the old signature, i.e., without
> the additional suppressGroupFrame parameter.
> 
> Aside from that, please make sure that the method 
> 
>     void createContent(Composite parent, int numColumns);
> 
> gets added to the IGroup interface. Currently it is only on AbstractGroup.

Please refer to attach patch that include code refactor proposed by Stephan.
Comment 4 Idrissa Dieng CLA 2011-04-11 06:58:25 EDT
Created attachment 192923 [details]
Refactor AbstractGroup#createContent() method
Comment 5 Idrissa Dieng CLA 2011-04-12 10:46:28 EDT
Created attachment 193053 [details]
Refactor AbstractGroup#createContent() method and Add JavaDoc
Comment 6 Idrissa Dieng CLA 2011-04-12 10:48:13 EDT
(In reply to comment #5)
> Created attachment 193053 [details]
> Refactor AbstractGroup#createContent() method and Add JavaDoc

Include code refactor proposed by Stephan (comment #2).
Comment 7 Stephan Eberle CLA 2011-04-13 12:25:03 EDT
Fixed by applying proposed patch in slightly improved form: 
* Reworked AbstractGroup#createContent() methods
* Moved initialization of layout data on parent composite from AbstractGroup implementations to AbstractGroup#createContent()
* Applied common commenting style to single line comments
Comment 8 Balazs Grill CLA 2021-07-14 02:15:56 EDT
Mass-closing Resolved tickets