From de0c02bce7996a1505686c929c9609f9358463ac Mon Sep 17 00:00:00 2001 From: Edward Mann Date: Sun, 6 Jan 2008 15:46:14 +0000 Subject: [PATCH] Committing patch from grEvenX to fix bug #1839622 RSE Path error --- .../phpdt/internal/compiler/parser/Parser.java | 11 ++++++----- .../phpdt/internal/ui/util/PHPFileUtil.java | 5 ++--- 2 files changed, 8 insertions(+), 8 deletions(-) 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 5fddf9e..c31b8fa 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 @@ -4993,11 +4993,12 @@ public class Parser implements ITerminalSymbols, CompilerModifiers, // create a package name similar to java package names String projectPath = ProjectPrefUtil.getDocumentRoot(file.getProject()) .toString(); - String filePath = file.getRawLocation().toString(); - String ext = file.getRawLocation().getFileExtension(); - int fileExtensionLength = ext == null ? 0 : ext.length() + 1; - ImportReference impt; - char[][] tokens; + String filePath = file.getFullPath().toString(); + + String ext = file.getFileExtension(); + int fileExtensionLength = ext == null ? 0 : ext.length() + 1; + ImportReference impt; + char[][] tokens; if (filePath.startsWith(projectPath)) { tokens = CharOperation.splitOn('/', filePath.toCharArray(), projectPath.length() + 1, filePath.length() diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/ui/util/PHPFileUtil.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/ui/util/PHPFileUtil.java index 39dadfc..e8ffe5d 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/ui/util/PHPFileUtil.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/ui/util/PHPFileUtil.java @@ -27,9 +27,8 @@ public class PHPFileUtil { public final static String[] SMARTY_EXTENSIONS = { "tpl" }; public static boolean isPHPFile(IFile file) { - // String extension = file.getFileExtension(); - return isPHPFileName(file.getLocation().toString()); - } + return isPHPFileName(file.getFullPath().toString()); + } // public final static String getFileExtension(String name) { // int index = name.lastIndexOf('.'); -- 1.7.1