[269224] HTML Editor Preference page tab order wrong
diff --git a/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/preferences/ui/CSSSourcePreferencePage.java b/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/preferences/ui/CSSSourcePreferencePage.java
index 235373c..217e481 100644
--- a/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/preferences/ui/CSSSourcePreferencePage.java
+++ b/bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/preferences/ui/CSSSourcePreferencePage.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2004, 2008 IBM Corporation and others.
+ * Copyright (c) 2004, 2009 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -15,6 +15,7 @@
import org.eclipse.jface.preference.IPreferenceStore;
import org.eclipse.swt.SWT;
import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
@@ -130,12 +131,18 @@
fNowrapAttr = createCheckBox(formattingGroup, CSSUIMessages.PrefsLabel_WrappingWithoutAttr);
((GridData) fNowrapAttr.getLayoutData()).horizontalSpan = 2;
-
- fIndentUsingTabs = createRadioButton(formattingGroup, CSSUIMessages.Indent_using_tabs_);
- ((GridData) fIndentUsingTabs.getLayoutData()).horizontalSpan = 2;
- fIndentUsingSpaces = createRadioButton(formattingGroup, CSSUIMessages.Indent_using_spaces);
- ((GridData) fIndentUsingSpaces.getLayoutData()).horizontalSpan = 2;
-
+
+ // [269224] - Place the indent controls in their own composite for proper tab ordering
+ Composite indentComposite = createComposite(formattingGroup, 1);
+ ((GridData) indentComposite.getLayoutData()).horizontalSpan = 2;
+ ((GridLayout) indentComposite.getLayout()).marginWidth = 0;
+ ((GridLayout) indentComposite.getLayout()).marginHeight = 0;
+
+ fIndentUsingTabs = createRadioButton(indentComposite, CSSUIMessages.Indent_using_tabs_);
+ ((GridData) fIndentUsingTabs.getLayoutData()).horizontalSpan = 1;
+ fIndentUsingSpaces = createRadioButton(indentComposite, CSSUIMessages.Indent_using_spaces);
+ ((GridData) fIndentUsingSpaces.getLayoutData()).horizontalSpan = 1;
+
createLabel(formattingGroup, CSSUIMessages.Indentation_size);
fIndentationSize = new Spinner(formattingGroup, SWT.READ_ONLY | SWT.BORDER);
GridData gd= new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING);
diff --git a/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/preferences/ui/HTMLSourcePreferencePage.java b/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/preferences/ui/HTMLSourcePreferencePage.java
index 9e7120e..4bb827b 100644
--- a/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/preferences/ui/HTMLSourcePreferencePage.java
+++ b/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/preferences/ui/HTMLSourcePreferencePage.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2004, 2008 IBM Corporation and others.
+ * Copyright (c) 2004, 2009 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -15,6 +15,7 @@
import org.eclipse.jface.preference.IPreferenceStore;
import org.eclipse.swt.SWT;
import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
@@ -111,11 +112,17 @@
fClearAllBlankLines = createCheckBox(formattingGroup, HTMLUIMessages.Clear_all_blank_lines_UI_);
((GridData) fClearAllBlankLines.getLayoutData()).horizontalSpan = 2;
- fIndentUsingTabs = createRadioButton(formattingGroup, HTMLUIMessages.Indent_using_tabs);
- ((GridData) fIndentUsingTabs.getLayoutData()).horizontalSpan = 2;
+ // [269224] - Place the indent controls in their own composite for proper tab ordering
+ Composite indentComposite = createComposite(formattingGroup, 1);
+ ((GridData) indentComposite.getLayoutData()).horizontalSpan = 2;
+ ((GridLayout) indentComposite.getLayout()).marginWidth = 0;
+ ((GridLayout) indentComposite.getLayout()).marginHeight = 0;
- fIndentUsingSpaces = createRadioButton(formattingGroup, HTMLUIMessages.Indent_using_spaces);
- ((GridData) fIndentUsingSpaces.getLayoutData()).horizontalSpan = 2;
+ fIndentUsingTabs = createRadioButton(indentComposite, HTMLUIMessages.Indent_using_tabs);
+ ((GridData) fIndentUsingTabs.getLayoutData()).horizontalSpan = 1;
+
+ fIndentUsingSpaces = createRadioButton(indentComposite, HTMLUIMessages.Indent_using_spaces);
+ ((GridData) fIndentUsingSpaces.getLayoutData()).horizontalSpan = 1;
createLabel(formattingGroup, HTMLUIMessages.Indentation_size);
fIndentationSize = new Spinner(formattingGroup, SWT.READ_ONLY | SWT.BORDER);
diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/preferences/XMLSourcePreferencePage.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/preferences/XMLSourcePreferencePage.java
index db51310..8ced8d7 100644
--- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/preferences/XMLSourcePreferencePage.java
+++ b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/preferences/XMLSourcePreferencePage.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2001, 2008 IBM Corporation and others.
+ * Copyright (c) 2001, 2009 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -21,6 +21,7 @@
import org.eclipse.swt.events.ModifyListener;
import org.eclipse.swt.events.SelectionListener;
import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Combo;
import org.eclipse.swt.widgets.Composite;
@@ -126,12 +127,18 @@
((GridData) fClearAllBlankLines.getLayoutData()).horizontalSpan = 2;
fSpaceBeforeEmptyCloseTag = createCheckBox(formattingGroup, XMLUIMessages.Space_before_empty_close_tag);
((GridData) fSpaceBeforeEmptyCloseTag.getLayoutData()).horizontalSpan = 2;
-
- fIndentUsingTabs = createRadioButton(formattingGroup, XMLUIMessages.Indent_using_tabs);
- ((GridData) fIndentUsingTabs.getLayoutData()).horizontalSpan = 2;
- fIndentUsingSpaces = createRadioButton(formattingGroup, XMLUIMessages.Indent_using_spaces);
- ((GridData) fIndentUsingSpaces.getLayoutData()).horizontalSpan = 2;
+ // [269224] - Place the indent controls in their own composite for proper tab ordering
+ Composite indentComposite = createComposite(formattingGroup, 1);
+ ((GridData) indentComposite.getLayoutData()).horizontalSpan = 2;
+ ((GridLayout) indentComposite.getLayout()).marginWidth = 0;
+ ((GridLayout) indentComposite.getLayout()).marginHeight = 0;
+
+ fIndentUsingTabs = createRadioButton(indentComposite, XMLUIMessages.Indent_using_tabs);
+ ((GridData) fIndentUsingTabs.getLayoutData()).horizontalSpan = 1;
+
+ fIndentUsingSpaces = createRadioButton(indentComposite, XMLUIMessages.Indent_using_spaces);
+ ((GridData) fIndentUsingSpaces.getLayoutData()).horizontalSpan = 1;
createLabel(formattingGroup, XMLUIMessages.Indentation_size);
fIndentationSize = new Spinner(formattingGroup, SWT.READ_ONLY | SWT.BORDER);