mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-06-07 17:56:01 +02:00
Added a delete key event handler to the list field editor
This commit is contained in:
parent
4d037cc146
commit
6475a7ac01
2 changed files with 19 additions and 0 deletions
|
@ -20,6 +20,8 @@ import org.eclipse.jface.util.Assert;
|
||||||
import org.eclipse.swt.SWT;
|
import org.eclipse.swt.SWT;
|
||||||
import org.eclipse.swt.events.DisposeEvent;
|
import org.eclipse.swt.events.DisposeEvent;
|
||||||
import org.eclipse.swt.events.DisposeListener;
|
import org.eclipse.swt.events.DisposeListener;
|
||||||
|
import org.eclipse.swt.events.KeyAdapter;
|
||||||
|
import org.eclipse.swt.events.KeyEvent;
|
||||||
import org.eclipse.swt.events.MouseAdapter;
|
import org.eclipse.swt.events.MouseAdapter;
|
||||||
import org.eclipse.swt.events.MouseEvent;
|
import org.eclipse.swt.events.MouseEvent;
|
||||||
import org.eclipse.swt.events.SelectionAdapter;
|
import org.eclipse.swt.events.SelectionAdapter;
|
||||||
|
@ -182,6 +184,19 @@ public class BuildOptionListFieldEditor extends FieldEditor {
|
||||||
editSelection();
|
editSelection();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
list.addKeyListener(new KeyAdapter() {
|
||||||
|
/* (non-Javadoc)
|
||||||
|
* @see org.eclipse.swt.events.KeyAdapter#keyPressed(org.eclipse.swt.events.KeyEvent)
|
||||||
|
*/
|
||||||
|
public void keyPressed(KeyEvent e) {
|
||||||
|
// Is this the delete key
|
||||||
|
if (e.keyCode == SWT.DEL) {
|
||||||
|
removePressed();
|
||||||
|
} else {
|
||||||
|
super.keyPressed(e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
// Create a composite for the buttons
|
// Create a composite for the buttons
|
||||||
Composite buttonGroup = new Composite(controlGroup, SWT.NONE);
|
Composite buttonGroup = new Composite(controlGroup, SWT.NONE);
|
||||||
|
|
|
@ -448,6 +448,10 @@ public class BuildPropertyPage extends PropertyPage implements IWorkbenchPropert
|
||||||
return lastShellSize;
|
return lastShellSize;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* (non-Javadoc)
|
||||||
|
* Answers the list of settings pages for the selected configuration
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
private List getPagesForConfig() {
|
private List getPagesForConfig() {
|
||||||
List pages = (List) configToPageListMap.get(selectedConfiguration.getId());
|
List pages = (List) configToPageListMap.get(selectedConfiguration.getId());
|
||||||
if (pages == null) {
|
if (pages == null) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue