Community
Participate
Working Groups
Created attachment 196269 [details] Adds exclude to FormData, in same fashion as exists on GridData I would like to offer up an update to a committer for consideration. Can someone please help? I came across a need to display a mask on-top of my ViewParts during application start-up as state data is loaded from the database (for each View). As such, I came across the need to leverage the idea of 'exclude' on the FormData object for the LoadingMask object in the Composite children array. I noticed the feature existed in the GridData and wondered why it did not also exist on the FormData. I took the time to add it to the FormData object, and by extension of implementation, included the check in the FormLayout.layout(). It was a fairly straight-forward add-on. Basically I needed a way to hide or exclude the mask from view once the background job of loading was completed. I wanted to hide this instead of disposing it as other points in the application may need to re-display the same loading mask. Using the 'exclude' on the FormData object was a convenient way to hide/show components as the composite layout is re-invoked.... Would someone please take a look and see what you think. I would like to offer this back to the code-base if possible. Just thought it was worth mentioning.
Created attachment 196270 [details] Implementation to support new exclude attribute on FormData
Hi Rob, we will only be able to work on new APIs after the 3.7 release.
It is already possible to exclude controls in a FormLayout by switching attachments around. Here's a snippet that shows how: http://dev.eclipse.org/viewcvs/index.cgi/~checkout~/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet313.java Having said that, however, it still might be useful to have an exclude field in FormData because it might lead to simpler code, and it would probably be easier for FormLayout users to discover.
(In reply to comment #3) > It is already possible to exclude controls in a FormLayout by switching > attachments around. Here's a snippet that shows how: > http://dev.eclipse.org/viewcvs/index.cgi/~checkout~/org.eclipse.swt.snippets/ > src/org/eclipse/swt/snippets/Snippet313.java > > Having said that, however, it still might be useful to have an exclude field > in FormData because it might lead to simpler code, and it would probably be > easier for FormLayout users to discover. Snippet313 demonstrates how to make a control un-visible. The exclude field functions in GridData as an "exclude for layout calculations", not "exclude from visibility". This is useful when wishing to place a control manually, outside of the layout managers results. For example, the Unified toolbar is best excluded from the layout manager, otherwise it's size is dependant on other controls, rather than constant.
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. As such, we're closing this bug. If you have further information on the current state of the bug, please add it and reopen this bug. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant. -- The automated Eclipse Genie.