Created
October 24, 2013 19:54
-
-
Save strazzere/7143881 to your computer and use it in GitHub Desktop.
Run after using DEXTemplate.bt -- too slow to include in every template run, but can be used after running it if wanted
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
////////////////////////////////////////////////// | |
// Post template completion checks and functions | |
////////////////////////////////////////////////// | |
int CheckSourceFileName(int source_file_index) { | |
local string temp_str = StringIdRead(source_file_index); | |
if(sizeof(temp_str) <= 6) { | |
return -1; | |
} | |
temp_str = SubStr(temp_str, sizeof(temp_str) - 7, -1); | |
return Strcmp(temp_str, ".java\""); | |
} | |
if( MessageBox( idYes | idNo, | |
"Check for oddities?", | |
"Check for source file issues?") | |
== idYes ) { | |
local int class_idx = 0; | |
for(class_idx = 0; class_idx < sizeof(dex_class_defs) / sizeof(dex_class_defs.class_def); class_idx++) { | |
if(dex_class_defs.class_def[class_idx].source_file_idx != NO_INDEX && CheckSourceFileName(dex_class_defs.class_def[class_idx].source_file_idx) != 0) { | |
SPrintf(temp_warning, "Source file name for class [ %s ] does not appear to be a \".java\" file!", LongTypeIdRead(dex_class_defs.class_def[class_idx].class_idx)); | |
PrintWarning(temp_warning); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment