Community
Participate
Working Groups
Allow the possibility of not showing group frame when creating the group content.
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