sysperfana/analyzetoolext/com.nokia.s60tools.analyzetool/src/com/nokia/s60tools/analyzetool/global/Constants.java
changeset 15 0367d2db2c06
parent 6 f65f740e69f9
equal deleted inserted replaced
14:bb339882c6e9 15:0367d2db2c06
    17 
    17 
    18 package com.nokia.s60tools.analyzetool.global;
    18 package com.nokia.s60tools.analyzetool.global;
    19 
    19 
    20 /**
    20 /**
    21  * Contains all the defined constants
    21  * Contains all the defined constants
    22  *
    22  * 
    23  * @author kihe
    23  * @author kihe
    24  *
    24  * 
    25  */
    25  */
    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 
    31 	public static enum Operation {
    32 	public static enum Operation {
    32 		PROCESS_START, 
    33 		PCS, PCE, ALH, ALF, FRH, FRF, RAH, RAF, DLL, DLU, TDS, TDE, VER, TSS, TSE, DEVINFO, NOVALUE;
    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) {
    39 				return NOVALUE;
    39 				return NOVALUE;
    40 			}
    40 			}
    41 		}
    41 		}
    42 	}
    42 	}
       
    43 
       
    44 	public static final String ATOOL_LIBS_OK = "atool_libs_ok";
    43 
    45 
    44 	/** AnalyzeTool specific constants */
    46 	/** AnalyzeTool specific constants */
    45 	public final static String ANALYZE_TOOL_TITLE = "AnalyzeTool";
    47 	public final static String ANALYZE_TOOL_TITLE = "AnalyzeTool";
    46 	public final static String ANALYZE_TOOL_TITLE_WITH_VERSION = "AnalyzeTool v%s";
    48 	public final static String ANALYZE_TOOL_TITLE_WITH_VERSION = "AnalyzeTool v%s";
    47 	public final static String MAIN_TAB_TITLE = "Results";
    49 	public final static String MAIN_TAB_TITLE = "Results";
    65 	public final static String ACTION_CLEAR_CHANGES_TOOLTIP = "Clean all changes made by AnalyzeTool (delete atool_temp folder(s) etc.)";
    67 	public final static String ACTION_CLEAR_CHANGES_TOOLTIP = "Clean all changes made by AnalyzeTool (delete atool_temp folder(s) etc.)";
    66 	public final static String ACTION_CHANGE_REPORT_LEVEL = "Change report detail level";
    68 	public final static String ACTION_CHANGE_REPORT_LEVEL = "Change report detail level";
    67 	public final static String ACTION_CHANGE_REPORT_LEVEL_ALL = "Report detail level: All";
    69 	public final static String ACTION_CHANGE_REPORT_LEVEL_ALL = "Report detail level: All";
    68 	public final static String ACTION_CHANGE_REPORT_LEVEL_KNOWN = "Report detail level: Known";
    70 	public final static String ACTION_CHANGE_REPORT_LEVEL_KNOWN = "Report detail level: Known";
    69 	public final static String ACTION_CHANGE_REPORT_LEVEL_TOPMOST = "Report detail level: Topmost";
    71 	public final static String ACTION_CHANGE_REPORT_LEVEL_TOPMOST = "Report detail level: Topmost";
    70 	public final static String ACTION_CHANGE_LOGGING_MODE = "Change data gathering mode";
    72 	public final static String ACTION_CHANGE_LOGGING_MODE = "Change data output mode";
    71 	public final static String ACTION_CHANGE_LOGGING_MODE_TOOLTIP_EXT = "Current mode: Monitored external";
    73 
    72 	public final static String ACTION_CHANGE_LOGGING_MODE_TOOLTIP_FAST = "Current mode: External";
    74 	public static final String PREFS_EXT_FAST = "Output to trace (recommended)";
    73 	public final static String ACTION_CHANGE_LOGGING_MODE_TOOLTIP_S60 = "Current mode: Monitored Internal";
    75 	public static final String PREFS_EXT_FAST_TOOLTIP = "Output data to the host computer through external connection.";
    74 	public final static String ACTION_CHANGE_LOGGING_MODE_TOOLTIP_ASK = "Current mode: Ask always";
    76 	public static final String PREFS_S60 = "Output to file system";
       
    77 	public static final String PREFS_S60_TOOLTIP = "Output data to a file in the target device.";
       
    78 	public static final String PREFS_ASK_ALWAYS = "Ask always";
       
    79 	public static final String PREFS_ASK_ALWAYS_TOOLTIP = "Ask data output mode from the user every time when building.";
       
    80 
       
    81 	public final static String ACTION_CHANGE_LOGGING_MODE_TOOLTIP_FAST = "Current mode: "
       
    82 			+ PREFS_EXT_FAST;
       
    83 	public final static String ACTION_CHANGE_LOGGING_MODE_TOOLTIP_S60 = "Current mode: "
       
    84 			+ PREFS_S60;
       
    85 	public final static String ACTION_CHANGE_LOGGING_MODE_TOOLTIP_ASK = "Current mode: "
       
    86 			+ PREFS_ASK_ALWAYS;
       
    87 
    75 	public final static String ACTION_SAVE = "Save raw test run data or memory leak results";
    88 	public final static String ACTION_SAVE = "Save raw test run data or memory leak results";
    76 	public final static String ACTION_SAVE_REPORT = "Save memory leak results";
    89 	public final static String ACTION_SAVE_REPORT = "Save memory leak results";
    77 	public final static String ACTION_SAVE_DATA = "Save raw test run data";
    90 	public final static String ACTION_SAVE_DATA = "Save raw test run data";
    78 	public final static String ACTION_START_SUBTEST = "Start subtest";
    91 	public final static String ACTION_START_SUBTEST = "Start subtest";
    79 	public final static String ACTION_STOP_SUBTEST = "Stop subtest";
    92 	public final static String ACTION_STOP_SUBTEST = "Stop subtest";
    94 	// File save dialog title when user save test run data ( data file )
   107 	// File save dialog title when user save test run data ( data file )
    95 	public final static String DIALOG_SAVE_TRACE = "Save raw test run data";
   108 	public final static String DIALOG_SAVE_TRACE = "Save raw test run data";
    96 
   109 
    97 	// Selection dialog title when user builds project with AnalyzeTool and
   110 	// Selection dialog title when user builds project with AnalyzeTool and
    98 	// logging mode is set to "Ask always"
   111 	// logging mode is set to "Ask always"
    99 	public final static String DIALOG_SELECT_LOGGING_MODE = "Select data gathering mode for AnalyzeTool";
   112 	public final static String DIALOG_SELECT_LOGGING_MODE = "Select data output mode for AnalyzeTool";
   100 
   113 
   101 	// generic title for all dialogs, information notes
   114 	// generic title for all dialogs, information notes
   102 	public final static String DIALOG_TITLE = "AnalyzeTool";
   115 	public final static String DIALOG_TITLE = "AnalyzeTool";
   103 
   116 
   104 	// File selection dialog title when user wants to open and analyze data file
   117 	// File selection dialog title when user wants to open and analyze data file
   121 	// after the file is saved
   134 	// after the file is saved
   122 	public static final String INFO_SAVE_SUCCESS = "The file successfully saved to: ";
   135 	public static final String INFO_SAVE_SUCCESS = "The file successfully saved to: ";
   123 
   136 
   124 	// information text when user try to use actions and the atool.exe can not
   137 	// information text when user try to use actions and the atool.exe can not
   125 	// be executed
   138 	// be executed
   126 	public static final String INFO_ATOOL_NOT_AVAILABLE = "\n\nCan not execute command line engine. \nCheck AnalyzeTool preferences.";
   139 	public static final String INFO_ATOOL_NOT_AVAILABLE = "\n\nCommand Line Engine not available. \nCheck AnalyzeTool preferences.";
   127 	public static final String ERROR_ATOOL_NOT_AVAILABLE = "Can not execute command line engine. \nCheck AnalyzeTool preferences.";
   140 	public static final String ERROR_ATOOL_NOT_AVAILABLE = "Command Line Engine not available. Check AnalyzeTool preferences.";
   128 
   141 
   129 	// info to user if AnalyzeTool for some reason can create results
   142 	// info to user if AnalyzeTool for some reason can create results
   130 	public static final String INFO_FILE_INVALID = "Can not analyze. \nNo data to be analyzed.";
   143 	public static final String INFO_FILE_INVALID = "Can not analyze. \nNo data to be analyzed.";
   131 
   144 
   132 	// when user try use AnalyzeTool without selection project first
   145 	// when user try use AnalyzeTool without selection project first
   148 	public static final String CONFIRM_DIR_DOES_NOT_CONTAIN_ATOOL = "Directory does not contain atool.exe. \n\nDo you want to continue?";
   161 	public static final String CONFIRM_DIR_DOES_NOT_CONTAIN_ATOOL = "Directory does not contain atool.exe. \n\nDo you want to continue?";
   149 
   162 
   150 	/** Tree model text */
   163 	/** Tree model text */
   151 	// when no results are opened/available
   164 	// when no results are opened/available
   152 	public static final String INFO_NO_DATA_FILE_AVAILABLE = "No data file opened or trace data captured.";
   165 	public static final String INFO_NO_DATA_FILE_AVAILABLE = "No data file opened or trace data captured.";
   153 	/** Preference page title*/
   166 	/** Preference page title */
   154 	public static final String ATOOL_DESC = "AnalyzeTool Carbide extension configuration";
   167 	public static final String ATOOL_DESC = "AnalyzeTool Carbide extension configuration";
   155 	/** Trace capturing related text */
   168 	/** Trace capturing related text */
   156 	public static final String INFO_NO_DATA = "No data";
   169 	public static final String INFO_NO_DATA = "No data";
   157 	public static final String SUBTEST_INPUT_NAME = "Enter subtest name.";
   170 	public static final String SUBTEST_INPUT_NAME = "Enter subtest name.";
   158 	public static final String SUBTEST_NO_PROCESSES = "No processes started, could not start a subtest.";
   171 	public static final String SUBTEST_NO_PROCESSES = "No processes started, could not start a subtest.";
   199 	public static final String NO_MEM_LEAKS_CURRENT_LEVEL = "No memory leaks info available for current detail level. Try to change report detail level.";
   212 	public static final String NO_MEM_LEAKS_CURRENT_LEVEL = "No memory leaks info available for current detail level. Try to change report detail level.";
   200 	public static final String RUN_FAILED = " FAILED ";
   213 	public static final String RUN_FAILED = " FAILED ";
   201 	public static final String RUN_ABNORMAL = "Abnormal process end";
   214 	public static final String RUN_ABNORMAL = "Abnormal process end";
   202 	public static final String RUN_NO_LEAKS = "No memory leaks.";
   215 	public static final String RUN_NO_LEAKS = "No memory leaks.";
   203 
   216 
   204 	public static final String CANCELLED = "Canceled.";
   217 	public static final String CANCELLED = "Cancelled.";
   205 
   218 
   206 	/**Error information if AnalyzeTool libraries are not installed*/
   219 	/** Error information if AnalyzeTool libraries are not installed */
   207 	public static final String CAN_NOT_FIND_LIBRARIES = "Can not find AnalyzeTool library files from current SDK. \n\nYou can build AnalyzeTool from sources or contact " +
   220 	public static final String CAN_NOT_FIND_LIBRARIES_SUPPORT = "You can build AnalyzeTool from sources or contact AnalyzeTool development team to get AnalyzeTool binaries.";
   208 			"AnalyzeTool development team to get AnalyzeTool binaries.";
   221 
   209 
   222 	public static final String CAN_NOT_FIND_LIBRARIES_MARKER = "Can not find AnalyzeTool library files from current SDK:";
   210 	public static final String CAN_NOT_FIND_LIBRARIES_MARKER = "Can not find AnalyzeTool library files from current SDK."; 
   223 
   211 	/**If user try to build with unsupported platform*/
   224 	/** If user try to build with unsupported platform */
   212 	public static final String PLATFORM_NOT_SUPPORTED = "AnalyzeTool supports only ARMV5, GCCE and WINSCW build platforms. \n\nDo you want to continue?";
   225 	public static final String PLATFORM_NOT_SUPPORTED = "AnalyzeTool supports only ARMV5, GCCE and WINSCW build platforms. \n\nDo you want to continue?";
   213 
   226 
   214 	public static final String TOO_OLD_ENGINE = "Current version of AnalyzeTool Engine is too old. \nRequired version must be 1.6.0 or higher.\n\nCheck AnalyzeTool preferences.";
   227 	public static final String TOO_OLD_ENGINE = "Current version of AnalyzeTool Engine is too old. \nRequired version must be 1.6.0 or higher.\n\nCheck AnalyzeTool preferences.";
   215 
   228 
   216 	/** Error text when trying to import unknown module to the workspace and module could not be found*/
   229 	public static final String MIN_CLE_SUPPORTED = "1.10.0";
       
   230 	public static final String CLE_OLDER_THAN_MIN = "Command Line Engine older than {0}. Check AnalyzeTool preferences.";
       
   231 	public static final String CLE_VERSION_MISMATCH = "Version mismatch";
       
   232 
       
   233 	public static final String AT_BINARIES_VERSION_MISMATCH = "Version mismatch between the AnalyzeTool binaries ({0}) in the device and AnalyzeTool headers in the SDK ({1}).\nPlease make sure that those match otherwise results may be unknown.";
       
   234 
       
   235 	public static final String UNSUPPORTED_FORMAT_TITLE = "Unsupported format";
       
   236 	public static final String UNSUPPORTED_FORMAT_MESSAGE = "Symbian side components are not up to date. Please see help for more information.";
       
   237 
       
   238 	public static final String TRACE_FORMAT_VERSION_IS_HIGHER = "Carbide extension is older than Symbian components. Please see help for more information.";
       
   239 
       
   240 	/**
       
   241 	 * Error text when trying to import unknown module to the workspace and
       
   242 	 * module could not be found
       
   243 	 */
   217 	public static final String CAN_NOT_FIND_MODULE = "Can not find module from the active SDK";
   244 	public static final String CAN_NOT_FIND_MODULE = "Can not find module from the active SDK";
   218 
   245 
   219 	public static final String BUILD_STATE_CHANGED = "Project build state changed. \nDo you want to re-analyze results?";
   246 	public static final String BUILD_STATE_CHANGED = "Project build state changed. \nDo you want to re-analyze results?";
   220 
   247 
   221 	public static final String BUILD_CANCELLED = "\n\nAnalyzeTool build cancelled.";
   248 	public static final String BUILD_CANCELLED = "\n\nAnalyzeTool build cancelled.";
   231 	public static final String INPUT_TOO_LONG = "Data file name is too long.";
   258 	public static final String INPUT_TOO_LONG = "Data file name is too long.";
   232 
   259 
   233 	public static final String INPUT_NO_SPACES_ALLOWED = "No spaces allowed";
   260 	public static final String INPUT_NO_SPACES_ALLOWED = "No spaces allowed";
   234 
   261 
   235 	public static final String MAIN_CAN_NOT_COPY = "Cannot copy: \n";
   262 	public static final String MAIN_CAN_NOT_COPY = "Cannot copy: \n";
       
   263 
   236 	/**
   264 	/**
   237 	 * Preference page constants
   265 	 * Preference page constants
   238 	 */
   266 	 */
   239 	public static final String PREFS_EXT = "Monitored external data gathering";
       
   240 	public static final String PREFS_EXT_TOOLTIP = "Gather data to the host computer through external connection.";
       
   241 	public static final String PREFS_EXT_FAST = "External data gathering";
       
   242 	public static final String PREFS_EXT_FAST_TOOLTIP = "Gather data to the host computer through external connection.";
       
   243 	public static final String PREFS_S60 = "Monitored internal data gathering";
       
   244 	public static final String PREFS_S60_TOOLTIP = "Gather data to a file in the target device.";
       
   245 	public static final String PREFS_USER_SPEC = "Name from the user";
   267 	public static final String PREFS_USER_SPEC = "Name from the user";
   246 	public static final String PREFS_USER_SPEC_TOOLTIP = "Ask the file name from the user when building.";
   268 	public static final String PREFS_USER_SPEC_TOOLTIP = "Ask the file name from the user when building.";
   247 	public static final String PREFS_USE_PROCESS_NAME = "Name from the process";
   269 	public static final String PREFS_USE_PROCESS_NAME = "Name from the process";
   248 	public static final String PREFS_USE_PROCESS_NAME_TOOLTIP = "Use the process name as the name of the file.";
   270 	public static final String PREFS_USE_PROCESS_NAME_TOOLTIP = "Use the process name as the name of the file.";
   249 	public static final String PREFS_ASK_ALWAYS = "Ask Always";
   271 	public static final String PREFS_ATOOL_VER_NOT_FOUND = "Not available";
   250 	public static final String PREFS_ASK_ALWAYS_TOOLTIP = "Ask data gathering mode from the user every time when building.";
   272 	public static final String PREFS_ATOOL_GROUP_TITLE = "AnalyzeTool Engine";
   251 	public static final String PREFS_ATOOL_VER_NOT_FOUND ="Not available";
       
   252 
       
   253 	public static final String PREFS_ATOOL_GROUP_TITLE= "AnalyzeTool Engine";
       
   254 	public static final String PREFS_USE_INTERNAL_TITLE = "Use internal command line engine";
   273 	public static final String PREFS_USE_INTERNAL_TITLE = "Use internal command line engine";
   255 	public static final String PREFS_USE_EXTERNAL_TITLE = "Use external command line engine";
   274 	public static final String PREFS_USE_EXTERNAL_TITLE = "Use external command line engine";
   256 	public static final String PREFS_SELECT_FOLDER = "Choose the atool.exe directory";
   275 	public static final String PREFS_SELECT_FOLDER = "Choose the atool.exe directory";
   257 	public static final String PREFS_ATOOL_PATH = "&Atool.exe path:";
   276 	public static final String PREFS_ATOOL_PATH = "&Atool.exe path:";
   258 	public static final String PREFS_BROWSE = "Browse...";
   277 	public static final String PREFS_BROWSE = "Browse...";
   262 	public static final String PREFS_ADVANCED = "Advanced settings";
   281 	public static final String PREFS_ADVANCED = "Advanced settings";
   263 	public static final String PREFS_USE_ROM_SYMBOL = "Use rom symbol file";
   282 	public static final String PREFS_USE_ROM_SYMBOL = "Use rom symbol file";
   264 	public static final String PREFS_USE_ROM_SYMBOL_TOOLTIP = "Use rom symbol file to pinpoint rom locations.";
   283 	public static final String PREFS_USE_ROM_SYMBOL_TOOLTIP = "Use rom symbol file to pinpoint rom locations.";
   265 	public static final String PREFS_ROM_SYMBOL_PATH = "Rom symbol file:";
   284 	public static final String PREFS_ROM_SYMBOL_PATH = "Rom symbol file:";
   266 	public static final String PREFS_ROM_SYMBOL_PATH_TOOLTIP = "Define which rom symbol file to use.";
   285 	public static final String PREFS_ROM_SYMBOL_PATH_TOOLTIP = "Define which rom symbol file to use.";
   267 	public static final String PREFS_SELECT_ROM_SYMBOL= "Choose the rom symbol file.";
   286 	public static final String PREFS_SELECT_ROM_SYMBOL = "Choose the rom symbol file.";
   268 	public static final String PREFS_REFRESH_VERSION = "Refresh version";
   287 	public static final String PREFS_REFRESH_VERSION = "Refresh version";
   269 	public static final String PREFS_REPORT_LEVEL = "Report level";
   288 	public static final String PREFS_REPORT_LEVEL = "Report level";
   270 	public static final String PREFS_SHOW_EVERY = "&Show every detail";
   289 	public static final String PREFS_SHOW_EVERY = "&Show every detail";
   271 	public static final String PREFS_SHOW_KNOWN = "Show only known code lines(default)";
   290 	public static final String PREFS_SHOW_KNOWN = "Show only known code lines (default)";
   272 	public static final String PREFS_SHOW_TOPMOST = "Show only topmost memory allocation code line";
   291 	public static final String PREFS_SHOW_TOPMOST = "Show only topmost memory allocation code line";
   273 	public static final String PREFS_SELECT_DIR = "Select folder";
   292 	public static final String PREFS_SELECT_DIR = "Select folder";
   274 	public static final String PREFS_CSSIZE_TITLE = "Callstack size";
   293 	public static final String PREFS_CSSIZE_TITLE = "Callstack size";
   275 	public static final String PREFS_ZERO_BUTTON = "No callstack stored";
   294 	public static final String PREFS_ZERO_BUTTON = "No callstack stored";
   276 	public static final String PREFS_FORTY_BUTTON = "40 items";
   295 	public static final String PREFS_FORTY_BUTTON = "40 items";
   277 	public static final String PREFS_HUNDRED_BUTTON = "100 items (Slows down test run a lot)";
   296 	public static final String PREFS_HUNDRED_BUTTON = "100 items (Slows down test run a lot)";
   278 	public static final String PREFS_CUSTOM_BUTTON = "Custom size (0-255)";
   297 	public static final String PREFS_CUSTOM_BUTTON = "Custom size (0-255)";
   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";
   298 	public static final String PREFS_CS_SIZE_DISABLED_TOOLTIP = "Command line engine version is too old, version must be 1.7.4 or higher";
   280 
   299 	public static final String PREFS_CLE_NOT_AVAILABLE = "Command Line Engine not available.";
   281 
   300 	public static final String PREFS_CLE_OLDER_THAN_MIN = "Command Line Engine older than {0}.";
   282 	/**Statistics view constants*/
   301 
       
   302 	/** Statistics view constants */
   283 	public static final String STATISTICS_TAB_TITLE = "Top allocation locations";
   303 	public static final String STATISTICS_TAB_TITLE = "Top allocation locations";
   284 	public static final String STATISTICS_SELECT_RUN = "Select run";
   304 	public static final String STATISTICS_SELECT_RUN = "Select run";
   285 	public static final String STATISTICS_NODE_FILE = "File";
   305 	public static final String STATISTICS_NODE_FILE = "File";
   286 	public static final String STATISTICS_NODE_FUNCTION = "Function";
   306 	public static final String STATISTICS_NODE_FUNCTION = "Function";
   287 	public static final String STATISTICS_NODE_LINE = "Line";
   307 	public static final String STATISTICS_NODE_LINE = "Line";
   292 	public static final String STATISTICS_GENERATING_PROG_TITLE = "Generating statistics";
   312 	public static final String STATISTICS_GENERATING_PROG_TITLE = "Generating statistics";
   293 	public static final String GRAPH_GENERATING_PROG_TITLE = "Generating graph model";
   313 	public static final String GRAPH_GENERATING_PROG_TITLE = "Generating graph model";
   294 	public static final String GRAPH_LOAD_JOB_TITLE = "AnalyzeTool Loading Graph Data...";
   314 	public static final String GRAPH_LOAD_JOB_TITLE = "AnalyzeTool Loading Graph Data...";
   295 	public static final String STATISTICS_NO_STATS = "No statistics available.";
   315 	public static final String STATISTICS_NO_STATS = "No statistics available.";
   296 
   316 
   297 
       
   298 	public static final String FIND_COMP_JOB_TITLE = "Finding component locations";
   317 	public static final String FIND_COMP_JOB_TITLE = "Finding component locations";
   299 	public static final String FIND_COMP_JOB_SELECT_MODULE = "Select module";
   318 	public static final String FIND_COMP_JOB_SELECT_MODULE = "Select module";
   300 	// UI RELATED CONSTANTS END HERE
   319 	// UI RELATED CONSTANTS END HERE
   301 
   320 
   302 
       
   303 	public static final String SOURCE_NOT_FOUND = "Source file not found from any project.";
   321 	public static final String SOURCE_NOT_FOUND = "Source file not found from any project.";
   304 
       
   305 
   322 
   306 	public static final String SOURCE_FILE_EDITOR_ID = "org.eclipse.jdt.ui.SourceView";
   323 	public static final String SOURCE_FILE_EDITOR_ID = "org.eclipse.jdt.ui.SourceView";
   307 	/** Plug-in id */
   324 	/** Plug-in id */
   308 	public static final String PLUGINID = "com.nokia.s60tools.analyzetool";
   325 	public static final String PLUGINID = "com.nokia.s60tools.analyzetool";
   309 
   326 
   314 	public static final String FILENAME = "AtoolDataFile.dat";
   331 	public static final String FILENAME = "AtoolDataFile.dat";
   315 
   332 
   316 	/** File name which is used when generating memory analysis results */
   333 	/** File name which is used when generating memory analysis results */
   317 	public static final String FILENAME_CARBIDE = "AtoolFileToCarbide.xml";
   334 	public static final String FILENAME_CARBIDE = "AtoolFileToCarbide.xml";
   318 
   335 
   319 	/** Alloc */
   336 	/** Prefix of the old data trace format */
   320 	public static final String ALLOC = "ALLOC";
   337 	public final static String PREFIX_OLD = "PCSS";
   321 	/** Alloc */
   338 
   322 	public static final String ALLOCH = "ALLOCH";
   339 	/** Prefix to find */
   323 	/** Alloc */
   340 	public final static String PREFIX = "<AT>";
   324 	public static final String ALLOCF = "ALLOCF";
   341 
       
   342 	/** Process start string */
       
   343 	public static final String PCS = "PCS";
       
   344 
       
   345 	/** Process end string */
       
   346 	public static final String PCE = "PCE";
       
   347 
       
   348 	/** Allocation */
       
   349 	public static final String ALH = "ALH";
       
   350 	public static final String ALF = "ALF";
       
   351 
   325 	/** Free */
   352 	/** Free */
   326 	public static final String FREE = "FREE";
   353 	public static final String FRH = "FRH";
   327 	public static final String FREEH = "FREEH";
   354 	public static final String FRF = "FRF";
   328 	public static final String FREEF = "FREEF";
   355 
   329 
   356 	/** Reallocation */
   330 	public static final String DLL_LOAD = "DLL_LOAD";
   357 	public static final String RAH = "RAH";
   331 	public static final String DLL_UNLOAD = "DLL_UNLOAD";
   358 	public static final String RAF = "RAF";
       
   359 
       
   360 	/** DLL */
       
   361 	public static final String DLL = "DLL";
       
   362 	public static final String DLU = "DLU";
       
   363 
       
   364 	/** Thread */
       
   365 	public static final String TDS = "TDS";
       
   366 	public static final String TDE = "TDE";
       
   367 
       
   368 	/** Version */
       
   369 	public static final String VER = "VER";
       
   370 
       
   371 	/** Subtests */
       
   372 	public static final String TSS = "TSS";
       
   373 	public static final String TSE = "TSE";
       
   374 
       
   375 	/** Device info */
       
   376 	public static final String DEVINFO = "DEVINFO";
   332 
   377 
   333 	/** Memory allocation deallocation flag definitions */
   378 	/** Memory allocation deallocation flag definitions */
   334 	public static final int TYPE_ALLOC = 0;
   379 	public static final int TYPE_ALLOC = 0;
   335 
       
   336 	public static final int TYPE_FREE = 1;
   380 	public static final int TYPE_FREE = 1;
   337 	public static final int TYPE_ALLOCH = 2;
   381 	public static final int TYPE_ALLOCH = 2;
   338 	public static final int TYPE_FREEH = 3;
   382 	public static final int TYPE_FREEH = 3;
   339 
   383 
   340 	/** Prefix to find */
       
   341 	public final static String PREFIX = "PCSS";
       
   342 
       
   343 	/** Process start string */
       
   344 	public static final String PROCESS_START = "PROCESS_START";
       
   345 	/** Process end string */
       
   346 	public static final String PROCESS_END = "PROCESS_END";
       
   347 	/** Button icon definitions */
   384 	/** Button icon definitions */
   348 	public static final String BUTTON_RUN = "icons/btn_record.png";
   385 	public static final String BUTTON_RUN = "icons/btn_record.png";
   349 	public static final String BUTTON_STOP = "icons/btn_terminate.png";
   386 	public static final String BUTTON_STOP = "icons/btn_terminate.png";
   350 	public static final String BUTTON_BUILD = "icons/btn_build.png";
   387 	public static final String BUTTON_BUILD = "icons/btn_build.png";
   351 	public static final String BUTTON_CLEAN = "icons/btn_clear.png";
   388 	public static final String BUTTON_CLEAN = "icons/btn_clear.png";
   362 	public static final String BUTTON_STOP_SUBTEST = "icons/btn_stop_subtest.png";
   399 	public static final String BUTTON_STOP_SUBTEST = "icons/btn_stop_subtest.png";
   363 	public static final String BUTTON_OPEN_PREFS = "icons/open_prefs.png";
   400 	public static final String BUTTON_OPEN_PREFS = "icons/open_prefs.png";
   364 	public static final String ICON_OUTSIDE = "icons/module_outside.png";
   401 	public static final String ICON_OUTSIDE = "icons/module_outside.png";
   365 	public static final String ICON_NOT_BUILD = "icons/module_not_build.png";
   402 	public static final String ICON_NOT_BUILD = "icons/module_not_build.png";
   366 	public static final String ICON_BUILD = "icons/module_build.png";
   403 	public static final String ICON_BUILD = "icons/module_build.png";
       
   404 
   367 	/** Data file definitions */
   405 	/** Data file definitions */
   368 	public static final int DATAFILE_LOG = 0;
   406 	public static final int DATAFILE_LOG = 0;
   369 	public static final int DATAFILE_TRACE = 1;
   407 	public static final int DATAFILE_TRACE = 1;
   370 	public static final int DATAFILE_XML = 2;
   408 	public static final int DATAFILE_XML = 2;
       
   409 	public static final int DATAFILE_BINARY = 3;
   371 
   410 
   372 	public static final int DATAFILE_INVALID = -1;
   411 	public static final int DATAFILE_INVALID = -1;
   373 	public static final int DATAFILE_EMPTY = -2;
   412 	public static final int DATAFILE_EMPTY = -2;
       
   413 	public static final int DATAFILE_OLD_FORMAT = -3;
       
   414 	public static final int DATAFILE_UNSUPPORTED_TRACE_FORMAT = -4;
   374 
   415 
   375 	public static final String DATAFILE_VERSION = "DATA_FILE_VERSION";
   416 	public static final String DATAFILE_VERSION = "DATA_FILE_VERSION";
       
   417 	public static final String BINARY_FILE_VERSION = "BINARY_FILE_VERSION";
   376 	public static final String ATOOL_TEMP = "atool_temp";
   418 	public static final String ATOOL_TEMP = "atool_temp";
   377 	public static final String ATOOL_FOLDER = "atool_folder";
   419 	public static final String ATOOL_FOLDER = "atool_folder";
   378 	public static final String LOGGING_MODE = "logging_mode";
   420 	public static final String LOGGING_MODE = "logging_mode";
   379 	public static final String S60_LOG_FILE_MODE = "s60_log_file_mode";
   421 	public static final String S60_LOG_FILE_MODE = "s60_log_file_mode";
   380 	public static final String USER_SELECTED_FOLDER = "user_selected";
   422 	public static final String USER_SELECTED_FOLDER = "user_selected";
   385 	public static final String USE_ROM_SYMBOL_LOCATION = "rom_symbol_location";
   427 	public static final String USE_ROM_SYMBOL_LOCATION = "rom_symbol_location";
   386 	public static final String CALLSTACK_SIZE = "callstack_size";
   428 	public static final String CALLSTACK_SIZE = "callstack_size";
   387 	public static final String USE_CALLSTACK_SIZE = "use_user_define_cs_size";
   429 	public static final String USE_CALLSTACK_SIZE = "use_user_define_cs_size";
   388 	public static final String REPORT_LEVEL = "report_level";
   430 	public static final String REPORT_LEVEL = "report_level";
   389 	public static final String ATOOL_VERBOSE = "verbose_atool";
   431 	public static final String ATOOL_VERBOSE = "verbose_atool";
       
   432 
       
   433 	public static final String DEVICE_LOG_FILE_PATH = "device_log_file_path";
       
   434 	public static final String DEVICE_LOG_FILE_NAME = "device_log_file_name";
       
   435 
   390 	/** Logging mode preference values */
   436 	/** Logging mode preference values */
   391 	public static final String LOGGING_EXT = "EXT";
       
   392 	public static final String LOGGING_EXT_FAST = "EXT_FAST";
   437 	public static final String LOGGING_EXT_FAST = "EXT_FAST";
   393 	public static final String LOGGING_S60 = "S60";
   438 	public static final String LOGGING_S60 = "S60";
   394 	public static final String LOGGING_ASK_ALLWAYS = "ask_always";
   439 	public static final String LOGGING_ASK_ALLWAYS = "ask_always";
   395 	public static final String LOGGING_FAST_ENABLED = "logging_fast_enabled";
   440 	public static final String LOGGING_FAST_ENABLED = "logging_fast_enabled";
   396 
   441 
   401 	public static final String REPORT_TOPMOST = "topmost_lines";
   446 	public static final String REPORT_TOPMOST = "topmost_lines";
   402 
   447 
   403 	/** S60 logging mode data file name */
   448 	/** S60 logging mode data file name */
   404 	public static final String LOGGING_S60_PROCESS_NAME = "process_name";
   449 	public static final String LOGGING_S60_PROCESS_NAME = "process_name";
   405 	public static final String LOGGING_S60_USER_SPECIFIED = "user_secified";
   450 	public static final String LOGGING_S60_USER_SPECIFIED = "user_secified";
   406 	
   451 
   407 	/** Save report file types */
   452 	/** Save report file types */
   408 	public static final int SAVE_REPORT_FILE_DATA = 0;
   453 	public static final int SAVE_REPORT_FILE_DATA = 0;
   409 	public static final int SAVE_REPORT_FILE_XML = 1;
   454 	public static final int SAVE_REPORT_FILE_XML = 1;
   410 
   455 
   411 
       
   412 	public static final String BUILD_TARGET_WINSCW = "WINSCW";
   456 	public static final String BUILD_TARGET_WINSCW = "WINSCW";
   413 	public static final String BUILD_TARGET_ARMV5 = "ARMV5";
   457 	public static final String BUILD_TARGET_ARMV5 = "ARMV5";
   414 	public static final String BUILD_TARGET_GCEE = "GCCE";
   458 	public static final String BUILD_TARGET_GCEE = "GCCE";
   415 
   459 
   416 	/** Default preference values */
   460 	/** Default preference values */
   417 	public static final String DEFAULT_ATOOL_FOLDER = "c:\\apps\\atool\\";
   461 	public static final String DEFAULT_ATOOL_FOLDER = "c:\\apps\\atool\\";
   418 
   462 
   419 	public static final String DEFAULT_LOGGING_MODE = Constants.LOGGING_EXT;
   463 	public static final String DEFAULT_LOGGING_MODE = Constants.LOGGING_EXT_FAST;
   420 	public static final String DEFAULT_REPORT_LEVEL = Constants.REPORT_KNOWN;
   464 	public static final String DEFAULT_REPORT_LEVEL = Constants.REPORT_KNOWN;
   421 	public static final String PREFS_LOGGING_MODE_TITLE = "Data gathering mode";
   465 	public static final String PREFS_LOGGING_MODE_TITLE = "Output mode";
   422 
   466 
   423 	public static final int ANALYZE_ASK_FOR_USER = 0;
   467 	public static final int ANALYZE_ASK_FOR_USER = 0;
   424 	public static final int ANALYZE_USE_DATA_FILE = 1;
   468 	public static final int ANALYZE_USE_DATA_FILE = 1;
   425 
   469 
   426 	public static final String ANALYZE_CONSOLE_ID = "Memory Analysis ID";
   470 	public static final String ANALYZE_CONSOLE_ID = "Memory Analysis ID";
   429 	public static final int SAVE_DATA_FILE = 0;
   473 	public static final int SAVE_DATA_FILE = 0;
   430 	public static final int SAVE_DATA_FILE_NO = 1;
   474 	public static final int SAVE_DATA_FILE_NO = 1;
   431 	public static final int SAVE_DATA_FILE_CANCEL = 2;
   475 	public static final int SAVE_DATA_FILE_CANCEL = 2;
   432 
   476 
   433 	public static final String ATOOL_INST = "-inst";
   477 	public static final String ATOOL_INST = "-inst";
   434 	public static final String ATOOL_INST_E = "-instrument_e";
       
   435 	public static final String ATOOL_INST_EF = "-instrument_ef";
   478 	public static final String ATOOL_INST_EF = "-instrument_ef";
   436 	public static final String ATOOL_INST_I = "-instrument_i";
   479 	public static final String ATOOL_INST_I = "-instrument_i";
       
   480 
   437 	public static final String ATOOL_UNINST = "-uninstrument";
   481 	public static final String ATOOL_UNINST = "-uninstrument";
   438 	public static final String ATOOL_USE_VARIANT = "-variant";
   482 	public static final String ATOOL_USE_VARIANT = "-variant";
   439 	public static final String ATOOL_UNINST_FAILED = "-uninstrument_failed";
   483 	public static final String ATOOL_UNINST_FAILED = "-uninstrument_failed";
   440 	public static final String ATOOL_SHOW_DEBUG = "-show_debug";
   484 	public static final String ATOOL_SHOW_DEBUG = "-show_debug";
   441 	public static final String USE_INTERNAL = "use_internal";
   485 	public static final String USE_INTERNAL = "use_internal";
   443 
   487 
   444 	public static final int MAX_LENGTH_OF_USER_INPUT = 50;
   488 	public static final int MAX_LENGTH_OF_USER_INPUT = 50;
   445 
   489 
   446 	public static final int HISTORY_LEVEL = 5;
   490 	public static final int HISTORY_LEVEL = 5;
   447 
   491 
   448 	//version number comparision constants
   492 	// version number comparison constants
   449 	public static final int VERSION_NUMBERS_INVALID = -1;
   493 	public static final int VERSION_NUMBERS_INVALID = -1;
   450 	public static final int VERSION_NUMBERS_FIRST = 0;
   494 	public static final int VERSION_NUMBERS_FIRST = 0;
   451 	public static final int VERSION_NUMBERS_SECOND = 1;
   495 	public static final int VERSION_NUMBERS_SECOND = 1;
   452 	public static final int VERSION_NUMBERS_EQUALS = 2;
   496 	public static final int VERSION_NUMBERS_EQUALS = 2;
   453 	public static final String MIN_VERSION = "1.6.0";
       
   454 	public static final String CS_SUPPORT_MIN_VERSION = "1.7.4";
       
   455 
   497 
   456 	public static final String UNKNOWN = "Unknown";
   498 	public static final String UNKNOWN = "Unknown";
   457 
   499 
   458 	public static final String PREFS_KEEP_IN_SYNC = "keepFilesSync";
   500 	public static final String PREFS_KEEP_IN_SYNC = "keepFilesSync";
   459 	public static final String PREFS_PROMPT_MMP = "promptMMPChanges";
   501 	public static final String PREFS_PROMPT_MMP = "promptMMPChanges";
   460 	public static final String PREFS_MANAGE_DEPS = "manageDeps";
   502 	public static final String PREFS_MANAGE_DEPS = "manageDeps";
   461 	public static final String PREFS_CONC_BUILD = "useConcBuild";
   503 	public static final String PREFS_CONC_BUILD = "useConcBuild";
   462 	public static final String PREFS_BUILD_CANCELLED = "buildCancelled";
   504 	public static final String PREFS_BUILD_CANCELLED = "buildCancelled";
   463 
   505 
   464 	// List of libraries what AnalyzeTool needs when compiled applications on armv5 platform
   506 	// List of libraries what AnalyzeTool needs when compiled applications on
       
   507 	// armv5 platform
   465 	public static final String atoolLibs[] = {
   508 	public static final String atoolLibs[] = {
   466 		"epoc32\\RELEASE\\armv5\\LIB\\AToolMemoryHook.lib",
   509 			"epoc32\\RELEASE\\armv5\\LIB\\AToolMemoryHook.lib",
   467 		"epoc32\\RELEASE\\armv5\\udeb\\AtoolStaticLib.lib",
   510 			"epoc32\\RELEASE\\armv5\\udeb\\AtoolStaticLib.lib",
   468 		"epoc32\\RELEASE\\armv5\\urel\\AtoolStaticLib.lib"
   511 			"epoc32\\RELEASE\\armv5\\urel\\AtoolStaticLib.lib" };
   469 	};
   512 
   470 
   513 	// List of libraries what AnalyzeTool needs when compiled applications on
   471 	// List of libraries what AnalyzeTool needs when compiled applications on armv5 platform (using sbs2 / ABIV2 binaries)
   514 	// armv5 platform (using sbs2 / ABIV2 binaries)
   472 	public static final String  atoolLibsSbs2[] = {
   515 	public static final String atoolLibsSbs2[] = {
   473 		"epoc32\\RELEASE\\armv5\\LIB\\AToolMemoryHook.dso",
   516 			"epoc32\\RELEASE\\armv5\\LIB\\AToolMemoryHook.dso",
   474 		"epoc32\\RELEASE\\armv5\\udeb\\AtoolStaticLib.lib",
   517 			"epoc32\\RELEASE\\armv5\\udeb\\AtoolStaticLib.lib",
   475 		"epoc32\\RELEASE\\armv5\\urel\\AtoolStaticLib.lib"
   518 			"epoc32\\RELEASE\\armv5\\urel\\AtoolStaticLib.lib" };
   476 	};
   519 
   477 
   520 	// List of libraries what AnalyzeTool needs when compiled applications on
   478 	// List of libraries what AnalyzeTool needs when compiled applications on winscw platform
   521 	// winscw platform
   479 	public static final String  atoolLibsWinscw[] = {
   522 	public static final String atoolLibsWinscw[] = {
   480 		"epoc32\\RELEASE\\winscw\\udeb\\AToolMemoryHook.lib",
   523 			"epoc32\\RELEASE\\winscw\\udeb\\AToolMemoryHook.lib",
   481 		"epoc32\\RELEASE\\winscw\\udeb\\AtoolStaticLib.lib",
   524 			"epoc32\\RELEASE\\winscw\\udeb\\AtoolStaticLib.lib",
   482 		"epoc32\\RELEASE\\winscw\\urel\\AtoolStaticLib.lib"
   525 			"epoc32\\RELEASE\\winscw\\urel\\AtoolStaticLib.lib" };
   483 	};
       
   484 
   526 
   485 	public static enum COMMAND_LINE_ERROR_CODE {
   527 	public static enum COMMAND_LINE_ERROR_CODE {
   486 		EXECUTE_ERROR(-1),
   528 		EXECUTE_ERROR(-1), OK(0),
   487 		OK(0),
       
   488 		/* instrument errors */
   529 		/* instrument errors */
   489 		INVALID_ARGUMENT_ERROR(1), 
   530 		INVALID_ARGUMENT_ERROR(1), CANNOT_FIND_EPOCROOT(3), MAKEFILE_ERROR(5), NO_SUPPORTED_MODULES_ERROR(
   490 		CANNOT_FIND_EPOCROOT(3),
   531 				8),
   491 		MAKEFILE_ERROR(5),
       
   492 		NO_SUPPORTED_MODULES_ERROR(8),
       
   493 		/* Analyze errors */
   532 		/* Analyze errors */
   494 		WRONG_DATA_FILE_VERSION(10),
   533 		WRONG_DATA_FILE_VERSION(10), ANALYZE_ERROR(12), EMPTY_DATA_FILE(13), SYMBOL_FILE_ERROR(
   495 		ANALYZE_ERROR(12),
   534 				14), DATA_FILE_EMPTY(31), DATA_FILE_INVALID(32), DATA_FILE_OLD_FORMAT(
   496 		EMPTY_DATA_FILE(13),
   535 				33), DATA_FILE_UNSUPPORTED_TRACE_FORMAT(34),
   497 		SYMBOL_FILE_ERROR(14),
       
   498 		DATA_FILE_EMPTY(31),
       
   499 		DATA_FILE_INVALID(32),
       
   500 		/* building&releasing errors */
   536 		/* building&releasing errors */
   501 		RELEASABLES_ERROR(20),
   537 		RELEASABLES_ERROR(20), RESTORE_MODULES_ERROR(21), CREATING_TEMP_CPP_ERROR(
   502 		RESTORE_MODULES_ERROR(21),
   538 				22), CLEANING_TEMP_ERROR(23), READ_MAKEFILE_ERROR(24), MODIFY_MODULES_ERROR(
   503 		CREATING_TEMP_CPP_ERROR(22),
   539 				25), INVALID_MMP_DEFINED(27),
   504 		CLEANING_TEMP_ERROR(23),
       
   505 		READ_MAKEFILE_ERROR(24),
       
   506 		MODIFY_MODULES_ERROR(25),
       
   507 		INVALID_MMP_DEFINED(27),
       
   508 
   540 
   509 		/* User issued exit */
   541 		/* User issued exit */
   510 		UNKNOWN_ERROR(999);
   542 		UNKNOWN_ERROR(999);
   511 		private final int code;
   543 		private final int code;
   512 
   544 
   513 		COMMAND_LINE_ERROR_CODE(int c) {
   545 		COMMAND_LINE_ERROR_CODE(int c) {
   514 		   code = c;
   546 			code = c;
   515 		 }
   547 		}
   516 
   548 
   517 		 public int getCode() {
   549 		public int getCode() {
   518 		   return code;
   550 			return code;
   519 		 }
   551 		}
   520 	}
   552 	}
   521 	
   553 
   522 	
       
   523 	static final String AT_CORE_INCLUDE_FILE_WITH_VERSION_NUMBER[] = {
   554 	static final String AT_CORE_INCLUDE_FILE_WITH_VERSION_NUMBER[] = {
   524 			"epoc32\\include\\domain\\osextensions\\analyzetool\\analyzetool.h",
   555 			"epoc32\\include\\domain\\osextensions\\analyzetool\\analyzetool.h",
   525 			"epoc32\\include\\oem\\analyzetool\\analyzetool.h",
   556 			"epoc32\\include\\oem\\analyzetool\\analyzetool.h",
   526 			"epoc32\\include\\platform\\analyzetool\\analyzetool.h"
   557 			"epoc32\\include\\platform\\analyzetool\\analyzetool.h" };
   527 		};
   558 
   528 	
   559 	static final String AT_CORE_VERSION_NUMBER_TAG = "ANALYZETOOL_CORE_VERSION_FOR_CLE";
   529 	static final String AT_CORE_VERSION_NUMBER_TAG="ANALYZETOOL_CORE_VERSION_FOR_CLE";
       
   530 }
   560 }