sysperfana/perfinvestigator/com.nokia.carbide.cpp.pi.memory/src/com/nokia/carbide/cpp/internal/pi/memory/actions/DynamicScaleDelegate.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.memory.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.memory.MemoryPlugin; |
|
26 |
|
27 public class DynamicScaleDelegate implements IWorkbenchWindowActionDelegate { |
|
28 |
|
29 private IWorkbenchWindow window; |
|
30 |
|
31 public void dispose() { |
|
32 } |
|
33 |
|
34 public void init(IWorkbenchWindow window) { |
|
35 this.window = window; |
|
36 } |
|
37 |
|
38 public void run(IAction action) { |
|
39 // get the active page |
|
40 if (window == null) |
|
41 return; |
|
42 |
|
43 if (action.isChecked()) |
|
44 { |
|
45 MemoryPlugin.getDefault().receiveSelectionEvent("dynamicMemoryVisualisation"); //$NON-NLS-1$ |
|
46 } |
|
47 else |
|
48 { |
|
49 MemoryPlugin.getDefault().receiveSelectionEvent("absoluteMemoryVisualisation"); //$NON-NLS-1$ |
|
50 } |
|
51 } |
|
52 |
|
53 public void selectionChanged(IAction action, ISelection selection) { |
|
54 } |
|
55 |
|
56 } |