eclipse.platform.swt icon indicating copy to clipboard operation
eclipse.platform.swt copied to clipboard

Moving TabFolderLayout into SWT.

Open deepika-u opened this issue 1 year ago • 1 comments

Moving TabFolderLayout into SWT.

Fixes https://github.com/eclipse-platform/eclipse.platform.swt/issues/1317

This pr needs to be merged first and later https://github.com/eclipse-platform/eclipse.platform.ui/pull/2186

deepika-u avatar Aug 13 '24 09:08 deepika-u

Test Results

   486 files  ±0     486 suites  ±0   8m 15s :stopwatch: - 1m 8s  4 159 tests ±0   4 151 :white_check_mark: ±0   8 :zzz: ±0  0 :x: ±0  16 390 runs  ±0  16 298 :white_check_mark: ±0  92 :zzz: ±0  0 :x: ±0 

Results for commit 08ab2237. ± Comparison against base commit 8056739c.

:recycle: This comment has been updated with latest results.

github-actions[bot] avatar Aug 13 '24 09:08 github-actions[bot]

@laeubi @merks : Can this pr be merged? or anything else needs to be done?

deepika-u avatar Sep 16 '24 07:09 deepika-u

Has this been rebased on master?

I see this as the current version of SWT:

image

merks avatar Sep 16 '24 08:09 merks

Has this been rebased on master?

Done!

laeubi avatar Sep 17 '24 07:09 laeubi

This class totally lacks documentation compared to rest of SWT.

Can you be more specific?

I have zero clue what/why/how/when to use it

e.g I see this

This layout controls the position and size
of the children of a tab folder.

As explained in the referenced issues, this is somehow not often used directly (but not prohibited of course) if I look for example at CTabFolderLayout it has similar (quite basic) documentation.

So while better documentation is always good, I think its hard to ask the person that wants to help deduplication to do it, so I would more see this as something for all SWT/Platform commiters to enhance after we have deduplicated the code if there are anything left that is really unclear in its usage.

laeubi avatar Sep 17 '24 07:09 laeubi

Well, I still don't understand what the effects of using this one are. P.S. Don't even get me started on all C(ustom)* widgets and friends - they should be deleted IMO.

akurtakov avatar Sep 17 '24 07:09 akurtakov

Also looking into the issue all the classes that are to be deduplicated are "internal" so they are not supposed to be generally useful which explains (to some extend) lack of documentation. I don't ask for big documentation but at least some basic one on what the effects of using it are.

akurtakov avatar Sep 17 '24 07:09 akurtakov

Well, I still don't understand what the effects of using this one are.

The effect is that otherwise you get randomly wrong display of Tabs, see

  • https://github.com/eclipse-platform/eclipse.platform.swt/issues/1317

Today I debugged some issues with TabFolder and noticed that it at least behaves strange if tabs are added dynamically, after investigate a little bit more I tried to fix it with an own Layout as usual layout mangers (like FillLayout) get sometimes confused as TabFolder has more childs than are actually displayed.

so they are not supposed to be generally useful

If they are not generally useful why we have 6 copies of the same code? ;-)

laeubi avatar Sep 17 '24 07:09 laeubi

One more observation this seems to be used with CTabFolder from the platform.ui rather than TabFolder. What happens when used with TabFolder (some screenshots please)? It should be clear whether it's for one or the other or both TabFolders and if the later maybe clarified in the name.

akurtakov avatar Sep 17 '24 08:09 akurtakov

I use it for TabFolder (like reported on the issue), but the layout can be used for any component that wants TabFolder-Like behaviour (e.g. only showing all component at the full size of the composite stacked onto each other)

laeubi avatar Sep 17 '24 08:09 laeubi

I use it for TabFolder (like reported on the issue), but the layout can be used for any component that wants TabFolder-Like behaviour (e.g. only showing all component at the full size of the composite stacked onto each other)

Consider putting such an explanation as a class comment :)

akurtakov avatar Sep 17 '24 08:09 akurtakov

@akurtakov : Thanks alot. Now i'll try to focus on other repo changes for which this is the start. PDE, Platform and ui accordingly.

deepika-u avatar Oct 07 '24 05:10 deepika-u