aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorzzhongwei2013-01-14 23:36:13 (EST)
committerzzhongwei2013-01-14 23:36:13 (EST)
commit8e00442b2b60b4d2d2645e05612e19fccb751539 (patch)
treef2a0f0d72ce1399935441da74bf02d688bcd05f5
parent579518e5f1c4a7462093ed5c28f1862f60fac3ab (diff)
downloadorg.eclipse.pdt-8e00442b2b60b4d2d2645e05612e19fccb751539.zip
org.eclipse.pdt-8e00442b2b60b4d2d2645e05612e19fccb751539.tar.gz
org.eclipse.pdt-8e00442b2b60b4d2d2645e05612e19fccb751539.tar.bz2
398143: [Regression] Method icons changed in CA
https://bugs.eclipse.org/bugs/show_bug.cgi?id=398143
-rw-r--r--plugins/org.eclipse.php.core/src/org/eclipse/php/internal/core/compiler/PHPSourceElementRequestor.java5
-rw-r--r--plugins/org.eclipse.php.core/src/org/eclipse/php/internal/core/index/PhpIndexingVisitor.java5
2 files changed, 10 insertions, 0 deletions
diff --git a/plugins/org.eclipse.php.core/src/org/eclipse/php/internal/core/compiler/PHPSourceElementRequestor.java b/plugins/org.eclipse.php.core/src/org/eclipse/php/internal/core/compiler/PHPSourceElementRequestor.java
index 43a1e98..5060306 100644
--- a/plugins/org.eclipse.php.core/src/org/eclipse/php/internal/core/compiler/PHPSourceElementRequestor.java
+++ b/plugins/org.eclipse.php.core/src/org/eclipse/php/internal/core/compiler/PHPSourceElementRequestor.java
@@ -34,6 +34,7 @@ import org.eclipse.dltk.compiler.*;
import org.eclipse.dltk.compiler.IElementRequestor.ImportInfo;
import org.eclipse.dltk.compiler.IElementRequestor.TypeInfo;
import org.eclipse.dltk.compiler.env.IModuleSource;
+import org.eclipse.dltk.core.Flags;
import org.eclipse.php.core.compiler.IPHPModifiers;
import org.eclipse.php.core.compiler.PHPSourceElementRequestorExtension;
import org.eclipse.php.internal.core.Logger;
@@ -335,6 +336,10 @@ public class PHPSourceElementRequestor extends SourceElementRequestVisitor {
if (fCurrentClass == null || fCurrentClass == fLastNamespace) {
mi.modifiers |= Modifiers.AccGlobal;
}
+ if (!Flags.isPrivate(mi.modifiers) && !Flags.isProtected(mi.modifiers)
+ && !Flags.isPublic(mi.modifiers)) {
+ mi.modifiers |= Modifiers.AccPublic;
+ }
mi.parameterTypes = processParamterTypes(methodDeclaration);
mi.returnType = processReturnType(methodDeclaration);
diff --git a/plugins/org.eclipse.php.core/src/org/eclipse/php/internal/core/index/PhpIndexingVisitor.java b/plugins/org.eclipse.php.core/src/org/eclipse/php/internal/core/index/PhpIndexingVisitor.java
index ed8f816..5c433d5 100644
--- a/plugins/org.eclipse.php.core/src/org/eclipse/php/internal/core/index/PhpIndexingVisitor.java
+++ b/plugins/org.eclipse.php.core/src/org/eclipse/php/internal/core/index/PhpIndexingVisitor.java
@@ -31,6 +31,7 @@ import org.eclipse.dltk.ast.references.SimpleReference;
import org.eclipse.dltk.ast.references.TypeReference;
import org.eclipse.dltk.ast.references.VariableReference;
import org.eclipse.dltk.ast.statements.Statement;
+import org.eclipse.dltk.core.Flags;
import org.eclipse.dltk.core.IModelElement;
import org.eclipse.dltk.core.ISourceModule;
import org.eclipse.dltk.core.index2.IIndexingRequestor;
@@ -251,6 +252,10 @@ public class PhpIndexingVisitor extends PhpIndexingVisitorExtension {
|| (parentDeclaration instanceof TypeDeclaration && parentDeclaration == fCurrentNamespace)) {
modifiers |= Modifiers.AccGlobal;
}
+ if (!Flags.isPrivate(modifiers) && !Flags.isProtected(modifiers)
+ && !Flags.isPublic(modifiers)) {
+ modifiers |= Modifiers.AccPublic;
+ }
StringBuilder metadata = new StringBuilder();
List<Argument> arguments = method.getArguments();