summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Rennie2013-07-30 11:53:16 (EDT)
committer Curtis Windatt2013-07-30 11:55:28 (EDT)
commita09228385a8437df5174822fdbbec9e9f5d4b86a (patch)
treee7d6cda0a331abfdc42bd7e2e7fa93a201d1a9a1
parent0b749202addb1ae8e672dc6fe299caef87284d97 (diff)
downloadeclipse.pde.ui-a09228385a8437df5174822fdbbec9e9f5d4b86a.zip
eclipse.pde.ui-a09228385a8437df5174822fdbbec9e9f5d4b86a.tar.gz
eclipse.pde.ui-a09228385a8437df5174822fdbbec9e9f5d4b86a.tar.bz2
Bug 409393 - Content assist does not work on an interface field or
method unless explicitly marked as public Change-Id: I4890d7c1e63c9ca20a52f5ea610816075bae5285
-rw-r--r--apitools/org.eclipse.pde.api.tools.ui/src/org/eclipse/pde/api/tools/ui/internal/completion/APIToolsJavadocCompletionProposalComputer.java10
1 files changed, 6 insertions, 4 deletions
diff --git a/apitools/org.eclipse.pde.api.tools.ui/src/org/eclipse/pde/api/tools/ui/internal/completion/APIToolsJavadocCompletionProposalComputer.java b/apitools/org.eclipse.pde.api.tools.ui/src/org/eclipse/pde/api/tools/ui/internal/completion/APIToolsJavadocCompletionProposalComputer.java
index ccb1964..d2739ac 100644
--- a/apitools/org.eclipse.pde.api.tools.ui/src/org/eclipse/pde/api/tools/ui/internal/completion/APIToolsJavadocCompletionProposalComputer.java
+++ b/apitools/org.eclipse.pde.api.tools.ui/src/org/eclipse/pde/api/tools/ui/internal/completion/APIToolsJavadocCompletionProposalComputer.java
@@ -143,9 +143,10 @@ public class APIToolsJavadocCompletionProposalComputer implements IJavaCompletio
case IJavaElement.METHOD: {
IMethod method = (IMethod) element;
int flags = method.getFlags();
+ boolean inter = method.getDeclaringType().isInterface();
if(Flags.isPrivate(flags) ||
- Flags.isPackageDefault(flags) ||
- hasNonVisibleParent(element, method.getDeclaringType().isInterface())) {
+ (Flags.isPackageDefault(flags) && !inter) ||
+ hasNonVisibleParent(element, inter)) {
return Collections.EMPTY_LIST;
}
member = IApiJavadocTag.MEMBER_METHOD;
@@ -157,11 +158,12 @@ public class APIToolsJavadocCompletionProposalComputer implements IJavaCompletio
case IJavaElement.FIELD: {
IField field = (IField) element;
int flags = field.getFlags();
+ boolean inter = field.getDeclaringType().isInterface();
if(Flags.isFinal(flags) ||
field.isEnumConstant() ||
Flags.isPrivate(flags) ||
- Flags.isPackageDefault(flags) ||
- hasNonVisibleParent(element, field.getDeclaringType().isInterface())) {
+ (Flags.isPackageDefault(flags) && !inter) ||
+ hasNonVisibleParent(element, inter)) {
return Collections.EMPTY_LIST;
}
member = IApiJavadocTag.MEMBER_FIELD;