summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Rennie2013-07-30 11:53:16 (EDT)
committerCurtis Windatt2013-07-30 11:53:16 (EDT)
commitd36a2d3d989aedd175601a3b853f3c90e17c69e6 (patch)
treef728592cc696d0f755087754762bdadb407dcb40
parentb3b3ed04b9ba2a16d9cb087e2351a308ba6ce713 (diff)
downloadeclipse.pde.ui-d36a2d3d989aedd175601a3b853f3c90e17c69e6.zip
eclipse.pde.ui-d36a2d3d989aedd175601a3b853f3c90e17c69e6.tar.gz
eclipse.pde.ui-d36a2d3d989aedd175601a3b853f3c90e17c69e6.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;