author | Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com> |
Wed, 23 Jun 2010 15:05:09 +0300 | |
changeset 12 | ae255c9aa552 |
permissions | -rw-r--r-- |
12
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
1 |
/* |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
2 |
* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
3 |
* All rights reserved. |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
4 |
* This component and the accompanying materials are made available |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
5 |
* under the terms of the License "Eclipse Public License v1.0" |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
6 |
* which accompanies this distribution, and is available |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
7 |
* at the URL "http://www.eclipse.org/legal/epl-v10.html". |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
8 |
* |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
9 |
* Initial Contributors: |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
10 |
* Nokia Corporation - initial contribution. |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
11 |
* |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
12 |
* Contributors: |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
13 |
* |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
14 |
* Description: |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
15 |
* |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
16 |
*/ |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
17 |
package com.nokia.carbide.cpp.internal.pi.wizards.ui.views; |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
18 |
|
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
19 |
import java.io.File; |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
20 |
import java.text.MessageFormat; |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
21 |
import java.text.SimpleDateFormat; |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
22 |
import java.util.ArrayList; |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
23 |
import java.util.Date; |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
24 |
import java.util.Iterator; |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
25 |
import java.util.List; |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
26 |
|
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
27 |
import org.eclipse.core.resources.IFile; |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
28 |
import org.eclipse.core.resources.IProject; |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
29 |
import org.eclipse.core.resources.IResource; |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
30 |
import org.eclipse.core.resources.IResourceChangeEvent; |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
31 |
import org.eclipse.core.resources.IResourceChangeListener; |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
32 |
import org.eclipse.core.resources.IResourceDelta; |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
33 |
import org.eclipse.core.resources.IResourceDeltaVisitor; |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
34 |
import org.eclipse.core.resources.IWorkspace; |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
35 |
import org.eclipse.core.resources.IWorkspaceRoot; |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
36 |
import org.eclipse.core.resources.ResourcesPlugin; |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
37 |
import org.eclipse.core.runtime.CoreException; |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
38 |
import org.eclipse.core.runtime.IPath; |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
39 |
import org.eclipse.jface.action.Action; |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
40 |
import org.eclipse.jface.action.IMenuListener; |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
41 |
import org.eclipse.jface.action.IMenuManager; |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
42 |
import org.eclipse.jface.action.IToolBarManager; |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
43 |
import org.eclipse.jface.action.MenuManager; |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
44 |
import org.eclipse.jface.action.Separator; |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
45 |
import org.eclipse.jface.dialogs.MessageDialog; |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
46 |
import org.eclipse.jface.viewers.DoubleClickEvent; |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
47 |
import org.eclipse.jface.viewers.IDoubleClickListener; |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
48 |
import org.eclipse.jface.viewers.ISelection; |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
49 |
import org.eclipse.jface.viewers.IStructuredContentProvider; |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
50 |
import org.eclipse.jface.viewers.IStructuredSelection; |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
51 |
import org.eclipse.jface.viewers.ITableLabelProvider; |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
52 |
import org.eclipse.jface.viewers.LabelProvider; |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
53 |
import org.eclipse.jface.viewers.StructuredSelection; |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
54 |
import org.eclipse.jface.viewers.TableViewer; |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
55 |
import org.eclipse.jface.viewers.Viewer; |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
56 |
import org.eclipse.jface.viewers.ViewerSorter; |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
57 |
import org.eclipse.swt.SWT; |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
58 |
import org.eclipse.swt.events.SelectionAdapter; |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
59 |
import org.eclipse.swt.events.SelectionEvent; |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
60 |
import org.eclipse.swt.graphics.Image; |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
61 |
import org.eclipse.swt.widgets.Composite; |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
62 |
import org.eclipse.swt.widgets.Display; |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
63 |
import org.eclipse.swt.widgets.Menu; |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
64 |
import org.eclipse.swt.widgets.Table; |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
65 |
import org.eclipse.swt.widgets.TableColumn; |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
66 |
import org.eclipse.ui.IActionBars; |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
67 |
import org.eclipse.ui.ISharedImages; |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
68 |
import org.eclipse.ui.IWorkbenchActionConstants; |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
69 |
import org.eclipse.ui.PartInitException; |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
70 |
import org.eclipse.ui.PlatformUI; |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
71 |
import org.eclipse.ui.ide.IDE; |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
72 |
import org.eclipse.ui.part.ViewPart; |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
73 |
|
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
74 |
import com.nokia.carbide.cpp.internal.pi.button.ui.ImportBupMapWizardDialog; |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
75 |
import com.nokia.carbide.cpp.internal.pi.wizards.model.SessionHandler; |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
76 |
import com.nokia.carbide.cpp.internal.pi.wizards.model.TraceFile; |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
77 |
import com.nokia.carbide.cpp.internal.pi.wizards.ui.actions.ToolbarShortcutAction; |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
78 |
import com.nokia.carbide.cpp.pi.editors.PIPageEditor; |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
79 |
import com.nokia.carbide.cpp.pi.wizards.WizardsPlugin; |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
80 |
import com.nokia.s60tools.ui.S60ToolsTable; |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
81 |
import com.nokia.s60tools.ui.S60ToolsTableColumnData; |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
82 |
import com.nokia.s60tools.ui.S60ToolsTableFactory; |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
83 |
|
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
84 |
|
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
85 |
public class PIView extends ViewPart implements IResourceChangeListener { |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
86 |
|
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
87 |
public static final String ID = "com.nokia.carbide.cpp.internal.pi.wizards.ui.views.PIView"; //$NON-NLS-1$ |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
88 |
private static final String HELP_CONTEXT_ID = PIPageEditor.PI_ID + ".view"; //$NON-NLS-1$ |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
89 |
private static final String HELP_CONTEXT_ID_MAIN_PAGE = HELP_CONTEXT_ID + ".pi_view_context"; //$NON-NLS-1$ |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
90 |
private static final int COLUMN_TRACE_FILE_ID = 0; |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
91 |
private static final int COLUMN_PROJECT_NAME_ID = 1; |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
92 |
private static final int COLUMN_SDK_NAME_ID = 2; |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
93 |
private static final int COLUMN_IMPORT_TIME_ID = 3; |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
94 |
private static final int COLUMN_FILE_SIZE_ID = 4; |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
95 |
private static final int COLUMN_TRACE_TIME_ID = 5; |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
96 |
|
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
97 |
private TableViewer viewer; |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
98 |
private Action actionOpenWizard; |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
99 |
private Action actionOpenKeyPressWizard; |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
100 |
private Action actionDelete; |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
101 |
private IWorkspace workspace; |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
102 |
|
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
103 |
/* |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
104 |
* The content provider class is responsible for |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
105 |
* providing objects to the view. |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
106 |
*/ |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
107 |
class ViewContentProvider implements IStructuredContentProvider { |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
108 |
public void inputChanged(Viewer v, Object oldInput, Object newInput) { |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
109 |
} |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
110 |
public void dispose() { |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
111 |
} |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
112 |
public Object[] getElements(Object parent) { |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
113 |
return SessionHandler.getInstance().loadTraceFile(); |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
114 |
} |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
115 |
} |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
116 |
class ViewLabelProvider extends LabelProvider implements ITableLabelProvider { |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
117 |
public String getColumnText(Object obj, int index) { |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
118 |
final TraceFile traceFile = (TraceFile)obj; |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
119 |
SimpleDateFormat formatter = null; |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
120 |
switch (index) { |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
121 |
case COLUMN_TRACE_FILE_ID: |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
122 |
return traceFile.getTraceFilePath().lastSegment(); |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
123 |
case COLUMN_PROJECT_NAME_ID: |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
124 |
return traceFile.getProjectName(); |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
125 |
case COLUMN_SDK_NAME_ID: |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
126 |
if(traceFile.getSdkName().length() <= 0){ |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
127 |
return "-"; //$NON-NLS-1$ |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
128 |
} |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
129 |
return traceFile.getSdkName(); |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
130 |
case COLUMN_IMPORT_TIME_ID: |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
131 |
formatter = new SimpleDateFormat("d MMM yyyy HH:mm:ss"); //$NON-NLS-1$ |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
132 |
return formatter.format(new Date(traceFile.getImportTime())); |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
133 |
case COLUMN_FILE_SIZE_ID: |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
134 |
IProject project = (IProject) workspace.getRoot().findMember(traceFile.getProjectName()); |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
135 |
if(project == null){ |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
136 |
return "-"; //$NON-NLS-1$ |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
137 |
} |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
138 |
|
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
139 |
IResource resource = project.findMember(traceFile.getTraceFilePath().lastSegment()); |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
140 |
if (resource != null) { |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
141 |
SessionHandler.getInstance().removeTraceFile(traceFile); |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
142 |
traceFile.setTraceFileSize(resource.getLocation().toFile().length()); |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
143 |
SessionHandler.getInstance().addTraceFile(traceFile); |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
144 |
} |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
145 |
return String.valueOf(traceFile.getTraceFileSize() / 1024 ); |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
146 |
case COLUMN_TRACE_TIME_ID: |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
147 |
if(traceFile.getTraceLengthInTime() == -1){ |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
148 |
return "-"; //$NON-NLS-1$ |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
149 |
} |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
150 |
formatter = new SimpleDateFormat("mm:ss"); //$NON-NLS-1$ |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
151 |
return formatter.format(new Date(traceFile.getTraceLengthInTime())); |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
152 |
default: |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
153 |
break; |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
154 |
} |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
155 |
return getText(obj); |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
156 |
} |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
157 |
public Image getColumnImage(Object obj, int index) { |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
158 |
return getImage(obj); |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
159 |
} |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
160 |
public Image getImage(Object obj) { |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
161 |
return null; |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
162 |
} |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
163 |
} |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
164 |
|
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
165 |
class TableSorter extends ViewerSorter { |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
166 |
private Table table; |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
167 |
private int column = 0; |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
168 |
private boolean sortAscending; |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
169 |
public TableSorter(Table table, int column){ |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
170 |
this.table = table; |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
171 |
doSort(column); |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
172 |
} |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
173 |
|
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
174 |
public void doSort(int column) { |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
175 |
sortAscending = !sortAscending; |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
176 |
|
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
177 |
// find the TableColumn corresponding to column, and give it a |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
178 |
// column direction |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
179 |
TableColumn sortByColumn = table.getColumn(column); |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
180 |
if (sortByColumn != null) { |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
181 |
table.setSortColumn(sortByColumn); |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
182 |
table.setSortDirection(sortAscending ? SWT.UP : SWT.DOWN); |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
183 |
} |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
184 |
this.column = column; |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
185 |
|
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
186 |
} |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
187 |
|
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
188 |
/* (non-Javadoc) |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
189 |
* @see org.eclipse.jface.viewers.ViewerComparator#compare(org.eclipse.jface.viewers.Viewer, java.lang.Object, java.lang.Object) |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
190 |
*/ |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
191 |
@Override |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
192 |
public int compare(Viewer viewer, Object e1, Object e2) { |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
193 |
TraceFile tf1 = (TraceFile)e1; |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
194 |
TraceFile tf2 = (TraceFile)e2; |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
195 |
int returnCode = 0; |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
196 |
switch (column) { |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
197 |
case COLUMN_TRACE_FILE_ID: |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
198 |
returnCode = tf1.getTraceFilePath().lastSegment().compareTo( |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
199 |
tf2.getTraceFilePath().lastSegment()); |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
200 |
break; |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
201 |
case COLUMN_PROJECT_NAME_ID: |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
202 |
returnCode = tf1.getProjectName().compareTo(tf2.getProjectName()); |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
203 |
break; |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
204 |
case COLUMN_SDK_NAME_ID: |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
205 |
returnCode = tf1.getSdkName().compareTo(tf2.getSdkName()); |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
206 |
break; |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
207 |
case COLUMN_IMPORT_TIME_ID: |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
208 |
returnCode = numericSort(tf1.getImportTime(), tf2.getImportTime()); |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
209 |
break; |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
210 |
case COLUMN_FILE_SIZE_ID: |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
211 |
returnCode = numericSort(tf1.getTraceFileSize(), tf2 |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
212 |
.getTraceFileSize()); |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
213 |
break; |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
214 |
case COLUMN_TRACE_TIME_ID: |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
215 |
returnCode = numericSort(tf1.getTraceLengthInTime(), tf2 |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
216 |
.getTraceLengthInTime()); |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
217 |
break; |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
218 |
default: |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
219 |
break; |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
220 |
} |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
221 |
|
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
222 |
if (!sortAscending) |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
223 |
returnCode = -returnCode; |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
224 |
return returnCode; |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
225 |
|
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
226 |
} |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
227 |
|
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
228 |
/** |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
229 |
* Numeric sort. |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
230 |
* @param num1 1st number to compare. |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
231 |
* @param num2 2nd number to compare. |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
232 |
* @return Returns a negative integer, zero, |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
233 |
* or a positive integer as the first argument |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
234 |
* is less than, equal to, or greater |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
235 |
* than the second. |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
236 |
*/ |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
237 |
private int numericSort(long num1, long num2){ |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
238 |
long result = (num1 - num2); |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
239 |
if(result > 0){ |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
240 |
return 1; |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
241 |
} |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
242 |
else if(result < 0){ |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
243 |
return -1; |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
244 |
} |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
245 |
else{ |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
246 |
return 0; |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
247 |
} |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
248 |
} |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
249 |
} |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
250 |
|
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
251 |
|
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
252 |
/** |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
253 |
* Constructor |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
254 |
*/ |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
255 |
public PIView(){ |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
256 |
workspace = ResourcesPlugin.getWorkspace(); |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
257 |
workspace.addResourceChangeListener(this); |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
258 |
} |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
259 |
|
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
260 |
/* (non-Javadoc) |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
261 |
* @see org.eclipse.ui.part.WorkbenchPart#dispose() |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
262 |
*/ |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
263 |
@Override |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
264 |
public void dispose() { |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
265 |
workspace.removeResourceChangeListener(this); |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
266 |
super.dispose(); |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
267 |
} |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
268 |
|
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
269 |
/* |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
270 |
* (non-Javadoc) |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
271 |
* @see org.eclipse.ui.part.WorkbenchPart#createPartControl(org.eclipse.swt.widgets.Composite) |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
272 |
*/ |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
273 |
public void createPartControl(Composite parent) { |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
274 |
viewer = createListViewTableViewer(parent); |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
275 |
viewer.setContentProvider(new ViewContentProvider()); |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
276 |
viewer.setLabelProvider(new ViewLabelProvider()); |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
277 |
viewer.setInput(getViewSite()); |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
278 |
|
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
279 |
|
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
280 |
// Create the help context id for the viewer's control |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
281 |
PlatformUI.getWorkbench().getHelpSystem().setHelp(viewer.getControl(), HELP_CONTEXT_ID_MAIN_PAGE); |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
282 |
makeActions(); |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
283 |
hookContextMenu(); |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
284 |
hookDoubleClickAction(); |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
285 |
contributeToActionBars(); |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
286 |
} |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
287 |
|
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
288 |
/** |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
289 |
* Creates table viewer for import functions tab item. |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
290 |
* @return New <code>TableViewer</code> object instance. |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
291 |
*/ |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
292 |
private TableViewer createListViewTableViewer(Composite parent) { |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
293 |
|
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
294 |
List<S60ToolsTableColumnData> columnDataArr = new ArrayList<S60ToolsTableColumnData>(); |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
295 |
|
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
296 |
columnDataArr.add(new S60ToolsTableColumnData(Messages.getString("PIView.columnTraceFileName"), 200, COLUMN_TRACE_FILE_ID)); //$NON-NLS-1$ |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
297 |
columnDataArr.add(new S60ToolsTableColumnData(Messages.getString("PIView.columnProjectName"), 200, COLUMN_PROJECT_NAME_ID)); //$NON-NLS-1$ |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
298 |
columnDataArr.add(new S60ToolsTableColumnData(Messages.getString("PIView.columnSDKName"), 150, COLUMN_SDK_NAME_ID)); //$NON-NLS-1$ |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
299 |
columnDataArr.add(new S60ToolsTableColumnData(Messages.getString("PIView.columnImportTime"), 150, COLUMN_IMPORT_TIME_ID)); //$NON-NLS-1$ |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
300 |
columnDataArr.add(new S60ToolsTableColumnData(Messages.getString("PIView.columnFileSize"), 140, COLUMN_FILE_SIZE_ID)); //$NON-NLS-1$ |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
301 |
columnDataArr.add(new S60ToolsTableColumnData(Messages.getString("PIView.columnTime"), 140, COLUMN_TRACE_TIME_ID)); //$NON-NLS-1$ |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
302 |
|
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
303 |
S60ToolsTableColumnData[] arr |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
304 |
= (S60ToolsTableColumnData[]) columnDataArr.toArray( |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
305 |
new S60ToolsTableColumnData[0]); |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
306 |
|
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
307 |
S60ToolsTable tbl = S60ToolsTableFactory.create(parent, arr); |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
308 |
|
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
309 |
TableViewer tblViewer = new TableViewer(tbl.getTableInstance()); |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
310 |
final TableSorter sorter = new TableSorter(tblViewer.getTable(), COLUMN_IMPORT_TIME_ID); |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
311 |
tblViewer.setSorter(sorter); |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
312 |
for(int i=0; i < tbl.getColumnCount();i++){ |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
313 |
final int column = i; |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
314 |
tbl.getColumn(i).addSelectionListener(new SelectionAdapter() { |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
315 |
|
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
316 |
/* (non-Javadoc) |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
317 |
* @see org.eclipse.swt.events.SelectionAdapter#widgetSelected(org.eclipse.swt.events.SelectionEvent) |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
318 |
*/ |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
319 |
@Override |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
320 |
public void widgetSelected(SelectionEvent e) { |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
321 |
sorter.doSort(column); |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
322 |
viewer.refresh(); |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
323 |
} |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
324 |
|
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
325 |
}); |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
326 |
} |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
327 |
|
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
328 |
tbl.setHostingViewer(tblViewer); |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
329 |
|
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
330 |
return tblViewer; |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
331 |
} |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
332 |
|
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
333 |
private void hookContextMenu() { |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
334 |
MenuManager menuMgr = new MenuManager("#PopupMenu"); //$NON-NLS-1$ |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
335 |
menuMgr.setRemoveAllWhenShown(true); |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
336 |
menuMgr.addMenuListener(new IMenuListener() { |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
337 |
public void menuAboutToShow(IMenuManager manager) { |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
338 |
PIView.this.fillContextMenu(manager); |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
339 |
} |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
340 |
}); |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
341 |
Menu menu = menuMgr.createContextMenu(viewer.getControl()); |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
342 |
viewer.getControl().setMenu(menu); |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
343 |
getSite().registerContextMenu(menuMgr, viewer); |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
344 |
} |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
345 |
|
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
346 |
private void contributeToActionBars() { |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
347 |
IActionBars bars = getViewSite().getActionBars(); |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
348 |
fillLocalToolBar(bars.getToolBarManager()); |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
349 |
} |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
350 |
|
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
351 |
|
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
352 |
|
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
353 |
private void fillContextMenu(IMenuManager manager) { |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
354 |
manager.add(actionDelete); |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
355 |
} |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
356 |
|
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
357 |
private void fillLocalToolBar(IToolBarManager manager) { |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
358 |
manager.add(actionOpenWizard); |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
359 |
manager.add(new Separator(IWorkbenchActionConstants.MB_ADDITIONS)); |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
360 |
manager.add(actionOpenKeyPressWizard); |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
361 |
manager.add(new Separator(IWorkbenchActionConstants.MB_ADDITIONS)); |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
362 |
manager.add(actionDelete); |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
363 |
} |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
364 |
|
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
365 |
private void makeActions() { |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
366 |
// Open Performance Investigator wizard button |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
367 |
actionOpenWizard = new Action() { |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
368 |
public void run() { |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
369 |
ToolbarShortcutAction.openWizard(getSite().getShell()); |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
370 |
} |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
371 |
}; |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
372 |
|
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
373 |
actionOpenWizard.setText(Messages.getString("PIView.openPIButton")); //$NON-NLS-1$ |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
374 |
actionOpenWizard.setToolTipText(Messages.getString("PIView.openPIButtonDescription")); //$NON-NLS-1$ |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
375 |
actionOpenWizard.setImageDescriptor(WizardsPlugin.getImageDescriptor("icons/open_pi_wizard.png")); //$NON-NLS-1$ |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
376 |
|
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
377 |
|
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
378 |
// Open Performance Investigator Key Press Profile button |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
379 |
actionOpenKeyPressWizard = new Action() { |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
380 |
public void run() { |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
381 |
ImportBupMapWizardDialog wizDialog = new ImportBupMapWizardDialog(getSite().getShell()); |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
382 |
wizDialog.create(); |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
383 |
wizDialog.open(); |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
384 |
} |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
385 |
}; |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
386 |
|
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
387 |
actionOpenKeyPressWizard.setText(Messages.getString("PIView.openKeyPressProfilerButton")); //$NON-NLS-1$ |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
388 |
actionOpenKeyPressWizard.setToolTipText(Messages.getString("PIView.openKeyPressProfilerButtonDescription")); //$NON-NLS-1$ |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
389 |
actionOpenKeyPressWizard.setImageDescriptor(WizardsPlugin.getImageDescriptor("icons/open_key_press_profile_wizard.png")); //$NON-NLS-1$ |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
390 |
|
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
391 |
// Delete selected item button |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
392 |
actionDelete = new Action() { |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
393 |
public void run() { |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
394 |
|
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
395 |
ISelection selection = viewer.getSelection(); |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
396 |
if (selection == null || selection.isEmpty()) |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
397 |
return; |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
398 |
|
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
399 |
@SuppressWarnings("unchecked") |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
400 |
Iterator i = ((IStructuredSelection)selection).iterator(); |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
401 |
while (i.hasNext()) { |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
402 |
SessionHandler.getInstance().removeTraceFile((TraceFile)i.next()); |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
403 |
} |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
404 |
viewer.refresh(); |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
405 |
} |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
406 |
}; |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
407 |
actionDelete.setText(Messages.getString("PIView.deleteButton")); //$NON-NLS-1$ |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
408 |
actionDelete.setToolTipText(Messages.getString("PIView.deleteButtonDescription")); //$NON-NLS-1$ |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
409 |
actionDelete.setImageDescriptor(PlatformUI.getWorkbench().getSharedImages().getImageDescriptor(ISharedImages.IMG_TOOL_DELETE)); |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
410 |
|
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
411 |
} |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
412 |
|
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
413 |
private void hookDoubleClickAction() { |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
414 |
viewer.addDoubleClickListener(new IDoubleClickListener() { |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
415 |
public void doubleClick(DoubleClickEvent event) { |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
416 |
ISelection selection = event.getSelection(); |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
417 |
if(selection instanceof StructuredSelection){ |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
418 |
StructuredSelection structuredSelection = (StructuredSelection)selection; |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
419 |
openProfilerDataFile(((TraceFile)structuredSelection.getFirstElement())); |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
420 |
} |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
421 |
} |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
422 |
}); |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
423 |
} |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
424 |
|
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
425 |
/** |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
426 |
* Passing the focus request to the viewer's control. |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
427 |
*/ |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
428 |
public void setFocus() { |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
429 |
viewer.getControl().setFocus(); |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
430 |
|
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
431 |
} |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
432 |
|
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
433 |
/** |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
434 |
* Reloads Trace files to table |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
435 |
* |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
436 |
*/ |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
437 |
public void updateView() { |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
438 |
try { |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
439 |
getViewSite().getPage().showView(PIView.ID); |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
440 |
viewer.refresh(); |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
441 |
} catch (Exception e) { |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
442 |
e.printStackTrace(); |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
443 |
} |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
444 |
} |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
445 |
|
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
446 |
/** |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
447 |
* Open given profiler data file with an editor |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
448 |
* |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
449 |
* @param traceFile to be opened |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
450 |
*/ |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
451 |
private void openProfilerDataFile(final TraceFile traceFile ) { |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
452 |
IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot(); |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
453 |
IResource resource = root.findMember(traceFile.getProjectName()); |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
454 |
|
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
455 |
IProject project = null; |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
456 |
if (resource instanceof IProject) { |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
457 |
project = (IProject) resource; |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
458 |
} else { |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
459 |
return; |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
460 |
} |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
461 |
|
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
462 |
final IFile analysisFile = project.getFile(traceFile.getTraceFilePath().lastSegment()); |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
463 |
final File analysisFilePath = analysisFile.getLocation().toFile(); |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
464 |
|
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
465 |
// open the saved file |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
466 |
if (analysisFilePath != null && analysisFilePath.exists() ) { |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
467 |
// open the file itself |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
468 |
// need to open in UI context |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
469 |
Display.getDefault().asyncExec(new Runnable() { |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
470 |
public void run() { |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
471 |
try { |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
472 |
IDE.openEditor(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage() , analysisFile, true); |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
473 |
} catch (PartInitException e) { |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
474 |
e.printStackTrace(); |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
475 |
} |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
476 |
} |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
477 |
}); |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
478 |
}else{ |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
479 |
MessageDialog.openError(getSite().getShell(), Messages |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
480 |
.getString("PIView.errorFileIsRemovedDialogTitle"), MessageFormat.format(Messages //$NON-NLS-1$ |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
481 |
.getString("PIView.errorFileIsRemovedDialogMessage"), //$NON-NLS-1$ |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
482 |
traceFile.getTraceFilePath().lastSegment())); |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
483 |
SessionHandler.getInstance().removeTraceFile(traceFile); |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
484 |
viewer.refresh(); |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
485 |
} |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
486 |
} |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
487 |
|
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
488 |
/* |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
489 |
* (non-Javadoc) |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
490 |
* @see org.eclipse.core.resources.IResourceChangeListener#resourceChanged(org.eclipse.core.resources.IResourceChangeEvent) |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
491 |
*/ |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
492 |
public void resourceChanged(IResourceChangeEvent event) { |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
493 |
if(event.getDelta() instanceof IResourceDelta){ |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
494 |
IResourceDelta rootDelta = (IResourceDelta) event.getDelta(); |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
495 |
IResourceDeltaVisitor visitor = new IResourceDeltaVisitor() { |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
496 |
public boolean visit(IResourceDelta delta) { |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
497 |
IResource resource = delta.getResource(); |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
498 |
if (resource.getType() == IResource.FILE |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
499 |
&& "npi".equalsIgnoreCase(resource.getFileExtension())) { //$NON-NLS-1$ |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
500 |
if (delta.getKind() == IResourceDelta.REMOVED) { |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
501 |
final TraceFile traceFile = SessionHandler.getInstance().getTraceFile(resource.getFullPath()); |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
502 |
if(traceFile != null){ |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
503 |
IPath movedTo = delta.getMovedToPath(); |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
504 |
if(movedTo != null){ |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
505 |
TraceFile movedToFile = SessionHandler.getInstance().getTraceFile(movedTo); |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
506 |
if(movedToFile != null){ |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
507 |
SessionHandler.getInstance().removeTraceFile(movedToFile); |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
508 |
} |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
509 |
SessionHandler.getInstance().removeTraceFile(traceFile); |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
510 |
traceFile.setTraceFilePath(movedTo); |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
511 |
String projectName = movedTo.segment(0); |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
512 |
traceFile.setProjectName(projectName); |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
513 |
SessionHandler.getInstance().addTraceFile(traceFile); |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
514 |
Display.getDefault().asyncExec(new Runnable() { |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
515 |
public void run() { |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
516 |
viewer.refresh(); |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
517 |
} |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
518 |
}); |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
519 |
}else{ |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
520 |
Display.getDefault().asyncExec(new Runnable() { |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
521 |
public void run() { |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
522 |
SessionHandler.getInstance().removeTraceFile(traceFile); |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
523 |
viewer.refresh(); |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
524 |
} |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
525 |
}); |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
526 |
} |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
527 |
} |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
528 |
} |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
529 |
} |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
530 |
return true; |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
531 |
} |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
532 |
|
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
533 |
}; |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
534 |
try { |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
535 |
rootDelta.accept(visitor); |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
536 |
} catch (CoreException e) { |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
537 |
e.printStackTrace(); |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
538 |
} |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
539 |
} |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
540 |
|
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
541 |
} |
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
542 |
|
ae255c9aa552
Performance Investigator Carbide extension 2.4.0
Toni Pulkkinen <ext-toni.p.pulkkinen@nokia.com>
parents:
diff
changeset
|
543 |
} |