sysperfana/perfinvestigator/com.nokia.carbide.cpp.pi.address/src/com/nokia/carbide/cpp/internal/pi/address/actions/VisualFunctionsDelegate.java
equal
deleted
inserted
replaced
|
1 /* |
|
2 * Copyright (c) 2009 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 the License "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.carbide.cpp.internal.pi.address.actions; |
|
19 |
|
20 import org.eclipse.jface.action.IAction; |
|
21 import org.eclipse.jface.viewers.ISelection; |
|
22 import org.eclipse.ui.IWorkbenchWindow; |
|
23 import org.eclipse.ui.IWorkbenchWindowActionDelegate; |
|
24 |
|
25 import com.nokia.carbide.cpp.pi.address.AddressPlugin; |
|
26 |
|
27 public class VisualFunctionsDelegate implements |
|
28 IWorkbenchWindowActionDelegate { |
|
29 |
|
30 private IWorkbenchWindow window; |
|
31 |
|
32 public void dispose() { |
|
33 } |
|
34 |
|
35 public void init(IWorkbenchWindow window) { |
|
36 this.window = window; |
|
37 } |
|
38 |
|
39 public void run(IAction action) { |
|
40 // get the active page |
|
41 if (window == null) |
|
42 return; |
|
43 |
|
44 if (action.isChecked()) { |
|
45 AddressPlugin.getDefault().receiveSelectionEvent("functionsVisualised"); //$NON-NLS-1$ |
|
46 } |
|
47 else { |
|
48 AddressPlugin.getDefault().receiveSelectionEvent("resetToCurrentMode"); //$NON-NLS-1$ |
|
49 } |
|
50 } |
|
51 |
|
52 public void selectionChanged(IAction action, ISelection selection) { |
|
53 } |
|
54 |
|
55 } |