sysperfana/analyzetoolext/com.nokia.s60tools.analyzetool/src/com/nokia/s60tools/analyzetool/global/Constants.java
changeset 6 f65f740e69f9
parent 1 1050670c6980
child 15 0367d2db2c06
equal deleted inserted replaced
5:844b047e260d 6:f65f740e69f9
     1 /*
     1 /*
     2  * Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
     2  * Copyright (c) 2008-2010 Nokia Corporation and/or its subsidiary(-ies).
     3  * All rights reserved.
     3  * All rights reserved.
     4  * This component and the accompanying materials are made available
     4  * This component and the accompanying materials are made available
     5  * under the terms of "Eclipse Public License v1.0"
     5  * under the terms of "Eclipse Public License v1.0"
     6  * which accompanies this distribution, and is available
     6  * which accompanies this distribution, and is available
     7  * at the URL "http://www.eclipse.org/legal/epl-v10.html".
     7  * at the URL "http://www.eclipse.org/legal/epl-v10.html".
    26 public class Constants {
    26 public class Constants {
    27 
    27 
    28 	public static enum ACTIONS {
    28 	public static enum ACTIONS {
    29 		RUN_VIEW_MEM_LEAKS, RUN_BUILD, RUN_CLEAN
    29 		RUN_VIEW_MEM_LEAKS, RUN_BUILD, RUN_CLEAN
    30 	}
    30 	}
    31 	
       
    32 	public static enum Operation {
    31 	public static enum Operation {
    33 		PROCESS_START, PROCESS_END, ALLOC, FREE, ALLOCH, FREEH, ALLOCF, FREEF, DLL_LOAD, DLL_UNLOAD, NOVALUE;
    32 		PROCESS_START, 
       
    33 		PROCESS_END, ALLOC, FREE, ALLOCH, FREEH, ALLOCF, FREEF, DLL_LOAD, DLL_UNLOAD, NOVALUE;
    34 
    34 
    35 		public static Operation toOperation(String str) {
    35 		public static Operation toOperation(String str) {
    36 			try {
    36 			try {
    37 				return valueOf(str);
    37 				return valueOf(str);
    38 			} catch (Exception ex) {
    38 			} catch (Exception ex) {
    45 	public final static String ANALYZE_TOOL_TITLE = "AnalyzeTool";
    45 	public final static String ANALYZE_TOOL_TITLE = "AnalyzeTool";
    46 	public final static String ANALYZE_TOOL_TITLE_WITH_VERSION = "AnalyzeTool v%s";
    46 	public final static String ANALYZE_TOOL_TITLE_WITH_VERSION = "AnalyzeTool v%s";
    47 	public final static String MAIN_TAB_TITLE = "Results";
    47 	public final static String MAIN_TAB_TITLE = "Results";
    48 	public final static String ANALYZE_TOOL_VIEW_ID = "com.nokia.s60tools.analyzetool.ui.MainView";
    48 	public final static String ANALYZE_TOOL_VIEW_ID = "com.nokia.s60tools.analyzetool.ui.MainView";
    49 	public final static String ANALYZE_TOOL_PREFS_ID = "com.nokia.s60tools.analyzetool.preferences.AnalyzeToolPreferencePage";
    49 	public final static String ANALYZE_TOOL_PREFS_ID = "com.nokia.s60tools.analyzetool.preferences.AnalyzeToolPreferencePage";
       
    50 	public final static String DBGHELPDLL_IS_UP_TO_DATE = "dbghelp.dll is up to date";
    50 	/**
    51 	/**
    51 	 * Progress monitor text displayed when AnalyzeTool processing some action
    52 	 * Progress monitor text displayed when AnalyzeTool processing some action
    52 	 * long time
    53 	 * long time
    53 	 */
    54 	 */
    54 	public final static String PROGRESSDIALOG_TITLE = "Processing analysis data";
    55 	public final static String PROGRESSDIALOG_TITLE = "Processing analysis data";
   168 	public static final String INFO_TRACE_FROM_EMULATOR = "emulator";
   169 	public static final String INFO_TRACE_FROM_EMULATOR = "emulator";
   169 	public static final String INFO_TRACE_FROM_DEVICE = "device";
   170 	public static final String INFO_TRACE_FROM_DEVICE = "device";
   170 	public static final String INFO_ALLOCATED_MEM = "Number of memory allocations: ";
   171 	public static final String INFO_ALLOCATED_MEM = "Number of memory allocations: ";
   171 	public static final String NO_OPENED_FILES = "No recently opened files.";
   172 	public static final String NO_OPENED_FILES = "No recently opened files.";
   172 	public static final String STARTING_TRACE = "Starting trace capture";
   173 	public static final String STARTING_TRACE = "Starting trace capture";
   173 	/** Tracing utility error information */
   174 	/** TraceViewer error information */
   174 	public static final String TRACE_ALLREADY_CONNECTED = "Tracing utility connection reserved for another plug-in.";
   175 	public static final String TRACE_ALLREADY_CONNECTED = "TraceViewer connection reserved for another plug-in.";
   175 	public static final String TRACE_GENERAL_ERROR = "General Tracing utility error.";
   176 	public static final String TRACE_GENERAL_ERROR = "General TraceViewer error.";
   176 	public static final String TRACE_CON_SET_ERROR = "Invalid Tracing utility connection settings.";
   177 	public static final String TRACE_CON_SET_ERROR = "Invalid TraceViewer connection settings.";
   177 	public static final String TRACE_CANT_FIND_DATAPR = "Cannot find dataprocessor. \nPlease contact the support team.";
   178 	public static final String TRACE_CANT_FIND_DATAPR = "Cannot find dataprocessor. \nPlease contact the support team.";
   178 	public static final String TRACE_ERROR_NONE = "";
   179 	public static final String TRACE_ERROR_NONE = "";
   179 	public static final String TRACE_DISC_ERROR = "Error while disconnecting Tracing utility.";
   180 	public static final String TRACE_DISC_ERROR = "Error while disconnecting TraceViewer.";
   180 	public static final String TRACE_NOT_FOUND = "Could not load Tracing utility plugin.";
   181 	public static final String TRACE_NOT_FOUND = "Could not load TraceViewer plugin.";
   181 
   182 
   182 	/** Main view tree model related constants */
   183 	/** Main view tree model related constants */
   183 	public static final String HANDLE_LEAK_MODULES_TITLE = "Modules with handle leaks";
   184 	public static final String HANDLE_LEAK_MODULES_TITLE = "Modules with handle leaks";
   184 	public static final String MEMORY_LEAK_MODULES_TITLE = "Modules with memory leaks";
   185 	public static final String MEMORY_LEAK_MODULES_TITLE = "Modules with memory leaks";
   185 	public static final String TEST_RUNS_TREE_TITLE = "Test runs";
   186 	public static final String TEST_RUNS_TREE_TITLE = "Test runs";
   275 	public static final String PREFS_FORTY_BUTTON = "40 items";
   276 	public static final String PREFS_FORTY_BUTTON = "40 items";
   276 	public static final String PREFS_HUNDRED_BUTTON = "100 items (Slows down test run a lot)";
   277 	public static final String PREFS_HUNDRED_BUTTON = "100 items (Slows down test run a lot)";
   277 	public static final String PREFS_CUSTOM_BUTTON = "Custom size (0-255)";
   278 	public static final String PREFS_CUSTOM_BUTTON = "Custom size (0-255)";
   278 	public static final String PREFS_CS_SIZE_DISABLED_TOOLTIP = "Command line engine version is too old, version must be 1.7.4 or higher";
   279 	public static final String PREFS_CS_SIZE_DISABLED_TOOLTIP = "Command line engine version is too old, version must be 1.7.4 or higher";
   279 
   280 
       
   281 
   280 	/**Statistics view constants*/
   282 	/**Statistics view constants*/
   281 	public static final String STATISTICS_TAB_TITLE = "Top allocation locations";
   283 	public static final String STATISTICS_TAB_TITLE = "Top allocation locations";
   282 	public static final String STATISTICS_SELECT_RUN = "Select run";
   284 	public static final String STATISTICS_SELECT_RUN = "Select run";
   283 	public static final String STATISTICS_NODE_FILE = "File";
   285 	public static final String STATISTICS_NODE_FILE = "File";
   284 	public static final String STATISTICS_NODE_FUNCTION = "Function";
   286 	public static final String STATISTICS_NODE_FUNCTION = "Function";
   287 	public static final String STATISTICS_NODE_TIME = "Time";
   289 	public static final String STATISTICS_NODE_TIME = "Time";
   288 	public static final String STATISTICS_NODE_SIZE = "Size";
   290 	public static final String STATISTICS_NODE_SIZE = "Size";
   289 	public static final String STATISTICS_GENERATING = "Generating statistics. Please wait...";
   291 	public static final String STATISTICS_GENERATING = "Generating statistics. Please wait...";
   290 	public static final String STATISTICS_GENERATING_PROG_TITLE = "Generating statistics";
   292 	public static final String STATISTICS_GENERATING_PROG_TITLE = "Generating statistics";
   291 	public static final String GRAPH_GENERATING_PROG_TITLE = "Generating graph model";
   293 	public static final String GRAPH_GENERATING_PROG_TITLE = "Generating graph model";
       
   294 	public static final String GRAPH_LOAD_JOB_TITLE = "AnalyzeTool Loading Graph Data...";
   292 	public static final String STATISTICS_NO_STATS = "No statistics available.";
   295 	public static final String STATISTICS_NO_STATS = "No statistics available.";
   293 
   296 
   294 
   297 
   295 	public static final String FIND_COMP_JOB_TITLE = "Finding component locations";
   298 	public static final String FIND_COMP_JOB_TITLE = "Finding component locations";
   296 	public static final String FIND_COMP_JOB_SELECT_MODULE = "Select module";
   299 	public static final String FIND_COMP_JOB_SELECT_MODULE = "Select module";
   305 	public static final String PLUGINID = "com.nokia.s60tools.analyzetool";
   308 	public static final String PLUGINID = "com.nokia.s60tools.analyzetool";
   306 
   309 
   307 	/** Parser id's to command launcher */
   310 	/** Parser id's to command launcher */
   308 	public static final String[] atoolParserIds = new String[] { "com.nokia.s60tools.analyzetool" };
   311 	public static final String[] atoolParserIds = new String[] { "com.nokia.s60tools.analyzetool" };
   309 
   312 
   310 	/** File name which is used when saving captured data thru Tracing utility */
   313 	/** File name which is used when saving captured data thru TraceViewer */
   311 	public static final String FILENAME = "AtoolDataFile.dat";
   314 	public static final String FILENAME = "AtoolDataFile.dat";
   312 
   315 
   313 	/** File name which is used when generating memory analysis results */
   316 	/** File name which is used when generating memory analysis results */
   314 	public static final String FILENAME_CARBIDE = "AtoolFileToCarbide.xml";
   317 	public static final String FILENAME_CARBIDE = "AtoolFileToCarbide.xml";
   315 
   318 
   398 	public static final String REPORT_TOPMOST = "topmost_lines";
   401 	public static final String REPORT_TOPMOST = "topmost_lines";
   399 
   402 
   400 	/** S60 logging mode data file name */
   403 	/** S60 logging mode data file name */
   401 	public static final String LOGGING_S60_PROCESS_NAME = "process_name";
   404 	public static final String LOGGING_S60_PROCESS_NAME = "process_name";
   402 	public static final String LOGGING_S60_USER_SPECIFIED = "user_secified";
   405 	public static final String LOGGING_S60_USER_SPECIFIED = "user_secified";
   403 
   406 	
   404 	/** Save report file types */
   407 	/** Save report file types */
   405 	public static final int SAVE_REPORT_FILE_DATA = 0;
   408 	public static final int SAVE_REPORT_FILE_DATA = 0;
   406 	public static final int SAVE_REPORT_FILE_XML = 1;
   409 	public static final int SAVE_REPORT_FILE_XML = 1;
   407 
   410 
   408 
   411 
   488 		MAKEFILE_ERROR(5),
   491 		MAKEFILE_ERROR(5),
   489 		NO_SUPPORTED_MODULES_ERROR(8),
   492 		NO_SUPPORTED_MODULES_ERROR(8),
   490 		/* Analyze errors */
   493 		/* Analyze errors */
   491 		WRONG_DATA_FILE_VERSION(10),
   494 		WRONG_DATA_FILE_VERSION(10),
   492 		ANALYZE_ERROR(12),
   495 		ANALYZE_ERROR(12),
       
   496 		EMPTY_DATA_FILE(13),
   493 		SYMBOL_FILE_ERROR(14),
   497 		SYMBOL_FILE_ERROR(14),
   494 		DATA_FILE_EMPTY(31),
   498 		DATA_FILE_EMPTY(31),
   495 		DATA_FILE_INVALID(32),
   499 		DATA_FILE_INVALID(32),
   496 		/* building&releasing errors */
   500 		/* building&releasing errors */
   497 		RELEASABLES_ERROR(20),
   501 		RELEASABLES_ERROR(20),
   512 
   516 
   513 		 public int getCode() {
   517 		 public int getCode() {
   514 		   return code;
   518 		   return code;
   515 		 }
   519 		 }
   516 	}
   520 	}
       
   521 	
       
   522 	
       
   523 	static final String AT_CORE_INCLUDE_FILE_WITH_VERSION_NUMBER[] = {
       
   524 			"epoc32\\include\\domain\\osextensions\\analyzetool\\analyzetool.h",
       
   525 			"epoc32\\include\\oem\\analyzetool\\analyzetool.h",
       
   526 			"epoc32\\include\\platform\\analyzetool\\analyzetool.h"
       
   527 		};
       
   528 	
       
   529 	static final String AT_CORE_VERSION_NUMBER_TAG="ANALYZETOOL_CORE_VERSION_FOR_CLE";
   517 }
   530 }