mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-29 19:45:01 +02:00
should selected and reveal first element when checking items in list.
This commit is contained in:
parent
fbcd0437b1
commit
a617f1ba4d
2 changed files with 4 additions and 0 deletions
|
@ -36,6 +36,7 @@ import org.eclipse.core.runtime.Platform;
|
||||||
import org.eclipse.core.runtime.Preferences;
|
import org.eclipse.core.runtime.Preferences;
|
||||||
import org.eclipse.jface.viewers.ILabelProvider;
|
import org.eclipse.jface.viewers.ILabelProvider;
|
||||||
import org.eclipse.jface.viewers.LabelProvider;
|
import org.eclipse.jface.viewers.LabelProvider;
|
||||||
|
import org.eclipse.jface.viewers.StructuredSelection;
|
||||||
import org.eclipse.swt.SWT;
|
import org.eclipse.swt.SWT;
|
||||||
import org.eclipse.swt.graphics.Image;
|
import org.eclipse.swt.graphics.Image;
|
||||||
import org.eclipse.swt.widgets.Composite;
|
import org.eclipse.swt.widgets.Composite;
|
||||||
|
@ -181,6 +182,7 @@ public abstract class AbstractErrorParserBlock extends AbstractCOptionPage {
|
||||||
List checkedList = Arrays.asList(parserIDs);
|
List checkedList = Arrays.asList(parserIDs);
|
||||||
fErrorParserList.setElements(checkedList);
|
fErrorParserList.setElements(checkedList);
|
||||||
fErrorParserList.setCheckedElements(checkedList);
|
fErrorParserList.setCheckedElements(checkedList);
|
||||||
|
fErrorParserList.getTableViewer().setSelection(new StructuredSelection(checkedList.get(0)), true);
|
||||||
|
|
||||||
Iterator items = mapParsers.keySet().iterator();
|
Iterator items = mapParsers.keySet().iterator();
|
||||||
while( items.hasNext()) {
|
while( items.hasNext()) {
|
||||||
|
|
|
@ -43,6 +43,7 @@ import org.eclipse.core.runtime.Platform;
|
||||||
import org.eclipse.core.runtime.Preferences;
|
import org.eclipse.core.runtime.Preferences;
|
||||||
import org.eclipse.core.runtime.SubProgressMonitor;
|
import org.eclipse.core.runtime.SubProgressMonitor;
|
||||||
import org.eclipse.jface.viewers.LabelProvider;
|
import org.eclipse.jface.viewers.LabelProvider;
|
||||||
|
import org.eclipse.jface.viewers.StructuredSelection;
|
||||||
import org.eclipse.swt.SWT;
|
import org.eclipse.swt.SWT;
|
||||||
import org.eclipse.swt.layout.GridData;
|
import org.eclipse.swt.layout.GridData;
|
||||||
import org.eclipse.swt.widgets.Composite;
|
import org.eclipse.swt.widgets.Composite;
|
||||||
|
@ -376,6 +377,7 @@ public class BinaryParserBlock extends AbstractBinaryParserPage {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
binaryList.setCheckedElements(selected);
|
binaryList.setCheckedElements(selected);
|
||||||
|
binaryList.getTableViewer().setSelection(new StructuredSelection(selected.get(0)), true);
|
||||||
// Give a change to the UI contributors to react.
|
// Give a change to the UI contributors to react.
|
||||||
// But do it last after the comboBox is set.
|
// But do it last after the comboBox is set.
|
||||||
handleBinaryParserChanged();
|
handleBinaryParserChanged();
|
||||||
|
|
Loading…
Add table
Reference in a new issue