mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-06-07 17:56:01 +02:00
- fixed layout problems in problems configuration dialog
This commit is contained in:
parent
d2f4f9daa0
commit
1b697310f5
1 changed files with 25 additions and 5 deletions
|
@ -100,9 +100,21 @@ public class CodanPreferencePage extends FieldEditorOverlayPage implements
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void createFieldEditors() {
|
public void createFieldEditors() {
|
||||||
profile = isPropertyPage() ? getRegistry()
|
// ScrolledComposite sc = new ScrolledComposite(getFieldEditorParent(),
|
||||||
.getResourceProfileWorkingCopy((IResource) getElement())
|
// SWT.H_SCROLL | SWT.V_SCROLL);
|
||||||
: getRegistry().getWorkspaceProfile();
|
// sc.setLayoutData(new GridData(GridData.FILL_BOTH));
|
||||||
|
// sc.setExpandHorizontal(true);
|
||||||
|
// sc.setExpandVertical(true);
|
||||||
|
// sc.setMinWidth(400);
|
||||||
|
// sc.setMinHeight(400);
|
||||||
|
// // Composite pane = new Composite(sc, SWT.NONE);
|
||||||
|
// Button pane = new Button(sc, SWT.PUSH);
|
||||||
|
// pane.setText("push");
|
||||||
|
// sc.setContent(pane);
|
||||||
|
// GridLayout gl = new GridLayout();
|
||||||
|
// gl.marginHeight = 0;
|
||||||
|
// gl.marginWidth = 0;
|
||||||
|
// pane.setLayout(gl);
|
||||||
checkedTreeEditor = new ProblemsTreeEditor(getFieldEditorParent(),
|
checkedTreeEditor = new ProblemsTreeEditor(getFieldEditorParent(),
|
||||||
profile);
|
profile);
|
||||||
addField(checkedTreeEditor);
|
addField(checkedTreeEditor);
|
||||||
|
@ -114,6 +126,11 @@ public class CodanPreferencePage extends FieldEditorOverlayPage implements
|
||||||
openCustomizeDialog();
|
openCustomizeDialog();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
GridData layoutData = new GridData(GridData.FILL, GridData.FILL, true,
|
||||||
|
true);
|
||||||
|
layoutData.heightHint = 400;
|
||||||
|
checkedTreeEditor.getTreeViewer().getControl()
|
||||||
|
.setLayoutData(layoutData);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -125,6 +142,9 @@ public class CodanPreferencePage extends FieldEditorOverlayPage implements
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
protected Control createContents(Composite parent) {
|
protected Control createContents(Composite parent) {
|
||||||
|
profile = isPropertyPage() ? getRegistry()
|
||||||
|
.getResourceProfileWorkingCopy((IResource) getElement())
|
||||||
|
: getRegistry().getWorkspaceProfile();
|
||||||
Composite comp = (Composite) super.createContents(parent);
|
Composite comp = (Composite) super.createContents(parent);
|
||||||
createInfoControl(comp);
|
createInfoControl(comp);
|
||||||
return comp;
|
return comp;
|
||||||
|
@ -135,7 +155,7 @@ public class CodanPreferencePage extends FieldEditorOverlayPage implements
|
||||||
*/
|
*/
|
||||||
private void createInfoControl(Composite comp) {
|
private void createInfoControl(Composite comp) {
|
||||||
info = new Group(comp, SWT.NONE);
|
info = new Group(comp, SWT.NONE);
|
||||||
info.setLayoutData(new GridData(GridData.FILL_BOTH));
|
info.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
|
||||||
info.setLayout(new GridLayout(3, false));
|
info.setLayout(new GridLayout(3, false));
|
||||||
info.setText(CodanUIMessages.CodanPreferencePage_Info);
|
info.setText(CodanUIMessages.CodanPreferencePage_Info);
|
||||||
GridDataFactory gdLab = GridDataFactory.swtDefaults()
|
GridDataFactory gdLab = GridDataFactory.swtDefaults()
|
||||||
|
@ -221,7 +241,7 @@ public class CodanPreferencePage extends FieldEditorOverlayPage implements
|
||||||
private void restoreWidgetValues() {
|
private void restoreWidgetValues() {
|
||||||
String id = CodanUIActivator.getDefault().getDialogSettings()
|
String id = CodanUIActivator.getDefault().getDialogSettings()
|
||||||
.get(getWidgetId());
|
.get(getWidgetId());
|
||||||
if (id != null && id.length() > 0) {
|
if (id != null && id.length() > 0 && checkedTreeEditor != null) {
|
||||||
checkedTreeEditor.getTreeViewer().setSelection(
|
checkedTreeEditor.getTreeViewer().setSelection(
|
||||||
new StructuredSelection(profile.findProblem(id)), true);
|
new StructuredSelection(profile.findProblem(id)), true);
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Add table
Reference in a new issue