mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-29 19:45:01 +02:00
Fixed typos.
This commit is contained in:
parent
ef2faf60d9
commit
0063bbf490
1 changed files with 9 additions and 15 deletions
|
@ -48,11 +48,10 @@ import org.eclipse.cdt.internal.ui.util.SWTUtil;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A list with a button bar. Typical buttons are 'Add', 'Remove', 'Up' and
|
* A list with a button bar. Typical buttons are 'Add', 'Remove', 'Up' and
|
||||||
* 'Down'. List model is independend of widget creation. DialogFields controls
|
* 'Down'. List model is independent of widget creation. DialogFields controls
|
||||||
* are: Label, List and Composite containing buttons.
|
* are: Label, List and Composite containing buttons.
|
||||||
*/
|
*/
|
||||||
public class TreeListDialogField<T> extends DialogField {
|
public class TreeListDialogField<T> extends DialogField {
|
||||||
|
|
||||||
protected TreeViewer fTree;
|
protected TreeViewer fTree;
|
||||||
protected ILabelProvider fLabelProvider;
|
protected ILabelProvider fLabelProvider;
|
||||||
protected TreeViewerAdapter fTreeViewerAdapter;
|
protected TreeViewerAdapter fTreeViewerAdapter;
|
||||||
|
@ -80,8 +79,7 @@ public class TreeListDialogField<T> extends DialogField {
|
||||||
private int fTreeExpandLevel;
|
private int fTreeExpandLevel;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param adapter
|
* @param adapter Can be <code>null</code>.
|
||||||
* Can be <code>null</code>.
|
|
||||||
*/
|
*/
|
||||||
public TreeListDialogField(ITreeListAdapter<T> adapter, String[] buttonLabels, ILabelProvider lprovider) {
|
public TreeListDialogField(ITreeListAdapter<T> adapter, String[] buttonLabels, ILabelProvider lprovider) {
|
||||||
super();
|
super();
|
||||||
|
@ -115,9 +113,9 @@ public class TreeListDialogField<T> extends DialogField {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the index of the 'remove' button in the button label array passed in
|
* Sets the index of the 'remove' button in the button label array passed in
|
||||||
* the constructor. The behaviour of the button marked as the 'remove'
|
* the constructor. The behavior of the button marked as the 'remove'
|
||||||
* button will then be handled internally. (enable state, button invocation
|
* button will then be handled internally. (enable state, button invocation
|
||||||
* behaviour)
|
* behavior)
|
||||||
*/
|
*/
|
||||||
public void setRemoveButtonIndex(int removeButtonIndex) {
|
public void setRemoveButtonIndex(int removeButtonIndex) {
|
||||||
Assert.isTrue(removeButtonIndex < fButtonLabels.length);
|
Assert.isTrue(removeButtonIndex < fButtonLabels.length);
|
||||||
|
@ -126,8 +124,8 @@ public class TreeListDialogField<T> extends DialogField {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the index of the 'up' button in the button label array passed in the
|
* Sets the index of the 'up' button in the button label array passed in the
|
||||||
* constructor. The behaviour of the button marked as the 'up' button will
|
* constructor. The behavior of the button marked as the 'up' button will
|
||||||
* then behandled internally. (enable state, button invocation behaviour)
|
* then be handled internally. (enable state, button invocation behavior)
|
||||||
*/
|
*/
|
||||||
public void setUpButtonIndex(int upButtonIndex) {
|
public void setUpButtonIndex(int upButtonIndex) {
|
||||||
Assert.isTrue(upButtonIndex < fButtonLabels.length);
|
Assert.isTrue(upButtonIndex < fButtonLabels.length);
|
||||||
|
@ -136,9 +134,9 @@ public class TreeListDialogField<T> extends DialogField {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the index of the 'down' button in the button label array passed in
|
* Sets the index of the 'down' button in the button label array passed in
|
||||||
* the constructor. The behaviour of the button marked as the 'down' button
|
* the constructor. The behavior of the button marked as the 'down' button
|
||||||
* will then be handled internally. (enable state, button invocation
|
* will then be handled internally. (enable state, button invocation
|
||||||
* behaviour)
|
* behavior)
|
||||||
*/
|
*/
|
||||||
public void setDownButtonIndex(int downButtonIndex) {
|
public void setDownButtonIndex(int downButtonIndex) {
|
||||||
Assert.isTrue(downButtonIndex < fButtonLabels.length);
|
Assert.isTrue(downButtonIndex < fButtonLabels.length);
|
||||||
|
@ -705,7 +703,6 @@ public class TreeListDialogField<T> extends DialogField {
|
||||||
if (isOkToUse(fTreeControl)) {
|
if (isOkToUse(fTreeControl)) {
|
||||||
Display d = fTreeControl.getDisplay();
|
Display d = fTreeControl.getDisplay();
|
||||||
d.asyncExec(new Runnable() {
|
d.asyncExec(new Runnable() {
|
||||||
|
|
||||||
public void run() {
|
public void run() {
|
||||||
if (isOkToUse(fTreeControl)) {
|
if (isOkToUse(fTreeControl)) {
|
||||||
selectElements(selection);
|
selectElements(selection);
|
||||||
|
@ -844,7 +841,6 @@ public class TreeListDialogField<T> extends DialogField {
|
||||||
// ------- TreeViewerAdapter
|
// ------- TreeViewerAdapter
|
||||||
|
|
||||||
private class TreeViewerAdapter implements ITreeContentProvider, ISelectionChangedListener, IDoubleClickListener {
|
private class TreeViewerAdapter implements ITreeContentProvider, ISelectionChangedListener, IDoubleClickListener {
|
||||||
|
|
||||||
private final Object[] NO_ELEMENTS = new Object[0];
|
private final Object[] NO_ELEMENTS = new Object[0];
|
||||||
|
|
||||||
// ------- ITreeContentProvider Interface ------------
|
// ------- ITreeContentProvider Interface ------------
|
||||||
|
@ -895,7 +891,6 @@ public class TreeListDialogField<T> extends DialogField {
|
||||||
public void doubleClick(DoubleClickEvent event) {
|
public void doubleClick(DoubleClickEvent event) {
|
||||||
doDoubleClick(event);
|
doDoubleClick(event);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void doListSelected(SelectionChangedEvent event) {
|
protected void doListSelected(SelectionChangedEvent event) {
|
||||||
|
@ -910,5 +905,4 @@ public class TreeListDialogField<T> extends DialogField {
|
||||||
fTreeAdapter.doubleClicked(this);
|
fTreeAdapter.doubleClicked(this);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue