Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThierry BLIND2019-05-02 11:44:42 -0400
committerThierry BLIND2019-05-02 11:44:42 -0400
commitb81a9a8c2d96ecbd1b53bdec4d6b094918970bd7 (patch)
tree70e5d16c13e3d680bbbeec4b4d10e142ab7db858
parent94f789fa0cabdac43c0ffc925e2cfd8f2f50e6ec (diff)
downloadorg.eclipse.pdt-b81a9a8c2d96ecbd1b53bdec4d6b094918970bd7.tar.gz
org.eclipse.pdt-b81a9a8c2d96ecbd1b53bdec4d6b094918970bd7.tar.xz
org.eclipse.pdt-b81a9a8c2d96ecbd1b53bdec4d6b094918970bd7.zip
No bug - add some comments as reminder for a very specific code cases
Change-Id: I5adadd82fbd4c8e1ebcf31a6fd7f7d1c1a6cbe9f Signed-off-by: Thierry BLIND <thierryblind@msn.com>
-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