Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--plugins/org.eclipse.php.core/src/org/eclipse/php/core/compiler/ast/nodes/NamespaceReference.java10
-rw-r--r--plugins/org.eclipse.php.core/src/org/eclipse/php/internal/core/compiler/ast/visitor/ValidatorVisitor.java3
2 files changed, 11 insertions, 2 deletions
diff --git a/plugins/org.eclipse.php.core/src/org/eclipse/php/core/compiler/ast/nodes/NamespaceReference.java b/plugins/org.eclipse.php.core/src/org/eclipse/php/core/compiler/ast/nodes/NamespaceReference.java
index a4c59968f..3799fd99f 100644
--- a/plugins/org.eclipse.php.core/src/org/eclipse/php/core/compiler/ast/nodes/NamespaceReference.java
+++ b/plugins/org.eclipse.php.core/src/org/eclipse/php/core/compiler/ast/nodes/NamespaceReference.java
@@ -38,7 +38,9 @@ public class NamespaceReference extends TypeReference {
/**
* Returns whether the namespace name is prefixed with a '\' character. <br>
* <b>WARNING:</b> isGlobal() will always return false for
- * NamespaceReferences used inside any kind of use statement declaration.
+ * NamespaceReferences used inside any kind of use statement declaration,
+ * because we never set this property for any kind of use statement
+ * declaration.
*
* @return
*/
@@ -59,7 +61,11 @@ public class NamespaceReference extends TypeReference {
* Returns whether the namespace name is prefixed with a 'namespace'
* keyword. <br>
* <b>WARNING:</b> despite its name, method isLocal() is <b>not</b> related
- * to method isGlobal().
+ * to method isGlobal(). <br>
+ * <b>WARNING:</b> isLocal() will always return false for
+ * NamespaceReferences used inside any kind of use statement declaration,
+ * because we never set this property for any kind of use statement
+ * declaration.
*
* @return
*/
diff --git a/plugins/org.eclipse.php.core/src/org/eclipse/php/internal/core/compiler/ast/visitor/ValidatorVisitor.java b/plugins/org.eclipse.php.core/src/org/eclipse/php/internal/core/compiler/ast/visitor/ValidatorVisitor.java
index a97789b5b..52ddb3dc3 100644
--- a/plugins/org.eclipse.php.core/src/org/eclipse/php/internal/core/compiler/ast/visitor/ValidatorVisitor.java
+++ b/plugins/org.eclipse.php.core/src/org/eclipse/php/internal/core/compiler/ast/visitor/ValidatorVisitor.java
@@ -861,6 +861,9 @@ public class ValidatorVisitor extends PHPASTVisitor implements IValidatorVisitor
// for use statement, no need to lookup the use statement
// to compute namespace name
if (!isUseStatement) {
+ // Bug 517368 - Use statement doesn't take care
+ // Annotation / Alias
+ // https://bugs.eclipse.org/bugs/show_bug.cgi?id=517368
// use first segment of namespace to lookup the use
// statements
String[] segments = namespaceName.split("\\\\", 2); //$NON-NLS-1$

Back to the top