| Summary: | FilteredTree assumes parent uses GridLayout | ||
|---|---|---|---|
| Product: | [Eclipse Project] Platform | Reporter: | Shawn Minto <shawn.minto> |
| Component: | UI | Assignee: | Dani Megert <daniel_megert> |
| Status: | VERIFIED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | achmetow84, adrian.wilkins, andy-eclipsebugs, daniel.rolka, daniel_megert, emoffatt, mik.kersten, pwebster, remy.suen |
| Version: | 3.4 | Keywords: | helpwanted |
| Target Milestone: | 4.3 M6 | ||
| Hardware: | All | ||
| OS: | All | ||
| Whiteboard: | |||
| Bug Depends on: | |||
| Bug Blocks: | 325788 | ||
|
Description
Shawn Minto
I had the same problem, if you want to change the layout, you have to extend the FilteredTree and override the *createTreeControl* method. But that is not so nice. My suggestion: Extend the FilteredTree by a new constructor where a layout can be specified. This layout could be a class field which would be set in the method createTreeControl, if this field is null, than the old GridLayout can be set. Other suggestions? I could provide a patch for Gerrit, if someone is interested in this problem. Why not just remove the first setLayoutData(*) in createControl(*)? Isn't that the one that's causing the problem? PW (In reply to comment #2) > Why not just remove the first setLayoutData(*) in createControl(*)? Isn't > that the one that's causing the problem? > > PW Yes, in my Opinion that's the one problem for this layout issue. (In reply to comment #2) > Why not just remove the first setLayoutData(*) in createControl(*)? Isn't > that the one that's causing the problem? > > PW That would break existing clients. There are two possible fixes here: 1) we only set it when the parent uses grid layout 2) we extract this into a new method #setLayoutData() I'd prefer 1) since it does the trick without adding new API and still allows clients to set their own layout data. (In reply to comment #4) > > That would break existing clients. There are two possible fixes here: > > 1) we only set it when the parent uses grid layout I agree, that's the best course. PW (In reply to comment #5) > (In reply to comment #4) > > > > That would break existing clients. There are two possible fixes here: > > > > 1) we only set it when the parent uses grid layout > > I agree, that's the best course. > > PW OK, I'll take care of it. Verified in the build: I20130311-2000-win32-x86_64 *** Bug 310073 has been marked as a duplicate of this bug. *** |