1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-06-08 18:26:01 +02:00

fix for bug 189413 - manually add labels to variable list for accessibility

This commit is contained in:
Vivian Kong 2007-07-06 18:02:18 +00:00
parent 79710ce424
commit 92f6c14efd

View file

@ -7,6 +7,7 @@
* *
* Contributors: * Contributors:
* Intel Corporation - initial API and implementation * Intel Corporation - initial API and implementation
* IBM Corporation
*******************************************************************************/ *******************************************************************************/
package org.eclipse.cdt.ui.newui; package org.eclipse.cdt.ui.newui;
@ -14,6 +15,8 @@ import org.eclipse.core.variables.IStringVariable;
import org.eclipse.core.variables.VariablesPlugin; import org.eclipse.core.variables.VariablesPlugin;
import org.eclipse.jface.viewers.LabelProvider; import org.eclipse.jface.viewers.LabelProvider;
import org.eclipse.swt.SWT; import org.eclipse.swt.SWT;
import org.eclipse.swt.accessibility.AccessibleAdapter;
import org.eclipse.swt.accessibility.AccessibleEvent;
import org.eclipse.swt.layout.GridData; import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.widgets.Composite; import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control; import org.eclipse.swt.widgets.Control;
@ -35,6 +38,7 @@ public class BuildVarListDialog extends ElementListSelectionDialog {
private Text text; private Text text;
private Label type; private Label type;
private static final String LIST_DESCRIPTION = UIMessages.getString("BuildVarListDialog.1"); //$NON-NLS-1$
public BuildVarListDialog(Shell parent, Object[] input) { public BuildVarListDialog(Shell parent, Object[] input) {
super(parent, new LabelProvider () { super(parent, new LabelProvider () {
@ -67,6 +71,18 @@ public class BuildVarListDialog extends ElementListSelectionDialog {
GridData gd = new GridData(GridData.FILL_HORIZONTAL); GridData gd = new GridData(GridData.FILL_HORIZONTAL);
gd.heightHint = 50; gd.heightHint = 50;
text.setLayoutData(gd); text.setLayoutData(gd);
//bug 189413 - adding label to build variable list for accessiblity
if (fFilteredList != null) {
fFilteredList.getAccessible().addAccessibleListener(
new AccessibleAdapter() {
public void getName(AccessibleEvent e) {
e.result = LIST_DESCRIPTION;
}
}
);
}
return c; return c;
} }