sysperfana/analyzetoolext/com.nokia.s60tools.analyzetool/src/com/nokia/s60tools/analyzetool/global/Util.java
changeset 15 0367d2db2c06
parent 6 f65f740e69f9
equal deleted inserted replaced
14:bb339882c6e9 15:0367d2db2c06
    26 import java.net.URL;
    26 import java.net.URL;
    27 import java.nio.channels.FileChannel;
    27 import java.nio.channels.FileChannel;
    28 import java.util.AbstractList;
    28 import java.util.AbstractList;
    29 import java.util.ArrayList;
    29 import java.util.ArrayList;
    30 import java.util.Iterator;
    30 import java.util.Iterator;
       
    31 import java.util.List;
    31 
    32 
    32 import org.eclipse.cdt.core.model.ICModelMarker;
    33 import org.eclipse.cdt.core.model.ICModelMarker;
    33 import org.eclipse.core.resources.IMarker;
    34 import org.eclipse.core.resources.IMarker;
    34 import org.eclipse.core.resources.IProject;
    35 import org.eclipse.core.resources.IProject;
    35 import org.eclipse.core.resources.IResource;
    36 import org.eclipse.core.resources.IResource;
    42 import org.eclipse.core.runtime.IStatus;
    43 import org.eclipse.core.runtime.IStatus;
    43 import org.eclipse.core.runtime.Path;
    44 import org.eclipse.core.runtime.Path;
    44 import org.eclipse.core.runtime.Platform;
    45 import org.eclipse.core.runtime.Platform;
    45 import org.eclipse.core.runtime.Status;
    46 import org.eclipse.core.runtime.Status;
    46 import org.eclipse.core.runtime.jobs.Job;
    47 import org.eclipse.core.runtime.jobs.Job;
       
    48 import org.eclipse.jface.dialogs.Dialog;
    47 import org.eclipse.jface.dialogs.MessageDialog;
    49 import org.eclipse.jface.dialogs.MessageDialog;
    48 import org.eclipse.jface.preference.IPreferenceStore;
    50 import org.eclipse.jface.preference.IPreferenceStore;
       
    51 import org.eclipse.jface.resource.JFaceResources;
    49 import org.eclipse.jface.viewers.ArrayContentProvider;
    52 import org.eclipse.jface.viewers.ArrayContentProvider;
    50 import org.eclipse.jface.viewers.LabelProvider;
    53 import org.eclipse.jface.viewers.LabelProvider;
    51 import org.eclipse.swt.SWT;
    54 import org.eclipse.swt.SWT;
       
    55 import org.eclipse.swt.events.DisposeEvent;
       
    56 import org.eclipse.swt.events.DisposeListener;
       
    57 import org.eclipse.swt.events.SelectionAdapter;
       
    58 import org.eclipse.swt.events.SelectionEvent;
       
    59 import org.eclipse.swt.graphics.Cursor;
       
    60 import org.eclipse.swt.layout.GridData;
       
    61 import org.eclipse.swt.layout.GridLayout;
       
    62 import org.eclipse.swt.widgets.Composite;
    52 import org.eclipse.swt.widgets.FileDialog;
    63 import org.eclipse.swt.widgets.FileDialog;
    53 import org.eclipse.swt.widgets.Shell;
    64 import org.eclipse.swt.widgets.Shell;
       
    65 import org.eclipse.swt.widgets.ToolBar;
       
    66 import org.eclipse.swt.widgets.ToolItem;
    54 import org.eclipse.ui.IWorkbenchPage;
    67 import org.eclipse.ui.IWorkbenchPage;
    55 import org.eclipse.ui.IWorkbenchPart;
    68 import org.eclipse.ui.IWorkbenchPart;
    56 import org.eclipse.ui.PlatformUI;
    69 import org.eclipse.ui.PlatformUI;
    57 import org.eclipse.ui.dialogs.ListDialog;
    70 import org.eclipse.ui.dialogs.ListDialog;
    58 import org.osgi.framework.Bundle;
    71 import org.osgi.framework.Bundle;
    68 import com.nokia.carbide.cpp.epoc.engine.MMPDataRunnableAdapter;
    81 import com.nokia.carbide.cpp.epoc.engine.MMPDataRunnableAdapter;
    69 import com.nokia.carbide.cpp.epoc.engine.model.mmp.EMMPStatement;
    82 import com.nokia.carbide.cpp.epoc.engine.model.mmp.EMMPStatement;
    70 import com.nokia.carbide.cpp.epoc.engine.model.mmp.IMMPData;
    83 import com.nokia.carbide.cpp.epoc.engine.model.mmp.IMMPData;
    71 import com.nokia.carbide.cpp.epoc.engine.preprocessor.AcceptedNodesViewFilter;
    84 import com.nokia.carbide.cpp.epoc.engine.preprocessor.AcceptedNodesViewFilter;
    72 import com.nokia.s60tools.analyzetool.Activator;
    85 import com.nokia.s60tools.analyzetool.Activator;
       
    86 import com.nokia.s60tools.analyzetool.AnalyzeToolHelpContextIDs;
    73 import com.nokia.s60tools.analyzetool.builder.AnalyzeToolBuilder;
    87 import com.nokia.s60tools.analyzetool.builder.AnalyzeToolBuilder;
    74 import com.nokia.s60tools.analyzetool.engine.MMPInfo;
    88 import com.nokia.s60tools.analyzetool.engine.MMPInfo;
    75 import com.nokia.s60tools.analyzetool.engine.UseAtool;
    89 import com.nokia.s60tools.analyzetool.engine.UseAtool;
    76 import com.nokia.s60tools.analyzetool.global.Constants.COMMAND_LINE_ERROR_CODE;
    90 import com.nokia.s60tools.analyzetool.global.Constants.COMMAND_LINE_ERROR_CODE;
       
    91 import com.nokia.s60tools.analyzetool.ui.CustomMessageDialog;
       
    92 import com.nokia.s60tools.analyzetool.ui.OutputModeDialog;
    77 
    93 
    78 /**
    94 /**
    79  * Provides commonly used functions.
    95  * Provides commonly used functions.
    80  * 
    96  * 
    81  * @author kihe
    97  * @author kihe
    89 	/** Contains user selection (integer) in the selection dialog. */
   105 	/** Contains user selection (integer) in the selection dialog. */
    90 	private static int retValue;
   106 	private static int retValue;
    91 
   107 
    92 	/** Contains user selection (String) in the selection dialog. */
   108 	/** Contains user selection (String) in the selection dialog. */
    93 	private static String userSelection = "";
   109 	private static String userSelection = "";
       
   110 
       
   111 	private static String[] outputMode = new String[3];
    94 
   112 
    95 	/** Contains StringBuffer size. */
   113 	/** Contains StringBuffer size. */
    96 	private static int bufferSize = 32;
   114 	private static int bufferSize = 32;
    97 
   115 
    98 	// make constructor private so class doesn't get instantiated
   116 	// make constructor private so class doesn't get instantiated
   139 		}
   157 		}
   140 		return false;
   158 		return false;
   141 	}
   159 	}
   142 
   160 
   143 	/**
   161 	/**
   144 	 * Checks is AnalyzeTool libraries installed from the current SDK.
   162 	 * Checks AnalyzeTool libraries from the current SDK.
   145 	 * 
   163 	 * 
   146 	 * @param cpi
   164 	 * @param cpi
   147 	 *            {@link ICarbideProjectInfo} reference
   165 	 *            {@link ICarbideProjectInfo} reference
   148 	 * @return True if libraries are installed otherwise false.
   166 	 * @return error message or Constants.ATOOL_LIBS_OK if libraries are OK
   149 	 */
   167 	 */
   150 	public static boolean checkAtoolLibs(final ICarbideProjectInfo cpi) {
   168 	public static String checkAtoolLibs(final ICarbideProjectInfo cpi) {
   151 		// get active platform
   169 		// get active platform
   152 		String platform = cpi.getDefaultConfiguration().getPlatformString();
   170 		String platform = cpi.getDefaultConfiguration().getPlatformString();
   153 
   171 
   154 		// get epoc root
   172 		// get epoc root
   155 		IPath epocRootPath = EpocEngineHelper.getEpocRootForProject(cpi
   173 		IPath epocRootPath = EpocEngineHelper.getEpocRootForProject(cpi
   156 				.getProject());
   174 				.getProject());
   157 
   175 
   158 		// check that epocroot path found
   176 		// check that epoc root path was found
   159 		if (epocRootPath == null) {
   177 		if (epocRootPath == null) {
   160 			return false;
   178 			return "EPOCROOT directory of the SDK for the active build configuration of the project not found.";
   161 		}
   179 		}
   162 
   180 
   163 		String epocroot = epocRootPath.toOSString();
   181 		String epocroot = epocRootPath.toOSString();
   164 		boolean found = true;
   182 
   165 		StringBuffer fileBuffer = new StringBuffer(bufferSize);
   183 		List<String> missingAtoolLibsList = new ArrayList<String>();
   166 		fileBuffer.append(Constants.CAN_NOT_FIND_LIBRARIES_MARKER);
   184 
   167 		fileBuffer.append(": ");
       
   168 		if ((Constants.BUILD_TARGET_WINSCW).equalsIgnoreCase(platform)) {
   185 		if ((Constants.BUILD_TARGET_WINSCW).equalsIgnoreCase(platform)) {
   169 			for (int i = 0; i < Constants.atoolLibsSbs2.length; i++) {
   186 			for (int i = 0; i < Constants.atoolLibsWinscw.length; i++) {
   170 				java.io.File file = new java.io.File(epocroot
   187 				File file = new File(epocroot + Constants.atoolLibsWinscw[i]);
   171 						+ Constants.atoolLibsWinscw[i]);
       
   172 				if (!file.exists()) {
   188 				if (!file.exists()) {
   173 					found = false;
   189 					missingAtoolLibsList.add(epocroot
   174 					fileBuffer.append(epocroot);
   190 							+ Constants.atoolLibsWinscw[i]);
   175 					fileBuffer.append(Constants.atoolLibsWinscw[i]);
       
   176 					fileBuffer.append(' ');
       
   177 				}
   191 				}
   178 			}
   192 			}
   179 		} else if ((Constants.BUILD_TARGET_ARMV5).equalsIgnoreCase(platform)) {
   193 		} else if ((Constants.BUILD_TARGET_ARMV5).equalsIgnoreCase(platform)) {
   180 			if (AnalyzeToolBuilder.isSBSBuildActivated(cpi)) {
   194 			if (AnalyzeToolBuilder.isSBSBuildActivated(cpi)) {
   181 				for (int i = 0; i < Constants.atoolLibsSbs2.length; i++) {
   195 				for (int i = 0; i < Constants.atoolLibsSbs2.length; i++) {
   182 					java.io.File file = new java.io.File(epocroot
   196 					File file = new File(epocroot + Constants.atoolLibsSbs2[i]);
   183 							+ Constants.atoolLibsSbs2[i]);
       
   184 					if (!file.exists()) {
   197 					if (!file.exists()) {
   185 						found = false;
   198 						missingAtoolLibsList.add(epocroot
   186 						fileBuffer.append(epocroot);
   199 								+ Constants.atoolLibsSbs2[i]);
   187 						fileBuffer.append(Constants.atoolLibsSbs2[i]);
       
   188 						fileBuffer.append(' ');
       
   189 					}
   200 					}
   190 				}
   201 				}
   191 			} else {
   202 			} else {
   192 				for (int i = 0; i < Constants.atoolLibs.length; i++) {
   203 				for (int i = 0; i < Constants.atoolLibs.length; i++) {
   193 					java.io.File file = new java.io.File(epocroot
   204 					File file = new File(epocroot + Constants.atoolLibs[i]);
   194 							+ Constants.atoolLibs[i]);
       
   195 					if (!file.exists()) {
   205 					if (!file.exists()) {
   196 						found = false;
   206 						missingAtoolLibsList.add(epocroot
   197 						fileBuffer.append(epocroot);
   207 								+ Constants.atoolLibs[i]);
   198 						fileBuffer.append(Constants.atoolLibs[i]);
       
   199 						fileBuffer.append(' ');
       
   200 					}
   208 					}
   201 				}
   209 				}
   202 			}
   210 			}
   203 		}
   211 		}
   204 		if (!found) {
   212 
   205 			createErrorMarker(cpi.getProject(), fileBuffer.toString());
   213 		if (missingAtoolLibsList.size() > 0) {
   206 		}
   214 			StringBuffer fileBuffer = new StringBuffer(bufferSize);
   207 
   215 
   208 		return found;
   216 			fileBuffer.append(Constants.CAN_NOT_FIND_LIBRARIES_MARKER);
       
   217 			fileBuffer.append("\n\n");
       
   218 
       
   219 			for (String string : missingAtoolLibsList) {
       
   220 				fileBuffer.append(string);
       
   221 				fileBuffer.append("\n");
       
   222 			}
       
   223 
       
   224 			fileBuffer.append("\n");
       
   225 			fileBuffer.append(Constants.CAN_NOT_FIND_LIBRARIES_SUPPORT);
       
   226 
       
   227 			return fileBuffer.toString();
       
   228 		}
       
   229 
       
   230 		return Constants.ATOOL_LIBS_OK;
   209 	}
   231 	}
   210 
   232 
   211 	/**
   233 	/**
   212 	 * Copies stored memory leak analysis file to given folder.
   234 	 * Copies stored memory leak analysis file to given folder.
   213 	 * 
   235 	 * 
   370 			final Shell shell) {
   392 			final Shell shell) {
   371 		FileDialog fileDialog = new FileDialog(shell, SWT.SAVE);
   393 		FileDialog fileDialog = new FileDialog(shell, SWT.SAVE);
   372 		fileDialog.setText(title);
   394 		fileDialog.setText(title);
   373 		fileDialog.setFilterExtensions(ext);
   395 		fileDialog.setFilterExtensions(ext);
   374 		return fileDialog.open();
   396 		return fileDialog.open();
   375 
       
   376 	}
   397 	}
   377 
   398 
   378 	/**
   399 	/**
   379 	 * Gets atool.exe installation folder which is specified on preferences
   400 	 * Gets atool.exe installation folder which is specified on preferences
   380 	 * page.
   401 	 * page.
   396 			atoolInstallFolder.append(getDefaultAtoolLocation());
   417 			atoolInstallFolder.append(getDefaultAtoolLocation());
   397 		} else if (("").equals(folder)) {
   418 		} else if (("").equals(folder)) {
   398 			store.setValue(Constants.USE_INTERNAL, true);
   419 			store.setValue(Constants.USE_INTERNAL, true);
   399 			atoolInstallFolder.append(getDefaultAtoolLocation());
   420 			atoolInstallFolder.append(getDefaultAtoolLocation());
   400 		} else if (folder.equals(Constants.DEFAULT_ATOOL_FOLDER)) {
   421 		} else if (folder.equals(Constants.DEFAULT_ATOOL_FOLDER)) {
   401 			java.io.File file = new java.io.File(Constants.DEFAULT_ATOOL_FOLDER);
   422 			File file = new File(Constants.DEFAULT_ATOOL_FOLDER);
   402 			if (file.exists()) {
   423 			if (file.exists()) {
   403 				atoolInstallFolder.append(Constants.DEFAULT_ATOOL_FOLDER);
   424 				atoolInstallFolder.append(Constants.DEFAULT_ATOOL_FOLDER);
   404 			} else {
   425 			} else {
   405 				store.setValue(Constants.USE_INTERNAL, true);
   426 				store.setValue(Constants.USE_INTERNAL, true);
   406 				atoolInstallFolder.append(getDefaultAtoolLocation());
   427 				atoolInstallFolder.append(getDefaultAtoolLocation());
   656 		}
   677 		}
   657 
   678 
   658 		return infDir + "\\atool_temp\\";
   679 		return infDir + "\\atool_temp\\";
   659 	}
   680 	}
   660 
   681 
       
   682 	public static ToolBar createHelpControl(Composite parent) {
       
   683 		ToolBar toolBar = new ToolBar(parent, SWT.FLAT | SWT.NO_FOCUS);
       
   684 		((GridLayout) parent.getLayout()).numColumns++;
       
   685 		toolBar.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_CENTER));
       
   686 		final Cursor cursor = new Cursor(parent.getDisplay(), SWT.CURSOR_HAND);
       
   687 		toolBar.setCursor(cursor);
       
   688 		toolBar.addDisposeListener(new DisposeListener() {
       
   689 			public void widgetDisposed(DisposeEvent e) {
       
   690 				cursor.dispose();
       
   691 			}
       
   692 		});
       
   693 		ToolItem item = new ToolItem(toolBar, SWT.NONE);
       
   694 		item.setImage(JFaceResources.getImage(Dialog.DLG_IMG_HELP));
       
   695 		item.setToolTipText(JFaceResources.getString("helpToolTip")); //$NON-NLS-1$
       
   696 		item.addSelectionListener(new SelectionAdapter() {
       
   697 			public void widgetSelected(SelectionEvent e) {
       
   698 				PlatformUI.getWorkbench().getHelpSystem().displayHelp(
       
   699 						AnalyzeToolHelpContextIDs.ANALYZE_TROUBLESHOOTING);
       
   700 			}
       
   701 		});
       
   702 		return toolBar;
       
   703 	}
       
   704 
   661 	/**
   705 	/**
   662 	 * Gets cpp file name and path.
   706 	 * Gets cpp file name and path.
   663 	 * 
   707 	 * 
   664 	 * @param resource
   708 	 * @param resource
   665 	 *            One resource file
   709 	 *            One resource file
   761 			// if folder does not exists
   805 			// if folder does not exists
   762 			if (atoolPath.toFile().exists()) {
   806 			if (atoolPath.toFile().exists()) {
   763 				return true;
   807 				return true;
   764 			}
   808 			}
   765 		}
   809 		}
   766 
       
   767 		return false;
   810 		return false;
   768 	}
   811 	}
   769 
   812 
   770 	/**
   813 	/**
   771 	 * Checks is data file available.
   814 	 * Checks is data file available.
   806 			if (fileNameAndExt.contains(".xml")) {
   849 			if (fileNameAndExt.contains(".xml")) {
   807 				return true;
   850 				return true;
   808 			}
   851 			}
   809 		}
   852 		}
   810 		return false;
   853 		return false;
   811 
       
   812 	}
   854 	}
   813 
   855 
   814 	/**
   856 	/**
   815 	 * Check if current module is built.
   857 	 * Check if current module is built.
   816 	 * 
   858 	 * 
  1085 					}
  1127 					}
  1086 				});
  1128 				});
  1087 		return userSelection;
  1129 		return userSelection;
  1088 	}
  1130 	}
  1089 
  1131 
       
  1132 	public static String[] openOutputModeDialog() {
       
  1133 		Activator.getDefault().getWorkbench().getDisplay().syncExec(
       
  1134 				new Runnable() {
       
  1135 					public void run() {
       
  1136 						OutputModeDialog outputModeDialog = new OutputModeDialog(
       
  1137 								new Shell());
       
  1138 						outputModeDialog.open();
       
  1139 						if (outputModeDialog.getReturnCode() == Dialog.OK) {
       
  1140 							outputMode[0] = outputModeDialog.getOutputMode();
       
  1141 							if (outputModeDialog.getOutputMode().equals(
       
  1142 									Constants.LOGGING_S60)) {
       
  1143 								outputMode[1] = outputModeDialog.getLogPath();
       
  1144 								outputMode[2] = outputModeDialog.getFileName();
       
  1145 							}
       
  1146 						} else {
       
  1147 							outputMode = null;
       
  1148 						}
       
  1149 					}
       
  1150 				});
       
  1151 
       
  1152 		return outputMode;
       
  1153 	}
       
  1154 
  1090 	/**
  1155 	/**
  1091 	 * Displays error message.
  1156 	 * Displays error message.
  1092 	 * 
  1157 	 * 
  1093 	 * @param message
  1158 	 * @param message
  1094 	 *            Error note content
  1159 	 *            Error note content
  1100 				MessageDialog.openError(PlatformUI.getWorkbench()
  1165 				MessageDialog.openError(PlatformUI.getWorkbench()
  1101 						.getActiveWorkbenchWindow().getShell(),
  1166 						.getActiveWorkbenchWindow().getShell(),
  1102 						Constants.DIALOG_TITLE, message);
  1167 						Constants.DIALOG_TITLE, message);
  1103 			}
  1168 			}
  1104 		});
  1169 		});
  1105 
  1170 	}
       
  1171 
       
  1172 	/**
       
  1173 	 * Displays error message with title.
       
  1174 	 * 
       
  1175 	 * @param title
       
  1176 	 *            dialog title
       
  1177 	 * @param message
       
  1178 	 *            error message
       
  1179 	 * @param icon
       
  1180 	 *            message icon
       
  1181 	 */
       
  1182 	public static void showMessageDialog(final String title,
       
  1183 			final String message, final int icon) {
       
  1184 
       
  1185 		PlatformUI.getWorkbench().getDisplay().asyncExec(new Runnable() {
       
  1186 			public void run() {
       
  1187 				new CustomMessageDialog(PlatformUI.getWorkbench()
       
  1188 						.getActiveWorkbenchWindow().getShell(), title, message,
       
  1189 						icon).open();
       
  1190 			}
       
  1191 		});
  1106 	}
  1192 	}
  1107 
  1193 
  1108 	/**
  1194 	/**
  1109 	 * Displays information note.
  1195 	 * Displays information note.
  1110 	 * 
  1196 	 * 
  1120 				MessageDialog.openInformation(Activator.getDefault()
  1206 				MessageDialog.openInformation(Activator.getDefault()
  1121 						.getWorkbench().getDisplay().getActiveShell(),
  1207 						.getWorkbench().getDisplay().getActiveShell(),
  1122 						Constants.DIALOG_TITLE, message);
  1208 						Constants.DIALOG_TITLE, message);
  1123 			}
  1209 			}
  1124 		});
  1210 		});
  1125 
       
  1126 	}
  1211 	}
  1127 
  1212 
  1128 	/**
  1213 	/**
  1129 	 * Check is atool.exe verbose output checked.
  1214 	 * Check is atool.exe verbose output checked.
  1130 	 * 
  1215 	 * 
  1244 				} else if (firstNumber > secondNumber) {
  1329 				} else if (firstNumber > secondNumber) {
  1245 					return Constants.VERSION_NUMBERS_FIRST;
  1330 					return Constants.VERSION_NUMBERS_FIRST;
  1246 				} else {
  1331 				} else {
  1247 					return Constants.VERSION_NUMBERS_SECOND;
  1332 					return Constants.VERSION_NUMBERS_SECOND;
  1248 				}
  1333 				}
  1249 
  1334 			
  1250 			} catch (NumberFormatException nfe) {
  1335 			} catch (NumberFormatException nfe) {
  1251 				nfe.printStackTrace();
  1336 				nfe.printStackTrace();
  1252 				return Constants.VERSION_NUMBERS_INVALID;
  1337 				return Constants.VERSION_NUMBERS_INVALID;
  1253 			}
  1338 			}
  1254 		}
  1339 		}
  1340 					.showErrorMessage("Can not analyze. \n\nSelected data file does not contain AnalyzeTool data.");
  1425 					.showErrorMessage("Can not analyze. \n\nSelected data file does not contain AnalyzeTool data.");
  1341 			Activator.getDefault().logInfo(IStatus.ERROR, IStatus.ERROR,
  1426 			Activator.getDefault().logInfo(IStatus.ERROR, IStatus.ERROR,
  1342 					"AnalyzeTool - Invalid data file.");
  1427 					"AnalyzeTool - Invalid data file.");
  1343 			break;
  1428 			break;
  1344 
  1429 
       
  1430 		case DATA_FILE_OLD_FORMAT:
       
  1431 			Util.showMessageDialog(Constants.UNSUPPORTED_FORMAT_TITLE,
       
  1432 					Constants.UNSUPPORTED_FORMAT_MESSAGE, SWT.ICON_ERROR);
       
  1433 			Activator.getDefault().logInfo(IStatus.ERROR, IStatus.ERROR,
       
  1434 					"AnalyzeTool - Unsupported format.");
       
  1435 			break;
       
  1436 
       
  1437 		case DATA_FILE_UNSUPPORTED_TRACE_FORMAT:
       
  1438 			Util.showMessageDialog(Constants.UNSUPPORTED_FORMAT_TITLE,
       
  1439 					Constants.TRACE_FORMAT_VERSION_IS_HIGHER, SWT.ICON_ERROR);
       
  1440 			Activator.getDefault().logInfo(IStatus.ERROR, IStatus.ERROR,
       
  1441 					"AnalyzeTool - Unsupported trace format.");
       
  1442 			break;
       
  1443 
  1345 		case RELEASABLES_ERROR:
  1444 		case RELEASABLES_ERROR:
  1346 			Util
  1445 			Util
  1347 					.showErrorMessage("AnalyzeTool can not copy needed files, therefore callstack can not be displayed when analyzing data."
  1446 					.showErrorMessage("AnalyzeTool can not copy needed files, therefore callstack can not be displayed when analyzing data."
  1348 							+ "\n\nTry to clean AnalyzeTool made changes and build project again.");
  1447 							+ "\n\nTry to clean AnalyzeTool made changes and build project again.");
  1349 			Activator.getDefault().logInfo(IStatus.ERROR, IStatus.ERROR,
  1448 			Activator.getDefault().logInfo(IStatus.ERROR, IStatus.ERROR,
  1400 			Util
  1499 			Util
  1401 					.showErrorMessage("Unable to execute action for current project.");
  1500 					.showErrorMessage("Unable to execute action for current project.");
  1402 			Activator.getDefault().logInfo(IStatus.ERROR, IStatus.ERROR,
  1501 			Activator.getDefault().logInfo(IStatus.ERROR, IStatus.ERROR,
  1403 					"AnalyzeTool - unknown error.");
  1502 					"AnalyzeTool - unknown error.");
  1404 			break;
  1503 			break;
  1405 
       
  1406 		}
  1504 		}
  1407 	}
  1505 	}
  1408 
  1506 
  1409 	/**
  1507 	/**
  1410 	 * Finds correct Enum value for integer value.
  1508 	 * Finds correct Enum value for integer value.