Lines 13-18
Link Here
|
13 |
* Contributors: |
13 |
* Contributors: |
14 |
* Martin Oberhuber (Wind River) - [168975] Move RSE Events API to Core |
14 |
* Martin Oberhuber (Wind River) - [168975] Move RSE Events API to Core |
15 |
* Martin Oberhuber (Wind River) - [186773] split ISystemRegistryUI from ISystemRegistry |
15 |
* Martin Oberhuber (Wind River) - [186773] split ISystemRegistryUI from ISystemRegistry |
|
|
16 |
* Kevin Doyle (IBM) - [192278] Removed handleKeyPressed |
16 |
********************************************************************************/ |
17 |
********************************************************************************/ |
17 |
|
18 |
|
18 |
package org.eclipse.rse.internal.ui.view.scratchpad; |
19 |
package org.eclipse.rse.internal.ui.view.scratchpad; |
Lines 206-219
Link Here
|
206 |
initDragAndDrop(); |
207 |
initDragAndDrop(); |
207 |
|
208 |
|
208 |
tableTree.setVisible(false); |
209 |
tableTree.setVisible(false); |
209 |
// key listening for delete press |
|
|
210 |
getControl().addKeyListener(new KeyAdapter() |
211 |
{ |
212 |
public void keyPressed(KeyEvent e) |
213 |
{ |
214 |
handleKeyPressed(e); |
215 |
} |
216 |
}); |
217 |
getControl().addMouseListener(new MouseAdapter() |
210 |
getControl().addMouseListener(new MouseAdapter() |
218 |
{ |
211 |
{ |
219 |
public void mouseDown(MouseEvent e) |
212 |
public void mouseDown(MouseEvent e) |
Lines 1393-1419
Link Here
|
1393 |
|
1386 |
|
1394 |
} |
1387 |
} |
1395 |
|
1388 |
|
1396 |
|
|
|
1397 |
void handleKeyPressed(KeyEvent event) |
1398 |
{ |
1399 |
//System.out.println("Key Pressed"); |
1400 |
//System.out.println("...event character : " + event.character + ", "+(int)event.character); |
1401 |
//System.out.println("...event state mask: " + event.stateMask); |
1402 |
//System.out.println("...CTRL : " + SWT.CTRL); |
1403 |
if ((event.character == SWT.DEL) && (event.stateMask == 0) && (((IStructuredSelection) getSelection()).size() > 0)) |
1404 |
{ |
1405 |
scanSelections(); |
1406 |
if (showDelete() && canDelete()) |
1407 |
{ |
1408 |
SystemCommonDeleteAction dltAction = (SystemCommonDeleteAction) getDeleteAction(); |
1409 |
dltAction.setShell(getShell()); |
1410 |
dltAction.setSelection(getSelection()); |
1411 |
dltAction.setViewer(this); |
1412 |
dltAction.run(); |
1413 |
} |
1414 |
} |
1415 |
} |
1416 |
|
1417 |
/** |
1389 |
/** |
1418 |
* Overridden so that we can pass a wrapper IContextObject into the provider to get children instead |
1390 |
* Overridden so that we can pass a wrapper IContextObject into the provider to get children instead |
1419 |
* of the model object, itself |
1391 |
* of the model object, itself |