}
}
+ /**
+ * Parse and check the include file name
+ *
+ * @param includeToken
+ */
private void checkFileName(int includeToken) {
//<include-token> expr
int start = scanner.getCurrentTokenStartPosition();
IPath path = PHPFileUtil.determineFilePath(includeNameString, file, project);
if (path == null) {
- // reportSyntaxError("File: " + expression.toStringExpression() + " doesn't exist in project: "
- // + project.getLocation().toString(), literal.sourceStart, literal.sourceEnd);
+ // SyntaxError: "File: << >> doesn't exist in project."
String[] args = { expression.toStringExpression(), project.getLocation().toString() };
problemReporter.phpIncludeNotExistWarning(args, literal.sourceStart, literal.sourceEnd, referenceContext,
compilationUnit.compilationResult);
} else {
try {
- // String projectPath = ProjectPrefUtil.getDocumentRoot(file.getProject()).toString();
- // String filePath = file.getRawLocation().toString();
String filePath = path.toString();
String ext = file.getRawLocation().getFileExtension();
int fileExtensionLength = ext == null ? 0 : ext.length() + 1;