crashanalysis/crashanalyser/com.nokia.s60tools.crashanalyser/src/com/nokia/s60tools/crashanalyser/handlers/SdkSelectionHandler.java
equal
deleted
inserted
replaced
|
1 /* |
|
2 * Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: |
|
15 * |
|
16 */ |
|
17 |
|
18 package com.nokia.s60tools.crashanalyser.handlers; |
|
19 |
|
20 import org.eclipse.core.commands.*; |
|
21 import org.eclipse.swt.widgets.*; |
|
22 |
|
23 import com.nokia.s60tools.crashanalyser.model.SourceSdkManager; |
|
24 |
|
25 /** |
|
26 * A class for handling SDK selection. |
|
27 * |
|
28 */ |
|
29 public class SdkSelectionHandler extends AbstractHandler { |
|
30 |
|
31 /** |
|
32 * This method gets called when user selects an SDK from a pop-up menu. |
|
33 */ |
|
34 public Object execute(ExecutionEvent event) throws ExecutionException { |
|
35 Event e = (Event)event.getTrigger(); |
|
36 MenuItem item = (MenuItem)e.widget; |
|
37 String sdkName = item.getText(); |
|
38 SourceSdkManager.setSdk(sdkName); |
|
39 return null; |
|
40 } |
|
41 } |