1) Moved net.sourceforge.phpeclipse.ui\src\net\sourceforge\phpdt back to net.sourcefo...
[phpeclipse.git] / net.sourceforge.phpeclipse / src / net / sourceforge / phpdt / ltk / core / RenameIdentifierDelegate.java
index 4313127..24ebd00 100644 (file)
@@ -12,10 +12,11 @@ import java.util.List;
 import java.util.Map;
 
 import net.sourceforge.phpdt.core.compiler.ITerminalSymbols;
+import net.sourceforge.phpdt.core.compiler.ITerminalSymbols.TokenName;
 import net.sourceforge.phpdt.core.compiler.InvalidInputException;
 import net.sourceforge.phpdt.internal.compiler.parser.Scanner;
 import net.sourceforge.phpdt.internal.compiler.parser.SyntaxError;
-import net.sourceforge.phpdt.internal.ui.util.PHPFileUtil;
+import net.sourceforge.phpdt.internal.core.util.PHPFileUtil;
 import net.sourceforge.phpeclipse.PHPeclipsePlugin;
 
 import org.eclipse.core.resources.IContainer;
@@ -95,12 +96,12 @@ public class RenameIdentifierDelegate {
                                                        }
                                                } catch (CoreException e) {
                                                        String msg = "Project: "
-                                                                       + project.getLocation().toOSString()
+                                                                       + project.getFullPath().toOSString()
                                                                        + " CoreException " + e.getMessage();
                                                        result.addError(msg);
                                                } catch (Exception e) {
                                                        String msg = "Project: "
-                                                                       + project.getLocation().toOSString()
+                                                                       + project.getFullPath().toOSString()
                                                                        + " Exception " + e.getMessage();
                                                        result.addError(msg);
                                                }
@@ -108,7 +109,7 @@ public class RenameIdentifierDelegate {
                                }
                        } catch (CoreException e) {
                                String msg = "Workspace: "
-                                               + rootContainer.getLocation().toOSString()
+                                               + rootContainer.getFullPath().toOSString()
                                                + " CoreException " + e.getMessage();
                                result.addError(msg);
                        }
@@ -119,11 +120,11 @@ public class RenameIdentifierDelegate {
                                        search(project, result);
                                }
                        } catch (CoreException e) {
-                               String msg = "Project: " + project.getLocation().toOSString()
+                               String msg = "Project: " + project.getFullPath().toOSString()
                                                + " CoreException " + e.getMessage();
                                result.addError(msg);
                        } catch (Exception e) {
-                               String msg = "Project: " + project.getLocation().toOSString()
+                               String msg = "Project: " + project.getFullPath().toOSString()
                                                + " Exception " + e.getMessage();
                                result.addError(msg);
                        }
@@ -291,12 +292,12 @@ public class RenameIdentifierDelegate {
                        scanner.setPHPMode(false);
                        char[] word = info.getOldName().toCharArray();
 
-                       int fToken = ITerminalSymbols.TokenNameEOF;
+                       TokenName fToken = ITerminalSymbols.TokenName.EOF;
                        try {
                                fToken = scanner.getNextToken();
-                               while (fToken != ITerminalSymbols.TokenNameEOF) {
-                                       if (fToken == ITerminalSymbols.TokenNameVariable
-                                                       || fToken == ITerminalSymbols.TokenNameIdentifier) {
+                               while (fToken != ITerminalSymbols.TokenName.EOF) {
+                                       if (fToken == ITerminalSymbols.TokenName.VARIABLE
+                                                       || fToken == ITerminalSymbols.TokenName.IDENTIFIER) {
                                                if (scanner.equalsCurrentTokenSource(word)) {
                                                        matches.add(new Integer(scanner
                                                                        .getCurrentTokenStartPosition()));
@@ -306,17 +307,17 @@ public class RenameIdentifierDelegate {
                                }
 
                        } catch (InvalidInputException e) {
-                               String msg = "File: " + file.getLocation().toOSString()
+                               String msg = "File: " + file.getFullPath().toOSString()
                                                + " InvalidInputException " + e.getMessage();
                                status.addError(msg);
                        } catch (SyntaxError e) {
-                               String msg = "File: " + file.getLocation().toOSString()
+                               String msg = "File: " + file.getFullPath().toOSString()
                                                + " SyntaxError " + e.getMessage();
                                status.addError(msg);
                        }
 
                } catch (Exception e) {
-                       String msg = "File: " + file.getLocation().toOSString()
+                       String msg = "File: " + file.getFullPath().toOSString()
                                        + " Exception " + e.getMessage();
                        status.addError(msg);
                }