import net.sourceforge.phpdt.internal.compiler.problem.ProblemReporter;
import net.sourceforge.phpdt.internal.compiler.problem.ProblemSeverities;
import net.sourceforge.phpdt.internal.compiler.util.Util;
-import net.sourceforge.phpdt.internal.ui.util.PHPFileUtil;
+import net.sourceforge.phpdt.internal.core.util.PHPFileUtil;
import net.sourceforge.phpeclipse.builder.IdentifierIndexManager;
-import net.sourceforge.phpeclipse.ui.overlaypages.ProjectPrefUtil;
+//import net.sourceforge.phpeclipse.ui.overlaypages.ProjectPrefUtil;
import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IProject;
// fully_qualified_class_name
do {
if (token == TokenNameIdentifier) {
- char[] ident = scanner.getCurrentIdentifierSource();
+ //char[] ident = scanner.getCurrentIdentifierSource();
// TODO make this code working better:
// SingleTypeReference ref =
// ParserUtil.getTypeReference(scanner,
}
}
- private void optional_class_type() {
- // /* empty */
- // | T_STRING
- }
+// private void optional_class_type() {
+// // /* empty */
+// // | T_STRING
+// }
// private void parameterDeclaration() {
// //variable
if (path == null) {
// SyntaxError: "File: << >> doesn't exist in project."
String[] args = { expression.toStringExpression(),
- project.getLocation().toString() };
+ project.getFullPath().toString() };
problemReporter.phpIncludeNotExistWarning(args,
literal.sourceStart, literal.sourceEnd,
referenceContext,
return false;
}
- private void scalar() {
- // scalar:
- // T_STRING
- // | T_STRING_VARNAME
- // | class_constant
- // | common_scalar
- // | '"' encaps_list '"'
- // | '\'' encaps_list '\''
- // | T_START_HEREDOC encaps_list T_END_HEREDOC
- throwSyntaxError("Not yet implemented (scalar).");
- }
+// private void scalar() {
+// // scalar:
+// // T_STRING
+// // | T_STRING_VARNAME
+// // | class_constant
+// // | common_scalar
+// // | '"' encaps_list '"'
+// // | '\'' encaps_list '\''
+// // | T_START_HEREDOC encaps_list T_END_HEREDOC
+// throwSyntaxError("Not yet implemented (scalar).");
+// }
private void static_scalar() {
// static_scalar: /* compile-time evaluated scalars */
protected void consumePackageDeclarationName(IFile file) {
// create a package name similar to java package names
- String projectPath = ProjectPrefUtil.getDocumentRoot(file.getProject())
- .toString();
- String filePath = file.getFullPath().toString();
+ // incastrix
+ //String projectPath = ProjectPrefUtil.getDocumentRoot(file.getProject())
+ // .toString();
+ //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)) {
+
+ /*if (filePath.startsWith(projectPath)) {
tokens = CharOperation.splitOn('/', filePath.toCharArray(),
projectPath.length() + 1, filePath.length()
- fileExtensionLength);
- } else {
+ } else {*/
String name = file.getName();
tokens = new char[1][];
tokens[0] = name.substring(0, name.length() - fileExtensionLength)
.toCharArray();
- }
+ //}
this.compilationUnit.currentPackage = impt = new ImportReference(
tokens, new char[0], 0, 0, true);