Bug 405348 - [Eclipse Platform Utilities] incorrect implementation in org.eclipse.sphinx.platform.ui.preferences.AbstractPreferenceAndPropertyPage
Summary: [Eclipse Platform Utilities] incorrect implementation in org.eclipse.sphinx.p...
Status: CLOSED WONTFIX
Alias: None
Product: Sphinx
Classification: Automotive
Component: Core (show other bugs)
Version: 0.7.0   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-04-10 08:42 EDT by pdu CLA
Modified: 2024-05-06 23:29 EDT (History)
4 users (show)

See Also:


Attachments
patch proposal (656 bytes, application/octet-stream)
2013-04-10 08:43 EDT, pdu CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description pdu CLA 2013-04-10 08:42:28 EDT
I noticed that for most of FieldEditor included in types which inherit AbstractPreferenceAndPropertyPage, method setEnabled doesn't work correctly, when called (for example) from enablePreferenceContent method

Root cause comes from method createFieldEditors() method, which returns composite variable instead of parent, which is set to getFieldEditorParent()

createFieldEditors() must return 'parent' instead of 'composite', as written in attached patch
Comment 1 pdu CLA 2013-04-10 08:43:21 EDT
Created attachment 229552 [details]
patch proposal

This patch applies on sphinx svn trunk
Comment 2 Pierre Dufay CLA 2013-08-28 09:30:46 EDT
Further investigation show that the previously sent patch is not totally effective.
As a matter of fact, with this patch, 'composite' variable is useless, but nevertheless added to parent. This leads in display problem when adding StringFieldEditor.
As a conclusion, added to this patch, code linked to 'composite' variable must be removed:

protected void createFieldEditors() {
    Composite parent = getFieldEditorParent();
    initializeDialogUnits(parent);
    GridLayout layout = new GridLayout();
    layout.marginHeight = convertVerticalDLUsToPixels(IDialogConstants.VERTICAL_MARGIN);
    layout.marginWidth = 0;
    layout.verticalSpacing = convertVerticalDLUsToPixels(10);
    layout.horizontalSpacing = convertHorizontalDLUsToPixels(IDialogConstants.HORIZONTAL_SPACING);
    parent.setLayout(layout);
    parent.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
    addFields(parent);
}
Comment 3 Balazs Grill CLA 2024-05-06 23:29:41 EDT
Closed stale issue before migration