equal
deleted
inserted
replaced
190 /** |
190 /** |
191 * Retrieve package part of given file object. |
191 * Retrieve package part of given file object. |
192 */ |
192 */ |
193 String packageName(File file) { |
193 String packageName(File file) { |
194 String path = file.getAbsolutePath(); |
194 String path = file.getAbsolutePath(); |
195 int begin = path.indexOf("com" + File.separatorChar); |
195 int begin = path.lastIndexOf(File.separatorChar + "com" + File.separatorChar); |
196 String packagePath = path.substring(begin, path.lastIndexOf(File.separatorChar)); |
196 String packagePath = path.substring(begin + 1, path.lastIndexOf(File.separatorChar)); |
197 String packageName = packagePath.replace(File.separatorChar, '.'); |
197 String packageName = packagePath.replace(File.separatorChar, '.'); |
198 return packageName; |
198 return packageName; |
199 } |
199 } |
200 |
200 |
201 /** |
201 /** |