sysperfana/analyzetoolext/com.nokia.s60tools.analyzetool/src/com/nokia/s60tools/analyzetool/ui/actions/ViewMemoryLeakFromFile.java
equal
deleted
inserted
replaced
29 import com.nokia.s60tools.analyzetool.global.Constants; |
29 import com.nokia.s60tools.analyzetool.global.Constants; |
30 import com.nokia.s60tools.analyzetool.ui.IActionListener; |
30 import com.nokia.s60tools.analyzetool.ui.IActionListener; |
31 |
31 |
32 /** |
32 /** |
33 * Entry point for displaying memory analysis results from file. |
33 * Entry point for displaying memory analysis results from file. |
34 * |
34 * |
35 * @author kihe |
35 * @author kihe |
36 * |
36 * |
37 */ |
37 */ |
38 public class ViewMemoryLeakFromFile implements IObjectActionDelegate { |
38 public class ViewMemoryLeakFromFile implements IObjectActionDelegate { |
39 |
39 |
40 /** project reference.*/ |
40 /** project reference. */ |
41 public IProject project; |
41 public IProject project; |
42 |
42 |
43 /** |
43 /** |
44 * Constructor. |
44 * Constructor. |
45 */ |
45 */ |
47 super(); |
47 super(); |
48 } |
48 } |
49 |
49 |
50 /** |
50 /** |
51 * Performs this action. |
51 * Performs this action. |
52 * |
52 * |
53 * @param action User selected action |
53 * @param action |
|
54 * User selected action |
54 */ |
55 */ |
55 public void run(IAction action) { |
56 public void run(IAction action) { |
56 |
57 |
57 // open AnalyzeTool window |
58 // open AnalyzeTool window |
58 try { |
59 try { |
72 } |
73 } |
73 |
74 |
74 /** |
75 /** |
75 * Notifies this action delegate that the selection in the workbench has |
76 * Notifies this action delegate that the selection in the workbench has |
76 * changed. |
77 * changed. |
77 * |
78 * |
78 * @param action User selected action |
79 * @param action |
79 * |
80 * User selected action |
80 * @param selection User selection |
81 * |
|
82 * @param selection |
|
83 * User selection |
81 */ |
84 */ |
82 public void selectionChanged(IAction action, ISelection selection) { |
85 public void selectionChanged(IAction action, ISelection selection) { |
83 try { |
86 try { |
84 project = (IProject) ((IStructuredSelection) selection) |
87 project = (IProject) ((IStructuredSelection) selection) |
85 .getFirstElement(); |
88 .getFirstElement(); |
89 } |
92 } |
90 } |
93 } |
91 |
94 |
92 /** |
95 /** |
93 * Sets the active part for the delegate. |
96 * Sets the active part for the delegate. |
94 * |
97 * |
95 * @see IObjectActionDelegate#setActivePart(IAction, IWorkbenchPart) |
98 * @see IObjectActionDelegate#setActivePart(IAction, IWorkbenchPart) |
96 * |
99 * |
97 * @param action User selected action |
100 * @param action |
98 * |
101 * User selected action |
99 * @param targetPart Workbench part |
102 * |
|
103 * @param targetPart |
|
104 * Workbench part |
100 */ |
105 */ |
101 public void setActivePart(IAction action, IWorkbenchPart targetPart) { |
106 public void setActivePart(IAction action, IWorkbenchPart targetPart) { |
102 // MethodDeclaration/Block[count(BlockStatement) = 0 and |
107 // MethodDeclaration/Block[count(BlockStatement) = 0 and |
103 // @containsComment = 'false'] |
108 // @containsComment = 'false'] |
104 } |
109 } |
105 |
|
106 } |
110 } |