X-Git-Url: http://secure.phpeclipse.com diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/parser/Parser.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/parser/Parser.java index dfb95ea..abb27ea 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/parser/Parser.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/parser/Parser.java @@ -44,6 +44,7 @@ import net.sourceforge.phpeclipse.internal.compiler.ast.TypeDeclaration; import org.eclipse.core.resources.IFile; import org.eclipse.core.resources.IProject; import org.eclipse.core.resources.IResource; +import org.eclipse.core.runtime.IPath; public class Parser //extends PHPParserSuperclass implements ITerminalSymbols, CompilerModifiers, ParserBasicInformation { @@ -3396,12 +3397,16 @@ public class Parser //extends PHPParserSuperclass // System.out.println(new String(compilationUnit.getFileName())+" - "+ expression.toStringExpression()); IProject project = resource.getProject(); if (project != null) { - if (PHPFileUtil.determineFilePath(includeNameString, resource, project) == null) { + IPath path = PHPFileUtil.determineFilePath(includeNameString, resource, project); + + if (path == null) { // reportSyntaxError("File: " + expression.toStringExpression() + " doesn't exist in project: " // + project.getLocation().toString(), literal.sourceStart, literal.sourceEnd); String[] args = { expression.toStringExpression(), project.getLocation().toString() }; problemReporter.phpIncludeNotExistWarning(args, literal.sourceStart, literal.sourceEnd, referenceContext, compilationUnit.compilationResult); + } else { + impt.setFile( PHPFileUtil.createFile(path, project) ); } } }