Committing patch from grEvenX to fix bug #1839622 RSE Path error
authorEdward Mann <phpeclipse.dev@edmann.com>
Sun, 6 Jan 2008 15:46:14 +0000 (15:46 +0000)
committerEdward Mann <phpeclipse.dev@edmann.com>
Sun, 6 Jan 2008 15:46:14 +0000 (15:46 +0000)
net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/parser/Parser.java
net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/ui/util/PHPFileUtil.java

index 5fddf9e..c31b8fa 100644 (file)
@@ -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()
index 39dadfc..e8ffe5d 100644 (file)
@@ -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('.');