|
Lines 4-10
Link Here
|
| 4 |
* are made available under the terms of the Eclipse Public License v1.0 |
4 |
* are made available under the terms of the Eclipse Public License v1.0 |
| 5 |
* which accompanies this distribution, and is available at |
5 |
* which accompanies this distribution, and is available at |
| 6 |
* http://www.eclipse.org/legal/epl-v10.html |
6 |
* http://www.eclipse.org/legal/epl-v10.html |
| 7 |
* $Id: LogViewerUI.java,v 1.37 2007/11/27 04:33:39 apnan Exp $ |
7 |
* $Id: LogViewerUI.java,v 1.35 2007/08/08 14:54:16 ewchan Exp $ |
| 8 |
* |
8 |
* |
| 9 |
* Contributors: |
9 |
* Contributors: |
| 10 |
* IBM - Initial API and implementation |
10 |
* IBM - Initial API and implementation |
|
Lines 74-79
Link Here
|
| 74 |
|
74 |
|
| 75 |
private boolean _handleSelectionEvent = true; |
75 |
private boolean _handleSelectionEvent = true; |
| 76 |
private boolean _controlDown=false; |
76 |
private boolean _controlDown=false; |
|
|
77 |
private boolean tableColumSelected=false; |
| 77 |
|
78 |
|
| 78 |
//return true when the first column header is selected while pressing the ctrl button |
79 |
//return true when the first column header is selected while pressing the ctrl button |
| 79 |
private boolean _firstCol=true; |
80 |
private boolean _firstCol=true; |
|
Lines 158-164
Link Here
|
| 158 |
// Create the viewers |
159 |
// Create the viewers |
| 159 |
return fTableViewer.getControl(); |
160 |
return fTableViewer.getControl(); |
| 160 |
} |
161 |
} |
| 161 |
|
|
|
| 162 |
/** |
162 |
/** |
| 163 |
* Creates the context menu for the method viewer |
163 |
* Creates the context menu for the method viewer |
| 164 |
*/ |
164 |
*/ |
|
Lines 200-209
Link Here
|
| 200 |
if(initSel != null && initSel.size() > 0){ |
200 |
if(initSel != null && initSel.size() > 0){ |
| 201 |
revealObject((EObject)initSel.get(0)); |
201 |
revealObject((EObject)initSel.get(0)); |
| 202 |
EObject initInput = ((LogViewer)((LogPage)fPage).getTraceViewer()).getInitInput(); |
202 |
EObject initInput = ((LogViewer)((LogPage)fPage).getTraceViewer()).getInitInput(); |
|
|
203 |
|
| 203 |
if(initInput != null){ |
204 |
if(initInput != null){ |
| 204 |
TraceUIManager.getTraceUIManager().getSelectionModel(initInput).add(initSel.get(0)); |
205 |
TraceUIManager.getTraceUIManager().getSelectionModel(initInput).add(initSel.get(0)); |
| 205 |
} |
206 |
} ((LogViewer)((LogPage)fPage).getTraceViewer()).setInitSelection(null); |
| 206 |
((LogViewer)((LogPage)fPage).getTraceViewer()).setInitSelection(null); |
207 |
|
| 207 |
|
208 |
|
| 208 |
}else{ |
209 |
}else{ |
| 209 |
setViewSelection(); |
210 |
setViewSelection(); |
|
Lines 322-333
Link Here
|
| 322 |
updateColumnsTitle(); |
323 |
updateColumnsTitle(); |
| 323 |
|
324 |
|
| 324 |
if(!_controlDown) |
325 |
if(!_controlDown) |
|
|
326 |
{ |
| 325 |
updateSort(); |
327 |
updateSort(); |
|
|
328 |
tableColumSelected=false; |
| 329 |
} |
| 330 |
else |
| 331 |
tableColumSelected=true; |
| 326 |
} |
332 |
} |
| 327 |
} |
333 |
} |
| 328 |
else if(e.item instanceof TableItem && e.item.getData()!=null && _handleSelectionEvent){ |
334 |
else if(e.item instanceof TableItem && e.item.getData()!=null && _handleSelectionEvent){ |
| 329 |
LogUtil.notifyViewSelectionChanged(this, fTableViewer.getInput() instanceof EObject ? (EObject)fTableViewer.getInput() : HyadesUtil.getMofObject(),e.item.getData()); |
335 |
LogUtil.notifyViewSelectionChanged(this, fTableViewer.getInput() instanceof EObject ? (EObject)fTableViewer.getInput() : HyadesUtil.getMofObject(),e.item.getData()); |
|
|
336 |
tableColumSelected=false; |
| 337 |
} |
| 338 |
else { |
| 339 |
tableColumSelected=false; |
| 330 |
} |
340 |
} |
|
|
341 |
|
| 331 |
} |
342 |
} |
| 332 |
|
343 |
|
| 333 |
|
344 |
|
|
Lines 518-527
Link Here
|
| 518 |
|
529 |
|
| 519 |
public void keyReleased (KeyEvent e) { |
530 |
public void keyReleased (KeyEvent e) { |
| 520 |
if (e.keyCode == SWT.CONTROL) { |
531 |
if (e.keyCode == SWT.CONTROL) { |
| 521 |
ISelection selection = fTableViewer.getSelection(true); |
|
|
| 522 |
_controlDown = false; |
532 |
_controlDown = false; |
| 523 |
updateSort(); |
533 |
if(tableColumSelected) |
| 524 |
fTableViewer.setSelection(selection); |
534 |
{ |
|
|
535 |
tableColumSelected=false; |
| 536 |
ISelection selection = fTableViewer.getSelection(); |
| 537 |
updateSort(); |
| 538 |
if(selection!=null) |
| 539 |
fTableViewer.setSelection(selection); |
| 540 |
} |
| 525 |
} |
541 |
} |
| 526 |
} |
542 |
} |
| 527 |
|
543 |
|