| Summary: | [Eclipse Platform Utilities] Allow the possibility of not showing group frame when creating the group content | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | [Automotive] Sphinx | Reporter: | Idrissa Dieng <idydieng> | ||||||||
| Component: | Core | Assignee: | Stephan Eberle <stephaneberle9> | ||||||||
| Status: | CLOSED FIXED | QA Contact: | |||||||||
| Severity: | normal | ||||||||||
| Priority: | P3 | ||||||||||
| Version: | 0.7.0 | ||||||||||
| Target Milestone: | 0.7.0 | ||||||||||
| Hardware: | All | ||||||||||
| OS: | All | ||||||||||
| Whiteboard: | |||||||||||
| Attachments: |
|
||||||||||
|
Description
Idrissa Dieng
Created attachment 192816 [details]
Allow the possibility of not showing group frame when creating the group content.
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.
(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. Created attachment 192923 [details]
Refactor AbstractGroup#createContent() method
Created attachment 193053 [details]
Refactor AbstractGroup#createContent() method and Add JavaDoc
(In reply to comment #5) > Created attachment 193053 [details] > Refactor AbstractGroup#createContent() method and Add JavaDoc Include code refactor proposed by Stephan (comment #2). 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 Mass-closing Resolved tickets |